summaryrefslogtreecommitdiffstats
path: root/make/config/nativewindow
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-06-09 20:31:17 +0200
committerSven Gothel <[email protected]>2023-06-16 02:43:11 +0200
commit4267837c591c9c205ff5206afaf38bba8c4215ac (patch)
tree73db7e31ced10f3b793fadc9a76bb3d682e0fda4 /make/config/nativewindow
parent6fa48e0595d6b607195eee53c0b985a8cddfa7bb (diff)
Adopt to GlueGen commit 952e0c1f83c9e0583a97d39988a6ba1428911c8c
To limit growing code due to GlueGen's more capable new `Struct` emitter (more supported setter), `Struct` with intended read-only access have been marked `ImmutableAccess` in their GlueGen config file. Produced code with above setting compared with pre-GlueGen change is reduced while also having dropped all of the JNI calls retrieving `Struct` values. Only calls to function-pointer produced JNI methods, of course.
Diffstat (limited to 'make/config/nativewindow')
-rw-r--r--make/config/nativewindow/drm-gbm-lib.cfg18
-rw-r--r--make/config/nativewindow/jawt-common.cfg10
-rw-r--r--make/config/nativewindow/win32-lib.cfg8
-rw-r--r--make/config/nativewindow/x11-lib.cfg4
4 files changed, 37 insertions, 3 deletions
diff --git a/make/config/nativewindow/drm-gbm-lib.cfg b/make/config/nativewindow/drm-gbm-lib.cfg
index ad1311ce1..43bbdc8e3 100644
--- a/make/config/nativewindow/drm-gbm-lib.cfg
+++ b/make/config/nativewindow/drm-gbm-lib.cfg
@@ -28,15 +28,27 @@ ArgumentIsString drmCheckModesettingSupported 0
# ReturnsString XDisplayString
# ReturnValueCapacity XRenderFindVisualFormat sizeof(XRenderPictFormat)
-ReturnedArrayLength drmModeRes.connectors getCount_connectors()
-ReturnedArrayLength drmModeRes.crtcs getCount_crtcs()
-ReturnedArrayLength drmModeRes.encoders getCount_encoders()
+ImmutableAccess drmModeConnector
ReturnedArrayLength drmModeConnector.modes getCount_modes()
ReturnedArrayLength drmModeConnector.props getCount_props()
ReturnedArrayLength drmModeConnector.prop_values getCount_props()
ReturnedArrayLength drmModeConnector.encoders getCount_encoders()
+
+ImmutableAccess drmModeCrtc
+
+ImmutableAccess drmModeEncoder
+
+ImmutableAccess drmModeFB
+
+ImmutableAccess drmModeModeInfo
ReturnsString drmModeModeInfo.name
+ImmutableAccess drmModeRes
+ReturnedArrayLength drmModeRes.connectors getCount_connectors()
+ReturnedArrayLength drmModeRes.crtcs getCount_crtcs()
+ReturnedArrayLength drmModeRes.encoders getCount_encoders()
+
+
IgnoreNot ^(drm|DRM_|gbm_|GBM_).+
Ignore drmHandleEvent
diff --git a/make/config/nativewindow/jawt-common.cfg b/make/config/nativewindow/jawt-common.cfg
index adb6ce49b..4d48c6bf9 100644
--- a/make/config/nativewindow/jawt-common.cfg
+++ b/make/config/nativewindow/jawt-common.cfg
@@ -15,7 +15,17 @@ ReturnValueCapacity JAWT_DrawingSurface.GetDrawingSurfaceInfo sizeof(JAWT_Drawin
IgnoreField JAWT GetComponent
IgnoreField JAWT_DrawingSurface target
+
+ImmutableAccess JAWT_DrawingSurfaceInfo
IgnoreField JAWT_DrawingSurfaceInfo platformInfo
+IgnoreField JAWT_DrawingSurfaceInfo ds
+IgnoreField JAWT_DrawingSurfaceInfo clip
+
+ImmutableAccess JAWT_Rectangle
+
+ImmutableAccess JAWT_X11DrawingSurfaceInfo
+ImmutableAccess JAWT_Win32DrawingSurfaceInfo
+ImmutableAccess JAWT_MacOSXDrawingSurfaceInfo
IncludeAs CustomJavaCode JAWT jawt-CustomJavaCode.java
diff --git a/make/config/nativewindow/win32-lib.cfg b/make/config/nativewindow/win32-lib.cfg
index d4cb15c41..d039d6e90 100644
--- a/make/config/nativewindow/win32-lib.cfg
+++ b/make/config/nativewindow/win32-lib.cfg
@@ -20,6 +20,14 @@ NIODirectOnly DwmSetWindowAttribute
NIODirectOnly GetWindowCompositionAccentPolicy
NIODirectOnly SetWindowCompositionAccentPolicy
+ImmutableAccess BITMAPINFO
+# ImmutableAccess BITMAPINFOHEADER
+# ImmutableAccess DWM_BLURBEHIND
+# ImmutableAccess MARGINS
+# ImmutableAccess PIXELFORMATDESCRIPTOR
+ImmutableAccess RECT
+ImmutableAccess RGBQUAD
+
Import com.jogamp.nativewindow.util.Point
Import com.jogamp.nativewindow.NativeWindowException
Import jogamp.nativewindow.NWJNILibLoader
diff --git a/make/config/nativewindow/x11-lib.cfg b/make/config/nativewindow/x11-lib.cfg
index 0bbe1c420..65dec9445 100644
--- a/make/config/nativewindow/x11-lib.cfg
+++ b/make/config/nativewindow/x11-lib.cfg
@@ -24,6 +24,10 @@ Opaque long GLXContext
Opaque long GLXFBConfig
Opaque long void *
+ImmutableAccess XRenderDirectFormat
+ImmutableAccess XRenderPictFormat
+# ImmutableAccess XVisualInfo
+
IncludeAs CustomJavaCode X11Lib x11-CustomJavaCode.java
ArgumentIsString XOpenDisplay 0