Class MacForeignFunctions
java.lang.Object
oshi.ffm.ForeignFunctions
oshi.ffm.mac.MacForeignFunctions
- Direct Known Subclasses:
CoreFoundationFunctions, CoreGraphicsFunctions, DiskArbitrationFunctions, IOKitFunctions, IOReportFunctions, MacSystemFunctions, SystemConfigurationFunctions
Base class for macOS FFM function bindings, adding framework lookup support on top of
ForeignFunctions.-
Field Summary
FieldsModifier and TypeFieldDescriptionSearch paths for macOS frameworks, in priority order.Fields inherited from class ForeignFunctions
CAPTURE_CALL_STATE, CAPTURED_STATE_LAYOUT, ERRNO_HANDLE, LIBRARY_ARENA, LINKER, NATIVE_LONG_SIZE, NATIVE_POINTER_SIZE, NATIVE_SIZE_T_SIZE, SYMBOL_LOOKUP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static SymbolLookupframeworkLookup(String frameworkName) Lookup a macOS framework by simple name, e.g.Methods inherited from class ForeignFunctions
downcall, getByteArrayFromNativePointer, getErrno, getStringFromNativePointer, getStructFromNativePointer, lib, libraryLookup
-
Field Details
-
FRAMEWORK_SEARCH_PATHS
Search paths for macOS frameworks, in priority order./System/Library/Frameworks- Reserved strictly for Apple's core OS frameworks (e.g. IOKit, CoreFoundation, AppKit)./Library/Frameworks- Standard location for third-party frameworks available to all users (e.g. SDL2, GStreamer, or custom drivers).
-
-
Constructor Details
-
MacForeignFunctions
protected MacForeignFunctions()Not intended for instantiation.
-
-
Method Details
-
frameworkLookup
Lookup a macOS framework by simple name, e.g."IOKit". SearchesFRAMEWORK_SEARCH_PATHSin order.- Parameters:
frameworkName- the framework name without path or extension- Returns:
- the symbol lookup for the framework
- Throws:
IllegalArgumentException- if the framework is not found in any search path
-