{-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE NoFieldSelectors #-} {-# LANGUAGE NoImplicitPrelude #-} -- | This header allows you to annotate your code so external tools know about dynamic shared library dependencies. -- -- If you determine that your toolchain doesn\'t support dlopen notes, you can disable this feature by defining @SDL_DISABLE_DLOPEN_NOTES@. You can use this CMake snippet to check for support: -- -- Use this macro with @SDL_ELF_NOTE_DLOPEN()@ to note that a dynamic shared library dependency is optional. -- -- @ -- include(CheckCSourceCompiles) -- find_package(SDL3 REQUIRED CONFIG COMPONENTS Headers) -- list(APPEND CMAKE_REQUIRED_LIBRARIES SDL3::Headers) -- check_c_source_compiles([==[ -- \#include \<SDL3\/SDL_dlopennote.h> -- SDL_ELF_NOTE_DLOPEN(\"sdl-video\", -- \"Support for video through SDL\", -- SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED, -- \"libSDL-1.2.so.0\", \"libSDL-2.0.so.0\", \"libSDL3.so.0\" -- ) -- int main(int argc, char *argv[]) { -- return argc + argv[0][1]; -- } -- ]==] COMPILER_SUPPORTS_SDL_ELF_NOTE_DLOPEN) -- if(NOT COMPILER_SUPPORTS_SDL_ELF_NOTE_DLOPEN) -- add_compile_definitions(-DSDL_DISABLE_DLOPEN_NOTE) -- endif() -- @ -- -- Optional functionality uses the dependency, the binary will work and the dependency is only needed for full-featured installations. -- -- @since 3.4.0 -- -- [See also]: @SDL_ELF_NOTE_DLOPEN@, 'sDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED', 'sDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED' module SDL3.Sys.Bindgen.Dlopennote ( SDL3.Sys.Bindgen.Dlopennote.sDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED, SDL3.Sys.Bindgen.Dlopennote.sDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED, SDL3.Sys.Bindgen.Dlopennote.sDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED, ) where import HsBindgen.Runtime.Support qualified as BG -- | [C declaration]: @macro SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED@, literal @\"suggested\"@, defined at @SDL3\/SDL_dlopennote.h 71:9@ sDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED :: BG.ByteString sDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED :: ByteString sDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED = [Word8] -> ByteString BG.pack [Word8 0x73, Word8 0x75, Word8 0x67, Word8 0x67, Word8 0x65, Word8 0x73, Word8 0x74, Word8 0x65, Word8 0x64] -- | Use this macro with @SDL_ELF_NOTE_DLOPEN()@ to note that a dynamic shared library dependency is recommended. -- -- Important functionality needs the dependency, the binary will work but in most cases the dependency should be provided. -- -- @since 3.4.0 -- -- [See also]: @SDL_ELF_NOTE_DLOPEN@, 'sDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED', 'sDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED' -- -- [C declaration]: @macro SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED@, literal @\"recommended\"@, defined at @SDL3\/SDL_dlopennote.h 86:9@ sDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED :: BG.ByteString sDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED :: ByteString sDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED = [Word8] -> ByteString BG.pack [Word8 0x72, Word8 0x65, Word8 0x63, Word8 0x6F, Word8 0x6D, Word8 0x6D, Word8 0x65, Word8 0x6E, Word8 0x64, Word8 0x65, Word8 0x64] -- | Use this macro with @SDL_ELF_NOTE_DLOPEN()@ to note that a dynamic shared library dependency is required. -- -- Core functionality needs the dependency, the binary will not work if it cannot be found. -- -- @since 3.4.0 -- -- [See also]: @SDL_ELF_NOTE_DLOPEN@, 'sDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED', 'sDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED' -- -- [C declaration]: @macro SDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED@, literal @\"required\"@, defined at @SDL3\/SDL_dlopennote.h 101:9@ sDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED :: BG.ByteString sDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED :: ByteString sDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED = [Word8] -> ByteString BG.pack [Word8 0x72, Word8 0x65, Word8 0x71, Word8 0x75, Word8 0x69, Word8 0x72, Word8 0x65, Word8 0x64]