diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da96985..3d16979 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,14 +25,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: '18' - - - name: Install dependencies - run: npm install - - name: Create a folder for the tarball run: | mkdir release @@ -67,27 +59,41 @@ jobs: - name: Clean up the Docker container (Windows and Linux) if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'windows') run: docker container rm ${{ matrix.PLATFORM }} + + - name: "Install nvm" + run: | + # curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash + # export NVM_DIR="$HOME/.nvm" + # [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + + # arch -x86_64 zsh + # nvm use system + # nvm cache clear + # nvm uninstall 18 + # nvm install 18 + # nvm use 18 - name: Configure and Build on OSX if: contains(matrix.os, 'mac') run: | # Install nasm (useful for vcpkg) - brew install nasm + # brew install nasm # Install python setup tools - pip3 install setuptools + # pip3 install setuptools # Clone vcpkg and install libheif - git clone https://github.com/microsoft/vcpkg.git - ./vcpkg/bootstrap-vcpkg.sh - ./vcpkg/vcpkg install libheif + # git clone https://github.com/microsoft/vcpkg.git + # ./vcpkg/bootstrap-vcpkg.sh + # ./vcpkg/vcpkg install libheif # Build project + npm install npm run configure npm run build # Run tests - # npm run test + npm run test # Copy .node in the release folder cp ./src/build/Release/converter.node ./release/lib/converter.${{ matrix.PLATFORM }}.node diff --git a/vcpkg/installed/x64-osx/include/ffi.h b/vcpkg/installed/x64-osx/include/ffi.h new file mode 100644 index 0000000..57e7153 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/ffi.h @@ -0,0 +1,518 @@ +/* -----------------------------------------------------------------*-C-*- + libffi 3.4.6 + - Copyright (c) 2011, 2014, 2019, 2021, 2022, 2024 Anthony Green + - Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the ``Software''), to deal in the Software without + restriction, including without limitation the rights to use, copy, + modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + ----------------------------------------------------------------------- */ + +/* ------------------------------------------------------------------- + Most of the API is documented in doc/libffi.texi. + + The raw API is designed to bypass some of the argument packing and + unpacking on architectures for which it can be avoided. Routines + are provided to emulate the raw API if the underlying platform + doesn't allow faster implementation. + + More details on the raw API can be found in: + + http://gcc.gnu.org/ml/java/1999-q3/msg00138.html + + and + + http://gcc.gnu.org/ml/java/1999-q3/msg00174.html + -------------------------------------------------------------------- */ + +#ifndef LIBFFI_H +#define LIBFFI_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Specify which architecture libffi is configured for. */ +#ifndef X86_64 +#define X86_64 +#endif + +/* ---- System configuration information --------------------------------- */ + +/* If these change, update src/mips/ffitarget.h. */ +#define FFI_TYPE_VOID 0 +#define FFI_TYPE_INT 1 +#define FFI_TYPE_FLOAT 2 +#define FFI_TYPE_DOUBLE 3 +#if 1 +#define FFI_TYPE_LONGDOUBLE 4 +#else +#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE +#endif +#define FFI_TYPE_UINT8 5 +#define FFI_TYPE_SINT8 6 +#define FFI_TYPE_UINT16 7 +#define FFI_TYPE_SINT16 8 +#define FFI_TYPE_UINT32 9 +#define FFI_TYPE_SINT32 10 +#define FFI_TYPE_UINT64 11 +#define FFI_TYPE_SINT64 12 +#define FFI_TYPE_STRUCT 13 +#define FFI_TYPE_POINTER 14 +#define FFI_TYPE_COMPLEX 15 + +/* This should always refer to the last type code (for sanity checks). */ +#define FFI_TYPE_LAST FFI_TYPE_COMPLEX + +#include + +#ifndef LIBFFI_ASM + +#if defined(_MSC_VER) && !defined(__clang__) +#define __attribute__(X) +#endif + +#include +#include + +/* LONG_LONG_MAX is not always defined (not if STRICT_ANSI, for example). + But we can find it either under the correct ANSI name, or under GNU + C's internal name. */ + +#define FFI_64_BIT_MAX 9223372036854775807 + +#ifdef LONG_LONG_MAX +# define FFI_LONG_LONG_MAX LONG_LONG_MAX +#else +# ifdef LLONG_MAX +# define FFI_LONG_LONG_MAX LLONG_MAX +# ifdef _AIX52 /* or newer has C99 LLONG_MAX */ +# undef FFI_64_BIT_MAX +# define FFI_64_BIT_MAX 9223372036854775807LL +# endif /* _AIX52 or newer */ +# else +# ifdef __GNUC__ +# define FFI_LONG_LONG_MAX __LONG_LONG_MAX__ +# endif +# ifdef _AIX /* AIX 5.1 and earlier have LONGLONG_MAX */ +# ifndef __PPC64__ +# if defined (__IBMC__) || defined (__IBMCPP__) +# define FFI_LONG_LONG_MAX LONGLONG_MAX +# endif +# endif /* __PPC64__ */ +# undef FFI_64_BIT_MAX +# define FFI_64_BIT_MAX 9223372036854775807LL +# endif +# endif +#endif + +/* The closure code assumes that this works on pointers, i.e. a size_t + can hold a pointer. */ + +typedef struct _ffi_type +{ + size_t size; + unsigned short alignment; + unsigned short type; + struct _ffi_type **elements; +} ffi_type; + +/* Need minimal decorations for DLLs to work on Windows. GCC has + autoimport and autoexport. Always mark externally visible symbols + as dllimport for MSVC clients, even if it means an extra indirection + when using the static version of the library. + Besides, as a workaround, they can define FFI_BUILDING if they + *know* they are going to link with the static library. */ +#if defined _MSC_VER && !1 +# if defined FFI_BUILDING_DLL /* Building libffi.DLL with msvcc.sh */ +# define FFI_API __declspec(dllexport) +# else /* Importing libffi.DLL */ +# define FFI_API __declspec(dllimport) +# endif +#else +# define FFI_API +#endif + +/* The externally visible type declarations also need the MSVC DLL + decorations, or they will not be exported from the object file. */ +#if defined LIBFFI_HIDE_BASIC_TYPES +# define FFI_EXTERN FFI_API +#else +# define FFI_EXTERN extern FFI_API +#endif + +#ifndef LIBFFI_HIDE_BASIC_TYPES +#if SCHAR_MAX == 127 +# define ffi_type_uchar ffi_type_uint8 +# define ffi_type_schar ffi_type_sint8 +#else + #error "char size not supported" +#endif + +#if SHRT_MAX == 32767 +# define ffi_type_ushort ffi_type_uint16 +# define ffi_type_sshort ffi_type_sint16 +#elif SHRT_MAX == 2147483647 +# define ffi_type_ushort ffi_type_uint32 +# define ffi_type_sshort ffi_type_sint32 +#else + #error "short size not supported" +#endif + +#if INT_MAX == 32767 +# define ffi_type_uint ffi_type_uint16 +# define ffi_type_sint ffi_type_sint16 +#elif INT_MAX == 2147483647 +# define ffi_type_uint ffi_type_uint32 +# define ffi_type_sint ffi_type_sint32 +#elif INT_MAX == 9223372036854775807 +# define ffi_type_uint ffi_type_uint64 +# define ffi_type_sint ffi_type_sint64 +#else + #error "int size not supported" +#endif + +#if LONG_MAX == 2147483647 +# if FFI_LONG_LONG_MAX != FFI_64_BIT_MAX + #error "no 64-bit data type supported" +# endif +#elif LONG_MAX != FFI_64_BIT_MAX + #error "long size not supported" +#endif + +#if LONG_MAX == 2147483647 +# define ffi_type_ulong ffi_type_uint32 +# define ffi_type_slong ffi_type_sint32 +#elif LONG_MAX == FFI_64_BIT_MAX +# define ffi_type_ulong ffi_type_uint64 +# define ffi_type_slong ffi_type_sint64 +#else + #error "long size not supported" +#endif + +/* These are defined in types.c. */ +FFI_EXTERN ffi_type ffi_type_void; +FFI_EXTERN ffi_type ffi_type_uint8; +FFI_EXTERN ffi_type ffi_type_sint8; +FFI_EXTERN ffi_type ffi_type_uint16; +FFI_EXTERN ffi_type ffi_type_sint16; +FFI_EXTERN ffi_type ffi_type_uint32; +FFI_EXTERN ffi_type ffi_type_sint32; +FFI_EXTERN ffi_type ffi_type_uint64; +FFI_EXTERN ffi_type ffi_type_sint64; +FFI_EXTERN ffi_type ffi_type_float; +FFI_EXTERN ffi_type ffi_type_double; +FFI_EXTERN ffi_type ffi_type_pointer; +FFI_EXTERN ffi_type ffi_type_longdouble; + +#ifdef FFI_TARGET_HAS_COMPLEX_TYPE +FFI_EXTERN ffi_type ffi_type_complex_float; +FFI_EXTERN ffi_type ffi_type_complex_double; +FFI_EXTERN ffi_type ffi_type_complex_longdouble; +#endif +#endif /* LIBFFI_HIDE_BASIC_TYPES */ + +typedef enum { + FFI_OK = 0, + FFI_BAD_TYPEDEF, + FFI_BAD_ABI, + FFI_BAD_ARGTYPE +} ffi_status; + +typedef struct { + ffi_abi abi; + unsigned nargs; + ffi_type **arg_types; + ffi_type *rtype; + unsigned bytes; + unsigned flags; +#ifdef FFI_EXTRA_CIF_FIELDS + FFI_EXTRA_CIF_FIELDS; +#endif +} ffi_cif; + +/* ---- Definitions for the raw API -------------------------------------- */ + +#ifndef FFI_SIZEOF_ARG +# if LONG_MAX == 2147483647 +# define FFI_SIZEOF_ARG 4 +# elif LONG_MAX == FFI_64_BIT_MAX +# define FFI_SIZEOF_ARG 8 +# endif +#endif + +#ifndef FFI_SIZEOF_JAVA_RAW +# define FFI_SIZEOF_JAVA_RAW FFI_SIZEOF_ARG +#endif + +typedef union { + ffi_sarg sint; + ffi_arg uint; + float flt; + char data[FFI_SIZEOF_ARG]; + void* ptr; +} ffi_raw; + +#if FFI_SIZEOF_JAVA_RAW == 4 && FFI_SIZEOF_ARG == 8 +/* This is a special case for mips64/n32 ABI (and perhaps others) where + sizeof(void *) is 4 and FFI_SIZEOF_ARG is 8. */ +typedef union { + signed int sint; + unsigned int uint; + float flt; + char data[FFI_SIZEOF_JAVA_RAW]; + void* ptr; +} ffi_java_raw; +#else +typedef ffi_raw ffi_java_raw; +#endif + + +FFI_API +void ffi_raw_call (ffi_cif *cif, + void (*fn)(void), + void *rvalue, + ffi_raw *avalue); + +FFI_API void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw); +FFI_API void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args); +FFI_API size_t ffi_raw_size (ffi_cif *cif); + +/* This is analogous to the raw API, except it uses Java parameter + packing, even on 64-bit machines. I.e. on 64-bit machines longs + and doubles are followed by an empty 64-bit word. */ + +#if !FFI_NATIVE_RAW_API +FFI_API +void ffi_java_raw_call (ffi_cif *cif, + void (*fn)(void), + void *rvalue, + ffi_java_raw *avalue) __attribute__((deprecated)); +#endif + +FFI_API +void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw) __attribute__((deprecated)); +FFI_API +void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args) __attribute__((deprecated)); +FFI_API +size_t ffi_java_raw_size (ffi_cif *cif) __attribute__((deprecated)); + +/* ---- Definitions for closures ----------------------------------------- */ + +#if FFI_CLOSURES + +#ifdef _MSC_VER +__declspec(align(8)) +#endif +typedef struct { +#if 0 + void *trampoline_table; + void *trampoline_table_entry; +#else + union { + char tramp[FFI_TRAMPOLINE_SIZE]; + void *ftramp; + }; +#endif + ffi_cif *cif; + void (*fun)(ffi_cif*,void*,void**,void*); + void *user_data; +#if defined(_MSC_VER) && defined(_M_IX86) + void *padding; +#endif +} ffi_closure +#ifdef __GNUC__ + __attribute__((aligned (8))) +#endif + ; + +#ifndef __GNUC__ +# ifdef __sgi +# pragma pack 0 +# endif +#endif + +FFI_API void *ffi_closure_alloc (size_t size, void **code); +FFI_API void ffi_closure_free (void *); + +FFI_API ffi_status +ffi_prep_closure (ffi_closure*, + ffi_cif *, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data) +#if defined(__GNUC__) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 405) + __attribute__((deprecated ("use ffi_prep_closure_loc instead"))) +#elif defined(__GNUC__) && __GNUC__ >= 3 + __attribute__((deprecated)) +#endif + ; + +FFI_API ffi_status +ffi_prep_closure_loc (ffi_closure*, + ffi_cif *, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data, + void *codeloc); + +#ifdef __sgi +# pragma pack 8 +#endif +typedef struct { +#if 0 + void *trampoline_table; + void *trampoline_table_entry; +#else + char tramp[FFI_TRAMPOLINE_SIZE]; +#endif + ffi_cif *cif; + +#if !FFI_NATIVE_RAW_API + + /* If this is enabled, then a raw closure has the same layout + as a regular closure. We use this to install an intermediate + handler to do the translation, void** -> ffi_raw*. */ + + void (*translate_args)(ffi_cif*,void*,void**,void*); + void *this_closure; + +#endif + + void (*fun)(ffi_cif*,void*,ffi_raw*,void*); + void *user_data; + +} ffi_raw_closure; + +typedef struct { +#if 0 + void *trampoline_table; + void *trampoline_table_entry; +#else + char tramp[FFI_TRAMPOLINE_SIZE]; +#endif + + ffi_cif *cif; + +#if !FFI_NATIVE_RAW_API + + /* If this is enabled, then a raw closure has the same layout + as a regular closure. We use this to install an intermediate + handler to do the translation, void** -> ffi_raw*. */ + + void (*translate_args)(ffi_cif*,void*,void**,void*); + void *this_closure; + +#endif + + void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*); + void *user_data; + +} ffi_java_raw_closure; + +FFI_API ffi_status +ffi_prep_raw_closure (ffi_raw_closure*, + ffi_cif *cif, + void (*fun)(ffi_cif*,void*,ffi_raw*,void*), + void *user_data); + +FFI_API ffi_status +ffi_prep_raw_closure_loc (ffi_raw_closure*, + ffi_cif *cif, + void (*fun)(ffi_cif*,void*,ffi_raw*,void*), + void *user_data, + void *codeloc); + +#if !FFI_NATIVE_RAW_API +FFI_API ffi_status +ffi_prep_java_raw_closure (ffi_java_raw_closure*, + ffi_cif *cif, + void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*), + void *user_data) __attribute__((deprecated)); + +FFI_API ffi_status +ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*, + ffi_cif *cif, + void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*), + void *user_data, + void *codeloc) __attribute__((deprecated)); +#endif + +#endif /* FFI_CLOSURES */ + +#ifdef FFI_GO_CLOSURES + +typedef struct { + void *tramp; + ffi_cif *cif; + void (*fun)(ffi_cif*,void*,void**,void*); +} ffi_go_closure; + +FFI_API ffi_status ffi_prep_go_closure (ffi_go_closure*, ffi_cif *, + void (*fun)(ffi_cif*,void*,void**,void*)); + +FFI_API void ffi_call_go (ffi_cif *cif, void (*fn)(void), void *rvalue, + void **avalue, void *closure); + +#endif /* FFI_GO_CLOSURES */ + +/* ---- Public interface definition -------------------------------------- */ + +FFI_API +ffi_status ffi_prep_cif(ffi_cif *cif, + ffi_abi abi, + unsigned int nargs, + ffi_type *rtype, + ffi_type **atypes); + +FFI_API +ffi_status ffi_prep_cif_var(ffi_cif *cif, + ffi_abi abi, + unsigned int nfixedargs, + unsigned int ntotalargs, + ffi_type *rtype, + ffi_type **atypes); + +FFI_API +void ffi_call(ffi_cif *cif, + void (*fn)(void), + void *rvalue, + void **avalue); + +FFI_API +ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type, + size_t *offsets); + +/* Convert between closure and function pointers. */ +#if defined(PA_LINUX) || defined(PA_HPUX) +#define FFI_FN(f) ((void (*)(void))((unsigned int)(f) | 2)) +#define FFI_CL(f) ((void *)((unsigned int)(f) & ~3)) +#else +#define FFI_FN(f) ((void (*)(void))f) +#define FFI_CL(f) ((void *)(f)) +#endif + +/* ---- Definitions shared with assembly code ---------------------------- */ + +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/vcpkg/installed/x64-osx/include/ffitarget.h b/vcpkg/installed/x64-osx/include/ffitarget.h new file mode 100644 index 0000000..5a3399d --- /dev/null +++ b/vcpkg/installed/x64-osx/include/ffitarget.h @@ -0,0 +1,164 @@ +/* -----------------------------------------------------------------*-C-*- + ffitarget.h - Copyright (c) 2012, 2014, 2018 Anthony Green + Copyright (c) 1996-2003, 2010 Red Hat, Inc. + Copyright (C) 2008 Free Software Foundation, Inc. + + Target configuration macros for x86 and x86-64. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + ----------------------------------------------------------------------- */ + +#ifndef LIBFFI_TARGET_H +#define LIBFFI_TARGET_H + +#ifndef LIBFFI_H +#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." +#endif + +/* ---- System specific configurations ----------------------------------- */ + +/* For code common to all platforms on x86 and x86_64. */ +#define X86_ANY + +#if defined (X86_64) && defined (__i386__) +#undef X86_64 +#warning ****************************************************** +#warning ********** X86 IS DEFINED **************************** +#warning ****************************************************** +#define X86 +#endif + +#ifdef X86_WIN64 +#define FFI_SIZEOF_ARG 8 +#define USE_BUILTIN_FFS 0 /* not yet implemented in mingw-64 */ +#endif + +#define FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION +#ifndef _MSC_VER +#define FFI_TARGET_HAS_COMPLEX_TYPE +#endif + +/* ---- Generic type definitions ----------------------------------------- */ + +#ifndef LIBFFI_ASM +#ifdef X86_WIN64 +#ifdef _MSC_VER +typedef unsigned __int64 ffi_arg; +typedef __int64 ffi_sarg; +#else +typedef unsigned long long ffi_arg; +typedef long long ffi_sarg; +#endif +#else +#if defined __x86_64__ && defined __ILP32__ +#define FFI_SIZEOF_ARG 8 +#define FFI_SIZEOF_JAVA_RAW 4 +typedef unsigned long long ffi_arg; +typedef long long ffi_sarg; +#else +typedef unsigned long ffi_arg; +typedef signed long ffi_sarg; +#endif +#endif + +typedef enum ffi_abi { +#if defined(X86_WIN64) + FFI_FIRST_ABI = 0, + FFI_WIN64, /* sizeof(long double) == 8 - microsoft compilers */ + FFI_GNUW64, /* sizeof(long double) == 16 - GNU compilers */ + FFI_LAST_ABI, +#ifdef __GNUC__ + FFI_DEFAULT_ABI = FFI_GNUW64 +#else + FFI_DEFAULT_ABI = FFI_WIN64 +#endif + +#elif defined(X86_64) || (defined (__x86_64__) && defined (X86_DARWIN)) + FFI_FIRST_ABI = 1, + FFI_UNIX64, + FFI_WIN64, + FFI_EFI64 = FFI_WIN64, + FFI_GNUW64, + FFI_LAST_ABI, + FFI_DEFAULT_ABI = FFI_UNIX64 + +#elif defined(X86_WIN32) + FFI_FIRST_ABI = 0, + FFI_SYSV = 1, + FFI_STDCALL = 2, + FFI_THISCALL = 3, + FFI_FASTCALL = 4, + FFI_MS_CDECL = 5, + FFI_PASCAL = 6, + FFI_REGISTER = 7, + FFI_LAST_ABI, + FFI_DEFAULT_ABI = FFI_MS_CDECL +#else + FFI_FIRST_ABI = 0, + FFI_SYSV = 1, + FFI_THISCALL = 3, + FFI_FASTCALL = 4, + FFI_STDCALL = 5, + FFI_PASCAL = 6, + FFI_REGISTER = 7, + FFI_MS_CDECL = 8, + FFI_LAST_ABI, + FFI_DEFAULT_ABI = FFI_SYSV +#endif +} ffi_abi; +#endif + +/* ---- Definitions for closures ----------------------------------------- */ + +#define FFI_CLOSURES 1 +#define FFI_GO_CLOSURES 1 + +#define FFI_TYPE_SMALL_STRUCT_1B (FFI_TYPE_LAST + 1) +#define FFI_TYPE_SMALL_STRUCT_2B (FFI_TYPE_LAST + 2) +#define FFI_TYPE_SMALL_STRUCT_4B (FFI_TYPE_LAST + 3) +#define FFI_TYPE_MS_STRUCT (FFI_TYPE_LAST + 4) + +#if defined (X86_64) || defined(X86_WIN64) \ + || (defined (__x86_64__) && defined (X86_DARWIN)) +/* 4 bytes of ENDBR64 + 7 bytes of LEA + 6 bytes of JMP + 7 bytes of NOP + + 8 bytes of pointer. */ +# define FFI_TRAMPOLINE_SIZE 32 +# define FFI_NATIVE_RAW_API 0 +#else +/* 4 bytes of ENDBR32 + 5 bytes of MOV + 5 bytes of JMP + 2 unused + bytes. */ +# define FFI_TRAMPOLINE_SIZE 16 +# define FFI_NATIVE_RAW_API 1 /* x86 has native raw api support */ +#endif + +#if !defined(GENERATE_LIBFFI_MAP) && defined(__CET__) +# include +# if (__CET__ & 1) != 0 +# define ENDBR_PRESENT +# endif +# define _CET_NOTRACK notrack +#else +# define _CET_ENDBR +# define _CET_NOTRACK +#endif + +#endif diff --git a/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h new file mode 100644 index 0000000..cae551e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h @@ -0,0 +1,221 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ +/* GdkPixbuf library - Animation support + * + * Copyright (C) 1999 The Free Software Foundation + * + * Authors: Mark Crichton + * Miguel de Icaza + * Federico Mena-Quintero + * Havoc Pennington + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef GDK_PIXBUF_ANIMATION_H +#define GDK_PIXBUF_ANIMATION_H + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +/* Animation support */ + +typedef struct _GdkPixbufAnimation GdkPixbufAnimation; + + +typedef struct _GdkPixbufAnimationIter GdkPixbufAnimationIter; + +#define GDK_TYPE_PIXBUF_ANIMATION (gdk_pixbuf_animation_get_type ()) +#define GDK_PIXBUF_ANIMATION(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimation)) +#define GDK_IS_PIXBUF_ANIMATION(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_ANIMATION)) + +#define GDK_TYPE_PIXBUF_ANIMATION_ITER (gdk_pixbuf_animation_iter_get_type ()) +#define GDK_PIXBUF_ANIMATION_ITER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIter)) +#define GDK_IS_PIXBUF_ANIMATION_ITER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_ANIMATION_ITER)) + +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_animation_get_type (void) G_GNUC_CONST; + +#ifdef G_OS_WIN32 +/* API/ABI compat, see gdk-pixbuf-core.h for details */ +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file_utf8 (const char *filename, + GError **error); +#endif + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file (const char *filename, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_28 +GdkPixbufAnimation *gdk_pixbuf_animation_new_from_stream (GInputStream *stream, + GCancellable *cancellable, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_28 +void gdk_pixbuf_animation_new_from_stream_async (GInputStream *stream, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GDK_PIXBUF_AVAILABLE_IN_2_28 +GdkPixbufAnimation *gdk_pixbuf_animation_new_from_stream_finish (GAsyncResult*async_result, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_28 +GdkPixbufAnimation *gdk_pixbuf_animation_new_from_resource(const char *resource_path, + GError **error); + +#ifndef GDK_PIXBUF_DISABLE_DEPRECATED + +GDK_PIXBUF_DEPRECATED_IN_2_0_FOR(g_object_ref) +GdkPixbufAnimation *gdk_pixbuf_animation_ref (GdkPixbufAnimation *animation); +GDK_PIXBUF_DEPRECATED_IN_2_0_FOR(g_object_unref) +void gdk_pixbuf_animation_unref (GdkPixbufAnimation *animation); +#endif + +GDK_PIXBUF_AVAILABLE_IN_ALL +int gdk_pixbuf_animation_get_width (GdkPixbufAnimation *animation); +GDK_PIXBUF_AVAILABLE_IN_ALL +int gdk_pixbuf_animation_get_height (GdkPixbufAnimation *animation); +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_animation_is_static_image (GdkPixbufAnimation *animation); +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_animation_get_static_image (GdkPixbufAnimation *animation); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbufAnimationIter *gdk_pixbuf_animation_get_iter (GdkPixbufAnimation *animation, + const GTimeVal *start_time); +G_GNUC_END_IGNORE_DEPRECATIONS + +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_animation_iter_get_type (void) G_GNUC_CONST; +GDK_PIXBUF_AVAILABLE_IN_ALL +int gdk_pixbuf_animation_iter_get_delay_time (GdkPixbufAnimationIter *iter); +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_animation_iter_get_pixbuf (GdkPixbufAnimationIter *iter); +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_animation_iter_on_currently_loading_frame (GdkPixbufAnimationIter *iter); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_animation_iter_advance (GdkPixbufAnimationIter *iter, + const GTimeVal *current_time); +G_GNUC_END_IGNORE_DEPRECATIONS + + +#ifdef GDK_PIXBUF_ENABLE_BACKEND + + + +/** + * GdkPixbufAnimationClass: + * @parent_class: the parent class + * @is_static_image: returns whether the given animation is just a static image. + * @get_static_image: returns a static image representing the given animation. + * @get_size: fills @width and @height with the frame size of the animation. + * @get_iter: returns an iterator for the given animation. + * + * Modules supporting animations must derive a type from + * #GdkPixbufAnimation, providing suitable implementations of the + * virtual functions. + */ +typedef struct _GdkPixbufAnimationClass GdkPixbufAnimationClass; + +#define GDK_PIXBUF_ANIMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimationClass)) +#define GDK_IS_PIXBUF_ANIMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_ANIMATION)) +#define GDK_PIXBUF_ANIMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimationClass)) + +/* Private part of the GdkPixbufAnimation structure */ +struct _GdkPixbufAnimation { + GObject parent_instance; + +}; + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +struct _GdkPixbufAnimationClass { + GObjectClass parent_class; + + /*< public >*/ + + gboolean (*is_static_image) (GdkPixbufAnimation *animation); + + GdkPixbuf* (*get_static_image) (GdkPixbufAnimation *animation); + + void (*get_size) (GdkPixbufAnimation *animation, + int *width, + int *height); + + GdkPixbufAnimationIter* (*get_iter) (GdkPixbufAnimation *animation, + const GTimeVal *start_time); +}; +G_GNUC_END_IGNORE_DEPRECATIONS + + + +/** + * GdkPixbufAnimationIterClass: + * @parent_class: the parent class + * @get_delay_time: returns the time in milliseconds that the current frame + * should be shown. + * @get_pixbuf: returns the current frame. + * @on_currently_loading_frame: returns whether the current frame of @iter is + * being loaded. + * @advance: advances the iterator to @current_time, possibly changing the + * current frame. + * + * Modules supporting animations must derive a type from + * #GdkPixbufAnimationIter, providing suitable implementations of the + * virtual functions. + */ +typedef struct _GdkPixbufAnimationIterClass GdkPixbufAnimationIterClass; + +#define GDK_PIXBUF_ANIMATION_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIterClass)) +#define GDK_IS_PIXBUF_ANIMATION_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_ANIMATION_ITER)) +#define GDK_PIXBUF_ANIMATION_ITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIterClass)) + +struct _GdkPixbufAnimationIter { + GObject parent_instance; + +}; + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +struct _GdkPixbufAnimationIterClass { + GObjectClass parent_class; + + /*< public >*/ + + int (*get_delay_time) (GdkPixbufAnimationIter *iter); + + GdkPixbuf* (*get_pixbuf) (GdkPixbufAnimationIter *iter); + + gboolean (*on_currently_loading_frame) (GdkPixbufAnimationIter *iter); + + gboolean (*advance) (GdkPixbufAnimationIter *iter, + const GTimeVal *current_time); +}; +G_GNUC_END_IGNORE_DEPRECATIONS + + +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_non_anim_get_type (void) G_GNUC_CONST; +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbufAnimation* gdk_pixbuf_non_anim_new (GdkPixbuf *pixbuf); + +#endif /* GDK_PIXBUF_ENABLE_BACKEND */ + +G_END_DECLS + +#endif /* GDK_PIXBUF_ANIMATION_H */ diff --git a/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-autocleanups.h b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-autocleanups.h new file mode 100644 index 0000000..9b6f58b --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-autocleanups.h @@ -0,0 +1,37 @@ +/* GdkPixbuf library - Autocleanup definitions + * + * Copyright (C) 2015 Kalev Lember + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef GDK_PIXBUF_AUTOCLEANUPS_H +#define GDK_PIXBUF_AUTOCLEANUPS_H + +/* We need all the types, so don't try to include this directly */ +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only can be included directly." +#endif + +#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkPixbuf, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkPixbufAnimation, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkPixbufAnimationIter, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkPixbufLoader, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkPixbufSimpleAnim, g_object_unref) + +#endif + +#endif /* GDK_PIXBUF_AUTOCLEANUPS_H */ diff --git a/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h new file mode 100644 index 0000000..4b8c9b9 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h @@ -0,0 +1,525 @@ +/* GdkPixbuf library - GdkPixbuf data structure + * + * Copyright (C) 2003 The Free Software Foundation + * + * Authors: Mark Crichton + * Miguel de Icaza + * Federico Mena-Quintero + * Havoc Pennington + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef GDK_PIXBUF_CORE_H +#define GDK_PIXBUF_CORE_H + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include + +#include + +G_BEGIN_DECLS + +/** + * GdkPixbufAlphaMode: + * @GDK_PIXBUF_ALPHA_BILEVEL: A bilevel clipping mask (black and white) + * will be created and used to draw the image. Pixels below 0.5 opacity + * will be considered fully transparent, and all others will be + * considered fully opaque. + * @GDK_PIXBUF_ALPHA_FULL: For now falls back to #GDK_PIXBUF_ALPHA_BILEVEL. + * In the future it will do full alpha compositing. + * + * Control the alpha channel for drawables. + * + * These values can be passed to gdk_pixbuf_xlib_render_to_drawable_alpha() + * in gdk-pixbuf-xlib to control how the alpha channel of an image should + * be handled. + * + * This function can create a bilevel clipping mask (black and white) and use + * it while painting the image. + * + * In the future, when the X Window System gets an alpha channel extension, + * it will be possible to do full alpha compositing onto arbitrary drawables. + * For now both cases fall back to a bilevel clipping mask. + * + * Deprecated: 2.42: There is no user of GdkPixbufAlphaMode in GdkPixbuf, + * and the Xlib utility functions have been split out to their own + * library, gdk-pixbuf-xlib + */ +typedef enum +{ + GDK_PIXBUF_ALPHA_BILEVEL, + GDK_PIXBUF_ALPHA_FULL +} GdkPixbufAlphaMode; + +/** + * GdkColorspace: + * @GDK_COLORSPACE_RGB: Indicates a red/green/blue additive color space. + * + * This enumeration defines the color spaces that are supported by + * the gdk-pixbuf library. + * + * Currently only RGB is supported. + */ +/* Note that these values are encoded in inline pixbufs + * as ints, so don't reorder them + */ +typedef enum { + GDK_COLORSPACE_RGB +} GdkColorspace; + +/* All of these are opaque structures */ + +typedef struct _GdkPixbuf GdkPixbuf; + +#define GDK_TYPE_PIXBUF (gdk_pixbuf_get_type ()) +#define GDK_PIXBUF(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF, GdkPixbuf)) +#define GDK_IS_PIXBUF(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF)) + + +/** + * GdkPixbufDestroyNotify: + * @pixels: (array) (element-type guint8): The pixel array of the pixbuf + * that is being finalized. + * @data: (closure): User closure data. + * + * A function of this type is responsible for freeing the pixel array + * of a pixbuf. + * + * The gdk_pixbuf_new_from_data() function lets you pass in a pre-allocated + * pixel array so that a pixbuf can be created from it; in this case you + * will need to pass in a function of type `GdkPixbufDestroyNotify` so that + * the pixel data can be freed when the pixbuf is finalized. + */ +typedef void (* GdkPixbufDestroyNotify) (guchar *pixels, gpointer data); + +/** + * GDK_PIXBUF_ERROR: + * + * Error domain used for pixbuf operations. + * + * Indicates that the error code will be in the `GdkPixbufError` enumeration. + * + * See the `GError` for information on error domains and error codes. + */ +#define GDK_PIXBUF_ERROR gdk_pixbuf_error_quark () + +/** + * GdkPixbufError: + * @GDK_PIXBUF_ERROR_CORRUPT_IMAGE: An image file was broken somehow. + * @GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY: Not enough memory. + * @GDK_PIXBUF_ERROR_BAD_OPTION: A bad option was passed to a pixbuf save module. + * @GDK_PIXBUF_ERROR_UNKNOWN_TYPE: Unknown image type. + * @GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION: Don't know how to perform the + * given operation on the type of image at hand. + * @GDK_PIXBUF_ERROR_FAILED: Generic failure code, something went wrong. + * @GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION: Only part of the animation was loaded. + * + * An error code in the `GDK_PIXBUF_ERROR` domain. + * + * Many gdk-pixbuf operations can cause errors in this domain, or in + * the `G_FILE_ERROR` domain. + */ +typedef enum { + /* image data hosed */ + GDK_PIXBUF_ERROR_CORRUPT_IMAGE, + /* no mem to load image */ + GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, + /* bad option passed to save routine */ + GDK_PIXBUF_ERROR_BAD_OPTION, + /* unsupported image type (sort of an ENOSYS) */ + GDK_PIXBUF_ERROR_UNKNOWN_TYPE, + /* unsupported operation (load, save) for image type */ + GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION, + GDK_PIXBUF_ERROR_FAILED, + GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION +} GdkPixbufError; + +GDK_PIXBUF_AVAILABLE_IN_ALL +GQuark gdk_pixbuf_error_quark (void); + + + +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_get_type (void) G_GNUC_CONST; + +/* Reference counting */ + +#ifndef GDK_PIXBUF_DISABLE_DEPRECATED +GDK_PIXBUF_DEPRECATED_IN_2_0_FOR(g_object_ref) +GdkPixbuf *gdk_pixbuf_ref (GdkPixbuf *pixbuf); +GDK_PIXBUF_DEPRECATED_IN_2_0_FOR(g_object_unref) +void gdk_pixbuf_unref (GdkPixbuf *pixbuf); +#endif + +/* GdkPixbuf accessors */ + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkColorspace gdk_pixbuf_get_colorspace (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_ALL +int gdk_pixbuf_get_n_channels (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_get_has_alpha (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_ALL +int gdk_pixbuf_get_bits_per_sample (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_ALL +guchar *gdk_pixbuf_get_pixels (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_ALL +int gdk_pixbuf_get_width (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_ALL +int gdk_pixbuf_get_height (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_ALL +int gdk_pixbuf_get_rowstride (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_2_26 +gsize gdk_pixbuf_get_byte_length (const GdkPixbuf *pixbuf); + +GDK_PIXBUF_AVAILABLE_IN_2_26 +guchar *gdk_pixbuf_get_pixels_with_length (const GdkPixbuf *pixbuf, + guint *length); + +GDK_PIXBUF_AVAILABLE_IN_2_32 +const guint8* gdk_pixbuf_read_pixels (const GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_2_32 +GBytes * gdk_pixbuf_read_pixel_bytes (const GdkPixbuf *pixbuf); + + + +/* Create a blank pixbuf with an optimal rowstride and a new buffer */ + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_new (GdkColorspace colorspace, gboolean has_alpha, int bits_per_sample, + int width, int height); + +GDK_PIXBUF_AVAILABLE_IN_2_36 +gint gdk_pixbuf_calculate_rowstride (GdkColorspace colorspace, + gboolean has_alpha, + int bits_per_sample, + int width, + int height); + +/* Copy a pixbuf */ +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_copy (const GdkPixbuf *pixbuf); + +/* Create a pixbuf which points to the pixels of another pixbuf */ +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_new_subpixbuf (GdkPixbuf *src_pixbuf, + int src_x, + int src_y, + int width, + int height); + +/* Simple loading */ + +#ifdef G_OS_WIN32 +/* In previous versions these _utf8 variants where exported and linked to + * by default. Export them here for ABI (and gi API) compat. + */ + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_new_from_file_utf8 (const char *filename, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_4 +GdkPixbuf *gdk_pixbuf_new_from_file_at_size_utf8 (const char *filename, + int width, + int height, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_6 +GdkPixbuf *gdk_pixbuf_new_from_file_at_scale_utf8 (const char *filename, + int width, + int height, + gboolean preserve_aspect_ratio, + GError **error); +#endif + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_new_from_file (const char *filename, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_4 +GdkPixbuf *gdk_pixbuf_new_from_file_at_size (const char *filename, + int width, + int height, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_6 +GdkPixbuf *gdk_pixbuf_new_from_file_at_scale (const char *filename, + int width, + int height, + gboolean preserve_aspect_ratio, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_26 +GdkPixbuf *gdk_pixbuf_new_from_resource (const char *resource_path, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_26 +GdkPixbuf *gdk_pixbuf_new_from_resource_at_scale (const char *resource_path, + int width, + int height, + gboolean preserve_aspect_ratio, + GError **error); + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_new_from_data (const guchar *data, + GdkColorspace colorspace, + gboolean has_alpha, + int bits_per_sample, + int width, int height, + int rowstride, + GdkPixbufDestroyNotify destroy_fn, + gpointer destroy_fn_data); + +GDK_PIXBUF_AVAILABLE_IN_2_32 +GdkPixbuf *gdk_pixbuf_new_from_bytes (GBytes *data, + GdkColorspace colorspace, + gboolean has_alpha, + int bits_per_sample, + int width, int height, + int rowstride); + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_new_from_xpm_data (const char **data); + +#ifndef GDK_PIXBUF_DISABLE_DEPRECATED +GDK_PIXBUF_DEPRECATED_IN_2_32 +GdkPixbuf* gdk_pixbuf_new_from_inline (gint data_length, + const guint8 *data, + gboolean copy_pixels, + GError **error); +#endif + +/* Mutations */ +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_fill (GdkPixbuf *pixbuf, + guint32 pixel); + +/* Saving */ + +#ifndef __GTK_DOC_IGNORE__ +#ifdef G_OS_WIN32 +/* DLL ABI stability hack. */ +#define gdk_pixbuf_save gdk_pixbuf_save_utf8 +#endif +#endif + +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_save (GdkPixbuf *pixbuf, + const char *filename, + const char *type, + GError **error, + ...) G_GNUC_NULL_TERMINATED; + +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_savev (GdkPixbuf *pixbuf, + const char *filename, + const char *type, + char **option_keys, + char **option_values, + GError **error); + +#ifdef G_OS_WIN32 +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_savev_utf8 (GdkPixbuf *pixbuf, + const char *filename, + const char *type, + char **option_keys, + char **option_values, + GError **error); +#endif + +/* Saving to a callback function */ + + +/** + * GdkPixbufSaveFunc: + * @buf: (array length=count) (element-type guint8): bytes to be written. + * @count: number of bytes in @buf. + * @error: (out): A location to return an error. + * @data: (closure): user data passed to gdk_pixbuf_save_to_callback(). + * + * Save functions used by [method@GdkPixbuf.Pixbuf.save_to_callback]. + * + * This function is called once for each block of bytes that is "written" + * by `gdk_pixbuf_save_to_callback()`. + * + * If successful it should return `TRUE`; if an error occurs it should set + * `error` and return `FALSE`, in which case `gdk_pixbuf_save_to_callback()` + * will fail with the same error. + * + * Returns: `TRUE` if successful, `FALSE` otherwise + * + * Since: 2.4 + */ + +typedef gboolean (*GdkPixbufSaveFunc) (const gchar *buf, + gsize count, + GError **error, + gpointer data); + +GDK_PIXBUF_AVAILABLE_IN_2_4 +gboolean gdk_pixbuf_save_to_callback (GdkPixbuf *pixbuf, + GdkPixbufSaveFunc save_func, + gpointer user_data, + const char *type, + GError **error, + ...) G_GNUC_NULL_TERMINATED; + +GDK_PIXBUF_AVAILABLE_IN_2_4 +gboolean gdk_pixbuf_save_to_callbackv (GdkPixbuf *pixbuf, + GdkPixbufSaveFunc save_func, + gpointer user_data, + const char *type, + char **option_keys, + char **option_values, + GError **error); + +/* Saving into a newly allocated char array */ + +GDK_PIXBUF_AVAILABLE_IN_2_4 +gboolean gdk_pixbuf_save_to_buffer (GdkPixbuf *pixbuf, + gchar **buffer, + gsize *buffer_size, + const char *type, + GError **error, + ...) G_GNUC_NULL_TERMINATED; + +GDK_PIXBUF_AVAILABLE_IN_2_4 +gboolean gdk_pixbuf_save_to_bufferv (GdkPixbuf *pixbuf, + gchar **buffer, + gsize *buffer_size, + const char *type, + char **option_keys, + char **option_values, + GError **error); + +GDK_PIXBUF_AVAILABLE_IN_2_14 +GdkPixbuf *gdk_pixbuf_new_from_stream (GInputStream *stream, + GCancellable *cancellable, + GError **error); + +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_new_from_stream_async (GInputStream *stream, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_new_from_stream_finish (GAsyncResult *async_result, + GError **error); + +GDK_PIXBUF_AVAILABLE_IN_2_14 +GdkPixbuf *gdk_pixbuf_new_from_stream_at_scale (GInputStream *stream, + gint width, + gint height, + gboolean preserve_aspect_ratio, + GCancellable *cancellable, + GError **error); + +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_new_from_stream_at_scale_async (GInputStream *stream, + gint width, + gint height, + gboolean preserve_aspect_ratio, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GDK_PIXBUF_AVAILABLE_IN_2_14 +gboolean gdk_pixbuf_save_to_stream (GdkPixbuf *pixbuf, + GOutputStream *stream, + const char *type, + GCancellable *cancellable, + GError **error, + ...); + +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_save_to_stream_async (GdkPixbuf *pixbuf, + GOutputStream *stream, + const gchar *type, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data, + ...); + +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_save_to_stream_finish (GAsyncResult *async_result, + GError **error); + +GDK_PIXBUF_AVAILABLE_IN_2_36 +void gdk_pixbuf_save_to_streamv_async (GdkPixbuf *pixbuf, + GOutputStream *stream, + const gchar *type, + gchar **option_keys, + gchar **option_values, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GDK_PIXBUF_AVAILABLE_IN_2_36 +gboolean gdk_pixbuf_save_to_streamv (GdkPixbuf *pixbuf, + GOutputStream *stream, + const char *type, + char **option_keys, + char **option_values, + GCancellable *cancellable, + GError **error); + +/* Adding an alpha channel */ +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_add_alpha (const GdkPixbuf *pixbuf, gboolean substitute_color, + guchar r, guchar g, guchar b); + +/* Copy an area of a pixbuf onto another one */ +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_copy_area (const GdkPixbuf *src_pixbuf, + int src_x, int src_y, + int width, int height, + GdkPixbuf *dest_pixbuf, + int dest_x, int dest_y); + +/* Brighten/darken and optionally make it pixelated-looking */ +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_saturate_and_pixelate (const GdkPixbuf *src, + GdkPixbuf *dest, + gfloat saturation, + gboolean pixelate); + +/* Transform an image to agree with its embedded orientation option / tag */ +GDK_PIXBUF_AVAILABLE_IN_2_12 +GdkPixbuf *gdk_pixbuf_apply_embedded_orientation (GdkPixbuf *src); + +/* key/value pairs that can be attached by the pixbuf loader */ +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_set_option (GdkPixbuf *pixbuf, + const gchar *key, + const gchar *value); +GDK_PIXBUF_AVAILABLE_IN_ALL +const gchar * gdk_pixbuf_get_option (GdkPixbuf *pixbuf, + const gchar *key); +GDK_PIXBUF_AVAILABLE_IN_2_36 +gboolean gdk_pixbuf_remove_option (GdkPixbuf *pixbuf, + const gchar *key); +GDK_PIXBUF_AVAILABLE_IN_2_32 +GHashTable * gdk_pixbuf_get_options (GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_2_36 +gboolean gdk_pixbuf_copy_options (GdkPixbuf *src_pixbuf, + GdkPixbuf *dest_pixbuf); + + +G_END_DECLS + + +#endif /* GDK_PIXBUF_CORE_H */ diff --git a/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h new file mode 100644 index 0000000..f692664 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h @@ -0,0 +1,40 @@ + +/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __GDK_PIXBUF_ENUM_TYPES_H__ +#define __GDK_PIXBUF_ENUM_TYPES_H__ + +#include + +#include + +G_BEGIN_DECLS + +/* enumerations from "gdk-pixbuf-core.h" */ +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_alpha_mode_get_type (void) G_GNUC_CONST; +#define GDK_TYPE_PIXBUF_ALPHA_MODE (gdk_pixbuf_alpha_mode_get_type ()) +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_colorspace_get_type (void) G_GNUC_CONST; +#define GDK_TYPE_COLORSPACE (gdk_colorspace_get_type ()) +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_error_get_type (void) G_GNUC_CONST; +#define GDK_TYPE_PIXBUF_ERROR (gdk_pixbuf_error_get_type ()) + +/* enumerations from "gdk-pixbuf-transform.h" */ +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_interp_type_get_type (void) G_GNUC_CONST; +#define GDK_TYPE_INTERP_TYPE (gdk_interp_type_get_type ()) +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_rotation_get_type (void) G_GNUC_CONST; +#define GDK_TYPE_PIXBUF_ROTATION (gdk_pixbuf_rotation_get_type ()) +G_END_DECLS + +#endif /* __GDK_PIXBUF_ENUM_TYPES_H__ */ + +/* Generated data ends here */ + diff --git a/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-features.h b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-features.h new file mode 100644 index 0000000..94ab159 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-features.h @@ -0,0 +1,115 @@ +#ifndef __GDK_PIXBUF_FEATURES_H__ +#define __GDK_PIXBUF_FEATURES_H__ + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +/** + * GDK_PIXBUF_MAJOR: + * + * Major version of gdk-pixbuf library, that is the "0" in + * "0.8.2" for example. + */ +/** + * GDK_PIXBUF_MINOR: + * + * Minor version of gdk-pixbuf library, that is the "8" in + * "0.8.2" for example. + */ +/** + * GDK_PIXBUF_MICRO: + * + * Micro version of gdk-pixbuf library, that is the "2" in + * "0.8.2" for example. + */ +/** + * GDK_PIXBUF_VERSION: + * + * Contains the full version of GdkPixbuf as a string. + * + * This is the version being compiled against; contrast with + * `gdk_pixbuf_version`. + */ + +#define GDK_PIXBUF_MAJOR (2) +#define GDK_PIXBUF_MINOR (42) +#define GDK_PIXBUF_MICRO (12) +#define GDK_PIXBUF_VERSION "2.42.12" + +#ifndef _GDK_PIXBUF_EXTERN +#define _GDK_PIXBUF_EXTERN extern +#endif + +/* We prefix variable declarations so they can + * properly get exported/imported from Windows DLLs. + */ +#ifdef G_PLATFORM_WIN32 +# ifdef GDK_PIXBUF_STATIC_COMPILATION +# define GDK_PIXBUF_VAR extern +# else /* !GDK_PIXBUF_STATIC_COMPILATION */ +# ifdef GDK_PIXBUF_C_COMPILATION +# ifdef DLL_EXPORT +# define GDK_PIXBUF_VAR _GDK_PIXBUF_EXTERN +# else /* !DLL_EXPORT */ +# define GDK_PIXBUF_VAR extern +# endif /* !DLL_EXPORT */ +# else /* !GDK_PIXBUF_C_COMPILATION */ +# define GDK_PIXBUF_VAR extern __declspec(dllimport) +# endif /* !GDK_PIXBUF_C_COMPILATION */ +# endif /* !GDK_PIXBUF_STATIC_COMPILATION */ +#else /* !G_PLATFORM_WIN32 */ +# define GDK_PIXBUF_VAR _GDK_PIXBUF_EXTERN +#endif /* !G_PLATFORM_WIN32 */ + +/** + * gdk_pixbuf_major_version: + * + * The major version number of the gdk-pixbuf library. (e.g. in + * gdk-pixbuf version 1.2.5 this is 1.) + * + * + * This variable is in the library, so represents the + * gdk-pixbuf library you have linked against. Contrast with the + * `GDK_PIXBUF_MAJOR` macro, which represents the major version of the + * gdk-pixbuf headers you have included. + */ +/** + * gdk_pixbuf_minor_version: + * + * The minor version number of the gdk-pixbuf library. (e.g. in + * gdk-pixbuf version 1.2.5 this is 2.) + * + * + * This variable is in the library, so represents the + * gdk-pixbuf library you have linked against. Contrast with the + * `GDK_PIXBUF_MINOR` macro, which represents the minor version of the + * gdk-pixbuf headers you have included. + */ +/** + * gdk_pixbuf_micro_version: + * + * The micro version number of the gdk-pixbuf library. (e.g. in + * gdk-pixbuf version 1.2.5 this is 5.) + * + * + * This variable is in the library, so represents the + * gdk-pixbuf library you have linked against. Contrast with the + * `GDK_PIXBUF_MICRO` macro, which represents the micro version of the + * gdk-pixbuf headers you have included. + */ +/** + * gdk_pixbuf_version: + * + * Contains the full version of the gdk-pixbuf library as a string. + * This is the version currently in use by a running program. + */ + +GDK_PIXBUF_VAR const guint gdk_pixbuf_major_version; +GDK_PIXBUF_VAR const guint gdk_pixbuf_minor_version; +GDK_PIXBUF_VAR const guint gdk_pixbuf_micro_version; +GDK_PIXBUF_VAR const char *gdk_pixbuf_version; + +#endif /* __GDK_PIXBUF_FEATURES_H__ */ diff --git a/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h new file mode 100644 index 0000000..7565744 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h @@ -0,0 +1,481 @@ +/* GdkPixbuf library - Io handling. This is an internal header for + * GdkPixbuf. You should never use it unless you are doing development for + * GdkPixbuf itself. + * + * Copyright (C) 1999 The Free Software Foundation + * + * Authors: Mark Crichton + * Miguel de Icaza + * Federico Mena-Quintero + * Jonathan Blandford + * Michael Fulbright + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef GDK_PIXBUF_IO_H +#define GDK_PIXBUF_IO_H + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include +#include +#include + +G_BEGIN_DECLS + +typedef struct _GdkPixbufFormat GdkPixbufFormat; + +GDK_PIXBUF_AVAILABLE_IN_2_40 +gboolean gdk_pixbuf_init_modules (const char *path, + GError **error); + +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_format_get_type (void) G_GNUC_CONST; + +GDK_PIXBUF_AVAILABLE_IN_ALL +GSList *gdk_pixbuf_get_formats (void); +GDK_PIXBUF_AVAILABLE_IN_2_2 +gchar *gdk_pixbuf_format_get_name (GdkPixbufFormat *format); +GDK_PIXBUF_AVAILABLE_IN_2_2 +gchar *gdk_pixbuf_format_get_description (GdkPixbufFormat *format); +GDK_PIXBUF_AVAILABLE_IN_2_2 +gchar **gdk_pixbuf_format_get_mime_types (GdkPixbufFormat *format); +GDK_PIXBUF_AVAILABLE_IN_2_2 +gchar **gdk_pixbuf_format_get_extensions (GdkPixbufFormat *format); +GDK_PIXBUF_AVAILABLE_IN_2_36 +gboolean gdk_pixbuf_format_is_save_option_supported (GdkPixbufFormat *format, + const gchar *option_key); +GDK_PIXBUF_AVAILABLE_IN_2_2 +gboolean gdk_pixbuf_format_is_writable (GdkPixbufFormat *format); +GDK_PIXBUF_AVAILABLE_IN_2_6 +gboolean gdk_pixbuf_format_is_scalable (GdkPixbufFormat *format); +GDK_PIXBUF_AVAILABLE_IN_2_6 +gboolean gdk_pixbuf_format_is_disabled (GdkPixbufFormat *format); +GDK_PIXBUF_AVAILABLE_IN_2_6 +void gdk_pixbuf_format_set_disabled (GdkPixbufFormat *format, + gboolean disabled); +GDK_PIXBUF_AVAILABLE_IN_2_6 +gchar *gdk_pixbuf_format_get_license (GdkPixbufFormat *format); + +GDK_PIXBUF_AVAILABLE_IN_2_4 +GdkPixbufFormat *gdk_pixbuf_get_file_info (const gchar *filename, + gint *width, + gint *height); +GDK_PIXBUF_AVAILABLE_IN_2_32 +void gdk_pixbuf_get_file_info_async (const gchar *filename, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GDK_PIXBUF_AVAILABLE_IN_2_32 +GdkPixbufFormat *gdk_pixbuf_get_file_info_finish (GAsyncResult *async_result, + gint *width, + gint *height, + GError **error); + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbufFormat *gdk_pixbuf_format_copy (const GdkPixbufFormat *format); +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_format_free (GdkPixbufFormat *format); + +#ifdef GDK_PIXBUF_ENABLE_BACKEND + + + +/** + * GdkPixbufModuleSizeFunc: + * @width: pointer to a location containing the current image width + * @height: pointer to a location containing the current image height + * @user_data: the loader. + * + * Defines the type of the function that gets called once the size + * of the loaded image is known. + * + * The function is expected to set @width and @height to the desired + * size to which the image should be scaled. If a module has no efficient + * way to achieve the desired scaling during the loading of the image, it may + * either ignore the size request, or only approximate it - gdk-pixbuf will + * then perform the required scaling on the completely loaded image. + * + * If the function sets @width or @height to zero, the module should interpret + * this as a hint that it will be closed soon and shouldn't allocate further + * resources. This convention is used to implement gdk_pixbuf_get_file_info() + * efficiently. + * + * Since: 2.2 + */ +typedef void (* GdkPixbufModuleSizeFunc) (gint *width, + gint *height, + gpointer user_data); + +/** + * GdkPixbufModulePreparedFunc: + * @pixbuf: the #GdkPixbuf that is currently being loaded. + * @anim: if an animation is being loaded, the #GdkPixbufAnimation, else %NULL. + * @user_data: the loader. + * + * Defines the type of the function that gets called once the initial + * setup of @pixbuf is done. + * + * #GdkPixbufLoader uses a function of this type to emit the + * "area_prepared" + * signal. + * + * Since: 2.2 + */ +typedef void (* GdkPixbufModulePreparedFunc) (GdkPixbuf *pixbuf, + GdkPixbufAnimation *anim, + gpointer user_data); + +/** + * GdkPixbufModuleUpdatedFunc: + * @pixbuf: the #GdkPixbuf that is currently being loaded. + * @x: the X origin of the updated area. + * @y: the Y origin of the updated area. + * @width: the width of the updated area. + * @height: the height of the updated area. + * @user_data: the loader. + * + * Defines the type of the function that gets called every time a region + * of @pixbuf is updated. + * + * #GdkPixbufLoader uses a function of this type to emit the + * "area_updated" + * signal. + * + * Since: 2.2 + */ +typedef void (* GdkPixbufModuleUpdatedFunc) (GdkPixbuf *pixbuf, + int x, + int y, + int width, + int height, + gpointer user_data); + +/** + * GdkPixbufModulePattern: + * @prefix: the prefix for this pattern + * @mask: mask containing bytes which modify how the prefix is matched against + * test data + * @relevance: relevance of this pattern + * + * The signature prefix for a module. + * + * The signature of a module is a set of prefixes. Prefixes are encoded as + * pairs of ordinary strings, where the second string, called the mask, if + * not `NULL`, must be of the same length as the first one and may contain + * ' ', '!', 'x', 'z', and 'n' to indicate bytes that must be matched, + * not matched, "don't-care"-bytes, zeros and non-zeros, respectively. + * + * Each prefix has an associated integer that describes the relevance of + * the prefix, with 0 meaning a mismatch and 100 a "perfect match". + * + * Starting with gdk-pixbuf 2.8, the first byte of the mask may be '*', + * indicating an unanchored pattern that matches not only at the beginning, + * but also in the middle. Versions prior to 2.8 will interpret the '*' + * like an 'x'. + * + * The signature of a module is stored as an array of + * `GdkPixbufModulePatterns`. The array is terminated by a pattern + * where the `prefix` is `NULL`. + * + * ```c + * GdkPixbufModulePattern *signature[] = { + * { "abcdx", " !x z", 100 }, + * { "bla", NULL, 90 }, + * { NULL, NULL, 0 } + * }; + * ``` + * + * In the example above, the signature matches e.g. "auud\0" with + * relevance 100, and "blau" with relevance 90. + * + * Since: 2.2 + */ +typedef struct _GdkPixbufModulePattern GdkPixbufModulePattern; +struct _GdkPixbufModulePattern { + char *prefix; + char *mask; + int relevance; +}; + +/** + * GdkPixbufModuleLoadFunc: + * @f: the file stream from which the image should be loaded + * @error: return location for a loading error + * + * Loads a file from a standard C file stream into a new `GdkPixbuf`. + * + * In case of error, this function should return `NULL` and set the `error` argument. + * + * Returns: (transfer full): a newly created `GdkPixbuf` for the contents of the file + */ +typedef GdkPixbuf *(* GdkPixbufModuleLoadFunc) (FILE *f, + GError **error); + +/** + * GdkPixbufModuleLoadXpmDataFunc: + * @data: (array zero-terminated=1): the XPM data + * + * Loads XPM data into a new `GdkPixbuf`. + * + * Returns: (transfer full): a newly created `GdkPixbuf` for the XPM data + */ +typedef GdkPixbuf *(* GdkPixbufModuleLoadXpmDataFunc) (const char **data); + +/** + * GdkPixbufModuleLoadAnimationFunc: + * @f: the file stream from which the image should be loaded + * @error: return location for a loading error + * + * Loads a file from a standard C file stream into a new `GdkPixbufAnimation`. + * + * In case of error, this function should return `NULL` and set the `error` argument. + * + * Returns: (transfer full): a newly created `GdkPixbufAnimation` for the contents of the file + */ +typedef GdkPixbufAnimation *(* GdkPixbufModuleLoadAnimationFunc) (FILE *f, + GError **error); + +/** + * GdkPixbufModuleBeginLoadFunc: + * @size_func: the function to be called when the size is known + * @prepared_func: the function to be called when the data has been prepared + * @updated_func: the function to be called when the data has been updated + * @user_data: the data to be passed to the functions + * @error: return location for a loading error + * + * Sets up the image loading state. + * + * The image loader is responsible for storing the given function pointers + * and user data, and call them when needed. + * + * The image loader should set up an internal state object, and return it + * from this function; the state object will then be updated from the + * [callback@GdkPixbuf.PixbufModuleIncrementLoadFunc] callback, and will be freed + * by [callback@GdkPixbuf.PixbufModuleStopLoadFunc] callback. + * + * Returns: (transfer full): the data to be passed to + * [callback@GdkPixbuf.PixbufModuleIncrementLoadFunc] + * and [callback@GdkPixbuf.PixbufModuleStopLoadFunc], or `NULL` in case of error + */ +typedef gpointer (* GdkPixbufModuleBeginLoadFunc) (GdkPixbufModuleSizeFunc size_func, + GdkPixbufModulePreparedFunc prepared_func, + GdkPixbufModuleUpdatedFunc updated_func, + gpointer user_data, + GError **error); + +/** + * GdkPixbufModuleStopLoadFunc: + * @context: (transfer full): the state object created by [callback@GdkPixbuf.PixbufModuleBeginLoadFunc] + * @error: return location for a loading error + * + * Finalizes the image loading state. + * + * This function is called on success and error states. + * + * Returns: `TRUE` if the loading operation was successful + */ +typedef gboolean (* GdkPixbufModuleStopLoadFunc) (gpointer context, + GError **error); + +/** + * GdkPixbufModuleIncrementLoadFunc: + * @context: (transfer none): the state object created by [callback@GdkPixbuf.PixbufModuleBeginLoadFunc] + * @buf: (array length=size) (element-type guint8): the data to load + * @size: the length of the data to load + * @error: return location for a loading error + * + * Incrementally loads a buffer into the image data. + * + * Returns: `TRUE` if the incremental load was successful + */ +typedef gboolean (* GdkPixbufModuleIncrementLoadFunc) (gpointer context, + const guchar *buf, + guint size, + GError **error); + +/** + * GdkPixbufModuleSaveFunc: + * @f: the file stream into which the image should be saved + * @pixbuf: the image to save + * @param_keys: (nullable) (array zero-terminated=1): parameter keys to save + * @param_values: (nullable) (array zero-terminated=1): parameter values to save + * @error: return location for a saving error + * + * Saves a `GdkPixbuf` into a standard C file stream. + * + * The optional `param_keys` and `param_values` arrays contain the keys and + * values (in the same order) for attributes to be saved alongside the image + * data. + * + * Returns: `TRUE` on success; in case of failure, `FALSE` is returned and + * the `error` is set + */ +typedef gboolean (* GdkPixbufModuleSaveFunc) (FILE *f, + GdkPixbuf *pixbuf, + gchar **param_keys, + gchar **param_values, + GError **error); + +/** + * GdkPixbufModuleSaveCallbackFunc: + * @save_func: the function to call when saving + * @user_data: (closure): the data to pass to @save_func + * @pixbuf: the `GdkPixbuf` to save + * @option_keys: (nullable) (array zero-terminated=1): an array of option names + * @option_values: (nullable) (array zero-terminated=1): an array of option values + * @error: return location for a save error + * + * Saves a `GdkPixbuf` by calling the provided function. + * + * The optional `option_keys` and `option_values` arrays contain the keys and + * values (in the same order) for attributes to be saved alongside the image + * data. + * + * Returns: `TRUE` on success; in case of failure, `FALSE` is returned and + * the `error` is set + */ +typedef gboolean (* GdkPixbufModuleSaveCallbackFunc) (GdkPixbufSaveFunc save_func, + gpointer user_data, + GdkPixbuf *pixbuf, + gchar **option_keys, + gchar **option_values, + GError **error); + +/** + * GdkPixbufModuleSaveOptionSupportedFunc: + * @option_key: the option key to check + * + * Checks whether the given `option_key` is supported when saving. + * + * Returns: `TRUE` if the option is supported + */ +typedef gboolean (* GdkPixbufModuleSaveOptionSupportedFunc) (const gchar *option_key); + +typedef struct _GdkPixbufModule GdkPixbufModule; +struct _GdkPixbufModule { + char *module_name; + char *module_path; + GModule *module; + GdkPixbufFormat *info; + + /* Atomic loading */ + GdkPixbufModuleLoadFunc load; + GdkPixbufModuleLoadXpmDataFunc load_xpm_data; + + /* Incremental loading */ + GdkPixbufModuleBeginLoadFunc begin_load; + GdkPixbufModuleStopLoadFunc stop_load; + GdkPixbufModuleIncrementLoadFunc load_increment; + + /* Animation loading */ + GdkPixbufModuleLoadAnimationFunc load_animation; + + /* Saving */ + GdkPixbufModuleSaveFunc save; + GdkPixbufModuleSaveCallbackFunc save_to_callback; + GdkPixbufModuleSaveOptionSupportedFunc is_save_option_supported; + + /*< private >*/ + void (*_reserved1) (void); + void (*_reserved2) (void); + void (*_reserved3) (void); + void (*_reserved4) (void); +}; + +/** + * GdkPixbufModuleFillVtableFunc: + * @module: a #GdkPixbufModule. + * + * Defines the type of the function used to set the vtable of a + * #GdkPixbufModule when it is loaded. + * + * Since: 2.2 + */ +typedef void (* GdkPixbufModuleFillVtableFunc) (GdkPixbufModule *module); + +/** + * GdkPixbufModuleFillInfoFunc: + * @info: a #GdkPixbufFormat. + * + * Defines the type of the function used to fill a + * #GdkPixbufFormat structure with information about a module. + * + * Since: 2.2 + */ +typedef void (* GdkPixbufModuleFillInfoFunc) (GdkPixbufFormat *info); + +/** + * GdkPixbufFormatFlags: + * @GDK_PIXBUF_FORMAT_WRITABLE: the module can write out images in the format. + * @GDK_PIXBUF_FORMAT_SCALABLE: the image format is scalable + * @GDK_PIXBUF_FORMAT_THREADSAFE: the module is threadsafe. gdk-pixbuf + * ignores modules that are not marked as threadsafe. (Since 2.28). + * + * Flags which allow a module to specify further details about the supported + * operations. + * + * Since: 2.2 + */ +typedef enum /*< skip >*/ +{ + GDK_PIXBUF_FORMAT_WRITABLE = 1 << 0, + GDK_PIXBUF_FORMAT_SCALABLE = 1 << 1, + GDK_PIXBUF_FORMAT_THREADSAFE = 1 << 2 +} GdkPixbufFormatFlags; + +/** + * GdkPixbufFormat: + * @name: the name of the image format + * @signature: the signature of the module + * @domain: the message domain for the `description` + * @description: a description of the image format + * @mime_types: (array zero-terminated=1): the MIME types for the image format + * @extensions: (array zero-terminated=1): typical filename extensions for the + * image format + * @flags: a combination of `GdkPixbufFormatFlags` + * @disabled: a boolean determining whether the loader is disabled` + * @license: a string containing license information, typically set to + * shorthands like "GPL", "LGPL", etc. + * + * A `GdkPixbufFormat` contains information about the image format accepted + * by a module. + * + * Only modules should access the fields directly, applications should + * use the `gdk_pixbuf_format_*` family of functions. + * + * Since: 2.2 + */ +struct _GdkPixbufFormat { + gchar *name; + GdkPixbufModulePattern *signature; + gchar *domain; + gchar *description; + gchar **mime_types; + gchar **extensions; + guint32 flags; + gboolean disabled; + gchar *license; +}; + +#endif /* GDK_PIXBUF_ENABLE_BACKEND */ + +G_END_DECLS + +#endif /* GDK_PIXBUF_IO_H */ diff --git a/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-loader.h b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-loader.h new file mode 100644 index 0000000..1cc3413 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-loader.h @@ -0,0 +1,113 @@ +/* GdkPixbuf library - Progressive loader object + * + * Copyright (C) 1999 The Free Software Foundation + * + * Authors: Mark Crichton + * Miguel de Icaza + * Federico Mena-Quintero + * Jonathan Blandford + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef GDK_PIXBUF_LOADER_H +#define GDK_PIXBUF_LOADER_H + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include +#include +#include + +G_BEGIN_DECLS + +#define GDK_TYPE_PIXBUF_LOADER (gdk_pixbuf_loader_get_type ()) +#define GDK_PIXBUF_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoader)) +#define GDK_PIXBUF_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass)) +#define GDK_IS_PIXBUF_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_PIXBUF_LOADER)) +#define GDK_IS_PIXBUF_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_LOADER)) +#define GDK_PIXBUF_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass)) + +typedef struct _GdkPixbufLoader GdkPixbufLoader; +struct _GdkPixbufLoader +{ + /*< private >*/ + GObject parent_instance; + + gpointer priv; +}; + +typedef struct _GdkPixbufLoaderClass GdkPixbufLoaderClass; +struct _GdkPixbufLoaderClass +{ + GObjectClass parent_class; + + void (*size_prepared) (GdkPixbufLoader *loader, + int width, + int height); + + void (*area_prepared) (GdkPixbufLoader *loader); + + /* Last known frame needs a redraw for x, y, width, height */ + void (*area_updated) (GdkPixbufLoader *loader, + int x, + int y, + int width, + int height); + + void (*closed) (GdkPixbufLoader *loader); +}; + +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_loader_get_type (void) G_GNUC_CONST; +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbufLoader * gdk_pixbuf_loader_new (void); +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbufLoader * gdk_pixbuf_loader_new_with_type (const char *image_type, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_4 +GdkPixbufLoader * gdk_pixbuf_loader_new_with_mime_type (const char *mime_type, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_2 +void gdk_pixbuf_loader_set_size (GdkPixbufLoader *loader, + int width, + int height); +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_loader_write (GdkPixbufLoader *loader, + const guchar *buf, + gsize count, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_30 +gboolean gdk_pixbuf_loader_write_bytes (GdkPixbufLoader *loader, + GBytes *buffer, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf * gdk_pixbuf_loader_get_pixbuf (GdkPixbufLoader *loader); +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbufAnimation * gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader); +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_loader_close (GdkPixbufLoader *loader, + GError **error); +GDK_PIXBUF_AVAILABLE_IN_2_2 +GdkPixbufFormat *gdk_pixbuf_loader_get_format (GdkPixbufLoader *loader); + +G_END_DECLS + +#endif + + diff --git a/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-macros.h b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-macros.h new file mode 100644 index 0000000..6461c54 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-macros.h @@ -0,0 +1,718 @@ +/* GdkPixbuf library - GdkPixbuf Macros + * + * Copyright (C) 2016 Chun-wei Fan + * + * Authors: Chun-wei Fan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef GDK_PIXBUF_MACROS_H +#define GDK_PIXBUF_MACROS_H + +#include + +#include + +/** + * GDK_PIXBUF_CHECK_VERSION: + * @major: major version (e.g. 2 for version 2.34.0) + * @minor: minor version (e.g. 34 for version 2.34.0) + * @micro: micro version (e.g. 0 for version 2.34.0) + * + * Macro to test the version of GdkPixbuf being compiled against. + * + * Returns: %TRUE if the version of the GdkPixbuf header files + * is the same as or newer than the passed-in version. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_CHECK_VERSION(major, minor, micro) \ + (GDK_PIXBUF_MAJOR > (major) || \ + (GDK_PIXBUF_MAJOR == (major) && GDK_PIXBUF_MINOR > (minor)) || \ + (GDK_PIXBUF_MAJOR == (major) && GDK_PIXBUF_MINOR == (minor) && \ + GDK_PIXBUF_MICRO >= (micro))) + +/** + * GDK_PIXBUF_VERSION_2_0: + * + * A macro that evaluates to the 2.0 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_0 (G_ENCODE_VERSION (2, 0)) + +/** + * GDK_PIXBUF_VERSION_2_2: + * + * A macro that evaluates to the 2.2 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_2 (G_ENCODE_VERSION (2, 2)) + +/** + * GDK_PIXBUF_VERSION_2_4: + * + * A macro that evaluates to the 2.4 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_4 (G_ENCODE_VERSION (2, 4)) + +/** + * GDK_PIXBUF_VERSION_2_6: + * + * A macro that evaluates to the 2.6 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_6 (G_ENCODE_VERSION (2, 6)) + +/** + * GDK_PIXBUF_VERSION_2_8: + * + * A macro that evaluates to the 2.8 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_8 (G_ENCODE_VERSION (2, 8)) + +/** + * GDK_PIXBUF_VERSION_2_10: + * + * A macro that evaluates to the 2.10 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_10 (G_ENCODE_VERSION (2, 10)) + +/** + * GDK_PIXBUF_VERSION_2_12: + * + * A macro that evaluates to the 2.12 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_12 (G_ENCODE_VERSION (2, 12)) + +/** + * GDK_PIXBUF_VERSION_2_14: + * + * A macro that evaluates to the 2.14 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_14 (G_ENCODE_VERSION (2, 14)) + +/** + * GDK_PIXBUF_VERSION_2_16: + * + * A macro that evaluates to the 2.16 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_16 (G_ENCODE_VERSION (2, 16)) + +/** + * GDK_PIXBUF_VERSION_2_18: + * + * A macro that evaluates to the 2.18 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_18 (G_ENCODE_VERSION (2, 18)) + +/** + * GDK_PIXBUF_VERSION_2_20: + * + * A macro that evaluates to the 2.20 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_20 (G_ENCODE_VERSION (2, 20)) + +/** + * GDK_PIXBUF_VERSION_2_22: + * + * A macro that evaluates to the 2.22 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_22 (G_ENCODE_VERSION (2, 22)) + +/** + * GDK_PIXBUF_VERSION_2_24: + * + * A macro that evaluates to the 2.24 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_24 (G_ENCODE_VERSION (2, 24)) + +/** + * GDK_PIXBUF_VERSION_2_26: + * + * A macro that evaluates to the 2.26 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_26 (G_ENCODE_VERSION (2, 26)) + +/** + * GDK_PIXBUF_VERSION_2_28: + * + * A macro that evaluates to the 2.28 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_28 (G_ENCODE_VERSION (2, 28)) + +/** + * GDK_PIXBUF_VERSION_2_30: + * + * A macro that evaluates to the 2.30 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_30 (G_ENCODE_VERSION (2, 30)) + +/** + * GDK_PIXBUF_VERSION_2_32: + * + * A macro that evaluates to the 2.32 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_32 (G_ENCODE_VERSION (2, 32)) + +/** + * GDK_PIXBUF_VERSION_2_34: + * + * A macro that evaluates to the 2.34 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_34 (G_ENCODE_VERSION (2, 34)) + +/** + * GDK_PIXBUF_VERSION_2_36: + * + * A macro that evaluates to the 2.36 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GDK_PIXBUF_VERSION_2_36 (G_ENCODE_VERSION (2, 36)) + +/** + * GDK_PIXBUF_VERSION_2_38: + * + * A macro that evaluates to the 2.38 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.38 + */ +#define GDK_PIXBUF_VERSION_2_38 (G_ENCODE_VERSION (2, 38)) + +/** + * GDK_PIXBUF_VERSION_2_40: + * + * A macro that evaluates to the 2.40 version of GdkPixbuf, + * in a format that can be used by the C pre-processor. + * + * Since: 2.40 + */ +#define GDK_PIXBUF_VERSION_2_40 (G_ENCODE_VERSION (2, 40)) + +#ifndef __GTK_DOC_IGNORE__ +#if (GDK_PIXBUF_MINOR % 2) +#define GDK_PIXBUF_VERSION_CUR_STABLE (G_ENCODE_VERSION (GDK_PIXBUF_MAJOR, GDK_PIXBUF_MINOR + 1)) +#else +#define GDK_PIXBUF_VERSION_CUR_STABLE (G_ENCODE_VERSION (GDK_PIXBUF_MAJOR, GDK_PIXBUF_MINOR)) +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if (GDK_PIXBUF_MINOR % 2) +#define GDK_PIXBUF_VERSION_PREV_STABLE (G_ENCODE_VERSION (GDK_PIXBUF_MAJOR, GDK_PIXBUF_MINOR - 1)) +#else +#define GDK_PIXBUF_VERSION_PREV_STABLE (G_ENCODE_VERSION (GDK_PIXBUF_MAJOR, GDK_PIXBUF_MINOR - 2)) +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +/** + * GDK_PIXBUF_VERSION_MIN_REQUIRED: + * + * A macro that should be defined by the user prior to including + * the gdk-pixbuf.h header. + * The definition should be one of the predefined version + * macros: %GDK_PIXBUF_VERSION_2_0, %GDK_PIXBUF_VERSION_2_2, ... + * + * This macro defines the lower bound for the GdkPixbuf API to use. + * + * If a function has been deprecated in a newer version of GdkPixbuf, + * defining this symbol hides the compiler warnings for those functions + * without disabling warnings for the other deprecated functions. + * + * + * Warning: if you define this macro, do not forget to update it! Especially + * when writing new code. Otherwise you can miss the new deprecations. + * + * + * Since: 2.36 + */ +#ifndef GDK_PIXBUF_VERSION_MIN_REQUIRED +#define GDK_PIXBUF_VERSION_MIN_REQUIRED (GDK_PIXBUF_VERSION_CUR_STABLE) +#endif + +/** + * GDK_PIXBUF_VERSION_MAX_ALLOWED: + * + * A macro that should be defined by the user prior to including + * the gdk-pixbuf.h header. + * The definition should be one of the predefined version + * macros: %GDK_PIXBUF_VERSION_2_0, %GDK_PIXBUF_VERSION_2_2, ... + * + * This macro defines the upper bound for the GdkPixbuf API to use. + * + * If a function has been introduced in a newer version of GdkPixbuf, + * it is possible to use this symbol to get compiler warnings when + * trying to use that function. + * + * Since: 2.36 + */ +#ifndef GDK_PIXBUF_VERSION_MAX_ALLOWED +#if GDK_PIXBUF_VERSION_MIN_REQUIRED > GDK_PIXBUF_VERSION_PREV_STABLE +#define GDK_PIXBUF_VERSION_MAX_ALLOWED GDK_PIXBUF_VERSION_MIN_REQUIRED +#else +#define GDK_PIXBUF_VERSION_MAX_ALLOWED GDK_PIXBUF_VERSION_CUR_STABLE +#endif +#endif + +/* sanity checks */ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_MIN_REQUIRED +#error "GDK_PIXBUF_VERSION_MAX_ALLOWED must be >= GDK_PIXBUF_VERSION_MIN_REQUIRED" +#endif +#if GDK_PIXBUF_VERSION_MIN_REQUIRED < GDK_PIXBUF_VERSION_2_0 +#error "GDK_PIXBUF_VERSION_MIN_REQUIRED must be >= GDK_PIXBUF_VERSION_2_0" +#endif + +#ifndef __GTK_DOC_IGNORE__ +#define GDK_PIXBUF_AVAILABLE_IN_ALL _GDK_PIXBUF_EXTERN +#endif + +/* Every new stable minor release should add a set of macros here */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_0 +#define GDK_PIXBUF_DEPRECATED_IN_2_0 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_0_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_0 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_0_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_0 +#define GDK_PIXBUF_AVAILABLE_IN_2_0 G_UNAVAILABLE(2, 0) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_0 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_2 +#define GDK_PIXBUF_DEPRECATED_IN_2_2 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_2_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_2 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_2_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_2 +#define GDK_PIXBUF_AVAILABLE_IN_2_2 G_UNAVAILABLE(2, 2) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_2 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_4 +#define GDK_PIXBUF_DEPRECATED_IN_2_4 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_4_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_4 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_4_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_4 +#define GDK_PIXBUF_AVAILABLE_IN_2_4 G_UNAVAILABLE(2, 4) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_4 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_6 +#define GDK_PIXBUF_DEPRECATED_IN_2_6 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_6_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_6 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_6_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_6 +#define GDK_PIXBUF_AVAILABLE_IN_2_6 G_UNAVAILABLE(2, 6) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_6 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_8 +#define GDK_PIXBUF_DEPRECATED_IN_2_8 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_8_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_8 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_8_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_8 +#define GDK_PIXBUF_AVAILABLE_IN_2_8 G_UNAVAILABLE(2, 8) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_8 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_10 +#define GDK_PIXBUF_DEPRECATED_IN_2_10 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_10_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_10 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_10_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_10 +#define GDK_PIXBUF_AVAILABLE_IN_2_10 G_UNAVAILABLE(2, 10) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_10 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_12 +#define GDK_PIXBUF_DEPRECATED_IN_2_12 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_12_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_12 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_12_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_12 +#define GDK_PIXBUF_AVAILABLE_IN_2_12 G_UNAVAILABLE(2, 12) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_12 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_14 +#define GDK_PIXBUF_DEPRECATED_IN_2_14 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_14_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_14 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_14_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_14 +#define GDK_PIXBUF_AVAILABLE_IN_2_14 G_UNAVAILABLE(2, 14) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_14 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_16 +#define GDK_PIXBUF_DEPRECATED_IN_2_16 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_16_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_16 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_16_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_16 +#define GDK_PIXBUF_AVAILABLE_IN_2_16 G_UNAVAILABLE(2, 16) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_16 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_18 +#define GDK_PIXBUF_DEPRECATED_IN_2_18 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_18_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_18 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_18_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_18 +#define GDK_PIXBUF_AVAILABLE_IN_2_18 G_UNAVAILABLE(2, 18) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_18 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_20 +#define GDK_PIXBUF_DEPRECATED_IN_2_20 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_20_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_20 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_20_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_20 +#define GDK_PIXBUF_AVAILABLE_IN_2_20 G_UNAVAILABLE(2, 20) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_20 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_22 +#define GDK_PIXBUF_DEPRECATED_IN_2_22 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_22_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_22 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_22_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_22 +#define GDK_PIXBUF_AVAILABLE_IN_2_22 G_UNAVAILABLE(2, 22) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_22 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_24 +#define GDK_PIXBUF_DEPRECATED_IN_2_24 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_24_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_24 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_24_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_24 +#define GDK_PIXBUF_AVAILABLE_IN_2_24 G_UNAVAILABLE(2, 24) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_24 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_26 +#define GDK_PIXBUF_DEPRECATED_IN_2_26 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_26_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_26 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_26_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_26 +#define GDK_PIXBUF_AVAILABLE_IN_2_26 G_UNAVAILABLE(2, 26) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_26 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_28 +#define GDK_PIXBUF_DEPRECATED_IN_2_28 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_28_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_28 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_28_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_28 +#define GDK_PIXBUF_AVAILABLE_IN_2_28 G_UNAVAILABLE(2, 28) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_28 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_30 +#define GDK_PIXBUF_DEPRECATED_IN_2_30 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_30_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_30 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_30_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_30 +#define GDK_PIXBUF_AVAILABLE_IN_2_30 G_UNAVAILABLE(2, 30) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_30 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_32 +#define GDK_PIXBUF_DEPRECATED_IN_2_32 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_32_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_32 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_32_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_32 +#define GDK_PIXBUF_AVAILABLE_IN_2_32 G_UNAVAILABLE(2, 32) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_32 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_34 +#define GDK_PIXBUF_DEPRECATED_IN_2_34 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_34_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_34 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_34_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_34 +#define GDK_PIXBUF_AVAILABLE_IN_2_34 G_UNAVAILABLE(2, 34) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_34 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_36 +#define GDK_PIXBUF_DEPRECATED_IN_2_36 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_36_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_36 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_36_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_36 +#define GDK_PIXBUF_AVAILABLE_IN_2_36 G_UNAVAILABLE(2, 36) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_36 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_38 +#define GDK_PIXBUF_DEPRECATED_IN_2_38 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_38_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_38 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_38_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_38 +#define GDK_PIXBUF_AVAILABLE_IN_2_38 G_UNAVAILABLE(2, 38) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_38 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MIN_REQUIRED >= GDK_PIXBUF_VERSION_2_40 +#define GDK_PIXBUF_DEPRECATED_IN_2_40 G_DEPRECATED _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_40_FOR(f) G_DEPRECATED_FOR(f) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_DEPRECATED_IN_2_40 _GDK_PIXBUF_EXTERN +#define GDK_PIXBUF_DEPRECATED_IN_2_40_FOR(f) _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#ifndef __GTK_DOC_IGNORE__ +#if GDK_PIXBUF_VERSION_MAX_ALLOWED < GDK_PIXBUF_VERSION_2_40 +#define GDK_PIXBUF_AVAILABLE_IN_2_40 G_UNAVAILABLE(2, 40) _GDK_PIXBUF_EXTERN +#else +#define GDK_PIXBUF_AVAILABLE_IN_2_40 _GDK_PIXBUF_EXTERN +#endif +#endif /* __GTK_DOC_IGNORE__ */ + +#endif /* GDK_PIXBUF_MACROS_H */ diff --git a/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-marshal.h b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-marshal.h new file mode 100644 index 0000000..4b20f1e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-marshal.h @@ -0,0 +1,33 @@ +/* This file is generated by glib-genmarshal, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ +#pragma once + +#include + +G_BEGIN_DECLS + +/* VOID:VOID (../src/2.42.12-c70e3de880.clean/gdk-pixbuf/gdk-pixbuf-marshal.list:25) */ +#define _gdk_pixbuf_marshal_VOID__VOID g_cclosure_marshal_VOID__VOID + +/* VOID:INT,INT (../src/2.42.12-c70e3de880.clean/gdk-pixbuf/gdk-pixbuf-marshal.list:26) */ +extern +void _gdk_pixbuf_marshal_VOID__INT_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + +/* VOID:INT,INT,INT,INT (../src/2.42.12-c70e3de880.clean/gdk-pixbuf/gdk-pixbuf-marshal.list:27) */ +extern +void _gdk_pixbuf_marshal_VOID__INT_INT_INT_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + +/* VOID:POINTER (../src/2.42.12-c70e3de880.clean/gdk-pixbuf/gdk-pixbuf-marshal.list:28) */ +#define _gdk_pixbuf_marshal_VOID__POINTER g_cclosure_marshal_VOID__POINTER + + +G_END_DECLS diff --git a/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h new file mode 100644 index 0000000..487120e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h @@ -0,0 +1,70 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ +/* GdkPixbuf library - Simple frame-based animations + * + * Copyright (C) 2004 Dom Lachowicz + * + * Authors: Dom Lachowicz + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef GDK_PIXBUF_SIMPLE_ANIM_H +#define GDK_PIXBUF_SIMPLE_ANIM_H + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * GdkPixbufSimpleAnim: + * + * An opaque struct representing a simple animation. + */ +typedef struct _GdkPixbufSimpleAnim GdkPixbufSimpleAnim; +typedef struct _GdkPixbufSimpleAnimClass GdkPixbufSimpleAnimClass; + +#define GDK_TYPE_PIXBUF_SIMPLE_ANIM (gdk_pixbuf_simple_anim_get_type ()) +#define GDK_PIXBUF_SIMPLE_ANIM(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_SIMPLE_ANIM, GdkPixbufSimpleAnim)) +#define GDK_IS_PIXBUF_SIMPLE_ANIM(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_SIMPLE_ANIM)) + +#define GDK_PIXBUF_SIMPLE_ANIM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_SIMPLE_ANIM, GdkPixbufSimpleAnimClass)) +#define GDK_IS_PIXBUF_SIMPLE_ANIM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_SIMPLE_ANIM)) +#define GDK_PIXBUF_SIMPLE_ANIM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_SIMPLE_ANIM, GdkPixbufSimpleAnimClass)) + +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_simple_anim_get_type (void) G_GNUC_CONST; +GDK_PIXBUF_AVAILABLE_IN_ALL +GType gdk_pixbuf_simple_anim_iter_get_type (void) G_GNUC_CONST; + +GDK_PIXBUF_AVAILABLE_IN_2_8 +GdkPixbufSimpleAnim *gdk_pixbuf_simple_anim_new (gint width, + gint height, + gfloat rate); +GDK_PIXBUF_AVAILABLE_IN_2_8 +void gdk_pixbuf_simple_anim_add_frame (GdkPixbufSimpleAnim *animation, + GdkPixbuf *pixbuf); +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_simple_anim_set_loop (GdkPixbufSimpleAnim *animation, + gboolean loop); +GDK_PIXBUF_AVAILABLE_IN_ALL +gboolean gdk_pixbuf_simple_anim_get_loop (GdkPixbufSimpleAnim *animation); + +G_END_DECLS + + +#endif /* GDK_PIXBUF_SIMPLE_ANIM_H */ diff --git a/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-transform.h b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-transform.h new file mode 100644 index 0000000..2ba28c4 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-transform.h @@ -0,0 +1,168 @@ +/* GdkPixbuf library - transformations + * + * Copyright (C) 2003 The Free Software Foundation + * + * Authors: Mark Crichton + * Miguel de Icaza + * Federico Mena-Quintero + * Havoc Pennington + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef GDK_PIXBUF_TRANSFORM_H +#define GDK_PIXBUF_TRANSFORM_H + +#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + + +G_BEGIN_DECLS + +/* Scaling */ + +/** + * GdkInterpType: + * @GDK_INTERP_NEAREST: Nearest neighbor sampling; this is the fastest + * and lowest quality mode. Quality is normally unacceptable when scaling + * down, but may be OK when scaling up. + * @GDK_INTERP_TILES: This is an accurate simulation of the PostScript + * image operator without any interpolation enabled. Each pixel is + * rendered as a tiny parallelogram of solid color, the edges of which + * are implemented with antialiasing. It resembles nearest neighbor for + * enlargement, and bilinear for reduction. + * @GDK_INTERP_BILINEAR: Best quality/speed balance; use this mode by + * default. Bilinear interpolation. For enlargement, it is + * equivalent to point-sampling the ideal bilinear-interpolated image. + * For reduction, it is equivalent to laying down small tiles and + * integrating over the coverage area. + * @GDK_INTERP_HYPER: This is the slowest and highest quality + * reconstruction function. It is derived from the hyperbolic filters in + * Wolberg's "Digital Image Warping", and is formally defined as the + * hyperbolic-filter sampling the ideal hyperbolic-filter interpolated + * image (the filter is designed to be idempotent for 1:1 pixel mapping). + * **Deprecated**: this interpolation filter is deprecated, as in reality + * it has a lower quality than the @GDK_INTERP_BILINEAR filter + * (Since: 2.38) + * + * Interpolation modes for scaling functions. + * + * The `GDK_INTERP_NEAREST` mode is the fastest scaling method, but has + * horrible quality when scaling down; `GDK_INTERP_BILINEAR` is the best + * choice if you aren't sure what to choose, it has a good speed/quality + * balance. + * + * **Note**: Cubic filtering is missing from the list; hyperbolic + * interpolation is just as fast and results in higher quality. + */ +typedef enum { + GDK_INTERP_NEAREST, + GDK_INTERP_TILES, + GDK_INTERP_BILINEAR, + GDK_INTERP_HYPER +} GdkInterpType; + +/** + * GdkPixbufRotation: + * @GDK_PIXBUF_ROTATE_NONE: No rotation. + * @GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE: Rotate by 90 degrees. + * @GDK_PIXBUF_ROTATE_UPSIDEDOWN: Rotate by 180 degrees. + * @GDK_PIXBUF_ROTATE_CLOCKWISE: Rotate by 270 degrees. + * + * The possible rotations which can be passed to gdk_pixbuf_rotate_simple(). + * + * To make them easier to use, their numerical values are the actual degrees. + */ +typedef enum { + GDK_PIXBUF_ROTATE_NONE = 0, + GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE = 90, + GDK_PIXBUF_ROTATE_UPSIDEDOWN = 180, + GDK_PIXBUF_ROTATE_CLOCKWISE = 270 +} GdkPixbufRotation; + +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_scale (const GdkPixbuf *src, + GdkPixbuf *dest, + int dest_x, + int dest_y, + int dest_width, + int dest_height, + double offset_x, + double offset_y, + double scale_x, + double scale_y, + GdkInterpType interp_type); +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_composite (const GdkPixbuf *src, + GdkPixbuf *dest, + int dest_x, + int dest_y, + int dest_width, + int dest_height, + double offset_x, + double offset_y, + double scale_x, + double scale_y, + GdkInterpType interp_type, + int overall_alpha); +GDK_PIXBUF_AVAILABLE_IN_ALL +void gdk_pixbuf_composite_color (const GdkPixbuf *src, + GdkPixbuf *dest, + int dest_x, + int dest_y, + int dest_width, + int dest_height, + double offset_x, + double offset_y, + double scale_x, + double scale_y, + GdkInterpType interp_type, + int overall_alpha, + int check_x, + int check_y, + int check_size, + guint32 color1, + guint32 color2); + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_scale_simple (const GdkPixbuf *src, + int dest_width, + int dest_height, + GdkInterpType interp_type); + +GDK_PIXBUF_AVAILABLE_IN_ALL +GdkPixbuf *gdk_pixbuf_composite_color_simple (const GdkPixbuf *src, + int dest_width, + int dest_height, + GdkInterpType interp_type, + int overall_alpha, + int check_size, + guint32 color1, + guint32 color2); + +GDK_PIXBUF_AVAILABLE_IN_2_6 +GdkPixbuf *gdk_pixbuf_rotate_simple (const GdkPixbuf *src, + GdkPixbufRotation angle); +GDK_PIXBUF_AVAILABLE_IN_2_6 +GdkPixbuf *gdk_pixbuf_flip (const GdkPixbuf *src, + gboolean horizontal); + +G_END_DECLS + + +#endif /* GDK_PIXBUF_TRANSFORM_H */ diff --git a/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h new file mode 100644 index 0000000..0770b2f --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h @@ -0,0 +1,46 @@ +/* GdkPixbuf library - Main header file + * + * Copyright (C) 1999 The Free Software Foundation + * + * Authors: Mark Crichton + * Miguel de Icaza + * Federico Mena-Quintero + * Havoc Pennington + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef GDK_PIXBUF_H +#define GDK_PIXBUF_H + +#define GDK_PIXBUF_H_INSIDE + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#undef GDK_PIXBUF_H_INSIDE + +#endif /* GDK_PIXBUF_H */ diff --git a/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixdata.h b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixdata.h new file mode 100644 index 0000000..4c25698 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixdata.h @@ -0,0 +1,165 @@ +/* GdkPixbuf library - GdkPixdata - functions for inlined pixbuf handling + * Copyright (C) 1999, 2001 Tim Janik + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ +#ifndef __GDK_PIXDATA_H__ +#define __GDK_PIXDATA_H__ + +#ifndef GDK_PIXBUF_DISABLE_DEPRECATED +#include + +G_BEGIN_DECLS + +/** + * GDK_PIXBUF_MAGIC_NUMBER: + * + * Magic number for #GdkPixdata structures. + **/ +#define GDK_PIXBUF_MAGIC_NUMBER (0x47646b50) /* 'GdkP' */ + +/** + * GdkPixdataType: + * @GDK_PIXDATA_COLOR_TYPE_RGB: each pixel has red, green and blue samples. + * @GDK_PIXDATA_COLOR_TYPE_RGBA: each pixel has red, green and blue samples + * and an alpha value. + * @GDK_PIXDATA_COLOR_TYPE_MASK: mask for the colortype flags of the enum. + * @GDK_PIXDATA_SAMPLE_WIDTH_8: each sample has 8 bits. + * @GDK_PIXDATA_SAMPLE_WIDTH_MASK: mask for the sample width flags of the enum. + * @GDK_PIXDATA_ENCODING_RAW: the pixel data is in raw form. + * @GDK_PIXDATA_ENCODING_RLE: the pixel data is run-length encoded. Runs may + * be up to 127 bytes long; their length is stored in a single byte + * preceding the pixel data for the run. If a run is constant, its length + * byte has the high bit set and the pixel data consists of a single pixel + * which must be repeated. + * @GDK_PIXDATA_ENCODING_MASK: mask for the encoding flags of the enum. + * + * An enumeration containing three sets of flags for a #GdkPixdata struct: + * one for the used colorspace, one for the width of the samples and one + * for the encoding of the pixel data. + * + * Deprecated: 2.32 + **/ +typedef enum +{ + /* colorspace + alpha */ + GDK_PIXDATA_COLOR_TYPE_RGB = 0x01, + GDK_PIXDATA_COLOR_TYPE_RGBA = 0x02, + GDK_PIXDATA_COLOR_TYPE_MASK = 0xff, + /* width, support 8bits only currently */ + GDK_PIXDATA_SAMPLE_WIDTH_8 = 0x01 << 16, + GDK_PIXDATA_SAMPLE_WIDTH_MASK = 0x0f << 16, + /* encoding */ + GDK_PIXDATA_ENCODING_RAW = 0x01 << 24, + GDK_PIXDATA_ENCODING_RLE = 0x02 << 24, + GDK_PIXDATA_ENCODING_MASK = 0x0f << 24 +} GdkPixdataType; + +typedef struct _GdkPixdata GdkPixdata; +struct _GdkPixdata +{ + guint32 magic; /* GDK_PIXBUF_MAGIC_NUMBER */ + gint32 length; /* <1 to disable length checks, otherwise: + * GDK_PIXDATA_HEADER_LENGTH + pixel_data length + */ + guint32 pixdata_type; /* GdkPixdataType */ + guint32 rowstride; + guint32 width; + guint32 height; + guint8 *pixel_data; +}; + +/** + * GDK_PIXDATA_HEADER_LENGTH: + * + * The length of a #GdkPixdata structure without the @pixel_data pointer. + * + * Deprecated: 2.32 + **/ +#define GDK_PIXDATA_HEADER_LENGTH (4 + 4 + 4 + 4 + 4 + 4) + +/* the returned stream is plain htonl of GdkPixdata members + pixel_data */ +GDK_PIXBUF_DEPRECATED_IN_2_32 +guint8* gdk_pixdata_serialize (const GdkPixdata *pixdata, + guint *stream_length_p); +GDK_PIXBUF_DEPRECATED_IN_2_32 +gboolean gdk_pixdata_deserialize (GdkPixdata *pixdata, + guint stream_length, + const guint8 *stream, + GError **error); +GDK_PIXBUF_DEPRECATED_IN_2_32 +gpointer gdk_pixdata_from_pixbuf (GdkPixdata *pixdata, + const GdkPixbuf *pixbuf, + gboolean use_rle); +GDK_PIXBUF_DEPRECATED_IN_2_32 +GdkPixbuf* gdk_pixbuf_from_pixdata (const GdkPixdata *pixdata, + gboolean copy_pixels, + GError **error); +/** + * GdkPixdataDumpType: + * @GDK_PIXDATA_DUMP_PIXDATA_STREAM: Generate pixbuf data stream (a single + * string containing a serialized #GdkPixdata structure in network byte + * order). + * @GDK_PIXDATA_DUMP_PIXDATA_STRUCT: Generate #GdkPixdata structure (needs + * the #GdkPixdata structure definition from gdk-pixdata.h). + * @GDK_PIXDATA_DUMP_MACROS: Generate *_ROWSTRIDE, + * *_WIDTH, *_HEIGHT, + * *_BYTES_PER_PIXEL and + * *_RLE_PIXEL_DATA or *_PIXEL_DATA + * macro definitions for the image. + * @GDK_PIXDATA_DUMP_GTYPES: Generate GLib data types instead of + * standard C data types. + * @GDK_PIXDATA_DUMP_CTYPES: Generate standard C data types instead of + * GLib data types. + * @GDK_PIXDATA_DUMP_STATIC: Generate static symbols. + * @GDK_PIXDATA_DUMP_CONST: Generate const symbols. + * @GDK_PIXDATA_DUMP_RLE_DECODER: Provide a *_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp) + * macro definition to decode run-length encoded image data. + * + * An enumeration which is used by gdk_pixdata_to_csource() to + * determine the form of C source to be generated. The three values + * @GDK_PIXDATA_DUMP_PIXDATA_STREAM, @GDK_PIXDATA_DUMP_PIXDATA_STRUCT + * and @GDK_PIXDATA_DUMP_MACROS are mutually exclusive, as are + * @GDK_PIXBUF_DUMP_GTYPES and @GDK_PIXBUF_DUMP_CTYPES. The remaining + * elements are optional flags that can be freely added. + * + * Deprecated: 2.32 + **/ +typedef enum +{ + /* type of source to save */ + GDK_PIXDATA_DUMP_PIXDATA_STREAM = 0, + GDK_PIXDATA_DUMP_PIXDATA_STRUCT = 1, + GDK_PIXDATA_DUMP_MACROS = 2, + /* type of variables to use */ + GDK_PIXDATA_DUMP_GTYPES = 0, + GDK_PIXDATA_DUMP_CTYPES = 1 << 8, + GDK_PIXDATA_DUMP_STATIC = 1 << 9, + GDK_PIXDATA_DUMP_CONST = 1 << 10, + /* save RLE decoder macro? */ + GDK_PIXDATA_DUMP_RLE_DECODER = 1 << 16 +} GdkPixdataDumpType; + + +GDK_PIXBUF_DEPRECATED_IN_2_32 +GString* gdk_pixdata_to_csource (GdkPixdata *pixdata, + const gchar *name, + GdkPixdataDumpType dump_type); + + +G_END_DECLS + +#endif /* GDK_PIXBUF_DISABLE_DEPRECATED */ + +#endif /* __GDK_PIXDATA_H__ */ diff --git a/vcpkg/installed/x64-osx/include/gio-unix-2.0/gio/gfiledescriptorbased.h b/vcpkg/installed/x64-osx/include/gio-unix-2.0/gio/gfiledescriptorbased.h new file mode 100644 index 0000000..46fdbf5 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gio-unix-2.0/gio/gfiledescriptorbased.h @@ -0,0 +1,67 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Christian Kellner + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Christian Kellner + */ + +#ifndef __G_FILE_DESCRIPTOR_BASED_H__ +#define __G_FILE_DESCRIPTOR_BASED_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_FILE_DESCRIPTOR_BASED (g_file_descriptor_based_get_type ()) +#define G_FILE_DESCRIPTOR_BASED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_FILE_DESCRIPTOR_BASED, GFileDescriptorBased)) +#define G_IS_FILE_DESCRIPTOR_BASED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE_DESCRIPTOR_BASED)) +#define G_FILE_DESCRIPTOR_BASED_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_FILE_DESCRIPTOR_BASED, GFileDescriptorBasedIface)) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileDescriptorBased, g_object_unref) + +/** + * GFileDescriptorBased: + * + * An interface for file descriptor based io objects. + **/ +typedef struct _GFileDescriptorBasedIface GFileDescriptorBasedIface; + +/** + * GFileDescriptorBasedIface: + * @g_iface: The parent interface. + * @get_fd: Gets the underlying file descriptor. + * + * An interface for file descriptor based io objects. + **/ +struct _GFileDescriptorBasedIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + int (*get_fd) (GFileDescriptorBased *fd_based); +}; + +GIO_AVAILABLE_IN_ALL +GType g_file_descriptor_based_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +int g_file_descriptor_based_get_fd (GFileDescriptorBased *fd_based); + +G_END_DECLS + + +#endif /* __G_FILE_DESCRIPTOR_BASED_H__ */ diff --git a/vcpkg/installed/x64-osx/include/gio-unix-2.0/gio/gunixfdmessage.h b/vcpkg/installed/x64-osx/include/gio-unix-2.0/gio/gunixfdmessage.h new file mode 100644 index 0000000..0424b11 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gio-unix-2.0/gio/gunixfdmessage.h @@ -0,0 +1,86 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2009 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + */ + +#ifndef __G_UNIX_FD_MESSAGE_H__ +#define __G_UNIX_FD_MESSAGE_H__ + +#include +#include + +G_BEGIN_DECLS + +#define G_TYPE_UNIX_FD_MESSAGE (g_unix_fd_message_get_type ()) +#define G_UNIX_FD_MESSAGE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_UNIX_FD_MESSAGE, GUnixFDMessage)) +#define G_UNIX_FD_MESSAGE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_UNIX_FD_MESSAGE, GUnixFDMessageClass)) +#define G_IS_UNIX_FD_MESSAGE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_UNIX_FD_MESSAGE)) +#define G_IS_UNIX_FD_MESSAGE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_UNIX_FD_MESSAGE)) +#define G_UNIX_FD_MESSAGE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_UNIX_FD_MESSAGE, GUnixFDMessageClass)) + +typedef struct _GUnixFDMessagePrivate GUnixFDMessagePrivate; +typedef struct _GUnixFDMessageClass GUnixFDMessageClass; +typedef struct _GUnixFDMessage GUnixFDMessage; + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixFDMessage, g_object_unref) + +struct _GUnixFDMessageClass +{ + GSocketControlMessageClass parent_class; + + /*< private >*/ + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); +}; + +struct _GUnixFDMessage +{ + GSocketControlMessage parent_instance; + GUnixFDMessagePrivate *priv; +}; + +GIO_AVAILABLE_IN_ALL +GType g_unix_fd_message_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GSocketControlMessage * g_unix_fd_message_new_with_fd_list (GUnixFDList *fd_list); +GIO_AVAILABLE_IN_ALL +GSocketControlMessage * g_unix_fd_message_new (void); + +GIO_AVAILABLE_IN_ALL +GUnixFDList * g_unix_fd_message_get_fd_list (GUnixFDMessage *message); + +GIO_AVAILABLE_IN_ALL +gint * g_unix_fd_message_steal_fds (GUnixFDMessage *message, + gint *length); +GIO_AVAILABLE_IN_ALL +gboolean g_unix_fd_message_append_fd (GUnixFDMessage *message, + gint fd, + GError **error); + +G_END_DECLS + +#endif /* __G_UNIX_FD_MESSAGE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/gio-unix-2.0/gio/gunixinputstream.h b/vcpkg/installed/x64-osx/include/gio-unix-2.0/gio/gunixinputstream.h new file mode 100644 index 0000000..78b2cbb --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gio-unix-2.0/gio/gunixinputstream.h @@ -0,0 +1,85 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_UNIX_INPUT_STREAM_H__ +#define __G_UNIX_INPUT_STREAM_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_UNIX_INPUT_STREAM (g_unix_input_stream_get_type ()) +#define G_UNIX_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_INPUT_STREAM, GUnixInputStream)) +#define G_UNIX_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_INPUT_STREAM, GUnixInputStreamClass)) +#define G_IS_UNIX_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_INPUT_STREAM)) +#define G_IS_UNIX_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_UNIX_INPUT_STREAM)) +#define G_UNIX_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_UNIX_INPUT_STREAM, GUnixInputStreamClass)) + +/** + * GUnixInputStream: + * + * Implements #GInputStream for reading from selectable unix file descriptors + **/ +typedef struct _GUnixInputStream GUnixInputStream; +typedef struct _GUnixInputStreamClass GUnixInputStreamClass; +typedef struct _GUnixInputStreamPrivate GUnixInputStreamPrivate; + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixInputStream, g_object_unref) + +struct _GUnixInputStream +{ + GInputStream parent_instance; + + /*< private >*/ + GUnixInputStreamPrivate *priv; +}; + +struct _GUnixInputStreamClass +{ + GInputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_unix_input_stream_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GInputStream * g_unix_input_stream_new (gint fd, + gboolean close_fd); +GIO_AVAILABLE_IN_ALL +void g_unix_input_stream_set_close_fd (GUnixInputStream *stream, + gboolean close_fd); +GIO_AVAILABLE_IN_ALL +gboolean g_unix_input_stream_get_close_fd (GUnixInputStream *stream); +GIO_AVAILABLE_IN_ALL +gint g_unix_input_stream_get_fd (GUnixInputStream *stream); + +G_END_DECLS + +#endif /* __G_UNIX_INPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/gio-unix-2.0/gio/gunixmounts.h b/vcpkg/installed/x64-osx/include/gio-unix-2.0/gio/gunixmounts.h new file mode 100644 index 0000000..11fc5f6 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gio-unix-2.0/gio/gunixmounts.h @@ -0,0 +1,172 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_UNIX_MOUNTS_H__ +#define __G_UNIX_MOUNTS_H__ + +#include + +G_BEGIN_DECLS + +/** + * GUnixMountEntry: + * + * Defines a Unix mount entry (e.g. /media/cdrom). + * This corresponds roughly to a mtab entry. + **/ +typedef struct _GUnixMountEntry GUnixMountEntry; + +#define G_TYPE_UNIX_MOUNT_ENTRY (g_unix_mount_entry_get_type ()) +GIO_AVAILABLE_IN_2_54 +GType g_unix_mount_entry_get_type (void) G_GNUC_CONST; + +/** + * GUnixMountPoint: + * + * Defines a Unix mount point (e.g. /dev). + * This corresponds roughly to a fstab entry. + **/ +typedef struct _GUnixMountPoint GUnixMountPoint; + +#define G_TYPE_UNIX_MOUNT_POINT (g_unix_mount_point_get_type ()) +GIO_AVAILABLE_IN_2_54 +GType g_unix_mount_point_get_type (void) G_GNUC_CONST; + +/** + * GUnixMountMonitor: + * + * Watches #GUnixMounts for changes. + **/ +typedef struct _GUnixMountMonitor GUnixMountMonitor; +typedef struct _GUnixMountMonitorClass GUnixMountMonitorClass; + +#define G_TYPE_UNIX_MOUNT_MONITOR (g_unix_mount_monitor_get_type ()) +#define G_UNIX_MOUNT_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_MOUNT_MONITOR, GUnixMountMonitor)) +#define G_UNIX_MOUNT_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_MOUNT_MONITOR, GUnixMountMonitorClass)) +#define G_IS_UNIX_MOUNT_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_MOUNT_MONITOR)) +#define G_IS_UNIX_MOUNT_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_UNIX_MOUNT_MONITOR)) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixMountMonitor, g_object_unref) + +GIO_AVAILABLE_IN_ALL +void g_unix_mount_free (GUnixMountEntry *mount_entry); +GIO_AVAILABLE_IN_2_54 +GUnixMountEntry *g_unix_mount_copy (GUnixMountEntry *mount_entry); +GIO_AVAILABLE_IN_ALL +void g_unix_mount_point_free (GUnixMountPoint *mount_point); +GIO_AVAILABLE_IN_2_54 +GUnixMountPoint *g_unix_mount_point_copy (GUnixMountPoint *mount_point); +GIO_AVAILABLE_IN_ALL +gint g_unix_mount_compare (GUnixMountEntry *mount1, + GUnixMountEntry *mount2); +GIO_AVAILABLE_IN_ALL +const char * g_unix_mount_get_mount_path (GUnixMountEntry *mount_entry); +GIO_AVAILABLE_IN_ALL +const char * g_unix_mount_get_device_path (GUnixMountEntry *mount_entry); +GIO_AVAILABLE_IN_2_60 +const char * g_unix_mount_get_root_path (GUnixMountEntry *mount_entry); +GIO_AVAILABLE_IN_ALL +const char * g_unix_mount_get_fs_type (GUnixMountEntry *mount_entry); +GIO_AVAILABLE_IN_2_58 +const char * g_unix_mount_get_options (GUnixMountEntry *mount_entry); +GIO_AVAILABLE_IN_ALL +gboolean g_unix_mount_is_readonly (GUnixMountEntry *mount_entry); +GIO_AVAILABLE_IN_ALL +gboolean g_unix_mount_is_system_internal (GUnixMountEntry *mount_entry); +GIO_AVAILABLE_IN_ALL +gboolean g_unix_mount_guess_can_eject (GUnixMountEntry *mount_entry); +GIO_AVAILABLE_IN_ALL +gboolean g_unix_mount_guess_should_display (GUnixMountEntry *mount_entry); +GIO_AVAILABLE_IN_ALL +char * g_unix_mount_guess_name (GUnixMountEntry *mount_entry); +GIO_AVAILABLE_IN_ALL +GIcon * g_unix_mount_guess_icon (GUnixMountEntry *mount_entry); +GIO_AVAILABLE_IN_ALL +GIcon * g_unix_mount_guess_symbolic_icon (GUnixMountEntry *mount_entry); + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixMountEntry, g_unix_mount_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixMountPoint, g_unix_mount_point_free) + +GIO_AVAILABLE_IN_ALL +gint g_unix_mount_point_compare (GUnixMountPoint *mount1, + GUnixMountPoint *mount2); +GIO_AVAILABLE_IN_ALL +const char * g_unix_mount_point_get_mount_path (GUnixMountPoint *mount_point); +GIO_AVAILABLE_IN_ALL +const char * g_unix_mount_point_get_device_path (GUnixMountPoint *mount_point); +GIO_AVAILABLE_IN_ALL +const char * g_unix_mount_point_get_fs_type (GUnixMountPoint *mount_point); +GIO_AVAILABLE_IN_2_32 +const char * g_unix_mount_point_get_options (GUnixMountPoint *mount_point); +GIO_AVAILABLE_IN_ALL +gboolean g_unix_mount_point_is_readonly (GUnixMountPoint *mount_point); +GIO_AVAILABLE_IN_ALL +gboolean g_unix_mount_point_is_user_mountable (GUnixMountPoint *mount_point); +GIO_AVAILABLE_IN_ALL +gboolean g_unix_mount_point_is_loopback (GUnixMountPoint *mount_point); +GIO_AVAILABLE_IN_ALL +gboolean g_unix_mount_point_guess_can_eject (GUnixMountPoint *mount_point); +GIO_AVAILABLE_IN_ALL +char * g_unix_mount_point_guess_name (GUnixMountPoint *mount_point); +GIO_AVAILABLE_IN_ALL +GIcon * g_unix_mount_point_guess_icon (GUnixMountPoint *mount_point); +GIO_AVAILABLE_IN_ALL +GIcon * g_unix_mount_point_guess_symbolic_icon (GUnixMountPoint *mount_point); + + +GIO_AVAILABLE_IN_ALL +GList * g_unix_mount_points_get (guint64 *time_read); +GIO_AVAILABLE_IN_2_66 +GUnixMountPoint *g_unix_mount_point_at (const char *mount_path, + guint64 *time_read); +GIO_AVAILABLE_IN_ALL +GList * g_unix_mounts_get (guint64 *time_read); +GIO_AVAILABLE_IN_ALL +GUnixMountEntry *g_unix_mount_at (const char *mount_path, + guint64 *time_read); +GIO_AVAILABLE_IN_2_52 +GUnixMountEntry *g_unix_mount_for (const char *file_path, + guint64 *time_read); +GIO_AVAILABLE_IN_ALL +gboolean g_unix_mounts_changed_since (guint64 time); +GIO_AVAILABLE_IN_ALL +gboolean g_unix_mount_points_changed_since (guint64 time); + +GIO_AVAILABLE_IN_ALL +GType g_unix_mount_monitor_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_2_44 +GUnixMountMonitor *g_unix_mount_monitor_get (void); +GIO_DEPRECATED_IN_2_44_FOR(g_unix_mount_monitor_get) +GUnixMountMonitor *g_unix_mount_monitor_new (void); +GIO_DEPRECATED_IN_2_44 +void g_unix_mount_monitor_set_rate_limit (GUnixMountMonitor *mount_monitor, + int limit_msec); + +GIO_AVAILABLE_IN_ALL +gboolean g_unix_is_mount_path_system_internal (const char *mount_path); +GIO_AVAILABLE_IN_2_56 +gboolean g_unix_is_system_fs_type (const char *fs_type); +GIO_AVAILABLE_IN_2_56 +gboolean g_unix_is_system_device_path (const char *device_path); + +G_END_DECLS + +#endif /* __G_UNIX_MOUNTS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/gio-unix-2.0/gio/gunixoutputstream.h b/vcpkg/installed/x64-osx/include/gio-unix-2.0/gio/gunixoutputstream.h new file mode 100644 index 0000000..37aa225 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/gio-unix-2.0/gio/gunixoutputstream.h @@ -0,0 +1,84 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_UNIX_OUTPUT_STREAM_H__ +#define __G_UNIX_OUTPUT_STREAM_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_UNIX_OUTPUT_STREAM (g_unix_output_stream_get_type ()) +#define G_UNIX_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_OUTPUT_STREAM, GUnixOutputStream)) +#define G_UNIX_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_OUTPUT_STREAM, GUnixOutputStreamClass)) +#define G_IS_UNIX_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_OUTPUT_STREAM)) +#define G_IS_UNIX_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_UNIX_OUTPUT_STREAM)) +#define G_UNIX_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_UNIX_OUTPUT_STREAM, GUnixOutputStreamClass)) + +/** + * GUnixOutputStream: + * + * Implements #GOutputStream for outputting to selectable unix file descriptors + **/ +typedef struct _GUnixOutputStream GUnixOutputStream; +typedef struct _GUnixOutputStreamClass GUnixOutputStreamClass; +typedef struct _GUnixOutputStreamPrivate GUnixOutputStreamPrivate; + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixOutputStream, g_object_unref) + +struct _GUnixOutputStream +{ + GOutputStream parent_instance; + + /*< private >*/ + GUnixOutputStreamPrivate *priv; +}; + +struct _GUnixOutputStreamClass +{ + GOutputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_unix_output_stream_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GOutputStream * g_unix_output_stream_new (gint fd, + gboolean close_fd); +GIO_AVAILABLE_IN_ALL +void g_unix_output_stream_set_close_fd (GUnixOutputStream *stream, + gboolean close_fd); +GIO_AVAILABLE_IN_ALL +gboolean g_unix_output_stream_get_close_fd (GUnixOutputStream *stream); +GIO_AVAILABLE_IN_ALL +gint g_unix_output_stream_get_fd (GUnixOutputStream *stream); +G_END_DECLS + +#endif /* __G_UNIX_OUTPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gaction.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gaction.h new file mode 100644 index 0000000..c3666b4 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gaction.h @@ -0,0 +1,100 @@ +/* + * Copyright © 2010 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + */ + +#ifndef __G_ACTION_H__ +#define __G_ACTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_ACTION (g_action_get_type ()) +#define G_ACTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_ACTION, GAction)) +#define G_IS_ACTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_ACTION)) +#define G_ACTION_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \ + G_TYPE_ACTION, GActionInterface)) + +typedef struct _GActionInterface GActionInterface; + +struct _GActionInterface +{ + GTypeInterface g_iface; + + /* virtual functions */ + const gchar * (* get_name) (GAction *action); + const GVariantType * (* get_parameter_type) (GAction *action); + const GVariantType * (* get_state_type) (GAction *action); + GVariant * (* get_state_hint) (GAction *action); + + gboolean (* get_enabled) (GAction *action); + GVariant * (* get_state) (GAction *action); + + void (* change_state) (GAction *action, + GVariant *value); + void (* activate) (GAction *action, + GVariant *parameter); +}; + +GIO_AVAILABLE_IN_2_30 +GType g_action_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +const gchar * g_action_get_name (GAction *action); +GIO_AVAILABLE_IN_ALL +const GVariantType * g_action_get_parameter_type (GAction *action); +GIO_AVAILABLE_IN_ALL +const GVariantType * g_action_get_state_type (GAction *action); +GIO_AVAILABLE_IN_ALL +GVariant * g_action_get_state_hint (GAction *action); + +GIO_AVAILABLE_IN_ALL +gboolean g_action_get_enabled (GAction *action); +GIO_AVAILABLE_IN_ALL +GVariant * g_action_get_state (GAction *action); + +GIO_AVAILABLE_IN_ALL +void g_action_change_state (GAction *action, + GVariant *value); +GIO_AVAILABLE_IN_ALL +void g_action_activate (GAction *action, + GVariant *parameter); + +GIO_AVAILABLE_IN_2_28 +gboolean g_action_name_is_valid (const gchar *action_name); + +GIO_AVAILABLE_IN_2_38 +gboolean g_action_parse_detailed_name (const gchar *detailed_name, + gchar **action_name, + GVariant **target_value, + GError **error); + +GIO_AVAILABLE_IN_2_38 +gchar * g_action_print_detailed_name (const gchar *action_name, + GVariant *target_value); + +G_END_DECLS + +#endif /* __G_ACTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gactiongroup.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gactiongroup.h new file mode 100644 index 0000000..06213df --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gactiongroup.h @@ -0,0 +1,163 @@ +/* + * Copyright © 2010 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + */ + +#ifndef __G_ACTION_GROUP_H__ +#define __G_ACTION_GROUP_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + + +#define G_TYPE_ACTION_GROUP (g_action_group_get_type ()) +#define G_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_ACTION_GROUP, GActionGroup)) +#define G_IS_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_ACTION_GROUP)) +#define G_ACTION_GROUP_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \ + G_TYPE_ACTION_GROUP, GActionGroupInterface)) + +typedef struct _GActionGroupInterface GActionGroupInterface; + +struct _GActionGroupInterface +{ + GTypeInterface g_iface; + + /* virtual functions */ + gboolean (* has_action) (GActionGroup *action_group, + const gchar *action_name); + + gchar ** (* list_actions) (GActionGroup *action_group); + + gboolean (* get_action_enabled) (GActionGroup *action_group, + const gchar *action_name); + + const GVariantType * (* get_action_parameter_type) (GActionGroup *action_group, + const gchar *action_name); + + const GVariantType * (* get_action_state_type) (GActionGroup *action_group, + const gchar *action_name); + + GVariant * (* get_action_state_hint) (GActionGroup *action_group, + const gchar *action_name); + + GVariant * (* get_action_state) (GActionGroup *action_group, + const gchar *action_name); + + void (* change_action_state) (GActionGroup *action_group, + const gchar *action_name, + GVariant *value); + + void (* activate_action) (GActionGroup *action_group, + const gchar *action_name, + GVariant *parameter); + + /* signals */ + void (* action_added) (GActionGroup *action_group, + const gchar *action_name); + void (* action_removed) (GActionGroup *action_group, + const gchar *action_name); + void (* action_enabled_changed) (GActionGroup *action_group, + const gchar *action_name, + gboolean enabled); + void (* action_state_changed) (GActionGroup *action_group, + const gchar *action_name, + GVariant *state); + + /* more virtual functions */ + gboolean (* query_action) (GActionGroup *action_group, + const gchar *action_name, + gboolean *enabled, + const GVariantType **parameter_type, + const GVariantType **state_type, + GVariant **state_hint, + GVariant **state); +}; + +GIO_AVAILABLE_IN_ALL +GType g_action_group_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +gboolean g_action_group_has_action (GActionGroup *action_group, + const gchar *action_name); +GIO_AVAILABLE_IN_ALL +gchar ** g_action_group_list_actions (GActionGroup *action_group); + +GIO_AVAILABLE_IN_ALL +const GVariantType * g_action_group_get_action_parameter_type (GActionGroup *action_group, + const gchar *action_name); +GIO_AVAILABLE_IN_ALL +const GVariantType * g_action_group_get_action_state_type (GActionGroup *action_group, + const gchar *action_name); +GIO_AVAILABLE_IN_ALL +GVariant * g_action_group_get_action_state_hint (GActionGroup *action_group, + const gchar *action_name); + +GIO_AVAILABLE_IN_ALL +gboolean g_action_group_get_action_enabled (GActionGroup *action_group, + const gchar *action_name); + +GIO_AVAILABLE_IN_ALL +GVariant * g_action_group_get_action_state (GActionGroup *action_group, + const gchar *action_name); +GIO_AVAILABLE_IN_ALL +void g_action_group_change_action_state (GActionGroup *action_group, + const gchar *action_name, + GVariant *value); + +GIO_AVAILABLE_IN_ALL +void g_action_group_activate_action (GActionGroup *action_group, + const gchar *action_name, + GVariant *parameter); + +/* signals */ +GIO_AVAILABLE_IN_ALL +void g_action_group_action_added (GActionGroup *action_group, + const gchar *action_name); +GIO_AVAILABLE_IN_ALL +void g_action_group_action_removed (GActionGroup *action_group, + const gchar *action_name); +GIO_AVAILABLE_IN_ALL +void g_action_group_action_enabled_changed (GActionGroup *action_group, + const gchar *action_name, + gboolean enabled); + +GIO_AVAILABLE_IN_ALL +void g_action_group_action_state_changed (GActionGroup *action_group, + const gchar *action_name, + GVariant *state); + +GIO_AVAILABLE_IN_2_32 +gboolean g_action_group_query_action (GActionGroup *action_group, + const gchar *action_name, + gboolean *enabled, + const GVariantType **parameter_type, + const GVariantType **state_type, + GVariant **state_hint, + GVariant **state) G_GNUC_WARN_UNUSED_RESULT; + +G_END_DECLS + +#endif /* __G_ACTION_GROUP_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gactiongroupexporter.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gactiongroupexporter.h new file mode 100644 index 0000000..52f40af --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gactiongroupexporter.h @@ -0,0 +1,47 @@ +/* + * Copyright © 2010 Codethink Limited + * Copyright © 2011 Canonical Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + */ + + +#ifndef __G_ACTION_GROUP_EXPORTER_H__ +#define __G_ACTION_GROUP_EXPORTER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +GIO_AVAILABLE_IN_2_32 +guint g_dbus_connection_export_action_group (GDBusConnection *connection, + const gchar *object_path, + GActionGroup *action_group, + GError **error); + +GIO_AVAILABLE_IN_2_32 +void g_dbus_connection_unexport_action_group (GDBusConnection *connection, + guint export_id); + +G_END_DECLS + +#endif /* __G_ACTION_GROUP_EXPORTER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gactionmap.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gactionmap.h new file mode 100644 index 0000000..4d5a816 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gactionmap.h @@ -0,0 +1,101 @@ +/* + * Copyright © 2010 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + */ + +#ifndef __G_ACTION_MAP_H__ +#define __G_ACTION_MAP_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + + +#define G_TYPE_ACTION_MAP (g_action_map_get_type ()) +#define G_ACTION_MAP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_ACTION_MAP, GActionMap)) +#define G_IS_ACTION_MAP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_ACTION_MAP)) +#define G_ACTION_MAP_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \ + G_TYPE_ACTION_MAP, GActionMapInterface)) + +typedef struct _GActionMapInterface GActionMapInterface; +typedef struct _GActionEntry GActionEntry; + +struct _GActionMapInterface +{ + GTypeInterface g_iface; + + GAction * (* lookup_action) (GActionMap *action_map, + const gchar *action_name); + void (* add_action) (GActionMap *action_map, + GAction *action); + void (* remove_action) (GActionMap *action_map, + const gchar *action_name); +}; + +struct _GActionEntry +{ + const gchar *name; + + void (* activate) (GSimpleAction *action, + GVariant *parameter, + gpointer user_data); + + const gchar *parameter_type; + + const gchar *state; + + void (* change_state) (GSimpleAction *action, + GVariant *value, + gpointer user_data); + + /*< private >*/ + gsize padding[3]; +}; + +GIO_AVAILABLE_IN_2_32 +GType g_action_map_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_32 +GAction * g_action_map_lookup_action (GActionMap *action_map, + const gchar *action_name); +GIO_AVAILABLE_IN_2_32 +void g_action_map_add_action (GActionMap *action_map, + GAction *action); +GIO_AVAILABLE_IN_2_32 +void g_action_map_remove_action (GActionMap *action_map, + const gchar *action_name); +GIO_AVAILABLE_IN_2_32 +void g_action_map_add_action_entries (GActionMap *action_map, + const GActionEntry *entries, + gint n_entries, + gpointer user_data); +GIO_AVAILABLE_IN_2_78 +void g_action_map_remove_action_entries (GActionMap *action_map, + const GActionEntry *entries, + gint n_entries); + +G_END_DECLS + +#endif /* __G_ACTION_MAP_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gappinfo.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gappinfo.h new file mode 100644 index 0000000..6b13596 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gappinfo.h @@ -0,0 +1,369 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_APP_INFO_H__ +#define __G_APP_INFO_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_APP_INFO (g_app_info_get_type ()) +#define G_APP_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_APP_INFO, GAppInfo)) +#define G_IS_APP_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_APP_INFO)) +#define G_APP_INFO_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_APP_INFO, GAppInfoIface)) + +#define G_TYPE_APP_LAUNCH_CONTEXT (g_app_launch_context_get_type ()) +#define G_APP_LAUNCH_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_APP_LAUNCH_CONTEXT, GAppLaunchContext)) +#define G_APP_LAUNCH_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_APP_LAUNCH_CONTEXT, GAppLaunchContextClass)) +#define G_IS_APP_LAUNCH_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_APP_LAUNCH_CONTEXT)) +#define G_IS_APP_LAUNCH_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_APP_LAUNCH_CONTEXT)) +#define G_APP_LAUNCH_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_APP_LAUNCH_CONTEXT, GAppLaunchContextClass)) + +typedef struct _GAppLaunchContextClass GAppLaunchContextClass; +typedef struct _GAppLaunchContextPrivate GAppLaunchContextPrivate; + +/** + * GAppInfo: + * + * Information about an installed application and methods to launch + * it (with file arguments). + */ + +/** + * GAppInfoIface: + * @g_iface: The parent interface. + * @dup: Copies a #GAppInfo. + * @equal: Checks two #GAppInfos for equality. + * @get_id: Gets a string identifier for a #GAppInfo. + * @get_name: Gets the name of the application for a #GAppInfo. + * @get_description: Gets a short description for the application described by the #GAppInfo. + * @get_executable: Gets the executable name for the #GAppInfo. + * @get_icon: Gets the #GIcon for the #GAppInfo. + * @launch: Launches an application specified by the #GAppInfo. + * @supports_uris: Indicates whether the application specified supports launching URIs. + * @supports_files: Indicates whether the application specified accepts filename arguments. + * @launch_uris: Launches an application with a list of URIs. + * @should_show: Returns whether an application should be shown (e.g. when getting a list of installed applications). + * [FreeDesktop.Org Startup Notification Specification](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt). + * @set_as_default_for_type: Sets an application as default for a given content type. + * @set_as_default_for_extension: Sets an application as default for a given file extension. + * @add_supports_type: Adds to the #GAppInfo information about supported file types. + * @can_remove_supports_type: Checks for support for removing supported file types from a #GAppInfo. + * @remove_supports_type: Removes a supported application type from a #GAppInfo. + * @can_delete: Checks if a #GAppInfo can be deleted. Since 2.20 + * @do_delete: Deletes a #GAppInfo. Since 2.20 + * @get_commandline: Gets the commandline for the #GAppInfo. Since 2.20 + * @get_display_name: Gets the display name for the #GAppInfo. Since 2.24 + * @set_as_last_used_for_type: Sets the application as the last used. See g_app_info_set_as_last_used_for_type(). + * @get_supported_types: Retrieves the list of content types that @app_info claims to support. + * @launch_uris_async: Asynchronously launches an application with a list of URIs. (Since: 2.60) + * @launch_uris_finish: Finishes an operation started with @launch_uris_async. (Since: 2.60) + + * Application Information interface, for operating system portability. + */ +typedef struct _GAppInfoIface GAppInfoIface; + +struct _GAppInfoIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + GAppInfo * (* dup) (GAppInfo *appinfo); + gboolean (* equal) (GAppInfo *appinfo1, + GAppInfo *appinfo2); + const char * (* get_id) (GAppInfo *appinfo); + const char * (* get_name) (GAppInfo *appinfo); + const char * (* get_description) (GAppInfo *appinfo); + const char * (* get_executable) (GAppInfo *appinfo); + GIcon * (* get_icon) (GAppInfo *appinfo); + gboolean (* launch) (GAppInfo *appinfo, + GList *files, + GAppLaunchContext *context, + GError **error); + gboolean (* supports_uris) (GAppInfo *appinfo); + gboolean (* supports_files) (GAppInfo *appinfo); + gboolean (* launch_uris) (GAppInfo *appinfo, + GList *uris, + GAppLaunchContext *context, + GError **error); + gboolean (* should_show) (GAppInfo *appinfo); + + /* For changing associations */ + gboolean (* set_as_default_for_type) (GAppInfo *appinfo, + const char *content_type, + GError **error); + gboolean (* set_as_default_for_extension) (GAppInfo *appinfo, + const char *extension, + GError **error); + gboolean (* add_supports_type) (GAppInfo *appinfo, + const char *content_type, + GError **error); + gboolean (* can_remove_supports_type) (GAppInfo *appinfo); + gboolean (* remove_supports_type) (GAppInfo *appinfo, + const char *content_type, + GError **error); + gboolean (* can_delete) (GAppInfo *appinfo); + gboolean (* do_delete) (GAppInfo *appinfo); + const char * (* get_commandline) (GAppInfo *appinfo); + const char * (* get_display_name) (GAppInfo *appinfo); + gboolean (* set_as_last_used_for_type) (GAppInfo *appinfo, + const char *content_type, + GError **error); + const char ** (* get_supported_types) (GAppInfo *appinfo); + void (* launch_uris_async) (GAppInfo *appinfo, + GList *uris, + GAppLaunchContext *context, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* launch_uris_finish) (GAppInfo *appinfo, + GAsyncResult *result, + GError **error); +}; + +GIO_AVAILABLE_IN_ALL +GType g_app_info_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GAppInfo * g_app_info_create_from_commandline (const char *commandline, + const char *application_name, + GAppInfoCreateFlags flags, + GError **error); +GIO_AVAILABLE_IN_ALL +GAppInfo * g_app_info_dup (GAppInfo *appinfo); +GIO_AVAILABLE_IN_ALL +gboolean g_app_info_equal (GAppInfo *appinfo1, + GAppInfo *appinfo2); +GIO_AVAILABLE_IN_ALL +const char *g_app_info_get_id (GAppInfo *appinfo); +GIO_AVAILABLE_IN_ALL +const char *g_app_info_get_name (GAppInfo *appinfo); +GIO_AVAILABLE_IN_ALL +const char *g_app_info_get_display_name (GAppInfo *appinfo); +GIO_AVAILABLE_IN_ALL +const char *g_app_info_get_description (GAppInfo *appinfo); +GIO_AVAILABLE_IN_ALL +const char *g_app_info_get_executable (GAppInfo *appinfo); +GIO_AVAILABLE_IN_ALL +const char *g_app_info_get_commandline (GAppInfo *appinfo); +GIO_AVAILABLE_IN_ALL +GIcon * g_app_info_get_icon (GAppInfo *appinfo); +GIO_AVAILABLE_IN_ALL +gboolean g_app_info_launch (GAppInfo *appinfo, + GList *files, + GAppLaunchContext *context, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_app_info_supports_uris (GAppInfo *appinfo); +GIO_AVAILABLE_IN_ALL +gboolean g_app_info_supports_files (GAppInfo *appinfo); +GIO_AVAILABLE_IN_ALL +gboolean g_app_info_launch_uris (GAppInfo *appinfo, + GList *uris, + GAppLaunchContext *context, + GError **error); +GIO_AVAILABLE_IN_2_60 +void g_app_info_launch_uris_async (GAppInfo *appinfo, + GList *uris, + GAppLaunchContext *context, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_60 +gboolean g_app_info_launch_uris_finish (GAppInfo *appinfo, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_app_info_should_show (GAppInfo *appinfo); + +GIO_AVAILABLE_IN_ALL +gboolean g_app_info_set_as_default_for_type (GAppInfo *appinfo, + const char *content_type, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_app_info_set_as_default_for_extension (GAppInfo *appinfo, + const char *extension, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_app_info_add_supports_type (GAppInfo *appinfo, + const char *content_type, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_app_info_can_remove_supports_type (GAppInfo *appinfo); +GIO_AVAILABLE_IN_ALL +gboolean g_app_info_remove_supports_type (GAppInfo *appinfo, + const char *content_type, + GError **error); +GIO_AVAILABLE_IN_2_34 +const char **g_app_info_get_supported_types (GAppInfo *appinfo); + +GIO_AVAILABLE_IN_ALL +gboolean g_app_info_can_delete (GAppInfo *appinfo); +GIO_AVAILABLE_IN_ALL +gboolean g_app_info_delete (GAppInfo *appinfo); + +GIO_AVAILABLE_IN_ALL +gboolean g_app_info_set_as_last_used_for_type (GAppInfo *appinfo, + const char *content_type, + GError **error); + +GIO_AVAILABLE_IN_ALL +GList * g_app_info_get_all (void); +GIO_AVAILABLE_IN_ALL +GList * g_app_info_get_all_for_type (const char *content_type); +GIO_AVAILABLE_IN_ALL +GList * g_app_info_get_recommended_for_type (const gchar *content_type); +GIO_AVAILABLE_IN_ALL +GList * g_app_info_get_fallback_for_type (const gchar *content_type); + +GIO_AVAILABLE_IN_ALL +void g_app_info_reset_type_associations (const char *content_type); +GIO_AVAILABLE_IN_ALL +GAppInfo *g_app_info_get_default_for_type (const char *content_type, + gboolean must_support_uris); +GIO_AVAILABLE_IN_2_74 +void g_app_info_get_default_for_type_async (const char *content_type, + gboolean must_support_uris, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_74 +GAppInfo *g_app_info_get_default_for_type_finish (GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +GAppInfo *g_app_info_get_default_for_uri_scheme (const char *uri_scheme); + +GIO_AVAILABLE_IN_2_74 +void g_app_info_get_default_for_uri_scheme_async (const char *uri_scheme, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_74 +GAppInfo *g_app_info_get_default_for_uri_scheme_finish (GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_app_info_launch_default_for_uri (const char *uri, + GAppLaunchContext *context, + GError **error); + +GIO_AVAILABLE_IN_2_50 +void g_app_info_launch_default_for_uri_async (const char *uri, + GAppLaunchContext *context, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_50 +gboolean g_app_info_launch_default_for_uri_finish (GAsyncResult *result, + GError **error); + + +/** + * GAppLaunchContext: + * + * Integrating the launch with the launching application. This is used to + * handle for instance startup notification and launching the new application + * on the same screen as the launching window. + */ +struct _GAppLaunchContext +{ + GObject parent_instance; + + /*< private >*/ + GAppLaunchContextPrivate *priv; +}; + +struct _GAppLaunchContextClass +{ + GObjectClass parent_class; + + char * (* get_display) (GAppLaunchContext *context, + GAppInfo *info, + GList *files); + char * (* get_startup_notify_id) (GAppLaunchContext *context, + GAppInfo *info, + GList *files); + void (* launch_failed) (GAppLaunchContext *context, + const char *startup_notify_id); + void (* launched) (GAppLaunchContext *context, + GAppInfo *info, + GVariant *platform_data); + void (* launch_started) (GAppLaunchContext *context, + GAppInfo *info, + GVariant *platform_data); + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_app_launch_context_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GAppLaunchContext *g_app_launch_context_new (void); + +GIO_AVAILABLE_IN_2_32 +void g_app_launch_context_setenv (GAppLaunchContext *context, + const char *variable, + const char *value); +GIO_AVAILABLE_IN_2_32 +void g_app_launch_context_unsetenv (GAppLaunchContext *context, + const char *variable); +GIO_AVAILABLE_IN_2_32 +char ** g_app_launch_context_get_environment (GAppLaunchContext *context); + +GIO_AVAILABLE_IN_ALL +char * g_app_launch_context_get_display (GAppLaunchContext *context, + GAppInfo *info, + GList *files); +GIO_AVAILABLE_IN_ALL +char * g_app_launch_context_get_startup_notify_id (GAppLaunchContext *context, + GAppInfo *info, + GList *files); +GIO_AVAILABLE_IN_ALL +void g_app_launch_context_launch_failed (GAppLaunchContext *context, + const char * startup_notify_id); + +#define G_TYPE_APP_INFO_MONITOR (g_app_info_monitor_get_type ()) +#define G_APP_INFO_MONITOR(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_APP_INFO_MONITOR, GAppInfoMonitor)) +#define G_IS_APP_INFO_MONITOR(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_APP_INFO_MONITOR)) + +typedef struct _GAppInfoMonitor GAppInfoMonitor; + +GIO_AVAILABLE_IN_2_40 +GType g_app_info_monitor_get_type (void); + +GIO_AVAILABLE_IN_2_40 +GAppInfoMonitor * g_app_info_monitor_get (void); + +G_END_DECLS + +#endif /* __G_APP_INFO_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gapplication.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gapplication.h new file mode 100644 index 0000000..cb6b908 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gapplication.h @@ -0,0 +1,257 @@ +/* + * Copyright © 2010 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + */ + +#ifndef __G_APPLICATION_H__ +#define __G_APPLICATION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_APPLICATION (g_application_get_type ()) +#define G_APPLICATION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_APPLICATION, GApplication)) +#define G_APPLICATION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_APPLICATION, GApplicationClass)) +#define G_IS_APPLICATION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_APPLICATION)) +#define G_IS_APPLICATION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_APPLICATION)) +#define G_APPLICATION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_APPLICATION, GApplicationClass)) + +typedef struct _GApplicationPrivate GApplicationPrivate; +typedef struct _GApplicationClass GApplicationClass; + +struct _GApplication +{ + /*< private >*/ + GObject parent_instance; + + GApplicationPrivate *priv; +}; + +struct _GApplicationClass +{ + /*< private >*/ + GObjectClass parent_class; + + /*< public >*/ + /* signals */ + void (* startup) (GApplication *application); + + void (* activate) (GApplication *application); + + void (* open) (GApplication *application, + GFile **files, + gint n_files, + const gchar *hint); + + int (* command_line) (GApplication *application, + GApplicationCommandLine *command_line); + + /* vfuncs */ + + /** + * GApplicationClass::local_command_line: + * @application: a #GApplication + * @arguments: (inout) (array zero-terminated=1): array of command line arguments + * @exit_status: (out): exit status to fill after processing the command line. + * + * This virtual function is always invoked in the local instance. It + * gets passed a pointer to a %NULL-terminated copy of @argv and is + * expected to remove arguments that it handled (shifting up remaining + * arguments). + * + * The last argument to local_command_line() is a pointer to the @status + * variable which can used to set the exit status that is returned from + * g_application_run(). + * + * See g_application_run() for more details on #GApplication startup. + * + * Returns: %TRUE if the commandline has been completely handled + */ + gboolean (* local_command_line) (GApplication *application, + gchar ***arguments, + int *exit_status); + + /* @platform_data comes from an external process and is untrusted. All value types + * must be validated before being used. */ + void (* before_emit) (GApplication *application, + GVariant *platform_data); + /* Same as for @before_emit. */ + void (* after_emit) (GApplication *application, + GVariant *platform_data); + void (* add_platform_data) (GApplication *application, + GVariantBuilder *builder); + void (* quit_mainloop) (GApplication *application); + void (* run_mainloop) (GApplication *application); + void (* shutdown) (GApplication *application); + + gboolean (* dbus_register) (GApplication *application, + GDBusConnection *connection, + const gchar *object_path, + GError **error); + void (* dbus_unregister) (GApplication *application, + GDBusConnection *connection, + const gchar *object_path); + gint (* handle_local_options)(GApplication *application, + GVariantDict *options); + gboolean (* name_lost) (GApplication *application); + + /*< private >*/ + gpointer padding[7]; +}; + +GIO_AVAILABLE_IN_ALL +GType g_application_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +gboolean g_application_id_is_valid (const gchar *application_id); + +GIO_AVAILABLE_IN_ALL +GApplication * g_application_new (const gchar *application_id, + GApplicationFlags flags); + +GIO_AVAILABLE_IN_ALL +const gchar * g_application_get_application_id (GApplication *application); +GIO_AVAILABLE_IN_ALL +void g_application_set_application_id (GApplication *application, + const gchar *application_id); + +GIO_AVAILABLE_IN_2_34 +GDBusConnection * g_application_get_dbus_connection (GApplication *application); +GIO_AVAILABLE_IN_2_34 +const gchar * g_application_get_dbus_object_path (GApplication *application); + +GIO_AVAILABLE_IN_ALL +guint g_application_get_inactivity_timeout (GApplication *application); +GIO_AVAILABLE_IN_ALL +void g_application_set_inactivity_timeout (GApplication *application, + guint inactivity_timeout); + +GIO_AVAILABLE_IN_ALL +GApplicationFlags g_application_get_flags (GApplication *application); +GIO_AVAILABLE_IN_ALL +void g_application_set_flags (GApplication *application, + GApplicationFlags flags); + +GIO_AVAILABLE_IN_2_42 +const gchar * g_application_get_resource_base_path (GApplication *application); +GIO_AVAILABLE_IN_2_42 +void g_application_set_resource_base_path (GApplication *application, + const gchar *resource_path); + +GIO_DEPRECATED +void g_application_set_action_group (GApplication *application, + GActionGroup *action_group); + +GIO_AVAILABLE_IN_2_40 +void g_application_add_main_option_entries (GApplication *application, + const GOptionEntry *entries); + +GIO_AVAILABLE_IN_2_42 +void g_application_add_main_option (GApplication *application, + const char *long_name, + char short_name, + GOptionFlags flags, + GOptionArg arg, + const char *description, + const char *arg_description); +GIO_AVAILABLE_IN_2_40 +void g_application_add_option_group (GApplication *application, + GOptionGroup *group); +GIO_AVAILABLE_IN_2_56 +void g_application_set_option_context_parameter_string (GApplication *application, + const gchar *parameter_string); +GIO_AVAILABLE_IN_2_56 +void g_application_set_option_context_summary (GApplication *application, + const gchar *summary); +GIO_AVAILABLE_IN_2_56 +void g_application_set_option_context_description (GApplication *application, + const gchar *description); +GIO_AVAILABLE_IN_ALL +gboolean g_application_get_is_registered (GApplication *application); +GIO_AVAILABLE_IN_ALL +gboolean g_application_get_is_remote (GApplication *application); + +GIO_AVAILABLE_IN_ALL +gboolean g_application_register (GApplication *application, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_application_hold (GApplication *application); +GIO_AVAILABLE_IN_ALL +void g_application_release (GApplication *application); + +GIO_AVAILABLE_IN_ALL +void g_application_activate (GApplication *application); + +GIO_AVAILABLE_IN_ALL +void g_application_open (GApplication *application, + GFile **files, + gint n_files, + const gchar *hint); + +GIO_AVAILABLE_IN_ALL +int g_application_run (GApplication *application, + int argc, + char **argv); + +GIO_AVAILABLE_IN_2_32 +void g_application_quit (GApplication *application); + +GIO_AVAILABLE_IN_2_32 +GApplication * g_application_get_default (void); +GIO_AVAILABLE_IN_2_32 +void g_application_set_default (GApplication *application); + +GIO_AVAILABLE_IN_2_38 +void g_application_mark_busy (GApplication *application); +GIO_AVAILABLE_IN_2_38 +void g_application_unmark_busy (GApplication *application); +GIO_AVAILABLE_IN_2_44 +gboolean g_application_get_is_busy (GApplication *application); + +GIO_AVAILABLE_IN_2_40 +void g_application_send_notification (GApplication *application, + const gchar *id, + GNotification *notification); +GIO_AVAILABLE_IN_2_40 +void g_application_withdraw_notification (GApplication *application, + const gchar *id); + +GIO_AVAILABLE_IN_2_44 +void g_application_bind_busy_property (GApplication *application, + gpointer object, + const gchar *property); + +GIO_AVAILABLE_IN_2_44 +void g_application_unbind_busy_property (GApplication *application, + gpointer object, + const gchar *property); + +G_END_DECLS + +#endif /* __G_APPLICATION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gapplicationcommandline.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gapplicationcommandline.h new file mode 100644 index 0000000..abb6852 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gapplicationcommandline.h @@ -0,0 +1,124 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2010 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + */ + +#ifndef __G_APPLICATION_COMMAND_LINE_H__ +#define __G_APPLICATION_COMMAND_LINE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_APPLICATION_COMMAND_LINE (g_application_command_line_get_type ()) +#define G_APPLICATION_COMMAND_LINE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_APPLICATION_COMMAND_LINE, \ + GApplicationCommandLine)) +#define G_APPLICATION_COMMAND_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_APPLICATION_COMMAND_LINE, \ + GApplicationCommandLineClass)) +#define G_IS_APPLICATION_COMMAND_LINE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_APPLICATION_COMMAND_LINE)) +#define G_IS_APPLICATION_COMMAND_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_APPLICATION_COMMAND_LINE)) +#define G_APPLICATION_COMMAND_LINE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_APPLICATION_COMMAND_LINE, \ + GApplicationCommandLineClass)) + +typedef struct _GApplicationCommandLinePrivate GApplicationCommandLinePrivate; +typedef struct _GApplicationCommandLineClass GApplicationCommandLineClass; + +struct _GApplicationCommandLine +{ + /*< private >*/ + GObject parent_instance; + + GApplicationCommandLinePrivate *priv; +}; + +struct _GApplicationCommandLineClass +{ + /*< private >*/ + GObjectClass parent_class; + + void (* print_literal) (GApplicationCommandLine *cmdline, + const gchar *message); + void (* printerr_literal) (GApplicationCommandLine *cmdline, + const gchar *message); + GInputStream * (* get_stdin) (GApplicationCommandLine *cmdline); + + gpointer padding[11]; +}; + +GIO_AVAILABLE_IN_ALL +GType g_application_command_line_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +gchar ** g_application_command_line_get_arguments (GApplicationCommandLine *cmdline, + int *argc); + +GIO_AVAILABLE_IN_2_40 +GVariantDict * g_application_command_line_get_options_dict (GApplicationCommandLine *cmdline); + +GIO_AVAILABLE_IN_2_36 +GInputStream * g_application_command_line_get_stdin (GApplicationCommandLine *cmdline); + +GIO_AVAILABLE_IN_ALL +const gchar * const * g_application_command_line_get_environ (GApplicationCommandLine *cmdline); + +GIO_AVAILABLE_IN_ALL +const gchar * g_application_command_line_getenv (GApplicationCommandLine *cmdline, + const gchar *name); + +GIO_AVAILABLE_IN_ALL +const gchar * g_application_command_line_get_cwd (GApplicationCommandLine *cmdline); + +GIO_AVAILABLE_IN_ALL +gboolean g_application_command_line_get_is_remote (GApplicationCommandLine *cmdline); + +GIO_AVAILABLE_IN_ALL +void g_application_command_line_print (GApplicationCommandLine *cmdline, + const gchar *format, + ...) G_GNUC_PRINTF(2, 3); +GIO_AVAILABLE_IN_ALL +void g_application_command_line_printerr (GApplicationCommandLine *cmdline, + const gchar *format, + ...) G_GNUC_PRINTF(2, 3); + +GIO_AVAILABLE_IN_ALL +int g_application_command_line_get_exit_status (GApplicationCommandLine *cmdline); +GIO_AVAILABLE_IN_ALL +void g_application_command_line_set_exit_status (GApplicationCommandLine *cmdline, + int exit_status); + +GIO_AVAILABLE_IN_ALL +GVariant * g_application_command_line_get_platform_data (GApplicationCommandLine *cmdline); + +GIO_AVAILABLE_IN_2_36 +GFile * g_application_command_line_create_file_for_arg (GApplicationCommandLine *cmdline, + const gchar *arg); + +G_END_DECLS + +#endif /* __G_APPLICATION_COMMAND_LINE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gasyncinitable.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gasyncinitable.h new file mode 100644 index 0000000..1808398 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gasyncinitable.h @@ -0,0 +1,132 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2009 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_ASYNC_INITABLE_H__ +#define __G_ASYNC_INITABLE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +#define G_TYPE_ASYNC_INITABLE (g_async_initable_get_type ()) +#define G_ASYNC_INITABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_ASYNC_INITABLE, GAsyncInitable)) +#define G_IS_ASYNC_INITABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_ASYNC_INITABLE)) +#define G_ASYNC_INITABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_ASYNC_INITABLE, GAsyncInitableIface)) +#define G_TYPE_IS_ASYNC_INITABLE(type) (g_type_is_a ((type), G_TYPE_ASYNC_INITABLE)) + +/** + * GAsyncInitable: + * + * Interface for asynchronously initializable objects. + * + * Since: 2.22 + **/ +typedef struct _GAsyncInitableIface GAsyncInitableIface; + +/** + * GAsyncInitableIface: + * @g_iface: The parent interface. + * @init_async: Starts initialization of the object. + * @init_finish: Finishes initialization of the object. + * + * Provides an interface for asynchronous initializing object such that + * initialization may fail. + * + * Since: 2.22 + **/ +struct _GAsyncInitableIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + void (* init_async) (GAsyncInitable *initable, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* init_finish) (GAsyncInitable *initable, + GAsyncResult *res, + GError **error); +}; + +GIO_AVAILABLE_IN_ALL +GType g_async_initable_get_type (void) G_GNUC_CONST; + + +GIO_AVAILABLE_IN_ALL +void g_async_initable_init_async (GAsyncInitable *initable, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_async_initable_init_finish (GAsyncInitable *initable, + GAsyncResult *res, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_async_initable_new_async (GType object_type, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data, + const gchar *first_property_name, + ...); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + +GIO_DEPRECATED_IN_2_54_FOR(g_object_new_with_properties and g_async_initable_init_async) +void g_async_initable_newv_async (GType object_type, + guint n_parameters, + GParameter *parameters, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +G_GNUC_END_IGNORE_DEPRECATIONS + +GIO_AVAILABLE_IN_ALL +void g_async_initable_new_valist_async (GType object_type, + const gchar *first_property_name, + va_list var_args, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GObject *g_async_initable_new_finish (GAsyncInitable *initable, + GAsyncResult *res, + GError **error); + + + +G_END_DECLS + + +#endif /* __G_ASYNC_INITABLE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gasyncresult.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gasyncresult.h new file mode 100644 index 0000000..4a98c5f --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gasyncresult.h @@ -0,0 +1,87 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_ASYNC_RESULT_H__ +#define __G_ASYNC_RESULT_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_ASYNC_RESULT (g_async_result_get_type ()) +#define G_ASYNC_RESULT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_ASYNC_RESULT, GAsyncResult)) +#define G_IS_ASYNC_RESULT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_ASYNC_RESULT)) +#define G_ASYNC_RESULT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_ASYNC_RESULT, GAsyncResultIface)) + +/** + * GAsyncResult: + * + * Holds results information for an asynchronous operation, + * usually passed directly to an asynchronous _finish() operation. + **/ +typedef struct _GAsyncResultIface GAsyncResultIface; + + +/** + * GAsyncResultIface: + * @g_iface: The parent interface. + * @get_user_data: Gets the user data passed to the callback. + * @get_source_object: Gets the source object that issued the asynchronous operation. + * @is_tagged: Checks if a result is tagged with a particular source. + * + * Interface definition for #GAsyncResult. + **/ +struct _GAsyncResultIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + gpointer (* get_user_data) (GAsyncResult *res); + GObject * (* get_source_object) (GAsyncResult *res); + + gboolean (* is_tagged) (GAsyncResult *res, + gpointer source_tag); +}; + +GIO_AVAILABLE_IN_ALL +GType g_async_result_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +gpointer g_async_result_get_user_data (GAsyncResult *res); +GIO_AVAILABLE_IN_ALL +GObject *g_async_result_get_source_object (GAsyncResult *res); + +GIO_AVAILABLE_IN_2_34 +gboolean g_async_result_legacy_propagate_error (GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_2_34 +gboolean g_async_result_is_tagged (GAsyncResult *res, + gpointer source_tag); + +G_END_DECLS + +#endif /* __G_ASYNC_RESULT_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gbufferedinputstream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gbufferedinputstream.h new file mode 100644 index 0000000..c6b1dea --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gbufferedinputstream.h @@ -0,0 +1,135 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Christian Kellner + */ + +#ifndef __G_BUFFERED_INPUT_STREAM_H__ +#define __G_BUFFERED_INPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_BUFFERED_INPUT_STREAM (g_buffered_input_stream_get_type ()) +#define G_BUFFERED_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_BUFFERED_INPUT_STREAM, GBufferedInputStream)) +#define G_BUFFERED_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_BUFFERED_INPUT_STREAM, GBufferedInputStreamClass)) +#define G_IS_BUFFERED_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_BUFFERED_INPUT_STREAM)) +#define G_IS_BUFFERED_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_BUFFERED_INPUT_STREAM)) +#define G_BUFFERED_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_BUFFERED_INPUT_STREAM, GBufferedInputStreamClass)) + +/** + * GBufferedInputStream: + * + * Implements #GFilterInputStream with a sized input buffer. + **/ +typedef struct _GBufferedInputStreamClass GBufferedInputStreamClass; +typedef struct _GBufferedInputStreamPrivate GBufferedInputStreamPrivate; + +struct _GBufferedInputStream +{ + GFilterInputStream parent_instance; + + /*< private >*/ + GBufferedInputStreamPrivate *priv; +}; + +struct _GBufferedInputStreamClass +{ + GFilterInputStreamClass parent_class; + + gssize (* fill) (GBufferedInputStream *stream, + gssize count, + GCancellable *cancellable, + GError **error); + + /* Async ops: (optional in derived classes) */ + void (* fill_async) (GBufferedInputStream *stream, + gssize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gssize (* fill_finish) (GBufferedInputStream *stream, + GAsyncResult *result, + GError **error); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + + +GIO_AVAILABLE_IN_ALL +GType g_buffered_input_stream_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GInputStream* g_buffered_input_stream_new (GInputStream *base_stream); +GIO_AVAILABLE_IN_ALL +GInputStream* g_buffered_input_stream_new_sized (GInputStream *base_stream, + gsize size); + +GIO_AVAILABLE_IN_ALL +gsize g_buffered_input_stream_get_buffer_size (GBufferedInputStream *stream); +GIO_AVAILABLE_IN_ALL +void g_buffered_input_stream_set_buffer_size (GBufferedInputStream *stream, + gsize size); +GIO_AVAILABLE_IN_ALL +gsize g_buffered_input_stream_get_available (GBufferedInputStream *stream); +GIO_AVAILABLE_IN_ALL +gsize g_buffered_input_stream_peek (GBufferedInputStream *stream, + void *buffer, + gsize offset, + gsize count); +GIO_AVAILABLE_IN_ALL +const void* g_buffered_input_stream_peek_buffer (GBufferedInputStream *stream, + gsize *count); + +GIO_AVAILABLE_IN_ALL +gssize g_buffered_input_stream_fill (GBufferedInputStream *stream, + gssize count, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_buffered_input_stream_fill_async (GBufferedInputStream *stream, + gssize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gssize g_buffered_input_stream_fill_finish (GBufferedInputStream *stream, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +int g_buffered_input_stream_read_byte (GBufferedInputStream *stream, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + +#endif /* __G_BUFFERED_INPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gbufferedoutputstream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gbufferedoutputstream.h new file mode 100644 index 0000000..1259c76 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gbufferedoutputstream.h @@ -0,0 +1,88 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Christian Kellner + */ + +#ifndef __G_BUFFERED_OUTPUT_STREAM_H__ +#define __G_BUFFERED_OUTPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_BUFFERED_OUTPUT_STREAM (g_buffered_output_stream_get_type ()) +#define G_BUFFERED_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_BUFFERED_OUTPUT_STREAM, GBufferedOutputStream)) +#define G_BUFFERED_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_BUFFERED_OUTPUT_STREAM, GBufferedOutputStreamClass)) +#define G_IS_BUFFERED_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_BUFFERED_OUTPUT_STREAM)) +#define G_IS_BUFFERED_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_BUFFERED_OUTPUT_STREAM)) +#define G_BUFFERED_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_BUFFERED_OUTPUT_STREAM, GBufferedOutputStreamClass)) + +/** + * GBufferedOutputStream: + * + * An implementation of #GFilterOutputStream with a sized buffer. + **/ +typedef struct _GBufferedOutputStreamClass GBufferedOutputStreamClass; +typedef struct _GBufferedOutputStreamPrivate GBufferedOutputStreamPrivate; + +struct _GBufferedOutputStream +{ + GFilterOutputStream parent_instance; + + /*< protected >*/ + GBufferedOutputStreamPrivate *priv; +}; + +struct _GBufferedOutputStreamClass +{ + GFilterOutputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); +}; + + +GIO_AVAILABLE_IN_ALL +GType g_buffered_output_stream_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GOutputStream* g_buffered_output_stream_new (GOutputStream *base_stream); +GIO_AVAILABLE_IN_ALL +GOutputStream* g_buffered_output_stream_new_sized (GOutputStream *base_stream, + gsize size); +GIO_AVAILABLE_IN_ALL +gsize g_buffered_output_stream_get_buffer_size (GBufferedOutputStream *stream); +GIO_AVAILABLE_IN_ALL +void g_buffered_output_stream_set_buffer_size (GBufferedOutputStream *stream, + gsize size); +GIO_AVAILABLE_IN_ALL +gboolean g_buffered_output_stream_get_auto_grow (GBufferedOutputStream *stream); +GIO_AVAILABLE_IN_ALL +void g_buffered_output_stream_set_auto_grow (GBufferedOutputStream *stream, + gboolean auto_grow); + +G_END_DECLS + +#endif /* __G_BUFFERED_OUTPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gbytesicon.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gbytesicon.h new file mode 100644 index 0000000..c917d38 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gbytesicon.h @@ -0,0 +1,54 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Ryan Lortie + */ + +#ifndef __G_BYTES_ICON_H__ +#define __G_BYTES_ICON_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_BYTES_ICON (g_bytes_icon_get_type ()) +#define G_BYTES_ICON(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_BYTES_ICON, GBytesIcon)) +#define G_IS_BYTES_ICON(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_BYTES_ICON)) + +/** + * GBytesIcon: + * + * Gets an icon for a #GBytes. Implements #GLoadableIcon. + **/ +GIO_AVAILABLE_IN_2_38 +GType g_bytes_icon_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_38 +GIcon * g_bytes_icon_new (GBytes *bytes); + +GIO_AVAILABLE_IN_2_38 +GBytes * g_bytes_icon_get_bytes (GBytesIcon *icon); + +G_END_DECLS + +#endif /* __G_BYTES_ICON_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gcancellable.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gcancellable.h new file mode 100644 index 0000000..d33215d --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gcancellable.h @@ -0,0 +1,120 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_CANCELLABLE_H__ +#define __G_CANCELLABLE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_CANCELLABLE (g_cancellable_get_type ()) +#define G_CANCELLABLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CANCELLABLE, GCancellable)) +#define G_CANCELLABLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CANCELLABLE, GCancellableClass)) +#define G_IS_CANCELLABLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CANCELLABLE)) +#define G_IS_CANCELLABLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CANCELLABLE)) +#define G_CANCELLABLE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CANCELLABLE, GCancellableClass)) + +/** + * GCancellable: + * + * Allows actions to be cancelled. + */ +typedef struct _GCancellableClass GCancellableClass; +typedef struct _GCancellablePrivate GCancellablePrivate; + +struct _GCancellable +{ + GObject parent_instance; + + /*< private >*/ + GCancellablePrivate *priv; +}; + +struct _GCancellableClass +{ + GObjectClass parent_class; + + void (* cancelled) (GCancellable *cancellable); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_cancellable_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GCancellable *g_cancellable_new (void); + +/* These are only safe to call inside a cancellable op */ +GIO_AVAILABLE_IN_ALL +gboolean g_cancellable_is_cancelled (GCancellable *cancellable); +GIO_AVAILABLE_IN_ALL +gboolean g_cancellable_set_error_if_cancelled (GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +int g_cancellable_get_fd (GCancellable *cancellable); +GIO_AVAILABLE_IN_ALL +gboolean g_cancellable_make_pollfd (GCancellable *cancellable, + GPollFD *pollfd); +GIO_AVAILABLE_IN_ALL +void g_cancellable_release_fd (GCancellable *cancellable); + +GIO_AVAILABLE_IN_ALL +GSource * g_cancellable_source_new (GCancellable *cancellable); + +GIO_AVAILABLE_IN_ALL +GCancellable *g_cancellable_get_current (void); +GIO_AVAILABLE_IN_ALL +void g_cancellable_push_current (GCancellable *cancellable); +GIO_AVAILABLE_IN_ALL +void g_cancellable_pop_current (GCancellable *cancellable); +GIO_AVAILABLE_IN_ALL +void g_cancellable_reset (GCancellable *cancellable); +GIO_AVAILABLE_IN_ALL +gulong g_cancellable_connect (GCancellable *cancellable, + GCallback callback, + gpointer data, + GDestroyNotify data_destroy_func); +GIO_AVAILABLE_IN_ALL +void g_cancellable_disconnect (GCancellable *cancellable, + gulong handler_id); + + +/* This is safe to call from another thread */ +GIO_AVAILABLE_IN_ALL +void g_cancellable_cancel (GCancellable *cancellable); + +G_END_DECLS + +#endif /* __G_CANCELLABLE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gcharsetconverter.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gcharsetconverter.h new file mode 100644 index 0000000..455ca7c --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gcharsetconverter.h @@ -0,0 +1,65 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2009 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_CHARSET_CONVERTER_H__ +#define __G_CHARSET_CONVERTER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_CHARSET_CONVERTER (g_charset_converter_get_type ()) +#define G_CHARSET_CONVERTER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CHARSET_CONVERTER, GCharsetConverter)) +#define G_CHARSET_CONVERTER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CHARSET_CONVERTER, GCharsetConverterClass)) +#define G_IS_CHARSET_CONVERTER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CHARSET_CONVERTER)) +#define G_IS_CHARSET_CONVERTER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CHARSET_CONVERTER)) +#define G_CHARSET_CONVERTER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CHARSET_CONVERTER, GCharsetConverterClass)) + +typedef struct _GCharsetConverterClass GCharsetConverterClass; + +struct _GCharsetConverterClass +{ + GObjectClass parent_class; +}; + +GIO_AVAILABLE_IN_ALL +GType g_charset_converter_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GCharsetConverter *g_charset_converter_new (const gchar *to_charset, + const gchar *from_charset, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_charset_converter_set_use_fallback (GCharsetConverter *converter, + gboolean use_fallback); +GIO_AVAILABLE_IN_ALL +gboolean g_charset_converter_get_use_fallback (GCharsetConverter *converter); +GIO_AVAILABLE_IN_ALL +guint g_charset_converter_get_num_fallbacks (GCharsetConverter *converter); + +G_END_DECLS + +#endif /* __G_CHARSET_CONVERTER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gcontenttype.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gcontenttype.h new file mode 100644 index 0000000..910c2e2 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gcontenttype.h @@ -0,0 +1,84 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_CONTENT_TYPE_H__ +#define __G_CONTENT_TYPE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +GIO_AVAILABLE_IN_ALL +gboolean g_content_type_equals (const gchar *type1, + const gchar *type2); +GIO_AVAILABLE_IN_ALL +gboolean g_content_type_is_a (const gchar *type, + const gchar *supertype); +GIO_AVAILABLE_IN_2_52 +gboolean g_content_type_is_mime_type (const gchar *type, + const gchar *mime_type); +GIO_AVAILABLE_IN_ALL +gboolean g_content_type_is_unknown (const gchar *type); +GIO_AVAILABLE_IN_ALL +gchar * g_content_type_get_description (const gchar *type); +GIO_AVAILABLE_IN_ALL +gchar * g_content_type_get_mime_type (const gchar *type); +GIO_AVAILABLE_IN_ALL +GIcon * g_content_type_get_icon (const gchar *type); +GIO_AVAILABLE_IN_2_34 +GIcon * g_content_type_get_symbolic_icon (const gchar *type); +GIO_AVAILABLE_IN_2_34 +gchar * g_content_type_get_generic_icon_name (const gchar *type); + +GIO_AVAILABLE_IN_ALL +gboolean g_content_type_can_be_executable (const gchar *type); + +GIO_AVAILABLE_IN_ALL +gchar * g_content_type_from_mime_type (const gchar *mime_type); + +GIO_AVAILABLE_IN_ALL +gchar * g_content_type_guess (const gchar *filename, + const guchar *data, + gsize data_size, + gboolean *result_uncertain); + +GIO_AVAILABLE_IN_ALL +gchar ** g_content_type_guess_for_tree (GFile *root); + +GIO_AVAILABLE_IN_ALL +GList * g_content_types_get_registered (void); + +/*< private >*/ +#ifndef __GTK_DOC_IGNORE__ +GIO_AVAILABLE_IN_2_60 +const gchar * const *g_content_type_get_mime_dirs (void); +GIO_AVAILABLE_IN_2_60 +void g_content_type_set_mime_dirs (const gchar * const *dirs); +#endif /* __GTK_DOC_IGNORE__ */ + +G_END_DECLS + +#endif /* __G_CONTENT_TYPE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gconverter.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gconverter.h new file mode 100644 index 0000000..16e94a1 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gconverter.h @@ -0,0 +1,98 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2009 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_CONVERTER_H__ +#define __G_CONVERTER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_CONVERTER (g_converter_get_type ()) +#define G_CONVERTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_CONVERTER, GConverter)) +#define G_IS_CONVERTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_CONVERTER)) +#define G_CONVERTER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_CONVERTER, GConverterIface)) + +/** + * GConverter: + * + * Seek object for streaming operations. + * + * Since: 2.24 + **/ +typedef struct _GConverterIface GConverterIface; + +/** + * GConverterIface: + * @g_iface: The parent interface. + * @convert: Converts data. + * @reset: Reverts the internal state of the converter to its initial state. + * + * Provides an interface for converting data from one type + * to another type. The conversion can be stateful + * and may fail at any place. + * + * Since: 2.24 + **/ +struct _GConverterIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + GConverterResult (* convert) (GConverter *converter, + const void *inbuf, + gsize inbuf_size, + void *outbuf, + gsize outbuf_size, + GConverterFlags flags, + gsize *bytes_read, + gsize *bytes_written, + GError **error); + void (* reset) (GConverter *converter); +}; + +GIO_AVAILABLE_IN_ALL +GType g_converter_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GConverterResult g_converter_convert (GConverter *converter, + const void *inbuf, + gsize inbuf_size, + void *outbuf, + gsize outbuf_size, + GConverterFlags flags, + gsize *bytes_read, + gsize *bytes_written, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_converter_reset (GConverter *converter); + + +G_END_DECLS + + +#endif /* __G_CONVERTER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gconverterinputstream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gconverterinputstream.h new file mode 100644 index 0000000..01de11e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gconverterinputstream.h @@ -0,0 +1,82 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2009 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_CONVERTER_INPUT_STREAM_H__ +#define __G_CONVERTER_INPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +#define G_TYPE_CONVERTER_INPUT_STREAM (g_converter_input_stream_get_type ()) +#define G_CONVERTER_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CONVERTER_INPUT_STREAM, GConverterInputStream)) +#define G_CONVERTER_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CONVERTER_INPUT_STREAM, GConverterInputStreamClass)) +#define G_IS_CONVERTER_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CONVERTER_INPUT_STREAM)) +#define G_IS_CONVERTER_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CONVERTER_INPUT_STREAM)) +#define G_CONVERTER_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CONVERTER_INPUT_STREAM, GConverterInputStreamClass)) + +/** + * GConverterInputStream: + * + * An implementation of #GFilterInputStream that allows data + * conversion. + **/ +typedef struct _GConverterInputStreamClass GConverterInputStreamClass; +typedef struct _GConverterInputStreamPrivate GConverterInputStreamPrivate; + +struct _GConverterInputStream +{ + GFilterInputStream parent_instance; + + /*< private >*/ + GConverterInputStreamPrivate *priv; +}; + +struct _GConverterInputStreamClass +{ + GFilterInputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_converter_input_stream_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GInputStream *g_converter_input_stream_new (GInputStream *base_stream, + GConverter *converter); +GIO_AVAILABLE_IN_ALL +GConverter *g_converter_input_stream_get_converter (GConverterInputStream *converter_stream); + +G_END_DECLS + +#endif /* __G_CONVERTER_INPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gconverteroutputstream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gconverteroutputstream.h new file mode 100644 index 0000000..c090846 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gconverteroutputstream.h @@ -0,0 +1,82 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2009 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_CONVERTER_OUTPUT_STREAM_H__ +#define __G_CONVERTER_OUTPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +#define G_TYPE_CONVERTER_OUTPUT_STREAM (g_converter_output_stream_get_type ()) +#define G_CONVERTER_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CONVERTER_OUTPUT_STREAM, GConverterOutputStream)) +#define G_CONVERTER_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CONVERTER_OUTPUT_STREAM, GConverterOutputStreamClass)) +#define G_IS_CONVERTER_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CONVERTER_OUTPUT_STREAM)) +#define G_IS_CONVERTER_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CONVERTER_OUTPUT_STREAM)) +#define G_CONVERTER_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CONVERTER_OUTPUT_STREAM, GConverterOutputStreamClass)) + +/** + * GConverterOutputStream: + * + * An implementation of #GFilterOutputStream that allows data + * conversion. + **/ +typedef struct _GConverterOutputStreamClass GConverterOutputStreamClass; +typedef struct _GConverterOutputStreamPrivate GConverterOutputStreamPrivate; + +struct _GConverterOutputStream +{ + GFilterOutputStream parent_instance; + + /*< private >*/ + GConverterOutputStreamPrivate *priv; +}; + +struct _GConverterOutputStreamClass +{ + GFilterOutputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_converter_output_stream_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GOutputStream *g_converter_output_stream_new (GOutputStream *base_stream, + GConverter *converter); +GIO_AVAILABLE_IN_ALL +GConverter *g_converter_output_stream_get_converter (GConverterOutputStream *converter_stream); + +G_END_DECLS + +#endif /* __G_CONVERTER_OUTPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gcredentials.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gcredentials.h new file mode 100644 index 0000000..c30f31f --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gcredentials.h @@ -0,0 +1,87 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_CREDENTIALS_H__ +#define __G_CREDENTIALS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +#ifdef G_OS_UNIX +/* To get the uid_t type */ +#include +#include +#endif + +G_BEGIN_DECLS + +#define G_TYPE_CREDENTIALS (g_credentials_get_type ()) +#define G_CREDENTIALS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CREDENTIALS, GCredentials)) +#define G_CREDENTIALS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CREDENTIALS, GCredentialsClass)) +#define G_CREDENTIALS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CREDENTIALS, GCredentialsClass)) +#define G_IS_CREDENTIALS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CREDENTIALS)) +#define G_IS_CREDENTIALS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CREDENTIALS)) + +typedef struct _GCredentialsClass GCredentialsClass; + +GIO_AVAILABLE_IN_ALL +GType g_credentials_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GCredentials *g_credentials_new (void); + +GIO_AVAILABLE_IN_ALL +gchar *g_credentials_to_string (GCredentials *credentials); + +GIO_AVAILABLE_IN_ALL +gpointer g_credentials_get_native (GCredentials *credentials, + GCredentialsType native_type); + +GIO_AVAILABLE_IN_ALL +void g_credentials_set_native (GCredentials *credentials, + GCredentialsType native_type, + gpointer native); + +GIO_AVAILABLE_IN_ALL +gboolean g_credentials_is_same_user (GCredentials *credentials, + GCredentials *other_credentials, + GError **error); + +#ifdef G_OS_UNIX +GIO_AVAILABLE_IN_2_36 +pid_t g_credentials_get_unix_pid (GCredentials *credentials, + GError **error); +GIO_AVAILABLE_IN_ALL +uid_t g_credentials_get_unix_user (GCredentials *credentials, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_credentials_set_unix_user (GCredentials *credentials, + uid_t uid, + GError **error); +#endif + +G_END_DECLS + +#endif /* __G_CREDENTIALS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdatagrambased.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdatagrambased.h new file mode 100644 index 0000000..585728c --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdatagrambased.h @@ -0,0 +1,146 @@ +/* + * Copyright 2015 Collabora Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Philip Withnall + */ + +#ifndef __G_DATAGRAM_BASED_H__ +#define __G_DATAGRAM_BASED_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DATAGRAM_BASED (g_datagram_based_get_type ()) +#define G_DATAGRAM_BASED(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_DATAGRAM_BASED, GDatagramBased)) +#define G_IS_DATAGRAM_BASED(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_DATAGRAM_BASED)) +#define G_DATAGRAM_BASED_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \ + G_TYPE_DATAGRAM_BASED, \ + GDatagramBasedInterface)) +#define G_TYPE_IS_DATAGRAM_BASED(type) (g_type_is_a ((type), \ + G_TYPE_DATAGRAM_BASED)) + +/** + * GDatagramBased: + * + * Interface for socket-like objects with datagram semantics. + * + * Since: 2.48 + */ +typedef struct _GDatagramBasedInterface GDatagramBasedInterface; + +/** + * GDatagramBasedInterface: + * @g_iface: The parent interface. + * @receive_messages: Virtual method for g_datagram_based_receive_messages(). + * @send_messages: Virtual method for g_datagram_based_send_messages(). + * @create_source: Virtual method for g_datagram_based_create_source(). + * @condition_check: Virtual method for g_datagram_based_condition_check(). + * @condition_wait: Virtual method for + * g_datagram_based_condition_wait(). + * + * Provides an interface for socket-like objects which have datagram semantics, + * following the Berkeley sockets API. The interface methods are thin wrappers + * around the corresponding virtual methods, and no pre-processing of inputs is + * implemented — so implementations of this API must handle all functionality + * documented in the interface methods. + * + * Since: 2.48 + */ +struct _GDatagramBasedInterface +{ + GTypeInterface g_iface; + + /* Virtual table */ + gint (*receive_messages) (GDatagramBased *datagram_based, + GInputMessage *messages, + guint num_messages, + gint flags, + gint64 timeout, + GCancellable *cancellable, + GError **error); + gint (*send_messages) (GDatagramBased *datagram_based, + GOutputMessage *messages, + guint num_messages, + gint flags, + gint64 timeout, + GCancellable *cancellable, + GError **error); + + GSource *(*create_source) (GDatagramBased *datagram_based, + GIOCondition condition, + GCancellable *cancellable); + GIOCondition (*condition_check) (GDatagramBased *datagram_based, + GIOCondition condition); + gboolean (*condition_wait) (GDatagramBased *datagram_based, + GIOCondition condition, + gint64 timeout, + GCancellable *cancellable, + GError **error); +}; + +GIO_AVAILABLE_IN_2_48 +GType +g_datagram_based_get_type (void); + +GIO_AVAILABLE_IN_2_48 +gint +g_datagram_based_receive_messages (GDatagramBased *datagram_based, + GInputMessage *messages, + guint num_messages, + gint flags, + gint64 timeout, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_48 +gint +g_datagram_based_send_messages (GDatagramBased *datagram_based, + GOutputMessage *messages, + guint num_messages, + gint flags, + gint64 timeout, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_48 +GSource * +g_datagram_based_create_source (GDatagramBased *datagram_based, + GIOCondition condition, + GCancellable *cancellable); +GIO_AVAILABLE_IN_2_48 +GIOCondition +g_datagram_based_condition_check (GDatagramBased *datagram_based, + GIOCondition condition); +GIO_AVAILABLE_IN_2_48 +gboolean +g_datagram_based_condition_wait (GDatagramBased *datagram_based, + GIOCondition condition, + gint64 timeout, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + +#endif /* __G_DATAGRAM_BASED_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdatainputstream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdatainputstream.h new file mode 100644 index 0000000..e130295 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdatainputstream.h @@ -0,0 +1,182 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_DATA_INPUT_STREAM_H__ +#define __G_DATA_INPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DATA_INPUT_STREAM (g_data_input_stream_get_type ()) +#define G_DATA_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DATA_INPUT_STREAM, GDataInputStream)) +#define G_DATA_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DATA_INPUT_STREAM, GDataInputStreamClass)) +#define G_IS_DATA_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DATA_INPUT_STREAM)) +#define G_IS_DATA_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DATA_INPUT_STREAM)) +#define G_DATA_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DATA_INPUT_STREAM, GDataInputStreamClass)) + +/** + * GDataInputStream: + * + * An implementation of #GBufferedInputStream that allows for high-level + * data manipulation of arbitrary data (including binary operations). + **/ +typedef struct _GDataInputStreamClass GDataInputStreamClass; +typedef struct _GDataInputStreamPrivate GDataInputStreamPrivate; + +struct _GDataInputStream +{ + GBufferedInputStream parent_instance; + + /*< private >*/ + GDataInputStreamPrivate *priv; +}; + +struct _GDataInputStreamClass +{ + GBufferedInputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_data_input_stream_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GDataInputStream * g_data_input_stream_new (GInputStream *base_stream); + +GIO_AVAILABLE_IN_ALL +void g_data_input_stream_set_byte_order (GDataInputStream *stream, + GDataStreamByteOrder order); +GIO_AVAILABLE_IN_ALL +GDataStreamByteOrder g_data_input_stream_get_byte_order (GDataInputStream *stream); +GIO_AVAILABLE_IN_ALL +void g_data_input_stream_set_newline_type (GDataInputStream *stream, + GDataStreamNewlineType type); +GIO_AVAILABLE_IN_ALL +GDataStreamNewlineType g_data_input_stream_get_newline_type (GDataInputStream *stream); +GIO_AVAILABLE_IN_ALL +guchar g_data_input_stream_read_byte (GDataInputStream *stream, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gint16 g_data_input_stream_read_int16 (GDataInputStream *stream, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +guint16 g_data_input_stream_read_uint16 (GDataInputStream *stream, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gint32 g_data_input_stream_read_int32 (GDataInputStream *stream, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +guint32 g_data_input_stream_read_uint32 (GDataInputStream *stream, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gint64 g_data_input_stream_read_int64 (GDataInputStream *stream, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +guint64 g_data_input_stream_read_uint64 (GDataInputStream *stream, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +char * g_data_input_stream_read_line (GDataInputStream *stream, + gsize *length, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_30 +char * g_data_input_stream_read_line_utf8 (GDataInputStream *stream, + gsize *length, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_data_input_stream_read_line_async (GDataInputStream *stream, + gint io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +char * g_data_input_stream_read_line_finish (GDataInputStream *stream, + GAsyncResult *result, + gsize *length, + GError **error); +GIO_AVAILABLE_IN_2_30 +char * g_data_input_stream_read_line_finish_utf8(GDataInputStream *stream, + GAsyncResult *result, + gsize *length, + GError **error); +GIO_DEPRECATED_IN_2_56_FOR (g_data_input_stream_read_upto) +char * g_data_input_stream_read_until (GDataInputStream *stream, + const gchar *stop_chars, + gsize *length, + GCancellable *cancellable, + GError **error); +GIO_DEPRECATED_IN_2_56_FOR (g_data_input_stream_read_upto_async) +void g_data_input_stream_read_until_async (GDataInputStream *stream, + const gchar *stop_chars, + gint io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_DEPRECATED_IN_2_56_FOR (g_data_input_stream_read_upto_finish) +char * g_data_input_stream_read_until_finish (GDataInputStream *stream, + GAsyncResult *result, + gsize *length, + GError **error); + +GIO_AVAILABLE_IN_ALL +char * g_data_input_stream_read_upto (GDataInputStream *stream, + const gchar *stop_chars, + gssize stop_chars_len, + gsize *length, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_data_input_stream_read_upto_async (GDataInputStream *stream, + const gchar *stop_chars, + gssize stop_chars_len, + gint io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +char * g_data_input_stream_read_upto_finish (GDataInputStream *stream, + GAsyncResult *result, + gsize *length, + GError **error); + +G_END_DECLS + +#endif /* __G_DATA_INPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdataoutputstream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdataoutputstream.h new file mode 100644 index 0000000..a8d434a --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdataoutputstream.h @@ -0,0 +1,127 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_DATA_OUTPUT_STREAM_H__ +#define __G_DATA_OUTPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DATA_OUTPUT_STREAM (g_data_output_stream_get_type ()) +#define G_DATA_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DATA_OUTPUT_STREAM, GDataOutputStream)) +#define G_DATA_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DATA_OUTPUT_STREAM, GDataOutputStreamClass)) +#define G_IS_DATA_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DATA_OUTPUT_STREAM)) +#define G_IS_DATA_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DATA_OUTPUT_STREAM)) +#define G_DATA_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DATA_OUTPUT_STREAM, GDataOutputStreamClass)) + +/** + * GDataOutputStream: + * + * An implementation of #GBufferedOutputStream that allows for high-level + * data manipulation of arbitrary data (including binary operations). + **/ +typedef struct _GDataOutputStream GDataOutputStream; +typedef struct _GDataOutputStreamClass GDataOutputStreamClass; +typedef struct _GDataOutputStreamPrivate GDataOutputStreamPrivate; + +struct _GDataOutputStream +{ + GFilterOutputStream parent_instance; + + /*< private >*/ + GDataOutputStreamPrivate *priv; +}; + +struct _GDataOutputStreamClass +{ + GFilterOutputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + + +GIO_AVAILABLE_IN_ALL +GType g_data_output_stream_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GDataOutputStream * g_data_output_stream_new (GOutputStream *base_stream); + +GIO_AVAILABLE_IN_ALL +void g_data_output_stream_set_byte_order (GDataOutputStream *stream, + GDataStreamByteOrder order); +GIO_AVAILABLE_IN_ALL +GDataStreamByteOrder g_data_output_stream_get_byte_order (GDataOutputStream *stream); + +GIO_AVAILABLE_IN_ALL +gboolean g_data_output_stream_put_byte (GDataOutputStream *stream, + guchar data, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_data_output_stream_put_int16 (GDataOutputStream *stream, + gint16 data, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_data_output_stream_put_uint16 (GDataOutputStream *stream, + guint16 data, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_data_output_stream_put_int32 (GDataOutputStream *stream, + gint32 data, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_data_output_stream_put_uint32 (GDataOutputStream *stream, + guint32 data, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_data_output_stream_put_int64 (GDataOutputStream *stream, + gint64 data, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_data_output_stream_put_uint64 (GDataOutputStream *stream, + guint64 data, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_data_output_stream_put_string (GDataOutputStream *stream, + const char *str, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + +#endif /* __G_DATA_OUTPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusactiongroup.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusactiongroup.h new file mode 100644 index 0000000..84868f0 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusactiongroup.h @@ -0,0 +1,56 @@ +/* + * Copyright © 2010 Codethink Limited + * Copyright © 2011 Canonical Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + */ + +#ifndef __G_DBUS_ACTION_GROUP_H__ +#define __G_DBUS_ACTION_GROUP_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include "giotypes.h" + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_ACTION_GROUP (g_dbus_action_group_get_type ()) +#define G_DBUS_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_DBUS_ACTION_GROUP, GDBusActionGroup)) +#define G_DBUS_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_DBUS_ACTION_GROUP, GDBusActionGroupClass)) +#define G_IS_DBUS_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_DBUS_ACTION_GROUP)) +#define G_IS_DBUS_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_DBUS_ACTION_GROUP)) +#define G_DBUS_ACTION_GROUP_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_DBUS_ACTION_GROUP, GDBusActionGroupClass)) + +GIO_AVAILABLE_IN_ALL +GType g_dbus_action_group_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_32 +GDBusActionGroup * g_dbus_action_group_get (GDBusConnection *connection, + const gchar *bus_name, + const gchar *object_path); + +G_END_DECLS + +#endif /* __G_DBUS_ACTION_GROUP_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusaddress.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusaddress.h new file mode 100644 index 0000000..09734ad --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusaddress.h @@ -0,0 +1,67 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_ADDRESS_H__ +#define __G_DBUS_ADDRESS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +GIO_AVAILABLE_IN_2_36 +gchar *g_dbus_address_escape_value (const gchar *string); + +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_is_address (const gchar *string); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_is_supported_address (const gchar *string, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_dbus_address_get_stream (const gchar *address, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_ALL +GIOStream *g_dbus_address_get_stream_finish (GAsyncResult *res, + gchar **out_guid, + GError **error); + +GIO_AVAILABLE_IN_ALL +GIOStream *g_dbus_address_get_stream_sync (const gchar *address, + gchar **out_guid, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +gchar *g_dbus_address_get_for_bus_sync (GBusType bus_type, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + +#endif /* __G_DBUS_ADDRESS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusauthobserver.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusauthobserver.h new file mode 100644 index 0000000..715095d --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusauthobserver.h @@ -0,0 +1,53 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_AUTH_OBSERVER_H__ +#define __G_DBUS_AUTH_OBSERVER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_AUTH_OBSERVER (g_dbus_auth_observer_get_type ()) +#define G_DBUS_AUTH_OBSERVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_AUTH_OBSERVER, GDBusAuthObserver)) +#define G_IS_DBUS_AUTH_OBSERVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_AUTH_OBSERVER)) + +GIO_AVAILABLE_IN_ALL +GType g_dbus_auth_observer_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GDBusAuthObserver *g_dbus_auth_observer_new (void); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_auth_observer_authorize_authenticated_peer (GDBusAuthObserver *observer, + GIOStream *stream, + GCredentials *credentials); + +GIO_AVAILABLE_IN_2_34 +gboolean g_dbus_auth_observer_allow_mechanism (GDBusAuthObserver *observer, + const gchar *mechanism); + +G_END_DECLS + +#endif /* _G_DBUS_AUTH_OBSERVER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusconnection.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusconnection.h new file mode 100644 index 0000000..3a8cb9d --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusconnection.h @@ -0,0 +1,691 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_CONNECTION_H__ +#define __G_DBUS_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_CONNECTION (g_dbus_connection_get_type ()) +#define G_DBUS_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_CONNECTION, GDBusConnection)) +#define G_IS_DBUS_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_CONNECTION)) + +GIO_AVAILABLE_IN_ALL +GType g_dbus_connection_get_type (void) G_GNUC_CONST; + +/* ---------------------------------------------------------------------------------------------------- */ + +GIO_AVAILABLE_IN_ALL +void g_bus_get (GBusType bus_type, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GDBusConnection *g_bus_get_finish (GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GDBusConnection *g_bus_get_sync (GBusType bus_type, + GCancellable *cancellable, + GError **error); + +/* ---------------------------------------------------------------------------------------------------- */ + +GIO_AVAILABLE_IN_ALL +void g_dbus_connection_new (GIOStream *stream, + const gchar *guid, + GDBusConnectionFlags flags, + GDBusAuthObserver *observer, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_connection_new_finish (GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_connection_new_sync (GIOStream *stream, + const gchar *guid, + GDBusConnectionFlags flags, + GDBusAuthObserver *observer, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_dbus_connection_new_for_address (const gchar *address, + GDBusConnectionFlags flags, + GDBusAuthObserver *observer, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_connection_new_for_address_finish (GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_connection_new_for_address_sync (const gchar *address, + GDBusConnectionFlags flags, + GDBusAuthObserver *observer, + GCancellable *cancellable, + GError **error); + +/* ---------------------------------------------------------------------------------------------------- */ + +GIO_AVAILABLE_IN_ALL +void g_dbus_connection_start_message_processing (GDBusConnection *connection); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_connection_is_closed (GDBusConnection *connection); +GIO_AVAILABLE_IN_ALL +GIOStream *g_dbus_connection_get_stream (GDBusConnection *connection); +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_connection_get_guid (GDBusConnection *connection); +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_connection_get_unique_name (GDBusConnection *connection); +GIO_AVAILABLE_IN_ALL +GCredentials *g_dbus_connection_get_peer_credentials (GDBusConnection *connection); + +GIO_AVAILABLE_IN_2_34 +guint32 g_dbus_connection_get_last_serial (GDBusConnection *connection); + +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_connection_get_exit_on_close (GDBusConnection *connection); +GIO_AVAILABLE_IN_ALL +void g_dbus_connection_set_exit_on_close (GDBusConnection *connection, + gboolean exit_on_close); +GIO_AVAILABLE_IN_ALL +GDBusCapabilityFlags g_dbus_connection_get_capabilities (GDBusConnection *connection); +GIO_AVAILABLE_IN_2_60 +GDBusConnectionFlags g_dbus_connection_get_flags (GDBusConnection *connection); + +/* ---------------------------------------------------------------------------------------------------- */ + +GIO_AVAILABLE_IN_ALL +void g_dbus_connection_close (GDBusConnection *connection, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_connection_close_finish (GDBusConnection *connection, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_connection_close_sync (GDBusConnection *connection, + GCancellable *cancellable, + GError **error); + +/* ---------------------------------------------------------------------------------------------------- */ + +GIO_AVAILABLE_IN_ALL +void g_dbus_connection_flush (GDBusConnection *connection, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_connection_flush_finish (GDBusConnection *connection, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_connection_flush_sync (GDBusConnection *connection, + GCancellable *cancellable, + GError **error); + +/* ---------------------------------------------------------------------------------------------------- */ + +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_connection_send_message (GDBusConnection *connection, + GDBusMessage *message, + GDBusSendMessageFlags flags, + volatile guint32 *out_serial, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_dbus_connection_send_message_with_reply (GDBusConnection *connection, + GDBusMessage *message, + GDBusSendMessageFlags flags, + gint timeout_msec, + volatile guint32 *out_serial, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_connection_send_message_with_reply_finish (GDBusConnection *connection, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_connection_send_message_with_reply_sync (GDBusConnection *connection, + GDBusMessage *message, + GDBusSendMessageFlags flags, + gint timeout_msec, + volatile guint32 *out_serial, + GCancellable *cancellable, + GError **error); + +/* ---------------------------------------------------------------------------------------------------- */ + +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_connection_emit_signal (GDBusConnection *connection, + const gchar *destination_bus_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *signal_name, + GVariant *parameters, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_dbus_connection_call (GDBusConnection *connection, + const gchar *bus_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + const GVariantType *reply_type, + GDBusCallFlags flags, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GVariant *g_dbus_connection_call_finish (GDBusConnection *connection, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GVariant *g_dbus_connection_call_sync (GDBusConnection *connection, + const gchar *bus_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + const GVariantType *reply_type, + GDBusCallFlags flags, + gint timeout_msec, + GCancellable *cancellable, + GError **error); + +#ifdef G_OS_UNIX + +GIO_AVAILABLE_IN_2_30 +void g_dbus_connection_call_with_unix_fd_list (GDBusConnection *connection, + const gchar *bus_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + const GVariantType *reply_type, + GDBusCallFlags flags, + gint timeout_msec, + GUnixFDList *fd_list, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_30 +GVariant *g_dbus_connection_call_with_unix_fd_list_finish (GDBusConnection *connection, + GUnixFDList **out_fd_list, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_2_30 +GVariant *g_dbus_connection_call_with_unix_fd_list_sync (GDBusConnection *connection, + const gchar *bus_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + const GVariantType *reply_type, + GDBusCallFlags flags, + gint timeout_msec, + GUnixFDList *fd_list, + GUnixFDList **out_fd_list, + GCancellable *cancellable, + GError **error); + +#endif /* G_OS_UNIX */ + +/* ---------------------------------------------------------------------------------------------------- */ + + +/** + * GDBusInterfaceMethodCallFunc: + * @connection: A #GDBusConnection. + * @sender: The unique bus name of the remote caller. + * @object_path: The object path that the method was invoked on. + * @interface_name: The D-Bus interface name the method was invoked on. + * @method_name: The name of the method that was invoked. + * @parameters: A #GVariant tuple with parameters. + * @invocation: (transfer full): A #GDBusMethodInvocation object that must be used to return a value or error. + * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object(). + * + * The type of the @method_call function in #GDBusInterfaceVTable. + * + * Since: 2.26 + */ +typedef void (*GDBusInterfaceMethodCallFunc) (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation, + gpointer user_data); + +/** + * GDBusInterfaceGetPropertyFunc: + * @connection: A #GDBusConnection. + * @sender: The unique bus name of the remote caller. + * @object_path: The object path that the method was invoked on. + * @interface_name: The D-Bus interface name for the property. + * @property_name: The name of the property to get the value of. + * @error: Return location for error. + * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object(). + * + * The type of the @get_property function in #GDBusInterfaceVTable. + * + * Returns: A #GVariant with the value for @property_name or %NULL if + * @error is set. If the returned #GVariant is floating, it is + * consumed - otherwise its reference count is decreased by one. + * + * Since: 2.26 + */ +typedef GVariant *(*GDBusInterfaceGetPropertyFunc) (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error, + gpointer user_data); + +/** + * GDBusInterfaceSetPropertyFunc: + * @connection: A #GDBusConnection. + * @sender: The unique bus name of the remote caller. + * @object_path: The object path that the method was invoked on. + * @interface_name: The D-Bus interface name for the property. + * @property_name: The name of the property to get the value of. + * @value: The value to set the property to. + * @error: Return location for error. + * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object(). + * + * The type of the @set_property function in #GDBusInterfaceVTable. + * + * Returns: %TRUE if the property was set to @value, %FALSE if @error is set. + * + * Since: 2.26 + */ +typedef gboolean (*GDBusInterfaceSetPropertyFunc) (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error, + gpointer user_data); + +/** + * GDBusInterfaceVTable: + * @method_call: Function for handling incoming method calls. + * @get_property: Function for getting a property. + * @set_property: Function for setting a property. + * + * Virtual table for handling properties and method calls for a D-Bus + * interface. + * + * Since 2.38, if you want to handle getting/setting D-Bus properties + * asynchronously, give %NULL as your get_property() or set_property() + * function. The D-Bus call will be directed to your @method_call function, + * with the provided @interface_name set to "org.freedesktop.DBus.Properties". + * + * Ownership of the #GDBusMethodInvocation object passed to the + * method_call() function is transferred to your handler; you must + * call one of the methods of #GDBusMethodInvocation to return a reply + * (possibly empty), or an error. These functions also take ownership + * of the passed-in invocation object, so unless the invocation + * object has otherwise been referenced, it will be then be freed. + * Calling one of these functions may be done within your + * method_call() implementation but it also can be done at a later + * point to handle the method asynchronously. + * + * The usual checks on the validity of the calls is performed. For + * `Get` calls, an error is automatically returned if the property does + * not exist or the permissions do not allow access. The same checks are + * performed for `Set` calls, and the provided value is also checked for + * being the correct type. + * + * For both `Get` and `Set` calls, the #GDBusMethodInvocation + * passed to the @method_call handler can be queried with + * g_dbus_method_invocation_get_property_info() to get a pointer + * to the #GDBusPropertyInfo of the property. + * + * If you have readable properties specified in your interface info, + * you must ensure that you either provide a non-%NULL @get_property() + * function or provide implementations of both the `Get` and `GetAll` + * methods on org.freedesktop.DBus.Properties interface in your @method_call + * function. Note that the required return type of the `Get` call is + * `(v)`, not the type of the property. `GetAll` expects a return value + * of type `a{sv}`. + * + * If you have writable properties specified in your interface info, + * you must ensure that you either provide a non-%NULL @set_property() + * function or provide an implementation of the `Set` call. If implementing + * the call, you must return the value of type %G_VARIANT_TYPE_UNIT. + * + * Since: 2.26 + */ +struct _GDBusInterfaceVTable +{ + GDBusInterfaceMethodCallFunc method_call; + GDBusInterfaceGetPropertyFunc get_property; + GDBusInterfaceSetPropertyFunc set_property; + + /*< private >*/ + /* Padding for future expansion - also remember to update + * gdbusconnection.c:_g_dbus_interface_vtable_copy() when + * changing this. + */ + gpointer padding[8]; +}; + +GIO_AVAILABLE_IN_ALL +guint g_dbus_connection_register_object (GDBusConnection *connection, + const gchar *object_path, + GDBusInterfaceInfo *interface_info, + const GDBusInterfaceVTable *vtable, + gpointer user_data, + GDestroyNotify user_data_free_func, + GError **error); +GIO_AVAILABLE_IN_2_46 +guint g_dbus_connection_register_object_with_closures (GDBusConnection *connection, + const gchar *object_path, + GDBusInterfaceInfo *interface_info, + GClosure *method_call_closure, + GClosure *get_property_closure, + GClosure *set_property_closure, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_connection_unregister_object (GDBusConnection *connection, + guint registration_id); + +/* ---------------------------------------------------------------------------------------------------- */ + +/** + * GDBusSubtreeEnumerateFunc: + * @connection: A #GDBusConnection. + * @sender: The unique bus name of the remote caller. + * @object_path: The object path that was registered with g_dbus_connection_register_subtree(). + * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree(). + * + * The type of the @enumerate function in #GDBusSubtreeVTable. + * + * This function is called when generating introspection data and also + * when preparing to dispatch incoming messages in the event that the + * %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not + * specified (ie: to verify that the object path is valid). + * + * Hierarchies are not supported; the items that you return should not + * contain the `/` character. + * + * The return value will be freed with g_strfreev(). + * + * Returns: (array zero-terminated=1) (transfer full): A newly allocated array of strings for node names that are children of @object_path. + * + * Since: 2.26 + */ +typedef gchar** (*GDBusSubtreeEnumerateFunc) (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + gpointer user_data); + +/** + * GDBusSubtreeIntrospectFunc: + * @connection: A #GDBusConnection. + * @sender: The unique bus name of the remote caller. + * @object_path: The object path that was registered with g_dbus_connection_register_subtree(). + * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree. + * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree(). + * + * The type of the @introspect function in #GDBusSubtreeVTable. + * + * Subtrees are flat. @node, if non-%NULL, is always exactly one + * segment of the object path (ie: it never contains a slash). + * + * This function should return %NULL to indicate that there is no object + * at this node. + * + * If this function returns non-%NULL, the return value is expected to + * be a %NULL-terminated array of pointers to #GDBusInterfaceInfo + * structures describing the interfaces implemented by @node. This + * array will have g_dbus_interface_info_unref() called on each item + * before being freed with g_free(). + * + * The difference between returning %NULL and an array containing zero + * items is that the standard DBus interfaces will returned to the + * remote introspector in the empty array case, but not in the %NULL + * case. + * + * Returns: (array zero-terminated=1) (nullable) (transfer full): A %NULL-terminated array of pointers to #GDBusInterfaceInfo, or %NULL. + * + * Since: 2.26 + */ +typedef GDBusInterfaceInfo ** (*GDBusSubtreeIntrospectFunc) (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *node, + gpointer user_data); + +/** + * GDBusSubtreeDispatchFunc: + * @connection: A #GDBusConnection. + * @sender: The unique bus name of the remote caller. + * @object_path: The object path that was registered with g_dbus_connection_register_subtree(). + * @interface_name: The D-Bus interface name that the method call or property access is for. + * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree. + * @out_user_data: (nullable) (not optional): Return location for user data to pass to functions in the returned #GDBusInterfaceVTable. + * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree(). + * + * The type of the @dispatch function in #GDBusSubtreeVTable. + * + * Subtrees are flat. @node, if non-%NULL, is always exactly one + * segment of the object path (ie: it never contains a slash). + * + * Returns: (nullable): A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods. + * + * Since: 2.26 + */ +typedef const GDBusInterfaceVTable * (*GDBusSubtreeDispatchFunc) (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *node, + gpointer *out_user_data, + gpointer user_data); + +/** + * GDBusSubtreeVTable: + * @enumerate: Function for enumerating child nodes. + * @introspect: Function for introspecting a child node. + * @dispatch: Function for dispatching a remote call on a child node. + * + * Virtual table for handling subtrees registered with g_dbus_connection_register_subtree(). + * + * Since: 2.26 + */ +struct _GDBusSubtreeVTable +{ + GDBusSubtreeEnumerateFunc enumerate; + GDBusSubtreeIntrospectFunc introspect; + GDBusSubtreeDispatchFunc dispatch; + + /*< private >*/ + /* Padding for future expansion - also remember to update + * gdbusconnection.c:_g_dbus_subtree_vtable_copy() when + * changing this. + */ + gpointer padding[8]; +}; + +GIO_AVAILABLE_IN_ALL +guint g_dbus_connection_register_subtree (GDBusConnection *connection, + const gchar *object_path, + const GDBusSubtreeVTable *vtable, + GDBusSubtreeFlags flags, + gpointer user_data, + GDestroyNotify user_data_free_func, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_connection_unregister_subtree (GDBusConnection *connection, + guint registration_id); + +/* ---------------------------------------------------------------------------------------------------- */ + +/** + * GDBusSignalCallback: + * @connection: A #GDBusConnection. + * @sender_name: (nullable): The unique bus name of the sender of the signal, + or %NULL on a peer-to-peer D-Bus connection. + * @object_path: The object path that the signal was emitted on. + * @interface_name: The name of the interface. + * @signal_name: The name of the signal. + * @parameters: A #GVariant tuple with parameters for the signal. + * @user_data: User data passed when subscribing to the signal. + * + * Signature for callback function used in g_dbus_connection_signal_subscribe(). + * + * Since: 2.26 + */ +typedef void (*GDBusSignalCallback) (GDBusConnection *connection, + const gchar *sender_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *signal_name, + GVariant *parameters, + gpointer user_data); + +GIO_AVAILABLE_IN_ALL +guint g_dbus_connection_signal_subscribe (GDBusConnection *connection, + const gchar *sender, + const gchar *interface_name, + const gchar *member, + const gchar *object_path, + const gchar *arg0, + GDBusSignalFlags flags, + GDBusSignalCallback callback, + gpointer user_data, + GDestroyNotify user_data_free_func); +GIO_AVAILABLE_IN_ALL +void g_dbus_connection_signal_unsubscribe (GDBusConnection *connection, + guint subscription_id); + +/* ---------------------------------------------------------------------------------------------------- */ + +/** + * GDBusMessageFilterFunction: + * @connection: (transfer none): A #GDBusConnection. + * @message: (transfer full): A locked #GDBusMessage that the filter function takes ownership of. + * @incoming: %TRUE if it is a message received from the other peer, %FALSE if it is + * a message to be sent to the other peer. + * @user_data: User data passed when adding the filter. + * + * Signature for function used in g_dbus_connection_add_filter(). + * + * A filter function is passed a #GDBusMessage and expected to return + * a #GDBusMessage too. Passive filter functions that don't modify the + * message can simply return the @message object: + * |[ + * static GDBusMessage * + * passive_filter (GDBusConnection *connection + * GDBusMessage *message, + * gboolean incoming, + * gpointer user_data) + * { + * // inspect @message + * return message; + * } + * ]| + * Filter functions that wants to drop a message can simply return %NULL: + * |[ + * static GDBusMessage * + * drop_filter (GDBusConnection *connection + * GDBusMessage *message, + * gboolean incoming, + * gpointer user_data) + * { + * if (should_drop_message) + * { + * g_object_unref (message); + * message = NULL; + * } + * return message; + * } + * ]| + * Finally, a filter function may modify a message by copying it: + * |[ + * static GDBusMessage * + * modifying_filter (GDBusConnection *connection + * GDBusMessage *message, + * gboolean incoming, + * gpointer user_data) + * { + * GDBusMessage *copy; + * GError *error; + * + * error = NULL; + * copy = g_dbus_message_copy (message, &error); + * // handle @error being set + * g_object_unref (message); + * + * // modify @copy + * + * return copy; + * } + * ]| + * If the returned #GDBusMessage is different from @message and cannot + * be sent on @connection (it could use features, such as file + * descriptors, not compatible with @connection), then a warning is + * logged to standard error. Applications can + * check this ahead of time using g_dbus_message_to_blob() passing a + * #GDBusCapabilityFlags value obtained from @connection. + * + * Returns: (transfer full) (nullable): A #GDBusMessage that will be freed with + * g_object_unref() or %NULL to drop the message. Passive filter + * functions can simply return the passed @message object. + * + * Since: 2.26 + */ +typedef GDBusMessage *(*GDBusMessageFilterFunction) (GDBusConnection *connection, + GDBusMessage *message, + gboolean incoming, + gpointer user_data); + +GIO_AVAILABLE_IN_ALL +guint g_dbus_connection_add_filter (GDBusConnection *connection, + GDBusMessageFilterFunction filter_function, + gpointer user_data, + GDestroyNotify user_data_free_func); + +GIO_AVAILABLE_IN_ALL +void g_dbus_connection_remove_filter (GDBusConnection *connection, + guint filter_id); + +/* ---------------------------------------------------------------------------------------------------- */ + + +G_END_DECLS + +#endif /* __G_DBUS_CONNECTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbuserror.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbuserror.h new file mode 100644 index 0000000..6a84934 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbuserror.h @@ -0,0 +1,111 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_ERROR_H__ +#define __G_DBUS_ERROR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * G_DBUS_ERROR: + * + * Error domain for errors generated by a remote message bus. Errors + * in this domain will be from the #GDBusError enumeration. See + * #GError for more information on error domains. + * + * Note that this error domain is intended only for + * returning errors from a remote message bus process. Errors + * generated locally in-process by e.g. #GDBusConnection should use the + * %G_IO_ERROR domain. + * + * Since: 2.26 + */ +#define G_DBUS_ERROR g_dbus_error_quark() + +GIO_AVAILABLE_IN_ALL +GQuark g_dbus_error_quark (void); + +/* Used by applications to check, get and strip the D-Bus error name */ +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_error_is_remote_error (const GError *error); +GIO_AVAILABLE_IN_ALL +gchar *g_dbus_error_get_remote_error (const GError *error); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_error_strip_remote_error (GError *error); + +/** + * GDBusErrorEntry: + * @error_code: An error code. + * @dbus_error_name: The D-Bus error name to associate with @error_code. + * + * Struct used in g_dbus_error_register_error_domain(). + * + * Since: 2.26 + */ +struct _GDBusErrorEntry +{ + gint error_code; + const gchar *dbus_error_name; +}; + +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_error_register_error (GQuark error_domain, + gint error_code, + const gchar *dbus_error_name); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_error_unregister_error (GQuark error_domain, + gint error_code, + const gchar *dbus_error_name); +GIO_AVAILABLE_IN_ALL +void g_dbus_error_register_error_domain (const gchar *error_domain_quark_name, + volatile gsize *quark_volatile, + const GDBusErrorEntry *entries, + guint num_entries); + +/* Only used by object mappings to map back and forth to GError */ +GIO_AVAILABLE_IN_ALL +GError *g_dbus_error_new_for_dbus_error (const gchar *dbus_error_name, + const gchar *dbus_error_message); +GIO_AVAILABLE_IN_ALL +void g_dbus_error_set_dbus_error (GError **error, + const gchar *dbus_error_name, + const gchar *dbus_error_message, + const gchar *format, + ...) G_GNUC_PRINTF(4, 5); +GIO_AVAILABLE_IN_ALL +void g_dbus_error_set_dbus_error_valist (GError **error, + const gchar *dbus_error_name, + const gchar *dbus_error_message, + const gchar *format, + va_list var_args) G_GNUC_PRINTF(4, 0); +GIO_AVAILABLE_IN_ALL +gchar *g_dbus_error_encode_gerror (const GError *error); + +G_END_DECLS + +#endif /* __G_DBUS_ERROR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusinterface.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusinterface.h new file mode 100644 index 0000000..838a54e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusinterface.h @@ -0,0 +1,83 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_INTERFACE_H__ +#define __G_DBUS_INTERFACE_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_INTERFACE (g_dbus_interface_get_type()) +#define G_DBUS_INTERFACE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_INTERFACE, GDBusInterface)) +#define G_IS_DBUS_INTERFACE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_INTERFACE)) +#define G_DBUS_INTERFACE_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), G_TYPE_DBUS_INTERFACE, GDBusInterfaceIface)) + +/** + * GDBusInterface: + * + * Base type for D-Bus interfaces. + * + * Since: 2.30 + */ + +typedef struct _GDBusInterfaceIface GDBusInterfaceIface; + +/** + * GDBusInterfaceIface: + * @parent_iface: The parent interface. + * @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_get_info(). + * @get_object: Gets the enclosing #GDBusObject. See g_dbus_interface_get_object(). + * @set_object: Sets the enclosing #GDBusObject. See g_dbus_interface_set_object(). + * @dup_object: Gets a reference to the enclosing #GDBusObject. See g_dbus_interface_dup_object(). Added in 2.32. + * + * Base type for D-Bus interfaces. + * + * Since: 2.30 + */ +struct _GDBusInterfaceIface +{ + GTypeInterface parent_iface; + + /* Virtual Functions */ + GDBusInterfaceInfo *(*get_info) (GDBusInterface *interface_); + GDBusObject *(*get_object) (GDBusInterface *interface_); + void (*set_object) (GDBusInterface *interface_, + GDBusObject *object); + GDBusObject *(*dup_object) (GDBusInterface *interface_); +}; + +GIO_AVAILABLE_IN_ALL +GType g_dbus_interface_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GDBusInterfaceInfo *g_dbus_interface_get_info (GDBusInterface *interface_); +GIO_AVAILABLE_IN_ALL +GDBusObject *g_dbus_interface_get_object (GDBusInterface *interface_); +GIO_AVAILABLE_IN_ALL +void g_dbus_interface_set_object (GDBusInterface *interface_, + GDBusObject *object); +GIO_AVAILABLE_IN_2_32 +GDBusObject *g_dbus_interface_dup_object (GDBusInterface *interface_); + +G_END_DECLS + +#endif /* __G_DBUS_INTERFACE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusinterfaceskeleton.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusinterfaceskeleton.h new file mode 100644 index 0000000..244ee0e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusinterfaceskeleton.h @@ -0,0 +1,129 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_INTERFACE_SKELETON_H__ +#define __G_DBUS_INTERFACE_SKELETON_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_INTERFACE_SKELETON (g_dbus_interface_skeleton_get_type ()) +#define G_DBUS_INTERFACE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_INTERFACE_SKELETON, GDBusInterfaceSkeleton)) +#define G_DBUS_INTERFACE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_INTERFACE_SKELETON, GDBusInterfaceSkeletonClass)) +#define G_DBUS_INTERFACE_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_INTERFACE_SKELETON, GDBusInterfaceSkeletonClass)) +#define G_IS_DBUS_INTERFACE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_INTERFACE_SKELETON)) +#define G_IS_DBUS_INTERFACE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_INTERFACE_SKELETON)) + +typedef struct _GDBusInterfaceSkeletonClass GDBusInterfaceSkeletonClass; +typedef struct _GDBusInterfaceSkeletonPrivate GDBusInterfaceSkeletonPrivate; + +/** + * GDBusInterfaceSkeleton: + * + * The #GDBusInterfaceSkeleton structure contains private data and should + * only be accessed using the provided API. + * + * Since: 2.30 + */ +struct _GDBusInterfaceSkeleton +{ + /*< private >*/ + GObject parent_instance; + GDBusInterfaceSkeletonPrivate *priv; +}; + +/** + * GDBusInterfaceSkeletonClass: + * @parent_class: The parent class. + * @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_skeleton_get_info() for details. + * @get_vtable: Returns a #GDBusInterfaceVTable. See g_dbus_interface_skeleton_get_vtable() for details. + * @get_properties: Returns a #GVariant with all properties. See g_dbus_interface_skeleton_get_properties(). + * @flush: Emits outstanding changes, if any. See g_dbus_interface_skeleton_flush(). + * @g_authorize_method: Signal class handler for the #GDBusInterfaceSkeleton::g-authorize-method signal. + * + * Class structure for #GDBusInterfaceSkeleton. + * + * Since: 2.30 + */ +struct _GDBusInterfaceSkeletonClass +{ + GObjectClass parent_class; + + /* Virtual Functions */ + GDBusInterfaceInfo *(*get_info) (GDBusInterfaceSkeleton *interface_); + GDBusInterfaceVTable *(*get_vtable) (GDBusInterfaceSkeleton *interface_); + GVariant *(*get_properties) (GDBusInterfaceSkeleton *interface_); + void (*flush) (GDBusInterfaceSkeleton *interface_); + + /*< private >*/ + gpointer vfunc_padding[8]; + /*< public >*/ + + /* Signals */ + gboolean (*g_authorize_method) (GDBusInterfaceSkeleton *interface_, + GDBusMethodInvocation *invocation); + + /*< private >*/ + gpointer signal_padding[8]; +}; + +GIO_AVAILABLE_IN_ALL +GType g_dbus_interface_skeleton_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GDBusInterfaceSkeletonFlags g_dbus_interface_skeleton_get_flags (GDBusInterfaceSkeleton *interface_); +GIO_AVAILABLE_IN_ALL +void g_dbus_interface_skeleton_set_flags (GDBusInterfaceSkeleton *interface_, + GDBusInterfaceSkeletonFlags flags); +GIO_AVAILABLE_IN_ALL +GDBusInterfaceInfo *g_dbus_interface_skeleton_get_info (GDBusInterfaceSkeleton *interface_); +GIO_AVAILABLE_IN_ALL +GDBusInterfaceVTable *g_dbus_interface_skeleton_get_vtable (GDBusInterfaceSkeleton *interface_); +GIO_AVAILABLE_IN_ALL +GVariant *g_dbus_interface_skeleton_get_properties (GDBusInterfaceSkeleton *interface_); +GIO_AVAILABLE_IN_ALL +void g_dbus_interface_skeleton_flush (GDBusInterfaceSkeleton *interface_); + +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_interface_skeleton_export (GDBusInterfaceSkeleton *interface_, + GDBusConnection *connection, + const gchar *object_path, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_dbus_interface_skeleton_unexport (GDBusInterfaceSkeleton *interface_); +GIO_AVAILABLE_IN_ALL +void g_dbus_interface_skeleton_unexport_from_connection (GDBusInterfaceSkeleton *interface_, + GDBusConnection *connection); + +GIO_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_interface_skeleton_get_connection (GDBusInterfaceSkeleton *interface_); +GIO_AVAILABLE_IN_ALL +GList *g_dbus_interface_skeleton_get_connections (GDBusInterfaceSkeleton *interface_); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_interface_skeleton_has_connection (GDBusInterfaceSkeleton *interface_, + GDBusConnection *connection); +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_interface_skeleton_get_object_path (GDBusInterfaceSkeleton *interface_); + +G_END_DECLS + +#endif /* __G_DBUS_INTERFACE_SKELETON_H */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusintrospection.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusintrospection.h new file mode 100644 index 0000000..53f4685 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusintrospection.h @@ -0,0 +1,327 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_INTROSPECTION_H__ +#define __G_DBUS_INTROSPECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * GDBusAnnotationInfo: + * @ref_count: The reference count or -1 if statically allocated. + * @key: The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated". + * @value: The value of the annotation. + * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. + * + * Information about an annotation. + * + * Since: 2.26 + */ +struct _GDBusAnnotationInfo +{ + /*< public >*/ + gint ref_count; /* (atomic) */ + gchar *key; + gchar *value; + GDBusAnnotationInfo **annotations; +}; + +/** + * GDBusArgInfo: + * @ref_count: The reference count or -1 if statically allocated. + * @name: Name of the argument, e.g. @unix_user_id. + * @signature: D-Bus signature of the argument (a single complete type). + * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. + * + * Information about an argument for a method or a signal. + * + * Since: 2.26 + */ +struct _GDBusArgInfo +{ + /*< public >*/ + gint ref_count; /* (atomic) */ + gchar *name; + gchar *signature; + GDBusAnnotationInfo **annotations; +}; + +/** + * GDBusMethodInfo: + * @ref_count: The reference count or -1 if statically allocated. + * @name: The name of the D-Bus method, e.g. @RequestName. + * @in_args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no in arguments. + * @out_args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no out arguments. + * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. + * + * Information about a method on an D-Bus interface. + * + * Since: 2.26 + */ +struct _GDBusMethodInfo +{ + /*< public >*/ + gint ref_count; /* (atomic) */ + gchar *name; + GDBusArgInfo **in_args; + GDBusArgInfo **out_args; + GDBusAnnotationInfo **annotations; +}; + +/** + * GDBusSignalInfo: + * @ref_count: The reference count or -1 if statically allocated. + * @name: The name of the D-Bus signal, e.g. "NameOwnerChanged". + * @args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments. + * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. + * + * Information about a signal on a D-Bus interface. + * + * Since: 2.26 + */ +struct _GDBusSignalInfo +{ + /*< public >*/ + gint ref_count; /* (atomic) */ + gchar *name; + GDBusArgInfo **args; + GDBusAnnotationInfo **annotations; +}; + +/** + * GDBusPropertyInfo: + * @ref_count: The reference count or -1 if statically allocated. + * @name: The name of the D-Bus property, e.g. "SupportedFilesystems". + * @signature: The D-Bus signature of the property (a single complete type). + * @flags: Access control flags for the property. + * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. + * + * Information about a D-Bus property on a D-Bus interface. + * + * Since: 2.26 + */ +struct _GDBusPropertyInfo +{ + /*< public >*/ + gint ref_count; /* (atomic) */ + gchar *name; + gchar *signature; + GDBusPropertyInfoFlags flags; + GDBusAnnotationInfo **annotations; +}; + +/** + * GDBusInterfaceInfo: + * @ref_count: The reference count or -1 if statically allocated. + * @name: The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties". + * @methods: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods. + * @signals: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals. + * @properties: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties. + * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. + * + * Information about a D-Bus interface. + * + * Since: 2.26 + */ +struct _GDBusInterfaceInfo +{ + /*< public >*/ + gint ref_count; /* (atomic) */ + gchar *name; + GDBusMethodInfo **methods; + GDBusSignalInfo **signals; + GDBusPropertyInfo **properties; + GDBusAnnotationInfo **annotations; +}; + +/** + * GDBusNodeInfo: + * @ref_count: The reference count or -1 if statically allocated. + * @path: The path of the node or %NULL if omitted. Note that this may be a relative path. See the D-Bus specification for more details. + * @interfaces: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces. + * @nodes: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes. + * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. + * + * Information about nodes in a remote object hierarchy. + * + * Since: 2.26 + */ +struct _GDBusNodeInfo +{ + /*< public >*/ + gint ref_count; /* (atomic) */ + gchar *path; + GDBusInterfaceInfo **interfaces; + GDBusNodeInfo **nodes; + GDBusAnnotationInfo **annotations; +}; + +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_annotation_info_lookup (GDBusAnnotationInfo **annotations, + const gchar *name); +GIO_AVAILABLE_IN_ALL +GDBusMethodInfo *g_dbus_interface_info_lookup_method (GDBusInterfaceInfo *info, + const gchar *name); +GIO_AVAILABLE_IN_ALL +GDBusSignalInfo *g_dbus_interface_info_lookup_signal (GDBusInterfaceInfo *info, + const gchar *name); +GIO_AVAILABLE_IN_ALL +GDBusPropertyInfo *g_dbus_interface_info_lookup_property (GDBusInterfaceInfo *info, + const gchar *name); +GIO_AVAILABLE_IN_ALL +void g_dbus_interface_info_cache_build (GDBusInterfaceInfo *info); +GIO_AVAILABLE_IN_ALL +void g_dbus_interface_info_cache_release (GDBusInterfaceInfo *info); + +GIO_AVAILABLE_IN_ALL +void g_dbus_interface_info_generate_xml (GDBusInterfaceInfo *info, + guint indent, + GString *string_builder); + +GIO_AVAILABLE_IN_ALL +GDBusNodeInfo *g_dbus_node_info_new_for_xml (const gchar *xml_data, + GError **error); +GIO_AVAILABLE_IN_ALL +GDBusInterfaceInfo *g_dbus_node_info_lookup_interface (GDBusNodeInfo *info, + const gchar *name); +GIO_AVAILABLE_IN_ALL +void g_dbus_node_info_generate_xml (GDBusNodeInfo *info, + guint indent, + GString *string_builder); + +GIO_AVAILABLE_IN_ALL +GDBusNodeInfo *g_dbus_node_info_ref (GDBusNodeInfo *info); +GIO_AVAILABLE_IN_ALL +GDBusInterfaceInfo *g_dbus_interface_info_ref (GDBusInterfaceInfo *info); +GIO_AVAILABLE_IN_ALL +GDBusMethodInfo *g_dbus_method_info_ref (GDBusMethodInfo *info); +GIO_AVAILABLE_IN_ALL +GDBusSignalInfo *g_dbus_signal_info_ref (GDBusSignalInfo *info); +GIO_AVAILABLE_IN_ALL +GDBusPropertyInfo *g_dbus_property_info_ref (GDBusPropertyInfo *info); +GIO_AVAILABLE_IN_ALL +GDBusArgInfo *g_dbus_arg_info_ref (GDBusArgInfo *info); +GIO_AVAILABLE_IN_ALL +GDBusAnnotationInfo *g_dbus_annotation_info_ref (GDBusAnnotationInfo *info); + +GIO_AVAILABLE_IN_ALL +void g_dbus_node_info_unref (GDBusNodeInfo *info); +GIO_AVAILABLE_IN_ALL +void g_dbus_interface_info_unref (GDBusInterfaceInfo *info); +GIO_AVAILABLE_IN_ALL +void g_dbus_method_info_unref (GDBusMethodInfo *info); +GIO_AVAILABLE_IN_ALL +void g_dbus_signal_info_unref (GDBusSignalInfo *info); +GIO_AVAILABLE_IN_ALL +void g_dbus_property_info_unref (GDBusPropertyInfo *info); +GIO_AVAILABLE_IN_ALL +void g_dbus_arg_info_unref (GDBusArgInfo *info); +GIO_AVAILABLE_IN_ALL +void g_dbus_annotation_info_unref (GDBusAnnotationInfo *info); + +/** + * G_TYPE_DBUS_NODE_INFO: + * + * The #GType for a boxed type holding a #GDBusNodeInfo. + * + * Since: 2.26 + */ +#define G_TYPE_DBUS_NODE_INFO (g_dbus_node_info_get_type ()) + +/** + * G_TYPE_DBUS_INTERFACE_INFO: + * + * The #GType for a boxed type holding a #GDBusInterfaceInfo. + * + * Since: 2.26 + */ +#define G_TYPE_DBUS_INTERFACE_INFO (g_dbus_interface_info_get_type ()) + +/** + * G_TYPE_DBUS_METHOD_INFO: + * + * The #GType for a boxed type holding a #GDBusMethodInfo. + * + * Since: 2.26 + */ +#define G_TYPE_DBUS_METHOD_INFO (g_dbus_method_info_get_type ()) + +/** + * G_TYPE_DBUS_SIGNAL_INFO: + * + * The #GType for a boxed type holding a #GDBusSignalInfo. + * + * Since: 2.26 + */ +#define G_TYPE_DBUS_SIGNAL_INFO (g_dbus_signal_info_get_type ()) + +/** + * G_TYPE_DBUS_PROPERTY_INFO: + * + * The #GType for a boxed type holding a #GDBusPropertyInfo. + * + * Since: 2.26 + */ +#define G_TYPE_DBUS_PROPERTY_INFO (g_dbus_property_info_get_type ()) + +/** + * G_TYPE_DBUS_ARG_INFO: + * + * The #GType for a boxed type holding a #GDBusArgInfo. + * + * Since: 2.26 + */ +#define G_TYPE_DBUS_ARG_INFO (g_dbus_arg_info_get_type ()) + +/** + * G_TYPE_DBUS_ANNOTATION_INFO: + * + * The #GType for a boxed type holding a #GDBusAnnotationInfo. + * + * Since: 2.26 + */ +#define G_TYPE_DBUS_ANNOTATION_INFO (g_dbus_annotation_info_get_type ()) + +GIO_AVAILABLE_IN_ALL +GType g_dbus_node_info_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GType g_dbus_interface_info_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GType g_dbus_method_info_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GType g_dbus_signal_info_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GType g_dbus_property_info_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GType g_dbus_arg_info_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GType g_dbus_annotation_info_get_type (void) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __G_DBUS_INTROSPECTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusmenumodel.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusmenumodel.h new file mode 100644 index 0000000..73489b5 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusmenumodel.h @@ -0,0 +1,47 @@ +/* + * Copyright © 2011 Canonical Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Author: Ryan Lortie + */ + +#ifndef __G_DBUS_MENU_MODEL_H__ +#define __G_DBUS_MENU_MODEL_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_MENU_MODEL (g_dbus_menu_model_get_type ()) +#define G_DBUS_MENU_MODEL(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_DBUS_MENU_MODEL, GDBusMenuModel)) +#define G_IS_DBUS_MENU_MODEL(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_DBUS_MENU_MODEL)) + +typedef struct _GDBusMenuModel GDBusMenuModel; + +GIO_AVAILABLE_IN_ALL +GType g_dbus_menu_model_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GDBusMenuModel * g_dbus_menu_model_get (GDBusConnection *connection, + const gchar *bus_name, + const gchar *object_path); + +G_END_DECLS + +#endif /* __G_DBUS_MENU_MODEL_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusmessage.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusmessage.h new file mode 100644 index 0000000..6e4bb9e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusmessage.h @@ -0,0 +1,204 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_MESSAGE_H__ +#define __G_DBUS_MESSAGE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_MESSAGE (g_dbus_message_get_type ()) +#define G_DBUS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_MESSAGE, GDBusMessage)) +#define G_IS_DBUS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_MESSAGE)) + +GIO_AVAILABLE_IN_ALL +GType g_dbus_message_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_new (void); +GIO_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_new_signal (const gchar *path, + const gchar *interface_, + const gchar *signal); +GIO_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_new_method_call (const gchar *name, + const gchar *path, + const gchar *interface_, + const gchar *method); +GIO_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_new_method_reply (GDBusMessage *method_call_message); +GIO_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_new_method_error (GDBusMessage *method_call_message, + const gchar *error_name, + const gchar *error_message_format, + ...) G_GNUC_PRINTF(3, 4); +GIO_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_new_method_error_valist (GDBusMessage *method_call_message, + const gchar *error_name, + const gchar *error_message_format, + va_list var_args); +GIO_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_new_method_error_literal (GDBusMessage *method_call_message, + const gchar *error_name, + const gchar *error_message); +GIO_AVAILABLE_IN_ALL +gchar *g_dbus_message_print (GDBusMessage *message, + guint indent); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_message_get_locked (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_lock (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_copy (GDBusMessage *message, + GError **error); +GIO_AVAILABLE_IN_ALL +GDBusMessageByteOrder g_dbus_message_get_byte_order (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_set_byte_order (GDBusMessage *message, + GDBusMessageByteOrder byte_order); + +GIO_AVAILABLE_IN_ALL +GDBusMessageType g_dbus_message_get_message_type (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_set_message_type (GDBusMessage *message, + GDBusMessageType type); +GIO_AVAILABLE_IN_ALL +GDBusMessageFlags g_dbus_message_get_flags (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_set_flags (GDBusMessage *message, + GDBusMessageFlags flags); +GIO_AVAILABLE_IN_ALL +guint32 g_dbus_message_get_serial (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_set_serial (GDBusMessage *message, + guint32 serial); +GIO_AVAILABLE_IN_ALL +GVariant *g_dbus_message_get_header (GDBusMessage *message, + GDBusMessageHeaderField header_field); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_set_header (GDBusMessage *message, + GDBusMessageHeaderField header_field, + GVariant *value); +GIO_AVAILABLE_IN_ALL +guchar *g_dbus_message_get_header_fields (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +GVariant *g_dbus_message_get_body (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_set_body (GDBusMessage *message, + GVariant *body); + +#ifdef G_OS_UNIX + +GIO_AVAILABLE_IN_ALL +GUnixFDList *g_dbus_message_get_unix_fd_list (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_set_unix_fd_list (GDBusMessage *message, + GUnixFDList *fd_list); + +#endif /* G_OS_UNIX */ + +GIO_AVAILABLE_IN_ALL +guint32 g_dbus_message_get_reply_serial (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_set_reply_serial (GDBusMessage *message, + guint32 value); + +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_message_get_interface (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_set_interface (GDBusMessage *message, + const gchar *value); + +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_message_get_member (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_set_member (GDBusMessage *message, + const gchar *value); + +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_message_get_path (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_set_path (GDBusMessage *message, + const gchar *value); + +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_message_get_sender (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_set_sender (GDBusMessage *message, + const gchar *value); + +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_message_get_destination (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_set_destination (GDBusMessage *message, + const gchar *value); + +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_message_get_error_name (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_set_error_name (GDBusMessage *message, + const gchar *value); + +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_message_get_signature (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_set_signature (GDBusMessage *message, + const gchar *value); + +GIO_AVAILABLE_IN_ALL +guint32 g_dbus_message_get_num_unix_fds (GDBusMessage *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_message_set_num_unix_fds (GDBusMessage *message, + guint32 value); + +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_message_get_arg0 (GDBusMessage *message); + + +GIO_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_message_new_from_blob (guchar *blob, + gsize blob_len, + GDBusCapabilityFlags capabilities, + GError **error); + +GIO_AVAILABLE_IN_ALL +gssize g_dbus_message_bytes_needed (guchar *blob, + gsize blob_len, + GError **error); + +GIO_AVAILABLE_IN_ALL +guchar *g_dbus_message_to_blob (GDBusMessage *message, + gsize *out_size, + GDBusCapabilityFlags capabilities, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_message_to_gerror (GDBusMessage *message, + GError **error); + +G_END_DECLS + +#endif /* __G_DBUS_MESSAGE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusmethodinvocation.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusmethodinvocation.h new file mode 100644 index 0000000..6266f38 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusmethodinvocation.h @@ -0,0 +1,136 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_METHOD_INVOCATION_H__ +#define __G_DBUS_METHOD_INVOCATION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_METHOD_INVOCATION (g_dbus_method_invocation_get_type ()) +#define G_DBUS_METHOD_INVOCATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_METHOD_INVOCATION, GDBusMethodInvocation)) +#define G_IS_DBUS_METHOD_INVOCATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_METHOD_INVOCATION)) + +/** + * G_DBUS_METHOD_INVOCATION_HANDLED: + * + * The value returned by handlers of the signals generated by + * the `gdbus-codegen` tool to indicate that a method call has been + * handled by an implementation. It is equal to %TRUE, but using + * this macro is sometimes more readable. + * + * In code that needs to be backwards-compatible with older GLib, + * use %TRUE instead, often written like this: + * + * |[ + * g_dbus_method_invocation_return_error (invocation, ...); + * return TRUE; // handled + * ]| + * + * Since: 2.68 + */ +#define G_DBUS_METHOD_INVOCATION_HANDLED TRUE GIO_AVAILABLE_MACRO_IN_2_68 + +/** + * G_DBUS_METHOD_INVOCATION_UNHANDLED: + * + * The value returned by handlers of the signals generated by + * the `gdbus-codegen` tool to indicate that a method call has not been + * handled by an implementation. It is equal to %FALSE, but using + * this macro is sometimes more readable. + * + * In code that needs to be backwards-compatible with older GLib, + * use %FALSE instead. + * + * Since: 2.68 + */ +#define G_DBUS_METHOD_INVOCATION_UNHANDLED FALSE GIO_AVAILABLE_MACRO_IN_2_68 + +GIO_AVAILABLE_IN_ALL +GType g_dbus_method_invocation_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_method_invocation_get_sender (GDBusMethodInvocation *invocation); +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_method_invocation_get_object_path (GDBusMethodInvocation *invocation); +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_method_invocation_get_interface_name (GDBusMethodInvocation *invocation); +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_method_invocation_get_method_name (GDBusMethodInvocation *invocation); +GIO_AVAILABLE_IN_ALL +const GDBusMethodInfo *g_dbus_method_invocation_get_method_info (GDBusMethodInvocation *invocation); +GIO_AVAILABLE_IN_2_38 +const GDBusPropertyInfo *g_dbus_method_invocation_get_property_info (GDBusMethodInvocation *invocation); +GIO_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_method_invocation_get_connection (GDBusMethodInvocation *invocation); +GIO_AVAILABLE_IN_ALL +GDBusMessage *g_dbus_method_invocation_get_message (GDBusMethodInvocation *invocation); +GIO_AVAILABLE_IN_ALL +GVariant *g_dbus_method_invocation_get_parameters (GDBusMethodInvocation *invocation); +GIO_AVAILABLE_IN_ALL +gpointer g_dbus_method_invocation_get_user_data (GDBusMethodInvocation *invocation); + +GIO_AVAILABLE_IN_ALL +void g_dbus_method_invocation_return_value (GDBusMethodInvocation *invocation, + GVariant *parameters); +#ifdef G_OS_UNIX +GIO_AVAILABLE_IN_ALL +void g_dbus_method_invocation_return_value_with_unix_fd_list (GDBusMethodInvocation *invocation, + GVariant *parameters, + GUnixFDList *fd_list); +#endif /* G_OS_UNIX */ +GIO_AVAILABLE_IN_ALL +void g_dbus_method_invocation_return_error (GDBusMethodInvocation *invocation, + GQuark domain, + gint code, + const gchar *format, + ...) G_GNUC_PRINTF(4, 5); +GIO_AVAILABLE_IN_ALL +void g_dbus_method_invocation_return_error_valist (GDBusMethodInvocation *invocation, + GQuark domain, + gint code, + const gchar *format, + va_list var_args) + G_GNUC_PRINTF(4, 0); +GIO_AVAILABLE_IN_ALL +void g_dbus_method_invocation_return_error_literal (GDBusMethodInvocation *invocation, + GQuark domain, + gint code, + const gchar *message); +GIO_AVAILABLE_IN_ALL +void g_dbus_method_invocation_return_gerror (GDBusMethodInvocation *invocation, + const GError *error); +GIO_AVAILABLE_IN_ALL +void g_dbus_method_invocation_take_error (GDBusMethodInvocation *invocation, + GError *error); +GIO_AVAILABLE_IN_ALL +void g_dbus_method_invocation_return_dbus_error (GDBusMethodInvocation *invocation, + const gchar *error_name, + const gchar *error_message); + +G_END_DECLS + +#endif /* __G_DBUS_METHOD_INVOCATION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusnameowning.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusnameowning.h new file mode 100644 index 0000000..2afd3ee --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusnameowning.h @@ -0,0 +1,117 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_NAME_OWNING_H__ +#define __G_DBUS_NAME_OWNING_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * GBusAcquiredCallback: + * @connection: The #GDBusConnection to a message bus. + * @name: The name that is requested to be owned. + * @user_data: User data passed to g_bus_own_name(). + * + * Invoked when a connection to a message bus has been obtained. + * + * Since: 2.26 + */ +typedef void (*GBusAcquiredCallback) (GDBusConnection *connection, + const gchar *name, + gpointer user_data); + +/** + * GBusNameAcquiredCallback: + * @connection: The #GDBusConnection on which to acquired the name. + * @name: The name being owned. + * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection(). + * + * Invoked when the name is acquired. + * + * Since: 2.26 + */ +typedef void (*GBusNameAcquiredCallback) (GDBusConnection *connection, + const gchar *name, + gpointer user_data); + +/** + * GBusNameLostCallback: + * @connection: The #GDBusConnection on which to acquire the name or %NULL if + * the connection was disconnected. + * @name: The name being owned. + * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection(). + * + * Invoked when the name is lost or @connection has been closed. + * + * Since: 2.26 + */ +typedef void (*GBusNameLostCallback) (GDBusConnection *connection, + const gchar *name, + gpointer user_data); + +GIO_AVAILABLE_IN_ALL +guint g_bus_own_name (GBusType bus_type, + const gchar *name, + GBusNameOwnerFlags flags, + GBusAcquiredCallback bus_acquired_handler, + GBusNameAcquiredCallback name_acquired_handler, + GBusNameLostCallback name_lost_handler, + gpointer user_data, + GDestroyNotify user_data_free_func); + +GIO_AVAILABLE_IN_ALL +guint g_bus_own_name_on_connection (GDBusConnection *connection, + const gchar *name, + GBusNameOwnerFlags flags, + GBusNameAcquiredCallback name_acquired_handler, + GBusNameLostCallback name_lost_handler, + gpointer user_data, + GDestroyNotify user_data_free_func); + +GIO_AVAILABLE_IN_ALL +guint g_bus_own_name_with_closures (GBusType bus_type, + const gchar *name, + GBusNameOwnerFlags flags, + GClosure *bus_acquired_closure, + GClosure *name_acquired_closure, + GClosure *name_lost_closure); + +GIO_AVAILABLE_IN_ALL +guint g_bus_own_name_on_connection_with_closures ( + GDBusConnection *connection, + const gchar *name, + GBusNameOwnerFlags flags, + GClosure *name_acquired_closure, + GClosure *name_lost_closure); + +GIO_AVAILABLE_IN_ALL +void g_bus_unown_name (guint owner_id); + +G_END_DECLS + +#endif /* __G_DBUS_NAME_OWNING_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusnamewatching.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusnamewatching.h new file mode 100644 index 0000000..df836de --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusnamewatching.h @@ -0,0 +1,104 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_NAME_WATCHING_H__ +#define __G_DBUS_NAME_WATCHING_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * GBusNameAppearedCallback: + * @connection: The #GDBusConnection the name is being watched on. + * @name: The name being watched. + * @name_owner: Unique name of the owner of the name being watched. + * @user_data: User data passed to g_bus_watch_name(). + * + * Invoked when the name being watched is known to have to have an owner. + * + * Since: 2.26 + */ +typedef void (*GBusNameAppearedCallback) (GDBusConnection *connection, + const gchar *name, + const gchar *name_owner, + gpointer user_data); + +/** + * GBusNameVanishedCallback: + * @connection: The #GDBusConnection the name is being watched on, or + * %NULL. + * @name: The name being watched. + * @user_data: User data passed to g_bus_watch_name(). + * + * Invoked when the name being watched is known not to have to have an owner. + * + * This is also invoked when the #GDBusConnection on which the watch was + * established has been closed. In that case, @connection will be + * %NULL. + * + * Since: 2.26 + */ +typedef void (*GBusNameVanishedCallback) (GDBusConnection *connection, + const gchar *name, + gpointer user_data); + + +GIO_AVAILABLE_IN_ALL +guint g_bus_watch_name (GBusType bus_type, + const gchar *name, + GBusNameWatcherFlags flags, + GBusNameAppearedCallback name_appeared_handler, + GBusNameVanishedCallback name_vanished_handler, + gpointer user_data, + GDestroyNotify user_data_free_func); +GIO_AVAILABLE_IN_ALL +guint g_bus_watch_name_on_connection (GDBusConnection *connection, + const gchar *name, + GBusNameWatcherFlags flags, + GBusNameAppearedCallback name_appeared_handler, + GBusNameVanishedCallback name_vanished_handler, + gpointer user_data, + GDestroyNotify user_data_free_func); +GIO_AVAILABLE_IN_ALL +guint g_bus_watch_name_with_closures (GBusType bus_type, + const gchar *name, + GBusNameWatcherFlags flags, + GClosure *name_appeared_closure, + GClosure *name_vanished_closure); +GIO_AVAILABLE_IN_ALL +guint g_bus_watch_name_on_connection_with_closures ( + GDBusConnection *connection, + const gchar *name, + GBusNameWatcherFlags flags, + GClosure *name_appeared_closure, + GClosure *name_vanished_closure); +GIO_AVAILABLE_IN_ALL +void g_bus_unwatch_name (guint watcher_id); + +G_END_DECLS + +#endif /* __G_DBUS_NAME_WATCHING_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobject.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobject.h new file mode 100644 index 0000000..b8186af --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobject.h @@ -0,0 +1,80 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_OBJECT_H__ +#define __G_DBUS_OBJECT_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_OBJECT (g_dbus_object_get_type()) +#define G_DBUS_OBJECT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT, GDBusObject)) +#define G_IS_DBUS_OBJECT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT)) +#define G_DBUS_OBJECT_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), G_TYPE_DBUS_OBJECT, GDBusObjectIface)) + +typedef struct _GDBusObjectIface GDBusObjectIface; + +/** + * GDBusObjectIface: + * @parent_iface: The parent interface. + * @get_object_path: Returns the object path. See g_dbus_object_get_object_path(). + * @get_interfaces: Returns all interfaces. See g_dbus_object_get_interfaces(). + * @get_interface: Returns an interface by name. See g_dbus_object_get_interface(). + * @interface_added: Signal handler for the #GDBusObject::interface-added signal. + * @interface_removed: Signal handler for the #GDBusObject::interface-removed signal. + * + * Base object type for D-Bus objects. + * + * Since: 2.30 + */ +struct _GDBusObjectIface +{ + GTypeInterface parent_iface; + + /* Virtual Functions */ + const gchar *(*get_object_path) (GDBusObject *object); + GList *(*get_interfaces) (GDBusObject *object); + GDBusInterface *(*get_interface) (GDBusObject *object, + const gchar *interface_name); + + /* Signals */ + void (*interface_added) (GDBusObject *object, + GDBusInterface *interface_); + void (*interface_removed) (GDBusObject *object, + GDBusInterface *interface_); + +}; + +GIO_AVAILABLE_IN_ALL +GType g_dbus_object_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_object_get_object_path (GDBusObject *object); +GIO_AVAILABLE_IN_ALL +GList *g_dbus_object_get_interfaces (GDBusObject *object); +GIO_AVAILABLE_IN_ALL +GDBusInterface *g_dbus_object_get_interface (GDBusObject *object, + const gchar *interface_name); + +G_END_DECLS + +#endif /* __G_DBUS_OBJECT_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobjectmanager.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobjectmanager.h new file mode 100644 index 0000000..7bfa2ae --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobjectmanager.h @@ -0,0 +1,96 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_OBJECT_MANAGER_H__ +#define __G_DBUS_OBJECT_MANAGER_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_OBJECT_MANAGER (g_dbus_object_manager_get_type()) +#define G_DBUS_OBJECT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_MANAGER, GDBusObjectManager)) +#define G_IS_DBUS_OBJECT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_MANAGER)) +#define G_DBUS_OBJECT_MANAGER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), G_TYPE_DBUS_OBJECT_MANAGER, GDBusObjectManagerIface)) + +typedef struct _GDBusObjectManagerIface GDBusObjectManagerIface; + +/** + * GDBusObjectManagerIface: + * @parent_iface: The parent interface. + * @get_object_path: Virtual function for g_dbus_object_manager_get_object_path(). + * @get_objects: Virtual function for g_dbus_object_manager_get_objects(). + * @get_object: Virtual function for g_dbus_object_manager_get_object(). + * @get_interface: Virtual function for g_dbus_object_manager_get_interface(). + * @object_added: Signal handler for the #GDBusObjectManager::object-added signal. + * @object_removed: Signal handler for the #GDBusObjectManager::object-removed signal. + * @interface_added: Signal handler for the #GDBusObjectManager::interface-added signal. + * @interface_removed: Signal handler for the #GDBusObjectManager::interface-removed signal. + * + * Base type for D-Bus object managers. + * + * Since: 2.30 + */ +struct _GDBusObjectManagerIface +{ + GTypeInterface parent_iface; + + /* Virtual Functions */ + const gchar *(*get_object_path) (GDBusObjectManager *manager); + GList *(*get_objects) (GDBusObjectManager *manager); + GDBusObject *(*get_object) (GDBusObjectManager *manager, + const gchar *object_path); + GDBusInterface *(*get_interface) (GDBusObjectManager *manager, + const gchar *object_path, + const gchar *interface_name); + + /* Signals */ + void (*object_added) (GDBusObjectManager *manager, + GDBusObject *object); + void (*object_removed) (GDBusObjectManager *manager, + GDBusObject *object); + + void (*interface_added) (GDBusObjectManager *manager, + GDBusObject *object, + GDBusInterface *interface_); + void (*interface_removed) (GDBusObjectManager *manager, + GDBusObject *object, + GDBusInterface *interface_); +}; + +GIO_AVAILABLE_IN_ALL +GType g_dbus_object_manager_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_object_manager_get_object_path (GDBusObjectManager *manager); +GIO_AVAILABLE_IN_ALL +GList *g_dbus_object_manager_get_objects (GDBusObjectManager *manager); +GIO_AVAILABLE_IN_ALL +GDBusObject *g_dbus_object_manager_get_object (GDBusObjectManager *manager, + const gchar *object_path); +GIO_AVAILABLE_IN_ALL +GDBusInterface *g_dbus_object_manager_get_interface (GDBusObjectManager *manager, + const gchar *object_path, + const gchar *interface_name); + +G_END_DECLS + +#endif /* __G_DBUS_OBJECT_MANAGER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobjectmanagerclient.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobjectmanagerclient.h new file mode 100644 index 0000000..2ebeedc --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobjectmanagerclient.h @@ -0,0 +1,148 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_OBJECT_MANAGER_CLIENT_H__ +#define __G_DBUS_OBJECT_MANAGER_CLIENT_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_OBJECT_MANAGER_CLIENT (g_dbus_object_manager_client_get_type ()) +#define G_DBUS_OBJECT_MANAGER_CLIENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT, GDBusObjectManagerClient)) +#define G_DBUS_OBJECT_MANAGER_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT, GDBusObjectManagerClientClass)) +#define G_DBUS_OBJECT_MANAGER_CLIENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT, GDBusObjectManagerClientClass)) +#define G_IS_DBUS_OBJECT_MANAGER_CLIENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT)) +#define G_IS_DBUS_OBJECT_MANAGER_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT)) + +typedef struct _GDBusObjectManagerClientClass GDBusObjectManagerClientClass; +typedef struct _GDBusObjectManagerClientPrivate GDBusObjectManagerClientPrivate; + +/** + * GDBusObjectManagerClient: + * + * The #GDBusObjectManagerClient structure contains private data and should + * only be accessed using the provided API. + * + * Since: 2.30 + */ +struct _GDBusObjectManagerClient +{ + /*< private >*/ + GObject parent_instance; + GDBusObjectManagerClientPrivate *priv; +}; + +/** + * GDBusObjectManagerClientClass: + * @parent_class: The parent class. + * @interface_proxy_signal: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-signal signal. + * @interface_proxy_properties_changed: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-properties-changed signal. + * + * Class structure for #GDBusObjectManagerClient. + * + * Since: 2.30 + */ +struct _GDBusObjectManagerClientClass +{ + GObjectClass parent_class; + + /* signals */ + void (*interface_proxy_signal) (GDBusObjectManagerClient *manager, + GDBusObjectProxy *object_proxy, + GDBusProxy *interface_proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters); + + void (*interface_proxy_properties_changed) (GDBusObjectManagerClient *manager, + GDBusObjectProxy *object_proxy, + GDBusProxy *interface_proxy, + GVariant *changed_properties, + const gchar* const *invalidated_properties); + + /*< private >*/ + gpointer padding[8]; +}; + +GIO_AVAILABLE_IN_ALL +GType g_dbus_object_manager_client_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +void g_dbus_object_manager_client_new (GDBusConnection *connection, + GDBusObjectManagerClientFlags flags, + const gchar *name, + const gchar *object_path, + GDBusProxyTypeFunc get_proxy_type_func, + gpointer get_proxy_type_user_data, + GDestroyNotify get_proxy_type_destroy_notify, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GDBusObjectManager *g_dbus_object_manager_client_new_finish (GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GDBusObjectManager *g_dbus_object_manager_client_new_sync (GDBusConnection *connection, + GDBusObjectManagerClientFlags flags, + const gchar *name, + const gchar *object_path, + GDBusProxyTypeFunc get_proxy_type_func, + gpointer get_proxy_type_user_data, + GDestroyNotify get_proxy_type_destroy_notify, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_dbus_object_manager_client_new_for_bus (GBusType bus_type, + GDBusObjectManagerClientFlags flags, + const gchar *name, + const gchar *object_path, + GDBusProxyTypeFunc get_proxy_type_func, + gpointer get_proxy_type_user_data, + GDestroyNotify get_proxy_type_destroy_notify, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GDBusObjectManager *g_dbus_object_manager_client_new_for_bus_finish (GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GDBusObjectManager *g_dbus_object_manager_client_new_for_bus_sync (GBusType bus_type, + GDBusObjectManagerClientFlags flags, + const gchar *name, + const gchar *object_path, + GDBusProxyTypeFunc get_proxy_type_func, + gpointer get_proxy_type_user_data, + GDestroyNotify get_proxy_type_destroy_notify, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_object_manager_client_get_connection (GDBusObjectManagerClient *manager); +GIO_AVAILABLE_IN_ALL +GDBusObjectManagerClientFlags g_dbus_object_manager_client_get_flags (GDBusObjectManagerClient *manager); +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_object_manager_client_get_name (GDBusObjectManagerClient *manager); +GIO_AVAILABLE_IN_ALL +gchar *g_dbus_object_manager_client_get_name_owner (GDBusObjectManagerClient *manager); + +G_END_DECLS + +#endif /* __G_DBUS_OBJECT_MANAGER_CLIENT_H */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobjectmanagerserver.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobjectmanagerserver.h new file mode 100644 index 0000000..92543dd --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobjectmanagerserver.h @@ -0,0 +1,95 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_OBJECT_MANAGER_SERVER_H__ +#define __G_DBUS_OBJECT_MANAGER_SERVER_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_OBJECT_MANAGER_SERVER (g_dbus_object_manager_server_get_type ()) +#define G_DBUS_OBJECT_MANAGER_SERVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_MANAGER_SERVER, GDBusObjectManagerServer)) +#define G_DBUS_OBJECT_MANAGER_SERVER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_MANAGER_SERVER, GDBusObjectManagerServerClass)) +#define G_DBUS_OBJECT_MANAGER_SERVER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_MANAGER_SERVER, GDBusObjectManagerServerClass)) +#define G_IS_DBUS_OBJECT_MANAGER_SERVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_MANAGER_SERVER)) +#define G_IS_DBUS_OBJECT_MANAGER_SERVER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_MANAGER_SERVER)) + +typedef struct _GDBusObjectManagerServerClass GDBusObjectManagerServerClass; +typedef struct _GDBusObjectManagerServerPrivate GDBusObjectManagerServerPrivate; + +/** + * GDBusObjectManagerServer: + * + * The #GDBusObjectManagerServer structure contains private data and should + * only be accessed using the provided API. + * + * Since: 2.30 + */ +struct _GDBusObjectManagerServer +{ + /*< private >*/ + GObject parent_instance; + GDBusObjectManagerServerPrivate *priv; +}; + +/** + * GDBusObjectManagerServerClass: + * @parent_class: The parent class. + * + * Class structure for #GDBusObjectManagerServer. + * + * Since: 2.30 + */ +struct _GDBusObjectManagerServerClass +{ + GObjectClass parent_class; + + /*< private >*/ + gpointer padding[8]; +}; + +GIO_AVAILABLE_IN_ALL +GType g_dbus_object_manager_server_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GDBusObjectManagerServer *g_dbus_object_manager_server_new (const gchar *object_path); +GIO_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_object_manager_server_get_connection (GDBusObjectManagerServer *manager); +GIO_AVAILABLE_IN_ALL +void g_dbus_object_manager_server_set_connection (GDBusObjectManagerServer *manager, + GDBusConnection *connection); +GIO_AVAILABLE_IN_ALL +void g_dbus_object_manager_server_export (GDBusObjectManagerServer *manager, + GDBusObjectSkeleton *object); +GIO_AVAILABLE_IN_ALL +void g_dbus_object_manager_server_export_uniquely (GDBusObjectManagerServer *manager, + GDBusObjectSkeleton *object); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_object_manager_server_is_exported (GDBusObjectManagerServer *manager, + GDBusObjectSkeleton *object); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_object_manager_server_unexport (GDBusObjectManagerServer *manager, + const gchar *object_path); + +G_END_DECLS + +#endif /* __G_DBUS_OBJECT_MANAGER_SERVER_H */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobjectproxy.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobjectproxy.h new file mode 100644 index 0000000..ea5af0f --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobjectproxy.h @@ -0,0 +1,81 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_OBJECT_PROXY_H__ +#define __G_DBUS_OBJECT_PROXY_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_OBJECT_PROXY (g_dbus_object_proxy_get_type ()) +#define G_DBUS_OBJECT_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_PROXY, GDBusObjectProxy)) +#define G_DBUS_OBJECT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_PROXY, GDBusObjectProxyClass)) +#define G_DBUS_OBJECT_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_PROXY, GDBusObjectProxyClass)) +#define G_IS_DBUS_OBJECT_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_PROXY)) +#define G_IS_DBUS_OBJECT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_PROXY)) + +typedef struct _GDBusObjectProxyClass GDBusObjectProxyClass; +typedef struct _GDBusObjectProxyPrivate GDBusObjectProxyPrivate; + +/** + * GDBusObjectProxy: + * + * The #GDBusObjectProxy structure contains private data and should + * only be accessed using the provided API. + * + * Since: 2.30 + */ +struct _GDBusObjectProxy +{ + /*< private >*/ + GObject parent_instance; + GDBusObjectProxyPrivate *priv; +}; + +/** + * GDBusObjectProxyClass: + * @parent_class: The parent class. + * + * Class structure for #GDBusObjectProxy. + * + * Since: 2.30 + */ +struct _GDBusObjectProxyClass +{ + GObjectClass parent_class; + + /*< private >*/ + gpointer padding[8]; +}; + +GIO_AVAILABLE_IN_ALL +GType g_dbus_object_proxy_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GDBusObjectProxy *g_dbus_object_proxy_new (GDBusConnection *connection, + const gchar *object_path); +GIO_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_object_proxy_get_connection (GDBusObjectProxy *proxy); + +G_END_DECLS + +#endif /* __G_DBUS_OBJECT_PROXY_H */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobjectskeleton.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobjectskeleton.h new file mode 100644 index 0000000..b15a288 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusobjectskeleton.h @@ -0,0 +1,98 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_OBJECT_SKELETON_H__ +#define __G_DBUS_OBJECT_SKELETON_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_OBJECT_SKELETON (g_dbus_object_skeleton_get_type ()) +#define G_DBUS_OBJECT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_SKELETON, GDBusObjectSkeleton)) +#define G_DBUS_OBJECT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_SKELETON, GDBusObjectSkeletonClass)) +#define G_DBUS_OBJECT_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_SKELETON, GDBusObjectSkeletonClass)) +#define G_IS_DBUS_OBJECT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_SKELETON)) +#define G_IS_DBUS_OBJECT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_SKELETON)) + +typedef struct _GDBusObjectSkeletonClass GDBusObjectSkeletonClass; +typedef struct _GDBusObjectSkeletonPrivate GDBusObjectSkeletonPrivate; + +/** + * GDBusObjectSkeleton: + * + * The #GDBusObjectSkeleton structure contains private data and should only be + * accessed using the provided API. + * + * Since: 2.30 + */ +struct _GDBusObjectSkeleton +{ + /*< private >*/ + GObject parent_instance; + GDBusObjectSkeletonPrivate *priv; +}; + +/** + * GDBusObjectSkeletonClass: + * @parent_class: The parent class. + * @authorize_method: Signal class handler for the #GDBusObjectSkeleton::authorize-method signal. + * + * Class structure for #GDBusObjectSkeleton. + * + * Since: 2.30 + */ +struct _GDBusObjectSkeletonClass +{ + GObjectClass parent_class; + + /* Signals */ + gboolean (*authorize_method) (GDBusObjectSkeleton *object, + GDBusInterfaceSkeleton *interface_, + GDBusMethodInvocation *invocation); + + /*< private >*/ + gpointer padding[8]; +}; + +GIO_AVAILABLE_IN_ALL +GType g_dbus_object_skeleton_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GDBusObjectSkeleton *g_dbus_object_skeleton_new (const gchar *object_path); +GIO_AVAILABLE_IN_ALL +void g_dbus_object_skeleton_flush (GDBusObjectSkeleton *object); +GIO_AVAILABLE_IN_ALL +void g_dbus_object_skeleton_add_interface (GDBusObjectSkeleton *object, + GDBusInterfaceSkeleton *interface_); +GIO_AVAILABLE_IN_ALL +void g_dbus_object_skeleton_remove_interface (GDBusObjectSkeleton *object, + GDBusInterfaceSkeleton *interface_); +GIO_AVAILABLE_IN_ALL +void g_dbus_object_skeleton_remove_interface_by_name (GDBusObjectSkeleton *object, + const gchar *interface_name); +GIO_AVAILABLE_IN_ALL +void g_dbus_object_skeleton_set_object_path (GDBusObjectSkeleton *object, + const gchar *object_path); + +G_END_DECLS + +#endif /* __G_DBUS_OBJECT_SKELETON_H */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusproxy.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusproxy.h new file mode 100644 index 0000000..7483156 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusproxy.h @@ -0,0 +1,220 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_PROXY_H__ +#define __G_DBUS_PROXY_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_PROXY (g_dbus_proxy_get_type ()) +#define G_DBUS_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_PROXY, GDBusProxy)) +#define G_DBUS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_PROXY, GDBusProxyClass)) +#define G_DBUS_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_PROXY, GDBusProxyClass)) +#define G_IS_DBUS_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_PROXY)) +#define G_IS_DBUS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_PROXY)) + +typedef struct _GDBusProxyClass GDBusProxyClass; +typedef struct _GDBusProxyPrivate GDBusProxyPrivate; + +/** + * GDBusProxy: + * + * The #GDBusProxy structure contains only private data and + * should only be accessed using the provided API. + * + * Since: 2.26 + */ +struct _GDBusProxy +{ + /*< private >*/ + GObject parent_instance; + GDBusProxyPrivate *priv; +}; + +/** + * GDBusProxyClass: + * @g_properties_changed: Signal class handler for the #GDBusProxy::g-properties-changed signal. + * @g_signal: Signal class handler for the #GDBusProxy::g-signal signal. + * + * Class structure for #GDBusProxy. + * + * Since: 2.26 + */ +struct _GDBusProxyClass +{ + /*< private >*/ + GObjectClass parent_class; + + /*< public >*/ + /* Signals */ + void (*g_properties_changed) (GDBusProxy *proxy, + GVariant *changed_properties, + const gchar* const *invalidated_properties); + void (*g_signal) (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters); + + /*< private >*/ + /* Padding for future expansion */ + gpointer padding[32]; +}; + +GIO_AVAILABLE_IN_ALL +GType g_dbus_proxy_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +void g_dbus_proxy_new (GDBusConnection *connection, + GDBusProxyFlags flags, + GDBusInterfaceInfo *info, + const gchar *name, + const gchar *object_path, + const gchar *interface_name, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GDBusProxy *g_dbus_proxy_new_finish (GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GDBusProxy *g_dbus_proxy_new_sync (GDBusConnection *connection, + GDBusProxyFlags flags, + GDBusInterfaceInfo *info, + const gchar *name, + const gchar *object_path, + const gchar *interface_name, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_dbus_proxy_new_for_bus (GBusType bus_type, + GDBusProxyFlags flags, + GDBusInterfaceInfo *info, + const gchar *name, + const gchar *object_path, + const gchar *interface_name, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GDBusProxy *g_dbus_proxy_new_for_bus_finish (GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GDBusProxy *g_dbus_proxy_new_for_bus_sync (GBusType bus_type, + GDBusProxyFlags flags, + GDBusInterfaceInfo *info, + const gchar *name, + const gchar *object_path, + const gchar *interface_name, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +GDBusConnection *g_dbus_proxy_get_connection (GDBusProxy *proxy); +GIO_AVAILABLE_IN_ALL +GDBusProxyFlags g_dbus_proxy_get_flags (GDBusProxy *proxy); +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_proxy_get_name (GDBusProxy *proxy); +GIO_AVAILABLE_IN_ALL +gchar *g_dbus_proxy_get_name_owner (GDBusProxy *proxy); +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_proxy_get_object_path (GDBusProxy *proxy); +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_proxy_get_interface_name (GDBusProxy *proxy); +GIO_AVAILABLE_IN_ALL +gint g_dbus_proxy_get_default_timeout (GDBusProxy *proxy); +GIO_AVAILABLE_IN_ALL +void g_dbus_proxy_set_default_timeout (GDBusProxy *proxy, + gint timeout_msec); +GIO_AVAILABLE_IN_ALL +GDBusInterfaceInfo *g_dbus_proxy_get_interface_info (GDBusProxy *proxy); +GIO_AVAILABLE_IN_ALL +void g_dbus_proxy_set_interface_info (GDBusProxy *proxy, + GDBusInterfaceInfo *info); +GIO_AVAILABLE_IN_ALL +GVariant *g_dbus_proxy_get_cached_property (GDBusProxy *proxy, + const gchar *property_name); +GIO_AVAILABLE_IN_ALL +void g_dbus_proxy_set_cached_property (GDBusProxy *proxy, + const gchar *property_name, + GVariant *value); +GIO_AVAILABLE_IN_ALL +gchar **g_dbus_proxy_get_cached_property_names (GDBusProxy *proxy); +GIO_AVAILABLE_IN_ALL +void g_dbus_proxy_call (GDBusProxy *proxy, + const gchar *method_name, + GVariant *parameters, + GDBusCallFlags flags, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GVariant *g_dbus_proxy_call_finish (GDBusProxy *proxy, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GVariant *g_dbus_proxy_call_sync (GDBusProxy *proxy, + const gchar *method_name, + GVariant *parameters, + GDBusCallFlags flags, + gint timeout_msec, + GCancellable *cancellable, + GError **error); + +#ifdef G_OS_UNIX + +GIO_AVAILABLE_IN_ALL +void g_dbus_proxy_call_with_unix_fd_list (GDBusProxy *proxy, + const gchar *method_name, + GVariant *parameters, + GDBusCallFlags flags, + gint timeout_msec, + GUnixFDList *fd_list, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GVariant *g_dbus_proxy_call_with_unix_fd_list_finish (GDBusProxy *proxy, + GUnixFDList **out_fd_list, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GVariant *g_dbus_proxy_call_with_unix_fd_list_sync (GDBusProxy *proxy, + const gchar *method_name, + GVariant *parameters, + GDBusCallFlags flags, + gint timeout_msec, + GUnixFDList *fd_list, + GUnixFDList **out_fd_list, + GCancellable *cancellable, + GError **error); + +#endif /* G_OS_UNIX */ + +G_END_DECLS + +#endif /* __G_DBUS_PROXY_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusserver.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusserver.h new file mode 100644 index 0000000..8d460e3 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusserver.h @@ -0,0 +1,62 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_SERVER_H__ +#define __G_DBUS_SERVER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DBUS_SERVER (g_dbus_server_get_type ()) +#define G_DBUS_SERVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_SERVER, GDBusServer)) +#define G_IS_DBUS_SERVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_SERVER)) + +GIO_AVAILABLE_IN_ALL +GType g_dbus_server_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GDBusServer *g_dbus_server_new_sync (const gchar *address, + GDBusServerFlags flags, + const gchar *guid, + GDBusAuthObserver *observer, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_server_get_client_address (GDBusServer *server); +GIO_AVAILABLE_IN_ALL +const gchar *g_dbus_server_get_guid (GDBusServer *server); +GIO_AVAILABLE_IN_ALL +GDBusServerFlags g_dbus_server_get_flags (GDBusServer *server); +GIO_AVAILABLE_IN_ALL +void g_dbus_server_start (GDBusServer *server); +GIO_AVAILABLE_IN_ALL +void g_dbus_server_stop (GDBusServer *server); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_server_is_active (GDBusServer *server); + +G_END_DECLS + +#endif /* __G_DBUS_SERVER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusutils.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusutils.h new file mode 100644 index 0000000..3003b71 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdbusutils.h @@ -0,0 +1,65 @@ +/* GDBus - GLib D-Bus Library + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: David Zeuthen + */ + +#ifndef __G_DBUS_UTILS_H__ +#define __G_DBUS_UTILS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_is_guid (const gchar *string); +GIO_AVAILABLE_IN_ALL +gchar *g_dbus_generate_guid (void); + +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_is_name (const gchar *string); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_is_unique_name (const gchar *string); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_is_member_name (const gchar *string); +GIO_AVAILABLE_IN_ALL +gboolean g_dbus_is_interface_name (const gchar *string); +GIO_AVAILABLE_IN_2_70 +gboolean g_dbus_is_error_name (const gchar *string); + +GIO_AVAILABLE_IN_ALL +void g_dbus_gvariant_to_gvalue (GVariant *value, + GValue *out_gvalue); +GIO_AVAILABLE_IN_ALL +GVariant *g_dbus_gvalue_to_gvariant (const GValue *gvalue, + const GVariantType *type); +GIO_AVAILABLE_IN_2_68 +gchar *g_dbus_escape_object_path_bytestring (const guint8 *bytes); +GIO_AVAILABLE_IN_2_68 +gchar *g_dbus_escape_object_path (const gchar *s); +GIO_AVAILABLE_IN_2_68 +guint8 *g_dbus_unescape_object_path (const gchar *s); + +G_END_DECLS + +#endif /* __G_DBUS_UTILS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdebugcontroller.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdebugcontroller.h new file mode 100644 index 0000000..e59cd34 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdebugcontroller.h @@ -0,0 +1,81 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2021 Endless OS Foundation, LLC + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef __G_DEBUG_CONTROLLER_H__ +#define __G_DEBUG_CONTROLLER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * G_DEBUG_CONTROLLER_EXTENSION_POINT_NAME: + * + * Extension point for debug control functionality. + * See [Extending GIO][extending-gio]. + * + * Since: 2.72 + */ +#define G_DEBUG_CONTROLLER_EXTENSION_POINT_NAME "gio-debug-controller" + +/** + * GDebugController: + * + * #GDebugController is an interface to expose control of debugging features and + * debug output. + * + * Since: 2.72 + */ +#define G_TYPE_DEBUG_CONTROLLER (g_debug_controller_get_type ()) +GIO_AVAILABLE_IN_2_72 +G_DECLARE_INTERFACE(GDebugController, g_debug_controller, g, debug_controller, GObject) + +#define G_DEBUG_CONTROLLER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DEBUG_CONTROLLER, GDebugController)) +#define G_IS_DEBUG_CONTROLLER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DEBUG_CONTROLLER)) +#define G_DEBUG_CONTROLLER_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_DEBUG_CONTROLLER, GDebugControllerInterface)) + +/** + * GDebugControllerInterface: + * @g_iface: The parent interface. + * + * The virtual function table for #GDebugController. + * + * Since: 2.72 + */ +struct _GDebugControllerInterface { + /*< private >*/ + GTypeInterface g_iface; +}; + +GIO_AVAILABLE_IN_2_72 +gboolean g_debug_controller_get_debug_enabled (GDebugController *self); +GIO_AVAILABLE_IN_2_72 +void g_debug_controller_set_debug_enabled (GDebugController *self, + gboolean debug_enabled); + +G_END_DECLS + +#endif /* __G_DEBUG_CONTROLLER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdebugcontrollerdbus.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdebugcontrollerdbus.h new file mode 100644 index 0000000..c6e6c70 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdebugcontrollerdbus.h @@ -0,0 +1,71 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2021 Endless OS Foundation, LLC + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef __G_DEBUG_CONTROLLER_DBUS_H__ +#define __G_DEBUG_CONTROLLER_DBUS_H__ + +#include +#include + +G_BEGIN_DECLS + +/** + * GDebugControllerDBus: + * + * #GDebugControllerDBus is an implementation of #GDebugController over D-Bus. + * + * Since: 2.72 + */ +#define G_TYPE_DEBUG_CONTROLLER_DBUS (g_debug_controller_dbus_get_type ()) +GIO_AVAILABLE_IN_2_72 +G_DECLARE_DERIVABLE_TYPE (GDebugControllerDBus, g_debug_controller_dbus, G, DEBUG_CONTROLLER_DBUS, GObject) + +/** + * GDebugControllerDBusClass: + * @parent_class: The parent class. + * @authorize: Default handler for the #GDebugControllerDBus::authorize signal. + * + * The virtual function table for #GDebugControllerDBus. + * + * Since: 2.72 + */ +struct _GDebugControllerDBusClass +{ + GObjectClass parent_class; + + gboolean (*authorize) (GDebugControllerDBus *controller, + GDBusMethodInvocation *invocation); + + gpointer padding[12]; +}; + +GIO_AVAILABLE_IN_2_72 +GDebugControllerDBus *g_debug_controller_dbus_new (GDBusConnection *connection, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_72 +void g_debug_controller_dbus_stop (GDebugControllerDBus *self); + +G_END_DECLS + +#endif /* __G_DEBUG_CONTROLLER_DBUS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdrive.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdrive.h new file mode 100644 index 0000000..7551a40 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdrive.h @@ -0,0 +1,274 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + * David Zeuthen + */ + +#ifndef __G_DRIVE_H__ +#define __G_DRIVE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE: + * + * The string used to obtain a Unix device path with g_drive_get_identifier(). + * + * Since: 2.58 + */ +#define G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE "unix-device" + +#define G_TYPE_DRIVE (g_drive_get_type ()) +#define G_DRIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DRIVE, GDrive)) +#define G_IS_DRIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DRIVE)) +#define G_DRIVE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_DRIVE, GDriveIface)) + +/** + * GDriveIface: + * @g_iface: The parent interface. + * @changed: Signal emitted when the drive is changed. + * @disconnected: The removed signal that is emitted when the #GDrive have been disconnected. If the recipient is holding references to the object they should release them so the object can be finalized. + * @eject_button: Signal emitted when the physical eject button (if any) of a drive have been pressed. + * @get_name: Returns the name for the given #GDrive. + * @get_icon: Returns a #GIcon for the given #GDrive. + * @has_volumes: Returns %TRUE if the #GDrive has mountable volumes. + * @get_volumes: Returns a list #GList of #GVolume for the #GDrive. + * @is_removable: Returns %TRUE if the #GDrive and/or its media is considered removable by the user. Since 2.50. + * @is_media_removable: Returns %TRUE if the #GDrive supports removal and insertion of media. + * @has_media: Returns %TRUE if the #GDrive has media inserted. + * @is_media_check_automatic: Returns %TRUE if the #GDrive is capable of automatically detecting media changes. + * @can_poll_for_media: Returns %TRUE if the #GDrive is capable of manually polling for media change. + * @can_eject: Returns %TRUE if the #GDrive can eject media. + * @eject: Ejects a #GDrive. + * @eject_finish: Finishes an eject operation. + * @poll_for_media: Poll for media insertion/removal on a #GDrive. + * @poll_for_media_finish: Finishes a media poll operation. + * @get_identifier: Returns the identifier of the given kind, or %NULL if + * the #GDrive doesn't have one. + * @enumerate_identifiers: Returns an array strings listing the kinds + * of identifiers which the #GDrive has. + * @get_start_stop_type: Gets a #GDriveStartStopType with details about starting/stopping the drive. Since 2.22. + * @can_stop: Returns %TRUE if a #GDrive can be stopped. Since 2.22. + * @stop: Stops a #GDrive. Since 2.22. + * @stop_finish: Finishes a stop operation. Since 2.22. + * @can_start: Returns %TRUE if a #GDrive can be started. Since 2.22. + * @can_start_degraded: Returns %TRUE if a #GDrive can be started degraded. Since 2.22. + * @start: Starts a #GDrive. Since 2.22. + * @start_finish: Finishes a start operation. Since 2.22. + * @stop_button: Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22. + * @eject_with_operation: Starts ejecting a #GDrive using a #GMountOperation. Since 2.22. + * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22. + * @get_sort_key: Gets a key used for sorting #GDrive instances or %NULL if no such key exists. Since 2.32. + * @get_symbolic_icon: Returns a symbolic #GIcon for the given #GDrive. Since 2.34. + * + * Interface for creating #GDrive implementations. + */ +typedef struct _GDriveIface GDriveIface; + +struct _GDriveIface +{ + GTypeInterface g_iface; + + /* signals */ + void (* changed) (GDrive *drive); + void (* disconnected) (GDrive *drive); + void (* eject_button) (GDrive *drive); + + /* Virtual Table */ + char * (* get_name) (GDrive *drive); + GIcon * (* get_icon) (GDrive *drive); + gboolean (* has_volumes) (GDrive *drive); + GList * (* get_volumes) (GDrive *drive); + gboolean (* is_media_removable) (GDrive *drive); + gboolean (* has_media) (GDrive *drive); + gboolean (* is_media_check_automatic) (GDrive *drive); + gboolean (* can_eject) (GDrive *drive); + gboolean (* can_poll_for_media) (GDrive *drive); + void (* eject) (GDrive *drive, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* eject_finish) (GDrive *drive, + GAsyncResult *result, + GError **error); + void (* poll_for_media) (GDrive *drive, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* poll_for_media_finish) (GDrive *drive, + GAsyncResult *result, + GError **error); + + char * (* get_identifier) (GDrive *drive, + const char *kind); + char ** (* enumerate_identifiers) (GDrive *drive); + + GDriveStartStopType (* get_start_stop_type) (GDrive *drive); + + gboolean (* can_start) (GDrive *drive); + gboolean (* can_start_degraded) (GDrive *drive); + void (* start) (GDrive *drive, + GDriveStartFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* start_finish) (GDrive *drive, + GAsyncResult *result, + GError **error); + + gboolean (* can_stop) (GDrive *drive); + void (* stop) (GDrive *drive, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* stop_finish) (GDrive *drive, + GAsyncResult *result, + GError **error); + /* signal, not VFunc */ + void (* stop_button) (GDrive *drive); + + void (* eject_with_operation) (GDrive *drive, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* eject_with_operation_finish) (GDrive *drive, + GAsyncResult *result, + GError **error); + + const gchar * (* get_sort_key) (GDrive *drive); + GIcon * (* get_symbolic_icon) (GDrive *drive); + gboolean (* is_removable) (GDrive *drive); + +}; + +GIO_AVAILABLE_IN_ALL +GType g_drive_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +char * g_drive_get_name (GDrive *drive); +GIO_AVAILABLE_IN_ALL +GIcon * g_drive_get_icon (GDrive *drive); +GIO_AVAILABLE_IN_ALL +GIcon * g_drive_get_symbolic_icon (GDrive *drive); +GIO_AVAILABLE_IN_ALL +gboolean g_drive_has_volumes (GDrive *drive); +GIO_AVAILABLE_IN_ALL +GList * g_drive_get_volumes (GDrive *drive); +GIO_AVAILABLE_IN_2_50 +gboolean g_drive_is_removable (GDrive *drive); +GIO_AVAILABLE_IN_ALL +gboolean g_drive_is_media_removable (GDrive *drive); +GIO_AVAILABLE_IN_ALL +gboolean g_drive_has_media (GDrive *drive); +GIO_AVAILABLE_IN_ALL +gboolean g_drive_is_media_check_automatic (GDrive *drive); +GIO_AVAILABLE_IN_ALL +gboolean g_drive_can_poll_for_media (GDrive *drive); +GIO_AVAILABLE_IN_ALL +gboolean g_drive_can_eject (GDrive *drive); +GIO_DEPRECATED_FOR(g_drive_eject_with_operation) +void g_drive_eject (GDrive *drive, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_DEPRECATED_FOR(g_drive_eject_with_operation_finish) +gboolean g_drive_eject_finish (GDrive *drive, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_drive_poll_for_media (GDrive *drive, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_drive_poll_for_media_finish (GDrive *drive, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +char * g_drive_get_identifier (GDrive *drive, + const char *kind); +GIO_AVAILABLE_IN_ALL +char ** g_drive_enumerate_identifiers (GDrive *drive); + +GIO_AVAILABLE_IN_ALL +GDriveStartStopType g_drive_get_start_stop_type (GDrive *drive); + +GIO_AVAILABLE_IN_ALL +gboolean g_drive_can_start (GDrive *drive); +GIO_AVAILABLE_IN_ALL +gboolean g_drive_can_start_degraded (GDrive *drive); +GIO_AVAILABLE_IN_ALL +void g_drive_start (GDrive *drive, + GDriveStartFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_drive_start_finish (GDrive *drive, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_drive_can_stop (GDrive *drive); +GIO_AVAILABLE_IN_ALL +void g_drive_stop (GDrive *drive, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_drive_stop_finish (GDrive *drive, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_drive_eject_with_operation (GDrive *drive, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_drive_eject_with_operation_finish (GDrive *drive, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_2_32 +const gchar *g_drive_get_sort_key (GDrive *drive); + +G_END_DECLS + +#endif /* __G_DRIVE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdtlsclientconnection.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdtlsclientconnection.h new file mode 100644 index 0000000..f8ee1f4 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdtlsclientconnection.h @@ -0,0 +1,77 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2010 Red Hat, Inc. + * Copyright © 2015 Collabora, Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_DTLS_CLIENT_CONNECTION_H__ +#define __G_DTLS_CLIENT_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DTLS_CLIENT_CONNECTION (g_dtls_client_connection_get_type ()) +#define G_DTLS_CLIENT_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_DTLS_CLIENT_CONNECTION, GDtlsClientConnection)) +#define G_IS_DTLS_CLIENT_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_DTLS_CLIENT_CONNECTION)) +#define G_DTLS_CLIENT_CONNECTION_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_DTLS_CLIENT_CONNECTION, GDtlsClientConnectionInterface)) + +typedef struct _GDtlsClientConnectionInterface GDtlsClientConnectionInterface; + +/** + * GDtlsClientConnectionInterface: + * @g_iface: The parent interface. + * + * vtable for a #GDtlsClientConnection implementation. + * + * Since: 2.48 + */ +struct _GDtlsClientConnectionInterface +{ + GTypeInterface g_iface; +}; + +GIO_AVAILABLE_IN_2_48 +GType g_dtls_client_connection_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_48 +GDatagramBased *g_dtls_client_connection_new (GDatagramBased *base_socket, + GSocketConnectable *server_identity, + GError **error); + +GIO_AVAILABLE_IN_2_48 +GTlsCertificateFlags g_dtls_client_connection_get_validation_flags (GDtlsClientConnection *conn); +GIO_AVAILABLE_IN_2_48 +void g_dtls_client_connection_set_validation_flags (GDtlsClientConnection *conn, + GTlsCertificateFlags flags); +GIO_AVAILABLE_IN_2_48 +GSocketConnectable *g_dtls_client_connection_get_server_identity (GDtlsClientConnection *conn); +GIO_AVAILABLE_IN_2_48 +void g_dtls_client_connection_set_server_identity (GDtlsClientConnection *conn, + GSocketConnectable *identity); +GIO_AVAILABLE_IN_2_48 +GList * g_dtls_client_connection_get_accepted_cas (GDtlsClientConnection *conn); + + +G_END_DECLS + +#endif /* __G_DTLS_CLIENT_CONNECTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdtlsconnection.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdtlsconnection.h new file mode 100644 index 0000000..c7513ee --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdtlsconnection.h @@ -0,0 +1,230 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2010 Red Hat, Inc. + * Copyright © 2015 Collabora, Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_DTLS_CONNECTION_H__ +#define __G_DTLS_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DTLS_CONNECTION (g_dtls_connection_get_type ()) +#define G_DTLS_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_DTLS_CONNECTION, GDtlsConnection)) +#define G_IS_DTLS_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_DTLS_CONNECTION)) +#define G_DTLS_CONNECTION_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_DTLS_CONNECTION, GDtlsConnectionInterface)) + +typedef struct _GDtlsConnectionInterface GDtlsConnectionInterface; + +/** + * GDtlsConnectionInterface: + * @g_iface: The parent interface. + * @accept_certificate: Check whether to accept a certificate. + * @handshake: Perform a handshake operation. + * @handshake_async: Start an asynchronous handshake operation. + * @handshake_finish: Finish an asynchronous handshake operation. + * @shutdown: Shut down one or both directions of the connection. + * @shutdown_async: Start an asynchronous shutdown operation. + * @shutdown_finish: Finish an asynchronous shutdown operation. + * @set_advertised_protocols: Set APLN protocol list (Since: 2.60) + * @get_negotiated_protocol: Get ALPN-negotiated protocol (Since: 2.60) + * @get_binding_data: Retrieve TLS channel binding data (Since: 2.66) + * + * Virtual method table for a #GDtlsConnection implementation. + * + * Since: 2.48 + */ +struct _GDtlsConnectionInterface +{ + GTypeInterface g_iface; + + /* signals */ + gboolean (*accept_certificate) (GDtlsConnection *connection, + GTlsCertificate *peer_cert, + GTlsCertificateFlags errors); + + /* methods */ + gboolean (*handshake) (GDtlsConnection *conn, + GCancellable *cancellable, + GError **error); + + void (*handshake_async) (GDtlsConnection *conn, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*handshake_finish) (GDtlsConnection *conn, + GAsyncResult *result, + GError **error); + + gboolean (*shutdown) (GDtlsConnection *conn, + gboolean shutdown_read, + gboolean shutdown_write, + GCancellable *cancellable, + GError **error); + + void (*shutdown_async) (GDtlsConnection *conn, + gboolean shutdown_read, + gboolean shutdown_write, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*shutdown_finish) (GDtlsConnection *conn, + GAsyncResult *result, + GError **error); + + void (*set_advertised_protocols) (GDtlsConnection *conn, + const gchar * const *protocols); + const gchar *(*get_negotiated_protocol) (GDtlsConnection *conn); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + gboolean (*get_binding_data) (GDtlsConnection *conn, + GTlsChannelBindingType type, + GByteArray *data, + GError **error); +G_GNUC_END_IGNORE_DEPRECATIONS +}; + +GIO_AVAILABLE_IN_2_48 +GType g_dtls_connection_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_48 +void g_dtls_connection_set_database (GDtlsConnection *conn, + GTlsDatabase *database); +GIO_AVAILABLE_IN_2_48 +GTlsDatabase *g_dtls_connection_get_database (GDtlsConnection *conn); + +GIO_AVAILABLE_IN_2_48 +void g_dtls_connection_set_certificate (GDtlsConnection *conn, + GTlsCertificate *certificate); +GIO_AVAILABLE_IN_2_48 +GTlsCertificate *g_dtls_connection_get_certificate (GDtlsConnection *conn); + +GIO_AVAILABLE_IN_2_48 +void g_dtls_connection_set_interaction (GDtlsConnection *conn, + GTlsInteraction *interaction); +GIO_AVAILABLE_IN_2_48 +GTlsInteraction *g_dtls_connection_get_interaction (GDtlsConnection *conn); + +GIO_AVAILABLE_IN_2_48 +GTlsCertificate *g_dtls_connection_get_peer_certificate (GDtlsConnection *conn); +GIO_AVAILABLE_IN_2_48 +GTlsCertificateFlags g_dtls_connection_get_peer_certificate_errors (GDtlsConnection *conn); + +GIO_AVAILABLE_IN_2_48 +void g_dtls_connection_set_require_close_notify (GDtlsConnection *conn, + gboolean require_close_notify); +GIO_AVAILABLE_IN_2_48 +gboolean g_dtls_connection_get_require_close_notify (GDtlsConnection *conn); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GIO_DEPRECATED_IN_2_60 +void g_dtls_connection_set_rehandshake_mode (GDtlsConnection *conn, + GTlsRehandshakeMode mode); +GIO_DEPRECATED_IN_2_60 +GTlsRehandshakeMode g_dtls_connection_get_rehandshake_mode (GDtlsConnection *conn); +G_GNUC_END_IGNORE_DEPRECATIONS + +GIO_AVAILABLE_IN_2_48 +gboolean g_dtls_connection_handshake (GDtlsConnection *conn, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_48 +void g_dtls_connection_handshake_async (GDtlsConnection *conn, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_48 +gboolean g_dtls_connection_handshake_finish (GDtlsConnection *conn, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_2_48 +gboolean g_dtls_connection_shutdown (GDtlsConnection *conn, + gboolean shutdown_read, + gboolean shutdown_write, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_48 +void g_dtls_connection_shutdown_async (GDtlsConnection *conn, + gboolean shutdown_read, + gboolean shutdown_write, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_48 +gboolean g_dtls_connection_shutdown_finish (GDtlsConnection *conn, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_2_48 +gboolean g_dtls_connection_close (GDtlsConnection *conn, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_48 +void g_dtls_connection_close_async (GDtlsConnection *conn, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_48 +gboolean g_dtls_connection_close_finish (GDtlsConnection *conn, + GAsyncResult *result, + GError **error); + +/*< protected >*/ +GIO_AVAILABLE_IN_2_48 +gboolean g_dtls_connection_emit_accept_certificate (GDtlsConnection *conn, + GTlsCertificate *peer_cert, + GTlsCertificateFlags errors); +GIO_AVAILABLE_IN_2_60 +void g_dtls_connection_set_advertised_protocols (GDtlsConnection *conn, + const gchar * const *protocols); + +GIO_AVAILABLE_IN_2_60 +const gchar * g_dtls_connection_get_negotiated_protocol (GDtlsConnection *conn); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GIO_AVAILABLE_IN_2_66 +gboolean g_dtls_connection_get_channel_binding_data (GDtlsConnection *conn, + GTlsChannelBindingType type, + GByteArray *data, + GError **error); +G_GNUC_END_IGNORE_DEPRECATIONS + +GIO_AVAILABLE_IN_2_70 +GTlsProtocolVersion g_dtls_connection_get_protocol_version (GDtlsConnection *conn); + +GIO_AVAILABLE_IN_2_70 +gchar * g_dtls_connection_get_ciphersuite_name (GDtlsConnection *conn); + +G_END_DECLS + +#endif /* __G_DTLS_CONNECTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdtlsserverconnection.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdtlsserverconnection.h new file mode 100644 index 0000000..d463660 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gdtlsserverconnection.h @@ -0,0 +1,71 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2010 Red Hat, Inc. + * Copyright © 2015 Collabora, Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_DTLS_SERVER_CONNECTION_H__ +#define __G_DTLS_SERVER_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_DTLS_SERVER_CONNECTION (g_dtls_server_connection_get_type ()) +#define G_DTLS_SERVER_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_DTLS_SERVER_CONNECTION, GDtlsServerConnection)) +#define G_IS_DTLS_SERVER_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_DTLS_SERVER_CONNECTION)) +#define G_DTLS_SERVER_CONNECTION_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_DTLS_SERVER_CONNECTION, GDtlsServerConnectionInterface)) + +/** + * GDtlsServerConnection: + * + * DTLS server-side connection. This is the server-side implementation + * of a #GDtlsConnection. + * + * Since: 2.48 + */ +typedef struct _GDtlsServerConnectionInterface GDtlsServerConnectionInterface; + +/** + * GDtlsServerConnectionInterface: + * @g_iface: The parent interface. + * + * vtable for a #GDtlsServerConnection implementation. + * + * Since: 2.48 + */ +struct _GDtlsServerConnectionInterface +{ + GTypeInterface g_iface; +}; + +GIO_AVAILABLE_IN_2_48 +GType g_dtls_server_connection_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_48 +GDatagramBased *g_dtls_server_connection_new (GDatagramBased *base_socket, + GTlsCertificate *certificate, + GError **error); + +G_END_DECLS + +#endif /* __G_DTLS_SERVER_CONNECTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gemblem.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gemblem.h new file mode 100644 index 0000000..eb00c3b --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gemblem.h @@ -0,0 +1,63 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Clemens N. Buss + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + */ + +#ifndef __G_EMBLEM_H__ +#define __G_EMBLEM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_EMBLEM (g_emblem_get_type ()) +#define G_EMBLEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_EMBLEM, GEmblem)) +#define G_EMBLEM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_EMBLEM, GEmblemClass)) +#define G_IS_EMBLEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_EMBLEM)) +#define G_IS_EMBLEM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_EMBLEM)) +#define G_EMBLEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_EMBLEM, GEmblemClass)) + +/** + * GEmblem: + * + * An object for Emblems + */ +typedef struct _GEmblem GEmblem; +typedef struct _GEmblemClass GEmblemClass; + +GIO_AVAILABLE_IN_ALL +GType g_emblem_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GEmblem *g_emblem_new (GIcon *icon); +GIO_AVAILABLE_IN_ALL +GEmblem *g_emblem_new_with_origin (GIcon *icon, + GEmblemOrigin origin); +GIO_AVAILABLE_IN_ALL +GIcon *g_emblem_get_icon (GEmblem *emblem); +GIO_AVAILABLE_IN_ALL +GEmblemOrigin g_emblem_get_origin (GEmblem *emblem); + +G_END_DECLS + +#endif /* __G_EMBLEM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gemblemedicon.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gemblemedicon.h new file mode 100644 index 0000000..1702b7b --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gemblemedicon.h @@ -0,0 +1,83 @@ +/* Gio - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Matthias Clasen + * Clemens N. Buss + */ + +#ifndef __G_EMBLEMED_ICON_H__ +#define __G_EMBLEMED_ICON_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +#define G_TYPE_EMBLEMED_ICON (g_emblemed_icon_get_type ()) +#define G_EMBLEMED_ICON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_EMBLEMED_ICON, GEmblemedIcon)) +#define G_EMBLEMED_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_EMBLEMED_ICON, GEmblemedIconClass)) +#define G_IS_EMBLEMED_ICON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_EMBLEMED_ICON)) +#define G_IS_EMBLEMED_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_EMBLEMED_ICON)) +#define G_EMBLEMED_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_EMBLEMED_ICON, GEmblemedIconClass)) + +/** + * GEmblemedIcon: + * + * An implementation of #GIcon for icons with emblems. + **/ +typedef struct _GEmblemedIcon GEmblemedIcon; +typedef struct _GEmblemedIconClass GEmblemedIconClass; +typedef struct _GEmblemedIconPrivate GEmblemedIconPrivate; + +struct _GEmblemedIcon +{ + GObject parent_instance; + + /*< private >*/ + GEmblemedIconPrivate *priv; +}; + +struct _GEmblemedIconClass +{ + GObjectClass parent_class; +}; + +GIO_AVAILABLE_IN_ALL +GType g_emblemed_icon_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GIcon *g_emblemed_icon_new (GIcon *icon, + GEmblem *emblem); +GIO_AVAILABLE_IN_ALL +GIcon *g_emblemed_icon_get_icon (GEmblemedIcon *emblemed); +GIO_AVAILABLE_IN_ALL +GList *g_emblemed_icon_get_emblems (GEmblemedIcon *emblemed); +GIO_AVAILABLE_IN_ALL +void g_emblemed_icon_add_emblem (GEmblemedIcon *emblemed, + GEmblem *emblem); +GIO_AVAILABLE_IN_ALL +void g_emblemed_icon_clear_emblems (GEmblemedIcon *emblemed); + +G_END_DECLS + +#endif /* __G_EMBLEMED_ICON_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfile.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfile.h new file mode 100644 index 0000000..7c43fe0 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfile.h @@ -0,0 +1,1359 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_FILE_H__ +#define __G_FILE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_FILE (g_file_get_type ()) +#define G_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_FILE, GFile)) +#define G_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE)) +#define G_FILE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_FILE, GFileIface)) + +#if 0 +/** + * GFile: + * + * A handle to an object implementing the #GFileIface interface. + * Generally stores a location within the file system. Handles do not + * necessarily represent files or directories that currently exist. + **/ +typedef struct _GFile GFile; /* Dummy typedef */ +#endif +typedef struct _GFileIface GFileIface; + + +/** + * GFileIface: + * @g_iface: The parent interface. + * @dup: Duplicates a #GFile. + * @hash: Creates a hash of a #GFile. + * @equal: Checks equality of two given #GFiles. + * @is_native: Checks to see if a file is native to the system. + * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme. + * @get_uri_scheme: Gets the URI scheme for a #GFile. + * @get_basename: Gets the basename for a given #GFile. + * @get_path: Gets the current path within a #GFile. + * @get_uri: Gets a URI for the path within a #GFile. + * @get_parse_name: Gets the parsed name for the #GFile. + * @get_parent: Gets the parent directory for the #GFile. + * @prefix_matches: Checks whether a #GFile contains a specified file. + * @get_relative_path: Gets the path for a #GFile relative to a given path. + * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path. + * @get_child_for_display_name: Gets the child #GFile for a given display name. + * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile. + * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile. + * @enumerate_children_finish: Finishes asynchronously enumerating the children. + * @query_info: Gets the #GFileInfo for a #GFile. + * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile. + * @query_info_finish: Finishes an asynchronous query info operation. + * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on. + * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on. + * @query_filesystem_info_finish: Finishes asynchronously getting the file system info. + * @find_enclosing_mount: Gets a #GMount for the #GFile. + * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile. + * @find_enclosing_mount_finish: Finishes asynchronously getting the volume. + * @set_display_name: Sets the display name for a #GFile. + * @set_display_name_async: Asynchronously sets a #GFile's display name. + * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name. + * @query_settable_attributes: Returns a list of #GFileAttributeInfos that can be set. + * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttributeInfos that can be set. + * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes. + * @query_writable_namespaces: Returns a list of #GFileAttributeInfo namespaces that are writable. + * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttributeInfo namespaces that are writable. + * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces. + * @set_attribute: Sets a #GFileAttributeInfo. + * @set_attributes_from_info: Sets a #GFileAttributeInfo with information from a #GFileInfo. + * @set_attributes_async: Asynchronously sets a file's attributes. + * @set_attributes_finish: Finishes setting a file's attributes asynchronously. + * @read_fn: Reads a file asynchronously. + * @read_async: Asynchronously reads a file. + * @read_finish: Finishes asynchronously reading a file. + * @append_to: Writes to the end of a file. + * @append_to_async: Asynchronously writes to the end of a file. + * @append_to_finish: Finishes an asynchronous file append operation. + * @create: Creates a new file. + * @create_async: Asynchronously creates a file. + * @create_finish: Finishes asynchronously creating a file. + * @replace: Replaces the contents of a file. + * @replace_async: Asynchronously replaces the contents of a file. + * @replace_finish: Finishes asynchronously replacing a file. + * @delete_file: Deletes a file. + * @delete_file_async: Asynchronously deletes a file. + * @delete_file_finish: Finishes an asynchronous delete. + * @trash: Sends a #GFile to the Trash location. + * @trash_async: Asynchronously sends a #GFile to the Trash location. + * @trash_finish: Finishes an asynchronous file trashing operation. + * @make_directory: Makes a directory. + * @make_directory_async: Asynchronously makes a directory. + * @make_directory_finish: Finishes making a directory asynchronously. + * @make_symbolic_link: (nullable): Makes a symbolic link. %NULL if symbolic + * links are unsupported. + * @make_symbolic_link_async: Asynchronously makes a symbolic link + * @make_symbolic_link_finish: Finishes making a symbolic link asynchronously. + * @copy: (nullable): Copies a file. %NULL if copying is unsupported, which will + * cause `GFile` to use a fallback copy method where it reads from the + * source and writes to the destination. + * @copy_async: Asynchronously copies a file. + * @copy_finish: Finishes an asynchronous copy operation. + * @move: Moves a file. + * @move_async: Asynchronously moves a file. Since: 2.72 + * @move_finish: Finishes an asynchronous move operation. Since: 2.72 + * @mount_mountable: Mounts a mountable object. + * @mount_mountable_finish: Finishes a mounting operation. + * @unmount_mountable: Unmounts a mountable object. + * @unmount_mountable_finish: Finishes an unmount operation. + * @eject_mountable: Ejects a mountable. + * @eject_mountable_finish: Finishes an eject operation. + * @mount_enclosing_volume: Mounts a specified location. + * @mount_enclosing_volume_finish: Finishes mounting a specified location. + * @monitor_dir: Creates a #GFileMonitor for the location. + * @monitor_file: Creates a #GFileMonitor for the location. + * @open_readwrite: Open file read/write. Since 2.22. + * @open_readwrite_async: Asynchronously opens file read/write. Since 2.22. + * @open_readwrite_finish: Finishes an asynchronous open read/write. Since 2.22. + * @create_readwrite: Creates file read/write. Since 2.22. + * @create_readwrite_async: Asynchronously creates file read/write. Since 2.22. + * @create_readwrite_finish: Finishes an asynchronous creates read/write. Since 2.22. + * @replace_readwrite: Replaces file read/write. Since 2.22. + * @replace_readwrite_async: Asynchronously replaces file read/write. Since 2.22. + * @replace_readwrite_finish: Finishes an asynchronous replace read/write. Since 2.22. + * @start_mountable: Starts a mountable object. Since 2.22. + * @start_mountable_finish: Finishes a start operation. Since 2.22. + * @stop_mountable: Stops a mountable. Since 2.22. + * @stop_mountable_finish: Finishes a stop operation. Since 2.22. + * @supports_thread_contexts: a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22. + * @unmount_mountable_with_operation: Unmounts a mountable object using a #GMountOperation. Since 2.22. + * @unmount_mountable_with_operation_finish: Finishes an unmount operation using a #GMountOperation. Since 2.22. + * @eject_mountable_with_operation: Ejects a mountable object using a #GMountOperation. Since 2.22. + * @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22. + * @poll_mountable: Polls a mountable object for media changes. Since 2.22. + * @poll_mountable_finish: Finishes a poll operation for media changes. Since 2.22. + * @measure_disk_usage: Recursively measures the disk usage of @file. Since 2.38 + * @measure_disk_usage_async: Asynchronously recursively measures the disk usage of @file. Since 2.38 + * @measure_disk_usage_finish: Finishes an asynchronous recursive measurement of the disk usage of @file. Since 2.38 + * + * An interface for writing VFS file handles. + **/ +struct _GFileIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + GFile * (* dup) (GFile *file); + guint (* hash) (GFile *file); + gboolean (* equal) (GFile *file1, + GFile *file2); + gboolean (* is_native) (GFile *file); + gboolean (* has_uri_scheme) (GFile *file, + const char *uri_scheme); + char * (* get_uri_scheme) (GFile *file); + char * (* get_basename) (GFile *file); + char * (* get_path) (GFile *file); + char * (* get_uri) (GFile *file); + char * (* get_parse_name) (GFile *file); + GFile * (* get_parent) (GFile *file); + gboolean (* prefix_matches) (GFile *prefix, + GFile *file); + char * (* get_relative_path) (GFile *parent, + GFile *descendant); + GFile * (* resolve_relative_path) (GFile *file, + const char *relative_path); + GFile * (* get_child_for_display_name) (GFile *file, + const char *display_name, + GError **error); + + GFileEnumerator * (* enumerate_children) (GFile *file, + const char *attributes, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); + void (* enumerate_children_async) (GFile *file, + const char *attributes, + GFileQueryInfoFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileEnumerator * (* enumerate_children_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + GFileInfo * (* query_info) (GFile *file, + const char *attributes, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); + void (* query_info_async) (GFile *file, + const char *attributes, + GFileQueryInfoFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileInfo * (* query_info_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + GFileInfo * (* query_filesystem_info) (GFile *file, + const char *attributes, + GCancellable *cancellable, + GError **error); + void (* query_filesystem_info_async) (GFile *file, + const char *attributes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileInfo * (* query_filesystem_info_finish)(GFile *file, + GAsyncResult *res, + GError **error); + + GMount * (* find_enclosing_mount) (GFile *file, + GCancellable *cancellable, + GError **error); + void (* find_enclosing_mount_async) (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GMount * (* find_enclosing_mount_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + GFile * (* set_display_name) (GFile *file, + const char *display_name, + GCancellable *cancellable, + GError **error); + void (* set_display_name_async) (GFile *file, + const char *display_name, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFile * (* set_display_name_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + GFileAttributeInfoList * (* query_settable_attributes) (GFile *file, + GCancellable *cancellable, + GError **error); + void (* _query_settable_attributes_async) (void); + void (* _query_settable_attributes_finish) (void); + + GFileAttributeInfoList * (* query_writable_namespaces) (GFile *file, + GCancellable *cancellable, + GError **error); + void (* _query_writable_namespaces_async) (void); + void (* _query_writable_namespaces_finish) (void); + + gboolean (* set_attribute) (GFile *file, + const char *attribute, + GFileAttributeType type, + gpointer value_p, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); + gboolean (* set_attributes_from_info) (GFile *file, + GFileInfo *info, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); + void (* set_attributes_async) (GFile *file, + GFileInfo *info, + GFileQueryInfoFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* set_attributes_finish) (GFile *file, + GAsyncResult *result, + GFileInfo **info, + GError **error); + + GFileInputStream * (* read_fn) (GFile *file, + GCancellable *cancellable, + GError **error); + void (* read_async) (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileInputStream * (* read_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + GFileOutputStream * (* append_to) (GFile *file, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); + void (* append_to_async) (GFile *file, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileOutputStream * (* append_to_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + GFileOutputStream * (* create) (GFile *file, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); + void (* create_async) (GFile *file, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileOutputStream * (* create_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + GFileOutputStream * (* replace) (GFile *file, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); + void (* replace_async) (GFile *file, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileOutputStream * (* replace_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + gboolean (* delete_file) (GFile *file, + GCancellable *cancellable, + GError **error); + void (* delete_file_async) (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* delete_file_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + gboolean (* trash) (GFile *file, + GCancellable *cancellable, + GError **error); + void (* trash_async) (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* trash_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + gboolean (* make_directory) (GFile *file, + GCancellable *cancellable, + GError **error); + void (* make_directory_async) (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* make_directory_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + gboolean (* make_symbolic_link) (GFile *file, + const char *symlink_value, + GCancellable *cancellable, + GError **error); + void (* make_symbolic_link_async) (GFile *file, + const char *symlink_value, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* make_symbolic_link_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + gboolean (* copy) (GFile *source, + GFile *destination, + GFileCopyFlags flags, + GCancellable *cancellable, + GFileProgressCallback progress_callback, + gpointer progress_callback_data, + GError **error); + void (* copy_async) (GFile *source, + GFile *destination, + GFileCopyFlags flags, + int io_priority, + GCancellable *cancellable, + GFileProgressCallback progress_callback, + gpointer progress_callback_data, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* copy_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + gboolean (* move) (GFile *source, + GFile *destination, + GFileCopyFlags flags, + GCancellable *cancellable, + GFileProgressCallback progress_callback, + gpointer progress_callback_data, + GError **error); + void (* move_async) (GFile *source, + GFile *destination, + GFileCopyFlags flags, + int io_priority, + GCancellable *cancellable, + GFileProgressCallback progress_callback, + gpointer progress_callback_data, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* move_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + void (* mount_mountable) (GFile *file, + GMountMountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFile * (* mount_mountable_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + void (* unmount_mountable) (GFile *file, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* unmount_mountable_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + void (* eject_mountable) (GFile *file, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* eject_mountable_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + void (* mount_enclosing_volume) (GFile *location, + GMountMountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* mount_enclosing_volume_finish) (GFile *location, + GAsyncResult *result, + GError **error); + + GFileMonitor * (* monitor_dir) (GFile *file, + GFileMonitorFlags flags, + GCancellable *cancellable, + GError **error); + GFileMonitor * (* monitor_file) (GFile *file, + GFileMonitorFlags flags, + GCancellable *cancellable, + GError **error); + + GFileIOStream * (* open_readwrite) (GFile *file, + GCancellable *cancellable, + GError **error); + void (* open_readwrite_async) (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileIOStream * (* open_readwrite_finish) (GFile *file, + GAsyncResult *res, + GError **error); + GFileIOStream * (* create_readwrite) (GFile *file, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); + void (* create_readwrite_async) (GFile *file, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileIOStream * (* create_readwrite_finish) (GFile *file, + GAsyncResult *res, + GError **error); + GFileIOStream * (* replace_readwrite) (GFile *file, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); + void (* replace_readwrite_async) (GFile *file, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileIOStream * (* replace_readwrite_finish) (GFile *file, + GAsyncResult *res, + GError **error); + + void (* start_mountable) (GFile *file, + GDriveStartFlags flags, + GMountOperation *start_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* start_mountable_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + void (* stop_mountable) (GFile *file, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* stop_mountable_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + gboolean supports_thread_contexts; + + void (* unmount_mountable_with_operation) (GFile *file, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* unmount_mountable_with_operation_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + void (* eject_mountable_with_operation) (GFile *file, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* eject_mountable_with_operation_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + void (* poll_mountable) (GFile *file, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* poll_mountable_finish) (GFile *file, + GAsyncResult *result, + GError **error); + + gboolean (* measure_disk_usage) (GFile *file, + GFileMeasureFlags flags, + GCancellable *cancellable, + GFileMeasureProgressCallback progress_callback, + gpointer progress_data, + guint64 *disk_usage, + guint64 *num_dirs, + guint64 *num_files, + GError **error); + void (* measure_disk_usage_async) (GFile *file, + GFileMeasureFlags flags, + gint io_priority, + GCancellable *cancellable, + GFileMeasureProgressCallback progress_callback, + gpointer progress_data, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* measure_disk_usage_finish) (GFile *file, + GAsyncResult *result, + guint64 *disk_usage, + guint64 *num_dirs, + guint64 *num_files, + GError **error); +}; + +GIO_AVAILABLE_IN_ALL +GType g_file_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GFile * g_file_new_for_path (const char *path); +GIO_AVAILABLE_IN_ALL +GFile * g_file_new_for_uri (const char *uri); +GIO_AVAILABLE_IN_ALL +GFile * g_file_new_for_commandline_arg (const char *arg); +GIO_AVAILABLE_IN_2_36 +GFile * g_file_new_for_commandline_arg_and_cwd (const gchar *arg, + const gchar *cwd); +GIO_AVAILABLE_IN_2_32 +GFile * g_file_new_tmp (const char *tmpl, + GFileIOStream **iostream, + GError **error); +GIO_AVAILABLE_IN_2_74 +void g_file_new_tmp_async (const char *tmpl, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_74 +GFile * g_file_new_tmp_finish (GAsyncResult *result, + GFileIOStream **iostream, + GError **error); +GIO_AVAILABLE_IN_2_74 +void g_file_new_tmp_dir_async (const char *tmpl, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_74 +GFile * g_file_new_tmp_dir_finish (GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +GFile * g_file_parse_name (const char *parse_name); +GIO_AVAILABLE_IN_2_56 +GFile * g_file_new_build_filename (const gchar *first_element, + ...) G_GNUC_NULL_TERMINATED; +GIO_AVAILABLE_IN_2_78 +GFile * g_file_new_build_filenamev (const gchar * const *args); +GIO_AVAILABLE_IN_ALL +GFile * g_file_dup (GFile *file); +GIO_AVAILABLE_IN_ALL +guint g_file_hash (gconstpointer file); +GIO_AVAILABLE_IN_ALL +gboolean g_file_equal (GFile *file1, + GFile *file2); +GIO_AVAILABLE_IN_ALL +char * g_file_get_basename (GFile *file); +GIO_AVAILABLE_IN_ALL +char * g_file_get_path (GFile *file); +GIO_AVAILABLE_IN_2_56 +const char * g_file_peek_path (GFile *file); +GIO_AVAILABLE_IN_ALL +char * g_file_get_uri (GFile *file); +GIO_AVAILABLE_IN_ALL +char * g_file_get_parse_name (GFile *file); +GIO_AVAILABLE_IN_ALL +GFile * g_file_get_parent (GFile *file); +GIO_AVAILABLE_IN_ALL +gboolean g_file_has_parent (GFile *file, + GFile *parent); +GIO_AVAILABLE_IN_ALL +GFile * g_file_get_child (GFile *file, + const char *name); +GIO_AVAILABLE_IN_ALL +GFile * g_file_get_child_for_display_name (GFile *file, + const char *display_name, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_has_prefix (GFile *file, + GFile *prefix); +GIO_AVAILABLE_IN_ALL +char * g_file_get_relative_path (GFile *parent, + GFile *descendant); +GIO_AVAILABLE_IN_ALL +GFile * g_file_resolve_relative_path (GFile *file, + const char *relative_path); +GIO_AVAILABLE_IN_ALL +gboolean g_file_is_native (GFile *file); +GIO_AVAILABLE_IN_ALL +gboolean g_file_has_uri_scheme (GFile *file, + const char *uri_scheme); +GIO_AVAILABLE_IN_ALL +char * g_file_get_uri_scheme (GFile *file); +GIO_AVAILABLE_IN_ALL +GFileInputStream * g_file_read (GFile *file, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_read_async (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GFileInputStream * g_file_read_finish (GFile *file, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GFileOutputStream * g_file_append_to (GFile *file, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +GFileOutputStream * g_file_create (GFile *file, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +GFileOutputStream * g_file_replace (GFile *file, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_append_to_async (GFile *file, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GFileOutputStream * g_file_append_to_finish (GFile *file, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_create_async (GFile *file, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GFileOutputStream * g_file_create_finish (GFile *file, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_replace_async (GFile *file, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GFileOutputStream * g_file_replace_finish (GFile *file, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GFileIOStream * g_file_open_readwrite (GFile *file, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_open_readwrite_async (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GFileIOStream * g_file_open_readwrite_finish (GFile *file, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GFileIOStream * g_file_create_readwrite (GFile *file, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_create_readwrite_async (GFile *file, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GFileIOStream * g_file_create_readwrite_finish (GFile *file, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GFileIOStream * g_file_replace_readwrite (GFile *file, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_replace_readwrite_async (GFile *file, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GFileIOStream * g_file_replace_readwrite_finish (GFile *file, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_query_exists (GFile *file, + GCancellable *cancellable); +GIO_AVAILABLE_IN_ALL +GFileType g_file_query_file_type (GFile *file, + GFileQueryInfoFlags flags, + GCancellable *cancellable); +GIO_AVAILABLE_IN_ALL +GFileInfo * g_file_query_info (GFile *file, + const char *attributes, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_query_info_async (GFile *file, + const char *attributes, + GFileQueryInfoFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GFileInfo * g_file_query_info_finish (GFile *file, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GFileInfo * g_file_query_filesystem_info (GFile *file, + const char *attributes, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_query_filesystem_info_async (GFile *file, + const char *attributes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GFileInfo * g_file_query_filesystem_info_finish (GFile *file, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GMount * g_file_find_enclosing_mount (GFile *file, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_find_enclosing_mount_async (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GMount * g_file_find_enclosing_mount_finish (GFile *file, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GFileEnumerator * g_file_enumerate_children (GFile *file, + const char *attributes, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_enumerate_children_async (GFile *file, + const char *attributes, + GFileQueryInfoFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GFileEnumerator * g_file_enumerate_children_finish (GFile *file, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +GFile * g_file_set_display_name (GFile *file, + const char *display_name, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_set_display_name_async (GFile *file, + const char *display_name, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GFile * g_file_set_display_name_finish (GFile *file, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_delete (GFile *file, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_34 +void g_file_delete_async (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_2_34 +gboolean g_file_delete_finish (GFile *file, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_file_trash (GFile *file, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_38 +void g_file_trash_async (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_2_38 +gboolean g_file_trash_finish (GFile *file, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_file_copy (GFile *source, + GFile *destination, + GFileCopyFlags flags, + GCancellable *cancellable, + GFileProgressCallback progress_callback, + gpointer progress_callback_data, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_copy_async (GFile *source, + GFile *destination, + GFileCopyFlags flags, + int io_priority, + GCancellable *cancellable, + GFileProgressCallback progress_callback, + gpointer progress_callback_data, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_file_copy_finish (GFile *file, + GAsyncResult *res, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_move (GFile *source, + GFile *destination, + GFileCopyFlags flags, + GCancellable *cancellable, + GFileProgressCallback progress_callback, + gpointer progress_callback_data, + GError **error); +GIO_AVAILABLE_IN_2_72 +void g_file_move_async (GFile *source, + GFile *destination, + GFileCopyFlags flags, + int io_priority, + GCancellable *cancellable, + GFileProgressCallback progress_callback, + gpointer progress_callback_data, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_72 +gboolean g_file_move_finish (GFile *file, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_make_directory (GFile *file, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_38 +void g_file_make_directory_async (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_38 +gboolean g_file_make_directory_finish (GFile *file, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_file_make_directory_with_parents (GFile *file, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_make_symbolic_link (GFile *file, + const char *symlink_value, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_74 +void g_file_make_symbolic_link_async (GFile *file, + const char *symlink_value, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_74 +gboolean g_file_make_symbolic_link_finish (GFile *file, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_set_attribute (GFile *file, + const char *attribute, + GFileAttributeType type, + gpointer value_p, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_set_attributes_from_info (GFile *file, + GFileInfo *info, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_set_attributes_async (GFile *file, + GFileInfo *info, + GFileQueryInfoFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_file_set_attributes_finish (GFile *file, + GAsyncResult *result, + GFileInfo **info, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_set_attribute_string (GFile *file, + const char *attribute, + const char *value, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_set_attribute_byte_string (GFile *file, + const char *attribute, + const char *value, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_set_attribute_uint32 (GFile *file, + const char *attribute, + guint32 value, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_set_attribute_int32 (GFile *file, + const char *attribute, + gint32 value, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_set_attribute_uint64 (GFile *file, + const char *attribute, + guint64 value, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_set_attribute_int64 (GFile *file, + const char *attribute, + gint64 value, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_mount_enclosing_volume (GFile *location, + GMountMountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_file_mount_enclosing_volume_finish (GFile *location, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_mount_mountable (GFile *file, + GMountMountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GFile * g_file_mount_mountable_finish (GFile *file, + GAsyncResult *result, + GError **error); +GIO_DEPRECATED_FOR(g_file_unmount_mountable_with_operation) +void g_file_unmount_mountable (GFile *file, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_DEPRECATED_FOR(g_file_unmount_mountable_with_operation_finish) +gboolean g_file_unmount_mountable_finish (GFile *file, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_unmount_mountable_with_operation (GFile *file, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_file_unmount_mountable_with_operation_finish (GFile *file, + GAsyncResult *result, + GError **error); +GIO_DEPRECATED_FOR(g_file_eject_mountable_with_operation) +void g_file_eject_mountable (GFile *file, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_DEPRECATED_FOR(g_file_eject_mountable_with_operation_finish) +gboolean g_file_eject_mountable_finish (GFile *file, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_eject_mountable_with_operation (GFile *file, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_file_eject_mountable_with_operation_finish (GFile *file, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_2_68 +char * g_file_build_attribute_list_for_copy (GFile *file, + GFileCopyFlags flags, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_file_copy_attributes (GFile *source, + GFile *destination, + GFileCopyFlags flags, + GCancellable *cancellable, + GError **error); + + +GIO_AVAILABLE_IN_ALL +GFileMonitor* g_file_monitor_directory (GFile *file, + GFileMonitorFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +GFileMonitor* g_file_monitor_file (GFile *file, + GFileMonitorFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +GFileMonitor* g_file_monitor (GFile *file, + GFileMonitorFlags flags, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_38 +gboolean g_file_measure_disk_usage (GFile *file, + GFileMeasureFlags flags, + GCancellable *cancellable, + GFileMeasureProgressCallback progress_callback, + gpointer progress_data, + guint64 *disk_usage, + guint64 *num_dirs, + guint64 *num_files, + GError **error); + +GIO_AVAILABLE_IN_2_38 +void g_file_measure_disk_usage_async (GFile *file, + GFileMeasureFlags flags, + gint io_priority, + GCancellable *cancellable, + GFileMeasureProgressCallback progress_callback, + gpointer progress_data, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_2_38 +gboolean g_file_measure_disk_usage_finish (GFile *file, + GAsyncResult *result, + guint64 *disk_usage, + guint64 *num_dirs, + guint64 *num_files, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_file_start_mountable (GFile *file, + GDriveStartFlags flags, + GMountOperation *start_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_file_start_mountable_finish (GFile *file, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_stop_mountable (GFile *file, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_file_stop_mountable_finish (GFile *file, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_file_poll_mountable (GFile *file, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_file_poll_mountable_finish (GFile *file, + GAsyncResult *result, + GError **error); + +/* Utilities */ + +GIO_AVAILABLE_IN_ALL +GAppInfo *g_file_query_default_handler (GFile *file, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_60 +void g_file_query_default_handler_async (GFile *file, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_60 +GAppInfo *g_file_query_default_handler_finish (GFile *file, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_file_load_contents (GFile *file, + GCancellable *cancellable, + char **contents, + gsize *length, + char **etag_out, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_load_contents_async (GFile *file, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_file_load_contents_finish (GFile *file, + GAsyncResult *res, + char **contents, + gsize *length, + char **etag_out, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_load_partial_contents_async (GFile *file, + GCancellable *cancellable, + GFileReadMoreCallback read_more_callback, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_file_load_partial_contents_finish (GFile *file, + GAsyncResult *res, + char **contents, + gsize *length, + char **etag_out, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_replace_contents (GFile *file, + const char *contents, + gsize length, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + char **new_etag, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_replace_contents_async (GFile *file, + const char *contents, + gsize length, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_40 +void g_file_replace_contents_bytes_async (GFile *file, + GBytes *contents, + const char *etag, + gboolean make_backup, + GFileCreateFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_file_replace_contents_finish (GFile *file, + GAsyncResult *res, + char **new_etag, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_file_supports_thread_contexts (GFile *file); + +GIO_AVAILABLE_IN_2_56 +GBytes *g_file_load_bytes (GFile *file, + GCancellable *cancellable, + gchar **etag_out, + GError **error); +GIO_AVAILABLE_IN_2_56 +void g_file_load_bytes_async (GFile *file, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_56 +GBytes *g_file_load_bytes_finish (GFile *file, + GAsyncResult *result, + gchar **etag_out, + GError **error); + +G_END_DECLS + +#endif /* __G_FILE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileattribute.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileattribute.h new file mode 100644 index 0000000..0ce6098 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileattribute.h @@ -0,0 +1,86 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_FILE_ATTRIBUTE_H__ +#define __G_FILE_ATTRIBUTE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * GFileAttributeInfo: + * @name: the name of the attribute. + * @type: the #GFileAttributeType type of the attribute. + * @flags: a set of #GFileAttributeInfoFlags. + * + * Information about a specific attribute. + **/ +struct _GFileAttributeInfo +{ + char *name; + GFileAttributeType type; + GFileAttributeInfoFlags flags; +}; + +/** + * GFileAttributeInfoList: + * @infos: an array of #GFileAttributeInfos. + * @n_infos: the number of values in the array. + * + * Acts as a lightweight registry for possible valid file attributes. + * The registry stores Key-Value pair formats as #GFileAttributeInfos. + **/ +struct _GFileAttributeInfoList +{ + GFileAttributeInfo *infos; + int n_infos; +}; + +#define G_TYPE_FILE_ATTRIBUTE_INFO_LIST (g_file_attribute_info_list_get_type ()) +GIO_AVAILABLE_IN_ALL +GType g_file_attribute_info_list_get_type (void); + +GIO_AVAILABLE_IN_ALL +GFileAttributeInfoList * g_file_attribute_info_list_new (void); +GIO_AVAILABLE_IN_ALL +GFileAttributeInfoList * g_file_attribute_info_list_ref (GFileAttributeInfoList *list); +GIO_AVAILABLE_IN_ALL +void g_file_attribute_info_list_unref (GFileAttributeInfoList *list); +GIO_AVAILABLE_IN_ALL +GFileAttributeInfoList * g_file_attribute_info_list_dup (GFileAttributeInfoList *list); +GIO_AVAILABLE_IN_ALL +const GFileAttributeInfo *g_file_attribute_info_list_lookup (GFileAttributeInfoList *list, + const char *name); +GIO_AVAILABLE_IN_ALL +void g_file_attribute_info_list_add (GFileAttributeInfoList *list, + const char *name, + GFileAttributeType type, + GFileAttributeInfoFlags flags); + +G_END_DECLS + +#endif /* __G_FILE_INFO_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileenumerator.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileenumerator.h new file mode 100644 index 0000000..eddb580 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileenumerator.h @@ -0,0 +1,154 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_FILE_ENUMERATOR_H__ +#define __G_FILE_ENUMERATOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_FILE_ENUMERATOR (g_file_enumerator_get_type ()) +#define G_FILE_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_ENUMERATOR, GFileEnumerator)) +#define G_FILE_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_ENUMERATOR, GFileEnumeratorClass)) +#define G_IS_FILE_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_ENUMERATOR)) +#define G_IS_FILE_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_ENUMERATOR)) +#define G_FILE_ENUMERATOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_ENUMERATOR, GFileEnumeratorClass)) + +/** + * GFileEnumerator: + * + * A per matched file iterator. + **/ +typedef struct _GFileEnumeratorClass GFileEnumeratorClass; +typedef struct _GFileEnumeratorPrivate GFileEnumeratorPrivate; + +struct _GFileEnumerator +{ + GObject parent_instance; + + /*< private >*/ + GFileEnumeratorPrivate *priv; +}; + +struct _GFileEnumeratorClass +{ + GObjectClass parent_class; + + /* Virtual Table */ + + GFileInfo * (* next_file) (GFileEnumerator *enumerator, + GCancellable *cancellable, + GError **error); + gboolean (* close_fn) (GFileEnumerator *enumerator, + GCancellable *cancellable, + GError **error); + + void (* next_files_async) (GFileEnumerator *enumerator, + int num_files, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GList * (* next_files_finish) (GFileEnumerator *enumerator, + GAsyncResult *result, + GError **error); + void (* close_async) (GFileEnumerator *enumerator, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* close_finish) (GFileEnumerator *enumerator, + GAsyncResult *result, + GError **error); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); + void (*_g_reserved7) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_file_enumerator_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GFileInfo *g_file_enumerator_next_file (GFileEnumerator *enumerator, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_enumerator_close (GFileEnumerator *enumerator, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_enumerator_next_files_async (GFileEnumerator *enumerator, + int num_files, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GList * g_file_enumerator_next_files_finish (GFileEnumerator *enumerator, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_enumerator_close_async (GFileEnumerator *enumerator, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_file_enumerator_close_finish (GFileEnumerator *enumerator, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_file_enumerator_is_closed (GFileEnumerator *enumerator); +GIO_AVAILABLE_IN_ALL +gboolean g_file_enumerator_has_pending (GFileEnumerator *enumerator); +GIO_AVAILABLE_IN_ALL +void g_file_enumerator_set_pending (GFileEnumerator *enumerator, + gboolean pending); +GIO_AVAILABLE_IN_ALL +GFile * g_file_enumerator_get_container (GFileEnumerator *enumerator); +GIO_AVAILABLE_IN_2_36 +GFile * g_file_enumerator_get_child (GFileEnumerator *enumerator, + GFileInfo *info); + +GIO_AVAILABLE_IN_2_44 +gboolean g_file_enumerator_iterate (GFileEnumerator *direnum, + GFileInfo **out_info, + GFile **out_child, + GCancellable *cancellable, + GError **error); + + +G_END_DECLS + +#endif /* __G_FILE_ENUMERATOR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileicon.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileicon.h new file mode 100644 index 0000000..230acdf --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileicon.h @@ -0,0 +1,59 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_FILE_ICON_H__ +#define __G_FILE_ICON_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_FILE_ICON (g_file_icon_get_type ()) +#define G_FILE_ICON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_ICON, GFileIcon)) +#define G_FILE_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_ICON, GFileIconClass)) +#define G_IS_FILE_ICON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_ICON)) +#define G_IS_FILE_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_ICON)) +#define G_FILE_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_ICON, GFileIconClass)) + +/** + * GFileIcon: + * + * Gets an icon for a #GFile. Implements #GLoadableIcon. + **/ +typedef struct _GFileIconClass GFileIconClass; + +GIO_AVAILABLE_IN_ALL +GType g_file_icon_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GIcon * g_file_icon_new (GFile *file); + +GIO_AVAILABLE_IN_ALL +GFile * g_file_icon_get_file (GFileIcon *icon); + +G_END_DECLS + +#endif /* __G_FILE_ICON_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileinfo.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileinfo.h new file mode 100644 index 0000000..95207b8 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileinfo.h @@ -0,0 +1,1546 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_FILE_INFO_H__ +#define __G_FILE_INFO_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_FILE_INFO (g_file_info_get_type ()) +#define G_FILE_INFO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_INFO, GFileInfo)) +#define G_FILE_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_INFO, GFileInfoClass)) +#define G_IS_FILE_INFO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_INFO)) +#define G_IS_FILE_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_INFO)) +#define G_FILE_INFO_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_INFO, GFileInfoClass)) + +/** + * GFileInfo: + * + * Stores information about a file system object referenced by a #GFile. + **/ +typedef struct _GFileInfoClass GFileInfoClass; + + +/* Common Attributes: */ +/** + * G_FILE_ATTRIBUTE_STANDARD_TYPE: + * + * A key in the "standard" namespace for storing file types. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + * + * The value for this key should contain a #GFileType. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_TYPE "standard::type" /* uint32 (GFileType) */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN: + * + * A key in the "standard" namespace for checking if a file is hidden. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN "standard::is-hidden" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP: + * + * A key in the "standard" namespace for checking if a file is a backup file. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP "standard::is-backup" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK: + * + * A key in the "standard" namespace for checking if the file is a symlink. + * Typically the actual type is something else, if we followed the symlink + * to get the type. + * + * On Windows NTFS mountpoints are considered to be symlinks as well. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK "standard::is-symlink" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL: + * + * A key in the "standard" namespace for checking if a file is virtual. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL "standard::is-virtual" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE: + * + * A key in the "standard" namespace for checking if a file is + * volatile. This is meant for opaque, non-POSIX-like backends to + * indicate that the URI is not persistent. Applications should look + * at %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET for the persistent URI. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.46 + **/ +#define G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE "standard::is-volatile" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_NAME: + * + * A key in the "standard" namespace for getting the name of the file. + * + * The name is the on-disk filename which may not be in any known encoding, + * and can thus not be generally displayed as is. It is guaranteed to be set on + * every file. + * + * Use %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the + * name in a user interface. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_NAME "standard::name" /* byte string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME: + * + * A key in the "standard" namespace for getting the display name of the file. + * + * A display name is guaranteed to be in UTF-8 and can thus be displayed in + * the UI. It is guaranteed to be set on every file. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "standard::display-name" /* string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME: + * + * A key in the "standard" namespace for edit name of the file. + * + * An edit name is similar to the display name, but it is meant to be + * used when you want to rename the file in the UI. The display name + * might contain information you don't want in the new filename (such as + * "(invalid unicode)" if the filename was in an invalid encoding). + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME "standard::edit-name" /* string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_COPY_NAME: + * + * A key in the "standard" namespace for getting the copy name of the file. + * + * The copy name is an optional version of the name. If available it's always + * in UTF8, and corresponds directly to the original filename (only transcoded to + * UTF8). This is useful if you want to copy the file to another filesystem that + * might have a different encoding. If the filename is not a valid string in the + * encoding selected for the filesystem it is in then the copy name will not be set. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_COPY_NAME "standard::copy-name" /* string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION: + * + * A key in the "standard" namespace for getting the description of the file. + * + * The description is a utf8 string that describes the file, generally containing + * the filename, but can also contain further information. Example descriptions + * could be "filename (on hostname)" for a remote file or "filename (in trash)" + * for a file in the trash. This is useful for instance as the window title + * when displaying a directory or for a bookmarks menu. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION "standard::description" /* string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_ICON: + * + * A key in the "standard" namespace for getting the icon for the file. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. + * + * The value for this key should contain a #GIcon. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_ICON "standard::icon" /* object (GIcon) */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON: + * + * A key in the "standard" namespace for getting the symbolic icon for the file. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. + * + * The value for this key should contain a #GIcon. + * + * Since: 2.34 + **/ +#define G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON "standard::symbolic-icon" /* object (GIcon) */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE: + * + * A key in the "standard" namespace for getting the content type of the file. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * + * The value for this key should contain a valid content type. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "standard::content-type" /* string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE: + * + * A key in the "standard" namespace for getting the fast content type. + * + * The fast content type isn't as reliable as the regular one, as it + * only uses the filename to guess it, but it is faster to calculate than the + * regular content type. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * + **/ +#define G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE "standard::fast-content-type" /* string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_SIZE: + * + * A key in the "standard" namespace for getting the file's size (in bytes). + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_SIZE "standard::size" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE: + * + * A key in the "standard" namespace for getting the amount of disk space + * that is consumed by the file (in bytes). + * + * This will generally be larger than the file size (due to block size + * overhead) but can occasionally be smaller (for example, for sparse files). + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + * + * Since: 2.20 + **/ +#define G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE "standard::allocated-size" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET: + * + * A key in the "standard" namespace for getting the symlink target, if the file + * is a symlink. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET "standard::symlink-target" /* byte string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_TARGET_URI: + * + * A key in the "standard" namespace for getting the target URI for the file, in + * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_TARGET_URI "standard::target-uri" /* string */ + +/** + * G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER: + * + * A key in the "standard" namespace for setting the sort order of a file. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32. + * + * An example use would be in file managers, which would use this key + * to set the order files are displayed. Files with smaller sort order + * should be sorted first, and files without sort order as if sort order + * was zero. + **/ +#define G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER "standard::sort-order" /* int32 */ + +/* Entity tags, used to avoid missing updates on save */ + +/** + * G_FILE_ATTRIBUTE_ETAG_VALUE: + * + * A key in the "etag" namespace for getting the value of the file's + * entity tag. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_ETAG_VALUE "etag::value" /* string */ + +/* File identifier, for e.g. avoiding loops when doing recursive + * directory scanning + */ + +/** + * G_FILE_ATTRIBUTE_ID_FILE: + * + * A key in the "id" namespace for getting a file identifier. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * + * An example use would be during listing files, to avoid recursive + * directory scanning. + **/ +#define G_FILE_ATTRIBUTE_ID_FILE "id::file" /* string */ + +/** + * G_FILE_ATTRIBUTE_ID_FILESYSTEM: + * + * A key in the "id" namespace for getting the file system identifier. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * + * An example use would be during drag and drop to see if the source + * and target are on the same filesystem (default to move) or not (default + * to copy). + **/ +#define G_FILE_ATTRIBUTE_ID_FILESYSTEM "id::filesystem" /* string */ + +/* Calculated Access Rights for current user */ + +/** + * G_FILE_ATTRIBUTE_ACCESS_CAN_READ: + * + * A key in the "access" namespace for getting read privileges. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * This attribute will be %TRUE if the user is able to read the file. + **/ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_READ "access::can-read" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE: + * + * A key in the "access" namespace for getting write privileges. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * This attribute will be %TRUE if the user is able to write to the file. + **/ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE "access::can-write" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE: + * + * A key in the "access" namespace for getting execution privileges. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * This attribute will be %TRUE if the user is able to execute the file. + **/ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE "access::can-execute" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE: + * + * A key in the "access" namespace for checking deletion privileges. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * This attribute will be %TRUE if the user is able to delete the file. + **/ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE "access::can-delete" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH: + * + * A key in the "access" namespace for checking trashing privileges. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * This attribute will be %TRUE if the user is able to move the file to + * the trash. + **/ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH "access::can-trash" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME: + * + * A key in the "access" namespace for checking renaming privileges. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * This attribute will be %TRUE if the user is able to rename the file. + **/ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME "access::can-rename" /* boolean */ + +/* TODO: Should we have special version for directories? can_enumerate, etc */ + +/* Mountable attributes */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT: + * + * A key in the "mountable" namespace for checking if a file (of + * type G_FILE_TYPE_MOUNTABLE) is mountable. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT "mountable::can-mount" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT: + * + * A key in the "mountable" namespace for checking if a file (of + * type G_FILE_TYPE_MOUNTABLE) is unmountable. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT "mountable::can-unmount" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT: + * + * A key in the "mountable" namespace for checking if a file (of + * type G_FILE_TYPE_MOUNTABLE) can be ejected. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT "mountable::can-eject" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE: + * + * A key in the "mountable" namespace for getting the unix device. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE "mountable::unix-device" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE: + * + * A key in the "mountable" namespace for getting the unix device file. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * + * Since: 2.22 + **/ +#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE "mountable::unix-device-file" /* string */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI: + * + * A key in the "mountable" namespace for getting the HAL UDI for the mountable + * file. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI "mountable::hal-udi" /* string */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START: + * + * A key in the "mountable" namespace for checking if a file (of + * type G_FILE_TYPE_MOUNTABLE) can be started. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.22 + */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START "mountable::can-start" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED: + * + * A key in the "mountable" namespace for checking if a file (of + * type G_FILE_TYPE_MOUNTABLE) can be started degraded. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.22 + */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED "mountable::can-start-degraded" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP: + * + * A key in the "mountable" namespace for checking if a file (of + * type G_FILE_TYPE_MOUNTABLE) can be stopped. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.22 + */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP "mountable::can-stop" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE: + * + * A key in the "mountable" namespace for getting the #GDriveStartStopType. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + * + * Since: 2.22 + */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE "mountable::start-stop-type" /* uint32 (GDriveStartStopType) */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL: + * + * A key in the "mountable" namespace for checking if a file (of + * type G_FILE_TYPE_MOUNTABLE) can be polled. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.22 + */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL "mountable::can-poll" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC: + * + * A key in the "mountable" namespace for checking if a file (of + * type G_FILE_TYPE_MOUNTABLE) is automatically polled for media. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.22 + */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC "mountable::is-media-check-automatic" /* boolean */ + +/* Time attributes */ + +/** + * G_FILE_ATTRIBUTE_TIME_MODIFIED: + * + * A key in the "time" namespace for getting the time the file was last + * modified. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, and + * contains the time since the file was modified, in seconds since the UNIX + * epoch. + **/ +#define G_FILE_ATTRIBUTE_TIME_MODIFIED "time::modified" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC: + * + * A key in the "time" namespace for getting the microseconds of the time + * the file was last modified. + * + * This should be used in conjunction with %G_FILE_ATTRIBUTE_TIME_MODIFIED. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC "time::modified-usec" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_TIME_MODIFIED_NSEC: + * + * A key in the "time" namespace for getting the nanoseconds of the time + * the file was last modified. This should be used in conjunction with + * #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_UINT32. + * + * Since: 2.74 + **/ +#define G_FILE_ATTRIBUTE_TIME_MODIFIED_NSEC "time::modified-nsec" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_TIME_ACCESS: + * + * A key in the "time" namespace for getting the time the file was last + * accessed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, and + * contains the time since the file was last accessed, in seconds since the + * UNIX epoch. + **/ +#define G_FILE_ATTRIBUTE_TIME_ACCESS "time::access" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_TIME_ACCESS_USEC: + * + * A key in the "time" namespace for getting the microseconds of the time + * the file was last accessed. + * + * This should be used in conjunction with %G_FILE_ATTRIBUTE_TIME_ACCESS. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_TIME_ACCESS_USEC "time::access-usec" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_TIME_ACCESS_NSEC: + * + * A key in the "time" namespace for getting the nanoseconds of the time + * the file was last accessed. This should be used in conjunction with + * #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_UINT32. + * + * Since: 2.74 + **/ +#define G_FILE_ATTRIBUTE_TIME_ACCESS_NSEC "time::access-nsec" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_TIME_CHANGED: + * + * A key in the "time" namespace for getting the time the file was last + * changed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, + * and contains the time since the file was last changed, in seconds since + * the UNIX epoch. + * + * This corresponds to the traditional UNIX ctime. + **/ +#define G_FILE_ATTRIBUTE_TIME_CHANGED "time::changed" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_TIME_CHANGED_USEC: + * + * A key in the "time" namespace for getting the microseconds of the time + * the file was last changed. + * + * This should be used in conjunction with %G_FILE_ATTRIBUTE_TIME_CHANGED. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_TIME_CHANGED_USEC "time::changed-usec" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_TIME_CHANGED_NSEC: + * + * A key in the "time" namespace for getting the nanoseconds of the time + * the file was last changed. This should be used in conjunction with + * #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_UINT32. + * + * Since: 2.74 + **/ +#define G_FILE_ATTRIBUTE_TIME_CHANGED_NSEC "time::changed-nsec" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_TIME_CREATED: + * + * A key in the "time" namespace for getting the time the file was created. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, + * and contains the time since the file was created, in seconds since the UNIX + * epoch. + * + * This may correspond to Linux `stx_btime`, FreeBSD `st_birthtim`, NetBSD + * `st_birthtime` or NTFS `ctime`. + **/ +#define G_FILE_ATTRIBUTE_TIME_CREATED "time::created" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_TIME_CREATED_USEC: + * + * A key in the "time" namespace for getting the microseconds of the time + * the file was created. + * + * This should be used in conjunction with %G_FILE_ATTRIBUTE_TIME_CREATED. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_TIME_CREATED_USEC "time::created-usec" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_TIME_CREATED_NSEC: + * + * A key in the "time" namespace for getting the nanoseconds of the time + * the file was created. This should be used in conjunction with + * #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is + * %G_FILE_ATTRIBUTE_TYPE_UINT32. + * + * Since: 2.74 + **/ +#define G_FILE_ATTRIBUTE_TIME_CREATED_NSEC "time::created-nsec" /* uint32 */ + +/* Unix specific attributes */ + +/** + * G_FILE_ATTRIBUTE_UNIX_DEVICE: + * + * A key in the "unix" namespace for getting the device id of the device the + * file is located on (see stat() documentation). + * + * This attribute is only available for UNIX file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_UNIX_DEVICE "unix::device" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_INODE: + * + * A key in the "unix" namespace for getting the inode of the file. + * + * This attribute is only available for UNIX file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + **/ +#define G_FILE_ATTRIBUTE_UNIX_INODE "unix::inode" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_MODE: + * + * A key in the "unix" namespace for getting the mode of the file + * (e.g. whether the file is a regular file, symlink, etc). + * + * See the documentation for `lstat()`: this attribute is equivalent to + * the `st_mode` member of `struct stat`, and includes both the file type + * and permissions. + * + * This attribute is only available for UNIX file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_UNIX_MODE "unix::mode" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_NLINK: + * + * A key in the "unix" namespace for getting the number of hard links + * for a file. + * + * See the documentation for `lstat()`. + * + * This attribute is only available for UNIX file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_UNIX_NLINK "unix::nlink" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_UID: + * + * A key in the "unix" namespace for getting the user ID for the file. + * + * This attribute is only available for UNIX file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_UNIX_UID "unix::uid" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_GID: + * + * A key in the "unix" namespace for getting the group ID for the file. + * + * This attribute is only available for UNIX file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_UNIX_GID "unix::gid" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_RDEV: + * + * A key in the "unix" namespace for getting the device ID for the file + * (if it is a special file). + * + * See the documentation for `lstat()`. + * + * This attribute is only available for UNIX file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_UNIX_RDEV "unix::rdev" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE: + * + * A key in the "unix" namespace for getting the block size for the file + * system. + * + * This attribute is only available for UNIX file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE "unix::block-size" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_BLOCKS: + * + * A key in the "unix" namespace for getting the number of blocks allocated + * for the file. + * + * This attribute is only available for UNIX file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + **/ +#define G_FILE_ATTRIBUTE_UNIX_BLOCKS "unix::blocks" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT: + * + * A key in the "unix" namespace for checking if the file represents a + * UNIX mount point. + * + * This attribute is %TRUE if the file is a UNIX mount point. + * + * Since 2.58, `/` is considered to be a mount point. + * + * This attribute is only available for UNIX file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT "unix::is-mountpoint" /* boolean */ + +/* DOS specific attributes */ + +/** + * G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE: + * + * A key in the "dos" namespace for checking if the file's archive flag + * is set. + * + * This attribute is %TRUE if the archive flag is set. + * + * This attribute is only available for DOS file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE "dos::is-archive" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_DOS_IS_SYSTEM: + * + * A key in the "dos" namespace for checking if the file's backup flag + * is set. + * + * This attribute is %TRUE if the backup flag is set. + * + * This attribute is only available for DOS file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_DOS_IS_SYSTEM "dos::is-system" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT: + * + * A key in the "dos" namespace for checking if the file is a NTFS mount point + * (a volume mount or a junction point). + * + * This attribute is %TRUE if file is a reparse point of type + * [IO_REPARSE_TAG_MOUNT_POINT](https://msdn.microsoft.com/en-us/library/dd541667.aspx). + * + * This attribute is only available for DOS file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.60 + **/ +#define G_FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT "dos::is-mountpoint" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG: + * + * A key in the "dos" namespace for getting the file NTFS reparse tag. + * + * This value is 0 for files that are not reparse points. + * + * See the [Reparse Tags](https://msdn.microsoft.com/en-us/library/dd541667.aspx) + * page for possible reparse tag values. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + * + * Since: 2.60 + **/ +#define G_FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG "dos::reparse-point-tag" /* uint32 */ + +/* Owner attributes */ + +/** + * G_FILE_ATTRIBUTE_OWNER_USER: + * + * A key in the "owner" namespace for getting the user name of the + * file's owner. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_OWNER_USER "owner::user" /* string */ + +/** + * G_FILE_ATTRIBUTE_OWNER_USER_REAL: + * + * A key in the "owner" namespace for getting the real name of the + * user that owns the file. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_OWNER_USER_REAL "owner::user-real" /* string */ + +/** + * G_FILE_ATTRIBUTE_OWNER_GROUP: + * + * A key in the "owner" namespace for getting the file owner's group. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_OWNER_GROUP "owner::group" /* string */ + +/* Thumbnails */ + +/** + * G_FILE_ATTRIBUTE_THUMBNAIL_PATH: + * + * A key in the "thumbnail" namespace for getting the path to the thumbnail + * image with the biggest size available. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + **/ +#define G_FILE_ATTRIBUTE_THUMBNAIL_PATH "thumbnail::path" /* bytestring */ +/** + * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED: + * + * A key in the "thumbnail" namespace for checking if thumbnailing failed. + * + * This attribute is %TRUE if thumbnailing failed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED "thumbnail::failed" /* boolean */ +/** + * G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID: + * + * A key in the "thumbnail" namespace for checking whether the thumbnail is outdated. + * + * This attribute is %TRUE if the thumbnail is up-to-date with the file it represents, + * and %FALSE if the file has been modified since the thumbnail was generated. + * + * If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED is %TRUE and this attribute is %FALSE, + * it indicates that thumbnailing may be attempted again and may succeed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.40 + */ +#define G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID "thumbnail::is-valid" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_THUMBNAIL_PATH_NORMAL: + * + * A key in the "thumbnail" namespace for getting the path to the normal + * thumbnail image. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + * + * Since: 2.76 + */ +#define G_FILE_ATTRIBUTE_THUMBNAIL_PATH_NORMAL "thumbnail::path-normal" /* bytestring */ +/** + * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMAL: + * + * A key in the "thumbnail" namespace for checking if thumbnailing failed + * for the normal image. + * + * This attribute is %TRUE if thumbnailing failed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.76 + */ +#define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMAL "thumbnail::failed-normal" /* boolean */ +/** + * G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_NORMAL: + * + * A key in the "thumbnail" namespace for checking whether the normal + * thumbnail is outdated. + * + * This attribute is %TRUE if the normal thumbnail is up-to-date with the file + * it represents, and %FALSE if the file has been modified since the thumbnail + * was generated. + * + * If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMAL is %TRUE and this attribute + * is %FALSE, it indicates that thumbnailing may be attempted again and may + * succeed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.76 + */ +#define G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_NORMAL "thumbnail::is-valid-normal" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_THUMBNAIL_PATH_LARGE: + * + * A key in the "thumbnail" namespace for getting the path to the large + * thumbnail image. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + * + * Since: 2.76 + */ +#define G_FILE_ATTRIBUTE_THUMBNAIL_PATH_LARGE "thumbnail::path-large" /* bytestring */ +/** + * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGE: + * + * A key in the "thumbnail" namespace for checking if thumbnailing failed + * for the large image. + * + * This attribute is %TRUE if thumbnailing failed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.76 + */ +#define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGE "thumbnail::failed-large" /* boolean */ +/** + * G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_LARGE: + * + * A key in the "thumbnail" namespace for checking whether the large + * thumbnail is outdated. + * + * This attribute is %TRUE if the large thumbnail is up-to-date with the file + * it represents, and %FALSE if the file has been modified since the thumbnail + * was generated. + * + * If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGE is %TRUE and this attribute + * is %FALSE, it indicates that thumbnailing may be attempted again and may + * succeed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.76 + */ +#define G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_LARGE "thumbnail::is-valid-large" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_THUMBNAIL_PATH_XLARGE: + * + * A key in the "thumbnail" namespace for getting the path to the x-large + * thumbnail image. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + * + * Since: 2.76 + */ +#define G_FILE_ATTRIBUTE_THUMBNAIL_PATH_XLARGE "thumbnail::path-xlarge" /* bytestring */ +/** + * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGE: + * + * A key in the "thumbnail" namespace for checking if thumbnailing failed + * for the x-large image. + * + * This attribute is %TRUE if thumbnailing failed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.76 + */ +#define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGE "thumbnail::failed-xlarge" /* boolean */ +/** + * G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XLARGE: + * + * A key in the "thumbnail" namespace for checking whether the x-large + * thumbnail is outdated. + * + * This attribute is %TRUE if the x-large thumbnail is up-to-date with the file + * it represents, and %FALSE if the file has been modified since the thumbnail + * was generated. + * + * If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGE is %TRUE and this attribute + * is %FALSE, it indicates that thumbnailing may be attempted again and may + * succeed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.76 + */ +#define G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XLARGE "thumbnail::is-valid-xlarge" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_THUMBNAIL_PATH_XXLARGE: + * + * A key in the "thumbnail" namespace for getting the path to the xx-large + * thumbnail image. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + * + * Since: 2.76 + */ +#define G_FILE_ATTRIBUTE_THUMBNAIL_PATH_XXLARGE "thumbnail::path-xxlarge" /* bytestring */ +/** + * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGE: + * + * A key in the "thumbnail" namespace for checking if thumbnailing failed + * for the xx-large image. + * + * This attribute is %TRUE if thumbnailing failed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.76 + */ +#define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGE "thumbnail::failed-xxlarge" /* boolean */ +/** + * G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XXLARGE: + * + * A key in the "thumbnail" namespace for checking whether the xx-large + * thumbnail is outdated. + * + * This attribute is %TRUE if the x-large thumbnail is up-to-date with the file + * it represents, and %FALSE if the file has been modified since the thumbnail + * was generated. + * + * If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGE is %TRUE and this attribute + * is %FALSE, it indicates that thumbnailing may be attempted again and may + * succeed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * Since: 2.76 + */ +#define G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XXLARGE "thumbnail::is-valid-xxlarge" /* boolean */ + +/* Preview */ + +/** + * G_FILE_ATTRIBUTE_PREVIEW_ICON: + * + * A key in the "preview" namespace for getting a #GIcon that can be + * used to get preview of the file. + * + * For example, it may be a low resolution thumbnail without metadata. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. + * + * The value for this key should contain a #GIcon. + * + * Since: 2.20 + **/ +#define G_FILE_ATTRIBUTE_PREVIEW_ICON "preview::icon" /* object (GIcon) */ + +/* File system info (for g_file_get_filesystem_info) */ + +/** + * G_FILE_ATTRIBUTE_FILESYSTEM_SIZE: + * + * A key in the "filesystem" namespace for getting the total size (in + * bytes) of the file system, used in g_file_query_filesystem_info(). + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + **/ +#define G_FILE_ATTRIBUTE_FILESYSTEM_SIZE "filesystem::size" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_FILESYSTEM_FREE: + * + * A key in the "filesystem" namespace for getting the number of bytes + * of free space left on the file system. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + **/ +#define G_FILE_ATTRIBUTE_FILESYSTEM_FREE "filesystem::free" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_FILESYSTEM_USED: + * + * A key in the "filesystem" namespace for getting the number of bytes + * used by data on the file system. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + * + * Since: 2.32 + */ +#define G_FILE_ATTRIBUTE_FILESYSTEM_USED "filesystem::used" /* uint64 */ + +/** + * G_FILE_ATTRIBUTE_FILESYSTEM_TYPE: + * + * A key in the "filesystem" namespace for getting the file system's type. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_FILESYSTEM_TYPE "filesystem::type" /* string */ + +/** + * G_FILE_ATTRIBUTE_FILESYSTEM_READONLY: + * + * A key in the "filesystem" namespace for checking if the file system + * is read only. + * + * Is set to %TRUE if the file system is read only. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_FILESYSTEM_READONLY "filesystem::readonly" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW: + * + * A key in the "filesystem" namespace for hinting a file manager + * application whether it should preview (e.g. thumbnail) files on the + * file system. + * + * The value for this key contain a #GFilesystemPreviewType. + **/ +#define G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW "filesystem::use-preview" /* uint32 (GFilesystemPreviewType) */ + +/** + * G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE: + * + * A key in the "filesystem" namespace for checking if the file system + * is remote. + * + * Is set to %TRUE if the file system is remote. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + **/ +#define G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE "filesystem::remote" /* boolean */ + +/** + * G_FILE_ATTRIBUTE_GVFS_BACKEND: + * + * A key in the "gvfs" namespace that gets the name of the current + * GVFS backend in use. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + **/ +#define G_FILE_ATTRIBUTE_GVFS_BACKEND "gvfs::backend" /* string */ + +/** + * G_FILE_ATTRIBUTE_SELINUX_CONTEXT: + * + * A key in the "selinux" namespace for getting the file's SELinux + * context. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * + * Note that this attribute is only available if GLib has been built + * with SELinux support. + **/ +#define G_FILE_ATTRIBUTE_SELINUX_CONTEXT "selinux::context" /* string */ + +/** + * G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT: + * + * A key in the "trash" namespace for getting the number of (toplevel) items + * that are present in the `trash:///` folder. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + **/ +#define G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT "trash::item-count" /* uint32 */ + +/** + * G_FILE_ATTRIBUTE_TRASH_ORIG_PATH: + * + * A key in the "trash" namespace for getting the original path of a file + * inside the `trash:///` folder before it was trashed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + * + * Since: 2.24 + **/ +#define G_FILE_ATTRIBUTE_TRASH_ORIG_PATH "trash::orig-path" /* byte string */ + +/** + * G_FILE_ATTRIBUTE_TRASH_DELETION_DATE: + * + * A key in the "trash" namespace for getting the deletion date and time + * of a file inside the `trash:///` folder. + * + * The format of the returned string is `YYYY-MM-DDThh:mm:ss`. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * + * Since: 2.24 + **/ +#define G_FILE_ATTRIBUTE_TRASH_DELETION_DATE "trash::deletion-date" /* string */ + +/** + * G_FILE_ATTRIBUTE_RECENT_MODIFIED: + * + * A key in the "recent" namespace for getting time, when the metadata for the + * file in `recent:///` was last changed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT64. + * + * Since: 2.52 + **/ +#define G_FILE_ATTRIBUTE_RECENT_MODIFIED "recent::modified" /* int64 (time_t) */ + +GIO_AVAILABLE_IN_ALL +GType g_file_info_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GFileInfo * g_file_info_new (void); +GIO_AVAILABLE_IN_ALL +GFileInfo * g_file_info_dup (GFileInfo *other); +GIO_AVAILABLE_IN_ALL +void g_file_info_copy_into (GFileInfo *src_info, + GFileInfo *dest_info); +GIO_AVAILABLE_IN_ALL +gboolean g_file_info_has_attribute (GFileInfo *info, + const char *attribute); +GIO_AVAILABLE_IN_ALL +gboolean g_file_info_has_namespace (GFileInfo *info, + const char *name_space); +GIO_AVAILABLE_IN_ALL +char ** g_file_info_list_attributes (GFileInfo *info, + const char *name_space); +GIO_AVAILABLE_IN_ALL +gboolean g_file_info_get_attribute_data (GFileInfo *info, + const char *attribute, + GFileAttributeType *type, + gpointer *value_pp, + GFileAttributeStatus *status); +GIO_AVAILABLE_IN_ALL +GFileAttributeType g_file_info_get_attribute_type (GFileInfo *info, + const char *attribute); +GIO_AVAILABLE_IN_ALL +void g_file_info_remove_attribute (GFileInfo *info, + const char *attribute); +GIO_AVAILABLE_IN_ALL +GFileAttributeStatus g_file_info_get_attribute_status (GFileInfo *info, + const char *attribute); +GIO_AVAILABLE_IN_ALL +gboolean g_file_info_set_attribute_status (GFileInfo *info, + const char *attribute, + GFileAttributeStatus status); +GIO_AVAILABLE_IN_ALL +char * g_file_info_get_attribute_as_string (GFileInfo *info, + const char *attribute); +GIO_AVAILABLE_IN_ALL +const char * g_file_info_get_attribute_string (GFileInfo *info, + const char *attribute); +GIO_AVAILABLE_IN_ALL +const char * g_file_info_get_attribute_byte_string (GFileInfo *info, + const char *attribute); +GIO_AVAILABLE_IN_ALL +gboolean g_file_info_get_attribute_boolean (GFileInfo *info, + const char *attribute); +GIO_AVAILABLE_IN_ALL +guint32 g_file_info_get_attribute_uint32 (GFileInfo *info, + const char *attribute); +GIO_AVAILABLE_IN_ALL +gint32 g_file_info_get_attribute_int32 (GFileInfo *info, + const char *attribute); +GIO_AVAILABLE_IN_ALL +guint64 g_file_info_get_attribute_uint64 (GFileInfo *info, + const char *attribute); +GIO_AVAILABLE_IN_ALL +gint64 g_file_info_get_attribute_int64 (GFileInfo *info, + const char *attribute); +GIO_AVAILABLE_IN_ALL +GObject * g_file_info_get_attribute_object (GFileInfo *info, + const char *attribute); +GIO_AVAILABLE_IN_ALL +char ** g_file_info_get_attribute_stringv (GFileInfo *info, + const char *attribute); +GIO_AVAILABLE_IN_2_78 +const char * g_file_info_get_attribute_file_path (GFileInfo *info, + const char *attribute); + +GIO_AVAILABLE_IN_ALL +void g_file_info_set_attribute (GFileInfo *info, + const char *attribute, + GFileAttributeType type, + gpointer value_p); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_attribute_string (GFileInfo *info, + const char *attribute, + const char *attr_value); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_attribute_byte_string (GFileInfo *info, + const char *attribute, + const char *attr_value); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_attribute_boolean (GFileInfo *info, + const char *attribute, + gboolean attr_value); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_attribute_uint32 (GFileInfo *info, + const char *attribute, + guint32 attr_value); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_attribute_int32 (GFileInfo *info, + const char *attribute, + gint32 attr_value); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_attribute_uint64 (GFileInfo *info, + const char *attribute, + guint64 attr_value); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_attribute_int64 (GFileInfo *info, + const char *attribute, + gint64 attr_value); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_attribute_object (GFileInfo *info, + const char *attribute, + GObject *attr_value); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_attribute_stringv (GFileInfo *info, + const char *attribute, + char **attr_value); +GIO_AVAILABLE_IN_2_78 +void g_file_info_set_attribute_file_path (GFileInfo *info, + const char *attribute, + const char *attr_value); + +GIO_AVAILABLE_IN_ALL +void g_file_info_clear_status (GFileInfo *info); + +/* Helper getters: */ +GIO_AVAILABLE_IN_2_36 +GDateTime * g_file_info_get_deletion_date (GFileInfo *info); +GIO_AVAILABLE_IN_ALL +GFileType g_file_info_get_file_type (GFileInfo *info); +GIO_AVAILABLE_IN_ALL +gboolean g_file_info_get_is_hidden (GFileInfo *info); +GIO_AVAILABLE_IN_ALL +gboolean g_file_info_get_is_backup (GFileInfo *info); +GIO_AVAILABLE_IN_ALL +gboolean g_file_info_get_is_symlink (GFileInfo *info); +GIO_AVAILABLE_IN_ALL +const char * g_file_info_get_name (GFileInfo *info); +GIO_AVAILABLE_IN_ALL +const char * g_file_info_get_display_name (GFileInfo *info); +GIO_AVAILABLE_IN_ALL +const char * g_file_info_get_edit_name (GFileInfo *info); +GIO_AVAILABLE_IN_ALL +GIcon * g_file_info_get_icon (GFileInfo *info); +GIO_AVAILABLE_IN_ALL +GIcon * g_file_info_get_symbolic_icon (GFileInfo *info); +GIO_AVAILABLE_IN_ALL +const char * g_file_info_get_content_type (GFileInfo *info); +GIO_AVAILABLE_IN_ALL +goffset g_file_info_get_size (GFileInfo *info); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GIO_DEPRECATED_IN_2_62_FOR(g_file_info_get_modification_date_time) +void g_file_info_get_modification_time (GFileInfo *info, + GTimeVal *result); +G_GNUC_END_IGNORE_DEPRECATIONS +GIO_AVAILABLE_IN_2_62 +GDateTime * g_file_info_get_modification_date_time (GFileInfo *info); +GIO_AVAILABLE_IN_2_70 +GDateTime * g_file_info_get_access_date_time (GFileInfo *info); +GIO_AVAILABLE_IN_2_70 +GDateTime * g_file_info_get_creation_date_time (GFileInfo *info); +GIO_AVAILABLE_IN_ALL +const char * g_file_info_get_symlink_target (GFileInfo *info); +GIO_AVAILABLE_IN_ALL +const char * g_file_info_get_etag (GFileInfo *info); +GIO_AVAILABLE_IN_ALL +gint32 g_file_info_get_sort_order (GFileInfo *info); + +GIO_AVAILABLE_IN_ALL +void g_file_info_set_attribute_mask (GFileInfo *info, + GFileAttributeMatcher *mask); +GIO_AVAILABLE_IN_ALL +void g_file_info_unset_attribute_mask (GFileInfo *info); + +/* Helper setters: */ +GIO_AVAILABLE_IN_ALL +void g_file_info_set_file_type (GFileInfo *info, + GFileType type); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_is_hidden (GFileInfo *info, + gboolean is_hidden); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_is_symlink (GFileInfo *info, + gboolean is_symlink); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_name (GFileInfo *info, + const char *name); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_display_name (GFileInfo *info, + const char *display_name); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_edit_name (GFileInfo *info, + const char *edit_name); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_icon (GFileInfo *info, + GIcon *icon); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_symbolic_icon (GFileInfo *info, + GIcon *icon); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_content_type (GFileInfo *info, + const char *content_type); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_size (GFileInfo *info, + goffset size); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GIO_DEPRECATED_IN_2_62_FOR(g_file_info_set_modification_date_time) +void g_file_info_set_modification_time (GFileInfo *info, + GTimeVal *mtime); +G_GNUC_END_IGNORE_DEPRECATIONS +GIO_AVAILABLE_IN_2_62 +void g_file_info_set_modification_date_time (GFileInfo *info, + GDateTime *mtime); +GIO_AVAILABLE_IN_2_70 +void g_file_info_set_access_date_time (GFileInfo *info, + GDateTime *atime); +GIO_AVAILABLE_IN_2_70 +void g_file_info_set_creation_date_time (GFileInfo *info, + GDateTime *creation_time); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_symlink_target (GFileInfo *info, + const char *symlink_target); +GIO_AVAILABLE_IN_ALL +void g_file_info_set_sort_order (GFileInfo *info, + gint32 sort_order); + +#define G_TYPE_FILE_ATTRIBUTE_MATCHER (g_file_attribute_matcher_get_type ()) +GIO_AVAILABLE_IN_ALL +GType g_file_attribute_matcher_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GFileAttributeMatcher *g_file_attribute_matcher_new (const char *attributes); +GIO_AVAILABLE_IN_ALL +GFileAttributeMatcher *g_file_attribute_matcher_ref (GFileAttributeMatcher *matcher); +GIO_AVAILABLE_IN_ALL +void g_file_attribute_matcher_unref (GFileAttributeMatcher *matcher); +GIO_AVAILABLE_IN_ALL +GFileAttributeMatcher *g_file_attribute_matcher_subtract (GFileAttributeMatcher *matcher, + GFileAttributeMatcher *subtract); +GIO_AVAILABLE_IN_ALL +gboolean g_file_attribute_matcher_matches (GFileAttributeMatcher *matcher, + const char *attribute); +GIO_AVAILABLE_IN_ALL +gboolean g_file_attribute_matcher_matches_only (GFileAttributeMatcher *matcher, + const char *attribute); +GIO_AVAILABLE_IN_ALL +gboolean g_file_attribute_matcher_enumerate_namespace (GFileAttributeMatcher *matcher, + const char *ns); +GIO_AVAILABLE_IN_ALL +const char * g_file_attribute_matcher_enumerate_next (GFileAttributeMatcher *matcher); +GIO_AVAILABLE_IN_2_32 +char * g_file_attribute_matcher_to_string (GFileAttributeMatcher *matcher); + +G_END_DECLS + +#endif /* __G_FILE_INFO_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileinputstream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileinputstream.h new file mode 100644 index 0000000..5462695 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileinputstream.h @@ -0,0 +1,116 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_FILE_INPUT_STREAM_H__ +#define __G_FILE_INPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_FILE_INPUT_STREAM (g_file_input_stream_get_type ()) +#define G_FILE_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_INPUT_STREAM, GFileInputStream)) +#define G_FILE_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_INPUT_STREAM, GFileInputStreamClass)) +#define G_IS_FILE_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_INPUT_STREAM)) +#define G_IS_FILE_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_INPUT_STREAM)) +#define G_FILE_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_INPUT_STREAM, GFileInputStreamClass)) + +/** + * GFileInputStream: + * + * A subclass of GInputStream for opened files. This adds + * a few file-specific operations and seeking. + * + * #GFileInputStream implements #GSeekable. + **/ +typedef struct _GFileInputStreamClass GFileInputStreamClass; +typedef struct _GFileInputStreamPrivate GFileInputStreamPrivate; + +struct _GFileInputStream +{ + GInputStream parent_instance; + + /*< private >*/ + GFileInputStreamPrivate *priv; +}; + +struct _GFileInputStreamClass +{ + GInputStreamClass parent_class; + + goffset (* tell) (GFileInputStream *stream); + gboolean (* can_seek) (GFileInputStream *stream); + gboolean (* seek) (GFileInputStream *stream, + goffset offset, + GSeekType type, + GCancellable *cancellable, + GError **error); + GFileInfo * (* query_info) (GFileInputStream *stream, + const char *attributes, + GCancellable *cancellable, + GError **error); + void (* query_info_async) (GFileInputStream *stream, + const char *attributes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileInfo * (* query_info_finish) (GFileInputStream *stream, + GAsyncResult *result, + GError **error); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_file_input_stream_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GFileInfo *g_file_input_stream_query_info (GFileInputStream *stream, + const char *attributes, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_input_stream_query_info_async (GFileInputStream *stream, + const char *attributes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GFileInfo *g_file_input_stream_query_info_finish (GFileInputStream *stream, + GAsyncResult *result, + GError **error); + +G_END_DECLS + +#endif /* __G_FILE_FILE_INPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileiostream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileiostream.h new file mode 100644 index 0000000..c1c70c5 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileiostream.h @@ -0,0 +1,123 @@ +/* GIO - GLib Input, Io and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_FILE_IO_STREAM_H__ +#define __G_FILE_IO_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_FILE_IO_STREAM (g_file_io_stream_get_type ()) +#define G_FILE_IO_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_IO_STREAM, GFileIOStream)) +#define G_FILE_IO_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_IO_STREAM, GFileIOStreamClass)) +#define G_IS_FILE_IO_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_IO_STREAM)) +#define G_IS_FILE_IO_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_IO_STREAM)) +#define G_FILE_IO_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_IO_STREAM, GFileIOStreamClass)) + +/** + * GFileIOStream: + * + * A subclass of GIOStream for opened files. This adds + * a few file-specific operations and seeking and truncating. + * + * #GFileIOStream implements GSeekable. + **/ +typedef struct _GFileIOStreamClass GFileIOStreamClass; +typedef struct _GFileIOStreamPrivate GFileIOStreamPrivate; + +struct _GFileIOStream +{ + GIOStream parent_instance; + + /*< private >*/ + GFileIOStreamPrivate *priv; +}; + +struct _GFileIOStreamClass +{ + GIOStreamClass parent_class; + + goffset (* tell) (GFileIOStream *stream); + gboolean (* can_seek) (GFileIOStream *stream); + gboolean (* seek) (GFileIOStream *stream, + goffset offset, + GSeekType type, + GCancellable *cancellable, + GError **error); + gboolean (* can_truncate) (GFileIOStream *stream); + gboolean (* truncate_fn) (GFileIOStream *stream, + goffset size, + GCancellable *cancellable, + GError **error); + GFileInfo * (* query_info) (GFileIOStream *stream, + const char *attributes, + GCancellable *cancellable, + GError **error); + void (* query_info_async) (GFileIOStream *stream, + const char *attributes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileInfo * (* query_info_finish) (GFileIOStream *stream, + GAsyncResult *result, + GError **error); + char * (* get_etag) (GFileIOStream *stream); + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_file_io_stream_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GFileInfo *g_file_io_stream_query_info (GFileIOStream *stream, + const char *attributes, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_io_stream_query_info_async (GFileIOStream *stream, + const char *attributes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GFileInfo *g_file_io_stream_query_info_finish (GFileIOStream *stream, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +char * g_file_io_stream_get_etag (GFileIOStream *stream); + +G_END_DECLS + +#endif /* __G_FILE_FILE_IO_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfilemonitor.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfilemonitor.h new file mode 100644 index 0000000..b677efc --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfilemonitor.h @@ -0,0 +1,100 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_FILE_MONITOR_H__ +#define __G_FILE_MONITOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_FILE_MONITOR (g_file_monitor_get_type ()) +#define G_FILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_MONITOR, GFileMonitor)) +#define G_FILE_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_MONITOR, GFileMonitorClass)) +#define G_IS_FILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_MONITOR)) +#define G_IS_FILE_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_MONITOR)) +#define G_FILE_MONITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_MONITOR, GFileMonitorClass)) + +typedef struct _GFileMonitorClass GFileMonitorClass; +typedef struct _GFileMonitorPrivate GFileMonitorPrivate; + +/** + * GFileMonitor: + * + * Watches for changes to a file. + **/ +struct _GFileMonitor +{ + GObject parent_instance; + + /*< private >*/ + GFileMonitorPrivate *priv; +}; + +struct _GFileMonitorClass +{ + GObjectClass parent_class; + + /* Signals */ + void (* changed) (GFileMonitor *monitor, + GFile *file, + GFile *other_file, + GFileMonitorEvent event_type); + + /* Virtual Table */ + gboolean (* cancel) (GFileMonitor *monitor); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_file_monitor_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +gboolean g_file_monitor_cancel (GFileMonitor *monitor); +GIO_AVAILABLE_IN_ALL +gboolean g_file_monitor_is_cancelled (GFileMonitor *monitor); +GIO_AVAILABLE_IN_ALL +void g_file_monitor_set_rate_limit (GFileMonitor *monitor, + gint limit_msecs); + + +/* For implementations */ +GIO_AVAILABLE_IN_ALL +void g_file_monitor_emit_event (GFileMonitor *monitor, + GFile *child, + GFile *other_file, + GFileMonitorEvent event_type); + +G_END_DECLS + +#endif /* __G_FILE_MONITOR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfilenamecompleter.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfilenamecompleter.h new file mode 100644 index 0000000..b105e49 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfilenamecompleter.h @@ -0,0 +1,81 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_FILENAME_COMPLETER_H__ +#define __G_FILENAME_COMPLETER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_FILENAME_COMPLETER (g_filename_completer_get_type ()) +#define G_FILENAME_COMPLETER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILENAME_COMPLETER, GFilenameCompleter)) +#define G_FILENAME_COMPLETER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILENAME_COMPLETER, GFilenameCompleterClass)) +#define G_FILENAME_COMPLETER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILENAME_COMPLETER, GFilenameCompleterClass)) +#define G_IS_FILENAME_COMPLETER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILENAME_COMPLETER)) +#define G_IS_FILENAME_COMPLETER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILENAME_COMPLETER)) + +/** + * GFilenameCompleter: + * + * Completes filenames based on files that exist within the file system. + **/ +typedef struct _GFilenameCompleterClass GFilenameCompleterClass; + +struct _GFilenameCompleterClass +{ + GObjectClass parent_class; + + /*< public >*/ + /* signals */ + void (* got_completion_data) (GFilenameCompleter *filename_completer); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_filename_completer_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GFilenameCompleter *g_filename_completer_new (void); + +GIO_AVAILABLE_IN_ALL +char * g_filename_completer_get_completion_suffix (GFilenameCompleter *completer, + const char *initial_text); +GIO_AVAILABLE_IN_ALL +char ** g_filename_completer_get_completions (GFilenameCompleter *completer, + const char *initial_text); +GIO_AVAILABLE_IN_ALL +void g_filename_completer_set_dirs_only (GFilenameCompleter *completer, + gboolean dirs_only); + +G_END_DECLS + +#endif /* __G_FILENAME_COMPLETER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileoutputstream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileoutputstream.h new file mode 100644 index 0000000..576b21f --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfileoutputstream.h @@ -0,0 +1,124 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_FILE_OUTPUT_STREAM_H__ +#define __G_FILE_OUTPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_FILE_OUTPUT_STREAM (g_file_output_stream_get_type ()) +#define G_FILE_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_OUTPUT_STREAM, GFileOutputStream)) +#define G_FILE_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_OUTPUT_STREAM, GFileOutputStreamClass)) +#define G_IS_FILE_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_OUTPUT_STREAM)) +#define G_IS_FILE_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_OUTPUT_STREAM)) +#define G_FILE_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_OUTPUT_STREAM, GFileOutputStreamClass)) + +/** + * GFileOutputStream: + * + * A subclass of GOutputStream for opened files. This adds + * a few file-specific operations and seeking and truncating. + * + * #GFileOutputStream implements GSeekable. + **/ +typedef struct _GFileOutputStreamClass GFileOutputStreamClass; +typedef struct _GFileOutputStreamPrivate GFileOutputStreamPrivate; + +struct _GFileOutputStream +{ + GOutputStream parent_instance; + + /*< private >*/ + GFileOutputStreamPrivate *priv; +}; + +struct _GFileOutputStreamClass +{ + GOutputStreamClass parent_class; + + goffset (* tell) (GFileOutputStream *stream); + gboolean (* can_seek) (GFileOutputStream *stream); + gboolean (* seek) (GFileOutputStream *stream, + goffset offset, + GSeekType type, + GCancellable *cancellable, + GError **error); + gboolean (* can_truncate) (GFileOutputStream *stream); + gboolean (* truncate_fn) (GFileOutputStream *stream, + goffset size, + GCancellable *cancellable, + GError **error); + GFileInfo * (* query_info) (GFileOutputStream *stream, + const char *attributes, + GCancellable *cancellable, + GError **error); + void (* query_info_async) (GFileOutputStream *stream, + const char *attributes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GFileInfo * (* query_info_finish) (GFileOutputStream *stream, + GAsyncResult *result, + GError **error); + char * (* get_etag) (GFileOutputStream *stream); + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_file_output_stream_get_type (void) G_GNUC_CONST; + + +GIO_AVAILABLE_IN_ALL +GFileInfo *g_file_output_stream_query_info (GFileOutputStream *stream, + const char *attributes, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_file_output_stream_query_info_async (GFileOutputStream *stream, + const char *attributes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GFileInfo *g_file_output_stream_query_info_finish (GFileOutputStream *stream, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +char * g_file_output_stream_get_etag (GFileOutputStream *stream); + +G_END_DECLS + +#endif /* __G_FILE_FILE_OUTPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfilterinputstream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfilterinputstream.h new file mode 100644 index 0000000..df6032c --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfilterinputstream.h @@ -0,0 +1,80 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Christian Kellner + */ + +#ifndef __G_FILTER_INPUT_STREAM_H__ +#define __G_FILTER_INPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_FILTER_INPUT_STREAM (g_filter_input_stream_get_type ()) +#define G_FILTER_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILTER_INPUT_STREAM, GFilterInputStream)) +#define G_FILTER_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILTER_INPUT_STREAM, GFilterInputStreamClass)) +#define G_IS_FILTER_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILTER_INPUT_STREAM)) +#define G_IS_FILTER_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILTER_INPUT_STREAM)) +#define G_FILTER_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILTER_INPUT_STREAM, GFilterInputStreamClass)) + +/** + * GFilterInputStream: + * + * A base class for all input streams that work on an underlying stream. + **/ +typedef struct _GFilterInputStreamClass GFilterInputStreamClass; + +struct _GFilterInputStream +{ + GInputStream parent_instance; + + /**/ + GInputStream *base_stream; +}; + +struct _GFilterInputStreamClass +{ + GInputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); +}; + + +GIO_AVAILABLE_IN_ALL +GType g_filter_input_stream_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GInputStream * g_filter_input_stream_get_base_stream (GFilterInputStream *stream); +GIO_AVAILABLE_IN_ALL +gboolean g_filter_input_stream_get_close_base_stream (GFilterInputStream *stream); +GIO_AVAILABLE_IN_ALL +void g_filter_input_stream_set_close_base_stream (GFilterInputStream *stream, + gboolean close_base); + +G_END_DECLS + +#endif /* __G_FILTER_INPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfilteroutputstream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfilteroutputstream.h new file mode 100644 index 0000000..472f9d8 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gfilteroutputstream.h @@ -0,0 +1,80 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Christian Kellner + */ + +#ifndef __G_FILTER_OUTPUT_STREAM_H__ +#define __G_FILTER_OUTPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_FILTER_OUTPUT_STREAM (g_filter_output_stream_get_type ()) +#define G_FILTER_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILTER_OUTPUT_STREAM, GFilterOutputStream)) +#define G_FILTER_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILTER_OUTPUT_STREAM, GFilterOutputStreamClass)) +#define G_IS_FILTER_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILTER_OUTPUT_STREAM)) +#define G_IS_FILTER_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILTER_OUTPUT_STREAM)) +#define G_FILTER_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILTER_OUTPUT_STREAM, GFilterOutputStreamClass)) + +/** + * GFilterOutputStream: + * + * A base class for all output streams that work on an underlying stream. + **/ +typedef struct _GFilterOutputStreamClass GFilterOutputStreamClass; + +struct _GFilterOutputStream +{ + GOutputStream parent_instance; + + /*< protected >*/ + GOutputStream *base_stream; +}; + +struct _GFilterOutputStreamClass +{ + GOutputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); +}; + + +GIO_AVAILABLE_IN_ALL +GType g_filter_output_stream_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GOutputStream * g_filter_output_stream_get_base_stream (GFilterOutputStream *stream); +GIO_AVAILABLE_IN_ALL +gboolean g_filter_output_stream_get_close_base_stream (GFilterOutputStream *stream); +GIO_AVAILABLE_IN_ALL +void g_filter_output_stream_set_close_base_stream (GFilterOutputStream *stream, + gboolean close_base); + +G_END_DECLS + +#endif /* __G_FILTER_OUTPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gicon.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gicon.h new file mode 100644 index 0000000..c971cb0 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gicon.h @@ -0,0 +1,133 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_ICON_H__ +#define __G_ICON_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_ICON (g_icon_get_type ()) +#define G_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_ICON, GIcon)) +#define G_IS_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_ICON)) +#define G_ICON_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_ICON, GIconIface)) + +/** + * GIcon: + * + * An abstract type that specifies an icon. + **/ +typedef struct _GIconIface GIconIface; + +/** + * GIconIface: + * @g_iface: The parent interface. + * @hash: A hash for a given #GIcon. + * @equal: Checks if two #GIcons are equal. + * @to_tokens: Serializes a #GIcon into tokens. The tokens must not + * contain any whitespace. Don't implement if the #GIcon can't be + * serialized (Since 2.20). + * @from_tokens: Constructs a #GIcon from tokens. Set the #GError if + * the tokens are malformed. Don't implement if the #GIcon can't be + * serialized (Since 2.20). + * @serialize: Serializes a #GIcon into a #GVariant. Since: 2.38 + * + * GIconIface is used to implement GIcon types for various + * different systems. See #GThemedIcon and #GLoadableIcon for + * examples of how to implement this interface. + */ +struct _GIconIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + guint (* hash) (GIcon *icon); + gboolean (* equal) (GIcon *icon1, + GIcon *icon2); + + /** + * GIconIface::to_tokens: + * @icon: The #GIcon + * @tokens: (element-type utf8) (out caller-allocates): + * The array to fill with tokens + * @out_version: (out): version of serialized tokens + * + * Serializes the @icon into string tokens. + * This is can be invoked when g_icon_new_for_string() is called. + * + * Returns: %TRUE if serialization took place, %FALSE otherwise + * + * Since: 2.20 + */ + gboolean (* to_tokens) (GIcon *icon, + GPtrArray *tokens, + gint *out_version); + + /** + * GIconIface::from_tokens: + * @tokens: (array length=num_tokens): An array of tokens + * @num_tokens: The number of tokens in @tokens + * @version: Version of the serialized tokens + * @error: Return location for errors, or %NULL to ignore + * + * Constructs a #GIcon from a list of @tokens. + * + * Returns: (nullable) (transfer full): the #GIcon or %NULL on error + * + * Since: 2.20 + */ + GIcon * (* from_tokens) (gchar **tokens, + gint num_tokens, + gint version, + GError **error); + + GVariant * (* serialize) (GIcon *icon); +}; + +GIO_AVAILABLE_IN_ALL +GType g_icon_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +guint g_icon_hash (gconstpointer icon); +GIO_AVAILABLE_IN_ALL +gboolean g_icon_equal (GIcon *icon1, + GIcon *icon2); +GIO_AVAILABLE_IN_ALL +gchar *g_icon_to_string (GIcon *icon); +GIO_AVAILABLE_IN_ALL +GIcon *g_icon_new_for_string (const gchar *str, + GError **error); + +GIO_AVAILABLE_IN_2_38 +GVariant * g_icon_serialize (GIcon *icon); +GIO_AVAILABLE_IN_2_38 +GIcon * g_icon_deserialize (GVariant *value); + +G_END_DECLS + +#endif /* __G_ICON_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/ginetaddress.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/ginetaddress.h new file mode 100644 index 0000000..ea503a9 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/ginetaddress.h @@ -0,0 +1,125 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Christian Kellner + * Samuel Cormier-Iijima + */ + +#ifndef __G_INET_ADDRESS_H__ +#define __G_INET_ADDRESS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_INET_ADDRESS (g_inet_address_get_type ()) +#define G_INET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INET_ADDRESS, GInetAddress)) +#define G_INET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_INET_ADDRESS, GInetAddressClass)) +#define G_IS_INET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INET_ADDRESS)) +#define G_IS_INET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INET_ADDRESS)) +#define G_INET_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_INET_ADDRESS, GInetAddressClass)) + +typedef struct _GInetAddressClass GInetAddressClass; +typedef struct _GInetAddressPrivate GInetAddressPrivate; + +struct _GInetAddress +{ + GObject parent_instance; + + /*< private >*/ + GInetAddressPrivate *priv; +}; + +struct _GInetAddressClass +{ + GObjectClass parent_class; + + gchar * (*to_string) (GInetAddress *address); + const guint8 * (*to_bytes) (GInetAddress *address); +}; + +GIO_AVAILABLE_IN_ALL +GType g_inet_address_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GInetAddress * g_inet_address_new_from_string (const gchar *string); + +GIO_AVAILABLE_IN_ALL +GInetAddress * g_inet_address_new_from_bytes (const guint8 *bytes, + GSocketFamily family); + +GIO_AVAILABLE_IN_ALL +GInetAddress * g_inet_address_new_loopback (GSocketFamily family); + +GIO_AVAILABLE_IN_ALL +GInetAddress * g_inet_address_new_any (GSocketFamily family); + +GIO_AVAILABLE_IN_ALL +gboolean g_inet_address_equal (GInetAddress *address, + GInetAddress *other_address); + +GIO_AVAILABLE_IN_ALL +gchar * g_inet_address_to_string (GInetAddress *address); + +GIO_AVAILABLE_IN_ALL +const guint8 * g_inet_address_to_bytes (GInetAddress *address); + +GIO_AVAILABLE_IN_ALL +gsize g_inet_address_get_native_size (GInetAddress *address); + +GIO_AVAILABLE_IN_ALL +GSocketFamily g_inet_address_get_family (GInetAddress *address); + +GIO_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_any (GInetAddress *address); + +GIO_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_loopback (GInetAddress *address); + +GIO_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_link_local (GInetAddress *address); + +GIO_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_site_local (GInetAddress *address); + +GIO_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_multicast (GInetAddress *address); + +GIO_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_mc_global (GInetAddress *address); + +GIO_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_mc_link_local (GInetAddress *address); + +GIO_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_mc_node_local (GInetAddress *address); + +GIO_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_mc_org_local (GInetAddress *address); + +GIO_AVAILABLE_IN_ALL +gboolean g_inet_address_get_is_mc_site_local (GInetAddress *address); + +G_END_DECLS + +#endif /* __G_INET_ADDRESS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/ginetaddressmask.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/ginetaddressmask.h new file mode 100644 index 0000000..25cce75 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/ginetaddressmask.h @@ -0,0 +1,86 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright 2011 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_INET_ADDRESS_MASK_H__ +#define __G_INET_ADDRESS_MASK_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_INET_ADDRESS_MASK (g_inet_address_mask_get_type ()) +#define G_INET_ADDRESS_MASK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INET_ADDRESS_MASK, GInetAddressMask)) +#define G_INET_ADDRESS_MASK_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_INET_ADDRESS_MASK, GInetAddressMaskClass)) +#define G_IS_INET_ADDRESS_MASK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INET_ADDRESS_MASK)) +#define G_IS_INET_ADDRESS_MASK_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INET_ADDRESS_MASK)) +#define G_INET_ADDRESS_MASK_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_INET_ADDRESS_MASK, GInetAddressMaskClass)) + +typedef struct _GInetAddressMaskClass GInetAddressMaskClass; +typedef struct _GInetAddressMaskPrivate GInetAddressMaskPrivate; + +struct _GInetAddressMask +{ + GObject parent_instance; + + /*< private >*/ + GInetAddressMaskPrivate *priv; +}; + +struct _GInetAddressMaskClass +{ + GObjectClass parent_class; + +}; + +GIO_AVAILABLE_IN_2_32 +GType g_inet_address_mask_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_32 +GInetAddressMask *g_inet_address_mask_new (GInetAddress *addr, + guint length, + GError **error); + +GIO_AVAILABLE_IN_2_32 +GInetAddressMask *g_inet_address_mask_new_from_string (const gchar *mask_string, + GError **error); +GIO_AVAILABLE_IN_2_32 +gchar *g_inet_address_mask_to_string (GInetAddressMask *mask); + +GIO_AVAILABLE_IN_2_32 +GSocketFamily g_inet_address_mask_get_family (GInetAddressMask *mask); +GIO_AVAILABLE_IN_2_32 +GInetAddress *g_inet_address_mask_get_address (GInetAddressMask *mask); +GIO_AVAILABLE_IN_2_32 +guint g_inet_address_mask_get_length (GInetAddressMask *mask); + +GIO_AVAILABLE_IN_2_32 +gboolean g_inet_address_mask_matches (GInetAddressMask *mask, + GInetAddress *address); +GIO_AVAILABLE_IN_2_32 +gboolean g_inet_address_mask_equal (GInetAddressMask *mask, + GInetAddressMask *mask2); + +G_END_DECLS + +#endif /* __G_INET_ADDRESS_MASK_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/ginetsocketaddress.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/ginetsocketaddress.h new file mode 100644 index 0000000..a983abe --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/ginetsocketaddress.h @@ -0,0 +1,80 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Christian Kellner + * Samuel Cormier-Iijima + */ + +#ifndef __G_INET_SOCKET_ADDRESS_H__ +#define __G_INET_SOCKET_ADDRESS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_INET_SOCKET_ADDRESS (g_inet_socket_address_get_type ()) +#define G_INET_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INET_SOCKET_ADDRESS, GInetSocketAddress)) +#define G_INET_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_INET_SOCKET_ADDRESS, GInetSocketAddressClass)) +#define G_IS_INET_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INET_SOCKET_ADDRESS)) +#define G_IS_INET_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INET_SOCKET_ADDRESS)) +#define G_INET_SOCKET_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_INET_SOCKET_ADDRESS, GInetSocketAddressClass)) + +typedef struct _GInetSocketAddressClass GInetSocketAddressClass; +typedef struct _GInetSocketAddressPrivate GInetSocketAddressPrivate; + +struct _GInetSocketAddress +{ + GSocketAddress parent_instance; + + /*< private >*/ + GInetSocketAddressPrivate *priv; +}; + +struct _GInetSocketAddressClass +{ + GSocketAddressClass parent_class; +}; + +GIO_AVAILABLE_IN_ALL +GType g_inet_socket_address_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GSocketAddress *g_inet_socket_address_new (GInetAddress *address, + guint16 port); +GIO_AVAILABLE_IN_2_40 +GSocketAddress *g_inet_socket_address_new_from_string (const char *address, + guint port); + +GIO_AVAILABLE_IN_ALL +GInetAddress * g_inet_socket_address_get_address (GInetSocketAddress *address); +GIO_AVAILABLE_IN_ALL +guint16 g_inet_socket_address_get_port (GInetSocketAddress *address); + +GIO_AVAILABLE_IN_2_32 +guint32 g_inet_socket_address_get_flowinfo (GInetSocketAddress *address); +GIO_AVAILABLE_IN_2_32 +guint32 g_inet_socket_address_get_scope_id (GInetSocketAddress *address); + +G_END_DECLS + +#endif /* __G_INET_SOCKET_ADDRESS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/ginitable.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/ginitable.h new file mode 100644 index 0000000..9eb995c --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/ginitable.h @@ -0,0 +1,107 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2009 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_INITABLE_H__ +#define __G_INITABLE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_INITABLE (g_initable_get_type ()) +#define G_INITABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_INITABLE, GInitable)) +#define G_IS_INITABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_INITABLE)) +#define G_INITABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_INITABLE, GInitableIface)) +#define G_TYPE_IS_INITABLE(type) (g_type_is_a ((type), G_TYPE_INITABLE)) + +/** + * GInitable: + * + * Interface for initializable objects. + * + * Since: 2.22 + **/ +typedef struct _GInitableIface GInitableIface; + +/** + * GInitableIface: + * @g_iface: The parent interface. + * @init: Initializes the object. + * + * Provides an interface for initializing object such that initialization + * may fail. + * + * Since: 2.22 + **/ +struct _GInitableIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + gboolean (* init) (GInitable *initable, + GCancellable *cancellable, + GError **error); +}; + + +GIO_AVAILABLE_IN_ALL +GType g_initable_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +gboolean g_initable_init (GInitable *initable, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +gpointer g_initable_new (GType object_type, + GCancellable *cancellable, + GError **error, + const gchar *first_property_name, + ...); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + +GIO_DEPRECATED_IN_2_54_FOR(g_object_new_with_properties and g_initable_init) +gpointer g_initable_newv (GType object_type, + guint n_parameters, + GParameter *parameters, + GCancellable *cancellable, + GError **error); + +G_GNUC_END_IGNORE_DEPRECATIONS + +GIO_AVAILABLE_IN_ALL +GObject* g_initable_new_valist (GType object_type, + const gchar *first_property_name, + va_list var_args, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + + +#endif /* __G_INITABLE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/ginputstream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/ginputstream.h new file mode 100644 index 0000000..a7be768 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/ginputstream.h @@ -0,0 +1,218 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_INPUT_STREAM_H__ +#define __G_INPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_INPUT_STREAM (g_input_stream_get_type ()) +#define G_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INPUT_STREAM, GInputStream)) +#define G_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_INPUT_STREAM, GInputStreamClass)) +#define G_IS_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INPUT_STREAM)) +#define G_IS_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INPUT_STREAM)) +#define G_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_INPUT_STREAM, GInputStreamClass)) + +/** + * GInputStream: + * + * Base class for streaming input operations. + **/ +typedef struct _GInputStreamClass GInputStreamClass; +typedef struct _GInputStreamPrivate GInputStreamPrivate; + +struct _GInputStream +{ + GObject parent_instance; + + /*< private >*/ + GInputStreamPrivate *priv; +}; + +struct _GInputStreamClass +{ + GObjectClass parent_class; + + /* Sync ops: */ + + gssize (* read_fn) (GInputStream *stream, + void *buffer, + gsize count, + GCancellable *cancellable, + GError **error); + gssize (* skip) (GInputStream *stream, + gsize count, + GCancellable *cancellable, + GError **error); + gboolean (* close_fn) (GInputStream *stream, + GCancellable *cancellable, + GError **error); + + /* Async ops: (optional in derived classes) */ + void (* read_async) (GInputStream *stream, + void *buffer, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gssize (* read_finish) (GInputStream *stream, + GAsyncResult *result, + GError **error); + void (* skip_async) (GInputStream *stream, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gssize (* skip_finish) (GInputStream *stream, + GAsyncResult *result, + GError **error); + void (* close_async) (GInputStream *stream, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* close_finish) (GInputStream *stream, + GAsyncResult *result, + GError **error); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_input_stream_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +gssize g_input_stream_read (GInputStream *stream, + void *buffer, + gsize count, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_input_stream_read_all (GInputStream *stream, + void *buffer, + gsize count, + gsize *bytes_read, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_34 +GBytes *g_input_stream_read_bytes (GInputStream *stream, + gsize count, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gssize g_input_stream_skip (GInputStream *stream, + gsize count, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_input_stream_close (GInputStream *stream, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_input_stream_read_async (GInputStream *stream, + void *buffer, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gssize g_input_stream_read_finish (GInputStream *stream, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_2_44 +void g_input_stream_read_all_async (GInputStream *stream, + void *buffer, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_44 +gboolean g_input_stream_read_all_finish (GInputStream *stream, + GAsyncResult *result, + gsize *bytes_read, + GError **error); + +GIO_AVAILABLE_IN_2_34 +void g_input_stream_read_bytes_async (GInputStream *stream, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_34 +GBytes *g_input_stream_read_bytes_finish (GInputStream *stream, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_input_stream_skip_async (GInputStream *stream, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gssize g_input_stream_skip_finish (GInputStream *stream, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_input_stream_close_async (GInputStream *stream, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_input_stream_close_finish (GInputStream *stream, + GAsyncResult *result, + GError **error); + +/* For implementations: */ + +GIO_AVAILABLE_IN_ALL +gboolean g_input_stream_is_closed (GInputStream *stream); +GIO_AVAILABLE_IN_ALL +gboolean g_input_stream_has_pending (GInputStream *stream); +GIO_AVAILABLE_IN_ALL +gboolean g_input_stream_set_pending (GInputStream *stream, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_input_stream_clear_pending (GInputStream *stream); + +G_END_DECLS + +#endif /* __G_INPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gio-autocleanups.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gio-autocleanups.h new file mode 100644 index 0000000..15e37d1 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gio-autocleanups.h @@ -0,0 +1,155 @@ +/* + * Copyright © 2015 Canonical Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Author: Ryan Lortie + */ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAction, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GActionMap, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAppInfo, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAppLaunchContext, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAppInfoMonitor, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GApplicationCommandLine, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GApplication, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAsyncInitable, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAsyncResult, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GBufferedInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GBufferedOutputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GBytesIcon, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GCancellable, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GCharsetConverter, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GConverter, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GConverterInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GConverterOutputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GCredentials, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDatagramBased, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDataInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDataOutputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusActionGroup, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusAuthObserver, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusInterface, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusInterfaceSkeleton, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusMenuModel, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusMessage, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusMethodInvocation, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusNodeInfo, g_dbus_node_info_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObject, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObjectManagerClient, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObjectManager, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObjectManagerServer, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObjectProxy, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObjectSkeleton, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusProxy, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusServer, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDrive, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GEmblemedIcon, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GEmblem, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileEnumerator, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFile, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileAttributeInfoList, g_file_attribute_info_list_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileIcon, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileInfo, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileIOStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileMonitor, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFilenameCompleter, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileOutputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFilterInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFilterOutputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GIcon, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInetAddress, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInetAddressMask, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInetSocketAddress, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitable, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GIOModule, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GIOStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GLoadableIcon, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMemoryInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMemoryOutputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMenu, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMenuItem, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMenuModel, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMenuAttributeIter, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMenuLinkIter, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMount, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMountOperation, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNativeVolumeMonitor, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNetworkAddress, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNetworkMonitor, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNetworkService, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNotification, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GOutputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPermission, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPollableInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPollableOutputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPropertyAction, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GProxyAddressEnumerator, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GProxyAddress, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GProxy, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GProxyResolver, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GRemoteActionGroup, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GResolver, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GResource, g_resource_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSeekable, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettingsBackend, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettingsSchema, g_settings_schema_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettingsSchemaKey, g_settings_schema_key_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettingsSchemaSource, g_settings_schema_source_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettings, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimpleActionGroup, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimpleAction, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimpleAsyncResult, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimplePermission, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimpleProxyResolver, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketAddressEnumerator, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketAddress, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketClient, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketConnectable, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketControlMessage, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocket, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketListener, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketService, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSubprocess, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSubprocessLauncher, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTask, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTcpConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTcpWrapperConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTestDBus, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GThemedIcon, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GThreadedSocketService, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsBackend, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsCertificate, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsClientConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsDatabase, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsFileDatabase, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsInteraction, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsPassword, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsServerConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVfs, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVolume, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVolumeMonitor, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GZlibCompressor, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GZlibDecompressor, g_object_unref) diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gio-visibility.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gio-visibility.h new file mode 100644 index 0000000..03f3572 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gio-visibility.h @@ -0,0 +1,952 @@ +#pragma once + +#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(GIO_STATIC_COMPILATION) +# define _GIO_EXPORT __declspec(dllexport) +# define _GIO_IMPORT __declspec(dllimport) +#elif __GNUC__ >= 4 +# define _GIO_EXPORT __attribute__((visibility("default"))) +# define _GIO_IMPORT +#else +# define _GIO_EXPORT +# define _GIO_IMPORT +#endif +#ifdef GIO_COMPILATION +# define _GIO_API _GIO_EXPORT +#else +# define _GIO_API _GIO_IMPORT +#endif + +#define _GIO_EXTERN _GIO_API extern + +#define GIO_VAR _GIO_EXTERN +#define GIO_AVAILABLE_IN_ALL _GIO_EXTERN + +#ifdef GLIB_DISABLE_DEPRECATION_WARNINGS +#define GIO_DEPRECATED _GIO_EXTERN +#define GIO_DEPRECATED_FOR(f) _GIO_EXTERN +#define GIO_UNAVAILABLE(maj,min) _GIO_EXTERN +#define GIO_UNAVAILABLE_STATIC_INLINE(maj,min) +#else +#define GIO_DEPRECATED G_DEPRECATED _GIO_EXTERN +#define GIO_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _GIO_EXTERN +#define GIO_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _GIO_EXTERN +#define GIO_UNAVAILABLE_STATIC_INLINE(maj,min) G_UNAVAILABLE(maj,min) +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_26 +#define GIO_DEPRECATED_IN_2_26 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_26_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_26 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_26_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_26 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_26_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_26 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_26_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_26 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_26_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_26 +#define GIO_DEPRECATED_MACRO_IN_2_26_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_26 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_26_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_26 +#define GIO_DEPRECATED_TYPE_IN_2_26_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_26 +#define GIO_AVAILABLE_IN_2_26 GIO_UNAVAILABLE (2, 26) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_26 GLIB_UNAVAILABLE_STATIC_INLINE (2, 26) +#define GIO_AVAILABLE_MACRO_IN_2_26 GLIB_UNAVAILABLE_MACRO (2, 26) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_26 GLIB_UNAVAILABLE_ENUMERATOR (2, 26) +#define GIO_AVAILABLE_TYPE_IN_2_26 GLIB_UNAVAILABLE_TYPE (2, 26) +#else +#define GIO_AVAILABLE_IN_2_26 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_26 +#define GIO_AVAILABLE_MACRO_IN_2_26 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_26 +#define GIO_AVAILABLE_TYPE_IN_2_26 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_28 +#define GIO_DEPRECATED_IN_2_28 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_28_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_28 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_28_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_28 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_28_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_28 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_28_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_28 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_28_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_28 +#define GIO_DEPRECATED_MACRO_IN_2_28_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_28 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_28_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_28 +#define GIO_DEPRECATED_TYPE_IN_2_28_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_28 +#define GIO_AVAILABLE_IN_2_28 GIO_UNAVAILABLE (2, 28) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_28 GLIB_UNAVAILABLE_STATIC_INLINE (2, 28) +#define GIO_AVAILABLE_MACRO_IN_2_28 GLIB_UNAVAILABLE_MACRO (2, 28) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_28 GLIB_UNAVAILABLE_ENUMERATOR (2, 28) +#define GIO_AVAILABLE_TYPE_IN_2_28 GLIB_UNAVAILABLE_TYPE (2, 28) +#else +#define GIO_AVAILABLE_IN_2_28 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_28 +#define GIO_AVAILABLE_MACRO_IN_2_28 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_28 +#define GIO_AVAILABLE_TYPE_IN_2_28 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_30 +#define GIO_DEPRECATED_IN_2_30 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_30_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_30 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_30_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_30 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_30_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_30 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_30_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_30 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_30_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_30 +#define GIO_DEPRECATED_MACRO_IN_2_30_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_30 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_30_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_30 +#define GIO_DEPRECATED_TYPE_IN_2_30_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_30 +#define GIO_AVAILABLE_IN_2_30 GIO_UNAVAILABLE (2, 30) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_30 GLIB_UNAVAILABLE_STATIC_INLINE (2, 30) +#define GIO_AVAILABLE_MACRO_IN_2_30 GLIB_UNAVAILABLE_MACRO (2, 30) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_30 GLIB_UNAVAILABLE_ENUMERATOR (2, 30) +#define GIO_AVAILABLE_TYPE_IN_2_30 GLIB_UNAVAILABLE_TYPE (2, 30) +#else +#define GIO_AVAILABLE_IN_2_30 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_30 +#define GIO_AVAILABLE_MACRO_IN_2_30 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_30 +#define GIO_AVAILABLE_TYPE_IN_2_30 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_32 +#define GIO_DEPRECATED_IN_2_32 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_32_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_32 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_32_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_32 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_32 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_32_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_32 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_32_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_32 +#define GIO_DEPRECATED_MACRO_IN_2_32_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_32 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_32 +#define GIO_DEPRECATED_TYPE_IN_2_32_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_32 +#define GIO_AVAILABLE_IN_2_32 GIO_UNAVAILABLE (2, 32) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_32 GLIB_UNAVAILABLE_STATIC_INLINE (2, 32) +#define GIO_AVAILABLE_MACRO_IN_2_32 GLIB_UNAVAILABLE_MACRO (2, 32) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_32 GLIB_UNAVAILABLE_ENUMERATOR (2, 32) +#define GIO_AVAILABLE_TYPE_IN_2_32 GLIB_UNAVAILABLE_TYPE (2, 32) +#else +#define GIO_AVAILABLE_IN_2_32 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_32 +#define GIO_AVAILABLE_MACRO_IN_2_32 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_32 +#define GIO_AVAILABLE_TYPE_IN_2_32 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_34 +#define GIO_DEPRECATED_IN_2_34 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_34_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_34 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_34_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_34 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_34_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_34 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_34_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_34 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_34_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_34 +#define GIO_DEPRECATED_MACRO_IN_2_34_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_34 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_34_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_34 +#define GIO_DEPRECATED_TYPE_IN_2_34_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_34 +#define GIO_AVAILABLE_IN_2_34 GIO_UNAVAILABLE (2, 34) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_34 GLIB_UNAVAILABLE_STATIC_INLINE (2, 34) +#define GIO_AVAILABLE_MACRO_IN_2_34 GLIB_UNAVAILABLE_MACRO (2, 34) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_34 GLIB_UNAVAILABLE_ENUMERATOR (2, 34) +#define GIO_AVAILABLE_TYPE_IN_2_34 GLIB_UNAVAILABLE_TYPE (2, 34) +#else +#define GIO_AVAILABLE_IN_2_34 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_34 +#define GIO_AVAILABLE_MACRO_IN_2_34 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_34 +#define GIO_AVAILABLE_TYPE_IN_2_34 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_36 +#define GIO_DEPRECATED_IN_2_36 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_36_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_36 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_36_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_36 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_36_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_36 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_36_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_36 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_36_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_36 +#define GIO_DEPRECATED_MACRO_IN_2_36_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_36 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_36_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_36 +#define GIO_DEPRECATED_TYPE_IN_2_36_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_36 +#define GIO_AVAILABLE_IN_2_36 GIO_UNAVAILABLE (2, 36) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_36 GLIB_UNAVAILABLE_STATIC_INLINE (2, 36) +#define GIO_AVAILABLE_MACRO_IN_2_36 GLIB_UNAVAILABLE_MACRO (2, 36) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_36 GLIB_UNAVAILABLE_ENUMERATOR (2, 36) +#define GIO_AVAILABLE_TYPE_IN_2_36 GLIB_UNAVAILABLE_TYPE (2, 36) +#else +#define GIO_AVAILABLE_IN_2_36 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_36 +#define GIO_AVAILABLE_MACRO_IN_2_36 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_36 +#define GIO_AVAILABLE_TYPE_IN_2_36 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_38 +#define GIO_DEPRECATED_IN_2_38 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_38_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_38 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_38_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_38 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_38_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_38 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_38_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_38 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_38_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_38 +#define GIO_DEPRECATED_MACRO_IN_2_38_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_38 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_38_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_38 +#define GIO_DEPRECATED_TYPE_IN_2_38_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 +#define GIO_AVAILABLE_IN_2_38 GIO_UNAVAILABLE (2, 38) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_38 GLIB_UNAVAILABLE_STATIC_INLINE (2, 38) +#define GIO_AVAILABLE_MACRO_IN_2_38 GLIB_UNAVAILABLE_MACRO (2, 38) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_38 GLIB_UNAVAILABLE_ENUMERATOR (2, 38) +#define GIO_AVAILABLE_TYPE_IN_2_38 GLIB_UNAVAILABLE_TYPE (2, 38) +#else +#define GIO_AVAILABLE_IN_2_38 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_38 +#define GIO_AVAILABLE_MACRO_IN_2_38 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_38 +#define GIO_AVAILABLE_TYPE_IN_2_38 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_40 +#define GIO_DEPRECATED_IN_2_40 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_40_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_40 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_40_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_40 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_40_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_40 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_40_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_40 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_40_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_40 +#define GIO_DEPRECATED_MACRO_IN_2_40_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_40 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_40_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_40 +#define GIO_DEPRECATED_TYPE_IN_2_40_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_40 +#define GIO_AVAILABLE_IN_2_40 GIO_UNAVAILABLE (2, 40) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_40 GLIB_UNAVAILABLE_STATIC_INLINE (2, 40) +#define GIO_AVAILABLE_MACRO_IN_2_40 GLIB_UNAVAILABLE_MACRO (2, 40) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_40 GLIB_UNAVAILABLE_ENUMERATOR (2, 40) +#define GIO_AVAILABLE_TYPE_IN_2_40 GLIB_UNAVAILABLE_TYPE (2, 40) +#else +#define GIO_AVAILABLE_IN_2_40 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_40 +#define GIO_AVAILABLE_MACRO_IN_2_40 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_40 +#define GIO_AVAILABLE_TYPE_IN_2_40 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_42 +#define GIO_DEPRECATED_IN_2_42 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_42_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_42 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_42_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_42 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_42_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_42 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_42_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_42 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_42_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_42 +#define GIO_DEPRECATED_MACRO_IN_2_42_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_42 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_42_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_42 +#define GIO_DEPRECATED_TYPE_IN_2_42_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_42 +#define GIO_AVAILABLE_IN_2_42 GIO_UNAVAILABLE (2, 42) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_42 GLIB_UNAVAILABLE_STATIC_INLINE (2, 42) +#define GIO_AVAILABLE_MACRO_IN_2_42 GLIB_UNAVAILABLE_MACRO (2, 42) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_42 GLIB_UNAVAILABLE_ENUMERATOR (2, 42) +#define GIO_AVAILABLE_TYPE_IN_2_42 GLIB_UNAVAILABLE_TYPE (2, 42) +#else +#define GIO_AVAILABLE_IN_2_42 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_42 +#define GIO_AVAILABLE_MACRO_IN_2_42 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_42 +#define GIO_AVAILABLE_TYPE_IN_2_42 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_44 +#define GIO_DEPRECATED_IN_2_44 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_44_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_44 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_44_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_44 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_44_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_44 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_44_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_44 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_44_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_44 +#define GIO_DEPRECATED_MACRO_IN_2_44_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_44 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_44_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_44 +#define GIO_DEPRECATED_TYPE_IN_2_44_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_44 +#define GIO_AVAILABLE_IN_2_44 GIO_UNAVAILABLE (2, 44) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_44 GLIB_UNAVAILABLE_STATIC_INLINE (2, 44) +#define GIO_AVAILABLE_MACRO_IN_2_44 GLIB_UNAVAILABLE_MACRO (2, 44) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_44 GLIB_UNAVAILABLE_ENUMERATOR (2, 44) +#define GIO_AVAILABLE_TYPE_IN_2_44 GLIB_UNAVAILABLE_TYPE (2, 44) +#else +#define GIO_AVAILABLE_IN_2_44 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_44 +#define GIO_AVAILABLE_MACRO_IN_2_44 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_44 +#define GIO_AVAILABLE_TYPE_IN_2_44 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_46 +#define GIO_DEPRECATED_IN_2_46 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_46_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_46 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_46_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_46 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_46_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_46 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_46_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_46 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_46_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_46 +#define GIO_DEPRECATED_MACRO_IN_2_46_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_46 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_46_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_46 +#define GIO_DEPRECATED_TYPE_IN_2_46_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_46 +#define GIO_AVAILABLE_IN_2_46 GIO_UNAVAILABLE (2, 46) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_46 GLIB_UNAVAILABLE_STATIC_INLINE (2, 46) +#define GIO_AVAILABLE_MACRO_IN_2_46 GLIB_UNAVAILABLE_MACRO (2, 46) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_46 GLIB_UNAVAILABLE_ENUMERATOR (2, 46) +#define GIO_AVAILABLE_TYPE_IN_2_46 GLIB_UNAVAILABLE_TYPE (2, 46) +#else +#define GIO_AVAILABLE_IN_2_46 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_46 +#define GIO_AVAILABLE_MACRO_IN_2_46 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_46 +#define GIO_AVAILABLE_TYPE_IN_2_46 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_48 +#define GIO_DEPRECATED_IN_2_48 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_48_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_48 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_48_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_48 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_48_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_48 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_48_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_48 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_48_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_48 +#define GIO_DEPRECATED_MACRO_IN_2_48_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_48 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_48_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_48 +#define GIO_DEPRECATED_TYPE_IN_2_48_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_48 +#define GIO_AVAILABLE_IN_2_48 GIO_UNAVAILABLE (2, 48) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_48 GLIB_UNAVAILABLE_STATIC_INLINE (2, 48) +#define GIO_AVAILABLE_MACRO_IN_2_48 GLIB_UNAVAILABLE_MACRO (2, 48) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_48 GLIB_UNAVAILABLE_ENUMERATOR (2, 48) +#define GIO_AVAILABLE_TYPE_IN_2_48 GLIB_UNAVAILABLE_TYPE (2, 48) +#else +#define GIO_AVAILABLE_IN_2_48 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_48 +#define GIO_AVAILABLE_MACRO_IN_2_48 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_48 +#define GIO_AVAILABLE_TYPE_IN_2_48 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_50 +#define GIO_DEPRECATED_IN_2_50 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_50_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_50 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_50_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_50 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_50_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_50 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_50_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_50 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_50_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_50 +#define GIO_DEPRECATED_MACRO_IN_2_50_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_50 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_50_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_50 +#define GIO_DEPRECATED_TYPE_IN_2_50_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_50 +#define GIO_AVAILABLE_IN_2_50 GIO_UNAVAILABLE (2, 50) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_50 GLIB_UNAVAILABLE_STATIC_INLINE (2, 50) +#define GIO_AVAILABLE_MACRO_IN_2_50 GLIB_UNAVAILABLE_MACRO (2, 50) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_50 GLIB_UNAVAILABLE_ENUMERATOR (2, 50) +#define GIO_AVAILABLE_TYPE_IN_2_50 GLIB_UNAVAILABLE_TYPE (2, 50) +#else +#define GIO_AVAILABLE_IN_2_50 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_50 +#define GIO_AVAILABLE_MACRO_IN_2_50 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_50 +#define GIO_AVAILABLE_TYPE_IN_2_50 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_52 +#define GIO_DEPRECATED_IN_2_52 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_52_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_52 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_52_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_52 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_52_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_52 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_52_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_52 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_52_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_52 +#define GIO_DEPRECATED_MACRO_IN_2_52_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_52 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_52_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_52 +#define GIO_DEPRECATED_TYPE_IN_2_52_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_52 +#define GIO_AVAILABLE_IN_2_52 GIO_UNAVAILABLE (2, 52) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_52 GLIB_UNAVAILABLE_STATIC_INLINE (2, 52) +#define GIO_AVAILABLE_MACRO_IN_2_52 GLIB_UNAVAILABLE_MACRO (2, 52) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_52 GLIB_UNAVAILABLE_ENUMERATOR (2, 52) +#define GIO_AVAILABLE_TYPE_IN_2_52 GLIB_UNAVAILABLE_TYPE (2, 52) +#else +#define GIO_AVAILABLE_IN_2_52 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_52 +#define GIO_AVAILABLE_MACRO_IN_2_52 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_52 +#define GIO_AVAILABLE_TYPE_IN_2_52 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_54 +#define GIO_DEPRECATED_IN_2_54 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_54_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_54 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_54_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_54 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_54_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_54 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_54_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_54 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_54_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_54 +#define GIO_DEPRECATED_MACRO_IN_2_54_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_54 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_54_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_54 +#define GIO_DEPRECATED_TYPE_IN_2_54_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_54 +#define GIO_AVAILABLE_IN_2_54 GIO_UNAVAILABLE (2, 54) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_54 GLIB_UNAVAILABLE_STATIC_INLINE (2, 54) +#define GIO_AVAILABLE_MACRO_IN_2_54 GLIB_UNAVAILABLE_MACRO (2, 54) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_54 GLIB_UNAVAILABLE_ENUMERATOR (2, 54) +#define GIO_AVAILABLE_TYPE_IN_2_54 GLIB_UNAVAILABLE_TYPE (2, 54) +#else +#define GIO_AVAILABLE_IN_2_54 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_54 +#define GIO_AVAILABLE_MACRO_IN_2_54 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_54 +#define GIO_AVAILABLE_TYPE_IN_2_54 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_56 +#define GIO_DEPRECATED_IN_2_56 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_56_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_56 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_56_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_56 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_56_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_56 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_56_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_56 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_56_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_56 +#define GIO_DEPRECATED_MACRO_IN_2_56_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_56 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_56_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_56 +#define GIO_DEPRECATED_TYPE_IN_2_56_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_56 +#define GIO_AVAILABLE_IN_2_56 GIO_UNAVAILABLE (2, 56) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_56 GLIB_UNAVAILABLE_STATIC_INLINE (2, 56) +#define GIO_AVAILABLE_MACRO_IN_2_56 GLIB_UNAVAILABLE_MACRO (2, 56) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_56 GLIB_UNAVAILABLE_ENUMERATOR (2, 56) +#define GIO_AVAILABLE_TYPE_IN_2_56 GLIB_UNAVAILABLE_TYPE (2, 56) +#else +#define GIO_AVAILABLE_IN_2_56 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_56 +#define GIO_AVAILABLE_MACRO_IN_2_56 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_56 +#define GIO_AVAILABLE_TYPE_IN_2_56 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_58 +#define GIO_DEPRECATED_IN_2_58 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_58_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_58 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_58_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_58 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_58_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_58 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_58_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_58 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_58_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_58 +#define GIO_DEPRECATED_MACRO_IN_2_58_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_58 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_58_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_58 +#define GIO_DEPRECATED_TYPE_IN_2_58_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_58 +#define GIO_AVAILABLE_IN_2_58 GIO_UNAVAILABLE (2, 58) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_58 GLIB_UNAVAILABLE_STATIC_INLINE (2, 58) +#define GIO_AVAILABLE_MACRO_IN_2_58 GLIB_UNAVAILABLE_MACRO (2, 58) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_58 GLIB_UNAVAILABLE_ENUMERATOR (2, 58) +#define GIO_AVAILABLE_TYPE_IN_2_58 GLIB_UNAVAILABLE_TYPE (2, 58) +#else +#define GIO_AVAILABLE_IN_2_58 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_58 +#define GIO_AVAILABLE_MACRO_IN_2_58 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_58 +#define GIO_AVAILABLE_TYPE_IN_2_58 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_60 +#define GIO_DEPRECATED_IN_2_60 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_60_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_60 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_60_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_60 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_60_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_60 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_60_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_60 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_60_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_60 +#define GIO_DEPRECATED_MACRO_IN_2_60_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_60 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_60_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_60 +#define GIO_DEPRECATED_TYPE_IN_2_60_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_60 +#define GIO_AVAILABLE_IN_2_60 GIO_UNAVAILABLE (2, 60) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_60 GLIB_UNAVAILABLE_STATIC_INLINE (2, 60) +#define GIO_AVAILABLE_MACRO_IN_2_60 GLIB_UNAVAILABLE_MACRO (2, 60) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_60 GLIB_UNAVAILABLE_ENUMERATOR (2, 60) +#define GIO_AVAILABLE_TYPE_IN_2_60 GLIB_UNAVAILABLE_TYPE (2, 60) +#else +#define GIO_AVAILABLE_IN_2_60 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_60 +#define GIO_AVAILABLE_MACRO_IN_2_60 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_60 +#define GIO_AVAILABLE_TYPE_IN_2_60 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_62 +#define GIO_DEPRECATED_IN_2_62 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_62_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_62 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_62_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_62 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_62_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_62 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_62_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_62 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_62_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_62 +#define GIO_DEPRECATED_MACRO_IN_2_62_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_62 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_62_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_62 +#define GIO_DEPRECATED_TYPE_IN_2_62_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_62 +#define GIO_AVAILABLE_IN_2_62 GIO_UNAVAILABLE (2, 62) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_62 GLIB_UNAVAILABLE_STATIC_INLINE (2, 62) +#define GIO_AVAILABLE_MACRO_IN_2_62 GLIB_UNAVAILABLE_MACRO (2, 62) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_62 GLIB_UNAVAILABLE_ENUMERATOR (2, 62) +#define GIO_AVAILABLE_TYPE_IN_2_62 GLIB_UNAVAILABLE_TYPE (2, 62) +#else +#define GIO_AVAILABLE_IN_2_62 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_62 +#define GIO_AVAILABLE_MACRO_IN_2_62 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_62 +#define GIO_AVAILABLE_TYPE_IN_2_62 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_64 +#define GIO_DEPRECATED_IN_2_64 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_64_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_64 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_64_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_64 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_64_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_64 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_64_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_64 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_64_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_64 +#define GIO_DEPRECATED_MACRO_IN_2_64_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_64 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_64_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_64 +#define GIO_DEPRECATED_TYPE_IN_2_64_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_64 +#define GIO_AVAILABLE_IN_2_64 GIO_UNAVAILABLE (2, 64) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_64 GLIB_UNAVAILABLE_STATIC_INLINE (2, 64) +#define GIO_AVAILABLE_MACRO_IN_2_64 GLIB_UNAVAILABLE_MACRO (2, 64) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_64 GLIB_UNAVAILABLE_ENUMERATOR (2, 64) +#define GIO_AVAILABLE_TYPE_IN_2_64 GLIB_UNAVAILABLE_TYPE (2, 64) +#else +#define GIO_AVAILABLE_IN_2_64 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_64 +#define GIO_AVAILABLE_MACRO_IN_2_64 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_64 +#define GIO_AVAILABLE_TYPE_IN_2_64 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_66 +#define GIO_DEPRECATED_IN_2_66 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_66_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_66 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_66_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_66 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_66_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_66 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_66_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_66 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_66_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_66 +#define GIO_DEPRECATED_MACRO_IN_2_66_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_66 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_66_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_66 +#define GIO_DEPRECATED_TYPE_IN_2_66_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_66 +#define GIO_AVAILABLE_IN_2_66 GIO_UNAVAILABLE (2, 66) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_66 GLIB_UNAVAILABLE_STATIC_INLINE (2, 66) +#define GIO_AVAILABLE_MACRO_IN_2_66 GLIB_UNAVAILABLE_MACRO (2, 66) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_66 GLIB_UNAVAILABLE_ENUMERATOR (2, 66) +#define GIO_AVAILABLE_TYPE_IN_2_66 GLIB_UNAVAILABLE_TYPE (2, 66) +#else +#define GIO_AVAILABLE_IN_2_66 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_66 +#define GIO_AVAILABLE_MACRO_IN_2_66 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_66 +#define GIO_AVAILABLE_TYPE_IN_2_66 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_68 +#define GIO_DEPRECATED_IN_2_68 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_68_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_68 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_68_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_68 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_68_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_68 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_68_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_68 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_68_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_68 +#define GIO_DEPRECATED_MACRO_IN_2_68_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_68 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_68_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_68 +#define GIO_DEPRECATED_TYPE_IN_2_68_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_68 +#define GIO_AVAILABLE_IN_2_68 GIO_UNAVAILABLE (2, 68) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_68 GLIB_UNAVAILABLE_STATIC_INLINE (2, 68) +#define GIO_AVAILABLE_MACRO_IN_2_68 GLIB_UNAVAILABLE_MACRO (2, 68) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_68 GLIB_UNAVAILABLE_ENUMERATOR (2, 68) +#define GIO_AVAILABLE_TYPE_IN_2_68 GLIB_UNAVAILABLE_TYPE (2, 68) +#else +#define GIO_AVAILABLE_IN_2_68 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_68 +#define GIO_AVAILABLE_MACRO_IN_2_68 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_68 +#define GIO_AVAILABLE_TYPE_IN_2_68 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_70 +#define GIO_DEPRECATED_IN_2_70 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_70_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_70 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_70_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_70 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_70_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_70 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_70_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_70 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_70_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_70 +#define GIO_DEPRECATED_MACRO_IN_2_70_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_70 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_70_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_70 +#define GIO_DEPRECATED_TYPE_IN_2_70_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_70 +#define GIO_AVAILABLE_IN_2_70 GIO_UNAVAILABLE (2, 70) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_70 GLIB_UNAVAILABLE_STATIC_INLINE (2, 70) +#define GIO_AVAILABLE_MACRO_IN_2_70 GLIB_UNAVAILABLE_MACRO (2, 70) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_70 GLIB_UNAVAILABLE_ENUMERATOR (2, 70) +#define GIO_AVAILABLE_TYPE_IN_2_70 GLIB_UNAVAILABLE_TYPE (2, 70) +#else +#define GIO_AVAILABLE_IN_2_70 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_70 +#define GIO_AVAILABLE_MACRO_IN_2_70 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_70 +#define GIO_AVAILABLE_TYPE_IN_2_70 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_72 +#define GIO_DEPRECATED_IN_2_72 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_72_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_72 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_72_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_72 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_72_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_72 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_72_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_72 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_72_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_72 +#define GIO_DEPRECATED_MACRO_IN_2_72_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_72 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_72_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_72 +#define GIO_DEPRECATED_TYPE_IN_2_72_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_72 +#define GIO_AVAILABLE_IN_2_72 GIO_UNAVAILABLE (2, 72) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_72 GLIB_UNAVAILABLE_STATIC_INLINE (2, 72) +#define GIO_AVAILABLE_MACRO_IN_2_72 GLIB_UNAVAILABLE_MACRO (2, 72) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_72 GLIB_UNAVAILABLE_ENUMERATOR (2, 72) +#define GIO_AVAILABLE_TYPE_IN_2_72 GLIB_UNAVAILABLE_TYPE (2, 72) +#else +#define GIO_AVAILABLE_IN_2_72 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_72 +#define GIO_AVAILABLE_MACRO_IN_2_72 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_72 +#define GIO_AVAILABLE_TYPE_IN_2_72 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_74 +#define GIO_DEPRECATED_IN_2_74 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_74_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_74 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_74_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_74 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_74_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_74 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_74_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_74 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_74_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_74 +#define GIO_DEPRECATED_MACRO_IN_2_74_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_74 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_74_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_74 +#define GIO_DEPRECATED_TYPE_IN_2_74_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_74 +#define GIO_AVAILABLE_IN_2_74 GIO_UNAVAILABLE (2, 74) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_74 GLIB_UNAVAILABLE_STATIC_INLINE (2, 74) +#define GIO_AVAILABLE_MACRO_IN_2_74 GLIB_UNAVAILABLE_MACRO (2, 74) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_74 GLIB_UNAVAILABLE_ENUMERATOR (2, 74) +#define GIO_AVAILABLE_TYPE_IN_2_74 GLIB_UNAVAILABLE_TYPE (2, 74) +#else +#define GIO_AVAILABLE_IN_2_74 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_74 +#define GIO_AVAILABLE_MACRO_IN_2_74 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_74 +#define GIO_AVAILABLE_TYPE_IN_2_74 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_76 +#define GIO_DEPRECATED_IN_2_76 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_76_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_76 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_76_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_76 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_76_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_76 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_76_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_76 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_76_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_76 +#define GIO_DEPRECATED_MACRO_IN_2_76_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_76 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_76_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_76 +#define GIO_DEPRECATED_TYPE_IN_2_76_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_76 +#define GIO_AVAILABLE_IN_2_76 GIO_UNAVAILABLE (2, 76) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_76 GLIB_UNAVAILABLE_STATIC_INLINE (2, 76) +#define GIO_AVAILABLE_MACRO_IN_2_76 GLIB_UNAVAILABLE_MACRO (2, 76) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_76 GLIB_UNAVAILABLE_ENUMERATOR (2, 76) +#define GIO_AVAILABLE_TYPE_IN_2_76 GLIB_UNAVAILABLE_TYPE (2, 76) +#else +#define GIO_AVAILABLE_IN_2_76 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_76 +#define GIO_AVAILABLE_MACRO_IN_2_76 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_76 +#define GIO_AVAILABLE_TYPE_IN_2_76 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_78 +#define GIO_DEPRECATED_IN_2_78 GIO_DEPRECATED +#define GIO_DEPRECATED_IN_2_78_FOR(f) GIO_DEPRECATED_FOR (f) +#define GIO_DEPRECATED_MACRO_IN_2_78 GLIB_DEPRECATED_MACRO +#define GIO_DEPRECATED_MACRO_IN_2_78_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_78 GLIB_DEPRECATED_ENUMERATOR +#define GIO_DEPRECATED_ENUMERATOR_IN_2_78_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GIO_DEPRECATED_TYPE_IN_2_78 GLIB_DEPRECATED_TYPE +#define GIO_DEPRECATED_TYPE_IN_2_78_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GIO_DEPRECATED_IN_2_78 _GIO_EXTERN +#define GIO_DEPRECATED_IN_2_78_FOR(f) _GIO_EXTERN +#define GIO_DEPRECATED_MACRO_IN_2_78 +#define GIO_DEPRECATED_MACRO_IN_2_78_FOR(f) +#define GIO_DEPRECATED_ENUMERATOR_IN_2_78 +#define GIO_DEPRECATED_ENUMERATOR_IN_2_78_FOR(f) +#define GIO_DEPRECATED_TYPE_IN_2_78 +#define GIO_DEPRECATED_TYPE_IN_2_78_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_78 +#define GIO_AVAILABLE_IN_2_78 GIO_UNAVAILABLE (2, 78) +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_78 GLIB_UNAVAILABLE_STATIC_INLINE (2, 78) +#define GIO_AVAILABLE_MACRO_IN_2_78 GLIB_UNAVAILABLE_MACRO (2, 78) +#define GIO_AVAILABLE_ENUMERATOR_IN_2_78 GLIB_UNAVAILABLE_ENUMERATOR (2, 78) +#define GIO_AVAILABLE_TYPE_IN_2_78 GLIB_UNAVAILABLE_TYPE (2, 78) +#else +#define GIO_AVAILABLE_IN_2_78 _GIO_EXTERN +#define GIO_AVAILABLE_STATIC_INLINE_IN_2_78 +#define GIO_AVAILABLE_MACRO_IN_2_78 +#define GIO_AVAILABLE_ENUMERATOR_IN_2_78 +#define GIO_AVAILABLE_TYPE_IN_2_78 +#endif diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gio.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gio.h new file mode 100644 index 0000000..c17657d --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gio.h @@ -0,0 +1,186 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_IO_H__ +#define __G_IO_H__ + +#define __GIO_GIO_H_INSIDE__ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#undef __GIO_GIO_H_INSIDE__ + +#endif /* __G_IO_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gioenums.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gioenums.h new file mode 100644 index 0000000..c820cd3 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gioenums.h @@ -0,0 +1,2149 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __GIO_ENUMS_H__ +#define __GIO_ENUMS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + + +/** + * GAppInfoCreateFlags: + * @G_APP_INFO_CREATE_NONE: No flags. + * @G_APP_INFO_CREATE_NEEDS_TERMINAL: Application opens in a terminal window. + * @G_APP_INFO_CREATE_SUPPORTS_URIS: Application supports URI arguments. + * @G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION: Application supports startup notification. Since 2.26 + * + * Flags used when creating a #GAppInfo. + */ +typedef enum { + G_APP_INFO_CREATE_NONE = 0, /*< nick=none >*/ + G_APP_INFO_CREATE_NEEDS_TERMINAL = (1 << 0), /*< nick=needs-terminal >*/ + G_APP_INFO_CREATE_SUPPORTS_URIS = (1 << 1), /*< nick=supports-uris >*/ + G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION = (1 << 2) /*< nick=supports-startup-notification >*/ +} GAppInfoCreateFlags; + +/** + * GConverterFlags: + * @G_CONVERTER_NO_FLAGS: No flags. + * @G_CONVERTER_INPUT_AT_END: At end of input data + * @G_CONVERTER_FLUSH: Flush data + * + * Flags used when calling a g_converter_convert(). + * + * Since: 2.24 + */ +typedef enum { + G_CONVERTER_NO_FLAGS = 0, /*< nick=none >*/ + G_CONVERTER_INPUT_AT_END = (1 << 0), /*< nick=input-at-end >*/ + G_CONVERTER_FLUSH = (1 << 1) /*< nick=flush >*/ +} GConverterFlags; + +/** + * GConverterResult: + * @G_CONVERTER_ERROR: There was an error during conversion. + * @G_CONVERTER_CONVERTED: Some data was consumed or produced + * @G_CONVERTER_FINISHED: The conversion is finished + * @G_CONVERTER_FLUSHED: Flushing is finished + * + * Results returned from g_converter_convert(). + * + * Since: 2.24 + */ +typedef enum { + G_CONVERTER_ERROR = 0, /*< nick=error >*/ + G_CONVERTER_CONVERTED = 1, /*< nick=converted >*/ + G_CONVERTER_FINISHED = 2, /*< nick=finished >*/ + G_CONVERTER_FLUSHED = 3 /*< nick=flushed >*/ +} GConverterResult; + + +/** + * GDataStreamByteOrder: + * @G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN: Selects Big Endian byte order. + * @G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN: Selects Little Endian byte order. + * @G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN: Selects endianness based on host machine's architecture. + * + * #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources + * across various machine architectures. + * + **/ +typedef enum { + G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN, + G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN, + G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN +} GDataStreamByteOrder; + + +/** + * GDataStreamNewlineType: + * @G_DATA_STREAM_NEWLINE_TYPE_LF: Selects "LF" line endings, common on most modern UNIX platforms. + * @G_DATA_STREAM_NEWLINE_TYPE_CR: Selects "CR" line endings. + * @G_DATA_STREAM_NEWLINE_TYPE_CR_LF: Selects "CR, LF" line ending, common on Microsoft Windows. + * @G_DATA_STREAM_NEWLINE_TYPE_ANY: Automatically try to handle any line ending type. + * + * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file. + **/ +typedef enum { + G_DATA_STREAM_NEWLINE_TYPE_LF, + G_DATA_STREAM_NEWLINE_TYPE_CR, + G_DATA_STREAM_NEWLINE_TYPE_CR_LF, + G_DATA_STREAM_NEWLINE_TYPE_ANY +} GDataStreamNewlineType; + + +/** + * GFileAttributeType: + * @G_FILE_ATTRIBUTE_TYPE_INVALID: indicates an invalid or uninitialized type. + * @G_FILE_ATTRIBUTE_TYPE_STRING: a null terminated UTF8 string. + * @G_FILE_ATTRIBUTE_TYPE_BYTE_STRING: a zero terminated string of non-zero bytes. + * @G_FILE_ATTRIBUTE_TYPE_BOOLEAN: a boolean value. + * @G_FILE_ATTRIBUTE_TYPE_UINT32: an unsigned 4-byte/32-bit integer. + * @G_FILE_ATTRIBUTE_TYPE_INT32: a signed 4-byte/32-bit integer. + * @G_FILE_ATTRIBUTE_TYPE_UINT64: an unsigned 8-byte/64-bit integer. + * @G_FILE_ATTRIBUTE_TYPE_INT64: a signed 8-byte/64-bit integer. + * @G_FILE_ATTRIBUTE_TYPE_OBJECT: a #GObject. + * @G_FILE_ATTRIBUTE_TYPE_STRINGV: a %NULL terminated char **. Since 2.22 + * + * The data types for file attributes. + **/ +typedef enum { + G_FILE_ATTRIBUTE_TYPE_INVALID = 0, + G_FILE_ATTRIBUTE_TYPE_STRING, + G_FILE_ATTRIBUTE_TYPE_BYTE_STRING, /* zero terminated string of non-zero bytes */ + G_FILE_ATTRIBUTE_TYPE_BOOLEAN, + G_FILE_ATTRIBUTE_TYPE_UINT32, + G_FILE_ATTRIBUTE_TYPE_INT32, + G_FILE_ATTRIBUTE_TYPE_UINT64, + G_FILE_ATTRIBUTE_TYPE_INT64, + G_FILE_ATTRIBUTE_TYPE_OBJECT, + G_FILE_ATTRIBUTE_TYPE_STRINGV +} GFileAttributeType; + + +/** + * GFileAttributeInfoFlags: + * @G_FILE_ATTRIBUTE_INFO_NONE: no flags set. + * @G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE: copy the attribute values when the file is copied. + * @G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED: copy the attribute values when the file is moved. + * + * Flags specifying the behaviour of an attribute. + **/ +typedef enum { + G_FILE_ATTRIBUTE_INFO_NONE = 0, + G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE = (1 << 0), + G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED = (1 << 1) +} GFileAttributeInfoFlags; + + +/** + * GFileAttributeStatus: + * @G_FILE_ATTRIBUTE_STATUS_UNSET: Attribute value is unset (empty). + * @G_FILE_ATTRIBUTE_STATUS_SET: Attribute value is set. + * @G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING: Indicates an error in setting the value. + * + * Used by g_file_set_attributes_from_info() when setting file attributes. + **/ +typedef enum { + G_FILE_ATTRIBUTE_STATUS_UNSET = 0, + G_FILE_ATTRIBUTE_STATUS_SET, + G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING +} GFileAttributeStatus; + + +/** + * GFileQueryInfoFlags: + * @G_FILE_QUERY_INFO_NONE: No flags set. + * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks. + * + * Flags used when querying a #GFileInfo. + */ +typedef enum { + G_FILE_QUERY_INFO_NONE = 0, + G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS = (1 << 0) /*< nick=nofollow-symlinks >*/ +} GFileQueryInfoFlags; + + +/** + * GFileCreateFlags: + * @G_FILE_CREATE_NONE: No flags set. + * @G_FILE_CREATE_PRIVATE: Create a file that can only be + * accessed by the current user. + * @G_FILE_CREATE_REPLACE_DESTINATION: Replace the destination + * as if it didn't exist before. Don't try to keep any old + * permissions, replace instead of following links. This + * is generally useful if you're doing a "copy over" + * rather than a "save new version of" replace operation. + * You can think of it as "unlink destination" before + * writing to it, although the implementation may not + * be exactly like that. This flag can only be used with + * g_file_replace() and its variants, including g_file_replace_contents(). + * Since 2.20 + * + * Flags used when an operation may create a file. + */ +typedef enum { + G_FILE_CREATE_NONE = 0, + G_FILE_CREATE_PRIVATE = (1 << 0), + G_FILE_CREATE_REPLACE_DESTINATION = (1 << 1) +} GFileCreateFlags; + +/** + * GFileMeasureFlags: + * @G_FILE_MEASURE_NONE: No flags set. + * @G_FILE_MEASURE_REPORT_ANY_ERROR: Report any error encountered + * while traversing the directory tree. Normally errors are only + * reported for the toplevel file. + * @G_FILE_MEASURE_APPARENT_SIZE: Tally usage based on apparent file + * sizes. Normally, the block-size is used, if available, as this is a + * more accurate representation of disk space used. + * Compare with `du --apparent-size`. + * Since GLib 2.78. and similarly to `du` since GNU Coreutils 9.2, this will + * ignore the sizes of file types other than regular files and links, as the + * sizes of other file types are not specified in a standard way. + * @G_FILE_MEASURE_NO_XDEV: Do not cross mount point boundaries. + * Compare with `du -x`. + * + * Flags that can be used with g_file_measure_disk_usage(). + * + * Since: 2.38 + **/ +typedef enum { + G_FILE_MEASURE_NONE = 0, + G_FILE_MEASURE_REPORT_ANY_ERROR = (1 << 1), + G_FILE_MEASURE_APPARENT_SIZE = (1 << 2), + G_FILE_MEASURE_NO_XDEV = (1 << 3) +} GFileMeasureFlags; + +/** + * GMountMountFlags: + * @G_MOUNT_MOUNT_NONE: No flags set. + * + * Flags used when mounting a mount. + */ +typedef enum /*< flags >*/ { + G_MOUNT_MOUNT_NONE = 0 +} GMountMountFlags; + + +/** + * GMountUnmountFlags: + * @G_MOUNT_UNMOUNT_NONE: No flags set. + * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding + * file operations on the mount. + * + * Flags used when an unmounting a mount. + */ +typedef enum { + G_MOUNT_UNMOUNT_NONE = 0, + G_MOUNT_UNMOUNT_FORCE = (1 << 0) +} GMountUnmountFlags; + +/** + * GDriveStartFlags: + * @G_DRIVE_START_NONE: No flags set. + * + * Flags used when starting a drive. + * + * Since: 2.22 + */ +typedef enum /*< flags >*/ { + G_DRIVE_START_NONE = 0 +} GDriveStartFlags; + +/** + * GDriveStartStopType: + * @G_DRIVE_START_STOP_TYPE_UNKNOWN: Unknown or drive doesn't support + * start/stop. + * @G_DRIVE_START_STOP_TYPE_SHUTDOWN: The stop method will physically + * shut down the drive and e.g. power down the port the drive is + * attached to. + * @G_DRIVE_START_STOP_TYPE_NETWORK: The start/stop methods are used + * for connecting/disconnect to the drive over the network. + * @G_DRIVE_START_STOP_TYPE_MULTIDISK: The start/stop methods will + * assemble/disassemble a virtual drive from several physical + * drives. + * @G_DRIVE_START_STOP_TYPE_PASSWORD: The start/stop methods will + * unlock/lock the disk (for example using the ATA SECURITY + * UNLOCK DEVICE command) + * + * Enumeration describing how a drive can be started/stopped. + * + * Since: 2.22 + */ +typedef enum { + G_DRIVE_START_STOP_TYPE_UNKNOWN, + G_DRIVE_START_STOP_TYPE_SHUTDOWN, + G_DRIVE_START_STOP_TYPE_NETWORK, + G_DRIVE_START_STOP_TYPE_MULTIDISK, + G_DRIVE_START_STOP_TYPE_PASSWORD +} GDriveStartStopType; + +/** + * GFileCopyFlags: + * @G_FILE_COPY_NONE: No flags set. + * @G_FILE_COPY_OVERWRITE: Overwrite any existing files + * @G_FILE_COPY_BACKUP: Make a backup of any existing files. + * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks. + * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo). + * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported. + * @G_FILE_COPY_TARGET_DEFAULT_PERMS: Leaves target file with default perms, instead of setting the source file perms. + * + * Flags used when copying or moving files. + */ +typedef enum { + G_FILE_COPY_NONE = 0, /*< nick=none >*/ + G_FILE_COPY_OVERWRITE = (1 << 0), + G_FILE_COPY_BACKUP = (1 << 1), + G_FILE_COPY_NOFOLLOW_SYMLINKS = (1 << 2), + G_FILE_COPY_ALL_METADATA = (1 << 3), + G_FILE_COPY_NO_FALLBACK_FOR_MOVE = (1 << 4), + G_FILE_COPY_TARGET_DEFAULT_PERMS = (1 << 5) +} GFileCopyFlags; + + +/** + * GFileMonitorFlags: + * @G_FILE_MONITOR_NONE: No flags set. + * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events. + * @G_FILE_MONITOR_SEND_MOVED: Pair DELETED and CREATED events caused + * by file renames (moves) and send a single G_FILE_MONITOR_EVENT_MOVED + * event instead (NB: not supported on all backends; the default + * behaviour -without specifying this flag- is to send single DELETED + * and CREATED events). Deprecated since 2.46: use + * %G_FILE_MONITOR_WATCH_MOVES instead. + * @G_FILE_MONITOR_WATCH_HARD_LINKS: Watch for changes to the file made + * via another hard link. Since 2.36. + * @G_FILE_MONITOR_WATCH_MOVES: Watch for rename operations on a + * monitored directory. This causes %G_FILE_MONITOR_EVENT_RENAMED, + * %G_FILE_MONITOR_EVENT_MOVED_IN and %G_FILE_MONITOR_EVENT_MOVED_OUT + * events to be emitted when possible. Since: 2.46. + * + * Flags used to set what a #GFileMonitor will watch for. + */ +typedef enum { + G_FILE_MONITOR_NONE = 0, + G_FILE_MONITOR_WATCH_MOUNTS = (1 << 0), + G_FILE_MONITOR_SEND_MOVED = (1 << 1), + G_FILE_MONITOR_WATCH_HARD_LINKS = (1 << 2), + G_FILE_MONITOR_WATCH_MOVES = (1 << 3) +} GFileMonitorFlags; + + +/** + * GFileType: + * @G_FILE_TYPE_UNKNOWN: File's type is unknown. + * @G_FILE_TYPE_REGULAR: File handle represents a regular file. + * @G_FILE_TYPE_DIRECTORY: File handle represents a directory. + * @G_FILE_TYPE_SYMBOLIC_LINK: File handle represents a symbolic link + * (Unix systems). + * @G_FILE_TYPE_SPECIAL: File is a "special" file, such as a socket, fifo, + * block device, or character device. + * @G_FILE_TYPE_SHORTCUT: File is a shortcut (Windows systems). + * @G_FILE_TYPE_MOUNTABLE: File is a mountable location. + * + * Indicates the file's on-disk type. + * + * On Windows systems a file will never have %G_FILE_TYPE_SYMBOLIC_LINK type; + * use #GFileInfo and %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK to determine + * whether a file is a symlink or not. This is due to the fact that NTFS does + * not have a single filesystem object type for symbolic links - it has + * files that symlink to files, and directories that symlink to directories. + * #GFileType enumeration cannot precisely represent this important distinction, + * which is why all Windows symlinks will continue to be reported as + * %G_FILE_TYPE_REGULAR or %G_FILE_TYPE_DIRECTORY. + **/ +typedef enum { + G_FILE_TYPE_UNKNOWN = 0, + G_FILE_TYPE_REGULAR, + G_FILE_TYPE_DIRECTORY, + G_FILE_TYPE_SYMBOLIC_LINK, + G_FILE_TYPE_SPECIAL, /* socket, fifo, blockdev, chardev */ + G_FILE_TYPE_SHORTCUT, + G_FILE_TYPE_MOUNTABLE +} GFileType; + + +/** + * GFilesystemPreviewType: + * @G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS: Only preview files if user has explicitly requested it. + * @G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL: Preview files if user has requested preview of "local" files. + * @G_FILESYSTEM_PREVIEW_TYPE_NEVER: Never preview files. + * + * Indicates a hint from the file system whether files should be + * previewed in a file manager. Returned as the value of the key + * %G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW. + **/ +typedef enum { + G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS = 0, + G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL, + G_FILESYSTEM_PREVIEW_TYPE_NEVER +} GFilesystemPreviewType; + + +/** + * GFileMonitorEvent: + * @G_FILE_MONITOR_EVENT_CHANGED: a file changed. + * @G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: a hint that this was probably the last change in a set of changes. + * @G_FILE_MONITOR_EVENT_DELETED: a file was deleted. + * @G_FILE_MONITOR_EVENT_CREATED: a file was created. + * @G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: a file attribute was changed. + * @G_FILE_MONITOR_EVENT_PRE_UNMOUNT: the file location will soon be unmounted. + * @G_FILE_MONITOR_EVENT_UNMOUNTED: the file location was unmounted. + * @G_FILE_MONITOR_EVENT_MOVED: the file was moved -- only sent if the + * (deprecated) %G_FILE_MONITOR_SEND_MOVED flag is set + * @G_FILE_MONITOR_EVENT_RENAMED: the file was renamed within the + * current directory -- only sent if the %G_FILE_MONITOR_WATCH_MOVES + * flag is set. Since: 2.46. + * @G_FILE_MONITOR_EVENT_MOVED_IN: the file was moved into the + * monitored directory from another location -- only sent if the + * %G_FILE_MONITOR_WATCH_MOVES flag is set. Since: 2.46. + * @G_FILE_MONITOR_EVENT_MOVED_OUT: the file was moved out of the + * monitored directory to another location -- only sent if the + * %G_FILE_MONITOR_WATCH_MOVES flag is set. Since: 2.46 + * + * Specifies what type of event a monitor event is. + **/ +typedef enum { + G_FILE_MONITOR_EVENT_CHANGED, + G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT, + G_FILE_MONITOR_EVENT_DELETED, + G_FILE_MONITOR_EVENT_CREATED, + G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED, + G_FILE_MONITOR_EVENT_PRE_UNMOUNT, + G_FILE_MONITOR_EVENT_UNMOUNTED, + G_FILE_MONITOR_EVENT_MOVED, + G_FILE_MONITOR_EVENT_RENAMED, + G_FILE_MONITOR_EVENT_MOVED_IN, + G_FILE_MONITOR_EVENT_MOVED_OUT +} GFileMonitorEvent; + + +/* This enumeration conflicts with GIOError in giochannel.h. However, + * that is only used as a return value in some deprecated functions. + * So, we reuse the same prefix for the enumeration values, but call + * the actual enumeration (which is rarely used) GIOErrorEnum. + */ +/** + * GIOErrorEnum: + * @G_IO_ERROR_FAILED: Generic error condition for when an operation fails + * and no more specific #GIOErrorEnum value is defined. + * @G_IO_ERROR_NOT_FOUND: File not found. + * @G_IO_ERROR_EXISTS: File already exists. + * @G_IO_ERROR_IS_DIRECTORY: File is a directory. + * @G_IO_ERROR_NOT_DIRECTORY: File is not a directory. + * @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty. + * @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file. + * @G_IO_ERROR_NOT_SYMBOLIC_LINK: File is not a symbolic link. + * @G_IO_ERROR_NOT_MOUNTABLE_FILE: File cannot be mounted. + * @G_IO_ERROR_FILENAME_TOO_LONG: Filename is too many characters. + * @G_IO_ERROR_INVALID_FILENAME: Filename is invalid or contains invalid characters. + * @G_IO_ERROR_TOO_MANY_LINKS: File contains too many symbolic links. + * @G_IO_ERROR_NO_SPACE: No space left on drive. + * @G_IO_ERROR_INVALID_ARGUMENT: Invalid argument. + * @G_IO_ERROR_PERMISSION_DENIED: Permission denied. + * @G_IO_ERROR_NOT_SUPPORTED: Operation (or one of its parameters) not supported + * @G_IO_ERROR_NOT_MOUNTED: File isn't mounted. + * @G_IO_ERROR_ALREADY_MOUNTED: File is already mounted. + * @G_IO_ERROR_CLOSED: File was closed. + * @G_IO_ERROR_CANCELLED: Operation was cancelled. See #GCancellable. + * @G_IO_ERROR_PENDING: Operations are still pending. + * @G_IO_ERROR_READ_ONLY: File is read only. + * @G_IO_ERROR_CANT_CREATE_BACKUP: Backup couldn't be created. + * @G_IO_ERROR_WRONG_ETAG: File's Entity Tag was incorrect. + * @G_IO_ERROR_TIMED_OUT: Operation timed out. + * @G_IO_ERROR_WOULD_RECURSE: Operation would be recursive. + * @G_IO_ERROR_BUSY: File is busy. + * @G_IO_ERROR_WOULD_BLOCK: Operation would block. + * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations). + * @G_IO_ERROR_WOULD_MERGE: Operation would merge files. + * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has + * already interacted with the user. Do not display any error dialog. + * @G_IO_ERROR_TOO_MANY_OPEN_FILES: The current process has too many files + * open and can't open any more. Duplicate descriptors do count toward + * this limit. Since 2.20 + * @G_IO_ERROR_NOT_INITIALIZED: The object has not been initialized. Since 2.22 + * @G_IO_ERROR_ADDRESS_IN_USE: The requested address is already in use. Since 2.22 + * @G_IO_ERROR_PARTIAL_INPUT: Need more input to finish operation. Since 2.24 + * @G_IO_ERROR_INVALID_DATA: The input data was invalid. Since 2.24 + * @G_IO_ERROR_DBUS_ERROR: A remote object generated an error that + * doesn't correspond to a locally registered #GError error + * domain. Use g_dbus_error_get_remote_error() to extract the D-Bus + * error name and g_dbus_error_strip_remote_error() to fix up the + * message so it matches what was received on the wire. Since 2.26. + * @G_IO_ERROR_HOST_UNREACHABLE: Host unreachable. Since 2.26 + * @G_IO_ERROR_NETWORK_UNREACHABLE: Network unreachable. Since 2.26 + * @G_IO_ERROR_CONNECTION_REFUSED: Connection refused. Since 2.26 + * @G_IO_ERROR_PROXY_FAILED: Connection to proxy server failed. Since 2.26 + * @G_IO_ERROR_PROXY_AUTH_FAILED: Proxy authentication failed. Since 2.26 + * @G_IO_ERROR_PROXY_NEED_AUTH: Proxy server needs authentication. Since 2.26 + * @G_IO_ERROR_PROXY_NOT_ALLOWED: Proxy connection is not allowed by ruleset. + * Since 2.26 + * @G_IO_ERROR_BROKEN_PIPE: Broken pipe. Since 2.36 + * @G_IO_ERROR_CONNECTION_CLOSED: Connection closed by peer. Note that this + * is the same code as %G_IO_ERROR_BROKEN_PIPE; before 2.44 some + * "connection closed" errors returned %G_IO_ERROR_BROKEN_PIPE, but others + * returned %G_IO_ERROR_FAILED. Now they should all return the same + * value, which has this more logical name. Since 2.44. + * @G_IO_ERROR_NOT_CONNECTED: Transport endpoint is not connected. Since 2.44 + * @G_IO_ERROR_MESSAGE_TOO_LARGE: Message too large. Since 2.48. + * @G_IO_ERROR_NO_SUCH_DEVICE: No such device found. Since 2.74 + * + * Error codes returned by GIO functions. + * + * Note that this domain may be extended in future GLib releases. In + * general, new error codes either only apply to new APIs, or else + * replace %G_IO_ERROR_FAILED in cases that were not explicitly + * distinguished before. You should therefore avoid writing code like + * |[ + * if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_FAILED)) + * { + * // Assume that this is EPRINTERONFIRE + * ... + * } + * ]| + * but should instead treat all unrecognized error codes the same as + * %G_IO_ERROR_FAILED. + * + * See also #GPollableReturn for a cheaper way of returning + * %G_IO_ERROR_WOULD_BLOCK to callers without allocating a #GError. + **/ +typedef enum { + G_IO_ERROR_FAILED, + G_IO_ERROR_NOT_FOUND, + G_IO_ERROR_EXISTS, + G_IO_ERROR_IS_DIRECTORY, + G_IO_ERROR_NOT_DIRECTORY, + G_IO_ERROR_NOT_EMPTY, + G_IO_ERROR_NOT_REGULAR_FILE, + G_IO_ERROR_NOT_SYMBOLIC_LINK, + G_IO_ERROR_NOT_MOUNTABLE_FILE, + G_IO_ERROR_FILENAME_TOO_LONG, + G_IO_ERROR_INVALID_FILENAME, + G_IO_ERROR_TOO_MANY_LINKS, + G_IO_ERROR_NO_SPACE, + G_IO_ERROR_INVALID_ARGUMENT, + G_IO_ERROR_PERMISSION_DENIED, + G_IO_ERROR_NOT_SUPPORTED, + G_IO_ERROR_NOT_MOUNTED, + G_IO_ERROR_ALREADY_MOUNTED, + G_IO_ERROR_CLOSED, + G_IO_ERROR_CANCELLED, + G_IO_ERROR_PENDING, + G_IO_ERROR_READ_ONLY, + G_IO_ERROR_CANT_CREATE_BACKUP, + G_IO_ERROR_WRONG_ETAG, + G_IO_ERROR_TIMED_OUT, + G_IO_ERROR_WOULD_RECURSE, + G_IO_ERROR_BUSY, + G_IO_ERROR_WOULD_BLOCK, + G_IO_ERROR_HOST_NOT_FOUND, + G_IO_ERROR_WOULD_MERGE, + G_IO_ERROR_FAILED_HANDLED, + G_IO_ERROR_TOO_MANY_OPEN_FILES, + G_IO_ERROR_NOT_INITIALIZED, + G_IO_ERROR_ADDRESS_IN_USE, + G_IO_ERROR_PARTIAL_INPUT, + G_IO_ERROR_INVALID_DATA, + G_IO_ERROR_DBUS_ERROR, + G_IO_ERROR_HOST_UNREACHABLE, + G_IO_ERROR_NETWORK_UNREACHABLE, + G_IO_ERROR_CONNECTION_REFUSED, + G_IO_ERROR_PROXY_FAILED, + G_IO_ERROR_PROXY_AUTH_FAILED, + G_IO_ERROR_PROXY_NEED_AUTH, + G_IO_ERROR_PROXY_NOT_ALLOWED, + G_IO_ERROR_BROKEN_PIPE, + G_IO_ERROR_CONNECTION_CLOSED = G_IO_ERROR_BROKEN_PIPE, + G_IO_ERROR_NOT_CONNECTED, + G_IO_ERROR_MESSAGE_TOO_LARGE, + G_IO_ERROR_NO_SUCH_DEVICE GIO_AVAILABLE_ENUMERATOR_IN_2_74, +} GIOErrorEnum; + + +/** + * GAskPasswordFlags: + * @G_ASK_PASSWORD_NEED_PASSWORD: operation requires a password. + * @G_ASK_PASSWORD_NEED_USERNAME: operation requires a username. + * @G_ASK_PASSWORD_NEED_DOMAIN: operation requires a domain. + * @G_ASK_PASSWORD_SAVING_SUPPORTED: operation supports saving settings. + * @G_ASK_PASSWORD_ANONYMOUS_SUPPORTED: operation supports anonymous users. + * @G_ASK_PASSWORD_TCRYPT: operation takes TCRYPT parameters (Since: 2.58) + * + * #GAskPasswordFlags are used to request specific information from the + * user, or to notify the user of their choices in an authentication + * situation. + **/ +typedef enum { + G_ASK_PASSWORD_NEED_PASSWORD = (1 << 0), + G_ASK_PASSWORD_NEED_USERNAME = (1 << 1), + G_ASK_PASSWORD_NEED_DOMAIN = (1 << 2), + G_ASK_PASSWORD_SAVING_SUPPORTED = (1 << 3), + G_ASK_PASSWORD_ANONYMOUS_SUPPORTED = (1 << 4), + G_ASK_PASSWORD_TCRYPT = (1 << 5), +} GAskPasswordFlags; + + +/** + * GPasswordSave: + * @G_PASSWORD_SAVE_NEVER: never save a password. + * @G_PASSWORD_SAVE_FOR_SESSION: save a password for the session. + * @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently. + * + * #GPasswordSave is used to indicate the lifespan of a saved password. + * + * #Gvfs stores passwords in the Gnome keyring when this flag allows it + * to, and later retrieves it again from there. + **/ +typedef enum { + G_PASSWORD_SAVE_NEVER, + G_PASSWORD_SAVE_FOR_SESSION, + G_PASSWORD_SAVE_PERMANENTLY +} GPasswordSave; + + +/** + * GMountOperationResult: + * @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the + * user specified data is now available + * @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation + * to be aborted + * @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not + * implemented) + * + * #GMountOperationResult is returned as a result when a request for + * information is send by the mounting operation. + **/ +typedef enum { + G_MOUNT_OPERATION_HANDLED, + G_MOUNT_OPERATION_ABORTED, + G_MOUNT_OPERATION_UNHANDLED +} GMountOperationResult; + + +/** + * GOutputStreamSpliceFlags: + * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream. + * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after + * the splice. + * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after + * the splice. + * + * GOutputStreamSpliceFlags determine how streams should be spliced. + **/ +typedef enum { + G_OUTPUT_STREAM_SPLICE_NONE = 0, + G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE = (1 << 0), + G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET = (1 << 1) +} GOutputStreamSpliceFlags; + + +/** + * GIOStreamSpliceFlags: + * @G_IO_STREAM_SPLICE_NONE: Do not close either stream. + * @G_IO_STREAM_SPLICE_CLOSE_STREAM1: Close the first stream after + * the splice. + * @G_IO_STREAM_SPLICE_CLOSE_STREAM2: Close the second stream after + * the splice. + * @G_IO_STREAM_SPLICE_WAIT_FOR_BOTH: Wait for both splice operations to finish + * before calling the callback. + * + * GIOStreamSpliceFlags determine how streams should be spliced. + * + * Since: 2.28 + **/ +typedef enum { + G_IO_STREAM_SPLICE_NONE = 0, + G_IO_STREAM_SPLICE_CLOSE_STREAM1 = (1 << 0), + G_IO_STREAM_SPLICE_CLOSE_STREAM2 = (1 << 1), + G_IO_STREAM_SPLICE_WAIT_FOR_BOTH = (1 << 2) +} GIOStreamSpliceFlags; + +/** + * GEmblemOrigin: + * @G_EMBLEM_ORIGIN_UNKNOWN: Emblem of unknown origin + * @G_EMBLEM_ORIGIN_DEVICE: Emblem adds device-specific information + * @G_EMBLEM_ORIGIN_LIVEMETADATA: Emblem depicts live metadata, such as "readonly" + * @G_EMBLEM_ORIGIN_TAG: Emblem comes from a user-defined tag, e.g. set by nautilus (in the future) + * + * GEmblemOrigin is used to add information about the origin of the emblem + * to #GEmblem. + * + * Since: 2.18 + */ +typedef enum { + G_EMBLEM_ORIGIN_UNKNOWN, + G_EMBLEM_ORIGIN_DEVICE, + G_EMBLEM_ORIGIN_LIVEMETADATA, + G_EMBLEM_ORIGIN_TAG +} GEmblemOrigin; + +/** + * GResolverError: + * @G_RESOLVER_ERROR_NOT_FOUND: the requested name/address/service was not + * found + * @G_RESOLVER_ERROR_TEMPORARY_FAILURE: the requested information could not + * be looked up due to a network error or similar problem + * @G_RESOLVER_ERROR_INTERNAL: unknown error + * + * An error code used with %G_RESOLVER_ERROR in a #GError returned + * from a #GResolver routine. + * + * Since: 2.22 + */ +typedef enum { + G_RESOLVER_ERROR_NOT_FOUND, + G_RESOLVER_ERROR_TEMPORARY_FAILURE, + G_RESOLVER_ERROR_INTERNAL +} GResolverError; + +/** + * GResolverRecordType: + * @G_RESOLVER_RECORD_SRV: look up DNS SRV records for a domain + * @G_RESOLVER_RECORD_MX: look up DNS MX records for a domain + * @G_RESOLVER_RECORD_TXT: look up DNS TXT records for a name + * @G_RESOLVER_RECORD_SOA: look up DNS SOA records for a zone + * @G_RESOLVER_RECORD_NS: look up DNS NS records for a domain + * + * The type of record that g_resolver_lookup_records() or + * g_resolver_lookup_records_async() should retrieve. The records are returned + * as lists of #GVariant tuples. Each record type has different values in + * the variant tuples returned. + * + * %G_RESOLVER_RECORD_SRV records are returned as variants with the signature + * `(qqqs)`, containing a `guint16` with the priority, a `guint16` with the + * weight, a `guint16` with the port, and a string of the hostname. + * + * %G_RESOLVER_RECORD_MX records are returned as variants with the signature + * `(qs)`, representing a `guint16` with the preference, and a string containing + * the mail exchanger hostname. + * + * %G_RESOLVER_RECORD_TXT records are returned as variants with the signature + * `(as)`, representing an array of the strings in the text record. Note: Most TXT + * records only contain a single string, but + * [RFC 1035](https://tools.ietf.org/html/rfc1035#section-3.3.14) does allow a + * record to contain multiple strings. The RFC which defines the interpretation + * of a specific TXT record will likely require concatenation of multiple + * strings if they are present, as with + * [RFC 7208](https://tools.ietf.org/html/rfc7208#section-3.3). + * + * %G_RESOLVER_RECORD_SOA records are returned as variants with the signature + * `(ssuuuuu)`, representing a string containing the primary name server, a + * string containing the administrator, the serial as a `guint32`, the refresh + * interval as a `guint32`, the retry interval as a `guint32`, the expire timeout + * as a `guint32`, and the TTL as a `guint32`. + * + * %G_RESOLVER_RECORD_NS records are returned as variants with the signature + * `(s)`, representing a string of the hostname of the name server. + * + * Since: 2.34 + */ +typedef enum { + G_RESOLVER_RECORD_SRV = 1, + G_RESOLVER_RECORD_MX, + G_RESOLVER_RECORD_TXT, + G_RESOLVER_RECORD_SOA, + G_RESOLVER_RECORD_NS +} GResolverRecordType; + +/** + * GResourceError: + * @G_RESOURCE_ERROR_NOT_FOUND: no file was found at the requested path + * @G_RESOURCE_ERROR_INTERNAL: unknown error + * + * An error code used with %G_RESOURCE_ERROR in a #GError returned + * from a #GResource routine. + * + * Since: 2.32 + */ +typedef enum { + G_RESOURCE_ERROR_NOT_FOUND, + G_RESOURCE_ERROR_INTERNAL +} GResourceError; + +/** + * GResourceFlags: + * @G_RESOURCE_FLAGS_NONE: No flags set. + * @G_RESOURCE_FLAGS_COMPRESSED: The file is compressed. + * + * GResourceFlags give information about a particular file inside a resource + * bundle. + * + * Since: 2.32 + **/ +typedef enum { + G_RESOURCE_FLAGS_NONE = 0, + G_RESOURCE_FLAGS_COMPRESSED = (1<<0) +} GResourceFlags; + +/** + * GResourceLookupFlags: + * @G_RESOURCE_LOOKUP_FLAGS_NONE: No flags set. + * + * GResourceLookupFlags determine how resource path lookups are handled. + * + * Since: 2.32 + **/ +typedef enum /*< flags >*/ { + G_RESOURCE_LOOKUP_FLAGS_NONE = 0 +} GResourceLookupFlags; + +/** + * GSocketFamily: + * @G_SOCKET_FAMILY_INVALID: no address family + * @G_SOCKET_FAMILY_IPV4: the IPv4 family + * @G_SOCKET_FAMILY_IPV6: the IPv6 family + * @G_SOCKET_FAMILY_UNIX: the UNIX domain family + * + * The protocol family of a #GSocketAddress. (These values are + * identical to the system defines %AF_INET, %AF_INET6 and %AF_UNIX, + * if available.) + * + * Since: 2.22 + */ +typedef enum { + G_SOCKET_FAMILY_INVALID, + G_SOCKET_FAMILY_UNIX = GLIB_SYSDEF_AF_UNIX, + G_SOCKET_FAMILY_IPV4 = GLIB_SYSDEF_AF_INET, + G_SOCKET_FAMILY_IPV6 = GLIB_SYSDEF_AF_INET6 +} GSocketFamily; + +/** + * GSocketType: + * @G_SOCKET_TYPE_INVALID: Type unknown or wrong + * @G_SOCKET_TYPE_STREAM: Reliable connection-based byte streams (e.g. TCP). + * @G_SOCKET_TYPE_DATAGRAM: Connectionless, unreliable datagram passing. + * (e.g. UDP) + * @G_SOCKET_TYPE_SEQPACKET: Reliable connection-based passing of datagrams + * of fixed maximum length (e.g. SCTP). + * + * Flags used when creating a #GSocket. Some protocols may not implement + * all the socket types. + * + * Since: 2.22 + */ +typedef enum +{ + G_SOCKET_TYPE_INVALID, + G_SOCKET_TYPE_STREAM, + G_SOCKET_TYPE_DATAGRAM, + G_SOCKET_TYPE_SEQPACKET +} GSocketType; + +/** + * GSocketMsgFlags: + * @G_SOCKET_MSG_NONE: No flags. + * @G_SOCKET_MSG_OOB: Request to send/receive out of band data. + * @G_SOCKET_MSG_PEEK: Read data from the socket without removing it from + * the queue. + * @G_SOCKET_MSG_DONTROUTE: Don't use a gateway to send out the packet, + * only send to hosts on directly connected networks. + * + * Flags used in g_socket_receive_message() and g_socket_send_message(). + * The flags listed in the enum are some commonly available flags, but the + * values used for them are the same as on the platform, and any other flags + * are passed in/out as is. So to use a platform specific flag, just include + * the right system header and pass in the flag. + * + * Since: 2.22 + */ +typedef enum /*< flags >*/ +{ + G_SOCKET_MSG_NONE, + G_SOCKET_MSG_OOB = GLIB_SYSDEF_MSG_OOB, + G_SOCKET_MSG_PEEK = GLIB_SYSDEF_MSG_PEEK, + G_SOCKET_MSG_DONTROUTE = GLIB_SYSDEF_MSG_DONTROUTE +} GSocketMsgFlags; + +/** + * GSocketProtocol: + * @G_SOCKET_PROTOCOL_UNKNOWN: The protocol type is unknown + * @G_SOCKET_PROTOCOL_DEFAULT: The default protocol for the family/type + * @G_SOCKET_PROTOCOL_TCP: TCP over IP + * @G_SOCKET_PROTOCOL_UDP: UDP over IP + * @G_SOCKET_PROTOCOL_SCTP: SCTP over IP + * + * A protocol identifier is specified when creating a #GSocket, which is a + * family/type specific identifier, where 0 means the default protocol for + * the particular family/type. + * + * This enum contains a set of commonly available and used protocols. You + * can also pass any other identifiers handled by the platform in order to + * use protocols not listed here. + * + * Since: 2.22 + */ +typedef enum { + G_SOCKET_PROTOCOL_UNKNOWN = -1, + G_SOCKET_PROTOCOL_DEFAULT = 0, + G_SOCKET_PROTOCOL_TCP = 6, + G_SOCKET_PROTOCOL_UDP = 17, + G_SOCKET_PROTOCOL_SCTP = 132 +} GSocketProtocol; + +/** + * GZlibCompressorFormat: + * @G_ZLIB_COMPRESSOR_FORMAT_ZLIB: deflate compression with zlib header + * @G_ZLIB_COMPRESSOR_FORMAT_GZIP: gzip file format + * @G_ZLIB_COMPRESSOR_FORMAT_RAW: deflate compression with no header + * + * Used to select the type of data format to use for #GZlibDecompressor + * and #GZlibCompressor. + * + * Since: 2.24 + */ +typedef enum { + G_ZLIB_COMPRESSOR_FORMAT_ZLIB, + G_ZLIB_COMPRESSOR_FORMAT_GZIP, + G_ZLIB_COMPRESSOR_FORMAT_RAW +} GZlibCompressorFormat; + +/** + * GUnixSocketAddressType: + * @G_UNIX_SOCKET_ADDRESS_INVALID: invalid + * @G_UNIX_SOCKET_ADDRESS_ANONYMOUS: anonymous + * @G_UNIX_SOCKET_ADDRESS_PATH: a filesystem path + * @G_UNIX_SOCKET_ADDRESS_ABSTRACT: an abstract name + * @G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED: an abstract name, 0-padded + * to the full length of a unix socket name + * + * The type of name used by a #GUnixSocketAddress. + * %G_UNIX_SOCKET_ADDRESS_PATH indicates a traditional unix domain + * socket bound to a filesystem path. %G_UNIX_SOCKET_ADDRESS_ANONYMOUS + * indicates a socket not bound to any name (eg, a client-side socket, + * or a socket created with socketpair()). + * + * For abstract sockets, there are two incompatible ways of naming + * them; the man pages suggest using the entire `struct sockaddr_un` + * as the name, padding the unused parts of the %sun_path field with + * zeroes; this corresponds to %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED. + * However, many programs instead just use a portion of %sun_path, and + * pass an appropriate smaller length to bind() or connect(). This is + * %G_UNIX_SOCKET_ADDRESS_ABSTRACT. + * + * Since: 2.26 + */ +typedef enum { + G_UNIX_SOCKET_ADDRESS_INVALID, + G_UNIX_SOCKET_ADDRESS_ANONYMOUS, + G_UNIX_SOCKET_ADDRESS_PATH, + G_UNIX_SOCKET_ADDRESS_ABSTRACT, + G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED +} GUnixSocketAddressType; + +/** + * GBusType: + * @G_BUS_TYPE_STARTER: An alias for the message bus that activated the process, if any. + * @G_BUS_TYPE_NONE: Not a message bus. + * @G_BUS_TYPE_SYSTEM: The system-wide message bus. + * @G_BUS_TYPE_SESSION: The login session message bus. + * + * An enumeration for well-known message buses. + * + * Since: 2.26 + */ +typedef enum +{ + G_BUS_TYPE_STARTER = -1, + G_BUS_TYPE_NONE = 0, + G_BUS_TYPE_SYSTEM = 1, + G_BUS_TYPE_SESSION = 2 +} GBusType; + +/** + * GBusNameOwnerFlags: + * @G_BUS_NAME_OWNER_FLAGS_NONE: No flags set. + * @G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT: Allow another message bus connection to claim the name. + * @G_BUS_NAME_OWNER_FLAGS_REPLACE: If another message bus connection owns the name and have + * specified %G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection. + * @G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE: If another message bus connection owns the name, immediately + * return an error from g_bus_own_name() rather than entering the waiting queue for that name. (Since 2.54) + * + * Flags used in g_bus_own_name(). + * + * Since: 2.26 + */ +typedef enum +{ + G_BUS_NAME_OWNER_FLAGS_NONE = 0, /*< nick=none >*/ + G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT = (1<<0), /*< nick=allow-replacement >*/ + G_BUS_NAME_OWNER_FLAGS_REPLACE = (1<<1), /*< nick=replace >*/ + G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE = (1<<2) /*< nick=do-not-queue >*/ +} GBusNameOwnerFlags; +/* When adding new flags, their numeric values must currently match those + * used in the D-Bus Specification. */ + +/** + * GBusNameWatcherFlags: + * @G_BUS_NAME_WATCHER_FLAGS_NONE: No flags set. + * @G_BUS_NAME_WATCHER_FLAGS_AUTO_START: If no-one owns the name when + * beginning to watch the name, ask the bus to launch an owner for the + * name. + * + * Flags used in g_bus_watch_name(). + * + * Since: 2.26 + */ +typedef enum +{ + G_BUS_NAME_WATCHER_FLAGS_NONE = 0, + G_BUS_NAME_WATCHER_FLAGS_AUTO_START = (1<<0) +} GBusNameWatcherFlags; + +/** + * GDBusProxyFlags: + * @G_DBUS_PROXY_FLAGS_NONE: No flags set. + * @G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES: Don't load properties. + * @G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS: Don't connect to signals on the remote object. + * @G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START: If the proxy is for a well-known name, + * do not ask the bus to launch an owner during proxy initialization or a method call. + * This flag is only meaningful in proxies for well-known names. + * @G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES: If set, the property value for any __invalidated property__ will be (asynchronously) retrieved upon receiving the [`PropertiesChanged`](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties) D-Bus signal and the property will not cause emission of the #GDBusProxy::g-properties-changed signal. When the value is received the #GDBusProxy::g-properties-changed signal is emitted for the property along with the retrieved value. Since 2.32. + * @G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION: If the proxy is for a well-known name, + * do not ask the bus to launch an owner during proxy initialization, but allow it to be + * autostarted by a method call. This flag is only meaningful in proxies for well-known names, + * and only if %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is not also specified. + * @G_DBUS_PROXY_FLAGS_NO_MATCH_RULE: Don't actually send the AddMatch D-Bus + * call for this signal subscription. This gives you more control + * over which match rules you add (but you must add them manually). (Since: 2.72) + * + * Flags used when constructing an instance of a #GDBusProxy derived class. + * + * Since: 2.26 + */ +typedef enum +{ + G_DBUS_PROXY_FLAGS_NONE = 0, + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES = (1<<0), + G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS = (1<<1), + G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START = (1<<2), + G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES = (1<<3), + G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION = (1<<4), + G_DBUS_PROXY_FLAGS_NO_MATCH_RULE GIO_AVAILABLE_ENUMERATOR_IN_2_72 = (1<<5) +} GDBusProxyFlags; + +/** + * GDBusError: + * @G_DBUS_ERROR_FAILED: + * A generic error; "something went wrong" - see the error message for + * more. + * @G_DBUS_ERROR_NO_MEMORY: + * There was not enough memory to complete an operation. + * @G_DBUS_ERROR_SERVICE_UNKNOWN: + * The bus doesn't know how to launch a service to supply the bus name + * you wanted. + * @G_DBUS_ERROR_NAME_HAS_NO_OWNER: + * The bus name you referenced doesn't exist (i.e. no application owns + * it). + * @G_DBUS_ERROR_NO_REPLY: + * No reply to a message expecting one, usually means a timeout occurred. + * @G_DBUS_ERROR_IO_ERROR: + * Something went wrong reading or writing to a socket, for example. + * @G_DBUS_ERROR_BAD_ADDRESS: + * A D-Bus bus address was malformed. + * @G_DBUS_ERROR_NOT_SUPPORTED: + * Requested operation isn't supported (like ENOSYS on UNIX). + * @G_DBUS_ERROR_LIMITS_EXCEEDED: + * Some limited resource is exhausted. + * @G_DBUS_ERROR_ACCESS_DENIED: + * Security restrictions don't allow doing what you're trying to do. + * @G_DBUS_ERROR_AUTH_FAILED: + * Authentication didn't work. + * @G_DBUS_ERROR_NO_SERVER: + * Unable to connect to server (probably caused by ECONNREFUSED on a + * socket). + * @G_DBUS_ERROR_TIMEOUT: + * Certain timeout errors, possibly ETIMEDOUT on a socket. Note that + * %G_DBUS_ERROR_NO_REPLY is used for message reply timeouts. Warning: + * this is confusingly-named given that %G_DBUS_ERROR_TIMED_OUT also + * exists. We can't fix it for compatibility reasons so just be + * careful. + * @G_DBUS_ERROR_NO_NETWORK: + * No network access (probably ENETUNREACH on a socket). + * @G_DBUS_ERROR_ADDRESS_IN_USE: + * Can't bind a socket since its address is in use (i.e. EADDRINUSE). + * @G_DBUS_ERROR_DISCONNECTED: + * The connection is disconnected and you're trying to use it. + * @G_DBUS_ERROR_INVALID_ARGS: + * Invalid arguments passed to a method call. + * @G_DBUS_ERROR_FILE_NOT_FOUND: + * Missing file. + * @G_DBUS_ERROR_FILE_EXISTS: + * Existing file and the operation you're using does not silently overwrite. + * @G_DBUS_ERROR_UNKNOWN_METHOD: + * Method name you invoked isn't known by the object you invoked it on. + * @G_DBUS_ERROR_UNKNOWN_OBJECT: + * Object you invoked a method on isn't known. Since 2.42 + * @G_DBUS_ERROR_UNKNOWN_INTERFACE: + * Interface you invoked a method on isn't known by the object. Since 2.42 + * @G_DBUS_ERROR_UNKNOWN_PROPERTY: + * Property you tried to access isn't known by the object. Since 2.42 + * @G_DBUS_ERROR_PROPERTY_READ_ONLY: + * Property you tried to set is read-only. Since 2.42 + * @G_DBUS_ERROR_TIMED_OUT: + * Certain timeout errors, e.g. while starting a service. Warning: this is + * confusingly-named given that %G_DBUS_ERROR_TIMEOUT also exists. We + * can't fix it for compatibility reasons so just be careful. + * @G_DBUS_ERROR_MATCH_RULE_NOT_FOUND: + * Tried to remove or modify a match rule that didn't exist. + * @G_DBUS_ERROR_MATCH_RULE_INVALID: + * The match rule isn't syntactically valid. + * @G_DBUS_ERROR_SPAWN_EXEC_FAILED: + * While starting a new process, the exec() call failed. + * @G_DBUS_ERROR_SPAWN_FORK_FAILED: + * While starting a new process, the fork() call failed. + * @G_DBUS_ERROR_SPAWN_CHILD_EXITED: + * While starting a new process, the child exited with a status code. + * @G_DBUS_ERROR_SPAWN_CHILD_SIGNALED: + * While starting a new process, the child exited on a signal. + * @G_DBUS_ERROR_SPAWN_FAILED: + * While starting a new process, something went wrong. + * @G_DBUS_ERROR_SPAWN_SETUP_FAILED: + * We failed to setup the environment correctly. + * @G_DBUS_ERROR_SPAWN_CONFIG_INVALID: + * We failed to setup the config parser correctly. + * @G_DBUS_ERROR_SPAWN_SERVICE_INVALID: + * Bus name was not valid. + * @G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND: + * Service file not found in system-services directory. + * @G_DBUS_ERROR_SPAWN_PERMISSIONS_INVALID: + * Permissions are incorrect on the setuid helper. + * @G_DBUS_ERROR_SPAWN_FILE_INVALID: + * Service file invalid (Name, User or Exec missing). + * @G_DBUS_ERROR_SPAWN_NO_MEMORY: + * Tried to get a UNIX process ID and it wasn't available. + * @G_DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN: + * Tried to get a UNIX process ID and it wasn't available. + * @G_DBUS_ERROR_INVALID_SIGNATURE: + * A type signature is not valid. + * @G_DBUS_ERROR_INVALID_FILE_CONTENT: + * A file contains invalid syntax or is otherwise broken. + * @G_DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: + * Asked for SELinux security context and it wasn't available. + * @G_DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN: + * Asked for ADT audit data and it wasn't available. + * @G_DBUS_ERROR_OBJECT_PATH_IN_USE: + * There's already an object with the requested object path. + * + * Error codes for the %G_DBUS_ERROR error domain. + * + * Since: 2.26 + */ +typedef enum +{ + /* Well-known errors in the org.freedesktop.DBus.Error namespace */ + G_DBUS_ERROR_FAILED, /* org.freedesktop.DBus.Error.Failed */ + G_DBUS_ERROR_NO_MEMORY, /* org.freedesktop.DBus.Error.NoMemory */ + G_DBUS_ERROR_SERVICE_UNKNOWN, /* org.freedesktop.DBus.Error.ServiceUnknown */ + G_DBUS_ERROR_NAME_HAS_NO_OWNER, /* org.freedesktop.DBus.Error.NameHasNoOwner */ + G_DBUS_ERROR_NO_REPLY, /* org.freedesktop.DBus.Error.NoReply */ + G_DBUS_ERROR_IO_ERROR, /* org.freedesktop.DBus.Error.IOError */ + G_DBUS_ERROR_BAD_ADDRESS, /* org.freedesktop.DBus.Error.BadAddress */ + G_DBUS_ERROR_NOT_SUPPORTED, /* org.freedesktop.DBus.Error.NotSupported */ + G_DBUS_ERROR_LIMITS_EXCEEDED, /* org.freedesktop.DBus.Error.LimitsExceeded */ + G_DBUS_ERROR_ACCESS_DENIED, /* org.freedesktop.DBus.Error.AccessDenied */ + G_DBUS_ERROR_AUTH_FAILED, /* org.freedesktop.DBus.Error.AuthFailed */ + G_DBUS_ERROR_NO_SERVER, /* org.freedesktop.DBus.Error.NoServer */ + G_DBUS_ERROR_TIMEOUT, /* org.freedesktop.DBus.Error.Timeout */ + G_DBUS_ERROR_NO_NETWORK, /* org.freedesktop.DBus.Error.NoNetwork */ + G_DBUS_ERROR_ADDRESS_IN_USE, /* org.freedesktop.DBus.Error.AddressInUse */ + G_DBUS_ERROR_DISCONNECTED, /* org.freedesktop.DBus.Error.Disconnected */ + G_DBUS_ERROR_INVALID_ARGS, /* org.freedesktop.DBus.Error.InvalidArgs */ + G_DBUS_ERROR_FILE_NOT_FOUND, /* org.freedesktop.DBus.Error.FileNotFound */ + G_DBUS_ERROR_FILE_EXISTS, /* org.freedesktop.DBus.Error.FileExists */ + G_DBUS_ERROR_UNKNOWN_METHOD, /* org.freedesktop.DBus.Error.UnknownMethod */ + G_DBUS_ERROR_TIMED_OUT, /* org.freedesktop.DBus.Error.TimedOut */ + G_DBUS_ERROR_MATCH_RULE_NOT_FOUND, /* org.freedesktop.DBus.Error.MatchRuleNotFound */ + G_DBUS_ERROR_MATCH_RULE_INVALID, /* org.freedesktop.DBus.Error.MatchRuleInvalid */ + G_DBUS_ERROR_SPAWN_EXEC_FAILED, /* org.freedesktop.DBus.Error.Spawn.ExecFailed */ + G_DBUS_ERROR_SPAWN_FORK_FAILED, /* org.freedesktop.DBus.Error.Spawn.ForkFailed */ + G_DBUS_ERROR_SPAWN_CHILD_EXITED, /* org.freedesktop.DBus.Error.Spawn.ChildExited */ + G_DBUS_ERROR_SPAWN_CHILD_SIGNALED, /* org.freedesktop.DBus.Error.Spawn.ChildSignaled */ + G_DBUS_ERROR_SPAWN_FAILED, /* org.freedesktop.DBus.Error.Spawn.Failed */ + G_DBUS_ERROR_SPAWN_SETUP_FAILED, /* org.freedesktop.DBus.Error.Spawn.FailedToSetup */ + G_DBUS_ERROR_SPAWN_CONFIG_INVALID, /* org.freedesktop.DBus.Error.Spawn.ConfigInvalid */ + G_DBUS_ERROR_SPAWN_SERVICE_INVALID, /* org.freedesktop.DBus.Error.Spawn.ServiceNotValid */ + G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND, /* org.freedesktop.DBus.Error.Spawn.ServiceNotFound */ + G_DBUS_ERROR_SPAWN_PERMISSIONS_INVALID, /* org.freedesktop.DBus.Error.Spawn.PermissionsInvalid */ + G_DBUS_ERROR_SPAWN_FILE_INVALID, /* org.freedesktop.DBus.Error.Spawn.FileInvalid */ + G_DBUS_ERROR_SPAWN_NO_MEMORY, /* org.freedesktop.DBus.Error.Spawn.NoMemory */ + G_DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN, /* org.freedesktop.DBus.Error.UnixProcessIdUnknown */ + G_DBUS_ERROR_INVALID_SIGNATURE, /* org.freedesktop.DBus.Error.InvalidSignature */ + G_DBUS_ERROR_INVALID_FILE_CONTENT, /* org.freedesktop.DBus.Error.InvalidFileContent */ + G_DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN, /* org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown */ + G_DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN, /* org.freedesktop.DBus.Error.AdtAuditDataUnknown */ + G_DBUS_ERROR_OBJECT_PATH_IN_USE, /* org.freedesktop.DBus.Error.ObjectPathInUse */ + G_DBUS_ERROR_UNKNOWN_OBJECT, /* org.freedesktop.DBus.Error.UnknownObject */ + G_DBUS_ERROR_UNKNOWN_INTERFACE, /* org.freedesktop.DBus.Error.UnknownInterface */ + G_DBUS_ERROR_UNKNOWN_PROPERTY, /* org.freedesktop.DBus.Error.UnknownProperty */ + G_DBUS_ERROR_PROPERTY_READ_ONLY /* org.freedesktop.DBus.Error.PropertyReadOnly */ +} GDBusError; +/* Remember to update g_dbus_error_quark() in gdbuserror.c if you extend this enumeration */ + +/** + * GDBusConnectionFlags: + * @G_DBUS_CONNECTION_FLAGS_NONE: No flags set. + * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT: Perform authentication against server. + * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER: Perform authentication against client. + * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: When + * authenticating as a server, allow the anonymous authentication + * method. + * @G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION: Pass this flag if connecting to a peer that is a + * message bus. This means that the Hello() method will be invoked as part of the connection setup. + * @G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING: If set, processing of D-Bus messages is + * delayed until g_dbus_connection_start_message_processing() is called. + * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER: When authenticating + * as a server, require the UID of the peer to be the same as the UID of the server. (Since: 2.68) + * @G_DBUS_CONNECTION_FLAGS_CROSS_NAMESPACE: When authenticating, try to use + * protocols that work across a Linux user namespace boundary, even if this + * reduces interoperability with older D-Bus implementations. This currently + * affects client-side `EXTERNAL` authentication, for which this flag makes + * connections to a server in another user namespace succeed, but causes + * a deadlock when connecting to a GDBus server older than 2.73.3. Since: 2.74 + * + * Flags used when creating a new #GDBusConnection. + * + * Since: 2.26 + */ +typedef enum { + G_DBUS_CONNECTION_FLAGS_NONE = 0, + G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT = (1<<0), + G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER = (1<<1), + G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS = (1<<2), + G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION = (1<<3), + G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING = (1<<4), + G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER GIO_AVAILABLE_ENUMERATOR_IN_2_68 = (1<<5), + G_DBUS_CONNECTION_FLAGS_CROSS_NAMESPACE GIO_AVAILABLE_ENUMERATOR_IN_2_74 = (1<<6) +} GDBusConnectionFlags; + +/** + * GDBusCapabilityFlags: + * @G_DBUS_CAPABILITY_FLAGS_NONE: No flags set. + * @G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING: The connection + * supports exchanging UNIX file descriptors with the remote peer. + * + * Capabilities negotiated with the remote peer. + * + * Since: 2.26 + */ +typedef enum { + G_DBUS_CAPABILITY_FLAGS_NONE = 0, + G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING = (1<<0) +} GDBusCapabilityFlags; + +/** + * GDBusCallFlags: + * @G_DBUS_CALL_FLAGS_NONE: No flags set. + * @G_DBUS_CALL_FLAGS_NO_AUTO_START: The bus must not launch + * an owner for the destination name in response to this method + * invocation. + * @G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION: the caller is prepared to + * wait for interactive authorization. Since 2.46. + * + * Flags used in g_dbus_connection_call() and similar APIs. + * + * Since: 2.26 + */ +typedef enum { + G_DBUS_CALL_FLAGS_NONE = 0, + G_DBUS_CALL_FLAGS_NO_AUTO_START = (1<<0), + G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION = (1<<1) +} GDBusCallFlags; +/* (1<<31) is reserved for internal use by GDBusConnection, do not use it. */ + +/** + * GDBusMessageType: + * @G_DBUS_MESSAGE_TYPE_INVALID: Message is of invalid type. + * @G_DBUS_MESSAGE_TYPE_METHOD_CALL: Method call. + * @G_DBUS_MESSAGE_TYPE_METHOD_RETURN: Method reply. + * @G_DBUS_MESSAGE_TYPE_ERROR: Error reply. + * @G_DBUS_MESSAGE_TYPE_SIGNAL: Signal emission. + * + * Message types used in #GDBusMessage. + * + * Since: 2.26 + */ +typedef enum { + G_DBUS_MESSAGE_TYPE_INVALID, + G_DBUS_MESSAGE_TYPE_METHOD_CALL, + G_DBUS_MESSAGE_TYPE_METHOD_RETURN, + G_DBUS_MESSAGE_TYPE_ERROR, + G_DBUS_MESSAGE_TYPE_SIGNAL +} GDBusMessageType; + +/** + * GDBusMessageFlags: + * @G_DBUS_MESSAGE_FLAGS_NONE: No flags set. + * @G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED: A reply is not expected. + * @G_DBUS_MESSAGE_FLAGS_NO_AUTO_START: The bus must not launch an + * owner for the destination name in response to this message. + * @G_DBUS_MESSAGE_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION: If set on a method + * call, this flag means that the caller is prepared to wait for interactive + * authorization. Since 2.46. + * + * Message flags used in #GDBusMessage. + * + * Since: 2.26 + */ +typedef enum { + G_DBUS_MESSAGE_FLAGS_NONE = 0, + G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED = (1<<0), + G_DBUS_MESSAGE_FLAGS_NO_AUTO_START = (1<<1), + G_DBUS_MESSAGE_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION = (1<<2) +} GDBusMessageFlags; + +/** + * GDBusMessageHeaderField: + * @G_DBUS_MESSAGE_HEADER_FIELD_INVALID: Not a valid header field. + * @G_DBUS_MESSAGE_HEADER_FIELD_PATH: The object path. + * @G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE: The interface name. + * @G_DBUS_MESSAGE_HEADER_FIELD_MEMBER: The method or signal name. + * @G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME: The name of the error that occurred. + * @G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL: The serial number the message is a reply to. + * @G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION: The name the message is intended for. + * @G_DBUS_MESSAGE_HEADER_FIELD_SENDER: Unique name of the sender of the message (filled in by the bus). + * @G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE: The signature of the message body. + * @G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS: The number of UNIX file descriptors that accompany the message. + * + * Header fields used in #GDBusMessage. + * + * Since: 2.26 + */ +typedef enum { + G_DBUS_MESSAGE_HEADER_FIELD_INVALID, + G_DBUS_MESSAGE_HEADER_FIELD_PATH, + G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE, + G_DBUS_MESSAGE_HEADER_FIELD_MEMBER, + G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME, + G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL, + G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION, + G_DBUS_MESSAGE_HEADER_FIELD_SENDER, + G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE, + G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS +} GDBusMessageHeaderField; + +/** + * GDBusPropertyInfoFlags: + * @G_DBUS_PROPERTY_INFO_FLAGS_NONE: No flags set. + * @G_DBUS_PROPERTY_INFO_FLAGS_READABLE: Property is readable. + * @G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE: Property is writable. + * + * Flags describing the access control of a D-Bus property. + * + * Since: 2.26 + */ +typedef enum +{ + G_DBUS_PROPERTY_INFO_FLAGS_NONE = 0, + G_DBUS_PROPERTY_INFO_FLAGS_READABLE = (1<<0), + G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE = (1<<1) +} GDBusPropertyInfoFlags; + +/** + * GDBusSubtreeFlags: + * @G_DBUS_SUBTREE_FLAGS_NONE: No flags set. + * @G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES: Method calls to objects not in the enumerated range + * will still be dispatched. This is useful if you want + * to dynamically spawn objects in the subtree. + * + * Flags passed to g_dbus_connection_register_subtree(). + * + * Since: 2.26 + */ +typedef enum +{ + G_DBUS_SUBTREE_FLAGS_NONE = 0, + G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES = (1<<0) +} GDBusSubtreeFlags; + +/** + * GDBusServerFlags: + * @G_DBUS_SERVER_FLAGS_NONE: No flags set. + * @G_DBUS_SERVER_FLAGS_RUN_IN_THREAD: All #GDBusServer::new-connection + * signals will run in separated dedicated threads (see signal for + * details). + * @G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: Allow the anonymous + * authentication method. + * @G_DBUS_SERVER_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER: Require the UID of the + * peer to be the same as the UID of the server when authenticating. (Since: 2.68) + * + * Flags used when creating a #GDBusServer. + * + * Since: 2.26 + */ +typedef enum +{ + G_DBUS_SERVER_FLAGS_NONE = 0, + G_DBUS_SERVER_FLAGS_RUN_IN_THREAD = (1<<0), + G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS = (1<<1), + G_DBUS_SERVER_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER GIO_AVAILABLE_ENUMERATOR_IN_2_68 = (1<<2) +} GDBusServerFlags; + +/** + * GDBusSignalFlags: + * @G_DBUS_SIGNAL_FLAGS_NONE: No flags set. + * @G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE: Don't actually send the AddMatch + * D-Bus call for this signal subscription. This gives you more control + * over which match rules you add (but you must add them manually). + * @G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE: Match first arguments that + * contain a bus or interface name with the given namespace. + * @G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH: Match first arguments that + * contain an object path that is either equivalent to the given path, + * or one of the paths is a subpath of the other. + * + * Flags used when subscribing to signals via g_dbus_connection_signal_subscribe(). + * + * Since: 2.26 + */ +typedef enum /*< flags >*/ +{ + G_DBUS_SIGNAL_FLAGS_NONE = 0, + G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE = (1<<0), + G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE = (1<<1), + G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH = (1<<2) +} GDBusSignalFlags; + +/** + * GDBusSendMessageFlags: + * @G_DBUS_SEND_MESSAGE_FLAGS_NONE: No flags set. + * @G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL: Do not automatically + * assign a serial number from the #GDBusConnection object when + * sending a message. + * + * Flags used when sending #GDBusMessages on a #GDBusConnection. + * + * Since: 2.26 + */ +typedef enum +{ + G_DBUS_SEND_MESSAGE_FLAGS_NONE = 0, + G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL = (1<<0) +} GDBusSendMessageFlags; +/* (1<<31) is reserved for internal use by GDBusConnection, do not use it. */ + +/** + * GCredentialsType: + * @G_CREDENTIALS_TYPE_INVALID: Indicates an invalid native credential type. + * @G_CREDENTIALS_TYPE_LINUX_UCRED: The native credentials type is a `struct ucred`. + * @G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED: The native credentials type is a `struct cmsgcred`. + * @G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED: The native credentials type is a `struct sockpeercred`. Added in 2.30. + * @G_CREDENTIALS_TYPE_SOLARIS_UCRED: The native credentials type is a `ucred_t`. Added in 2.40. + * @G_CREDENTIALS_TYPE_NETBSD_UNPCBID: The native credentials type is a `struct unpcbid`. Added in 2.42. + * @G_CREDENTIALS_TYPE_APPLE_XUCRED: The native credentials type is a `struct xucred`. Added in 2.66. + * @G_CREDENTIALS_TYPE_WIN32_PID: The native credentials type is a PID `DWORD`. Added in 2.72. + * + * Enumeration describing different kinds of native credential types. + * + * Since: 2.26 + */ +typedef enum +{ + G_CREDENTIALS_TYPE_INVALID, + G_CREDENTIALS_TYPE_LINUX_UCRED, + G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED, + G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED, + G_CREDENTIALS_TYPE_SOLARIS_UCRED, + G_CREDENTIALS_TYPE_NETBSD_UNPCBID, + G_CREDENTIALS_TYPE_APPLE_XUCRED, + G_CREDENTIALS_TYPE_WIN32_PID, +} GCredentialsType; + +/** + * GDBusMessageByteOrder: + * @G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN: The byte order is big endian. + * @G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN: The byte order is little endian. + * + * Enumeration used to describe the byte order of a D-Bus message. + * + * Since: 2.26 + */ +typedef enum +{ + G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN = 'B', + G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN = 'l' +} GDBusMessageByteOrder; + +/** + * GApplicationFlags: + * @G_APPLICATION_FLAGS_NONE: Default. Deprecated in 2.74, use + * %G_APPLICATION_DEFAULT_FLAGS instead + * @G_APPLICATION_DEFAULT_FLAGS: Default flags. Since: 2.74 + * @G_APPLICATION_IS_SERVICE: Run as a service. In this mode, registration + * fails if the service is already running, and the application + * will initially wait up to 10 seconds for an initial activation + * message to arrive. + * @G_APPLICATION_IS_LAUNCHER: Don't try to become the primary instance. + * @G_APPLICATION_HANDLES_OPEN: This application handles opening files (in + * the primary instance). Note that this flag only affects the default + * implementation of local_command_line(), and has no effect if + * %G_APPLICATION_HANDLES_COMMAND_LINE is given. + * See g_application_run() for details. + * @G_APPLICATION_HANDLES_COMMAND_LINE: This application handles command line + * arguments (in the primary instance). Note that this flag only affect + * the default implementation of local_command_line(). + * See g_application_run() for details. + * @G_APPLICATION_SEND_ENVIRONMENT: Send the environment of the + * launching process to the primary instance. Set this flag if your + * application is expected to behave differently depending on certain + * environment variables. For instance, an editor might be expected + * to use the `GIT_COMMITTER_NAME` environment variable + * when editing a git commit message. The environment is available + * to the #GApplication::command-line signal handler, via + * g_application_command_line_getenv(). + * @G_APPLICATION_NON_UNIQUE: Make no attempts to do any of the typical + * single-instance application negotiation, even if the application + * ID is given. The application neither attempts to become the + * owner of the application ID nor does it check if an existing + * owner already exists. Everything occurs in the local process. + * Since: 2.30. + * @G_APPLICATION_CAN_OVERRIDE_APP_ID: Allow users to override the + * application ID from the command line with `--gapplication-app-id`. + * Since: 2.48 + * @G_APPLICATION_ALLOW_REPLACEMENT: Allow another instance to take over + * the bus name. Since: 2.60 + * @G_APPLICATION_REPLACE: Take over from another instance. This flag is + * usually set by passing `--gapplication-replace` on the commandline. + * Since: 2.60 + * + * Flags used to define the behaviour of a #GApplication. + * + * Since: 2.28 + **/ +typedef enum /*< prefix=G_APPLICATION >*/ +{ + G_APPLICATION_FLAGS_NONE GIO_DEPRECATED_ENUMERATOR_IN_2_74_FOR(G_APPLICATION_DEFAULT_FLAGS), + G_APPLICATION_DEFAULT_FLAGS GIO_AVAILABLE_ENUMERATOR_IN_2_74 = 0, + G_APPLICATION_IS_SERVICE = (1 << 0), + G_APPLICATION_IS_LAUNCHER = (1 << 1), + + G_APPLICATION_HANDLES_OPEN = (1 << 2), + G_APPLICATION_HANDLES_COMMAND_LINE = (1 << 3), + G_APPLICATION_SEND_ENVIRONMENT = (1 << 4), + + G_APPLICATION_NON_UNIQUE = (1 << 5), + + G_APPLICATION_CAN_OVERRIDE_APP_ID = (1 << 6), + G_APPLICATION_ALLOW_REPLACEMENT = (1 << 7), + G_APPLICATION_REPLACE = (1 << 8) +} GApplicationFlags; + +/** + * GTlsError: + * @G_TLS_ERROR_UNAVAILABLE: No TLS provider is available + * @G_TLS_ERROR_MISC: Miscellaneous TLS error + * @G_TLS_ERROR_BAD_CERTIFICATE: The certificate presented could not + * be parsed or failed validation. + * @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the + * peer does not seem to be a TLS server. + * @G_TLS_ERROR_HANDSHAKE: The TLS handshake failed because the + * peer's certificate was not acceptable. + * @G_TLS_ERROR_CERTIFICATE_REQUIRED: The TLS handshake failed because + * the server requested a client-side certificate, but none was + * provided. See g_tls_connection_set_certificate(). + * @G_TLS_ERROR_EOF: The TLS connection was closed without proper + * notice, which may indicate an attack. See + * g_tls_connection_set_require_close_notify(). + * @G_TLS_ERROR_INAPPROPRIATE_FALLBACK: The TLS handshake failed + * because the client sent the fallback SCSV, indicating a protocol + * downgrade attack. Since: 2.60 + * @G_TLS_ERROR_BAD_CERTIFICATE_PASSWORD: The certificate failed + * to load because a password was incorrect. Since: 2.72 + * + * An error code used with %G_TLS_ERROR in a #GError returned from a + * TLS-related routine. + * + * Since: 2.28 + */ +typedef enum { + G_TLS_ERROR_UNAVAILABLE, + G_TLS_ERROR_MISC, + G_TLS_ERROR_BAD_CERTIFICATE, + G_TLS_ERROR_NOT_TLS, + G_TLS_ERROR_HANDSHAKE, + G_TLS_ERROR_CERTIFICATE_REQUIRED, + G_TLS_ERROR_EOF, + G_TLS_ERROR_INAPPROPRIATE_FALLBACK, + G_TLS_ERROR_BAD_CERTIFICATE_PASSWORD +} GTlsError; + +/** + * GTlsCertificateFlags: + * @G_TLS_CERTIFICATE_NO_FLAGS: No flags set. Since: 2.74 + * @G_TLS_CERTIFICATE_UNKNOWN_CA: The signing certificate authority is + * not known. + * @G_TLS_CERTIFICATE_BAD_IDENTITY: The certificate does not match the + * expected identity of the site that it was retrieved from. + * @G_TLS_CERTIFICATE_NOT_ACTIVATED: The certificate's activation time + * is still in the future + * @G_TLS_CERTIFICATE_EXPIRED: The certificate has expired + * @G_TLS_CERTIFICATE_REVOKED: The certificate has been revoked + * according to the #GTlsConnection's certificate revocation list. + * @G_TLS_CERTIFICATE_INSECURE: The certificate's algorithm is + * considered insecure. + * @G_TLS_CERTIFICATE_GENERIC_ERROR: Some other error occurred validating + * the certificate + * @G_TLS_CERTIFICATE_VALIDATE_ALL: the combination of all of the above + * flags + * + * A set of flags describing TLS certification validation. This can be + * used to describe why a particular certificate was rejected (for + * example, in #GTlsConnection::accept-certificate). + * + * GLib guarantees that if certificate verification fails, at least one + * flag will be set, but it does not guarantee that all possible flags + * will be set. Accordingly, you may not safely decide to ignore any + * particular type of error. For example, it would be incorrect to mask + * %G_TLS_CERTIFICATE_EXPIRED if you want to allow expired certificates, + * because this could potentially be the only error flag set even if + * other problems exist with the certificate. + * + * Since: 2.28 + */ +typedef enum { + G_TLS_CERTIFICATE_NO_FLAGS GIO_AVAILABLE_ENUMERATOR_IN_2_74 = 0, + G_TLS_CERTIFICATE_UNKNOWN_CA = (1 << 0), + G_TLS_CERTIFICATE_BAD_IDENTITY = (1 << 1), + G_TLS_CERTIFICATE_NOT_ACTIVATED = (1 << 2), + G_TLS_CERTIFICATE_EXPIRED = (1 << 3), + G_TLS_CERTIFICATE_REVOKED = (1 << 4), + G_TLS_CERTIFICATE_INSECURE = (1 << 5), + G_TLS_CERTIFICATE_GENERIC_ERROR = (1 << 6), + + G_TLS_CERTIFICATE_VALIDATE_ALL = 0x007f +} GTlsCertificateFlags; + +/** + * GTlsAuthenticationMode: + * @G_TLS_AUTHENTICATION_NONE: client authentication not required + * @G_TLS_AUTHENTICATION_REQUESTED: client authentication is requested + * @G_TLS_AUTHENTICATION_REQUIRED: client authentication is required + * + * The client authentication mode for a #GTlsServerConnection. + * + * Since: 2.28 + */ +typedef enum { + G_TLS_AUTHENTICATION_NONE, + G_TLS_AUTHENTICATION_REQUESTED, + G_TLS_AUTHENTICATION_REQUIRED +} GTlsAuthenticationMode; + +/** + * GTlsChannelBindingType: + * @G_TLS_CHANNEL_BINDING_TLS_UNIQUE: + * [`tls-unique`](https://tools.ietf.org/html/rfc5929#section-3) binding + * type + * @G_TLS_CHANNEL_BINDING_TLS_SERVER_END_POINT: + * [`tls-server-end-point`](https://tools.ietf.org/html/rfc5929#section-4) + * binding type + * @G_TLS_CHANNEL_BINDING_TLS_EXPORTER: + * [`tls-exporter`](https://www.rfc-editor.org/rfc/rfc9266.html) binding + * type. Since: 2.74 + * + * The type of TLS channel binding data to retrieve from #GTlsConnection + * or #GDtlsConnection, as documented by RFC 5929 or RFC 9266. The + * [`tls-unique-for-telnet`](https://tools.ietf.org/html/rfc5929#section-5) + * binding type is not currently implemented. + * + * Since: 2.66 + */ +GIO_AVAILABLE_TYPE_IN_2_66 +typedef enum { + G_TLS_CHANNEL_BINDING_TLS_UNIQUE, + G_TLS_CHANNEL_BINDING_TLS_SERVER_END_POINT, + G_TLS_CHANNEL_BINDING_TLS_EXPORTER GIO_AVAILABLE_ENUMERATOR_IN_2_74, +} GTlsChannelBindingType; + +/** + * GTlsChannelBindingError: + * @G_TLS_CHANNEL_BINDING_ERROR_NOT_IMPLEMENTED: Either entire binding + * retrieval facility or specific binding type is not implemented in the + * TLS backend. + * @G_TLS_CHANNEL_BINDING_ERROR_INVALID_STATE: The handshake is not yet + * complete on the connection which is a strong requirement for any existing + * binding type. + * @G_TLS_CHANNEL_BINDING_ERROR_NOT_AVAILABLE: Handshake is complete but + * binding data is not available. That normally indicates the TLS + * implementation failed to provide the binding data. For example, some + * implementations do not provide a peer certificate for resumed connections. + * @G_TLS_CHANNEL_BINDING_ERROR_NOT_SUPPORTED: Binding type is not supported + * on the current connection. This error could be triggered when requesting + * `tls-server-end-point` binding data for a certificate which has no hash + * function or uses multiple hash functions. + * @G_TLS_CHANNEL_BINDING_ERROR_GENERAL_ERROR: Any other backend error + * preventing binding data retrieval. + * + * An error code used with %G_TLS_CHANNEL_BINDING_ERROR in a #GError to + * indicate a TLS channel binding retrieval error. + * + * Since: 2.66 + */ +GIO_AVAILABLE_TYPE_IN_2_66 +typedef enum { + G_TLS_CHANNEL_BINDING_ERROR_NOT_IMPLEMENTED, + G_TLS_CHANNEL_BINDING_ERROR_INVALID_STATE, + G_TLS_CHANNEL_BINDING_ERROR_NOT_AVAILABLE, + G_TLS_CHANNEL_BINDING_ERROR_NOT_SUPPORTED, + G_TLS_CHANNEL_BINDING_ERROR_GENERAL_ERROR +} GTlsChannelBindingError; + +/** + * GTlsRehandshakeMode: + * @G_TLS_REHANDSHAKE_NEVER: Never allow rehandshaking + * @G_TLS_REHANDSHAKE_SAFELY: Allow safe rehandshaking only + * @G_TLS_REHANDSHAKE_UNSAFELY: Allow unsafe rehandshaking + * + * When to allow rehandshaking. See + * g_tls_connection_set_rehandshake_mode(). + * + * Since: 2.28 + * + * Deprecated: 2.60. Changing the rehandshake mode is no longer + * required for compatibility. Also, rehandshaking has been removed + * from the TLS protocol in TLS 1.3. + */ +typedef enum { + G_TLS_REHANDSHAKE_NEVER, + G_TLS_REHANDSHAKE_SAFELY, + G_TLS_REHANDSHAKE_UNSAFELY +} GTlsRehandshakeMode GIO_DEPRECATED_TYPE_IN_2_60; + +/** + * GTlsPasswordFlags: + * @G_TLS_PASSWORD_NONE: No flags + * @G_TLS_PASSWORD_RETRY: The password was wrong, and the user should retry. + * @G_TLS_PASSWORD_MANY_TRIES: Hint to the user that the password has been + * wrong many times, and the user may not have many chances left. + * @G_TLS_PASSWORD_FINAL_TRY: Hint to the user that this is the last try to get + * this password right. + * @G_TLS_PASSWORD_PKCS11_USER: For PKCS #11, the user PIN is required. + * Since: 2.70. + * @G_TLS_PASSWORD_PKCS11_SECURITY_OFFICER: For PKCS #11, the security officer + * PIN is required. Since: 2.70. + * @G_TLS_PASSWORD_PKCS11_CONTEXT_SPECIFIC: For PKCS #11, the context-specific + * PIN is required. Since: 2.70. + * + * Various flags for the password. + * + * Since: 2.30 + */ + +typedef enum _GTlsPasswordFlags +{ + G_TLS_PASSWORD_NONE = 0, + G_TLS_PASSWORD_RETRY = 1 << 1, + G_TLS_PASSWORD_MANY_TRIES = 1 << 2, + G_TLS_PASSWORD_FINAL_TRY = 1 << 3, + G_TLS_PASSWORD_PKCS11_USER = 1 << 4, + G_TLS_PASSWORD_PKCS11_SECURITY_OFFICER = 1 << 5, + G_TLS_PASSWORD_PKCS11_CONTEXT_SPECIFIC = 1 << 6 +} GTlsPasswordFlags; + +/** + * GTlsInteractionResult: + * @G_TLS_INTERACTION_UNHANDLED: The interaction was unhandled (i.e. not + * implemented). + * @G_TLS_INTERACTION_HANDLED: The interaction completed, and resulting data + * is available. + * @G_TLS_INTERACTION_FAILED: The interaction has failed, or was cancelled. + * and the operation should be aborted. + * + * #GTlsInteractionResult is returned by various functions in #GTlsInteraction + * when finishing an interaction request. + * + * Since: 2.30 + */ +typedef enum { + G_TLS_INTERACTION_UNHANDLED, + G_TLS_INTERACTION_HANDLED, + G_TLS_INTERACTION_FAILED +} GTlsInteractionResult; + +/** + * GDBusInterfaceSkeletonFlags: + * @G_DBUS_INTERFACE_SKELETON_FLAGS_NONE: No flags set. + * @G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD: Each method invocation is handled in + * a thread dedicated to the invocation. This means that the method implementation can use blocking IO + * without blocking any other part of the process. It also means that the method implementation must + * use locking to access data structures used by other threads. + * + * Flags describing the behavior of a #GDBusInterfaceSkeleton instance. + * + * Since: 2.30 + */ +typedef enum +{ + G_DBUS_INTERFACE_SKELETON_FLAGS_NONE = 0, + G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD = (1<<0) +} GDBusInterfaceSkeletonFlags; + +/** + * GDBusObjectManagerClientFlags: + * @G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE: No flags set. + * @G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START: If not set and the + * manager is for a well-known name, then request the bus to launch + * an owner for the name if no-one owns the name. This flag can only + * be used in managers for well-known names. + * + * Flags used when constructing a #GDBusObjectManagerClient. + * + * Since: 2.30 + */ +typedef enum +{ + G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE = 0, + G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START = (1<<0) +} GDBusObjectManagerClientFlags; + +/** + * GTlsDatabaseVerifyFlags: + * @G_TLS_DATABASE_VERIFY_NONE: No verification flags + * + * Flags for g_tls_database_verify_chain(). + * + * Since: 2.30 + */ +typedef enum /*< flags >*/ { + G_TLS_DATABASE_VERIFY_NONE = 0 +} GTlsDatabaseVerifyFlags; + +/** + * GTlsDatabaseLookupFlags: + * @G_TLS_DATABASE_LOOKUP_NONE: No lookup flags + * @G_TLS_DATABASE_LOOKUP_KEYPAIR: Restrict lookup to certificates that have + * a private key. + * + * Flags for g_tls_database_lookup_certificate_for_handle(), + * g_tls_database_lookup_certificate_issuer(), + * and g_tls_database_lookup_certificates_issued_by(). + * + * Since: 2.30 + */ +typedef enum { + G_TLS_DATABASE_LOOKUP_NONE = 0, + G_TLS_DATABASE_LOOKUP_KEYPAIR = 1 +} GTlsDatabaseLookupFlags; + +/** + * GTlsCertificateRequestFlags: + * @G_TLS_CERTIFICATE_REQUEST_NONE: No flags + * + * Flags for g_tls_interaction_request_certificate(), + * g_tls_interaction_request_certificate_async(), and + * g_tls_interaction_invoke_request_certificate(). + * + * Since: 2.40 + */ +typedef enum { + G_TLS_CERTIFICATE_REQUEST_NONE = 0 +} GTlsCertificateRequestFlags; + +/** + * GTlsProtocolVersion: + * @G_TLS_PROTOCOL_VERSION_UNKNOWN: No protocol version or unknown protocol version + * @G_TLS_PROTOCOL_VERSION_SSL_3_0: SSL 3.0, which is insecure and should not be used + * @G_TLS_PROTOCOL_VERSION_TLS_1_0: TLS 1.0, which is insecure and should not be used + * @G_TLS_PROTOCOL_VERSION_TLS_1_1: TLS 1.1, which is insecure and should not be used + * @G_TLS_PROTOCOL_VERSION_TLS_1_2: TLS 1.2, defined by [RFC 5246](https://datatracker.ietf.org/doc/html/rfc5246) + * @G_TLS_PROTOCOL_VERSION_TLS_1_3: TLS 1.3, defined by [RFC 8446](https://datatracker.ietf.org/doc/html/rfc8446) + * @G_TLS_PROTOCOL_VERSION_DTLS_1_0: DTLS 1.0, which is insecure and should not be used + * @G_TLS_PROTOCOL_VERSION_DTLS_1_2: DTLS 1.2, defined by [RFC 6347](https://datatracker.ietf.org/doc/html/rfc6347) + * + * The TLS or DTLS protocol version used by a #GTlsConnection or + * #GDtlsConnection. The integer values of these versions are sequential + * to ensure newer known protocol versions compare greater than older + * known versions. Any known DTLS protocol version will compare greater + * than any SSL or TLS protocol version. The protocol version may be + * %G_TLS_PROTOCOL_VERSION_UNKNOWN if the TLS backend supports a newer + * protocol version that GLib does not yet know about. This means that + * it's possible for an unknown DTLS protocol version to compare less + * than the TLS protocol versions. + * + * Since: 2.70 + */ +typedef enum { + G_TLS_PROTOCOL_VERSION_UNKNOWN = 0, + G_TLS_PROTOCOL_VERSION_SSL_3_0 = 1, + G_TLS_PROTOCOL_VERSION_TLS_1_0 = 2, + G_TLS_PROTOCOL_VERSION_TLS_1_1 = 3, + G_TLS_PROTOCOL_VERSION_TLS_1_2 = 4, + G_TLS_PROTOCOL_VERSION_TLS_1_3 = 5, + G_TLS_PROTOCOL_VERSION_DTLS_1_0 = 201, + G_TLS_PROTOCOL_VERSION_DTLS_1_2 = 202, +} GTlsProtocolVersion; + +/** + * GIOModuleScopeFlags: + * @G_IO_MODULE_SCOPE_NONE: No module scan flags + * @G_IO_MODULE_SCOPE_BLOCK_DUPLICATES: When using this scope to load or + * scan modules, automatically block a modules which has the same base + * basename as previously loaded module. + * + * Flags for use with g_io_module_scope_new(). + * + * Since: 2.30 + */ +typedef enum { + G_IO_MODULE_SCOPE_NONE, + G_IO_MODULE_SCOPE_BLOCK_DUPLICATES +} GIOModuleScopeFlags; + +/** + * GSocketClientEvent: + * @G_SOCKET_CLIENT_RESOLVING: The client is doing a DNS lookup. + * @G_SOCKET_CLIENT_RESOLVED: The client has completed a DNS lookup. + * @G_SOCKET_CLIENT_CONNECTING: The client is connecting to a remote + * host (either a proxy or the destination server). + * @G_SOCKET_CLIENT_CONNECTED: The client has connected to a remote + * host. + * @G_SOCKET_CLIENT_PROXY_NEGOTIATING: The client is negotiating + * with a proxy to connect to the destination server. + * @G_SOCKET_CLIENT_PROXY_NEGOTIATED: The client has negotiated + * with the proxy server. + * @G_SOCKET_CLIENT_TLS_HANDSHAKING: The client is performing a + * TLS handshake. + * @G_SOCKET_CLIENT_TLS_HANDSHAKED: The client has performed a + * TLS handshake. + * @G_SOCKET_CLIENT_COMPLETE: The client is done with a particular + * #GSocketConnectable. + * + * Describes an event occurring on a #GSocketClient. See the + * #GSocketClient::event signal for more details. + * + * Additional values may be added to this type in the future. + * + * Since: 2.32 + */ +typedef enum { + G_SOCKET_CLIENT_RESOLVING, + G_SOCKET_CLIENT_RESOLVED, + G_SOCKET_CLIENT_CONNECTING, + G_SOCKET_CLIENT_CONNECTED, + G_SOCKET_CLIENT_PROXY_NEGOTIATING, + G_SOCKET_CLIENT_PROXY_NEGOTIATED, + G_SOCKET_CLIENT_TLS_HANDSHAKING, + G_SOCKET_CLIENT_TLS_HANDSHAKED, + G_SOCKET_CLIENT_COMPLETE +} GSocketClientEvent; + +/** + * GSocketListenerEvent: + * @G_SOCKET_LISTENER_BINDING: The listener is about to bind a socket. + * @G_SOCKET_LISTENER_BOUND: The listener has bound a socket. + * @G_SOCKET_LISTENER_LISTENING: The listener is about to start + * listening on this socket. + * @G_SOCKET_LISTENER_LISTENED: The listener is now listening on + * this socket. + * + * Describes an event occurring on a #GSocketListener. See the + * #GSocketListener::event signal for more details. + * + * Additional values may be added to this type in the future. + * + * Since: 2.46 + */ +typedef enum { + G_SOCKET_LISTENER_BINDING, + G_SOCKET_LISTENER_BOUND, + G_SOCKET_LISTENER_LISTENING, + G_SOCKET_LISTENER_LISTENED +} GSocketListenerEvent; + +/** + * GTestDBusFlags: + * @G_TEST_DBUS_NONE: No flags. + * + * Flags to define future #GTestDBus behaviour. + * + * Since: 2.34 + */ +typedef enum /*< flags >*/ { + G_TEST_DBUS_NONE = 0 +} GTestDBusFlags; + +/** + * GSubprocessFlags: + * @G_SUBPROCESS_FLAGS_NONE: No flags. + * @G_SUBPROCESS_FLAGS_STDIN_PIPE: create a pipe for the stdin of the + * spawned process that can be accessed with + * g_subprocess_get_stdin_pipe(). + * @G_SUBPROCESS_FLAGS_STDIN_INHERIT: stdin is inherited from the + * calling process. + * @G_SUBPROCESS_FLAGS_STDOUT_PIPE: create a pipe for the stdout of the + * spawned process that can be accessed with + * g_subprocess_get_stdout_pipe(). + * @G_SUBPROCESS_FLAGS_STDOUT_SILENCE: silence the stdout of the spawned + * process (ie: redirect to `/dev/null`). + * @G_SUBPROCESS_FLAGS_STDERR_PIPE: create a pipe for the stderr of the + * spawned process that can be accessed with + * g_subprocess_get_stderr_pipe(). + * @G_SUBPROCESS_FLAGS_STDERR_SILENCE: silence the stderr of the spawned + * process (ie: redirect to `/dev/null`). + * @G_SUBPROCESS_FLAGS_STDERR_MERGE: merge the stderr of the spawned + * process with whatever the stdout happens to be. This is a good way + * of directing both streams to a common log file, for example. + * @G_SUBPROCESS_FLAGS_INHERIT_FDS: spawned processes will inherit the + * file descriptors of their parent, unless those descriptors have + * been explicitly marked as close-on-exec. This flag has no effect + * over the "standard" file descriptors (stdin, stdout, stderr). + * @G_SUBPROCESS_FLAGS_SEARCH_PATH_FROM_ENVP: if path searching is + * needed when spawning the subprocess, use the `PATH` in the launcher + * environment. (Since: 2.72) + * + * Flags to define the behaviour of a #GSubprocess. + * + * Note that the default for stdin is to redirect from `/dev/null`. For + * stdout and stderr the default are for them to inherit the + * corresponding descriptor from the calling process. + * + * Note that it is a programmer error to mix 'incompatible' flags. For + * example, you may not request both %G_SUBPROCESS_FLAGS_STDOUT_PIPE and + * %G_SUBPROCESS_FLAGS_STDOUT_SILENCE. + * + * Since: 2.40 + **/ +typedef enum { + G_SUBPROCESS_FLAGS_NONE = 0, + G_SUBPROCESS_FLAGS_STDIN_PIPE = (1u << 0), + G_SUBPROCESS_FLAGS_STDIN_INHERIT = (1u << 1), + G_SUBPROCESS_FLAGS_STDOUT_PIPE = (1u << 2), + G_SUBPROCESS_FLAGS_STDOUT_SILENCE = (1u << 3), + G_SUBPROCESS_FLAGS_STDERR_PIPE = (1u << 4), + G_SUBPROCESS_FLAGS_STDERR_SILENCE = (1u << 5), + G_SUBPROCESS_FLAGS_STDERR_MERGE = (1u << 6), + G_SUBPROCESS_FLAGS_INHERIT_FDS = (1u << 7), + G_SUBPROCESS_FLAGS_SEARCH_PATH_FROM_ENVP = (1u << 8) +} GSubprocessFlags; + +/** + * GNotificationPriority: + * @G_NOTIFICATION_PRIORITY_LOW: for notifications that do not require + * immediate attention - typically used for contextual background + * information, such as contact birthdays or local weather + * @G_NOTIFICATION_PRIORITY_NORMAL: the default priority, to be used for the + * majority of notifications (for example email messages, software updates, + * completed download/sync operations) + * @G_NOTIFICATION_PRIORITY_HIGH: for events that require more attention, + * usually because responses are time-sensitive (for example chat and SMS + * messages or alarms) + * @G_NOTIFICATION_PRIORITY_URGENT: for urgent notifications, or notifications + * that require a response in a short space of time (for example phone calls + * or emergency warnings) + * + * Priority levels for #GNotifications. + * + * Since: 2.42 + */ +typedef enum { + G_NOTIFICATION_PRIORITY_NORMAL, + G_NOTIFICATION_PRIORITY_LOW, + G_NOTIFICATION_PRIORITY_HIGH, + G_NOTIFICATION_PRIORITY_URGENT +} GNotificationPriority; + +/** + * GNetworkConnectivity: + * @G_NETWORK_CONNECTIVITY_LOCAL: The host is not configured with a + * route to the Internet; it may or may not be connected to a local + * network. + * @G_NETWORK_CONNECTIVITY_LIMITED: The host is connected to a network, but + * does not appear to be able to reach the full Internet, perhaps + * due to upstream network problems. + * @G_NETWORK_CONNECTIVITY_PORTAL: The host is behind a captive portal and + * cannot reach the full Internet. + * @G_NETWORK_CONNECTIVITY_FULL: The host is connected to a network, and + * appears to be able to reach the full Internet. + * + * The host's network connectivity state, as reported by #GNetworkMonitor. + * + * Since: 2.44 + */ +typedef enum { + G_NETWORK_CONNECTIVITY_LOCAL = 1, + G_NETWORK_CONNECTIVITY_LIMITED = 2, + G_NETWORK_CONNECTIVITY_PORTAL = 3, + G_NETWORK_CONNECTIVITY_FULL = 4 +} GNetworkConnectivity; + +/** + * GPollableReturn: + * @G_POLLABLE_RETURN_FAILED: Generic error condition for when an operation fails. + * @G_POLLABLE_RETURN_OK: The operation was successfully finished. + * @G_POLLABLE_RETURN_WOULD_BLOCK: The operation would block. + * + * Return value for various IO operations that signal errors via the + * return value and not necessarily via a #GError. + * + * This enum exists to be able to return errors to callers without having to + * allocate a #GError. Allocating #GErrors can be quite expensive for + * regularly happening errors like %G_IO_ERROR_WOULD_BLOCK. + * + * In case of %G_POLLABLE_RETURN_FAILED a #GError should be set for the + * operation to give details about the error that happened. + * + * Since: 2.60 + */ +typedef enum { + G_POLLABLE_RETURN_FAILED = 0, + G_POLLABLE_RETURN_OK = 1, + G_POLLABLE_RETURN_WOULD_BLOCK = -G_IO_ERROR_WOULD_BLOCK +} GPollableReturn; + +/** + * GMemoryMonitorWarningLevel: + * @G_MEMORY_MONITOR_WARNING_LEVEL_LOW: Memory on the device is low, processes + * should free up unneeded resources (for example, in-memory caches) so they can + * be used elsewhere. + * @G_MEMORY_MONITOR_WARNING_LEVEL_MEDIUM: Same as @G_MEMORY_MONITOR_WARNING_LEVEL_LOW + * but the device has even less free memory, so processes should try harder to free + * up unneeded resources. If your process does not need to stay running, it is a + * good time for it to quit. + * @G_MEMORY_MONITOR_WARNING_LEVEL_CRITICAL: The system will soon start terminating + * processes to reclaim memory, including background processes. + * + * Memory availability warning levels. + * + * Note that because new values might be added, it is recommended that applications check + * #GMemoryMonitorWarningLevel as ranges, for example: + * |[ + * if (warning_level > G_MEMORY_MONITOR_WARNING_LEVEL_LOW) + * drop_caches (); + * ]| + * + * Since: 2.64 + */ +typedef enum { + G_MEMORY_MONITOR_WARNING_LEVEL_LOW = 50, + G_MEMORY_MONITOR_WARNING_LEVEL_MEDIUM = 100, + G_MEMORY_MONITOR_WARNING_LEVEL_CRITICAL = 255 +} GMemoryMonitorWarningLevel; + +G_END_DECLS + +#endif /* __GIO_ENUMS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gioenumtypes.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gioenumtypes.h new file mode 100644 index 0000000..4fcfaa1 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gioenumtypes.h @@ -0,0 +1,207 @@ + +/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ + +/* + * Copyright © 2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Matthias Clasen + */ + +#ifndef __GIO_ENUM_TYPES_H__ +#define __GIO_ENUM_TYPES_H__ + +#include +#include + +G_BEGIN_DECLS + +/* enumerations from "../src/glib-2-322e03f702.clean/gio/gioenums.h" */ +GIO_AVAILABLE_IN_ALL GType g_app_info_create_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_APP_INFO_CREATE_FLAGS (g_app_info_create_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_converter_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_CONVERTER_FLAGS (g_converter_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_converter_result_get_type (void) G_GNUC_CONST; +#define G_TYPE_CONVERTER_RESULT (g_converter_result_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_data_stream_byte_order_get_type (void) G_GNUC_CONST; +#define G_TYPE_DATA_STREAM_BYTE_ORDER (g_data_stream_byte_order_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_data_stream_newline_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_DATA_STREAM_NEWLINE_TYPE (g_data_stream_newline_type_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_file_attribute_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_ATTRIBUTE_TYPE (g_file_attribute_type_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_file_attribute_info_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS (g_file_attribute_info_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_file_attribute_status_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_ATTRIBUTE_STATUS (g_file_attribute_status_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_file_query_info_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_QUERY_INFO_FLAGS (g_file_query_info_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_file_create_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_CREATE_FLAGS (g_file_create_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_file_measure_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_MEASURE_FLAGS (g_file_measure_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_mount_mount_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_MOUNT_MOUNT_FLAGS (g_mount_mount_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_mount_unmount_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_MOUNT_UNMOUNT_FLAGS (g_mount_unmount_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_drive_start_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DRIVE_START_FLAGS (g_drive_start_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_drive_start_stop_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_DRIVE_START_STOP_TYPE (g_drive_start_stop_type_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_file_copy_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_COPY_FLAGS (g_file_copy_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_file_monitor_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_MONITOR_FLAGS (g_file_monitor_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_file_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_TYPE (g_file_type_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_filesystem_preview_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILESYSTEM_PREVIEW_TYPE (g_filesystem_preview_type_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_file_monitor_event_get_type (void) G_GNUC_CONST; +#define G_TYPE_FILE_MONITOR_EVENT (g_file_monitor_event_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_io_error_enum_get_type (void) G_GNUC_CONST; +#define G_TYPE_IO_ERROR_ENUM (g_io_error_enum_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_ask_password_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_ASK_PASSWORD_FLAGS (g_ask_password_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_password_save_get_type (void) G_GNUC_CONST; +#define G_TYPE_PASSWORD_SAVE (g_password_save_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_mount_operation_result_get_type (void) G_GNUC_CONST; +#define G_TYPE_MOUNT_OPERATION_RESULT (g_mount_operation_result_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_output_stream_splice_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_OUTPUT_STREAM_SPLICE_FLAGS (g_output_stream_splice_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_io_stream_splice_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_IO_STREAM_SPLICE_FLAGS (g_io_stream_splice_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_emblem_origin_get_type (void) G_GNUC_CONST; +#define G_TYPE_EMBLEM_ORIGIN (g_emblem_origin_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_resolver_error_get_type (void) G_GNUC_CONST; +#define G_TYPE_RESOLVER_ERROR (g_resolver_error_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_resolver_record_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_RESOLVER_RECORD_TYPE (g_resolver_record_type_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_resource_error_get_type (void) G_GNUC_CONST; +#define G_TYPE_RESOURCE_ERROR (g_resource_error_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_resource_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_RESOURCE_FLAGS (g_resource_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_resource_lookup_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_RESOURCE_LOOKUP_FLAGS (g_resource_lookup_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_socket_family_get_type (void) G_GNUC_CONST; +#define G_TYPE_SOCKET_FAMILY (g_socket_family_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_socket_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_SOCKET_TYPE (g_socket_type_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_socket_msg_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_SOCKET_MSG_FLAGS (g_socket_msg_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_socket_protocol_get_type (void) G_GNUC_CONST; +#define G_TYPE_SOCKET_PROTOCOL (g_socket_protocol_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_zlib_compressor_format_get_type (void) G_GNUC_CONST; +#define G_TYPE_ZLIB_COMPRESSOR_FORMAT (g_zlib_compressor_format_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_unix_socket_address_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_UNIX_SOCKET_ADDRESS_TYPE (g_unix_socket_address_type_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_bus_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_BUS_TYPE (g_bus_type_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_bus_name_owner_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_BUS_NAME_OWNER_FLAGS (g_bus_name_owner_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_bus_name_watcher_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_BUS_NAME_WATCHER_FLAGS (g_bus_name_watcher_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_dbus_proxy_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_PROXY_FLAGS (g_dbus_proxy_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_dbus_error_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_ERROR (g_dbus_error_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_dbus_connection_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_CONNECTION_FLAGS (g_dbus_connection_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_dbus_capability_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_CAPABILITY_FLAGS (g_dbus_capability_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_dbus_call_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_CALL_FLAGS (g_dbus_call_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_dbus_message_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_MESSAGE_TYPE (g_dbus_message_type_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_dbus_message_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_MESSAGE_FLAGS (g_dbus_message_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_dbus_message_header_field_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_MESSAGE_HEADER_FIELD (g_dbus_message_header_field_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_dbus_property_info_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_PROPERTY_INFO_FLAGS (g_dbus_property_info_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_dbus_subtree_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_SUBTREE_FLAGS (g_dbus_subtree_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_dbus_server_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_SERVER_FLAGS (g_dbus_server_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_dbus_signal_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_SIGNAL_FLAGS (g_dbus_signal_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_dbus_send_message_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_SEND_MESSAGE_FLAGS (g_dbus_send_message_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_credentials_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_CREDENTIALS_TYPE (g_credentials_type_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_dbus_message_byte_order_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_MESSAGE_BYTE_ORDER (g_dbus_message_byte_order_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_application_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_APPLICATION_FLAGS (g_application_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_tls_error_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_ERROR (g_tls_error_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_tls_certificate_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_CERTIFICATE_FLAGS (g_tls_certificate_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_tls_authentication_mode_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_AUTHENTICATION_MODE (g_tls_authentication_mode_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_tls_channel_binding_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_CHANNEL_BINDING_TYPE (g_tls_channel_binding_type_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_tls_channel_binding_error_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_CHANNEL_BINDING_ERROR (g_tls_channel_binding_error_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_tls_rehandshake_mode_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_REHANDSHAKE_MODE (g_tls_rehandshake_mode_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_tls_password_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_PASSWORD_FLAGS (g_tls_password_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_tls_interaction_result_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_INTERACTION_RESULT (g_tls_interaction_result_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_dbus_interface_skeleton_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_INTERFACE_SKELETON_FLAGS (g_dbus_interface_skeleton_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_dbus_object_manager_client_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_DBUS_OBJECT_MANAGER_CLIENT_FLAGS (g_dbus_object_manager_client_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_tls_database_verify_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_DATABASE_VERIFY_FLAGS (g_tls_database_verify_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_tls_database_lookup_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_DATABASE_LOOKUP_FLAGS (g_tls_database_lookup_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_tls_certificate_request_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_CERTIFICATE_REQUEST_FLAGS (g_tls_certificate_request_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_tls_protocol_version_get_type (void) G_GNUC_CONST; +#define G_TYPE_TLS_PROTOCOL_VERSION (g_tls_protocol_version_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_io_module_scope_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_IO_MODULE_SCOPE_FLAGS (g_io_module_scope_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_socket_client_event_get_type (void) G_GNUC_CONST; +#define G_TYPE_SOCKET_CLIENT_EVENT (g_socket_client_event_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_socket_listener_event_get_type (void) G_GNUC_CONST; +#define G_TYPE_SOCKET_LISTENER_EVENT (g_socket_listener_event_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_test_dbus_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_TEST_DBUS_FLAGS (g_test_dbus_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_subprocess_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_SUBPROCESS_FLAGS (g_subprocess_flags_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_notification_priority_get_type (void) G_GNUC_CONST; +#define G_TYPE_NOTIFICATION_PRIORITY (g_notification_priority_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_network_connectivity_get_type (void) G_GNUC_CONST; +#define G_TYPE_NETWORK_CONNECTIVITY (g_network_connectivity_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_pollable_return_get_type (void) G_GNUC_CONST; +#define G_TYPE_POLLABLE_RETURN (g_pollable_return_get_type ()) +GIO_AVAILABLE_IN_ALL GType g_memory_monitor_warning_level_get_type (void) G_GNUC_CONST; +#define G_TYPE_MEMORY_MONITOR_WARNING_LEVEL (g_memory_monitor_warning_level_get_type ()) + +/* enumerations from "../src/glib-2-322e03f702.clean/gio/gresolver.h" */ +GIO_AVAILABLE_IN_ALL GType g_resolver_name_lookup_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_RESOLVER_NAME_LOOKUP_FLAGS (g_resolver_name_lookup_flags_get_type ()) + +/* enumerations from "../src/glib-2-322e03f702.clean/gio/gsettings.h" */ +GIO_AVAILABLE_IN_ALL GType g_settings_bind_flags_get_type (void) G_GNUC_CONST; +#define G_TYPE_SETTINGS_BIND_FLAGS (g_settings_bind_flags_get_type ()) +G_END_DECLS + +#endif /* __GIO_ENUM_TYPES_H__ */ + +/* Generated data ends here */ + diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gioerror.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gioerror.h new file mode 100644 index 0000000..71ccdb1 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gioerror.h @@ -0,0 +1,58 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_IO_ERROR_H__ +#define __G_IO_ERROR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include + +G_BEGIN_DECLS + +/** + * G_IO_ERROR: + * + * Error domain for GIO. Errors in this domain will be from the #GIOErrorEnum enumeration. + * See #GError for more information on error domains. + **/ +#define G_IO_ERROR g_io_error_quark() + +GIO_AVAILABLE_IN_ALL +GQuark g_io_error_quark (void); +GIO_AVAILABLE_IN_ALL +GIOErrorEnum g_io_error_from_errno (gint err_no); +GIO_AVAILABLE_IN_2_74 +GIOErrorEnum g_io_error_from_file_error (GFileError file_error); + +#ifdef G_OS_WIN32 +GIO_AVAILABLE_IN_ALL +GIOErrorEnum g_io_error_from_win32_error (gint error_code); +#endif + +G_END_DECLS + +#endif /* __G_IO_ERROR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/giomodule.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/giomodule.h new file mode 100644 index 0000000..2fe7e1d --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/giomodule.h @@ -0,0 +1,199 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_IO_MODULE_H__ +#define __G_IO_MODULE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +typedef struct _GIOModuleScope GIOModuleScope; + +GIO_AVAILABLE_IN_2_30 +GIOModuleScope * g_io_module_scope_new (GIOModuleScopeFlags flags); +GIO_AVAILABLE_IN_2_30 +void g_io_module_scope_free (GIOModuleScope *scope); +GIO_AVAILABLE_IN_2_30 +void g_io_module_scope_block (GIOModuleScope *scope, + const gchar *basename); + +#define G_IO_TYPE_MODULE (g_io_module_get_type ()) +#define G_IO_MODULE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_IO_TYPE_MODULE, GIOModule)) +#define G_IO_MODULE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_IO_TYPE_MODULE, GIOModuleClass)) +#define G_IO_IS_MODULE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_IO_TYPE_MODULE)) +#define G_IO_IS_MODULE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_IO_TYPE_MODULE)) +#define G_IO_MODULE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_IO_TYPE_MODULE, GIOModuleClass)) + +/** + * GIOModule: + * + * Opaque module base class for extending GIO. + **/ +typedef struct _GIOModuleClass GIOModuleClass; + +GIO_AVAILABLE_IN_ALL +GType g_io_module_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GIOModule *g_io_module_new (const gchar *filename); + +GIO_AVAILABLE_IN_ALL +void g_io_modules_scan_all_in_directory (const char *dirname); +GIO_AVAILABLE_IN_ALL +GList *g_io_modules_load_all_in_directory (const gchar *dirname); + +GIO_AVAILABLE_IN_2_30 +void g_io_modules_scan_all_in_directory_with_scope (const gchar *dirname, + GIOModuleScope *scope); +GIO_AVAILABLE_IN_2_30 +GList *g_io_modules_load_all_in_directory_with_scope (const gchar *dirname, + GIOModuleScope *scope); + +GIO_AVAILABLE_IN_ALL +GIOExtensionPoint *g_io_extension_point_register (const char *name); +GIO_AVAILABLE_IN_ALL +GIOExtensionPoint *g_io_extension_point_lookup (const char *name); +GIO_AVAILABLE_IN_ALL +void g_io_extension_point_set_required_type (GIOExtensionPoint *extension_point, + GType type); +GIO_AVAILABLE_IN_ALL +GType g_io_extension_point_get_required_type (GIOExtensionPoint *extension_point); +GIO_AVAILABLE_IN_ALL +GList *g_io_extension_point_get_extensions (GIOExtensionPoint *extension_point); +GIO_AVAILABLE_IN_ALL +GIOExtension * g_io_extension_point_get_extension_by_name (GIOExtensionPoint *extension_point, + const char *name); +GIO_AVAILABLE_IN_ALL +GIOExtension * g_io_extension_point_implement (const char *extension_point_name, + GType type, + const char *extension_name, + gint priority); + +GIO_AVAILABLE_IN_ALL +GType g_io_extension_get_type (GIOExtension *extension); +GIO_AVAILABLE_IN_ALL +const char * g_io_extension_get_name (GIOExtension *extension); +GIO_AVAILABLE_IN_ALL +gint g_io_extension_get_priority (GIOExtension *extension); +GIO_AVAILABLE_IN_ALL +GTypeClass* g_io_extension_ref_class (GIOExtension *extension); + + +/* API for the modules to implement. + * Note that those functions are not implemented by libgio, they are declared + * here to be implemented in modules, that's why it uses G_MODULE_EXPORT + * instead of GIO_AVAILABLE_IN_ALL. + */ + +/** + * g_io_module_load: (skip) + * @module: a #GIOModule. + * + * Required API for GIO modules to implement. + * + * This function is run after the module has been loaded into GIO, + * to initialize the module. Typically, this function will call + * g_io_extension_point_implement(). + * + * Since 2.56, this function should be named `g_io__load`, where + * `modulename` is the plugin’s filename with the `lib` or `libgio` prefix and + * everything after the first dot removed, and with `-` replaced with `_` + * throughout. For example, `libgiognutls-helper.so` becomes `gnutls_helper`. + * Using the new symbol names avoids name clashes when building modules + * statically. The old symbol names continue to be supported, but cannot be used + * for static builds. + **/ +G_MODULE_EXPORT +void g_io_module_load (GIOModule *module); + +/** + * g_io_module_unload: (skip) + * @module: a #GIOModule. + * + * Required API for GIO modules to implement. + * + * This function is run when the module is being unloaded from GIO, + * to finalize the module. + * + * Since 2.56, this function should be named `g_io__unload`, where + * `modulename` is the plugin’s filename with the `lib` or `libgio` prefix and + * everything after the first dot removed, and with `-` replaced with `_` + * throughout. For example, `libgiognutls-helper.so` becomes `gnutls_helper`. + * Using the new symbol names avoids name clashes when building modules + * statically. The old symbol names continue to be supported, but cannot be used + * for static builds. + **/ +G_MODULE_EXPORT +void g_io_module_unload (GIOModule *module); + +/** + * g_io_module_query: + * + * Optional API for GIO modules to implement. + * + * Should return a list of all the extension points that may be + * implemented in this module. + * + * This method will not be called in normal use, however it may be + * called when probing existing modules and recording which extension + * points that this model is used for. This means we won't have to + * load and initialize this module unless its needed. + * + * If this function is not implemented by the module the module will + * always be loaded, initialized and then unloaded on application + * startup so that it can register its extension points during init. + * + * Note that a module need not actually implement all the extension + * points that g_io_module_query() returns, since the exact list of + * extension may depend on runtime issues. However all extension + * points actually implemented must be returned by g_io_module_query() + * (if defined). + * + * When installing a module that implements g_io_module_query() you must + * run gio-querymodules in order to build the cache files required for + * lazy loading. + * + * Since 2.56, this function should be named `g_io__query`, where + * `modulename` is the plugin’s filename with the `lib` or `libgio` prefix and + * everything after the first dot removed, and with `-` replaced with `_` + * throughout. For example, `libgiognutls-helper.so` becomes `gnutls_helper`. + * Using the new symbol names avoids name clashes when building modules + * statically. The old symbol names continue to be supported, but cannot be used + * for static builds. + * + * Returns: (transfer full): A %NULL-terminated array of strings, + * listing the supported extension points of the module. The array + * must be suitable for freeing with g_strfreev(). + * + * Since: 2.24 + **/ +G_MODULE_EXPORT +char **g_io_module_query (void); + +G_END_DECLS + +#endif /* __G_IO_MODULE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gioscheduler.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gioscheduler.h new file mode 100644 index 0000000..52162dc --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gioscheduler.h @@ -0,0 +1,56 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_IO_SCHEDULER_H__ +#define __G_IO_SCHEDULER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + + +GIO_DEPRECATED_IN_2_36_FOR ("GThreadPool or g_task_run_in_thread") +void g_io_scheduler_push_job (GIOSchedulerJobFunc job_func, + gpointer user_data, + GDestroyNotify notify, + gint io_priority, + GCancellable *cancellable); +GIO_DEPRECATED_IN_2_36 +void g_io_scheduler_cancel_all_jobs (void); +GIO_DEPRECATED_IN_2_36_FOR (g_main_context_invoke) +gboolean g_io_scheduler_job_send_to_mainloop (GIOSchedulerJob *job, + GSourceFunc func, + gpointer user_data, + GDestroyNotify notify); +GIO_DEPRECATED_IN_2_36_FOR (g_main_context_invoke) +void g_io_scheduler_job_send_to_mainloop_async (GIOSchedulerJob *job, + GSourceFunc func, + gpointer user_data, + GDestroyNotify notify); + +G_END_DECLS + +#endif /* __G_IO_SCHEDULER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/giostream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/giostream.h new file mode 100644 index 0000000..52881c7 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/giostream.h @@ -0,0 +1,137 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2008, 2009 Codethink Limited + * Copyright © 2009 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * See the included COPYING file for more information. + * + * Authors: Ryan Lortie + * Alexander Larsson + */ + +#ifndef __G_IO_STREAM_H__ +#define __G_IO_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include +#include + +G_BEGIN_DECLS + +#define G_TYPE_IO_STREAM (g_io_stream_get_type ()) +#define G_IO_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_IO_STREAM, GIOStream)) +#define G_IO_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_IO_STREAM, GIOStreamClass)) +#define G_IS_IO_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_IO_STREAM)) +#define G_IS_IO_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_IO_STREAM)) +#define G_IO_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_IO_STREAM, GIOStreamClass)) + +typedef struct _GIOStreamPrivate GIOStreamPrivate; +typedef struct _GIOStreamClass GIOStreamClass; + +/** + * GIOStream: + * + * Base class for read-write streams. + **/ +struct _GIOStream +{ + GObject parent_instance; + + /*< private >*/ + GIOStreamPrivate *priv; +}; + +struct _GIOStreamClass +{ + GObjectClass parent_class; + + GInputStream * (*get_input_stream) (GIOStream *stream); + GOutputStream * (*get_output_stream) (GIOStream *stream); + + gboolean (* close_fn) (GIOStream *stream, + GCancellable *cancellable, + GError **error); + void (* close_async) (GIOStream *stream, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* close_finish) (GIOStream *stream, + GAsyncResult *result, + GError **error); + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); + void (*_g_reserved7) (void); + void (*_g_reserved8) (void); + void (*_g_reserved9) (void); + void (*_g_reserved10) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_io_stream_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GInputStream * g_io_stream_get_input_stream (GIOStream *stream); +GIO_AVAILABLE_IN_ALL +GOutputStream *g_io_stream_get_output_stream (GIOStream *stream); + +GIO_AVAILABLE_IN_ALL +void g_io_stream_splice_async (GIOStream *stream1, + GIOStream *stream2, + GIOStreamSpliceFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_ALL +gboolean g_io_stream_splice_finish (GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_io_stream_close (GIOStream *stream, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_io_stream_close_async (GIOStream *stream, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_io_stream_close_finish (GIOStream *stream, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_io_stream_is_closed (GIOStream *stream); +GIO_AVAILABLE_IN_ALL +gboolean g_io_stream_has_pending (GIOStream *stream); +GIO_AVAILABLE_IN_ALL +gboolean g_io_stream_set_pending (GIOStream *stream, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_io_stream_clear_pending (GIOStream *stream); + +G_END_DECLS + +#endif /* __G_IO_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/giotypes.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/giotypes.h new file mode 100644 index 0000000..82e091b --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/giotypes.h @@ -0,0 +1,660 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __GIO_TYPES_H__ +#define __GIO_TYPES_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +typedef struct _GAppLaunchContext GAppLaunchContext; +typedef struct _GAppInfo GAppInfo; /* Dummy typedef */ +typedef struct _GAsyncResult GAsyncResult; /* Dummy typedef */ +typedef struct _GAsyncInitable GAsyncInitable; +typedef struct _GBufferedInputStream GBufferedInputStream; +typedef struct _GBufferedOutputStream GBufferedOutputStream; +typedef struct _GCancellable GCancellable; +typedef struct _GCharsetConverter GCharsetConverter; +typedef struct _GConverter GConverter; +typedef struct _GConverterInputStream GConverterInputStream; +typedef struct _GConverterOutputStream GConverterOutputStream; +typedef struct _GDatagramBased GDatagramBased; +typedef struct _GDataInputStream GDataInputStream; +typedef struct _GSimplePermission GSimplePermission; +typedef struct _GZlibCompressor GZlibCompressor; +typedef struct _GZlibDecompressor GZlibDecompressor; + +typedef struct _GSimpleActionGroup GSimpleActionGroup; +typedef struct _GRemoteActionGroup GRemoteActionGroup; +typedef struct _GDBusActionGroup GDBusActionGroup; +typedef struct _GActionMap GActionMap; +typedef struct _GActionGroup GActionGroup; +typedef struct _GPropertyAction GPropertyAction; +typedef struct _GSimpleAction GSimpleAction; +typedef struct _GAction GAction; +typedef struct _GApplication GApplication; +typedef struct _GApplicationCommandLine GApplicationCommandLine; +typedef struct _GSettingsBackend GSettingsBackend; +typedef struct _GSettings GSettings; +typedef struct _GPermission GPermission; + +typedef struct _GMenuModel GMenuModel; +typedef struct _GNotification GNotification; + +/** + * GDrive: + * + * Opaque drive object. + **/ +typedef struct _GDrive GDrive; /* Dummy typedef */ +typedef struct _GFileEnumerator GFileEnumerator; +typedef struct _GFileMonitor GFileMonitor; +typedef struct _GFilterInputStream GFilterInputStream; +typedef struct _GFilterOutputStream GFilterOutputStream; + +/** + * GFile: + * + * A handle to an object implementing the #GFileIface interface. + * Generally stores a location within the file system. Handles do not + * necessarily represent files or directories that currently exist. + **/ +typedef struct _GFile GFile; /* Dummy typedef */ +typedef struct _GFileInfo GFileInfo; + +/** + * GFileAttributeMatcher: + * + * Determines if a string matches a file attribute. + **/ +typedef struct _GFileAttributeMatcher GFileAttributeMatcher; +typedef struct _GFileAttributeInfo GFileAttributeInfo; +typedef struct _GFileAttributeInfoList GFileAttributeInfoList; +typedef struct _GFileDescriptorBased GFileDescriptorBased; +typedef struct _GFileInputStream GFileInputStream; +typedef struct _GFileOutputStream GFileOutputStream; +typedef struct _GFileIOStream GFileIOStream; +typedef struct _GFileIcon GFileIcon; +typedef struct _GFilenameCompleter GFilenameCompleter; + + +typedef struct _GIcon GIcon; /* Dummy typedef */ +typedef struct _GInetAddress GInetAddress; +typedef struct _GInetAddressMask GInetAddressMask; +typedef struct _GInetSocketAddress GInetSocketAddress; +typedef struct _GNativeSocketAddress GNativeSocketAddress; +typedef struct _GInputStream GInputStream; +typedef struct _GInitable GInitable; +typedef struct _GIOModule GIOModule; +typedef struct _GIOExtensionPoint GIOExtensionPoint; +typedef struct _GIOExtension GIOExtension; + +/** + * GIOSchedulerJob: + * + * Opaque class for defining and scheduling IO jobs. + **/ +typedef struct _GIOSchedulerJob GIOSchedulerJob; +typedef struct _GIOStreamAdapter GIOStreamAdapter; +typedef struct _GLoadableIcon GLoadableIcon; /* Dummy typedef */ +typedef struct _GBytesIcon GBytesIcon; +typedef struct _GMemoryInputStream GMemoryInputStream; +typedef struct _GMemoryOutputStream GMemoryOutputStream; + +/** + * GMount: + * + * A handle to an object implementing the #GMountIface interface. + **/ +typedef struct _GMount GMount; /* Dummy typedef */ +typedef struct _GMountOperation GMountOperation; +typedef struct _GNetworkAddress GNetworkAddress; +typedef struct _GNetworkMonitor GNetworkMonitor; +typedef struct _GNetworkService GNetworkService; +typedef struct _GOutputStream GOutputStream; +typedef struct _GIOStream GIOStream; +typedef struct _GSimpleIOStream GSimpleIOStream; +typedef struct _GPollableInputStream GPollableInputStream; /* Dummy typedef */ +typedef struct _GPollableOutputStream GPollableOutputStream; /* Dummy typedef */ +typedef struct _GResolver GResolver; + +/** + * GResource: + * + * A resource bundle. + * + * Since: 2.32 + */ +typedef struct _GResource GResource; +typedef struct _GSeekable GSeekable; +typedef struct _GSimpleAsyncResult GSimpleAsyncResult; + +/** + * GSocket: + * + * A lowlevel network socket object. + * + * Since: 2.22 + **/ +typedef struct _GSocket GSocket; + +/** + * GSocketControlMessage: + * + * Base class for socket-type specific control messages that can be sent and + * received over #GSocket. + **/ +typedef struct _GSocketControlMessage GSocketControlMessage; +/** + * GSocketClient: + * + * A helper class for network clients to make connections. + * + * Since: 2.22 + **/ +typedef struct _GSocketClient GSocketClient; +/** + * GSocketConnection: + * + * A socket connection GIOStream object for connection-oriented sockets. + * + * Since: 2.22 + **/ +typedef struct _GSocketConnection GSocketConnection; +/** + * GSocketListener: + * + * A helper class for network servers to listen for and accept connections. + * + * Since: 2.22 + **/ +typedef struct _GSocketListener GSocketListener; +/** + * GSocketService: + * + * A helper class for handling accepting incoming connections in the + * glib mainloop. + * + * Since: 2.22 + **/ +typedef struct _GSocketService GSocketService; +typedef struct _GSocketAddress GSocketAddress; +typedef struct _GSocketAddressEnumerator GSocketAddressEnumerator; +typedef struct _GSocketConnectable GSocketConnectable; +typedef struct _GSrvTarget GSrvTarget; +typedef struct _GTask GTask; +/** + * GTcpConnection: + * + * A #GSocketConnection for TCP/IP connections. + * + * Since: 2.22 + **/ +typedef struct _GTcpConnection GTcpConnection; +typedef struct _GTcpWrapperConnection GTcpWrapperConnection; +/** + * GThreadedSocketService: + * + * A helper class for handling accepting incoming connections in the + * glib mainloop and handling them in a thread. + * + * Since: 2.22 + **/ +typedef struct _GThreadedSocketService GThreadedSocketService; +typedef struct _GDtlsConnection GDtlsConnection; +typedef struct _GDtlsClientConnection GDtlsClientConnection; /* Dummy typedef */ +typedef struct _GDtlsServerConnection GDtlsServerConnection; /* Dummy typedef */ +typedef struct _GThemedIcon GThemedIcon; +typedef struct _GTlsCertificate GTlsCertificate; +typedef struct _GTlsClientConnection GTlsClientConnection; /* Dummy typedef */ +typedef struct _GTlsConnection GTlsConnection; +typedef struct _GTlsDatabase GTlsDatabase; +typedef struct _GTlsFileDatabase GTlsFileDatabase; +typedef struct _GTlsInteraction GTlsInteraction; +typedef struct _GTlsPassword GTlsPassword; +typedef struct _GTlsServerConnection GTlsServerConnection; /* Dummy typedef */ +typedef struct _GVfs GVfs; /* Dummy typedef */ + +/** + * GProxyResolver: + * + * A helper class to enumerate proxies base on URI. + * + * Since: 2.26 + **/ +typedef struct _GProxyResolver GProxyResolver; +typedef struct _GProxy GProxy; +typedef struct _GProxyAddress GProxyAddress; +typedef struct _GProxyAddressEnumerator GProxyAddressEnumerator; + +/** + * GVolume: + * + * Opaque mountable volume object. + **/ +typedef struct _GVolume GVolume; /* Dummy typedef */ +typedef struct _GVolumeMonitor GVolumeMonitor; + +/** + * GAsyncReadyCallback: + * @source_object: (nullable): the object the asynchronous operation was started with. + * @res: a #GAsyncResult. + * @data: user data passed to the callback. + * + * Type definition for a function that will be called back when an asynchronous + * operation within GIO has been completed. #GAsyncReadyCallback + * callbacks from #GTask are guaranteed to be invoked in a later + * iteration of the + * [thread-default main context][g-main-context-push-thread-default] + * where the #GTask was created. All other users of + * #GAsyncReadyCallback must likewise call it asynchronously in a + * later iteration of the main context. + * + * The asynchronous operation is guaranteed to have held a reference to + * @source_object from the time when the `*_async()` function was called, until + * after this callback returns. + **/ +typedef void (*GAsyncReadyCallback) (GObject *source_object, + GAsyncResult *res, + gpointer data); + +/** + * GFileProgressCallback: + * @current_num_bytes: the current number of bytes in the operation. + * @total_num_bytes: the total number of bytes in the operation. + * @data: user data passed to the callback. + * + * When doing file operations that may take a while, such as moving + * a file or copying a file, a progress callback is used to pass how + * far along that operation is to the application. + **/ +typedef void (*GFileProgressCallback) (goffset current_num_bytes, + goffset total_num_bytes, + gpointer data); + +/** + * GFileReadMoreCallback: + * @file_contents: the data as currently read. + * @file_size: the size of the data currently read. + * @callback_data: data passed to the callback. + * + * When loading the partial contents of a file with g_file_load_partial_contents_async(), + * it may become necessary to determine if any more data from the file should be loaded. + * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data + * should be read, or %FALSE otherwise. + * + * Returns: %TRUE if more data should be read back. %FALSE otherwise. + **/ +typedef gboolean (* GFileReadMoreCallback) (const char *file_contents, + goffset file_size, + gpointer callback_data); + +/** + * GFileMeasureProgressCallback: + * @reporting: %TRUE if more reports will come + * @current_size: the current cumulative size measurement + * @num_dirs: the number of directories visited so far + * @num_files: the number of non-directory files encountered + * @data: the data passed to the original request for this callback + * + * This callback type is used by g_file_measure_disk_usage() to make + * periodic progress reports when measuring the amount of disk spaced + * used by a directory. + * + * These calls are made on a best-effort basis and not all types of + * #GFile will support them. At the minimum, however, one call will + * always be made immediately. + * + * In the case that there is no support, @reporting will be set to + * %FALSE (and the other values undefined) and no further calls will be + * made. Otherwise, the @reporting will be %TRUE and the other values + * all-zeros during the first (immediate) call. In this way, you can + * know which type of progress UI to show without a delay. + * + * For g_file_measure_disk_usage() the callback is made directly. For + * g_file_measure_disk_usage_async() the callback is made via the + * default main context of the calling thread (ie: the same way that the + * final async result would be reported). + * + * @current_size is in the same units as requested by the operation (see + * %G_FILE_MEASURE_APPARENT_SIZE). + * + * The frequency of the updates is implementation defined, but is + * ideally about once every 200ms. + * + * The last progress callback may or may not be equal to the final + * result. Always check the async result to get the final value. + * + * Since: 2.38 + **/ +typedef void (* GFileMeasureProgressCallback) (gboolean reporting, + guint64 current_size, + guint64 num_dirs, + guint64 num_files, + gpointer data); + +/** + * GIOSchedulerJobFunc: + * @job: a #GIOSchedulerJob. + * @cancellable: optional #GCancellable object, %NULL to ignore. + * @data: data passed to the callback function + * + * I/O Job function. + * + * Long-running jobs should periodically check the @cancellable + * to see if they have been cancelled. + * + * Returns: %TRUE if this function should be called again to + * complete the job, %FALSE if the job is complete (or cancelled) + **/ +typedef gboolean (*GIOSchedulerJobFunc) (GIOSchedulerJob *job, + GCancellable *cancellable, + gpointer data); + +/** + * GSimpleAsyncThreadFunc: + * @res: a #GSimpleAsyncResult. + * @object: a #GObject. + * @cancellable: optional #GCancellable object, %NULL to ignore. + * + * Simple thread function that runs an asynchronous operation and + * checks for cancellation. + **/ +typedef void (*GSimpleAsyncThreadFunc) (GSimpleAsyncResult *res, + GObject *object, + GCancellable *cancellable); + +/** + * GSocketSourceFunc: + * @socket: the #GSocket + * @condition: the current condition at the source fired. + * @data: data passed in by the user. + * + * This is the function type of the callback used for the #GSource + * returned by g_socket_create_source(). + * + * Returns: it should return %FALSE if the source should be removed. + * + * Since: 2.22 + */ +typedef gboolean (*GSocketSourceFunc) (GSocket *socket, + GIOCondition condition, + gpointer data); + +/** + * GDatagramBasedSourceFunc: + * @datagram_based: the #GDatagramBased + * @condition: the current condition at the source fired + * @data: data passed in by the user + * + * This is the function type of the callback used for the #GSource + * returned by g_datagram_based_create_source(). + * + * Returns: %G_SOURCE_REMOVE if the source should be removed, + * %G_SOURCE_CONTINUE otherwise + * + * Since: 2.48 + */ +typedef gboolean (*GDatagramBasedSourceFunc) (GDatagramBased *datagram_based, + GIOCondition condition, + gpointer data); + +/** + * GInputVector: + * @buffer: Pointer to a buffer where data will be written. + * @size: the available size in @buffer. + * + * Structure used for scatter/gather data input. + * You generally pass in an array of #GInputVectors + * and the operation will store the read data starting in the + * first buffer, switching to the next as needed. + * + * Since: 2.22 + */ +typedef struct _GInputVector GInputVector; + +struct _GInputVector { + gpointer buffer; + gsize size; +}; + +/** + * GInputMessage: + * @address: (optional) (out) (transfer full): return location + * for a #GSocketAddress, or %NULL + * @vectors: (array length=num_vectors) (out): pointer to an + * array of input vectors + * @num_vectors: the number of input vectors pointed to by @vectors + * @bytes_received: (out): will be set to the number of bytes that have been + * received + * @flags: (out): collection of #GSocketMsgFlags for the received message, + * outputted by the call + * @control_messages: (array length=num_control_messages) (optional) + * (out) (transfer full): return location for a + * caller-allocated array of #GSocketControlMessages, or %NULL + * @num_control_messages: (out) (optional): return location for the number of + * elements in @control_messages + * + * Structure used for scatter/gather data input when receiving multiple + * messages or packets in one go. You generally pass in an array of empty + * #GInputVectors and the operation will use all the buffers as if they + * were one buffer, and will set @bytes_received to the total number of bytes + * received across all #GInputVectors. + * + * This structure closely mirrors `struct mmsghdr` and `struct msghdr` from + * the POSIX sockets API (see `man 2 recvmmsg`). + * + * If @address is non-%NULL then it is set to the source address the message + * was received from, and the caller must free it afterwards. + * + * If @control_messages is non-%NULL then it is set to an array of control + * messages received with the message (if any), and the caller must free it + * afterwards. @num_control_messages is set to the number of elements in + * this array, which may be zero. + * + * Flags relevant to this message will be returned in @flags. For example, + * `MSG_EOR` or `MSG_TRUNC`. + * + * Since: 2.48 + */ +typedef struct _GInputMessage GInputMessage; + +struct _GInputMessage { + GSocketAddress **address; + + GInputVector *vectors; + guint num_vectors; + + gsize bytes_received; + gint flags; + + GSocketControlMessage ***control_messages; + guint *num_control_messages; +}; + +/** + * GOutputVector: + * @buffer: Pointer to a buffer of data to read. + * @size: the size of @buffer. + * + * Structure used for scatter/gather data output. + * You generally pass in an array of #GOutputVectors + * and the operation will use all the buffers as if they were + * one buffer. + * + * Since: 2.22 + */ +typedef struct _GOutputVector GOutputVector; + +struct _GOutputVector { + gconstpointer buffer; + gsize size; +}; + +/** + * GOutputMessage: + * @address: (nullable): a #GSocketAddress, or %NULL + * @vectors: pointer to an array of output vectors + * @num_vectors: the number of output vectors pointed to by @vectors. + * @bytes_sent: initialize to 0. Will be set to the number of bytes + * that have been sent + * @control_messages: (array length=num_control_messages) (nullable): a pointer + * to an array of #GSocketControlMessages, or %NULL. + * @num_control_messages: number of elements in @control_messages. + * + * Structure used for scatter/gather data output when sending multiple + * messages or packets in one go. You generally pass in an array of + * #GOutputVectors and the operation will use all the buffers as if they + * were one buffer. + * + * If @address is %NULL then the message is sent to the default receiver + * (as previously set by g_socket_connect()). + * + * Since: 2.44 + */ +typedef struct _GOutputMessage GOutputMessage; + +struct _GOutputMessage { + GSocketAddress *address; + + GOutputVector *vectors; + guint num_vectors; + + guint bytes_sent; + + GSocketControlMessage **control_messages; + guint num_control_messages; +}; + +typedef struct _GCredentials GCredentials; +typedef struct _GUnixCredentialsMessage GUnixCredentialsMessage; +typedef struct _GUnixFDList GUnixFDList; +typedef struct _GDBusMessage GDBusMessage; +typedef struct _GDBusConnection GDBusConnection; +typedef struct _GDBusProxy GDBusProxy; +typedef struct _GDBusMethodInvocation GDBusMethodInvocation; +typedef struct _GDBusServer GDBusServer; +typedef struct _GDBusAuthObserver GDBusAuthObserver; +typedef struct _GDBusErrorEntry GDBusErrorEntry; +typedef struct _GDBusInterfaceVTable GDBusInterfaceVTable; +typedef struct _GDBusSubtreeVTable GDBusSubtreeVTable; +typedef struct _GDBusAnnotationInfo GDBusAnnotationInfo; +typedef struct _GDBusArgInfo GDBusArgInfo; +typedef struct _GDBusMethodInfo GDBusMethodInfo; +typedef struct _GDBusSignalInfo GDBusSignalInfo; +typedef struct _GDBusPropertyInfo GDBusPropertyInfo; +typedef struct _GDBusInterfaceInfo GDBusInterfaceInfo; +typedef struct _GDBusNodeInfo GDBusNodeInfo; + +/** + * GCancellableSourceFunc: + * @cancellable: the #GCancellable + * @data: data passed in by the user. + * + * This is the function type of the callback used for the #GSource + * returned by g_cancellable_source_new(). + * + * Returns: it should return %FALSE if the source should be removed. + * + * Since: 2.28 + */ +typedef gboolean (*GCancellableSourceFunc) (GCancellable *cancellable, + gpointer data); + +/** + * GPollableSourceFunc: + * @pollable_stream: the #GPollableInputStream or #GPollableOutputStream + * @data: data passed in by the user. + * + * This is the function type of the callback used for the #GSource + * returned by g_pollable_input_stream_create_source() and + * g_pollable_output_stream_create_source(). + * + * Returns: it should return %FALSE if the source should be removed. + * + * Since: 2.28 + */ +typedef gboolean (*GPollableSourceFunc) (GObject *pollable_stream, + gpointer data); + +typedef struct _GDBusInterface GDBusInterface; /* Dummy typedef */ +typedef struct _GDBusInterfaceSkeleton GDBusInterfaceSkeleton; +typedef struct _GDBusObject GDBusObject; /* Dummy typedef */ +typedef struct _GDBusObjectSkeleton GDBusObjectSkeleton; +typedef struct _GDBusObjectProxy GDBusObjectProxy; +typedef struct _GDBusObjectManager GDBusObjectManager; /* Dummy typedef */ +typedef struct _GDBusObjectManagerClient GDBusObjectManagerClient; +typedef struct _GDBusObjectManagerServer GDBusObjectManagerServer; + +/** + * GDBusProxyTypeFunc: + * @manager: A #GDBusObjectManagerClient. + * @object_path: The object path of the remote object. + * @interface_name: (nullable): The interface name of the remote object or %NULL if a #GDBusObjectProxy #GType is requested. + * @data: data passed in by the user. + * + * Function signature for a function used to determine the #GType to + * use for an interface proxy (if @interface_name is not %NULL) or + * object proxy (if @interface_name is %NULL). + * + * This function is called in the + * [thread-default main loop][g-main-context-push-thread-default] + * that @manager was constructed in. + * + * Returns: A #GType to use for the remote object. The returned type + * must be a #GDBusProxy or #GDBusObjectProxy -derived + * type. + * + * Since: 2.30 + */ +typedef GType (*GDBusProxyTypeFunc) (GDBusObjectManagerClient *manager, + const gchar *object_path, + const gchar *interface_name, + gpointer data); + +typedef struct _GTestDBus GTestDBus; + +/** + * GSubprocess: + * + * A child process. + * + * Since: 2.40 + */ +typedef struct _GSubprocess GSubprocess; +/** + * GSubprocessLauncher: + * + * Options for launching a child process. + * + * Since: 2.40 + */ +typedef struct _GSubprocessLauncher GSubprocessLauncher; + +G_END_DECLS + +#endif /* __GIO_TYPES_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/glistmodel.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/glistmodel.h new file mode 100644 index 0000000..a96e3ce --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/glistmodel.h @@ -0,0 +1,74 @@ +/* + * Copyright 2015 Lars Uebernickel + * Copyright 2015 Ryan Lortie + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: + * Lars Uebernickel + * Ryan Lortie + */ + +#ifndef __G_LIST_MODEL_H__ +#define __G_LIST_MODEL_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_LIST_MODEL g_list_model_get_type () +GIO_AVAILABLE_IN_2_44 +G_DECLARE_INTERFACE(GListModel, g_list_model, G, LIST_MODEL, GObject) + +struct _GListModelInterface +{ + GTypeInterface g_iface; + + GType (* get_item_type) (GListModel *list); + + guint (* get_n_items) (GListModel *list); + + gpointer (* get_item) (GListModel *list, + guint position); +}; + +GIO_AVAILABLE_IN_2_44 +GType g_list_model_get_item_type (GListModel *list); + +GIO_AVAILABLE_IN_2_44 +guint g_list_model_get_n_items (GListModel *list); + +GIO_AVAILABLE_IN_2_44 +gpointer g_list_model_get_item (GListModel *list, + guint position); + +GIO_AVAILABLE_IN_2_44 +GObject * g_list_model_get_object (GListModel *list, + guint position); + +GIO_AVAILABLE_IN_2_44 +void g_list_model_items_changed (GListModel *list, + guint position, + guint removed, + guint added); + +G_END_DECLS + +#endif /* __G_LIST_MODEL_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gliststore.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gliststore.h new file mode 100644 index 0000000..958ca60 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gliststore.h @@ -0,0 +1,97 @@ +/* + * Copyright 2015 Lars Uebernickel + * Copyright 2015 Ryan Lortie + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: + * Lars Uebernickel + * Ryan Lortie + */ + +#ifndef __G_LIST_STORE_H__ +#define __G_LIST_STORE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_LIST_STORE (g_list_store_get_type ()) +GIO_AVAILABLE_IN_2_44 +G_DECLARE_FINAL_TYPE(GListStore, g_list_store, G, LIST_STORE, GObject) + +GIO_AVAILABLE_IN_2_44 +GListStore * g_list_store_new (GType item_type); + +GIO_AVAILABLE_IN_2_44 +void g_list_store_insert (GListStore *store, + guint position, + gpointer item); + +GIO_AVAILABLE_IN_2_44 +guint g_list_store_insert_sorted (GListStore *store, + gpointer item, + GCompareDataFunc compare_func, + gpointer user_data); + +GIO_AVAILABLE_IN_2_46 +void g_list_store_sort (GListStore *store, + GCompareDataFunc compare_func, + gpointer user_data); + +GIO_AVAILABLE_IN_2_44 +void g_list_store_append (GListStore *store, + gpointer item); + +GIO_AVAILABLE_IN_2_44 +void g_list_store_remove (GListStore *store, + guint position); + +GIO_AVAILABLE_IN_2_44 +void g_list_store_remove_all (GListStore *store); + +GIO_AVAILABLE_IN_2_44 +void g_list_store_splice (GListStore *store, + guint position, + guint n_removals, + gpointer *additions, + guint n_additions); + +GIO_AVAILABLE_IN_2_64 +gboolean g_list_store_find (GListStore *store, + gpointer item, + guint *position); + +GIO_AVAILABLE_IN_2_64 +gboolean g_list_store_find_with_equal_func (GListStore *store, + gpointer item, + GEqualFunc equal_func, + guint *position); + +GIO_AVAILABLE_IN_2_74 +gboolean g_list_store_find_with_equal_func_full (GListStore *store, + gpointer item, + GEqualFuncFull equal_func, + gpointer user_data, + guint *position); + +G_END_DECLS + +#endif /* __G_LIST_STORE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gloadableicon.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gloadableicon.h new file mode 100644 index 0000000..7a576ef --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gloadableicon.h @@ -0,0 +1,101 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_LOADABLE_ICON_H__ +#define __G_LOADABLE_ICON_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_LOADABLE_ICON (g_loadable_icon_get_type ()) +#define G_LOADABLE_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_LOADABLE_ICON, GLoadableIcon)) +#define G_IS_LOADABLE_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_LOADABLE_ICON)) +#define G_LOADABLE_ICON_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_LOADABLE_ICON, GLoadableIconIface)) + +/** + * GLoadableIcon: + * + * Generic type for all kinds of icons that can be loaded + * as a stream. + **/ +typedef struct _GLoadableIconIface GLoadableIconIface; + +/** + * GLoadableIconIface: + * @g_iface: The parent interface. + * @load: Loads an icon. + * @load_async: Loads an icon asynchronously. + * @load_finish: Finishes an asynchronous icon load. + * + * Interface for icons that can be loaded as a stream. + **/ +struct _GLoadableIconIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + GInputStream * (* load) (GLoadableIcon *icon, + int size, + char **type, + GCancellable *cancellable, + GError **error); + void (* load_async) (GLoadableIcon *icon, + int size, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GInputStream * (* load_finish) (GLoadableIcon *icon, + GAsyncResult *res, + char **type, + GError **error); +}; + +GIO_AVAILABLE_IN_ALL +GType g_loadable_icon_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GInputStream *g_loadable_icon_load (GLoadableIcon *icon, + int size, + char **type, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_loadable_icon_load_async (GLoadableIcon *icon, + int size, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GInputStream *g_loadable_icon_load_finish (GLoadableIcon *icon, + GAsyncResult *res, + char **type, + GError **error); + +G_END_DECLS + +#endif /* __G_LOADABLE_ICON_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmemoryinputstream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmemoryinputstream.h new file mode 100644 index 0000000..fb72f23 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmemoryinputstream.h @@ -0,0 +1,92 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Christian Kellner + */ + +#ifndef __G_MEMORY_INPUT_STREAM_H__ +#define __G_MEMORY_INPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_MEMORY_INPUT_STREAM (g_memory_input_stream_get_type ()) +#define G_MEMORY_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_MEMORY_INPUT_STREAM, GMemoryInputStream)) +#define G_MEMORY_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_MEMORY_INPUT_STREAM, GMemoryInputStreamClass)) +#define G_IS_MEMORY_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_MEMORY_INPUT_STREAM)) +#define G_IS_MEMORY_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_MEMORY_INPUT_STREAM)) +#define G_MEMORY_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_MEMORY_INPUT_STREAM, GMemoryInputStreamClass)) + +/** + * GMemoryInputStream: + * + * Implements #GInputStream for arbitrary memory chunks. + **/ +typedef struct _GMemoryInputStreamClass GMemoryInputStreamClass; +typedef struct _GMemoryInputStreamPrivate GMemoryInputStreamPrivate; + +struct _GMemoryInputStream +{ + GInputStream parent_instance; + + /*< private >*/ + GMemoryInputStreamPrivate *priv; +}; + +struct _GMemoryInputStreamClass +{ + GInputStreamClass parent_class; + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + + +GIO_AVAILABLE_IN_ALL +GType g_memory_input_stream_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GInputStream * g_memory_input_stream_new (void); +GIO_AVAILABLE_IN_ALL +GInputStream * g_memory_input_stream_new_from_data (const void *data, + gssize len, + GDestroyNotify destroy); +GIO_AVAILABLE_IN_2_34 +GInputStream * g_memory_input_stream_new_from_bytes (GBytes *bytes); + +GIO_AVAILABLE_IN_ALL +void g_memory_input_stream_add_data (GMemoryInputStream *stream, + const void *data, + gssize len, + GDestroyNotify destroy); +GIO_AVAILABLE_IN_2_34 +void g_memory_input_stream_add_bytes (GMemoryInputStream *stream, + GBytes *bytes); + +G_END_DECLS + +#endif /* __G_MEMORY_INPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmemorymonitor.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmemorymonitor.h new file mode 100644 index 0000000..83c28b9 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmemorymonitor.h @@ -0,0 +1,64 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright 2019 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_MEMORY_MONITOR_H__ +#define __G_MEMORY_MONITOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * G_MEMORY_MONITOR_EXTENSION_POINT_NAME: + * + * Extension point for memory usage monitoring functionality. + * See [Extending GIO][extending-gio]. + * + * Since: 2.64 + */ +#define G_MEMORY_MONITOR_EXTENSION_POINT_NAME "gio-memory-monitor" + +#define G_TYPE_MEMORY_MONITOR (g_memory_monitor_get_type ()) +GIO_AVAILABLE_IN_2_64 +G_DECLARE_INTERFACE(GMemoryMonitor, g_memory_monitor, g, memory_monitor, GObject) + +#define G_MEMORY_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_MEMORY_MONITOR, GMemoryMonitor)) +#define G_IS_MEMORY_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_MEMORY_MONITOR)) +#define G_MEMORY_MONITOR_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_MEMORY_MONITOR, GMemoryMonitorInterface)) + +struct _GMemoryMonitorInterface { + /*< private >*/ + GTypeInterface g_iface; + + /*< public >*/ + void (*low_memory_warning) (GMemoryMonitor *monitor, + GMemoryMonitorWarningLevel level); +}; + +GIO_AVAILABLE_IN_2_64 +GMemoryMonitor *g_memory_monitor_dup_default (void); + +G_END_DECLS + +#endif /* __G_MEMORY_MONITOR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmemoryoutputstream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmemoryoutputstream.h new file mode 100644 index 0000000..08f5dcf --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmemoryoutputstream.h @@ -0,0 +1,109 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Christian Kellner + */ + +#ifndef __G_MEMORY_OUTPUT_STREAM_H__ +#define __G_MEMORY_OUTPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_MEMORY_OUTPUT_STREAM (g_memory_output_stream_get_type ()) +#define G_MEMORY_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_MEMORY_OUTPUT_STREAM, GMemoryOutputStream)) +#define G_MEMORY_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_MEMORY_OUTPUT_STREAM, GMemoryOutputStreamClass)) +#define G_IS_MEMORY_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_MEMORY_OUTPUT_STREAM)) +#define G_IS_MEMORY_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_MEMORY_OUTPUT_STREAM)) +#define G_MEMORY_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_MEMORY_OUTPUT_STREAM, GMemoryOutputStreamClass)) + +/** + * GMemoryOutputStream: + * + * Implements #GOutputStream for arbitrary memory chunks. + **/ +typedef struct _GMemoryOutputStreamClass GMemoryOutputStreamClass; +typedef struct _GMemoryOutputStreamPrivate GMemoryOutputStreamPrivate; + +struct _GMemoryOutputStream +{ + GOutputStream parent_instance; + + /*< private >*/ + GMemoryOutputStreamPrivate *priv; +}; + +struct _GMemoryOutputStreamClass +{ + GOutputStreamClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +/** + * GReallocFunc: + * @data: memory block to reallocate + * @size: size to reallocate @data to + * + * Changes the size of the memory block pointed to by @data to + * @size bytes. + * + * The function should have the same semantics as realloc(). + * + * Returns: a pointer to the reallocated memory + */ +typedef gpointer (* GReallocFunc) (gpointer data, + gsize size); + +GIO_AVAILABLE_IN_ALL +GType g_memory_output_stream_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GOutputStream *g_memory_output_stream_new (gpointer data, + gsize size, + GReallocFunc realloc_function, + GDestroyNotify destroy_function); +GIO_AVAILABLE_IN_2_36 +GOutputStream *g_memory_output_stream_new_resizable (void); +GIO_AVAILABLE_IN_ALL +gpointer g_memory_output_stream_get_data (GMemoryOutputStream *ostream); +GIO_AVAILABLE_IN_ALL +gsize g_memory_output_stream_get_size (GMemoryOutputStream *ostream); +GIO_AVAILABLE_IN_ALL +gsize g_memory_output_stream_get_data_size (GMemoryOutputStream *ostream); +GIO_AVAILABLE_IN_ALL +gpointer g_memory_output_stream_steal_data (GMemoryOutputStream *ostream); + +GIO_AVAILABLE_IN_2_34 +GBytes * g_memory_output_stream_steal_as_bytes (GMemoryOutputStream *ostream); + +G_END_DECLS + +#endif /* __G_MEMORY_OUTPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmenu.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmenu.h new file mode 100644 index 0000000..68e0684 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmenu.h @@ -0,0 +1,184 @@ +/* + * Copyright © 2011 Canonical Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Author: Ryan Lortie + */ + +#ifndef __G_MENU_H__ +#define __G_MENU_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_MENU (g_menu_get_type ()) +#define G_MENU(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_MENU, GMenu)) +#define G_IS_MENU(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_MENU)) + +#define G_TYPE_MENU_ITEM (g_menu_item_get_type ()) +#define G_MENU_ITEM(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_MENU_ITEM, GMenuItem)) +#define G_IS_MENU_ITEM(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_MENU_ITEM)) + +typedef struct _GMenuItem GMenuItem; +typedef struct _GMenu GMenu; + +GIO_AVAILABLE_IN_2_32 +GType g_menu_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_2_32 +GMenu * g_menu_new (void); + +GIO_AVAILABLE_IN_2_32 +void g_menu_freeze (GMenu *menu); + +GIO_AVAILABLE_IN_2_32 +void g_menu_insert_item (GMenu *menu, + gint position, + GMenuItem *item); +GIO_AVAILABLE_IN_2_32 +void g_menu_prepend_item (GMenu *menu, + GMenuItem *item); +GIO_AVAILABLE_IN_2_32 +void g_menu_append_item (GMenu *menu, + GMenuItem *item); +GIO_AVAILABLE_IN_2_32 +void g_menu_remove (GMenu *menu, + gint position); + +GIO_AVAILABLE_IN_2_38 +void g_menu_remove_all (GMenu *menu); + +GIO_AVAILABLE_IN_2_32 +void g_menu_insert (GMenu *menu, + gint position, + const gchar *label, + const gchar *detailed_action); +GIO_AVAILABLE_IN_2_32 +void g_menu_prepend (GMenu *menu, + const gchar *label, + const gchar *detailed_action); +GIO_AVAILABLE_IN_2_32 +void g_menu_append (GMenu *menu, + const gchar *label, + const gchar *detailed_action); + +GIO_AVAILABLE_IN_2_32 +void g_menu_insert_section (GMenu *menu, + gint position, + const gchar *label, + GMenuModel *section); +GIO_AVAILABLE_IN_2_32 +void g_menu_prepend_section (GMenu *menu, + const gchar *label, + GMenuModel *section); +GIO_AVAILABLE_IN_2_32 +void g_menu_append_section (GMenu *menu, + const gchar *label, + GMenuModel *section); + +GIO_AVAILABLE_IN_2_32 +void g_menu_insert_submenu (GMenu *menu, + gint position, + const gchar *label, + GMenuModel *submenu); +GIO_AVAILABLE_IN_2_32 +void g_menu_prepend_submenu (GMenu *menu, + const gchar *label, + GMenuModel *submenu); +GIO_AVAILABLE_IN_2_32 +void g_menu_append_submenu (GMenu *menu, + const gchar *label, + GMenuModel *submenu); + + +GIO_AVAILABLE_IN_2_32 +GType g_menu_item_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_2_32 +GMenuItem * g_menu_item_new (const gchar *label, + const gchar *detailed_action); + +GIO_AVAILABLE_IN_2_34 +GMenuItem * g_menu_item_new_from_model (GMenuModel *model, + gint item_index); + +GIO_AVAILABLE_IN_2_32 +GMenuItem * g_menu_item_new_submenu (const gchar *label, + GMenuModel *submenu); + +GIO_AVAILABLE_IN_2_32 +GMenuItem * g_menu_item_new_section (const gchar *label, + GMenuModel *section); + +GIO_AVAILABLE_IN_2_34 +GVariant * g_menu_item_get_attribute_value (GMenuItem *menu_item, + const gchar *attribute, + const GVariantType *expected_type); +GIO_AVAILABLE_IN_2_34 +gboolean g_menu_item_get_attribute (GMenuItem *menu_item, + const gchar *attribute, + const gchar *format_string, + ...); +GIO_AVAILABLE_IN_2_34 +GMenuModel *g_menu_item_get_link (GMenuItem *menu_item, + const gchar *link); + +GIO_AVAILABLE_IN_2_32 +void g_menu_item_set_attribute_value (GMenuItem *menu_item, + const gchar *attribute, + GVariant *value); +GIO_AVAILABLE_IN_2_32 +void g_menu_item_set_attribute (GMenuItem *menu_item, + const gchar *attribute, + const gchar *format_string, + ...); +GIO_AVAILABLE_IN_2_32 +void g_menu_item_set_link (GMenuItem *menu_item, + const gchar *link, + GMenuModel *model); +GIO_AVAILABLE_IN_2_32 +void g_menu_item_set_label (GMenuItem *menu_item, + const gchar *label); +GIO_AVAILABLE_IN_2_32 +void g_menu_item_set_submenu (GMenuItem *menu_item, + GMenuModel *submenu); +GIO_AVAILABLE_IN_2_32 +void g_menu_item_set_section (GMenuItem *menu_item, + GMenuModel *section); +GIO_AVAILABLE_IN_2_32 +void g_menu_item_set_action_and_target_value (GMenuItem *menu_item, + const gchar *action, + GVariant *target_value); +GIO_AVAILABLE_IN_2_32 +void g_menu_item_set_action_and_target (GMenuItem *menu_item, + const gchar *action, + const gchar *format_string, + ...); +GIO_AVAILABLE_IN_2_32 +void g_menu_item_set_detailed_action (GMenuItem *menu_item, + const gchar *detailed_action); + +GIO_AVAILABLE_IN_2_38 +void g_menu_item_set_icon (GMenuItem *menu_item, + GIcon *icon); + +G_END_DECLS + +#endif /* __G_MENU_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmenuexporter.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmenuexporter.h new file mode 100644 index 0000000..4651aff --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmenuexporter.h @@ -0,0 +1,55 @@ +/* + * Copyright © 2011 Canonical Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Author: Ryan Lortie + */ + +#ifndef __G_MENU_EXPORTER_H__ +#define __G_MENU_EXPORTER_H__ + +#include +#include + +G_BEGIN_DECLS + +/** + * G_MENU_EXPORTER_MAX_SECTION_SIZE: + * + * The maximum number of entries in a menu section supported by + * g_dbus_connection_export_menu_model(). + * + * The exact value of the limit may change in future GLib versions. + * + * Since: 2.76 + */ +#define G_MENU_EXPORTER_MAX_SECTION_SIZE 1000 \ + GIO_AVAILABLE_MACRO_IN_2_76 + +GIO_AVAILABLE_IN_2_32 +guint g_dbus_connection_export_menu_model (GDBusConnection *connection, + const gchar *object_path, + GMenuModel *menu, + GError **error); + +GIO_AVAILABLE_IN_2_32 +void g_dbus_connection_unexport_menu_model (GDBusConnection *connection, + guint export_id); + +G_END_DECLS + +#endif /* __G_MENU_EXPORTER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmenumodel.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmenumodel.h new file mode 100644 index 0000000..0ef7c9d --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmenumodel.h @@ -0,0 +1,307 @@ +/* + * Copyright © 2011 Canonical Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Author: Ryan Lortie + */ + +#ifndef __G_MENU_MODEL_H__ +#define __G_MENU_MODEL_H__ + +#include + +#include + +G_BEGIN_DECLS + +/** + * G_MENU_ATTRIBUTE_ACTION: + * + * The menu item attribute which holds the action name of the item. Action + * names are namespaced with an identifier for the action group in which the + * action resides. For example, "win." for window-specific actions and "app." + * for application-wide actions. + * + * See also g_menu_model_get_item_attribute() and g_menu_item_set_attribute(). + * + * Since: 2.32 + **/ +#define G_MENU_ATTRIBUTE_ACTION "action" + +/** + * G_MENU_ATTRIBUTE_ACTION_NAMESPACE: + * + * The menu item attribute that holds the namespace for all action names in + * menus that are linked from this item. + * + * Since: 2.36 + **/ +#define G_MENU_ATTRIBUTE_ACTION_NAMESPACE "action-namespace" + +/** + * G_MENU_ATTRIBUTE_TARGET: + * + * The menu item attribute which holds the target with which the item's action + * will be activated. + * + * See also g_menu_item_set_action_and_target() + * + * Since: 2.32 + **/ +#define G_MENU_ATTRIBUTE_TARGET "target" + +/** + * G_MENU_ATTRIBUTE_LABEL: + * + * The menu item attribute which holds the label of the item. + * + * Since: 2.32 + **/ +#define G_MENU_ATTRIBUTE_LABEL "label" + +/** + * G_MENU_ATTRIBUTE_ICON: + * + * The menu item attribute which holds the icon of the item. + * + * The icon is stored in the format returned by g_icon_serialize(). + * + * This attribute is intended only to represent 'noun' icons such as + * favicons for a webpage, or application icons. It should not be used + * for 'verbs' (ie: stock icons). + * + * Since: 2.38 + **/ +#define G_MENU_ATTRIBUTE_ICON "icon" + +/** + * G_MENU_LINK_SUBMENU: + * + * The name of the link that associates a menu item with a submenu. + * + * See also g_menu_item_set_link(). + * + * Since: 2.32 + **/ +#define G_MENU_LINK_SUBMENU "submenu" + +/** + * G_MENU_LINK_SECTION: + * + * The name of the link that associates a menu item with a section. The linked + * menu will usually be shown in place of the menu item, using the item's label + * as a header. + * + * See also g_menu_item_set_link(). + * + * Since: 2.32 + **/ +#define G_MENU_LINK_SECTION "section" + +#define G_TYPE_MENU_MODEL (g_menu_model_get_type ()) +#define G_MENU_MODEL(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_MENU_MODEL, GMenuModel)) +#define G_MENU_MODEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_MENU_MODEL, GMenuModelClass)) +#define G_IS_MENU_MODEL(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_MENU_MODEL)) +#define G_IS_MENU_MODEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_MENU_MODEL)) +#define G_MENU_MODEL_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_MENU_MODEL, GMenuModelClass)) + +typedef struct _GMenuModelPrivate GMenuModelPrivate; +typedef struct _GMenuModelClass GMenuModelClass; + +typedef struct _GMenuAttributeIterPrivate GMenuAttributeIterPrivate; +typedef struct _GMenuAttributeIterClass GMenuAttributeIterClass; +typedef struct _GMenuAttributeIter GMenuAttributeIter; + +typedef struct _GMenuLinkIterPrivate GMenuLinkIterPrivate; +typedef struct _GMenuLinkIterClass GMenuLinkIterClass; +typedef struct _GMenuLinkIter GMenuLinkIter; + +struct _GMenuModel +{ + GObject parent_instance; + GMenuModelPrivate *priv; +}; + +/** + * GMenuModelClass::get_item_attributes: + * @model: the #GMenuModel to query + * @item_index: The #GMenuItem to query + * @attributes: (out) (element-type utf8 GLib.Variant): Attributes on the item + * + * Gets all the attributes associated with the item in the menu model. + */ +/** + * GMenuModelClass::get_item_links: + * @model: the #GMenuModel to query + * @item_index: The #GMenuItem to query + * @links: (out) (element-type utf8 Gio.MenuModel): Links from the item + * + * Gets all the links associated with the item in the menu model. + */ +struct _GMenuModelClass +{ + GObjectClass parent_class; + + gboolean (*is_mutable) (GMenuModel *model); + gint (*get_n_items) (GMenuModel *model); + void (*get_item_attributes) (GMenuModel *model, + gint item_index, + GHashTable **attributes); + GMenuAttributeIter * (*iterate_item_attributes) (GMenuModel *model, + gint item_index); + GVariant * (*get_item_attribute_value) (GMenuModel *model, + gint item_index, + const gchar *attribute, + const GVariantType *expected_type); + void (*get_item_links) (GMenuModel *model, + gint item_index, + GHashTable **links); + GMenuLinkIter * (*iterate_item_links) (GMenuModel *model, + gint item_index); + GMenuModel * (*get_item_link) (GMenuModel *model, + gint item_index, + const gchar *link); +}; + +GIO_AVAILABLE_IN_2_32 +GType g_menu_model_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_32 +gboolean g_menu_model_is_mutable (GMenuModel *model); +GIO_AVAILABLE_IN_2_32 +gint g_menu_model_get_n_items (GMenuModel *model); + +GIO_AVAILABLE_IN_2_32 +GMenuAttributeIter * g_menu_model_iterate_item_attributes (GMenuModel *model, + gint item_index); +GIO_AVAILABLE_IN_2_32 +GVariant * g_menu_model_get_item_attribute_value (GMenuModel *model, + gint item_index, + const gchar *attribute, + const GVariantType *expected_type); +GIO_AVAILABLE_IN_2_32 +gboolean g_menu_model_get_item_attribute (GMenuModel *model, + gint item_index, + const gchar *attribute, + const gchar *format_string, + ...); +GIO_AVAILABLE_IN_2_32 +GMenuLinkIter * g_menu_model_iterate_item_links (GMenuModel *model, + gint item_index); +GIO_AVAILABLE_IN_2_32 +GMenuModel * g_menu_model_get_item_link (GMenuModel *model, + gint item_index, + const gchar *link); + +GIO_AVAILABLE_IN_2_32 +void g_menu_model_items_changed (GMenuModel *model, + gint position, + gint removed, + gint added); + + +#define G_TYPE_MENU_ATTRIBUTE_ITER (g_menu_attribute_iter_get_type ()) +#define G_MENU_ATTRIBUTE_ITER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_MENU_ATTRIBUTE_ITER, GMenuAttributeIter)) +#define G_MENU_ATTRIBUTE_ITER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_MENU_ATTRIBUTE_ITER, GMenuAttributeIterClass)) +#define G_IS_MENU_ATTRIBUTE_ITER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_MENU_ATTRIBUTE_ITER)) +#define G_IS_MENU_ATTRIBUTE_ITER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_MENU_ATTRIBUTE_ITER)) +#define G_MENU_ATTRIBUTE_ITER_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_MENU_ATTRIBUTE_ITER, GMenuAttributeIterClass)) + +struct _GMenuAttributeIter +{ + GObject parent_instance; + GMenuAttributeIterPrivate *priv; +}; + +struct _GMenuAttributeIterClass +{ + GObjectClass parent_class; + + gboolean (*get_next) (GMenuAttributeIter *iter, + const gchar **out_name, + GVariant **value); +}; + +GIO_AVAILABLE_IN_2_32 +GType g_menu_attribute_iter_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_32 +gboolean g_menu_attribute_iter_get_next (GMenuAttributeIter *iter, + const gchar **out_name, + GVariant **value); +GIO_AVAILABLE_IN_2_32 +gboolean g_menu_attribute_iter_next (GMenuAttributeIter *iter); +GIO_AVAILABLE_IN_2_32 +const gchar * g_menu_attribute_iter_get_name (GMenuAttributeIter *iter); +GIO_AVAILABLE_IN_2_32 +GVariant * g_menu_attribute_iter_get_value (GMenuAttributeIter *iter); + + +#define G_TYPE_MENU_LINK_ITER (g_menu_link_iter_get_type ()) +#define G_MENU_LINK_ITER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_MENU_LINK_ITER, GMenuLinkIter)) +#define G_MENU_LINK_ITER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_MENU_LINK_ITER, GMenuLinkIterClass)) +#define G_IS_MENU_LINK_ITER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_MENU_LINK_ITER)) +#define G_IS_MENU_LINK_ITER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_MENU_LINK_ITER)) +#define G_MENU_LINK_ITER_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_MENU_LINK_ITER, GMenuLinkIterClass)) + +struct _GMenuLinkIter +{ + GObject parent_instance; + GMenuLinkIterPrivate *priv; +}; + +struct _GMenuLinkIterClass +{ + GObjectClass parent_class; + + gboolean (*get_next) (GMenuLinkIter *iter, + const gchar **out_link, + GMenuModel **value); +}; + +GIO_AVAILABLE_IN_2_32 +GType g_menu_link_iter_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_32 +gboolean g_menu_link_iter_get_next (GMenuLinkIter *iter, + const gchar **out_link, + GMenuModel **value); +GIO_AVAILABLE_IN_2_32 +gboolean g_menu_link_iter_next (GMenuLinkIter *iter); +GIO_AVAILABLE_IN_2_32 +const gchar * g_menu_link_iter_get_name (GMenuLinkIter *iter); +GIO_AVAILABLE_IN_2_32 +GMenuModel * g_menu_link_iter_get_value (GMenuLinkIter *iter); + +G_END_DECLS + +#endif /* __G_MENU_MODEL_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmount.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmount.h new file mode 100644 index 0000000..c17f79b --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmount.h @@ -0,0 +1,278 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2008 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + * David Zeuthen + */ + +#ifndef __G_MOUNT_H__ +#define __G_MOUNT_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_MOUNT (g_mount_get_type ()) +#define G_MOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_MOUNT, GMount)) +#define G_IS_MOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_MOUNT)) +#define G_MOUNT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_MOUNT, GMountIface)) + +typedef struct _GMountIface GMountIface; + +/** + * GMountIface: + * @g_iface: The parent interface. + * @changed: Changed signal that is emitted when the mount's state has changed. + * @unmounted: The unmounted signal that is emitted when the #GMount have been unmounted. If the recipient is holding references to the object they should release them so the object can be finalized. + * @pre_unmount: The ::pre-unmount signal that is emitted when the #GMount will soon be emitted. If the recipient is somehow holding the mount open by keeping an open file on it it should close the file. + * @get_root: Gets a #GFile to the root directory of the #GMount. + * @get_name: Gets a string containing the name of the #GMount. + * @get_icon: Gets a #GIcon for the #GMount. + * @get_uuid: Gets the UUID for the #GMount. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available. + * @get_volume: Gets a #GVolume the mount is located on. Returns %NULL if the #GMount is not associated with a #GVolume. + * @get_drive: Gets a #GDrive the volume of the mount is located on. Returns %NULL if the #GMount is not associated with a #GDrive or a #GVolume. This is convenience method for getting the #GVolume and using that to get the #GDrive. + * @can_unmount: Checks if a #GMount can be unmounted. + * @can_eject: Checks if a #GMount can be ejected. + * @unmount: Starts unmounting a #GMount. + * @unmount_finish: Finishes an unmounting operation. + * @eject: Starts ejecting a #GMount. + * @eject_finish: Finishes an eject operation. + * @remount: Starts remounting a #GMount. + * @remount_finish: Finishes a remounting operation. + * @guess_content_type: Starts guessing the type of the content of a #GMount. + * See g_mount_guess_content_type() for more information on content + * type guessing. This operation was added in 2.18. + * @guess_content_type_finish: Finishes a content type guessing operation. Added in 2.18. + * @guess_content_type_sync: Synchronous variant of @guess_content_type. Added in 2.18 + * @unmount_with_operation: Starts unmounting a #GMount using a #GMountOperation. Since 2.22. + * @unmount_with_operation_finish: Finishes an unmounting operation using a #GMountOperation. Since 2.22. + * @eject_with_operation: Starts ejecting a #GMount using a #GMountOperation. Since 2.22. + * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22. + * @get_default_location: Gets a #GFile indication a start location that can be use as the entry point for this mount. Since 2.24. + * @get_sort_key: Gets a key used for sorting #GMount instance or %NULL if no such key exists. Since 2.32. + * @get_symbolic_icon: Gets a symbolic #GIcon for the #GMount. Since 2.34. + * + * Interface for implementing operations for mounts. + **/ +struct _GMountIface +{ + GTypeInterface g_iface; + + /* signals */ + + void (* changed) (GMount *mount); + void (* unmounted) (GMount *mount); + + /* Virtual Table */ + + GFile * (* get_root) (GMount *mount); + char * (* get_name) (GMount *mount); + GIcon * (* get_icon) (GMount *mount); + char * (* get_uuid) (GMount *mount); + GVolume * (* get_volume) (GMount *mount); + GDrive * (* get_drive) (GMount *mount); + gboolean (* can_unmount) (GMount *mount); + gboolean (* can_eject) (GMount *mount); + + void (* unmount) (GMount *mount, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* unmount_finish) (GMount *mount, + GAsyncResult *result, + GError **error); + + void (* eject) (GMount *mount, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* eject_finish) (GMount *mount, + GAsyncResult *result, + GError **error); + + void (* remount) (GMount *mount, + GMountMountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* remount_finish) (GMount *mount, + GAsyncResult *result, + GError **error); + + void (* guess_content_type) (GMount *mount, + gboolean force_rescan, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gchar ** (* guess_content_type_finish) (GMount *mount, + GAsyncResult *result, + GError **error); + gchar ** (* guess_content_type_sync) (GMount *mount, + gboolean force_rescan, + GCancellable *cancellable, + GError **error); + + /* Signal, not VFunc */ + void (* pre_unmount) (GMount *mount); + + void (* unmount_with_operation) (GMount *mount, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* unmount_with_operation_finish) (GMount *mount, + GAsyncResult *result, + GError **error); + + void (* eject_with_operation) (GMount *mount, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* eject_with_operation_finish) (GMount *mount, + GAsyncResult *result, + GError **error); + GFile * (* get_default_location) (GMount *mount); + + const gchar * (* get_sort_key) (GMount *mount); + GIcon * (* get_symbolic_icon) (GMount *mount); +}; + +GIO_AVAILABLE_IN_ALL +GType g_mount_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GFile * g_mount_get_root (GMount *mount); +GIO_AVAILABLE_IN_ALL +GFile * g_mount_get_default_location (GMount *mount); +GIO_AVAILABLE_IN_ALL +char * g_mount_get_name (GMount *mount); +GIO_AVAILABLE_IN_ALL +GIcon * g_mount_get_icon (GMount *mount); +GIO_AVAILABLE_IN_ALL +GIcon * g_mount_get_symbolic_icon (GMount *mount); +GIO_AVAILABLE_IN_ALL +char * g_mount_get_uuid (GMount *mount); +GIO_AVAILABLE_IN_ALL +GVolume * g_mount_get_volume (GMount *mount); +GIO_AVAILABLE_IN_ALL +GDrive * g_mount_get_drive (GMount *mount); +GIO_AVAILABLE_IN_ALL +gboolean g_mount_can_unmount (GMount *mount); +GIO_AVAILABLE_IN_ALL +gboolean g_mount_can_eject (GMount *mount); + +GIO_DEPRECATED_FOR(g_mount_unmount_with_operation) +void g_mount_unmount (GMount *mount, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_DEPRECATED_FOR(g_mount_unmount_with_operation_finish) +gboolean g_mount_unmount_finish (GMount *mount, + GAsyncResult *result, + GError **error); + +GIO_DEPRECATED_FOR(g_mount_eject_with_operation) +void g_mount_eject (GMount *mount, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_DEPRECATED_FOR(g_mount_eject_with_operation_finish) +gboolean g_mount_eject_finish (GMount *mount, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_mount_remount (GMount *mount, + GMountMountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_mount_remount_finish (GMount *mount, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_mount_guess_content_type (GMount *mount, + gboolean force_rescan, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gchar ** g_mount_guess_content_type_finish (GMount *mount, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +gchar ** g_mount_guess_content_type_sync (GMount *mount, + gboolean force_rescan, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_mount_is_shadowed (GMount *mount); +GIO_AVAILABLE_IN_ALL +void g_mount_shadow (GMount *mount); +GIO_AVAILABLE_IN_ALL +void g_mount_unshadow (GMount *mount); + +GIO_AVAILABLE_IN_ALL +void g_mount_unmount_with_operation (GMount *mount, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_mount_unmount_with_operation_finish (GMount *mount, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_mount_eject_with_operation (GMount *mount, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_mount_eject_with_operation_finish (GMount *mount, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +const gchar *g_mount_get_sort_key (GMount *mount); + +G_END_DECLS + +#endif /* __G_MOUNT_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmountoperation.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmountoperation.h new file mode 100644 index 0000000..b763f0d --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gmountoperation.h @@ -0,0 +1,179 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_MOUNT_OPERATION_H__ +#define __G_MOUNT_OPERATION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_MOUNT_OPERATION (g_mount_operation_get_type ()) +#define G_MOUNT_OPERATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_MOUNT_OPERATION, GMountOperation)) +#define G_MOUNT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_MOUNT_OPERATION, GMountOperationClass)) +#define G_IS_MOUNT_OPERATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_MOUNT_OPERATION)) +#define G_IS_MOUNT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_MOUNT_OPERATION)) +#define G_MOUNT_OPERATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_MOUNT_OPERATION, GMountOperationClass)) + +/** + * GMountOperation: + * + * Class for providing authentication methods for mounting operations, + * such as mounting a file locally, or authenticating with a server. + **/ +typedef struct _GMountOperationClass GMountOperationClass; +typedef struct _GMountOperationPrivate GMountOperationPrivate; + +struct _GMountOperation +{ + GObject parent_instance; + + GMountOperationPrivate *priv; +}; + +struct _GMountOperationClass +{ + GObjectClass parent_class; + + /* signals: */ + + void (* ask_password) (GMountOperation *op, + const char *message, + const char *default_user, + const char *default_domain, + GAskPasswordFlags flags); + + /** + * GMountOperationClass::ask_question: + * @op: a #GMountOperation + * @message: string containing a message to display to the user + * @choices: (array zero-terminated=1) (element-type utf8): an array of + * strings for each possible choice + * + * Virtual implementation of #GMountOperation::ask-question. + */ + void (* ask_question) (GMountOperation *op, + const char *message, + const char *choices[]); + + void (* reply) (GMountOperation *op, + GMountOperationResult result); + + void (* aborted) (GMountOperation *op); + + /** + * GMountOperationClass::show_processes: + * @op: a #GMountOperation + * @message: string containing a message to display to the user + * @processes: (element-type GPid): an array of #GPid for processes blocking + * the operation + * @choices: (array zero-terminated=1) (element-type utf8): an array of + * strings for each possible choice + * + * Virtual implementation of #GMountOperation::show-processes. + * + * Since: 2.22 + */ + void (* show_processes) (GMountOperation *op, + const gchar *message, + GArray *processes, + const gchar *choices[]); + + void (* show_unmount_progress) (GMountOperation *op, + const gchar *message, + gint64 time_left, + gint64 bytes_left); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); + void (*_g_reserved7) (void); + void (*_g_reserved8) (void); + void (*_g_reserved9) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_mount_operation_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GMountOperation * g_mount_operation_new (void); + +GIO_AVAILABLE_IN_ALL +const char * g_mount_operation_get_username (GMountOperation *op); +GIO_AVAILABLE_IN_ALL +void g_mount_operation_set_username (GMountOperation *op, + const char *username); +GIO_AVAILABLE_IN_ALL +const char * g_mount_operation_get_password (GMountOperation *op); +GIO_AVAILABLE_IN_ALL +void g_mount_operation_set_password (GMountOperation *op, + const char *password); +GIO_AVAILABLE_IN_ALL +gboolean g_mount_operation_get_anonymous (GMountOperation *op); +GIO_AVAILABLE_IN_ALL +void g_mount_operation_set_anonymous (GMountOperation *op, + gboolean anonymous); +GIO_AVAILABLE_IN_ALL +const char * g_mount_operation_get_domain (GMountOperation *op); +GIO_AVAILABLE_IN_ALL +void g_mount_operation_set_domain (GMountOperation *op, + const char *domain); +GIO_AVAILABLE_IN_ALL +GPasswordSave g_mount_operation_get_password_save (GMountOperation *op); +GIO_AVAILABLE_IN_ALL +void g_mount_operation_set_password_save (GMountOperation *op, + GPasswordSave save); +GIO_AVAILABLE_IN_ALL +int g_mount_operation_get_choice (GMountOperation *op); +GIO_AVAILABLE_IN_ALL +void g_mount_operation_set_choice (GMountOperation *op, + int choice); +GIO_AVAILABLE_IN_ALL +void g_mount_operation_reply (GMountOperation *op, + GMountOperationResult result); +GIO_AVAILABLE_IN_2_58 +gboolean g_mount_operation_get_is_tcrypt_hidden_volume (GMountOperation *op); +GIO_AVAILABLE_IN_2_58 +void g_mount_operation_set_is_tcrypt_hidden_volume (GMountOperation *op, + gboolean hidden_volume); +GIO_AVAILABLE_IN_2_58 +gboolean g_mount_operation_get_is_tcrypt_system_volume (GMountOperation *op); +GIO_AVAILABLE_IN_2_58 +void g_mount_operation_set_is_tcrypt_system_volume (GMountOperation *op, + gboolean system_volume); +GIO_AVAILABLE_IN_2_58 +guint g_mount_operation_get_pim (GMountOperation *op); +GIO_AVAILABLE_IN_2_58 +void g_mount_operation_set_pim (GMountOperation *op, + guint pim); + +G_END_DECLS + +#endif /* __G_MOUNT_OPERATION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnativesocketaddress.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnativesocketaddress.h new file mode 100644 index 0000000..cd174ec --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnativesocketaddress.h @@ -0,0 +1,67 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Christian Kellner + * Samuel Cormier-Iijima + */ + +#ifndef __G_NATIVE_SOCKET_ADDRESS_H__ +#define __G_NATIVE_SOCKET_ADDRESS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_NATIVE_SOCKET_ADDRESS (g_native_socket_address_get_type ()) +#define G_NATIVE_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NATIVE_SOCKET_ADDRESS, GNativeSocketAddress)) +#define G_NATIVE_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_NATIVE_SOCKET_ADDRESS, GNativeSocketAddressClass)) +#define G_IS_NATIVE_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NATIVE_SOCKET_ADDRESS)) +#define G_IS_NATIVE_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_NATIVE_SOCKET_ADDRESS)) +#define G_NATIVE_SOCKET_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_NATIVE_SOCKET_ADDRESS, GNativeSocketAddressClass)) + +typedef struct _GNativeSocketAddressClass GNativeSocketAddressClass; +typedef struct _GNativeSocketAddressPrivate GNativeSocketAddressPrivate; + +struct _GNativeSocketAddress +{ + GSocketAddress parent_instance; + + /*< private >*/ + GNativeSocketAddressPrivate *priv; +}; + +struct _GNativeSocketAddressClass +{ + GSocketAddressClass parent_class; +}; + +GIO_AVAILABLE_IN_2_46 +GType g_native_socket_address_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_46 +GSocketAddress *g_native_socket_address_new (gpointer native, + gsize len); + +G_END_DECLS + +#endif /* __G_NATIVE_SOCKET_ADDRESS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnativevolumemonitor.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnativevolumemonitor.h new file mode 100644 index 0000000..9cea184 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnativevolumemonitor.h @@ -0,0 +1,63 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_NATIVE_VOLUME_MONITOR_H__ +#define __G_NATIVE_VOLUME_MONITOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_NATIVE_VOLUME_MONITOR (g_native_volume_monitor_get_type ()) +#define G_NATIVE_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NATIVE_VOLUME_MONITOR, GNativeVolumeMonitor)) +#define G_NATIVE_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_NATIVE_VOLUME_MONITOR, GNativeVolumeMonitorClass)) +#define G_IS_NATIVE_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NATIVE_VOLUME_MONITOR)) +#define G_IS_NATIVE_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_NATIVE_VOLUME_MONITOR)) + +#define G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME "gio-native-volume-monitor" + +typedef struct _GNativeVolumeMonitor GNativeVolumeMonitor; +typedef struct _GNativeVolumeMonitorClass GNativeVolumeMonitorClass; + +struct _GNativeVolumeMonitor +{ + GVolumeMonitor parent_instance; +}; + +struct _GNativeVolumeMonitorClass +{ + GVolumeMonitorClass parent_class; + + GMount * (* get_mount_for_mount_path) (const char *mount_path, + GCancellable *cancellable); +}; + +GIO_AVAILABLE_IN_ALL +GType g_native_volume_monitor_get_type (void) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __G_NATIVE_VOLUME_MONITOR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnetworkaddress.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnetworkaddress.h new file mode 100644 index 0000000..0a12d85 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnetworkaddress.h @@ -0,0 +1,82 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_NETWORK_ADDRESS_H__ +#define __G_NETWORK_ADDRESS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_NETWORK_ADDRESS (g_network_address_get_type ()) +#define G_NETWORK_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NETWORK_ADDRESS, GNetworkAddress)) +#define G_NETWORK_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_NETWORK_ADDRESS, GNetworkAddressClass)) +#define G_IS_NETWORK_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NETWORK_ADDRESS)) +#define G_IS_NETWORK_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_NETWORK_ADDRESS)) +#define G_NETWORK_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_NETWORK_ADDRESS, GNetworkAddressClass)) + +typedef struct _GNetworkAddressClass GNetworkAddressClass; +typedef struct _GNetworkAddressPrivate GNetworkAddressPrivate; + +struct _GNetworkAddress +{ + GObject parent_instance; + + /*< private >*/ + GNetworkAddressPrivate *priv; +}; + +struct _GNetworkAddressClass +{ + GObjectClass parent_class; + +}; + +GIO_AVAILABLE_IN_ALL +GType g_network_address_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GSocketConnectable *g_network_address_new (const gchar *hostname, + guint16 port); +GIO_AVAILABLE_IN_2_44 +GSocketConnectable *g_network_address_new_loopback (guint16 port); +GIO_AVAILABLE_IN_ALL +GSocketConnectable *g_network_address_parse (const gchar *host_and_port, + guint16 default_port, + GError **error); +GIO_AVAILABLE_IN_ALL +GSocketConnectable *g_network_address_parse_uri (const gchar *uri, + guint16 default_port, + GError **error); +GIO_AVAILABLE_IN_ALL +const gchar *g_network_address_get_hostname (GNetworkAddress *addr); +GIO_AVAILABLE_IN_ALL +guint16 g_network_address_get_port (GNetworkAddress *addr); +GIO_AVAILABLE_IN_ALL +const gchar *g_network_address_get_scheme (GNetworkAddress *addr); + + +G_END_DECLS + +#endif /* __G_NETWORK_ADDRESS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnetworking.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnetworking.h new file mode 100644 index 0000000..d1918b9 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnetworking.h @@ -0,0 +1,81 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008-2011 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef __G_NETWORKING_H__ +#define __G_NETWORKING_H__ + +#include +#include + +#ifdef G_OS_WIN32 +#include +#include +#include +#include +#include +#include +#undef interface + +#else /* !G_OS_WIN32 */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#ifndef T_SRV +#define T_SRV 33 +#endif + +#ifndef _PATH_RESCONF +#define _PATH_RESCONF "/etc/resolv.conf" +#endif + +#ifndef CMSG_LEN +/* CMSG_LEN and CMSG_SPACE are defined by RFC 2292, but missing on + * some older platforms. + */ +#define CMSG_LEN(len) ((size_t)CMSG_DATA((struct cmsghdr *)NULL) + (len)) + +/* CMSG_SPACE must add at least as much padding as CMSG_NXTHDR() + * adds. We overestimate here. + */ +#define GLIB_ALIGN_TO_SIZEOF(len, obj) (((len) + sizeof (obj) - 1) & ~(sizeof (obj) - 1)) +#define CMSG_SPACE(len) GLIB_ALIGN_TO_SIZEOF (CMSG_LEN (len), struct cmsghdr) +#endif +#endif + +G_BEGIN_DECLS + +GIO_AVAILABLE_IN_2_36 +void g_networking_init (void); + +G_END_DECLS + +#endif /* __G_NETWORKING_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnetworkmonitor.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnetworkmonitor.h new file mode 100644 index 0000000..8e6e903 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnetworkmonitor.h @@ -0,0 +1,101 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright 2011 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_NETWORK_MONITOR_H__ +#define __G_NETWORK_MONITOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * G_NETWORK_MONITOR_EXTENSION_POINT_NAME: + * + * Extension point for network status monitoring functionality. + * See [Extending GIO][extending-gio]. + * + * Since: 2.30 + */ +#define G_NETWORK_MONITOR_EXTENSION_POINT_NAME "gio-network-monitor" + +#define G_TYPE_NETWORK_MONITOR (g_network_monitor_get_type ()) +#define G_NETWORK_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NETWORK_MONITOR, GNetworkMonitor)) +#define G_IS_NETWORK_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NETWORK_MONITOR)) +#define G_NETWORK_MONITOR_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_NETWORK_MONITOR, GNetworkMonitorInterface)) + +typedef struct _GNetworkMonitorInterface GNetworkMonitorInterface; + +struct _GNetworkMonitorInterface { + GTypeInterface g_iface; + + void (*network_changed) (GNetworkMonitor *monitor, + gboolean network_available); + + gboolean (*can_reach) (GNetworkMonitor *monitor, + GSocketConnectable *connectable, + GCancellable *cancellable, + GError **error); + void (*can_reach_async) (GNetworkMonitor *monitor, + GSocketConnectable *connectable, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*can_reach_finish) (GNetworkMonitor *monitor, + GAsyncResult *result, + GError **error); +}; + +GIO_AVAILABLE_IN_2_32 +GType g_network_monitor_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_2_32 +GNetworkMonitor *g_network_monitor_get_default (void); + +GIO_AVAILABLE_IN_2_32 +gboolean g_network_monitor_get_network_available (GNetworkMonitor *monitor); + +GIO_AVAILABLE_IN_2_46 +gboolean g_network_monitor_get_network_metered (GNetworkMonitor *monitor); + +GIO_AVAILABLE_IN_2_44 +GNetworkConnectivity g_network_monitor_get_connectivity (GNetworkMonitor *monitor); + +GIO_AVAILABLE_IN_2_32 +gboolean g_network_monitor_can_reach (GNetworkMonitor *monitor, + GSocketConnectable *connectable, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_32 +void g_network_monitor_can_reach_async (GNetworkMonitor *monitor, + GSocketConnectable *connectable, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_32 +gboolean g_network_monitor_can_reach_finish (GNetworkMonitor *monitor, + GAsyncResult *result, + GError **error); + +G_END_DECLS + +#endif /* __G_NETWORK_MONITOR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnetworkservice.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnetworkservice.h new file mode 100644 index 0000000..ac00986 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnetworkservice.h @@ -0,0 +1,77 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_NETWORK_SERVICE_H__ +#define __G_NETWORK_SERVICE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_NETWORK_SERVICE (g_network_service_get_type ()) +#define G_NETWORK_SERVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NETWORK_SERVICE, GNetworkService)) +#define G_NETWORK_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_NETWORK_SERVICE, GNetworkServiceClass)) +#define G_IS_NETWORK_SERVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NETWORK_SERVICE)) +#define G_IS_NETWORK_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_NETWORK_SERVICE)) +#define G_NETWORK_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_NETWORK_SERVICE, GNetworkServiceClass)) + +typedef struct _GNetworkServiceClass GNetworkServiceClass; +typedef struct _GNetworkServicePrivate GNetworkServicePrivate; + +struct _GNetworkService +{ + GObject parent_instance; + + /*< private >*/ + GNetworkServicePrivate *priv; +}; + +struct _GNetworkServiceClass +{ + GObjectClass parent_class; + +}; + +GIO_AVAILABLE_IN_ALL +GType g_network_service_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GSocketConnectable *g_network_service_new (const gchar *service, + const gchar *protocol, + const gchar *domain); + +GIO_AVAILABLE_IN_ALL +const gchar *g_network_service_get_service (GNetworkService *srv); +GIO_AVAILABLE_IN_ALL +const gchar *g_network_service_get_protocol (GNetworkService *srv); +GIO_AVAILABLE_IN_ALL +const gchar *g_network_service_get_domain (GNetworkService *srv); +GIO_AVAILABLE_IN_ALL +const gchar *g_network_service_get_scheme (GNetworkService *srv); +GIO_AVAILABLE_IN_ALL +void g_network_service_set_scheme (GNetworkService *srv, const gchar *scheme); + +G_END_DECLS + +#endif /* __G_NETWORK_SERVICE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnotification.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnotification.h new file mode 100644 index 0000000..cef00a7 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gnotification.h @@ -0,0 +1,103 @@ +/* + * Copyright © 2013 Lars Uebernickel + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Lars Uebernickel + */ + +#ifndef __G_NOTIFICATION_H__ +#define __G_NOTIFICATION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +#define G_TYPE_NOTIFICATION (g_notification_get_type ()) +#define G_NOTIFICATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NOTIFICATION, GNotification)) +#define G_IS_NOTIFICATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NOTIFICATION)) + +GIO_AVAILABLE_IN_2_40 +GType g_notification_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_40 +GNotification * g_notification_new (const gchar *title); + +GIO_AVAILABLE_IN_2_40 +void g_notification_set_title (GNotification *notification, + const gchar *title); + +GIO_AVAILABLE_IN_2_40 +void g_notification_set_body (GNotification *notification, + const gchar *body); + +GIO_AVAILABLE_IN_2_40 +void g_notification_set_icon (GNotification *notification, + GIcon *icon); + +GIO_DEPRECATED_IN_2_42_FOR(g_notification_set_priority) +void g_notification_set_urgent (GNotification *notification, + gboolean urgent); + +GIO_AVAILABLE_IN_2_42 +void g_notification_set_priority (GNotification *notification, + GNotificationPriority priority); + +GIO_AVAILABLE_IN_2_70 +void g_notification_set_category (GNotification *notification, + const gchar *category); + +GIO_AVAILABLE_IN_2_40 +void g_notification_add_button (GNotification *notification, + const gchar *label, + const gchar *detailed_action); + +GIO_AVAILABLE_IN_2_40 +void g_notification_add_button_with_target (GNotification *notification, + const gchar *label, + const gchar *action, + const gchar *target_format, + ...); + +GIO_AVAILABLE_IN_2_40 +void g_notification_add_button_with_target_value (GNotification *notification, + const gchar *label, + const gchar *action, + GVariant *target); + +GIO_AVAILABLE_IN_2_40 +void g_notification_set_default_action (GNotification *notification, + const gchar *detailed_action); + +GIO_AVAILABLE_IN_2_40 +void g_notification_set_default_action_and_target (GNotification *notification, + const gchar *action, + const gchar *target_format, + ...); + +GIO_AVAILABLE_IN_2_40 +void g_notification_set_default_action_and_target_value (GNotification *notification, + const gchar *action, + GVariant *target); + +G_END_DECLS + +#endif diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gosxappinfo.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gosxappinfo.h new file mode 100644 index 0000000..b029853 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gosxappinfo.h @@ -0,0 +1,56 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2014 Patrick Griffis + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + */ + +#ifndef __G_OSX_APP_INFO_H__ +#define __G_OSX_APP_INFO_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_OSX_APP_INFO (g_osx_app_info_get_type ()) +#define G_OSX_APP_INFO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_OSX_APP_INFO, GOsxAppInfo)) +#define G_OSX_APP_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_OSX_APP_INFO, GOsxAppInfoClass)) +#define G_IS_OSX_APP_INFO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_OSX_APP_INFO)) +#define G_IS_OSX_APP_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_OSX_APP_INFO)) +#define G_OSX_APP_INFO_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_OSX_APP_INFO, GOsxAppInfoClass)) + +typedef struct _GOsxAppInfo GOsxAppInfo; +typedef struct _GOsxAppInfoClass GOsxAppInfoClass; + +struct _GOsxAppInfoClass +{ + GObjectClass parent_class; +}; + +GIO_AVAILABLE_IN_2_52 +GType g_osx_app_info_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_52 +const char *g_osx_app_info_get_filename (GOsxAppInfo *info); + +GIO_AVAILABLE_IN_2_52 +GList * g_osx_app_info_get_all_for_scheme (const gchar *scheme); + +G_END_DECLS + + +#endif /* __G_OSX_APP_INFO_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/goutputstream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/goutputstream.h new file mode 100644 index 0000000..b5fafe9 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/goutputstream.h @@ -0,0 +1,334 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_OUTPUT_STREAM_H__ +#define __G_OUTPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_OUTPUT_STREAM (g_output_stream_get_type ()) +#define G_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_OUTPUT_STREAM, GOutputStream)) +#define G_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_OUTPUT_STREAM, GOutputStreamClass)) +#define G_IS_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_OUTPUT_STREAM)) +#define G_IS_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_OUTPUT_STREAM)) +#define G_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_OUTPUT_STREAM, GOutputStreamClass)) + +/** + * GOutputStream: + * + * Base class for writing output. + * + * All classes derived from GOutputStream should implement synchronous + * writing, splicing, flushing and closing streams, but may implement + * asynchronous versions. + **/ +typedef struct _GOutputStreamClass GOutputStreamClass; +typedef struct _GOutputStreamPrivate GOutputStreamPrivate; + +struct _GOutputStream +{ + GObject parent_instance; + + /*< private >*/ + GOutputStreamPrivate *priv; +}; + + +struct _GOutputStreamClass +{ + GObjectClass parent_class; + + /* Sync ops: */ + + gssize (* write_fn) (GOutputStream *stream, + const void *buffer, + gsize count, + GCancellable *cancellable, + GError **error); + gssize (* splice) (GOutputStream *stream, + GInputStream *source, + GOutputStreamSpliceFlags flags, + GCancellable *cancellable, + GError **error); + gboolean (* flush) (GOutputStream *stream, + GCancellable *cancellable, + GError **error); + gboolean (* close_fn) (GOutputStream *stream, + GCancellable *cancellable, + GError **error); + + /* Async ops: (optional in derived classes) */ + + void (* write_async) (GOutputStream *stream, + const void *buffer, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gssize (* write_finish) (GOutputStream *stream, + GAsyncResult *result, + GError **error); + void (* splice_async) (GOutputStream *stream, + GInputStream *source, + GOutputStreamSpliceFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gssize (* splice_finish) (GOutputStream *stream, + GAsyncResult *result, + GError **error); + void (* flush_async) (GOutputStream *stream, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* flush_finish) (GOutputStream *stream, + GAsyncResult *result, + GError **error); + void (* close_async) (GOutputStream *stream, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* close_finish) (GOutputStream *stream, + GAsyncResult *result, + GError **error); + + gboolean (* writev_fn) (GOutputStream *stream, + const GOutputVector *vectors, + gsize n_vectors, + gsize *bytes_written, + GCancellable *cancellable, + GError **error); + + void (* writev_async) (GOutputStream *stream, + const GOutputVector *vectors, + gsize n_vectors, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + gboolean (* writev_finish) (GOutputStream *stream, + GAsyncResult *result, + gsize *bytes_written, + GError **error); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); + void (*_g_reserved7) (void); + void (*_g_reserved8) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_output_stream_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +gssize g_output_stream_write (GOutputStream *stream, + const void *buffer, + gsize count, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_output_stream_write_all (GOutputStream *stream, + const void *buffer, + gsize count, + gsize *bytes_written, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_60 +gboolean g_output_stream_writev (GOutputStream *stream, + const GOutputVector *vectors, + gsize n_vectors, + gsize *bytes_written, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_60 +gboolean g_output_stream_writev_all (GOutputStream *stream, + GOutputVector *vectors, + gsize n_vectors, + gsize *bytes_written, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_40 +gboolean g_output_stream_printf (GOutputStream *stream, + gsize *bytes_written, + GCancellable *cancellable, + GError **error, + const gchar *format, + ...) G_GNUC_PRINTF (5, 6); +GIO_AVAILABLE_IN_2_40 +gboolean g_output_stream_vprintf (GOutputStream *stream, + gsize *bytes_written, + GCancellable *cancellable, + GError **error, + const gchar *format, + va_list args) G_GNUC_PRINTF (5, 0); +GIO_AVAILABLE_IN_2_34 +gssize g_output_stream_write_bytes (GOutputStream *stream, + GBytes *bytes, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gssize g_output_stream_splice (GOutputStream *stream, + GInputStream *source, + GOutputStreamSpliceFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_output_stream_flush (GOutputStream *stream, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_output_stream_close (GOutputStream *stream, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_output_stream_write_async (GOutputStream *stream, + const void *buffer, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gssize g_output_stream_write_finish (GOutputStream *stream, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_2_44 +void g_output_stream_write_all_async (GOutputStream *stream, + const void *buffer, + gsize count, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_2_44 +gboolean g_output_stream_write_all_finish (GOutputStream *stream, + GAsyncResult *result, + gsize *bytes_written, + GError **error); + +GIO_AVAILABLE_IN_2_60 +void g_output_stream_writev_async (GOutputStream *stream, + const GOutputVector *vectors, + gsize n_vectors, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_60 +gboolean g_output_stream_writev_finish (GOutputStream *stream, + GAsyncResult *result, + gsize *bytes_written, + GError **error); + +GIO_AVAILABLE_IN_2_60 +void g_output_stream_writev_all_async (GOutputStream *stream, + GOutputVector *vectors, + gsize n_vectors, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_2_60 +gboolean g_output_stream_writev_all_finish (GOutputStream *stream, + GAsyncResult *result, + gsize *bytes_written, + GError **error); + +GIO_AVAILABLE_IN_2_34 +void g_output_stream_write_bytes_async (GOutputStream *stream, + GBytes *bytes, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_34 +gssize g_output_stream_write_bytes_finish (GOutputStream *stream, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_output_stream_splice_async (GOutputStream *stream, + GInputStream *source, + GOutputStreamSpliceFlags flags, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gssize g_output_stream_splice_finish (GOutputStream *stream, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_output_stream_flush_async (GOutputStream *stream, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_output_stream_flush_finish (GOutputStream *stream, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_output_stream_close_async (GOutputStream *stream, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_output_stream_close_finish (GOutputStream *stream, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_output_stream_is_closed (GOutputStream *stream); +GIO_AVAILABLE_IN_ALL +gboolean g_output_stream_is_closing (GOutputStream *stream); +GIO_AVAILABLE_IN_ALL +gboolean g_output_stream_has_pending (GOutputStream *stream); +GIO_AVAILABLE_IN_ALL +gboolean g_output_stream_set_pending (GOutputStream *stream, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_output_stream_clear_pending (GOutputStream *stream); + + +G_END_DECLS + +#endif /* __G_OUTPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpermission.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpermission.h new file mode 100644 index 0000000..828f642 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpermission.h @@ -0,0 +1,129 @@ +/* + * Copyright © 2010 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Author: Ryan Lortie + */ + +#ifndef __G_PERMISSION_H__ +#define __G_PERMISSION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_PERMISSION (g_permission_get_type ()) +#define G_PERMISSION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_PERMISSION, GPermission)) +#define G_PERMISSION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_PERMISSION, GPermissionClass)) +#define G_IS_PERMISSION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_PERMISSION)) +#define G_IS_PERMISSION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_PERMISSION)) +#define G_PERMISSION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_PERMISSION, GPermissionClass)) + +typedef struct _GPermissionPrivate GPermissionPrivate; +typedef struct _GPermissionClass GPermissionClass; + +struct _GPermission +{ + GObject parent_instance; + + /*< private >*/ + GPermissionPrivate *priv; +}; + +struct _GPermissionClass { + GObjectClass parent_class; + + gboolean (*acquire) (GPermission *permission, + GCancellable *cancellable, + GError **error); + void (*acquire_async) (GPermission *permission, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*acquire_finish) (GPermission *permission, + GAsyncResult *result, + GError **error); + + gboolean (*release) (GPermission *permission, + GCancellable *cancellable, + GError **error); + void (*release_async) (GPermission *permission, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*release_finish) (GPermission *permission, + GAsyncResult *result, + GError **error); + + gpointer reserved[16]; +}; + +GIO_AVAILABLE_IN_ALL +GType g_permission_get_type (void); +GIO_AVAILABLE_IN_ALL +gboolean g_permission_acquire (GPermission *permission, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_permission_acquire_async (GPermission *permission, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_permission_acquire_finish (GPermission *permission, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_permission_release (GPermission *permission, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_permission_release_async (GPermission *permission, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_permission_release_finish (GPermission *permission, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_permission_get_allowed (GPermission *permission); +GIO_AVAILABLE_IN_ALL +gboolean g_permission_get_can_acquire (GPermission *permission); +GIO_AVAILABLE_IN_ALL +gboolean g_permission_get_can_release (GPermission *permission); + +GIO_AVAILABLE_IN_ALL +void g_permission_impl_update (GPermission *permission, + gboolean allowed, + gboolean can_acquire, + gboolean can_release); + +G_END_DECLS + +#endif /* __G_PERMISSION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpollableinputstream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpollableinputstream.h new file mode 100644 index 0000000..7b65947 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpollableinputstream.h @@ -0,0 +1,106 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_POLLABLE_INPUT_STREAM_H__ +#define __G_POLLABLE_INPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_POLLABLE_INPUT_STREAM (g_pollable_input_stream_get_type ()) +#define G_POLLABLE_INPUT_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_POLLABLE_INPUT_STREAM, GPollableInputStream)) +#define G_IS_POLLABLE_INPUT_STREAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_POLLABLE_INPUT_STREAM)) +#define G_POLLABLE_INPUT_STREAM_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_POLLABLE_INPUT_STREAM, GPollableInputStreamInterface)) + +/** + * GPollableInputStream: + * + * An interface for a #GInputStream that can be polled for readability. + * + * Since: 2.28 + */ +typedef struct _GPollableInputStreamInterface GPollableInputStreamInterface; + +/** + * GPollableInputStreamInterface: + * @g_iface: The parent interface. + * @can_poll: Checks if the #GPollableInputStream instance is actually pollable + * @is_readable: Checks if the stream is readable + * @create_source: Creates a #GSource to poll the stream + * @read_nonblocking: Does a non-blocking read or returns + * %G_IO_ERROR_WOULD_BLOCK + * + * The interface for pollable input streams. + * + * The default implementation of @can_poll always returns %TRUE. + * + * The default implementation of @read_nonblocking calls + * g_pollable_input_stream_is_readable(), and then calls + * g_input_stream_read() if it returns %TRUE. This means you only need + * to override it if it is possible that your @is_readable + * implementation may return %TRUE when the stream is not actually + * readable. + * + * Since: 2.28 + */ +struct _GPollableInputStreamInterface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + gboolean (*can_poll) (GPollableInputStream *stream); + + gboolean (*is_readable) (GPollableInputStream *stream); + GSource * (*create_source) (GPollableInputStream *stream, + GCancellable *cancellable); + gssize (*read_nonblocking) (GPollableInputStream *stream, + void *buffer, + gsize count, + GError **error); +}; + +GIO_AVAILABLE_IN_ALL +GType g_pollable_input_stream_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +gboolean g_pollable_input_stream_can_poll (GPollableInputStream *stream); + +GIO_AVAILABLE_IN_ALL +gboolean g_pollable_input_stream_is_readable (GPollableInputStream *stream); +GIO_AVAILABLE_IN_ALL +GSource *g_pollable_input_stream_create_source (GPollableInputStream *stream, + GCancellable *cancellable); + +GIO_AVAILABLE_IN_ALL +gssize g_pollable_input_stream_read_nonblocking (GPollableInputStream *stream, + void *buffer, + gsize count, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + + +#endif /* __G_POLLABLE_INPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpollableoutputstream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpollableoutputstream.h new file mode 100644 index 0000000..a98bfa2 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpollableoutputstream.h @@ -0,0 +1,127 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_POLLABLE_OUTPUT_STREAM_H__ +#define __G_POLLABLE_OUTPUT_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_POLLABLE_OUTPUT_STREAM (g_pollable_output_stream_get_type ()) +#define G_POLLABLE_OUTPUT_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_POLLABLE_OUTPUT_STREAM, GPollableOutputStream)) +#define G_IS_POLLABLE_OUTPUT_STREAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_POLLABLE_OUTPUT_STREAM)) +#define G_POLLABLE_OUTPUT_STREAM_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_POLLABLE_OUTPUT_STREAM, GPollableOutputStreamInterface)) + +/** + * GPollableOutputStream: + * + * An interface for a #GOutputStream that can be polled for writeability. + * + * Since: 2.28 + */ +typedef struct _GPollableOutputStreamInterface GPollableOutputStreamInterface; + +/** + * GPollableOutputStreamInterface: + * @g_iface: The parent interface. + * @can_poll: Checks if the #GPollableOutputStream instance is actually pollable + * @is_writable: Checks if the stream is writable + * @create_source: Creates a #GSource to poll the stream + * @write_nonblocking: Does a non-blocking write or returns + * %G_IO_ERROR_WOULD_BLOCK + * @writev_nonblocking: Does a vectored non-blocking write, or returns + * %G_POLLABLE_RETURN_WOULD_BLOCK + * + * The interface for pollable output streams. + * + * The default implementation of @can_poll always returns %TRUE. + * + * The default implementation of @write_nonblocking calls + * g_pollable_output_stream_is_writable(), and then calls + * g_output_stream_write() if it returns %TRUE. This means you only + * need to override it if it is possible that your @is_writable + * implementation may return %TRUE when the stream is not actually + * writable. + * + * The default implementation of @writev_nonblocking calls + * g_pollable_output_stream_write_nonblocking() for each vector, and converts + * its return value and error (if set) to a #GPollableReturn. You should + * override this where possible to avoid having to allocate a #GError to return + * %G_IO_ERROR_WOULD_BLOCK. + * + * Since: 2.28 + */ +struct _GPollableOutputStreamInterface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + gboolean (*can_poll) (GPollableOutputStream *stream); + + gboolean (*is_writable) (GPollableOutputStream *stream); + GSource * (*create_source) (GPollableOutputStream *stream, + GCancellable *cancellable); + gssize (*write_nonblocking) (GPollableOutputStream *stream, + const void *buffer, + gsize count, + GError **error); + GPollableReturn (*writev_nonblocking) (GPollableOutputStream *stream, + const GOutputVector *vectors, + gsize n_vectors, + gsize *bytes_written, + GError **error); +}; + +GIO_AVAILABLE_IN_ALL +GType g_pollable_output_stream_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +gboolean g_pollable_output_stream_can_poll (GPollableOutputStream *stream); + +GIO_AVAILABLE_IN_ALL +gboolean g_pollable_output_stream_is_writable (GPollableOutputStream *stream); +GIO_AVAILABLE_IN_ALL +GSource *g_pollable_output_stream_create_source (GPollableOutputStream *stream, + GCancellable *cancellable); + +GIO_AVAILABLE_IN_ALL +gssize g_pollable_output_stream_write_nonblocking (GPollableOutputStream *stream, + const void *buffer, + gsize count, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_60 +GPollableReturn g_pollable_output_stream_writev_nonblocking (GPollableOutputStream *stream, + const GOutputVector *vectors, + gsize n_vectors, + gsize *bytes_written, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + + +#endif /* __G_POLLABLE_OUTPUT_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpollableutils.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpollableutils.h new file mode 100644 index 0000000..879bcbb --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpollableutils.h @@ -0,0 +1,66 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2012 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_POLLABLE_UTILS_H__ +#define __G_POLLABLE_UTILS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +GIO_AVAILABLE_IN_ALL +GSource *g_pollable_source_new (GObject *pollable_stream); + +GIO_AVAILABLE_IN_2_34 +GSource *g_pollable_source_new_full (gpointer pollable_stream, + GSource *child_source, + GCancellable *cancellable); + +GIO_AVAILABLE_IN_2_34 +gssize g_pollable_stream_read (GInputStream *stream, + void *buffer, + gsize count, + gboolean blocking, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_34 +gssize g_pollable_stream_write (GOutputStream *stream, + const void *buffer, + gsize count, + gboolean blocking, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_34 +gboolean g_pollable_stream_write_all (GOutputStream *stream, + const void *buffer, + gsize count, + gboolean blocking, + gsize *bytes_written, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + +#endif /* _G_POLLABLE_UTILS_H_ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpowerprofilemonitor.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpowerprofilemonitor.h new file mode 100644 index 0000000..e2c6aa7 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpowerprofilemonitor.h @@ -0,0 +1,65 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright 2019 Red Hat, Inc. + * Copyright 2021 Igalia S.L. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_POWER_PROFILE_MONITOR_H__ +#define __G_POWER_PROFILE_MONITOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * G_POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME: + * + * Extension point for power profile usage monitoring functionality. + * See [Extending GIO][extending-gio]. + * + * Since: 2.70 + */ +#define G_POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME "gio-power-profile-monitor" + +#define G_TYPE_POWER_PROFILE_MONITOR (g_power_profile_monitor_get_type ()) +GIO_AVAILABLE_IN_2_70 +G_DECLARE_INTERFACE (GPowerProfileMonitor, g_power_profile_monitor, g, power_profile_monitor, GObject) + +#define G_POWER_PROFILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_POWER_PROFILE_MONITOR, GPowerProfileMonitor)) +#define G_IS_POWER_PROFILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_POWER_PROFILE_MONITOR)) +#define G_POWER_PROFILE_MONITOR_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_POWER_PROFILE_MONITOR, GPowerProfileMonitorInterface)) + +struct _GPowerProfileMonitorInterface +{ + /*< private >*/ + GTypeInterface g_iface; +}; + +GIO_AVAILABLE_IN_2_70 +GPowerProfileMonitor *g_power_profile_monitor_dup_default (void); + +GIO_AVAILABLE_IN_2_70 +gboolean g_power_profile_monitor_get_power_saver_enabled (GPowerProfileMonitor *monitor); + +G_END_DECLS + +#endif /* __G_POWER_PROFILE_MONITOR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpropertyaction.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpropertyaction.h new file mode 100644 index 0000000..f746e74 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gpropertyaction.h @@ -0,0 +1,49 @@ +/* + * Copyright © 2013 Canonical Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + */ + +#ifndef __G_PROPERTY_ACTION_H__ +#define __G_PROPERTY_ACTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_PROPERTY_ACTION (g_property_action_get_type ()) +#define G_PROPERTY_ACTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_PROPERTY_ACTION, GPropertyAction)) +#define G_IS_PROPERTY_ACTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_PROPERTY_ACTION)) + +GIO_AVAILABLE_IN_2_38 +GType g_property_action_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_38 +GPropertyAction * g_property_action_new (const gchar *name, + gpointer object, + const gchar *property_name); + +G_END_DECLS + +#endif /* __G_PROPERTY_ACTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gproxy.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gproxy.h new file mode 100644 index 0000000..de82410 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gproxy.h @@ -0,0 +1,130 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ + +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Collabora Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Nicolas Dufresne + */ + +#ifndef __G_PROXY_H__ +#define __G_PROXY_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_PROXY (g_proxy_get_type ()) +#define G_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_PROXY, GProxy)) +#define G_IS_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_PROXY)) +#define G_PROXY_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_PROXY, GProxyInterface)) + +/** + * G_PROXY_EXTENSION_POINT_NAME: + * + * Extension point for proxy functionality. + * See [Extending GIO][extending-gio]. + * + * Since: 2.26 + */ +#define G_PROXY_EXTENSION_POINT_NAME "gio-proxy" + +/** + * GProxy: + * + * Interface that handles proxy connection and payload. + * + * Since: 2.26 + */ +typedef struct _GProxyInterface GProxyInterface; + +/** + * GProxyInterface: + * @g_iface: The parent interface. + * @connect: Connect to proxy server and wrap (if required) the #connection + * to handle payload. + * @connect_async: Same as connect() but asynchronous. + * @connect_finish: Returns the result of connect_async() + * @supports_hostname: Returns whether the proxy supports hostname lookups. + * + * Provides an interface for handling proxy connection and payload. + * + * Since: 2.26 + */ +struct _GProxyInterface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + GIOStream * (* connect) (GProxy *proxy, + GIOStream *connection, + GProxyAddress *proxy_address, + GCancellable *cancellable, + GError **error); + + void (* connect_async) (GProxy *proxy, + GIOStream *connection, + GProxyAddress *proxy_address, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + GIOStream * (* connect_finish) (GProxy *proxy, + GAsyncResult *result, + GError **error); + + gboolean (* supports_hostname) (GProxy *proxy); +}; + +GIO_AVAILABLE_IN_ALL +GType g_proxy_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GProxy *g_proxy_get_default_for_protocol (const gchar *protocol); + +GIO_AVAILABLE_IN_ALL +GIOStream *g_proxy_connect (GProxy *proxy, + GIOStream *connection, + GProxyAddress *proxy_address, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_proxy_connect_async (GProxy *proxy, + GIOStream *connection, + GProxyAddress *proxy_address, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_ALL +GIOStream *g_proxy_connect_finish (GProxy *proxy, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_proxy_supports_hostname (GProxy *proxy); + +G_END_DECLS + +#endif /* __G_PROXY_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gproxyaddress.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gproxyaddress.h new file mode 100644 index 0000000..a0176d6 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gproxyaddress.h @@ -0,0 +1,88 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Collabora, Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Nicolas Dufresne + */ + +#ifndef __G_PROXY_ADDRESS_H__ +#define __G_PROXY_ADDRESS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_PROXY_ADDRESS (g_proxy_address_get_type ()) +#define G_PROXY_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_PROXY_ADDRESS, GProxyAddress)) +#define G_PROXY_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_PROXY_ADDRESS, GProxyAddressClass)) +#define G_IS_PROXY_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_PROXY_ADDRESS)) +#define G_IS_PROXY_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_PROXY_ADDRESS)) +#define G_PROXY_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_PROXY_ADDRESS, GProxyAddressClass)) + +typedef struct _GProxyAddressClass GProxyAddressClass; +typedef struct _GProxyAddressPrivate GProxyAddressPrivate; + +struct _GProxyAddress +{ + GInetSocketAddress parent_instance; + + /*< private >*/ + GProxyAddressPrivate *priv; +}; + +struct _GProxyAddressClass +{ + GInetSocketAddressClass parent_class; +}; + + +GIO_AVAILABLE_IN_ALL +GType g_proxy_address_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GSocketAddress *g_proxy_address_new (GInetAddress *inetaddr, + guint16 port, + const gchar *protocol, + const gchar *dest_hostname, + guint16 dest_port, + const gchar *username, + const gchar *password); + +GIO_AVAILABLE_IN_ALL +const gchar *g_proxy_address_get_protocol (GProxyAddress *proxy); +GIO_AVAILABLE_IN_2_34 +const gchar *g_proxy_address_get_destination_protocol (GProxyAddress *proxy); +GIO_AVAILABLE_IN_ALL +const gchar *g_proxy_address_get_destination_hostname (GProxyAddress *proxy); +GIO_AVAILABLE_IN_ALL +guint16 g_proxy_address_get_destination_port (GProxyAddress *proxy); +GIO_AVAILABLE_IN_ALL +const gchar *g_proxy_address_get_username (GProxyAddress *proxy); +GIO_AVAILABLE_IN_ALL +const gchar *g_proxy_address_get_password (GProxyAddress *proxy); + +GIO_AVAILABLE_IN_2_34 +const gchar *g_proxy_address_get_uri (GProxyAddress *proxy); + +G_END_DECLS + +#endif /* __G_PROXY_ADDRESS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gproxyaddressenumerator.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gproxyaddressenumerator.h new file mode 100644 index 0000000..b8d36a6 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gproxyaddressenumerator.h @@ -0,0 +1,83 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Collabora, Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Nicolas Dufresne + */ + +#ifndef __G_PROXY_ADDRESS_ENUMERATOR_H__ +#define __G_PROXY_ADDRESS_ENUMERATOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_PROXY_ADDRESS_ENUMERATOR (g_proxy_address_enumerator_get_type ()) +#define G_PROXY_ADDRESS_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_PROXY_ADDRESS_ENUMERATOR, GProxyAddressEnumerator)) +#define G_PROXY_ADDRESS_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_PROXY_ADDRESS_ENUMERATOR, GProxyAddressEnumeratorClass)) +#define G_IS_PROXY_ADDRESS_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_PROXY_ADDRESS_ENUMERATOR)) +#define G_IS_PROXY_ADDRESS_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_PROXY_ADDRESS_ENUMERATOR)) +#define G_PROXY_ADDRESS_ENUMERATOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_PROXY_ADDRESS_ENUMERATOR, GProxyAddressEnumeratorClass)) + +/** + * GProxyAddressEnumerator: + * + * A subclass of #GSocketAddressEnumerator that takes another address + * enumerator and wraps each of its results in a #GProxyAddress as + * directed by the default #GProxyResolver. + */ + +typedef struct _GProxyAddressEnumeratorClass GProxyAddressEnumeratorClass; +typedef struct _GProxyAddressEnumeratorPrivate GProxyAddressEnumeratorPrivate; + +struct _GProxyAddressEnumerator +{ + /*< private >*/ + GSocketAddressEnumerator parent_instance; + GProxyAddressEnumeratorPrivate *priv; +}; + +/** + * GProxyAddressEnumeratorClass: + * + * Class structure for #GProxyAddressEnumerator. + */ +struct _GProxyAddressEnumeratorClass +{ + /*< private >*/ + GSocketAddressEnumeratorClass parent_class; + + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); + void (*_g_reserved7) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_proxy_address_enumerator_get_type (void) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __G_PROXY_ADDRESS_ENUMERATOR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gproxyresolver.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gproxyresolver.h new file mode 100644 index 0000000..d564c99 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gproxyresolver.h @@ -0,0 +1,97 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Collabora, Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Nicolas Dufresne + */ + +#ifndef __G_PROXY_RESOLVER_H__ +#define __G_PROXY_RESOLVER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_PROXY_RESOLVER (g_proxy_resolver_get_type ()) +#define G_PROXY_RESOLVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_PROXY_RESOLVER, GProxyResolver)) +#define G_IS_PROXY_RESOLVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_PROXY_RESOLVER)) +#define G_PROXY_RESOLVER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_PROXY_RESOLVER, GProxyResolverInterface)) + +/** + * G_PROXY_RESOLVER_EXTENSION_POINT_NAME: + * + * Extension point for proxy resolving functionality. + * See [Extending GIO][extending-gio]. + */ +#define G_PROXY_RESOLVER_EXTENSION_POINT_NAME "gio-proxy-resolver" + +typedef struct _GProxyResolverInterface GProxyResolverInterface; + +struct _GProxyResolverInterface { + GTypeInterface g_iface; + + /* Virtual Table */ + gboolean (* is_supported) (GProxyResolver *resolver); + + gchar ** (* lookup) (GProxyResolver *resolver, + const gchar *uri, + GCancellable *cancellable, + GError **error); + + void (* lookup_async) (GProxyResolver *resolver, + const gchar *uri, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + gchar ** (* lookup_finish) (GProxyResolver *resolver, + GAsyncResult *result, + GError **error); +}; + +GIO_AVAILABLE_IN_ALL +GType g_proxy_resolver_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GProxyResolver *g_proxy_resolver_get_default (void); + +GIO_AVAILABLE_IN_ALL +gboolean g_proxy_resolver_is_supported (GProxyResolver *resolver); +GIO_AVAILABLE_IN_ALL +gchar **g_proxy_resolver_lookup (GProxyResolver *resolver, + const gchar *uri, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_proxy_resolver_lookup_async (GProxyResolver *resolver, + const gchar *uri, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gchar **g_proxy_resolver_lookup_finish (GProxyResolver *resolver, + GAsyncResult *result, + GError **error); + + +G_END_DECLS + +#endif /* __G_PROXY_RESOLVER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gremoteactiongroup.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gremoteactiongroup.h new file mode 100644 index 0000000..fb0847e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gremoteactiongroup.h @@ -0,0 +1,77 @@ +/* + * Copyright © 2011 Canonical Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + */ + +#ifndef __G_REMOTE_ACTION_GROUP_H__ +#define __G_REMOTE_ACTION_GROUP_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + + +#define G_TYPE_REMOTE_ACTION_GROUP (g_remote_action_group_get_type ()) +#define G_REMOTE_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_REMOTE_ACTION_GROUP, GRemoteActionGroup)) +#define G_IS_REMOTE_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_REMOTE_ACTION_GROUP)) +#define G_REMOTE_ACTION_GROUP_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \ + G_TYPE_REMOTE_ACTION_GROUP, \ + GRemoteActionGroupInterface)) + +typedef struct _GRemoteActionGroupInterface GRemoteActionGroupInterface; + +struct _GRemoteActionGroupInterface +{ + GTypeInterface g_iface; + + void (* activate_action_full) (GRemoteActionGroup *remote, + const gchar *action_name, + GVariant *parameter, + GVariant *platform_data); + + void (* change_action_state_full) (GRemoteActionGroup *remote, + const gchar *action_name, + GVariant *value, + GVariant *platform_data); +}; + +GIO_AVAILABLE_IN_2_32 +GType g_remote_action_group_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_32 +void g_remote_action_group_activate_action_full (GRemoteActionGroup *remote, + const gchar *action_name, + GVariant *parameter, + GVariant *platform_data); + +GIO_AVAILABLE_IN_2_32 +void g_remote_action_group_change_action_state_full (GRemoteActionGroup *remote, + const gchar *action_name, + GVariant *value, + GVariant *platform_data); + +G_END_DECLS + +#endif /* __G_REMOTE_ACTION_GROUP_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gresolver.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gresolver.h new file mode 100644 index 0000000..cbcbdec --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gresolver.h @@ -0,0 +1,299 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Red Hat, Inc. + * Copyright (C) 2018 Igalia S.L. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_RESOLVER_H__ +#define __G_RESOLVER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_RESOLVER (g_resolver_get_type ()) +#define G_RESOLVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_RESOLVER, GResolver)) +#define G_RESOLVER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_RESOLVER, GResolverClass)) +#define G_IS_RESOLVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_RESOLVER)) +#define G_IS_RESOLVER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_RESOLVER)) +#define G_RESOLVER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_RESOLVER, GResolverClass)) + +typedef struct _GResolverPrivate GResolverPrivate; +typedef struct _GResolverClass GResolverClass; + +struct _GResolver { + GObject parent_instance; + + GResolverPrivate *priv; +}; + +/** + * GResolverNameLookupFlags: + * @G_RESOLVER_NAME_LOOKUP_FLAGS_DEFAULT: default behavior (same as g_resolver_lookup_by_name()) + * @G_RESOLVER_NAME_LOOKUP_FLAGS_IPV4_ONLY: only resolve ipv4 addresses + * @G_RESOLVER_NAME_LOOKUP_FLAGS_IPV6_ONLY: only resolve ipv6 addresses + * + * Flags to modify lookup behavior. + * + * Since: 2.60 + */ +typedef enum { + G_RESOLVER_NAME_LOOKUP_FLAGS_DEFAULT = 0, + G_RESOLVER_NAME_LOOKUP_FLAGS_IPV4_ONLY = 1 << 0, + G_RESOLVER_NAME_LOOKUP_FLAGS_IPV6_ONLY = 1 << 1, +} GResolverNameLookupFlags; + +struct _GResolverClass { + GObjectClass parent_class; + + /* Signals */ + void ( *reload) (GResolver *resolver); + + /* Virtual methods */ + GList * ( *lookup_by_name) (GResolver *resolver, + const gchar *hostname, + GCancellable *cancellable, + GError **error); + void ( *lookup_by_name_async) (GResolver *resolver, + const gchar *hostname, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GList * ( *lookup_by_name_finish) (GResolver *resolver, + GAsyncResult *result, + GError **error); + + gchar * ( *lookup_by_address) (GResolver *resolver, + GInetAddress *address, + GCancellable *cancellable, + GError **error); + void ( *lookup_by_address_async) (GResolver *resolver, + GInetAddress *address, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gchar * ( *lookup_by_address_finish) (GResolver *resolver, + GAsyncResult *result, + GError **error); + + GList * ( *lookup_service) (GResolver *resolver, + const gchar *rrname, + GCancellable *cancellable, + GError **error); + void ( *lookup_service_async) (GResolver *resolver, + const gchar *rrname, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GList * ( *lookup_service_finish) (GResolver *resolver, + GAsyncResult *result, + GError **error); + + GList * ( *lookup_records) (GResolver *resolver, + const gchar *rrname, + GResolverRecordType record_type, + GCancellable *cancellable, + GError **error); + + void ( *lookup_records_async) (GResolver *resolver, + const gchar *rrname, + GResolverRecordType record_type, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + GList * ( *lookup_records_finish) (GResolver *resolver, + GAsyncResult *result, + GError **error); + /** + * GResolverClass::lookup_by_name_with_flags_async: + * @resolver: a #GResolver + * @hostname: the hostname to resolve + * @flags: extra #GResolverNameLookupFlags to modify the lookup + * @cancellable: (nullable): a #GCancellable + * @callback: (scope async): a #GAsyncReadyCallback to call when completed + * @user_data: data to pass to @callback + * + * Asynchronous version of GResolverClass::lookup_by_name_with_flags + * + * GResolverClass::lookup_by_name_with_flags_finish will be called to get + * the result. + * + * Since: 2.60 + */ + void ( *lookup_by_name_with_flags_async) (GResolver *resolver, + const gchar *hostname, + GResolverNameLookupFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + /** + * GResolverClass::lookup_by_name_with_flags_finish: + * @resolver: a #GResolver + * @result: a #GAsyncResult + * @error: (nullable): a pointer to a %NULL #GError + * + * Gets the result from GResolverClass::lookup_by_name_with_flags_async + * + * Returns: (element-type GInetAddress) (transfer full): List of #GInetAddress. + * Since: 2.60 + */ + GList * ( *lookup_by_name_with_flags_finish) (GResolver *resolver, + GAsyncResult *result, + GError **error); + /** + * GResolverClass::lookup_by_name_with_flags: + * @resolver: a #GResolver + * @hostname: the hostname to resolve + * @flags: extra #GResolverNameLookupFlags to modify the lookup + * @cancellable: (nullable): a #GCancellable + * @error: (nullable): a pointer to a %NULL #GError + * + * This is identical to GResolverClass::lookup_by_name except it takes + * @flags which modifies the behavior of the lookup. See #GResolverNameLookupFlags + * for more details. + * + * Returns: (element-type GInetAddress) (transfer full): List of #GInetAddress. + * Since: 2.60 + */ + GList * ( *lookup_by_name_with_flags) (GResolver *resolver, + const gchar *hostname, + GResolverNameLookupFlags flags, + GCancellable *cancellable, + GError **error); + +}; + +GIO_AVAILABLE_IN_ALL +GType g_resolver_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GResolver *g_resolver_get_default (void); +GIO_AVAILABLE_IN_ALL +void g_resolver_set_default (GResolver *resolver); +GIO_AVAILABLE_IN_ALL +GList *g_resolver_lookup_by_name (GResolver *resolver, + const gchar *hostname, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_resolver_lookup_by_name_async (GResolver *resolver, + const gchar *hostname, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GList *g_resolver_lookup_by_name_finish (GResolver *resolver, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_2_60 +void g_resolver_lookup_by_name_with_flags_async (GResolver *resolver, + const gchar *hostname, + GResolverNameLookupFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_60 +GList *g_resolver_lookup_by_name_with_flags_finish (GResolver *resolver, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_2_60 +GList *g_resolver_lookup_by_name_with_flags (GResolver *resolver, + const gchar *hostname, + GResolverNameLookupFlags flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_resolver_free_addresses (GList *addresses); +GIO_AVAILABLE_IN_ALL +gchar *g_resolver_lookup_by_address (GResolver *resolver, + GInetAddress *address, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_resolver_lookup_by_address_async (GResolver *resolver, + GInetAddress *address, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gchar *g_resolver_lookup_by_address_finish (GResolver *resolver, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +GList *g_resolver_lookup_service (GResolver *resolver, + const gchar *service, + const gchar *protocol, + const gchar *domain, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_resolver_lookup_service_async (GResolver *resolver, + const gchar *service, + const gchar *protocol, + const gchar *domain, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GList *g_resolver_lookup_service_finish (GResolver *resolver, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_2_34 +GList *g_resolver_lookup_records (GResolver *resolver, + const gchar *rrname, + GResolverRecordType record_type, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_34 +void g_resolver_lookup_records_async (GResolver *resolver, + const gchar *rrname, + GResolverRecordType record_type, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_34 +GList *g_resolver_lookup_records_finish (GResolver *resolver, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_resolver_free_targets (GList *targets); + +GIO_AVAILABLE_IN_2_78 +unsigned g_resolver_get_timeout (GResolver *resolver); +GIO_AVAILABLE_IN_2_78 +void g_resolver_set_timeout (GResolver *resolver, + unsigned timeout_ms); + +/** + * G_RESOLVER_ERROR: + * + * Error domain for #GResolver. Errors in this domain will be from the + * #GResolverError enumeration. See #GError for more information on + * error domains. + */ +#define G_RESOLVER_ERROR (g_resolver_error_quark ()) +GIO_AVAILABLE_IN_ALL +GQuark g_resolver_error_quark (void); + +G_END_DECLS + +#endif /* __G_RESOLVER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gresource.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gresource.h new file mode 100644 index 0000000..f9853aa --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gresource.h @@ -0,0 +1,132 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_RESOURCE_H__ +#define __G_RESOURCE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * G_TYPE_RESOURCE: + * + * The #GType for #GResource. + */ +#define G_TYPE_RESOURCE (g_resource_get_type ()) + + +/** + * G_RESOURCE_ERROR: + * + * Error domain for #GResource. Errors in this domain will be from the + * #GResourceError enumeration. See #GError for more information on + * error domains. + */ +#define G_RESOURCE_ERROR (g_resource_error_quark ()) +GIO_AVAILABLE_IN_2_32 +GQuark g_resource_error_quark (void); + +typedef struct _GStaticResource GStaticResource; + +struct _GStaticResource { + /*< private >*/ + const guint8 *data; + gsize data_len; + GResource *resource; + GStaticResource *next; + gpointer padding; +}; + +GIO_AVAILABLE_IN_2_32 +GType g_resource_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_2_32 +GResource * g_resource_new_from_data (GBytes *data, + GError **error); +GIO_AVAILABLE_IN_2_32 +GResource * g_resource_ref (GResource *resource); +GIO_AVAILABLE_IN_2_32 +void g_resource_unref (GResource *resource); +GIO_AVAILABLE_IN_2_32 +GResource * g_resource_load (const gchar *filename, + GError **error); +GIO_AVAILABLE_IN_2_32 +GInputStream *g_resource_open_stream (GResource *resource, + const char *path, + GResourceLookupFlags lookup_flags, + GError **error); +GIO_AVAILABLE_IN_2_32 +GBytes * g_resource_lookup_data (GResource *resource, + const char *path, + GResourceLookupFlags lookup_flags, + GError **error); +GIO_AVAILABLE_IN_2_32 +char ** g_resource_enumerate_children (GResource *resource, + const char *path, + GResourceLookupFlags lookup_flags, + GError **error); +GIO_AVAILABLE_IN_2_32 +gboolean g_resource_get_info (GResource *resource, + const char *path, + GResourceLookupFlags lookup_flags, + gsize *size, + guint32 *flags, + GError **error); + +GIO_AVAILABLE_IN_2_32 +void g_resources_register (GResource *resource); +GIO_AVAILABLE_IN_2_32 +void g_resources_unregister (GResource *resource); +GIO_AVAILABLE_IN_2_32 +GInputStream *g_resources_open_stream (const char *path, + GResourceLookupFlags lookup_flags, + GError **error); +GIO_AVAILABLE_IN_2_32 +GBytes * g_resources_lookup_data (const char *path, + GResourceLookupFlags lookup_flags, + GError **error); +GIO_AVAILABLE_IN_2_32 +char ** g_resources_enumerate_children (const char *path, + GResourceLookupFlags lookup_flags, + GError **error); +GIO_AVAILABLE_IN_2_32 +gboolean g_resources_get_info (const char *path, + GResourceLookupFlags lookup_flags, + gsize *size, + guint32 *flags, + GError **error); + + +GIO_AVAILABLE_IN_2_32 +void g_static_resource_init (GStaticResource *static_resource); +GIO_AVAILABLE_IN_2_32 +void g_static_resource_fini (GStaticResource *static_resource); +GIO_AVAILABLE_IN_2_32 +GResource *g_static_resource_get_resource (GStaticResource *static_resource); + +G_END_DECLS + +#endif /* __G_RESOURCE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gseekable.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gseekable.h new file mode 100644 index 0000000..34510de --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gseekable.h @@ -0,0 +1,105 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_SEEKABLE_H__ +#define __G_SEEKABLE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_SEEKABLE (g_seekable_get_type ()) +#define G_SEEKABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_SEEKABLE, GSeekable)) +#define G_IS_SEEKABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_SEEKABLE)) +#define G_SEEKABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_SEEKABLE, GSeekableIface)) + +/** + * GSeekable: + * + * Seek object for streaming operations. + **/ +typedef struct _GSeekableIface GSeekableIface; + +/** + * GSeekableIface: + * @g_iface: The parent interface. + * @tell: Tells the current location within a stream. + * @can_seek: Checks if seeking is supported by the stream. + * @seek: Seeks to a location within a stream. + * @can_truncate: Checks if truncation is supported by the stream. + * @truncate_fn: Truncates a stream. + * + * Provides an interface for implementing seekable functionality on I/O Streams. + **/ +struct _GSeekableIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + goffset (* tell) (GSeekable *seekable); + + gboolean (* can_seek) (GSeekable *seekable); + gboolean (* seek) (GSeekable *seekable, + goffset offset, + GSeekType type, + GCancellable *cancellable, + GError **error); + + gboolean (* can_truncate) (GSeekable *seekable); + gboolean (* truncate_fn) (GSeekable *seekable, + goffset offset, + GCancellable *cancellable, + GError **error); + + /* TODO: Async seek/truncate */ +}; + +GIO_AVAILABLE_IN_ALL +GType g_seekable_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +goffset g_seekable_tell (GSeekable *seekable); +GIO_AVAILABLE_IN_ALL +gboolean g_seekable_can_seek (GSeekable *seekable); +GIO_AVAILABLE_IN_ALL +gboolean g_seekable_seek (GSeekable *seekable, + goffset offset, + GSeekType type, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_seekable_can_truncate (GSeekable *seekable); +GIO_AVAILABLE_IN_ALL +gboolean g_seekable_truncate (GSeekable *seekable, + goffset offset, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + + +#endif /* __G_SEEKABLE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsettings.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsettings.h new file mode 100644 index 0000000..8a9d2b5 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsettings.h @@ -0,0 +1,347 @@ +/* + * Copyright © 2009, 2010 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Author: Ryan Lortie + */ + +#ifndef __G_SETTINGS_H__ +#define __G_SETTINGS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +#define G_TYPE_SETTINGS (g_settings_get_type ()) +#define G_SETTINGS(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SETTINGS, GSettings)) +#define G_SETTINGS_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SETTINGS, GSettingsClass)) +#define G_IS_SETTINGS(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_SETTINGS)) +#define G_IS_SETTINGS_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_SETTINGS)) +#define G_SETTINGS_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SETTINGS, GSettingsClass)) + +typedef struct _GSettingsPrivate GSettingsPrivate; +typedef struct _GSettingsClass GSettingsClass; + +struct _GSettingsClass +{ + GObjectClass parent_class; + + /* Signals */ + void (*writable_changed) (GSettings *settings, + const gchar *key); + void (*changed) (GSettings *settings, + const gchar *key); + gboolean (*writable_change_event) (GSettings *settings, + GQuark key); + gboolean (*change_event) (GSettings *settings, + const GQuark *keys, + gint n_keys); + + gpointer padding[20]; +}; + +struct _GSettings +{ + GObject parent_instance; + GSettingsPrivate *priv; +}; + + +GIO_AVAILABLE_IN_ALL +GType g_settings_get_type (void); + +GIO_DEPRECATED_IN_2_40_FOR(g_settings_schema_source_list_schemas) +const gchar * const * g_settings_list_schemas (void); +GIO_DEPRECATED_IN_2_40_FOR(g_settings_schema_source_list_schemas) +const gchar * const * g_settings_list_relocatable_schemas (void); +GIO_AVAILABLE_IN_ALL +GSettings * g_settings_new (const gchar *schema_id); +GIO_AVAILABLE_IN_ALL +GSettings * g_settings_new_with_path (const gchar *schema_id, + const gchar *path); +GIO_AVAILABLE_IN_ALL +GSettings * g_settings_new_with_backend (const gchar *schema_id, + GSettingsBackend *backend); +GIO_AVAILABLE_IN_ALL +GSettings * g_settings_new_with_backend_and_path (const gchar *schema_id, + GSettingsBackend *backend, + const gchar *path); +GIO_AVAILABLE_IN_2_32 +GSettings * g_settings_new_full (GSettingsSchema *schema, + GSettingsBackend *backend, + const gchar *path); +GIO_AVAILABLE_IN_ALL +gchar ** g_settings_list_children (GSettings *settings); +GIO_DEPRECATED_IN_2_46_FOR(g_settings_schema_list_keys) +gchar ** g_settings_list_keys (GSettings *settings); +GIO_DEPRECATED_IN_2_40_FOR(g_settings_schema_key_get_range) +GVariant * g_settings_get_range (GSettings *settings, + const gchar *key); +GIO_DEPRECATED_IN_2_40_FOR(g_settings_schema_key_range_check) +gboolean g_settings_range_check (GSettings *settings, + const gchar *key, + GVariant *value); + +GIO_AVAILABLE_IN_ALL +gboolean g_settings_set_value (GSettings *settings, + const gchar *key, + GVariant *value); +GIO_AVAILABLE_IN_ALL +GVariant * g_settings_get_value (GSettings *settings, + const gchar *key); + +GIO_AVAILABLE_IN_2_40 +GVariant * g_settings_get_user_value (GSettings *settings, + const gchar *key); +GIO_AVAILABLE_IN_2_40 +GVariant * g_settings_get_default_value (GSettings *settings, + const gchar *key); + +GIO_AVAILABLE_IN_ALL +gboolean g_settings_set (GSettings *settings, + const gchar *key, + const gchar *format, + ...); +GIO_AVAILABLE_IN_ALL +void g_settings_get (GSettings *settings, + const gchar *key, + const gchar *format, + ...); +GIO_AVAILABLE_IN_ALL +void g_settings_reset (GSettings *settings, + const gchar *key); + +GIO_AVAILABLE_IN_ALL +gint g_settings_get_int (GSettings *settings, + const gchar *key); +GIO_AVAILABLE_IN_ALL +gboolean g_settings_set_int (GSettings *settings, + const gchar *key, + gint value); +GIO_AVAILABLE_IN_2_50 +gint64 g_settings_get_int64 (GSettings *settings, + const gchar *key); +GIO_AVAILABLE_IN_2_50 +gboolean g_settings_set_int64 (GSettings *settings, + const gchar *key, + gint64 value); +GIO_AVAILABLE_IN_2_32 +guint g_settings_get_uint (GSettings *settings, + const gchar *key); +GIO_AVAILABLE_IN_2_32 +gboolean g_settings_set_uint (GSettings *settings, + const gchar *key, + guint value); +GIO_AVAILABLE_IN_2_50 +guint64 g_settings_get_uint64 (GSettings *settings, + const gchar *key); +GIO_AVAILABLE_IN_2_50 +gboolean g_settings_set_uint64 (GSettings *settings, + const gchar *key, + guint64 value); +GIO_AVAILABLE_IN_ALL +gchar * g_settings_get_string (GSettings *settings, + const gchar *key); +GIO_AVAILABLE_IN_ALL +gboolean g_settings_set_string (GSettings *settings, + const gchar *key, + const gchar *value); +GIO_AVAILABLE_IN_ALL +gboolean g_settings_get_boolean (GSettings *settings, + const gchar *key); +GIO_AVAILABLE_IN_ALL +gboolean g_settings_set_boolean (GSettings *settings, + const gchar *key, + gboolean value); +GIO_AVAILABLE_IN_ALL +gdouble g_settings_get_double (GSettings *settings, + const gchar *key); +GIO_AVAILABLE_IN_ALL +gboolean g_settings_set_double (GSettings *settings, + const gchar *key, + gdouble value); +GIO_AVAILABLE_IN_ALL +gchar ** g_settings_get_strv (GSettings *settings, + const gchar *key); +GIO_AVAILABLE_IN_ALL +gboolean g_settings_set_strv (GSettings *settings, + const gchar *key, + const gchar *const *value); +GIO_AVAILABLE_IN_ALL +gint g_settings_get_enum (GSettings *settings, + const gchar *key); +GIO_AVAILABLE_IN_ALL +gboolean g_settings_set_enum (GSettings *settings, + const gchar *key, + gint value); +GIO_AVAILABLE_IN_ALL +guint g_settings_get_flags (GSettings *settings, + const gchar *key); +GIO_AVAILABLE_IN_ALL +gboolean g_settings_set_flags (GSettings *settings, + const gchar *key, + guint value); +GIO_AVAILABLE_IN_ALL +GSettings * g_settings_get_child (GSettings *settings, + const gchar *name); + +GIO_AVAILABLE_IN_ALL +gboolean g_settings_is_writable (GSettings *settings, + const gchar *name); + +GIO_AVAILABLE_IN_ALL +void g_settings_delay (GSettings *settings); +GIO_AVAILABLE_IN_ALL +void g_settings_apply (GSettings *settings); +GIO_AVAILABLE_IN_ALL +void g_settings_revert (GSettings *settings); +GIO_AVAILABLE_IN_ALL +gboolean g_settings_get_has_unapplied (GSettings *settings); +GIO_AVAILABLE_IN_ALL +void g_settings_sync (void); + +/** + * GSettingsBindSetMapping: + * @value: a #GValue containing the property value to map + * @expected_type: the #GVariantType to create + * @user_data: user data that was specified when the binding was created + * + * The type for the function that is used to convert an object property + * value to a #GVariant for storing it in #GSettings. + * + * Returns: a new #GVariant holding the data from @value, + * or %NULL in case of an error + */ +typedef GVariant * (*GSettingsBindSetMapping) (const GValue *value, + const GVariantType *expected_type, + gpointer user_data); + +/** + * GSettingsBindGetMapping: + * @value: return location for the property value + * @variant: the #GVariant + * @user_data: user data that was specified when the binding was created + * + * The type for the function that is used to convert from #GSettings to + * an object property. The @value is already initialized to hold values + * of the appropriate type. + * + * Returns: %TRUE if the conversion succeeded, %FALSE in case of an error + */ +typedef gboolean (*GSettingsBindGetMapping) (GValue *value, + GVariant *variant, + gpointer user_data); + +/** + * GSettingsGetMapping: + * @value: the #GVariant to map, or %NULL + * @result: (out): the result of the mapping + * @user_data: (closure): the user data that was passed to + * g_settings_get_mapped() + * + * The type of the function that is used to convert from a value stored + * in a #GSettings to a value that is useful to the application. + * + * If the value is successfully mapped, the result should be stored at + * @result and %TRUE returned. If mapping fails (for example, if @value + * is not in the right format) then %FALSE should be returned. + * + * If @value is %NULL then it means that the mapping function is being + * given a "last chance" to successfully return a valid value. %TRUE + * must be returned in this case. + * + * Returns: %TRUE if the conversion succeeded, %FALSE in case of an error + **/ +typedef gboolean (*GSettingsGetMapping) (GVariant *value, + gpointer *result, + gpointer user_data); + +/** + * GSettingsBindFlags: + * @G_SETTINGS_BIND_DEFAULT: Equivalent to `G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET` + * @G_SETTINGS_BIND_GET: Update the #GObject property when the setting changes. + * It is an error to use this flag if the property is not writable. + * @G_SETTINGS_BIND_SET: Update the setting when the #GObject property changes. + * It is an error to use this flag if the property is not readable. + * @G_SETTINGS_BIND_NO_SENSITIVITY: Do not try to bind a "sensitivity" property to the writability of the setting + * @G_SETTINGS_BIND_GET_NO_CHANGES: When set in addition to %G_SETTINGS_BIND_GET, set the #GObject property + * value initially from the setting, but do not listen for changes of the setting + * @G_SETTINGS_BIND_INVERT_BOOLEAN: When passed to g_settings_bind(), uses a pair of mapping functions that invert + * the boolean value when mapping between the setting and the property. The setting and property must both + * be booleans. You cannot pass this flag to g_settings_bind_with_mapping(). + * + * Flags used when creating a binding. These flags determine in which + * direction the binding works. The default is to synchronize in both + * directions. + */ +typedef enum +{ + G_SETTINGS_BIND_DEFAULT, + G_SETTINGS_BIND_GET = (1<<0), + G_SETTINGS_BIND_SET = (1<<1), + G_SETTINGS_BIND_NO_SENSITIVITY = (1<<2), + G_SETTINGS_BIND_GET_NO_CHANGES = (1<<3), + G_SETTINGS_BIND_INVERT_BOOLEAN = (1<<4) +} GSettingsBindFlags; + +GIO_AVAILABLE_IN_ALL +void g_settings_bind (GSettings *settings, + const gchar *key, + gpointer object, + const gchar *property, + GSettingsBindFlags flags); +GIO_AVAILABLE_IN_ALL +void g_settings_bind_with_mapping (GSettings *settings, + const gchar *key, + gpointer object, + const gchar *property, + GSettingsBindFlags flags, + GSettingsBindGetMapping get_mapping, + GSettingsBindSetMapping set_mapping, + gpointer user_data, + GDestroyNotify destroy); +GIO_AVAILABLE_IN_ALL +void g_settings_bind_writable (GSettings *settings, + const gchar *key, + gpointer object, + const gchar *property, + gboolean inverted); +GIO_AVAILABLE_IN_ALL +void g_settings_unbind (gpointer object, + const gchar *property); + +GIO_AVAILABLE_IN_2_32 +GAction * g_settings_create_action (GSettings *settings, + const gchar *key); + +GIO_AVAILABLE_IN_ALL +gpointer g_settings_get_mapped (GSettings *settings, + const gchar *key, + GSettingsGetMapping mapping, + gpointer user_data); + +G_END_DECLS + +#endif /* __G_SETTINGS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsettingsbackend.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsettingsbackend.h new file mode 100644 index 0000000..f579bf6 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsettingsbackend.h @@ -0,0 +1,176 @@ +/* + * Copyright © 2009, 2010 Codethink Limited + * Copyright © 2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Authors: Ryan Lortie + * Matthias Clasen + */ + +#ifndef __G_SETTINGS_BACKEND_H__ +#define __G_SETTINGS_BACKEND_H__ + +#if !defined (G_SETTINGS_ENABLE_BACKEND) && !defined (GIO_COMPILATION) +#error "You must define G_SETTINGS_ENABLE_BACKEND before including ." +#endif + +#define __GIO_GIO_H_INSIDE__ +#include +#undef __GIO_GIO_H_INSIDE__ + +G_BEGIN_DECLS + +#define G_TYPE_SETTINGS_BACKEND (g_settings_backend_get_type ()) +#define G_SETTINGS_BACKEND(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SETTINGS_BACKEND, GSettingsBackend)) +#define G_SETTINGS_BACKEND_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SETTINGS_BACKEND, GSettingsBackendClass)) +#define G_IS_SETTINGS_BACKEND(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SETTINGS_BACKEND)) +#define G_IS_SETTINGS_BACKEND_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_SETTINGS_BACKEND)) +#define G_SETTINGS_BACKEND_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SETTINGS_BACKEND, GSettingsBackendClass)) + +/** + * G_SETTINGS_BACKEND_EXTENSION_POINT_NAME: + * + * Extension point for #GSettingsBackend functionality. + **/ +#define G_SETTINGS_BACKEND_EXTENSION_POINT_NAME "gsettings-backend" + +/** + * GSettingsBackend: + * + * An implementation of a settings storage repository. + **/ +typedef struct _GSettingsBackendPrivate GSettingsBackendPrivate; +typedef struct _GSettingsBackendClass GSettingsBackendClass; + +/** + * GSettingsBackendClass: + * @read: virtual method to read a key's value + * @get_writable: virtual method to get if a key is writable + * @write: virtual method to change key's value + * @write_tree: virtual method to change a tree of keys + * @reset: virtual method to reset state + * @subscribe: virtual method to subscribe to key changes + * @unsubscribe: virtual method to unsubscribe to key changes + * @sync: virtual method to sync state + * @get_permission: virtual method to get permission of a key + * @read_user_value: virtual method to read user's key value + * + * Class structure for #GSettingsBackend. + */ +struct _GSettingsBackendClass +{ + GObjectClass parent_class; + + GVariant * (*read) (GSettingsBackend *backend, + const gchar *key, + const GVariantType *expected_type, + gboolean default_value); + + gboolean (*get_writable) (GSettingsBackend *backend, + const gchar *key); + + gboolean (*write) (GSettingsBackend *backend, + const gchar *key, + GVariant *value, + gpointer origin_tag); + gboolean (*write_tree) (GSettingsBackend *backend, + GTree *tree, + gpointer origin_tag); + void (*reset) (GSettingsBackend *backend, + const gchar *key, + gpointer origin_tag); + + void (*subscribe) (GSettingsBackend *backend, + const gchar *name); + void (*unsubscribe) (GSettingsBackend *backend, + const gchar *name); + void (*sync) (GSettingsBackend *backend); + + GPermission * (*get_permission) (GSettingsBackend *backend, + const gchar *path); + + GVariant * (*read_user_value) (GSettingsBackend *backend, + const gchar *key, + const GVariantType *expected_type); + + /*< private >*/ + gpointer padding[23]; +}; + +struct _GSettingsBackend +{ + GObject parent_instance; + + /*< private >*/ + GSettingsBackendPrivate *priv; +}; + +GIO_AVAILABLE_IN_ALL +GType g_settings_backend_get_type (void); + +GIO_AVAILABLE_IN_ALL +void g_settings_backend_changed (GSettingsBackend *backend, + const gchar *key, + gpointer origin_tag); +GIO_AVAILABLE_IN_ALL +void g_settings_backend_path_changed (GSettingsBackend *backend, + const gchar *path, + gpointer origin_tag); +GIO_AVAILABLE_IN_ALL +void g_settings_backend_flatten_tree (GTree *tree, + gchar **path, + const gchar ***keys, + GVariant ***values); +GIO_AVAILABLE_IN_ALL +void g_settings_backend_keys_changed (GSettingsBackend *backend, + const gchar *path, + gchar const * const *items, + gpointer origin_tag); + +GIO_AVAILABLE_IN_ALL +void g_settings_backend_path_writable_changed (GSettingsBackend *backend, + const gchar *path); +GIO_AVAILABLE_IN_ALL +void g_settings_backend_writable_changed (GSettingsBackend *backend, + const gchar *key); +GIO_AVAILABLE_IN_ALL +void g_settings_backend_changed_tree (GSettingsBackend *backend, + GTree *tree, + gpointer origin_tag); + +GIO_AVAILABLE_IN_ALL +GSettingsBackend * g_settings_backend_get_default (void); + +GIO_AVAILABLE_IN_ALL +GSettingsBackend * g_keyfile_settings_backend_new (const gchar *filename, + const gchar *root_path, + const gchar *root_group); + +GIO_AVAILABLE_IN_ALL +GSettingsBackend * g_null_settings_backend_new (void); + +GIO_AVAILABLE_IN_ALL +GSettingsBackend * g_memory_settings_backend_new (void); + +G_END_DECLS + +#endif /* __G_SETTINGS_BACKEND_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsettingsschema.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsettingsschema.h new file mode 100644 index 0000000..a3bb7df --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsettingsschema.h @@ -0,0 +1,115 @@ +/* + * Copyright © 2010 Codethink Limited + * Copyright © 2011 Canonical Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef __G_SETTINGS_SCHEMA_H__ +#define __G_SETTINGS_SCHEMA_H__ + +#include +#include + +G_BEGIN_DECLS + +typedef struct _GSettingsSchemaSource GSettingsSchemaSource; +typedef struct _GSettingsSchema GSettingsSchema; +typedef struct _GSettingsSchemaKey GSettingsSchemaKey; + +#define G_TYPE_SETTINGS_SCHEMA_SOURCE (g_settings_schema_source_get_type ()) +GIO_AVAILABLE_IN_2_32 +GType g_settings_schema_source_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_32 +GSettingsSchemaSource * g_settings_schema_source_get_default (void); +GIO_AVAILABLE_IN_2_32 +GSettingsSchemaSource * g_settings_schema_source_ref (GSettingsSchemaSource *source); +GIO_AVAILABLE_IN_2_32 +void g_settings_schema_source_unref (GSettingsSchemaSource *source); + +GIO_AVAILABLE_IN_2_32 +GSettingsSchemaSource * g_settings_schema_source_new_from_directory (const gchar *directory, + GSettingsSchemaSource *parent, + gboolean trusted, + GError **error); + +GIO_AVAILABLE_IN_2_32 +GSettingsSchema * g_settings_schema_source_lookup (GSettingsSchemaSource *source, + const gchar *schema_id, + gboolean recursive); + +GIO_AVAILABLE_IN_2_40 +void g_settings_schema_source_list_schemas (GSettingsSchemaSource *source, + gboolean recursive, + gchar ***non_relocatable, + gchar ***relocatable); + +#define G_TYPE_SETTINGS_SCHEMA (g_settings_schema_get_type ()) +GIO_AVAILABLE_IN_2_32 +GType g_settings_schema_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_32 +GSettingsSchema * g_settings_schema_ref (GSettingsSchema *schema); +GIO_AVAILABLE_IN_2_32 +void g_settings_schema_unref (GSettingsSchema *schema); + +GIO_AVAILABLE_IN_2_32 +const gchar * g_settings_schema_get_id (GSettingsSchema *schema); +GIO_AVAILABLE_IN_2_32 +const gchar * g_settings_schema_get_path (GSettingsSchema *schema); +GIO_AVAILABLE_IN_2_40 +GSettingsSchemaKey * g_settings_schema_get_key (GSettingsSchema *schema, + const gchar *name); +GIO_AVAILABLE_IN_2_40 +gboolean g_settings_schema_has_key (GSettingsSchema *schema, + const gchar *name); +GIO_AVAILABLE_IN_2_46 +gchar** g_settings_schema_list_keys (GSettingsSchema *schema); + + +GIO_AVAILABLE_IN_2_44 +gchar ** g_settings_schema_list_children (GSettingsSchema *schema); + +#define G_TYPE_SETTINGS_SCHEMA_KEY (g_settings_schema_key_get_type ()) +GIO_AVAILABLE_IN_2_40 +GType g_settings_schema_key_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_40 +GSettingsSchemaKey * g_settings_schema_key_ref (GSettingsSchemaKey *key); +GIO_AVAILABLE_IN_2_40 +void g_settings_schema_key_unref (GSettingsSchemaKey *key); + +GIO_AVAILABLE_IN_2_40 +const GVariantType * g_settings_schema_key_get_value_type (GSettingsSchemaKey *key); +GIO_AVAILABLE_IN_2_40 +GVariant * g_settings_schema_key_get_default_value (GSettingsSchemaKey *key); +GIO_AVAILABLE_IN_2_40 +GVariant * g_settings_schema_key_get_range (GSettingsSchemaKey *key); +GIO_AVAILABLE_IN_2_40 +gboolean g_settings_schema_key_range_check (GSettingsSchemaKey *key, + GVariant *value); + +GIO_AVAILABLE_IN_2_44 +const gchar * g_settings_schema_key_get_name (GSettingsSchemaKey *key); +GIO_AVAILABLE_IN_2_40 +const gchar * g_settings_schema_key_get_summary (GSettingsSchemaKey *key); +GIO_AVAILABLE_IN_2_40 +const gchar * g_settings_schema_key_get_description (GSettingsSchemaKey *key); + +G_END_DECLS + +#endif /* __G_SETTINGS_SCHEMA_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimpleaction.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimpleaction.h new file mode 100644 index 0000000..ce80e7a --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimpleaction.h @@ -0,0 +1,65 @@ +/* + * Copyright © 2010 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + */ + +#ifndef __G_SIMPLE_ACTION_H__ +#define __G_SIMPLE_ACTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_SIMPLE_ACTION (g_simple_action_get_type ()) +#define G_SIMPLE_ACTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SIMPLE_ACTION, GSimpleAction)) +#define G_IS_SIMPLE_ACTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SIMPLE_ACTION)) + +GIO_AVAILABLE_IN_ALL +GType g_simple_action_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GSimpleAction * g_simple_action_new (const gchar *name, + const GVariantType *parameter_type); + +GIO_AVAILABLE_IN_ALL +GSimpleAction * g_simple_action_new_stateful (const gchar *name, + const GVariantType *parameter_type, + GVariant *state); + +GIO_AVAILABLE_IN_ALL +void g_simple_action_set_enabled (GSimpleAction *simple, + gboolean enabled); + +GIO_AVAILABLE_IN_2_30 +void g_simple_action_set_state (GSimpleAction *simple, + GVariant *value); + +GIO_AVAILABLE_IN_2_44 +void g_simple_action_set_state_hint (GSimpleAction *simple, + GVariant *state_hint); + +G_END_DECLS + +#endif /* __G_SIMPLE_ACTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimpleactiongroup.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimpleactiongroup.h new file mode 100644 index 0000000..99282ba --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimpleactiongroup.h @@ -0,0 +1,99 @@ +/* + * Copyright © 2010 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + */ + +#ifndef __G_SIMPLE_ACTION_GROUP_H__ +#define __G_SIMPLE_ACTION_GROUP_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include "gactiongroup.h" +#include "gactionmap.h" + +G_BEGIN_DECLS + +#define G_TYPE_SIMPLE_ACTION_GROUP (g_simple_action_group_get_type ()) +#define G_SIMPLE_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SIMPLE_ACTION_GROUP, GSimpleActionGroup)) +#define G_SIMPLE_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SIMPLE_ACTION_GROUP, GSimpleActionGroupClass)) +#define G_IS_SIMPLE_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SIMPLE_ACTION_GROUP)) +#define G_IS_SIMPLE_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_SIMPLE_ACTION_GROUP)) +#define G_SIMPLE_ACTION_GROUP_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SIMPLE_ACTION_GROUP, GSimpleActionGroupClass)) + +typedef struct _GSimpleActionGroupPrivate GSimpleActionGroupPrivate; +typedef struct _GSimpleActionGroupClass GSimpleActionGroupClass; + +/** + * GSimpleActionGroup: + * + * The #GSimpleActionGroup structure contains private data and should only be accessed using the provided API. + * + * Since: 2.28 + */ +struct _GSimpleActionGroup +{ + /*< private >*/ + GObject parent_instance; + + GSimpleActionGroupPrivate *priv; +}; + +struct _GSimpleActionGroupClass +{ + /*< private >*/ + GObjectClass parent_class; + + /*< private >*/ + gpointer padding[12]; +}; + +GIO_AVAILABLE_IN_ALL +GType g_simple_action_group_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GSimpleActionGroup * g_simple_action_group_new (void); + +GIO_DEPRECATED_IN_2_38_FOR (g_action_map_lookup_action) +GAction * g_simple_action_group_lookup (GSimpleActionGroup *simple, + const gchar *action_name); + +GIO_DEPRECATED_IN_2_38_FOR (g_action_map_add_action) +void g_simple_action_group_insert (GSimpleActionGroup *simple, + GAction *action); + +GIO_DEPRECATED_IN_2_38_FOR (g_action_map_remove_action) +void g_simple_action_group_remove (GSimpleActionGroup *simple, + const gchar *action_name); + +GIO_DEPRECATED_IN_2_38_FOR (g_action_map_add_action_entries) +void g_simple_action_group_add_entries (GSimpleActionGroup *simple, + const GActionEntry *entries, + gint n_entries, + gpointer user_data); + +G_END_DECLS + +#endif /* __G_SIMPLE_ACTION_GROUP_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimpleasyncresult.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimpleasyncresult.h new file mode 100644 index 0000000..12efb9c --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimpleasyncresult.h @@ -0,0 +1,164 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_SIMPLE_ASYNC_RESULT_H__ +#define __G_SIMPLE_ASYNC_RESULT_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_SIMPLE_ASYNC_RESULT (g_simple_async_result_get_type ()) +#define G_SIMPLE_ASYNC_RESULT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SIMPLE_ASYNC_RESULT, GSimpleAsyncResult)) +#define G_SIMPLE_ASYNC_RESULT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_SIMPLE_ASYNC_RESULT, GSimpleAsyncResultClass)) +#define G_IS_SIMPLE_ASYNC_RESULT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SIMPLE_ASYNC_RESULT)) +#define G_IS_SIMPLE_ASYNC_RESULT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_SIMPLE_ASYNC_RESULT)) +#define G_SIMPLE_ASYNC_RESULT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_SIMPLE_ASYNC_RESULT, GSimpleAsyncResultClass)) + +/** + * GSimpleAsyncResult: + * + * A simple implementation of #GAsyncResult. + **/ +typedef struct _GSimpleAsyncResultClass GSimpleAsyncResultClass; + + +GIO_AVAILABLE_IN_ALL +GType g_simple_async_result_get_type (void) G_GNUC_CONST; + +GIO_DEPRECATED_IN_2_46_FOR(g_task_new) +GSimpleAsyncResult *g_simple_async_result_new (GObject *source_object, + GAsyncReadyCallback callback, + gpointer user_data, + gpointer source_tag); +GIO_DEPRECATED_IN_2_46_FOR(g_task_new) +GSimpleAsyncResult *g_simple_async_result_new_error (GObject *source_object, + GAsyncReadyCallback callback, + gpointer user_data, + GQuark domain, + gint code, + const char *format, + ...) G_GNUC_PRINTF (6, 7); +GIO_DEPRECATED_IN_2_46_FOR(g_task_new) +GSimpleAsyncResult *g_simple_async_result_new_from_error (GObject *source_object, + GAsyncReadyCallback callback, + gpointer user_data, + const GError *error); +GIO_DEPRECATED_IN_2_46_FOR(g_task_new) +GSimpleAsyncResult *g_simple_async_result_new_take_error (GObject *source_object, + GAsyncReadyCallback callback, + gpointer user_data, + GError *error); + +GIO_DEPRECATED_IN_2_46 +void g_simple_async_result_set_op_res_gpointer (GSimpleAsyncResult *simple, + gpointer op_res, + GDestroyNotify destroy_op_res); +GIO_DEPRECATED_IN_2_46 +gpointer g_simple_async_result_get_op_res_gpointer (GSimpleAsyncResult *simple); + +GIO_DEPRECATED_IN_2_46 +void g_simple_async_result_set_op_res_gssize (GSimpleAsyncResult *simple, + gssize op_res); +GIO_DEPRECATED_IN_2_46 +gssize g_simple_async_result_get_op_res_gssize (GSimpleAsyncResult *simple); + +GIO_DEPRECATED_IN_2_46 +void g_simple_async_result_set_op_res_gboolean (GSimpleAsyncResult *simple, + gboolean op_res); +GIO_DEPRECATED_IN_2_46 +gboolean g_simple_async_result_get_op_res_gboolean (GSimpleAsyncResult *simple); + + + +GIO_AVAILABLE_IN_2_32 /* Also deprecated, but can't mark something both AVAILABLE and DEPRECATED */ +void g_simple_async_result_set_check_cancellable (GSimpleAsyncResult *simple, + GCancellable *check_cancellable); +GIO_DEPRECATED_IN_2_46 +gpointer g_simple_async_result_get_source_tag (GSimpleAsyncResult *simple); +GIO_DEPRECATED_IN_2_46 +void g_simple_async_result_set_handle_cancellation (GSimpleAsyncResult *simple, + gboolean handle_cancellation); +GIO_DEPRECATED_IN_2_46 +void g_simple_async_result_complete (GSimpleAsyncResult *simple); +GIO_DEPRECATED_IN_2_46 +void g_simple_async_result_complete_in_idle (GSimpleAsyncResult *simple); +GIO_DEPRECATED_IN_2_46 +void g_simple_async_result_run_in_thread (GSimpleAsyncResult *simple, + GSimpleAsyncThreadFunc func, + int io_priority, + GCancellable *cancellable); +GIO_DEPRECATED_IN_2_46 +void g_simple_async_result_set_from_error (GSimpleAsyncResult *simple, + const GError *error); +GIO_DEPRECATED_IN_2_46 +void g_simple_async_result_take_error (GSimpleAsyncResult *simple, + GError *error); +GIO_DEPRECATED_IN_2_46 +gboolean g_simple_async_result_propagate_error (GSimpleAsyncResult *simple, + GError **dest); +GIO_DEPRECATED_IN_2_46 +void g_simple_async_result_set_error (GSimpleAsyncResult *simple, + GQuark domain, + gint code, + const char *format, + ...) G_GNUC_PRINTF (4, 5); +GIO_DEPRECATED_IN_2_46 +void g_simple_async_result_set_error_va (GSimpleAsyncResult *simple, + GQuark domain, + gint code, + const char *format, + va_list args) + G_GNUC_PRINTF(4, 0); +GIO_DEPRECATED_IN_2_46 +gboolean g_simple_async_result_is_valid (GAsyncResult *result, + GObject *source, + gpointer source_tag); + +GIO_DEPRECATED_IN_2_46_FOR(g_task_report_error) +void g_simple_async_report_error_in_idle (GObject *object, + GAsyncReadyCallback callback, + gpointer user_data, + GQuark domain, + gint code, + const char *format, + ...) G_GNUC_PRINTF(6, 7); +GIO_DEPRECATED_IN_2_46_FOR(g_task_report_error) +void g_simple_async_report_gerror_in_idle (GObject *object, + GAsyncReadyCallback callback, + gpointer user_data, + const GError *error); +GIO_DEPRECATED_IN_2_46_FOR(g_task_report_error) +void g_simple_async_report_take_gerror_in_idle (GObject *object, + GAsyncReadyCallback callback, + gpointer user_data, + GError *error); + +G_END_DECLS + + + +#endif /* __G_SIMPLE_ASYNC_RESULT_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimpleiostream.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimpleiostream.h new file mode 100644 index 0000000..1d98ffe --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimpleiostream.h @@ -0,0 +1,47 @@ +/* + * Copyright © 2014 NICE s.r.l. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ignacio Casal Quinteiro + */ + +#ifndef __G_SIMPLE_IO_STREAM_H__ +#define __G_SIMPLE_IO_STREAM_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +#define G_TYPE_SIMPLE_IO_STREAM (g_simple_io_stream_get_type ()) +#define G_SIMPLE_IO_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_SIMPLE_IO_STREAM, GSimpleIOStream)) +#define G_IS_SIMPLE_IO_STREAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_SIMPLE_IO_STREAM)) + +GIO_AVAILABLE_IN_2_44 +GType g_simple_io_stream_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_44 +GIOStream *g_simple_io_stream_new (GInputStream *input_stream, + GOutputStream *output_stream); + +G_END_DECLS + +#endif /* __G_SIMPLE_IO_STREAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimplepermission.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimplepermission.h new file mode 100644 index 0000000..19c42d7 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimplepermission.h @@ -0,0 +1,47 @@ +/* + * Copyright © 2010 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Author: Ryan Lortie + */ + +#ifndef __G_SIMPLE_PERMISSION_H__ +#define __G_SIMPLE_PERMISSION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_SIMPLE_PERMISSION (g_simple_permission_get_type ()) +#define G_SIMPLE_PERMISSION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SIMPLE_PERMISSION, \ + GSimplePermission)) +#define G_IS_SIMPLE_PERMISSION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SIMPLE_PERMISSION)) + +GIO_AVAILABLE_IN_ALL +GType g_simple_permission_get_type (void); +GIO_AVAILABLE_IN_ALL +GPermission * g_simple_permission_new (gboolean allowed); + +G_END_DECLS + +#endif /* __G_SIMPLE_PERMISSION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimpleproxyresolver.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimpleproxyresolver.h new file mode 100644 index 0000000..2e5f4b2 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsimpleproxyresolver.h @@ -0,0 +1,91 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright 2010, 2013 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_SIMPLE_PROXY_RESOLVER_H__ +#define __G_SIMPLE_PROXY_RESOLVER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_SIMPLE_PROXY_RESOLVER (g_simple_proxy_resolver_get_type ()) +#define G_SIMPLE_PROXY_RESOLVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SIMPLE_PROXY_RESOLVER, GSimpleProxyResolver)) +#define G_SIMPLE_PROXY_RESOLVER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_SIMPLE_PROXY_RESOLVER, GSimpleProxyResolverClass)) +#define G_IS_SIMPLE_PROXY_RESOLVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SIMPLE_PROXY_RESOLVER)) +#define G_IS_SIMPLE_PROXY_RESOLVER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_SIMPLE_PROXY_RESOLVER)) +#define G_SIMPLE_PROXY_RESOLVER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_SIMPLE_PROXY_RESOLVER, GSimpleProxyResolverClass)) + +/** + * GSimpleProxyResolver: + * + * A #GProxyResolver implementation for using a fixed set of proxies. + **/ +typedef struct _GSimpleProxyResolver GSimpleProxyResolver; +typedef struct _GSimpleProxyResolverPrivate GSimpleProxyResolverPrivate; +typedef struct _GSimpleProxyResolverClass GSimpleProxyResolverClass; + +struct _GSimpleProxyResolver +{ + GObject parent_instance; + + /*< private >*/ + GSimpleProxyResolverPrivate *priv; +}; + +struct _GSimpleProxyResolverClass +{ + GObjectClass parent_class; + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +GIO_AVAILABLE_IN_2_36 +GType g_simple_proxy_resolver_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_36 +GProxyResolver *g_simple_proxy_resolver_new (const gchar *default_proxy, + gchar **ignore_hosts); + +GIO_AVAILABLE_IN_2_36 +void g_simple_proxy_resolver_set_default_proxy (GSimpleProxyResolver *resolver, + const gchar *default_proxy); + +GIO_AVAILABLE_IN_2_36 +void g_simple_proxy_resolver_set_ignore_hosts (GSimpleProxyResolver *resolver, + gchar **ignore_hosts); + +GIO_AVAILABLE_IN_2_36 +void g_simple_proxy_resolver_set_uri_proxy (GSimpleProxyResolver *resolver, + const gchar *uri_scheme, + const gchar *proxy); + +G_END_DECLS + +#endif /* __G_SIMPLE_PROXY_RESOLVER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocket.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocket.h new file mode 100644 index 0000000..0f0624b --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocket.h @@ -0,0 +1,330 @@ +/* + * Copyright © 2008 Christian Kellner, Samuel Cormier-Iijima + * Copyright © 2009 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Christian Kellner + * Samuel Cormier-Iijima + * Ryan Lortie + */ + +#ifndef __G_SOCKET_H__ +#define __G_SOCKET_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET (g_socket_get_type ()) +#define G_SOCKET(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SOCKET, GSocket)) +#define G_SOCKET_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SOCKET, GSocketClass)) +#define G_IS_SOCKET(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SOCKET)) +#define G_IS_SOCKET_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_SOCKET)) +#define G_SOCKET_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SOCKET, GSocketClass)) + +typedef struct _GSocketPrivate GSocketPrivate; +typedef struct _GSocketClass GSocketClass; + +struct _GSocketClass +{ + GObjectClass parent_class; + + /*< private >*/ + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); + void (*_g_reserved7) (void); + void (*_g_reserved8) (void); + void (*_g_reserved9) (void); + void (*_g_reserved10) (void); +}; + +struct _GSocket +{ + GObject parent_instance; + GSocketPrivate *priv; +}; + +GIO_AVAILABLE_IN_ALL +GType g_socket_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GSocket * g_socket_new (GSocketFamily family, + GSocketType type, + GSocketProtocol protocol, + GError **error); +GIO_AVAILABLE_IN_ALL +GSocket * g_socket_new_from_fd (gint fd, + GError **error); +GIO_AVAILABLE_IN_ALL +int g_socket_get_fd (GSocket *socket); +GIO_AVAILABLE_IN_ALL +GSocketFamily g_socket_get_family (GSocket *socket); +GIO_AVAILABLE_IN_ALL +GSocketType g_socket_get_socket_type (GSocket *socket); +GIO_AVAILABLE_IN_ALL +GSocketProtocol g_socket_get_protocol (GSocket *socket); +GIO_AVAILABLE_IN_ALL +GSocketAddress * g_socket_get_local_address (GSocket *socket, + GError **error); +GIO_AVAILABLE_IN_ALL +GSocketAddress * g_socket_get_remote_address (GSocket *socket, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_socket_set_blocking (GSocket *socket, + gboolean blocking); +GIO_AVAILABLE_IN_ALL +gboolean g_socket_get_blocking (GSocket *socket); +GIO_AVAILABLE_IN_ALL +void g_socket_set_keepalive (GSocket *socket, + gboolean keepalive); +GIO_AVAILABLE_IN_ALL +gboolean g_socket_get_keepalive (GSocket *socket); +GIO_AVAILABLE_IN_ALL +gint g_socket_get_listen_backlog (GSocket *socket); +GIO_AVAILABLE_IN_ALL +void g_socket_set_listen_backlog (GSocket *socket, + gint backlog); +GIO_AVAILABLE_IN_ALL +guint g_socket_get_timeout (GSocket *socket); +GIO_AVAILABLE_IN_ALL +void g_socket_set_timeout (GSocket *socket, + guint timeout); + +GIO_AVAILABLE_IN_2_32 +guint g_socket_get_ttl (GSocket *socket); +GIO_AVAILABLE_IN_2_32 +void g_socket_set_ttl (GSocket *socket, + guint ttl); + +GIO_AVAILABLE_IN_2_32 +gboolean g_socket_get_broadcast (GSocket *socket); +GIO_AVAILABLE_IN_2_32 +void g_socket_set_broadcast (GSocket *socket, + gboolean broadcast); + +GIO_AVAILABLE_IN_2_32 +gboolean g_socket_get_multicast_loopback (GSocket *socket); +GIO_AVAILABLE_IN_2_32 +void g_socket_set_multicast_loopback (GSocket *socket, + gboolean loopback); +GIO_AVAILABLE_IN_2_32 +guint g_socket_get_multicast_ttl (GSocket *socket); +GIO_AVAILABLE_IN_2_32 +void g_socket_set_multicast_ttl (GSocket *socket, + guint ttl); +GIO_AVAILABLE_IN_ALL +gboolean g_socket_is_connected (GSocket *socket); +GIO_AVAILABLE_IN_ALL +gboolean g_socket_bind (GSocket *socket, + GSocketAddress *address, + gboolean allow_reuse, + GError **error); +GIO_AVAILABLE_IN_2_32 +gboolean g_socket_join_multicast_group (GSocket *socket, + GInetAddress *group, + gboolean source_specific, + const gchar *iface, + GError **error); +GIO_AVAILABLE_IN_2_32 +gboolean g_socket_leave_multicast_group (GSocket *socket, + GInetAddress *group, + gboolean source_specific, + const gchar *iface, + GError **error); +GIO_AVAILABLE_IN_2_56 +gboolean g_socket_join_multicast_group_ssm (GSocket *socket, + GInetAddress *group, + GInetAddress *source_specific, + const gchar *iface, + GError **error); +GIO_AVAILABLE_IN_2_56 +gboolean g_socket_leave_multicast_group_ssm (GSocket *socket, + GInetAddress *group, + GInetAddress *source_specific, + const gchar *iface, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_socket_connect (GSocket *socket, + GSocketAddress *address, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_socket_check_connect_result (GSocket *socket, + GError **error); + +GIO_AVAILABLE_IN_ALL +gssize g_socket_get_available_bytes (GSocket *socket); + +GIO_AVAILABLE_IN_ALL +GIOCondition g_socket_condition_check (GSocket *socket, + GIOCondition condition); +GIO_AVAILABLE_IN_ALL +gboolean g_socket_condition_wait (GSocket *socket, + GIOCondition condition, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_32 +gboolean g_socket_condition_timed_wait (GSocket *socket, + GIOCondition condition, + gint64 timeout_us, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +GSocket * g_socket_accept (GSocket *socket, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_socket_listen (GSocket *socket, + GError **error); +GIO_AVAILABLE_IN_ALL +gssize g_socket_receive (GSocket *socket, + gchar *buffer, + gsize size, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gssize g_socket_receive_from (GSocket *socket, + GSocketAddress **address, + gchar *buffer, + gsize size, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gssize g_socket_send (GSocket *socket, + const gchar *buffer, + gsize size, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gssize g_socket_send_to (GSocket *socket, + GSocketAddress *address, + const gchar *buffer, + gsize size, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gssize g_socket_receive_message (GSocket *socket, + GSocketAddress **address, + GInputVector *vectors, + gint num_vectors, + GSocketControlMessage ***messages, + gint *num_messages, + gint *flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gssize g_socket_send_message (GSocket *socket, + GSocketAddress *address, + GOutputVector *vectors, + gint num_vectors, + GSocketControlMessage **messages, + gint num_messages, + gint flags, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_48 +gint g_socket_receive_messages (GSocket *socket, + GInputMessage *messages, + guint num_messages, + gint flags, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_44 +gint g_socket_send_messages (GSocket *socket, + GOutputMessage *messages, + guint num_messages, + gint flags, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_socket_close (GSocket *socket, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_socket_shutdown (GSocket *socket, + gboolean shutdown_read, + gboolean shutdown_write, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_socket_is_closed (GSocket *socket); +GIO_AVAILABLE_IN_ALL +GSource * g_socket_create_source (GSocket *socket, + GIOCondition condition, + GCancellable *cancellable); +GIO_AVAILABLE_IN_ALL +gboolean g_socket_speaks_ipv4 (GSocket *socket); +GIO_AVAILABLE_IN_ALL +GCredentials *g_socket_get_credentials (GSocket *socket, + GError **error); + +GIO_AVAILABLE_IN_ALL +gssize g_socket_receive_with_blocking (GSocket *socket, + gchar *buffer, + gsize size, + gboolean blocking, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gssize g_socket_send_with_blocking (GSocket *socket, + const gchar *buffer, + gsize size, + gboolean blocking, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_60 +GPollableReturn g_socket_send_message_with_timeout (GSocket *socket, + GSocketAddress *address, + const GOutputVector *vectors, + gint num_vectors, + GSocketControlMessage **messages, + gint num_messages, + gint flags, + gint64 timeout_us, + gsize *bytes_written, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_36 +gboolean g_socket_get_option (GSocket *socket, + gint level, + gint optname, + gint *value, + GError **error); +GIO_AVAILABLE_IN_2_36 +gboolean g_socket_set_option (GSocket *socket, + gint level, + gint optname, + gint value, + GError **error); + +G_END_DECLS + +#endif /* __G_SOCKET_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketaddress.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketaddress.h new file mode 100644 index 0000000..b2dcef2 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketaddress.h @@ -0,0 +1,84 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Christian Kellner + * Samuel Cormier-Iijima + */ + +#ifndef __G_SOCKET_ADDRESS_H__ +#define __G_SOCKET_ADDRESS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET_ADDRESS (g_socket_address_get_type ()) +#define G_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SOCKET_ADDRESS, GSocketAddress)) +#define G_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_SOCKET_ADDRESS, GSocketAddressClass)) +#define G_IS_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SOCKET_ADDRESS)) +#define G_IS_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_SOCKET_ADDRESS)) +#define G_SOCKET_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_SOCKET_ADDRESS, GSocketAddressClass)) + +typedef struct _GSocketAddressClass GSocketAddressClass; + +struct _GSocketAddress +{ + GObject parent_instance; +}; + +struct _GSocketAddressClass +{ + GObjectClass parent_class; + + GSocketFamily (*get_family) (GSocketAddress *address); + + gssize (*get_native_size) (GSocketAddress *address); + + gboolean (*to_native) (GSocketAddress *address, + gpointer dest, + gsize destlen, + GError **error); +}; + +GIO_AVAILABLE_IN_ALL +GType g_socket_address_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GSocketFamily g_socket_address_get_family (GSocketAddress *address); + +GIO_AVAILABLE_IN_ALL +GSocketAddress * g_socket_address_new_from_native (gpointer native, + gsize len); + +GIO_AVAILABLE_IN_ALL +gboolean g_socket_address_to_native (GSocketAddress *address, + gpointer dest, + gsize destlen, + GError **error); + +GIO_AVAILABLE_IN_ALL +gssize g_socket_address_get_native_size (GSocketAddress *address); + +G_END_DECLS + +#endif /* __G_SOCKET_ADDRESS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketaddressenumerator.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketaddressenumerator.h new file mode 100644 index 0000000..ceee6a3 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketaddressenumerator.h @@ -0,0 +1,103 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_SOCKET_ADDRESS_ENUMERATOR_H__ +#define __G_SOCKET_ADDRESS_ENUMERATOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET_ADDRESS_ENUMERATOR (g_socket_address_enumerator_get_type ()) +#define G_SOCKET_ADDRESS_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SOCKET_ADDRESS_ENUMERATOR, GSocketAddressEnumerator)) +#define G_SOCKET_ADDRESS_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_SOCKET_ADDRESS_ENUMERATOR, GSocketAddressEnumeratorClass)) +#define G_IS_SOCKET_ADDRESS_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SOCKET_ADDRESS_ENUMERATOR)) +#define G_IS_SOCKET_ADDRESS_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_SOCKET_ADDRESS_ENUMERATOR)) +#define G_SOCKET_ADDRESS_ENUMERATOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_SOCKET_ADDRESS_ENUMERATOR, GSocketAddressEnumeratorClass)) + +/** + * GSocketAddressEnumerator: + * + * Enumerator type for objects that contain or generate + * #GSocketAddress instances. + */ +typedef struct _GSocketAddressEnumeratorClass GSocketAddressEnumeratorClass; + +struct _GSocketAddressEnumerator +{ + /*< private >*/ + GObject parent_instance; +}; + +/** + * GSocketAddressEnumeratorClass: + * @next: Virtual method for g_socket_address_enumerator_next(). + * @next_async: Virtual method for g_socket_address_enumerator_next_async(). + * @next_finish: Virtual method for g_socket_address_enumerator_next_finish(). + * + * Class structure for #GSocketAddressEnumerator. + */ +struct _GSocketAddressEnumeratorClass +{ + /*< private >*/ + GObjectClass parent_class; + + /*< public >*/ + /* Virtual Table */ + + GSocketAddress * (* next) (GSocketAddressEnumerator *enumerator, + GCancellable *cancellable, + GError **error); + + void (* next_async) (GSocketAddressEnumerator *enumerator, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + GSocketAddress * (* next_finish) (GSocketAddressEnumerator *enumerator, + GAsyncResult *result, + GError **error); +}; + +GIO_AVAILABLE_IN_ALL +GType g_socket_address_enumerator_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GSocketAddress *g_socket_address_enumerator_next (GSocketAddressEnumerator *enumerator, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_socket_address_enumerator_next_async (GSocketAddressEnumerator *enumerator, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GSocketAddress *g_socket_address_enumerator_next_finish (GSocketAddressEnumerator *enumerator, + GAsyncResult *result, + GError **error); + +G_END_DECLS + + +#endif /* __G_SOCKET_ADDRESS_ENUMERATOR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketclient.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketclient.h new file mode 100644 index 0000000..e9f815e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketclient.h @@ -0,0 +1,199 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2008, 2009 Codethink Limited + * Copyright © 2009 Red Hat, Inc + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + * Alexander Larsson + */ + +#ifndef __G_SOCKET_CLIENT_H__ +#define __G_SOCKET_CLIENT_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET_CLIENT (g_socket_client_get_type ()) +#define G_SOCKET_CLIENT(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SOCKET_CLIENT, GSocketClient)) +#define G_SOCKET_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SOCKET_CLIENT, GSocketClientClass)) +#define G_IS_SOCKET_CLIENT(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SOCKET_CLIENT)) +#define G_IS_SOCKET_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_SOCKET_CLIENT)) +#define G_SOCKET_CLIENT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SOCKET_CLIENT, GSocketClientClass)) + +typedef struct _GSocketClientPrivate GSocketClientPrivate; +typedef struct _GSocketClientClass GSocketClientClass; + +struct _GSocketClientClass +{ + GObjectClass parent_class; + + void (* event) (GSocketClient *client, + GSocketClientEvent event, + GSocketConnectable *connectable, + GIOStream *connection); + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); +}; + +struct _GSocketClient +{ + GObject parent_instance; + GSocketClientPrivate *priv; +}; + +GIO_AVAILABLE_IN_ALL +GType g_socket_client_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GSocketClient *g_socket_client_new (void); + +GIO_AVAILABLE_IN_ALL +GSocketFamily g_socket_client_get_family (GSocketClient *client); +GIO_AVAILABLE_IN_ALL +void g_socket_client_set_family (GSocketClient *client, + GSocketFamily family); +GIO_AVAILABLE_IN_ALL +GSocketType g_socket_client_get_socket_type (GSocketClient *client); +GIO_AVAILABLE_IN_ALL +void g_socket_client_set_socket_type (GSocketClient *client, + GSocketType type); +GIO_AVAILABLE_IN_ALL +GSocketProtocol g_socket_client_get_protocol (GSocketClient *client); +GIO_AVAILABLE_IN_ALL +void g_socket_client_set_protocol (GSocketClient *client, + GSocketProtocol protocol); +GIO_AVAILABLE_IN_ALL +GSocketAddress *g_socket_client_get_local_address (GSocketClient *client); +GIO_AVAILABLE_IN_ALL +void g_socket_client_set_local_address (GSocketClient *client, + GSocketAddress *address); +GIO_AVAILABLE_IN_ALL +guint g_socket_client_get_timeout (GSocketClient *client); +GIO_AVAILABLE_IN_ALL +void g_socket_client_set_timeout (GSocketClient *client, + guint timeout); +GIO_AVAILABLE_IN_ALL +gboolean g_socket_client_get_enable_proxy (GSocketClient *client); +GIO_AVAILABLE_IN_ALL +void g_socket_client_set_enable_proxy (GSocketClient *client, + gboolean enable); + +GIO_AVAILABLE_IN_2_28 +gboolean g_socket_client_get_tls (GSocketClient *client); +GIO_AVAILABLE_IN_2_28 +void g_socket_client_set_tls (GSocketClient *client, + gboolean tls); +GIO_DEPRECATED_IN_2_72 +GTlsCertificateFlags g_socket_client_get_tls_validation_flags (GSocketClient *client); +GIO_DEPRECATED_IN_2_72 +void g_socket_client_set_tls_validation_flags (GSocketClient *client, + GTlsCertificateFlags flags); +GIO_AVAILABLE_IN_2_36 +GProxyResolver *g_socket_client_get_proxy_resolver (GSocketClient *client); +GIO_AVAILABLE_IN_2_36 +void g_socket_client_set_proxy_resolver (GSocketClient *client, + GProxyResolver *proxy_resolver); + +GIO_AVAILABLE_IN_ALL +GSocketConnection * g_socket_client_connect (GSocketClient *client, + GSocketConnectable *connectable, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +GSocketConnection * g_socket_client_connect_to_host (GSocketClient *client, + const gchar *host_and_port, + guint16 default_port, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +GSocketConnection * g_socket_client_connect_to_service (GSocketClient *client, + const gchar *domain, + const gchar *service, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_26 +GSocketConnection * g_socket_client_connect_to_uri (GSocketClient *client, + const gchar *uri, + guint16 default_port, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_socket_client_connect_async (GSocketClient *client, + GSocketConnectable *connectable, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GSocketConnection * g_socket_client_connect_finish (GSocketClient *client, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_socket_client_connect_to_host_async (GSocketClient *client, + const gchar *host_and_port, + guint16 default_port, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GSocketConnection * g_socket_client_connect_to_host_finish (GSocketClient *client, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_socket_client_connect_to_service_async (GSocketClient *client, + const gchar *domain, + const gchar *service, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GSocketConnection * g_socket_client_connect_to_service_finish (GSocketClient *client, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_socket_client_connect_to_uri_async (GSocketClient *client, + const gchar *uri, + guint16 default_port, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GSocketConnection * g_socket_client_connect_to_uri_finish (GSocketClient *client, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_socket_client_add_application_proxy (GSocketClient *client, + const gchar *protocol); + +G_END_DECLS + +#endif /* __G_SOCKET_CLIENT_H___ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketconnectable.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketconnectable.h new file mode 100644 index 0000000..ed2cad9 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketconnectable.h @@ -0,0 +1,83 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_SOCKET_CONNECTABLE_H__ +#define __G_SOCKET_CONNECTABLE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET_CONNECTABLE (g_socket_connectable_get_type ()) +#define G_SOCKET_CONNECTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_SOCKET_CONNECTABLE, GSocketConnectable)) +#define G_IS_SOCKET_CONNECTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_SOCKET_CONNECTABLE)) +#define G_SOCKET_CONNECTABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_SOCKET_CONNECTABLE, GSocketConnectableIface)) + +/** + * GSocketConnectable: + * + * Interface for objects that contain or generate a #GSocketAddress. + */ +typedef struct _GSocketConnectableIface GSocketConnectableIface; + +/** + * GSocketConnectableIface: + * @g_iface: The parent interface. + * @enumerate: Creates a #GSocketAddressEnumerator + * @proxy_enumerate: Creates a #GProxyAddressEnumerator + * @to_string: Format the connectable’s address as a string for debugging. + * Implementing this is optional. (Since: 2.48) + * + * Provides an interface for returning a #GSocketAddressEnumerator + * and #GProxyAddressEnumerator + */ +struct _GSocketConnectableIface +{ + GTypeInterface g_iface; + + /* Virtual Table */ + + GSocketAddressEnumerator * (* enumerate) (GSocketConnectable *connectable); + + GSocketAddressEnumerator * (* proxy_enumerate) (GSocketConnectable *connectable); + + gchar * (* to_string) (GSocketConnectable *connectable); +}; + +GIO_AVAILABLE_IN_ALL +GType g_socket_connectable_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GSocketAddressEnumerator *g_socket_connectable_enumerate (GSocketConnectable *connectable); + +GIO_AVAILABLE_IN_ALL +GSocketAddressEnumerator *g_socket_connectable_proxy_enumerate (GSocketConnectable *connectable); + +GIO_AVAILABLE_IN_2_48 +gchar *g_socket_connectable_to_string (GSocketConnectable *connectable); + +G_END_DECLS + + +#endif /* __G_SOCKET_CONNECTABLE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketconnection.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketconnection.h new file mode 100644 index 0000000..45de5ba --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketconnection.h @@ -0,0 +1,117 @@ +/* GIO - GLib Input, Output and Streaming Library + * Copyright © 2008 Christian Kellner, Samuel Cormier-Iijima + * Copyright © 2009 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Christian Kellner + * Samuel Cormier-Iijima + * Ryan Lortie + * Alexander Larsson + */ + +#ifndef __G_SOCKET_CONNECTION_H__ +#define __G_SOCKET_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET_CONNECTION (g_socket_connection_get_type ()) +#define G_SOCKET_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SOCKET_CONNECTION, GSocketConnection)) +#define G_SOCKET_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SOCKET_CONNECTION, GSocketConnectionClass)) +#define G_IS_SOCKET_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SOCKET_CONNECTION)) +#define G_IS_SOCKET_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_SOCKET_CONNECTION)) +#define G_SOCKET_CONNECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SOCKET_CONNECTION, GSocketConnectionClass)) + +typedef struct _GSocketConnectionPrivate GSocketConnectionPrivate; +typedef struct _GSocketConnectionClass GSocketConnectionClass; + +struct _GSocketConnectionClass +{ + GIOStreamClass parent_class; + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); +}; + +struct _GSocketConnection +{ + GIOStream parent_instance; + GSocketConnectionPrivate *priv; +}; + +GIO_AVAILABLE_IN_ALL +GType g_socket_connection_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_32 +gboolean g_socket_connection_is_connected (GSocketConnection *connection); +GIO_AVAILABLE_IN_2_32 +gboolean g_socket_connection_connect (GSocketConnection *connection, + GSocketAddress *address, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_32 +void g_socket_connection_connect_async (GSocketConnection *connection, + GSocketAddress *address, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_32 +gboolean g_socket_connection_connect_finish (GSocketConnection *connection, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +GSocket *g_socket_connection_get_socket (GSocketConnection *connection); +GIO_AVAILABLE_IN_ALL +GSocketAddress *g_socket_connection_get_local_address (GSocketConnection *connection, + GError **error); +GIO_AVAILABLE_IN_ALL +GSocketAddress *g_socket_connection_get_remote_address (GSocketConnection *connection, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_socket_connection_factory_register_type (GType g_type, + GSocketFamily family, + GSocketType type, + gint protocol); +GIO_AVAILABLE_IN_ALL +GType g_socket_connection_factory_lookup_type (GSocketFamily family, + GSocketType type, + gint protocol_id); +GIO_AVAILABLE_IN_ALL +GSocketConnection *g_socket_connection_factory_create_connection (GSocket *socket); + +G_END_DECLS + +#endif /* __G_SOCKET_CONNECTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketcontrolmessage.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketcontrolmessage.h new file mode 100644 index 0000000..51be2e1 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketcontrolmessage.h @@ -0,0 +1,113 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2009 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + */ + +#ifndef __G_SOCKET_CONTROL_MESSAGE_H__ +#define __G_SOCKET_CONTROL_MESSAGE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET_CONTROL_MESSAGE (g_socket_control_message_get_type ()) +#define G_SOCKET_CONTROL_MESSAGE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SOCKET_CONTROL_MESSAGE, \ + GSocketControlMessage)) +#define G_SOCKET_CONTROL_MESSAGE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SOCKET_CONTROL_MESSAGE, \ + GSocketControlMessageClass)) +#define G_IS_SOCKET_CONTROL_MESSAGE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SOCKET_CONTROL_MESSAGE)) +#define G_IS_SOCKET_CONTROL_MESSAGE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_SOCKET_CONTROL_MESSAGE)) +#define G_SOCKET_CONTROL_MESSAGE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SOCKET_CONTROL_MESSAGE, \ + GSocketControlMessageClass)) + +typedef struct _GSocketControlMessagePrivate GSocketControlMessagePrivate; +typedef struct _GSocketControlMessageClass GSocketControlMessageClass; + +/** + * GSocketControlMessageClass: + * @get_size: gets the size of the message. + * @get_level: gets the protocol of the message. + * @get_type: gets the protocol specific type of the message. + * @serialize: Writes out the message data. + * @deserialize: Tries to deserialize a message. + * + * Class structure for #GSocketControlMessage. + **/ + +struct _GSocketControlMessageClass +{ + GObjectClass parent_class; + + gsize (* get_size) (GSocketControlMessage *message); + int (* get_level) (GSocketControlMessage *message); + int (* get_type) (GSocketControlMessage *message); + void (* serialize) (GSocketControlMessage *message, + gpointer data); + GSocketControlMessage *(* deserialize) (int level, + int type, + gsize size, + gpointer data); + + /*< private >*/ + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +struct _GSocketControlMessage +{ + GObject parent_instance; + GSocketControlMessagePrivate *priv; +}; + +GIO_AVAILABLE_IN_ALL +GType g_socket_control_message_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +gsize g_socket_control_message_get_size (GSocketControlMessage *message); +GIO_AVAILABLE_IN_ALL +int g_socket_control_message_get_level (GSocketControlMessage *message); +GIO_AVAILABLE_IN_ALL +int g_socket_control_message_get_msg_type (GSocketControlMessage *message); +GIO_AVAILABLE_IN_ALL +void g_socket_control_message_serialize (GSocketControlMessage *message, + gpointer data); +GIO_AVAILABLE_IN_ALL +GSocketControlMessage *g_socket_control_message_deserialize (int level, + int type, + gsize size, + gpointer data); + + +G_END_DECLS + +#endif /* __G_SOCKET_CONTROL_MESSAGE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketlistener.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketlistener.h new file mode 100644 index 0000000..9ad6c8f --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketlistener.h @@ -0,0 +1,157 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2008 Christian Kellner, Samuel Cormier-Iijima + * Copyright © 2009 Codethink Limited + * Copyright © 2009 Red Hat, Inc + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Christian Kellner + * Samuel Cormier-Iijima + * Ryan Lortie + * Alexander Larsson + */ + +#ifndef __G_SOCKET_LISTENER_H__ +#define __G_SOCKET_LISTENER_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET_LISTENER (g_socket_listener_get_type ()) +#define G_SOCKET_LISTENER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SOCKET_LISTENER, GSocketListener)) +#define G_SOCKET_LISTENER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SOCKET_LISTENER, GSocketListenerClass)) +#define G_IS_SOCKET_LISTENER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SOCKET_LISTENER)) +#define G_IS_SOCKET_LISTENER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_SOCKET_LISTENER)) +#define G_SOCKET_LISTENER_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SOCKET_LISTENER, GSocketListenerClass)) + +typedef struct _GSocketListenerPrivate GSocketListenerPrivate; +typedef struct _GSocketListenerClass GSocketListenerClass; + +/** + * GSocketListenerClass: + * @changed: virtual method called when the set of socket listened to changes + * + * Class structure for #GSocketListener. + **/ +struct _GSocketListenerClass +{ + GObjectClass parent_class; + + void (* changed) (GSocketListener *listener); + + void (* event) (GSocketListener *listener, + GSocketListenerEvent event, + GSocket *socket); + + /* Padding for future expansion */ + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); +}; + +struct _GSocketListener +{ + GObject parent_instance; + GSocketListenerPrivate *priv; +}; + +GIO_AVAILABLE_IN_ALL +GType g_socket_listener_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GSocketListener * g_socket_listener_new (void); + +GIO_AVAILABLE_IN_ALL +void g_socket_listener_set_backlog (GSocketListener *listener, + int listen_backlog); + +GIO_AVAILABLE_IN_ALL +gboolean g_socket_listener_add_socket (GSocketListener *listener, + GSocket *socket, + GObject *source_object, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_socket_listener_add_address (GSocketListener *listener, + GSocketAddress *address, + GSocketType type, + GSocketProtocol protocol, + GObject *source_object, + GSocketAddress **effective_address, + GError **error); +GIO_AVAILABLE_IN_ALL +gboolean g_socket_listener_add_inet_port (GSocketListener *listener, + guint16 port, + GObject *source_object, + GError **error); +GIO_AVAILABLE_IN_ALL +guint16 g_socket_listener_add_any_inet_port (GSocketListener *listener, + GObject *source_object, + GError **error); + +GIO_AVAILABLE_IN_ALL +GSocket * g_socket_listener_accept_socket (GSocketListener *listener, + GObject **source_object, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +void g_socket_listener_accept_socket_async (GSocketListener *listener, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GSocket * g_socket_listener_accept_socket_finish (GSocketListener *listener, + GAsyncResult *result, + GObject **source_object, + GError **error); + + +GIO_AVAILABLE_IN_ALL +GSocketConnection * g_socket_listener_accept (GSocketListener *listener, + GObject **source_object, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_socket_listener_accept_async (GSocketListener *listener, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_ALL +GSocketConnection * g_socket_listener_accept_finish (GSocketListener *listener, + GAsyncResult *result, + GObject **source_object, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_socket_listener_close (GSocketListener *listener); + +G_END_DECLS + +#endif /* __G_SOCKET_LISTENER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketservice.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketservice.h new file mode 100644 index 0000000..f4e7c22 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsocketservice.h @@ -0,0 +1,95 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2009 Codethink Limited + * Copyright © 2009 Red Hat, Inc + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + * Alexander Larsson + */ + +#ifndef __G_SOCKET_SERVICE_H__ +#define __G_SOCKET_SERVICE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_SOCKET_SERVICE (g_socket_service_get_type ()) +#define G_SOCKET_SERVICE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_SOCKET_SERVICE, GSocketService)) +#define G_SOCKET_SERVICE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_SOCKET_SERVICE, GSocketServiceClass)) +#define G_IS_SOCKET_SERVICE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_SOCKET_SERVICE)) +#define G_IS_SOCKET_SERVICE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_SOCKET_SERVICE)) +#define G_SOCKET_SERVICE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_SOCKET_SERVICE, GSocketServiceClass)) + +typedef struct _GSocketServicePrivate GSocketServicePrivate; +typedef struct _GSocketServiceClass GSocketServiceClass; + +/** + * GSocketServiceClass: + * @incoming: signal emitted when new connections are accepted + * + * Class structure for #GSocketService. + */ +struct _GSocketServiceClass +{ + GSocketListenerClass parent_class; + + gboolean (* incoming) (GSocketService *service, + GSocketConnection *connection, + GObject *source_object); + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); +}; + +struct _GSocketService +{ + GSocketListener parent_instance; + GSocketServicePrivate *priv; +}; + +GIO_AVAILABLE_IN_ALL +GType g_socket_service_get_type (void); + +GIO_AVAILABLE_IN_ALL +GSocketService *g_socket_service_new (void); +GIO_AVAILABLE_IN_ALL +void g_socket_service_start (GSocketService *service); +GIO_AVAILABLE_IN_ALL +void g_socket_service_stop (GSocketService *service); +GIO_AVAILABLE_IN_ALL +gboolean g_socket_service_is_active (GSocketService *service); + + +G_END_DECLS + +#endif /* __G_SOCKET_SERVICE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsrvtarget.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsrvtarget.h new file mode 100644 index 0000000..92bb256 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsrvtarget.h @@ -0,0 +1,60 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_SRV_TARGET_H__ +#define __G_SRV_TARGET_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +GIO_AVAILABLE_IN_ALL +GType g_srv_target_get_type (void) G_GNUC_CONST; +#define G_TYPE_SRV_TARGET (g_srv_target_get_type ()) + +GIO_AVAILABLE_IN_ALL +GSrvTarget *g_srv_target_new (const gchar *hostname, + guint16 port, + guint16 priority, + guint16 weight); +GIO_AVAILABLE_IN_ALL +GSrvTarget *g_srv_target_copy (GSrvTarget *target); +GIO_AVAILABLE_IN_ALL +void g_srv_target_free (GSrvTarget *target); + +GIO_AVAILABLE_IN_ALL +const gchar *g_srv_target_get_hostname (GSrvTarget *target); +GIO_AVAILABLE_IN_ALL +guint16 g_srv_target_get_port (GSrvTarget *target); +GIO_AVAILABLE_IN_ALL +guint16 g_srv_target_get_priority (GSrvTarget *target); +GIO_AVAILABLE_IN_ALL +guint16 g_srv_target_get_weight (GSrvTarget *target); + +GIO_AVAILABLE_IN_ALL +GList *g_srv_target_list_sort (GList *targets); + +G_END_DECLS + +#endif /* __G_SRV_TARGET_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsubprocess.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsubprocess.h new file mode 100644 index 0000000..4d5b488 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsubprocess.h @@ -0,0 +1,169 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2012 Colin Walters + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Colin Walters + */ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __G_SUBPROCESS_H__ +#define __G_SUBPROCESS_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_SUBPROCESS (g_subprocess_get_type ()) +#define G_SUBPROCESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SUBPROCESS, GSubprocess)) +#define G_IS_SUBPROCESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SUBPROCESS)) + +GIO_AVAILABLE_IN_2_40 +GType g_subprocess_get_type (void) G_GNUC_CONST; + +/**** Core API ****/ + +GIO_AVAILABLE_IN_2_40 +GSubprocess * g_subprocess_new (GSubprocessFlags flags, + GError **error, + const gchar *argv0, + ...) G_GNUC_NULL_TERMINATED; +GIO_AVAILABLE_IN_2_40 +GSubprocess * g_subprocess_newv (const gchar * const *argv, + GSubprocessFlags flags, + GError **error); + +GIO_AVAILABLE_IN_2_40 +GOutputStream * g_subprocess_get_stdin_pipe (GSubprocess *subprocess); + +GIO_AVAILABLE_IN_2_40 +GInputStream * g_subprocess_get_stdout_pipe (GSubprocess *subprocess); + +GIO_AVAILABLE_IN_2_40 +GInputStream * g_subprocess_get_stderr_pipe (GSubprocess *subprocess); + +GIO_AVAILABLE_IN_2_40 +const gchar * g_subprocess_get_identifier (GSubprocess *subprocess); + +#ifdef G_OS_UNIX +GIO_AVAILABLE_IN_2_40 +void g_subprocess_send_signal (GSubprocess *subprocess, + gint signal_num); +#endif + +GIO_AVAILABLE_IN_2_40 +void g_subprocess_force_exit (GSubprocess *subprocess); + +GIO_AVAILABLE_IN_2_40 +gboolean g_subprocess_wait (GSubprocess *subprocess, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_40 +void g_subprocess_wait_async (GSubprocess *subprocess, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_2_40 +gboolean g_subprocess_wait_finish (GSubprocess *subprocess, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_2_40 +gboolean g_subprocess_wait_check (GSubprocess *subprocess, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_40 +void g_subprocess_wait_check_async (GSubprocess *subprocess, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_2_40 +gboolean g_subprocess_wait_check_finish (GSubprocess *subprocess, + GAsyncResult *result, + GError **error); + + +GIO_AVAILABLE_IN_2_40 +gint g_subprocess_get_status (GSubprocess *subprocess); + +GIO_AVAILABLE_IN_2_40 +gboolean g_subprocess_get_successful (GSubprocess *subprocess); + +GIO_AVAILABLE_IN_2_40 +gboolean g_subprocess_get_if_exited (GSubprocess *subprocess); + +GIO_AVAILABLE_IN_2_40 +gint g_subprocess_get_exit_status (GSubprocess *subprocess); + +GIO_AVAILABLE_IN_2_40 +gboolean g_subprocess_get_if_signaled (GSubprocess *subprocess); + +GIO_AVAILABLE_IN_2_40 +gint g_subprocess_get_term_sig (GSubprocess *subprocess); + +GIO_AVAILABLE_IN_2_40 +gboolean g_subprocess_communicate (GSubprocess *subprocess, + GBytes *stdin_buf, + GCancellable *cancellable, + GBytes **stdout_buf, + GBytes **stderr_buf, + GError **error); +GIO_AVAILABLE_IN_2_40 +void g_subprocess_communicate_async (GSubprocess *subprocess, + GBytes *stdin_buf, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_2_40 +gboolean g_subprocess_communicate_finish (GSubprocess *subprocess, + GAsyncResult *result, + GBytes **stdout_buf, + GBytes **stderr_buf, + GError **error); + +GIO_AVAILABLE_IN_2_40 +gboolean g_subprocess_communicate_utf8 (GSubprocess *subprocess, + const char *stdin_buf, + GCancellable *cancellable, + char **stdout_buf, + char **stderr_buf, + GError **error); +GIO_AVAILABLE_IN_2_40 +void g_subprocess_communicate_utf8_async (GSubprocess *subprocess, + const char *stdin_buf, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_2_40 +gboolean g_subprocess_communicate_utf8_finish (GSubprocess *subprocess, + GAsyncResult *result, + char **stdout_buf, + char **stderr_buf, + GError **error); + +G_END_DECLS + +#endif /* __G_SUBPROCESS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsubprocesslauncher.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsubprocesslauncher.h new file mode 100644 index 0000000..0ab9145 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gsubprocesslauncher.h @@ -0,0 +1,121 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2012,2013 Colin Walters + * Copyright © 2012,2013 Canonical Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Ryan Lortie + * Author: Colin Walters + */ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __G_SUBPROCESS_LAUNCHER_H__ +#define __G_SUBPROCESS_LAUNCHER_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_SUBPROCESS_LAUNCHER (g_subprocess_launcher_get_type ()) +#define G_SUBPROCESS_LAUNCHER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SUBPROCESS_LAUNCHER, GSubprocessLauncher)) +#define G_IS_SUBPROCESS_LAUNCHER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SUBPROCESS_LAUNCHER)) + +GIO_AVAILABLE_IN_2_40 +GType g_subprocess_launcher_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_40 +GSubprocessLauncher * g_subprocess_launcher_new (GSubprocessFlags flags); + +GIO_AVAILABLE_IN_2_40 +GSubprocess * g_subprocess_launcher_spawn (GSubprocessLauncher *self, + GError **error, + const gchar *argv0, + ...) G_GNUC_NULL_TERMINATED; + +GIO_AVAILABLE_IN_2_40 +GSubprocess * g_subprocess_launcher_spawnv (GSubprocessLauncher *self, + const gchar * const *argv, + GError **error); + +GIO_AVAILABLE_IN_2_40 +void g_subprocess_launcher_set_environ (GSubprocessLauncher *self, + gchar **env); + +GIO_AVAILABLE_IN_2_40 +void g_subprocess_launcher_setenv (GSubprocessLauncher *self, + const gchar *variable, + const gchar *value, + gboolean overwrite); + +GIO_AVAILABLE_IN_2_40 +void g_subprocess_launcher_unsetenv (GSubprocessLauncher *self, + const gchar *variable); + +GIO_AVAILABLE_IN_2_40 +const gchar * g_subprocess_launcher_getenv (GSubprocessLauncher *self, + const gchar *variable); + +GIO_AVAILABLE_IN_2_40 +void g_subprocess_launcher_set_cwd (GSubprocessLauncher *self, + const gchar *cwd); +GIO_AVAILABLE_IN_2_40 +void g_subprocess_launcher_set_flags (GSubprocessLauncher *self, + GSubprocessFlags flags); + +/* Extended I/O control, only available on UNIX */ +#ifdef G_OS_UNIX +GIO_AVAILABLE_IN_2_40 +void g_subprocess_launcher_set_stdin_file_path (GSubprocessLauncher *self, + const gchar *path); +GIO_AVAILABLE_IN_2_40 +void g_subprocess_launcher_take_stdin_fd (GSubprocessLauncher *self, + gint fd); +GIO_AVAILABLE_IN_2_40 +void g_subprocess_launcher_set_stdout_file_path (GSubprocessLauncher *self, + const gchar *path); +GIO_AVAILABLE_IN_2_40 +void g_subprocess_launcher_take_stdout_fd (GSubprocessLauncher *self, + gint fd); +GIO_AVAILABLE_IN_2_40 +void g_subprocess_launcher_set_stderr_file_path (GSubprocessLauncher *self, + const gchar *path); +GIO_AVAILABLE_IN_2_40 +void g_subprocess_launcher_take_stderr_fd (GSubprocessLauncher *self, + gint fd); + +GIO_AVAILABLE_IN_2_40 +void g_subprocess_launcher_take_fd (GSubprocessLauncher *self, + gint source_fd, + gint target_fd); + +GIO_AVAILABLE_IN_2_68 +void g_subprocess_launcher_close (GSubprocessLauncher *self); + +/* Child setup, only available on UNIX */ +GIO_AVAILABLE_IN_2_40 +void g_subprocess_launcher_set_child_setup (GSubprocessLauncher *self, + GSpawnChildSetupFunc child_setup, + gpointer user_data, + GDestroyNotify destroy_notify); +#endif + +G_END_DECLS + +#endif /* __G_SUBPROCESS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtask.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtask.h new file mode 100644 index 0000000..6d7fa82 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtask.h @@ -0,0 +1,207 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright 2011 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_TASK_H__ +#define __G_TASK_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_TASK (g_task_get_type ()) +#define G_TASK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_TASK, GTask)) +#define G_TASK_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_TASK, GTaskClass)) +#define G_IS_TASK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_TASK)) +#define G_IS_TASK_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_TASK)) +#define G_TASK_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_TASK, GTaskClass)) + +typedef struct _GTaskClass GTaskClass; + +GIO_AVAILABLE_IN_2_36 +GType g_task_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_36 +GTask *g_task_new (gpointer source_object, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer callback_data); + +GIO_AVAILABLE_IN_2_36 +void g_task_report_error (gpointer source_object, + GAsyncReadyCallback callback, + gpointer callback_data, + gpointer source_tag, + GError *error); +GIO_AVAILABLE_IN_2_36 +void g_task_report_new_error (gpointer source_object, + GAsyncReadyCallback callback, + gpointer callback_data, + gpointer source_tag, + GQuark domain, + gint code, + const char *format, + ...) G_GNUC_PRINTF(7, 8); + +GIO_AVAILABLE_IN_2_36 +void g_task_set_task_data (GTask *task, + gpointer task_data, + GDestroyNotify task_data_destroy); +GIO_AVAILABLE_IN_2_36 +void g_task_set_priority (GTask *task, + gint priority); +GIO_AVAILABLE_IN_2_36 +void g_task_set_check_cancellable (GTask *task, + gboolean check_cancellable); +GIO_AVAILABLE_IN_2_36 +void g_task_set_source_tag (GTask *task, + gpointer source_tag); +GIO_AVAILABLE_IN_2_60 +void g_task_set_name (GTask *task, + const gchar *name); +GIO_AVAILABLE_IN_2_76 +void g_task_set_static_name (GTask *task, + const gchar *name); + +/* Macro wrapper to set the task name when setting the source tag. */ +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_76 +#define g_task_set_source_tag(task, tag) G_STMT_START { \ + GTask *_task = (task); \ + (g_task_set_source_tag) (_task, tag); \ + if (g_task_get_name (_task) == NULL) \ + g_task_set_static_name (_task, G_STRINGIFY (tag)); \ +} G_STMT_END +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_76 +#if defined (__GNUC__) && (__GNUC__ >= 2) +#define g_task_set_name(task, name) G_STMT_START { \ + GTask *_task = (task); \ + if (__builtin_constant_p (name)) \ + g_task_set_static_name (_task, name); \ + else \ + g_task_set_name (_task, name); \ +} G_STMT_END +#endif +#endif + +GIO_AVAILABLE_IN_2_36 +gpointer g_task_get_source_object (GTask *task); +GIO_AVAILABLE_IN_2_36 +gpointer g_task_get_task_data (GTask *task); +GIO_AVAILABLE_IN_2_36 +gint g_task_get_priority (GTask *task); +GIO_AVAILABLE_IN_2_36 +GMainContext *g_task_get_context (GTask *task); +GIO_AVAILABLE_IN_2_36 +GCancellable *g_task_get_cancellable (GTask *task); +GIO_AVAILABLE_IN_2_36 +gboolean g_task_get_check_cancellable (GTask *task); +GIO_AVAILABLE_IN_2_36 +gpointer g_task_get_source_tag (GTask *task); +GIO_AVAILABLE_IN_2_60 +const gchar *g_task_get_name (GTask *task); + +GIO_AVAILABLE_IN_2_36 +gboolean g_task_is_valid (gpointer result, + gpointer source_object); + + +typedef void (*GTaskThreadFunc) (GTask *task, + gpointer source_object, + gpointer task_data, + GCancellable *cancellable); +GIO_AVAILABLE_IN_2_36 +void g_task_run_in_thread (GTask *task, + GTaskThreadFunc task_func); +GIO_AVAILABLE_IN_2_36 +void g_task_run_in_thread_sync (GTask *task, + GTaskThreadFunc task_func); +GIO_AVAILABLE_IN_2_36 +gboolean g_task_set_return_on_cancel (GTask *task, + gboolean return_on_cancel); +GIO_AVAILABLE_IN_2_36 +gboolean g_task_get_return_on_cancel (GTask *task); + +GIO_AVAILABLE_IN_2_36 +void g_task_attach_source (GTask *task, + GSource *source, + GSourceFunc callback); + + +GIO_AVAILABLE_IN_2_36 +void g_task_return_pointer (GTask *task, + gpointer result, + GDestroyNotify result_destroy); +GIO_AVAILABLE_IN_2_36 +void g_task_return_boolean (GTask *task, + gboolean result); +GIO_AVAILABLE_IN_2_36 +void g_task_return_int (GTask *task, + gssize result); + +GIO_AVAILABLE_IN_2_36 +void g_task_return_error (GTask *task, + GError *error); +GIO_AVAILABLE_IN_2_36 +void g_task_return_new_error (GTask *task, + GQuark domain, + gint code, + const char *format, + ...) G_GNUC_PRINTF (4, 5); +GIO_AVAILABLE_IN_2_64 +void g_task_return_value (GTask *task, + GValue *result); + +GIO_AVAILABLE_IN_2_36 +gboolean g_task_return_error_if_cancelled (GTask *task); + +GIO_AVAILABLE_IN_2_36 +gpointer g_task_propagate_pointer (GTask *task, + GError **error); +GIO_AVAILABLE_IN_2_36 +gboolean g_task_propagate_boolean (GTask *task, + GError **error); +GIO_AVAILABLE_IN_2_36 +gssize g_task_propagate_int (GTask *task, + GError **error); +GIO_AVAILABLE_IN_2_64 +gboolean g_task_propagate_value (GTask *task, + GValue *value, + GError **error); +GIO_AVAILABLE_IN_2_36 +gboolean g_task_had_error (GTask *task); +GIO_AVAILABLE_IN_2_44 +gboolean g_task_get_completed (GTask *task); + +/*< private >*/ +#ifndef __GTK_DOC_IGNORE__ +#ifndef __GI_SCANNER__ +/* Debugging API, not part of the public API */ +void g_task_print_alive_tasks (void); +#endif /* !__GI_SCANNER__ */ +#endif /* !__GTK_DOC_IGNORE__ */ + +G_END_DECLS + +#endif /* __G_TASK_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtcpconnection.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtcpconnection.h new file mode 100644 index 0000000..03aa28a --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtcpconnection.h @@ -0,0 +1,71 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2008, 2009 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + */ + +#ifndef __G_TCP_CONNECTION_H__ +#define __G_TCP_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_TCP_CONNECTION (g_tcp_connection_get_type ()) +#define G_TCP_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_TCP_CONNECTION, GTcpConnection)) +#define G_TCP_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_TCP_CONNECTION, GTcpConnectionClass)) +#define G_IS_TCP_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_TCP_CONNECTION)) +#define G_IS_TCP_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_TCP_CONNECTION)) +#define G_TCP_CONNECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_TCP_CONNECTION, GTcpConnectionClass)) + +typedef struct _GTcpConnectionPrivate GTcpConnectionPrivate; +typedef struct _GTcpConnectionClass GTcpConnectionClass; + +struct _GTcpConnectionClass +{ + GSocketConnectionClass parent_class; +}; + +struct _GTcpConnection +{ + GSocketConnection parent_instance; + GTcpConnectionPrivate *priv; +}; + +GIO_AVAILABLE_IN_ALL +GType g_tcp_connection_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +void g_tcp_connection_set_graceful_disconnect (GTcpConnection *connection, + gboolean graceful_disconnect); +GIO_AVAILABLE_IN_ALL +gboolean g_tcp_connection_get_graceful_disconnect (GTcpConnection *connection); + +G_END_DECLS + +#endif /* __G_TCP_CONNECTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtcpwrapperconnection.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtcpwrapperconnection.h new file mode 100644 index 0000000..1027154 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtcpwrapperconnection.h @@ -0,0 +1,71 @@ +/* GIO - GLib Input, Output and Streaming Library + * Copyright © 2010 Collabora Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Nicolas Dufresne + * + */ + +#ifndef __G_TCP_WRAPPER_CONNECTION_H__ +#define __G_TCP_WRAPPER_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_TCP_WRAPPER_CONNECTION (g_tcp_wrapper_connection_get_type ()) +#define G_TCP_WRAPPER_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_TCP_WRAPPER_CONNECTION, GTcpWrapperConnection)) +#define G_TCP_WRAPPER_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_TCP_WRAPPER_CONNECTION, GTcpWrapperConnectionClass)) +#define G_IS_TCP_WRAPPER_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_TCP_WRAPPER_CONNECTION)) +#define G_IS_TCP_WRAPPER_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_TCP_WRAPPER_CONNECTION)) +#define G_TCP_WRAPPER_CONNECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_TCP_WRAPPER_CONNECTION, GTcpWrapperConnectionClass)) + +typedef struct _GTcpWrapperConnectionPrivate GTcpWrapperConnectionPrivate; +typedef struct _GTcpWrapperConnectionClass GTcpWrapperConnectionClass; + +struct _GTcpWrapperConnectionClass +{ + GTcpConnectionClass parent_class; +}; + +struct _GTcpWrapperConnection +{ + GTcpConnection parent_instance; + GTcpWrapperConnectionPrivate *priv; +}; + +GIO_AVAILABLE_IN_ALL +GType g_tcp_wrapper_connection_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GSocketConnection *g_tcp_wrapper_connection_new (GIOStream *base_io_stream, + GSocket *socket); +GIO_AVAILABLE_IN_ALL +GIOStream *g_tcp_wrapper_connection_get_base_io_stream (GTcpWrapperConnection *conn); + +G_END_DECLS + +#endif /* __G_TCP_WRAPPER_CONNECTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtestdbus.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtestdbus.h new file mode 100644 index 0000000..f52ea1e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtestdbus.h @@ -0,0 +1,74 @@ +/* GIO testing utilities + * + * Copyright (C) 2008-2010 Red Hat, Inc. + * Copyright (C) 2012 Collabora Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: David Zeuthen + * Xavier Claessens + */ + +#ifndef __G_TEST_DBUS_H__ +#define __G_TEST_DBUS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_TEST_DBUS \ + (g_test_dbus_get_type ()) +#define G_TEST_DBUS(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_TEST_DBUS, \ + GTestDBus)) +#define G_IS_TEST_DBUS(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_TEST_DBUS)) + +GIO_AVAILABLE_IN_2_34 +GType g_test_dbus_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_2_34 +GTestDBus * g_test_dbus_new (GTestDBusFlags flags); + +GIO_AVAILABLE_IN_2_34 +GTestDBusFlags g_test_dbus_get_flags (GTestDBus *self); + +GIO_AVAILABLE_IN_2_34 +const gchar * g_test_dbus_get_bus_address (GTestDBus *self); + +GIO_AVAILABLE_IN_2_34 +void g_test_dbus_add_service_dir (GTestDBus *self, + const gchar *path); + +GIO_AVAILABLE_IN_2_34 +void g_test_dbus_up (GTestDBus *self); + +GIO_AVAILABLE_IN_2_34 +void g_test_dbus_stop (GTestDBus *self); + +GIO_AVAILABLE_IN_2_34 +void g_test_dbus_down (GTestDBus *self); + +GIO_AVAILABLE_IN_2_34 +void g_test_dbus_unset (void); + +G_END_DECLS + +#endif /* __G_TEST_DBUS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gthemedicon.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gthemedicon.h new file mode 100644 index 0000000..5ac36ce --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gthemedicon.h @@ -0,0 +1,70 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_THEMED_ICON_H__ +#define __G_THEMED_ICON_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_THEMED_ICON (g_themed_icon_get_type ()) +#define G_THEMED_ICON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_THEMED_ICON, GThemedIcon)) +#define G_THEMED_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_THEMED_ICON, GThemedIconClass)) +#define G_IS_THEMED_ICON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_THEMED_ICON)) +#define G_IS_THEMED_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_THEMED_ICON)) +#define G_THEMED_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_THEMED_ICON, GThemedIconClass)) + +/** + * GThemedIcon: + * + * An implementation of #GIcon for themed icons. + **/ +typedef struct _GThemedIconClass GThemedIconClass; + +GIO_AVAILABLE_IN_ALL +GType g_themed_icon_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GIcon *g_themed_icon_new (const char *iconname); +GIO_AVAILABLE_IN_ALL +GIcon *g_themed_icon_new_with_default_fallbacks (const char *iconname); +GIO_AVAILABLE_IN_ALL +GIcon *g_themed_icon_new_from_names (char **iconnames, + int len); +GIO_AVAILABLE_IN_ALL +void g_themed_icon_prepend_name (GThemedIcon *icon, + const char *iconname); +GIO_AVAILABLE_IN_ALL +void g_themed_icon_append_name (GThemedIcon *icon, + const char *iconname); + +GIO_AVAILABLE_IN_ALL +const gchar* const * g_themed_icon_get_names (GThemedIcon *icon); + +G_END_DECLS + +#endif /* __G_THEMED_ICON_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gthreadedsocketservice.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gthreadedsocketservice.h new file mode 100644 index 0000000..48f5a31 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gthreadedsocketservice.h @@ -0,0 +1,83 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2009 Codethink Limited + * Copyright © 2009 Red Hat, Inc + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + * Alexander Larsson + */ + +#ifndef __G_THREADED_SOCKET_SERVICE_H__ +#define __G_THREADED_SOCKET_SERVICE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_THREADED_SOCKET_SERVICE (g_threaded_socket_service_get_type ()) +#define G_THREADED_SOCKET_SERVICE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_THREADED_SOCKET_SERVICE, \ + GThreadedSocketService)) +#define G_THREADED_SOCKET_SERVICE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_THREADED_SOCKET_SERVICE, \ + GThreadedSocketServiceClass)) +#define G_IS_THREADED_SOCKET_SERVICE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_THREADED_SOCKET_SERVICE)) +#define G_IS_THREADED_SOCKET_SERVICE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_THREADED_SOCKET_SERVICE)) +#define G_THREADED_SOCKET_SERVICE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_THREADED_SOCKET_SERVICE, \ + GThreadedSocketServiceClass)) + +typedef struct _GThreadedSocketServicePrivate GThreadedSocketServicePrivate; +typedef struct _GThreadedSocketServiceClass GThreadedSocketServiceClass; + +struct _GThreadedSocketServiceClass +{ + GSocketServiceClass parent_class; + + gboolean (* run) (GThreadedSocketService *service, + GSocketConnection *connection, + GObject *source_object); + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +struct _GThreadedSocketService +{ + GSocketService parent_instance; + GThreadedSocketServicePrivate *priv; +}; + +GIO_AVAILABLE_IN_ALL +GType g_threaded_socket_service_get_type (void); +GIO_AVAILABLE_IN_ALL +GSocketService * g_threaded_socket_service_new (int max_threads); + +G_END_DECLS + +#endif /* __G_THREADED_SOCKET_SERVICE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsbackend.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsbackend.h new file mode 100644 index 0000000..dc51b23 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsbackend.h @@ -0,0 +1,115 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Red Hat, Inc. + * Copyright © 2015 Collabora, Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_TLS_BACKEND_H__ +#define __G_TLS_BACKEND_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * G_TLS_BACKEND_EXTENSION_POINT_NAME: + * + * Extension point for TLS functionality via #GTlsBackend. + * See [Extending GIO][extending-gio]. + */ +#define G_TLS_BACKEND_EXTENSION_POINT_NAME "gio-tls-backend" + +#define G_TYPE_TLS_BACKEND (g_tls_backend_get_type ()) +#define G_TLS_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_TLS_BACKEND, GTlsBackend)) +#define G_IS_TLS_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_TLS_BACKEND)) +#define G_TLS_BACKEND_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_TLS_BACKEND, GTlsBackendInterface)) + +typedef struct _GTlsBackend GTlsBackend; +typedef struct _GTlsBackendInterface GTlsBackendInterface; + +/** + * GTlsBackendInterface: + * @g_iface: The parent interface. + * @supports_tls: returns whether the backend supports TLS. + * @supports_dtls: returns whether the backend supports DTLS + * @get_default_database: returns a default #GTlsDatabase instance. + * @get_certificate_type: returns the #GTlsCertificate implementation type + * @get_client_connection_type: returns the #GTlsClientConnection implementation type + * @get_server_connection_type: returns the #GTlsServerConnection implementation type + * @get_file_database_type: returns the #GTlsFileDatabase implementation type. + * @get_dtls_client_connection_type: returns the #GDtlsClientConnection implementation type + * @get_dtls_server_connection_type: returns the #GDtlsServerConnection implementation type + * + * Provides an interface for describing TLS-related types. + * + * Since: 2.28 + */ +struct _GTlsBackendInterface +{ + GTypeInterface g_iface; + + /* methods */ + gboolean ( *supports_tls) (GTlsBackend *backend); + GType ( *get_certificate_type) (void); + GType ( *get_client_connection_type) (void); + GType ( *get_server_connection_type) (void); + GType ( *get_file_database_type) (void); + GTlsDatabase * ( *get_default_database) (GTlsBackend *backend); + gboolean ( *supports_dtls) (GTlsBackend *backend); + GType ( *get_dtls_client_connection_type) (void); + GType ( *get_dtls_server_connection_type) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_tls_backend_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GTlsBackend * g_tls_backend_get_default (void); + +GIO_AVAILABLE_IN_ALL +GTlsDatabase * g_tls_backend_get_default_database (GTlsBackend *backend); +GIO_AVAILABLE_IN_2_60 +void g_tls_backend_set_default_database (GTlsBackend *backend, + GTlsDatabase *database); + +GIO_AVAILABLE_IN_ALL +gboolean g_tls_backend_supports_tls (GTlsBackend *backend); +GIO_AVAILABLE_IN_2_48 +gboolean g_tls_backend_supports_dtls (GTlsBackend *backend); + +GIO_AVAILABLE_IN_ALL +GType g_tls_backend_get_certificate_type (GTlsBackend *backend); +GIO_AVAILABLE_IN_ALL +GType g_tls_backend_get_client_connection_type (GTlsBackend *backend); +GIO_AVAILABLE_IN_ALL +GType g_tls_backend_get_server_connection_type (GTlsBackend *backend); +GIO_AVAILABLE_IN_ALL +GType g_tls_backend_get_file_database_type (GTlsBackend *backend); + +GIO_AVAILABLE_IN_2_48 +GType g_tls_backend_get_dtls_client_connection_type (GTlsBackend *backend); +GIO_AVAILABLE_IN_2_48 +GType g_tls_backend_get_dtls_server_connection_type (GTlsBackend *backend); + +G_END_DECLS + +#endif /* __G_TLS_BACKEND_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlscertificate.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlscertificate.h new file mode 100644 index 0000000..c8d10bf --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlscertificate.h @@ -0,0 +1,125 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_TLS_CERTIFICATE_H__ +#define __G_TLS_CERTIFICATE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_TLS_CERTIFICATE (g_tls_certificate_get_type ()) +#define G_TLS_CERTIFICATE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TLS_CERTIFICATE, GTlsCertificate)) +#define G_TLS_CERTIFICATE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_TLS_CERTIFICATE, GTlsCertificateClass)) +#define G_IS_TLS_CERTIFICATE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TLS_CERTIFICATE)) +#define G_IS_TLS_CERTIFICATE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_TLS_CERTIFICATE)) +#define G_TLS_CERTIFICATE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), G_TYPE_TLS_CERTIFICATE, GTlsCertificateClass)) + +typedef struct _GTlsCertificateClass GTlsCertificateClass; +typedef struct _GTlsCertificatePrivate GTlsCertificatePrivate; + +struct _GTlsCertificate { + GObject parent_instance; + + GTlsCertificatePrivate *priv; +}; + +struct _GTlsCertificateClass +{ + GObjectClass parent_class; + + GTlsCertificateFlags (* verify) (GTlsCertificate *cert, + GSocketConnectable *identity, + GTlsCertificate *trusted_ca); + + /*< private >*/ + /* Padding for future expansion */ + gpointer padding[8]; +}; + +GIO_AVAILABLE_IN_ALL +GType g_tls_certificate_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GTlsCertificate *g_tls_certificate_new_from_pem (const gchar *data, + gssize length, + GError **error); +GIO_AVAILABLE_IN_2_72 +GTlsCertificate *g_tls_certificate_new_from_pkcs12 (const guint8 *data, + gsize length, + const gchar *password, + GError **error); +GIO_AVAILABLE_IN_2_72 +GTlsCertificate *g_tls_certificate_new_from_file_with_password (const gchar *file, + const gchar *password, + GError **error); +GIO_AVAILABLE_IN_ALL +GTlsCertificate *g_tls_certificate_new_from_file (const gchar *file, + GError **error); +GIO_AVAILABLE_IN_ALL +GTlsCertificate *g_tls_certificate_new_from_files (const gchar *cert_file, + const gchar *key_file, + GError **error); +GIO_AVAILABLE_IN_2_68 +GTlsCertificate *g_tls_certificate_new_from_pkcs11_uris (const gchar *pkcs11_uri, + const gchar *private_key_pkcs11_uri, + GError **error); + +GIO_AVAILABLE_IN_ALL +GList *g_tls_certificate_list_new_from_file (const gchar *file, + GError **error); + +GIO_AVAILABLE_IN_ALL +GTlsCertificate *g_tls_certificate_get_issuer (GTlsCertificate *cert); + +GIO_AVAILABLE_IN_ALL +GTlsCertificateFlags g_tls_certificate_verify (GTlsCertificate *cert, + GSocketConnectable *identity, + GTlsCertificate *trusted_ca); + +GIO_AVAILABLE_IN_2_34 +gboolean g_tls_certificate_is_same (GTlsCertificate *cert_one, + GTlsCertificate *cert_two); + +GIO_AVAILABLE_IN_2_70 +GDateTime *g_tls_certificate_get_not_valid_before (GTlsCertificate *cert); + +GIO_AVAILABLE_IN_2_70 +GDateTime *g_tls_certificate_get_not_valid_after (GTlsCertificate *cert); + +GIO_AVAILABLE_IN_2_70 +gchar *g_tls_certificate_get_subject_name (GTlsCertificate *cert); + +GIO_AVAILABLE_IN_2_70 +gchar *g_tls_certificate_get_issuer_name (GTlsCertificate *cert); + +GIO_AVAILABLE_IN_2_70 +GPtrArray *g_tls_certificate_get_dns_names (GTlsCertificate *cert); + +GIO_AVAILABLE_IN_2_70 +GPtrArray *g_tls_certificate_get_ip_addresses (GTlsCertificate *cert); + +G_END_DECLS + +#endif /* __G_TLS_CERTIFICATE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsclientconnection.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsclientconnection.h new file mode 100644 index 0000000..32d6274 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsclientconnection.h @@ -0,0 +1,88 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_TLS_CLIENT_CONNECTION_H__ +#define __G_TLS_CLIENT_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_TLS_CLIENT_CONNECTION (g_tls_client_connection_get_type ()) +#define G_TLS_CLIENT_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TLS_CLIENT_CONNECTION, GTlsClientConnection)) +#define G_IS_TLS_CLIENT_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TLS_CLIENT_CONNECTION)) +#define G_TLS_CLIENT_CONNECTION_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_TLS_CLIENT_CONNECTION, GTlsClientConnectionInterface)) + +typedef struct _GTlsClientConnectionInterface GTlsClientConnectionInterface; + +/** + * GTlsClientConnectionInterface: + * @g_iface: The parent interface. + * @copy_session_state: Copies session state from one #GTlsClientConnection to another. + * + * vtable for a #GTlsClientConnection implementation. + * + * Since: 2.26 + */ +struct _GTlsClientConnectionInterface +{ + GTypeInterface g_iface; + + void ( *copy_session_state ) (GTlsClientConnection *conn, + GTlsClientConnection *source); +}; + +GIO_AVAILABLE_IN_ALL +GType g_tls_client_connection_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GIOStream * g_tls_client_connection_new (GIOStream *base_io_stream, + GSocketConnectable *server_identity, + GError **error); + +GIO_DEPRECATED_IN_2_72 +GTlsCertificateFlags g_tls_client_connection_get_validation_flags (GTlsClientConnection *conn); +GIO_DEPRECATED_IN_2_72 +void g_tls_client_connection_set_validation_flags (GTlsClientConnection *conn, + GTlsCertificateFlags flags); +GIO_AVAILABLE_IN_ALL +GSocketConnectable *g_tls_client_connection_get_server_identity (GTlsClientConnection *conn); +GIO_AVAILABLE_IN_ALL +void g_tls_client_connection_set_server_identity (GTlsClientConnection *conn, + GSocketConnectable *identity); +GIO_DEPRECATED_IN_2_56 +gboolean g_tls_client_connection_get_use_ssl3 (GTlsClientConnection *conn); +GIO_DEPRECATED_IN_2_56 +void g_tls_client_connection_set_use_ssl3 (GTlsClientConnection *conn, + gboolean use_ssl3); +GIO_AVAILABLE_IN_ALL +GList * g_tls_client_connection_get_accepted_cas (GTlsClientConnection *conn); + +GIO_AVAILABLE_IN_2_46 +void g_tls_client_connection_copy_session_state (GTlsClientConnection *conn, + GTlsClientConnection *source); + +G_END_DECLS + +#endif /* __G_TLS_CLIENT_CONNECTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsconnection.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsconnection.h new file mode 100644 index 0000000..a266d61 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsconnection.h @@ -0,0 +1,214 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_TLS_CONNECTION_H__ +#define __G_TLS_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_TLS_CONNECTION (g_tls_connection_get_type ()) +#define G_TLS_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TLS_CONNECTION, GTlsConnection)) +#define G_TLS_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_TLS_CONNECTION, GTlsConnectionClass)) +#define G_IS_TLS_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TLS_CONNECTION)) +#define G_IS_TLS_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_TLS_CONNECTION)) +#define G_TLS_CONNECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), G_TYPE_TLS_CONNECTION, GTlsConnectionClass)) + +typedef struct _GTlsConnectionClass GTlsConnectionClass; +typedef struct _GTlsConnectionPrivate GTlsConnectionPrivate; + +struct _GTlsConnection { + GIOStream parent_instance; + + GTlsConnectionPrivate *priv; +}; + +/** + * GTlsConnectionClass: + * @parent_class: The parent class. + * @accept_certificate: Check whether to accept a certificate. + * @handshake: Perform a handshake operation. + * @handshake_async: Start an asynchronous handshake operation. + * @handshake_finish: Finish an asynchronous handshake operation. + * @get_binding_data: Retrieve TLS channel binding data (Since: 2.66) + * @get_negotiated_protocol: Get ALPN-negotiated protocol (Since: 2.70) + * + * The class structure for the #GTlsConnection type. + * + * Since: 2.28 + */ +struct _GTlsConnectionClass +{ + GIOStreamClass parent_class; + + /* signals */ + gboolean ( *accept_certificate) (GTlsConnection *connection, + GTlsCertificate *peer_cert, + GTlsCertificateFlags errors); + + /* methods */ + gboolean ( *handshake ) (GTlsConnection *conn, + GCancellable *cancellable, + GError **error); + + void ( *handshake_async ) (GTlsConnection *conn, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean ( *handshake_finish ) (GTlsConnection *conn, + GAsyncResult *result, + GError **error); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + gboolean ( *get_binding_data) (GTlsConnection *conn, + GTlsChannelBindingType type, + GByteArray *data, + GError **error); +G_GNUC_END_IGNORE_DEPRECATIONS + + const gchar *(*get_negotiated_protocol) (GTlsConnection *conn); + + /*< private >*/ + /* Padding for future expansion */ + gpointer padding[6]; +}; + +GIO_AVAILABLE_IN_ALL +GType g_tls_connection_get_type (void) G_GNUC_CONST; + +GIO_DEPRECATED +void g_tls_connection_set_use_system_certdb (GTlsConnection *conn, + gboolean use_system_certdb); +GIO_DEPRECATED +gboolean g_tls_connection_get_use_system_certdb (GTlsConnection *conn); + +GIO_AVAILABLE_IN_ALL +void g_tls_connection_set_database (GTlsConnection *conn, + GTlsDatabase *database); +GIO_AVAILABLE_IN_ALL +GTlsDatabase * g_tls_connection_get_database (GTlsConnection *conn); + +GIO_AVAILABLE_IN_ALL +void g_tls_connection_set_certificate (GTlsConnection *conn, + GTlsCertificate *certificate); +GIO_AVAILABLE_IN_ALL +GTlsCertificate *g_tls_connection_get_certificate (GTlsConnection *conn); + +GIO_AVAILABLE_IN_ALL +void g_tls_connection_set_interaction (GTlsConnection *conn, + GTlsInteraction *interaction); +GIO_AVAILABLE_IN_ALL +GTlsInteraction * g_tls_connection_get_interaction (GTlsConnection *conn); + +GIO_AVAILABLE_IN_ALL +GTlsCertificate *g_tls_connection_get_peer_certificate (GTlsConnection *conn); +GIO_AVAILABLE_IN_ALL +GTlsCertificateFlags g_tls_connection_get_peer_certificate_errors (GTlsConnection *conn); + +GIO_AVAILABLE_IN_ALL +void g_tls_connection_set_require_close_notify (GTlsConnection *conn, + gboolean require_close_notify); +GIO_AVAILABLE_IN_ALL +gboolean g_tls_connection_get_require_close_notify (GTlsConnection *conn); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GIO_DEPRECATED_IN_2_60 +void g_tls_connection_set_rehandshake_mode (GTlsConnection *conn, + GTlsRehandshakeMode mode); +GIO_DEPRECATED_IN_2_60 +GTlsRehandshakeMode g_tls_connection_get_rehandshake_mode (GTlsConnection *conn); +G_GNUC_END_IGNORE_DEPRECATIONS + +GIO_AVAILABLE_IN_2_60 +void g_tls_connection_set_advertised_protocols (GTlsConnection *conn, + const gchar * const *protocols); + +GIO_AVAILABLE_IN_2_60 +const gchar * g_tls_connection_get_negotiated_protocol (GTlsConnection *conn); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GIO_AVAILABLE_IN_2_66 +gboolean g_tls_connection_get_channel_binding_data (GTlsConnection *conn, + GTlsChannelBindingType type, + GByteArray *data, + GError **error); +G_GNUC_END_IGNORE_DEPRECATIONS + +GIO_AVAILABLE_IN_ALL +gboolean g_tls_connection_handshake (GTlsConnection *conn, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_tls_connection_handshake_async (GTlsConnection *conn, + int io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_tls_connection_handshake_finish (GTlsConnection *conn, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_2_70 +GTlsProtocolVersion g_tls_connection_get_protocol_version (GTlsConnection *conn); + +GIO_AVAILABLE_IN_2_70 +gchar * g_tls_connection_get_ciphersuite_name (GTlsConnection *conn); + +/** + * G_TLS_ERROR: + * + * Error domain for TLS. Errors in this domain will be from the + * #GTlsError enumeration. See #GError for more information on error + * domains. + */ +#define G_TLS_ERROR (g_tls_error_quark ()) +GIO_AVAILABLE_IN_ALL +GQuark g_tls_error_quark (void); + +/** + * G_TLS_CHANNEL_BINDING_ERROR: + * + * Error domain for TLS channel binding. Errors in this domain will be from the + * #GTlsChannelBindingError enumeration. See #GError for more information on error + * domains. + * + * Since: 2.66 + */ +#define G_TLS_CHANNEL_BINDING_ERROR (g_tls_channel_binding_error_quark ()) +GIO_AVAILABLE_IN_2_66 +GQuark g_tls_channel_binding_error_quark (void); + +/*< protected >*/ +GIO_AVAILABLE_IN_ALL +gboolean g_tls_connection_emit_accept_certificate (GTlsConnection *conn, + GTlsCertificate *peer_cert, + GTlsCertificateFlags errors); + +G_END_DECLS + +#endif /* __G_TLS_CONNECTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsdatabase.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsdatabase.h new file mode 100644 index 0000000..4ae6dc3 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsdatabase.h @@ -0,0 +1,249 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Collabora, Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Stef Walter + */ + +#ifndef __G_TLS_DATABASE_H__ +#define __G_TLS_DATABASE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER "1.3.6.1.5.5.7.3.1" +#define G_TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT "1.3.6.1.5.5.7.3.2" + +#define G_TYPE_TLS_DATABASE (g_tls_database_get_type ()) +#define G_TLS_DATABASE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TLS_DATABASE, GTlsDatabase)) +#define G_TLS_DATABASE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_TLS_DATABASE, GTlsDatabaseClass)) +#define G_IS_TLS_DATABASE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TLS_DATABASE)) +#define G_IS_TLS_DATABASE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_TLS_DATABASE)) +#define G_TLS_DATABASE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), G_TYPE_TLS_DATABASE, GTlsDatabaseClass)) + +typedef struct _GTlsDatabaseClass GTlsDatabaseClass; +typedef struct _GTlsDatabasePrivate GTlsDatabasePrivate; + +struct _GTlsDatabase +{ + GObject parent_instance; + + GTlsDatabasePrivate *priv; +}; + +struct _GTlsDatabaseClass +{ + GObjectClass parent_class; + + /* virtual methods */ + + GTlsCertificateFlags (*verify_chain) (GTlsDatabase *self, + GTlsCertificate *chain, + const gchar *purpose, + GSocketConnectable *identity, + GTlsInteraction *interaction, + GTlsDatabaseVerifyFlags flags, + GCancellable *cancellable, + GError **error); + + void (*verify_chain_async) (GTlsDatabase *self, + GTlsCertificate *chain, + const gchar *purpose, + GSocketConnectable *identity, + GTlsInteraction *interaction, + GTlsDatabaseVerifyFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + GTlsCertificateFlags (*verify_chain_finish) (GTlsDatabase *self, + GAsyncResult *result, + GError **error); + + gchar* (*create_certificate_handle) (GTlsDatabase *self, + GTlsCertificate *certificate); + + GTlsCertificate* (*lookup_certificate_for_handle) (GTlsDatabase *self, + const gchar *handle, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GError **error); + + void (*lookup_certificate_for_handle_async) (GTlsDatabase *self, + const gchar *handle, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + GTlsCertificate* (*lookup_certificate_for_handle_finish) (GTlsDatabase *self, + GAsyncResult *result, + GError **error); + + GTlsCertificate* (*lookup_certificate_issuer) (GTlsDatabase *self, + GTlsCertificate *certificate, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GError **error); + + void (*lookup_certificate_issuer_async) (GTlsDatabase *self, + GTlsCertificate *certificate, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + GTlsCertificate* (*lookup_certificate_issuer_finish) (GTlsDatabase *self, + GAsyncResult *result, + GError **error); + + GList* (*lookup_certificates_issued_by) (GTlsDatabase *self, + GByteArray *issuer_raw_dn, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GError **error); + + void (*lookup_certificates_issued_by_async) (GTlsDatabase *self, + GByteArray *issuer_raw_dn, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + GList* (*lookup_certificates_issued_by_finish) (GTlsDatabase *self, + GAsyncResult *result, + GError **error); + + /*< private >*/ + /* Padding for future expansion */ + gpointer padding[16]; +}; + +GIO_AVAILABLE_IN_ALL +GType g_tls_database_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GTlsCertificateFlags g_tls_database_verify_chain (GTlsDatabase *self, + GTlsCertificate *chain, + const gchar *purpose, + GSocketConnectable *identity, + GTlsInteraction *interaction, + GTlsDatabaseVerifyFlags flags, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_tls_database_verify_chain_async (GTlsDatabase *self, + GTlsCertificate *chain, + const gchar *purpose, + GSocketConnectable *identity, + GTlsInteraction *interaction, + GTlsDatabaseVerifyFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_ALL +GTlsCertificateFlags g_tls_database_verify_chain_finish (GTlsDatabase *self, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +gchar* g_tls_database_create_certificate_handle (GTlsDatabase *self, + GTlsCertificate *certificate); + +GIO_AVAILABLE_IN_ALL +GTlsCertificate* g_tls_database_lookup_certificate_for_handle (GTlsDatabase *self, + const gchar *handle, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_tls_database_lookup_certificate_for_handle_async (GTlsDatabase *self, + const gchar *handle, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_ALL +GTlsCertificate* g_tls_database_lookup_certificate_for_handle_finish (GTlsDatabase *self, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +GTlsCertificate* g_tls_database_lookup_certificate_issuer (GTlsDatabase *self, + GTlsCertificate *certificate, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_tls_database_lookup_certificate_issuer_async (GTlsDatabase *self, + GTlsCertificate *certificate, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_ALL +GTlsCertificate* g_tls_database_lookup_certificate_issuer_finish (GTlsDatabase *self, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_ALL +GList* g_tls_database_lookup_certificates_issued_by (GTlsDatabase *self, + GByteArray *issuer_raw_dn, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_tls_database_lookup_certificates_issued_by_async (GTlsDatabase *self, + GByteArray *issuer_raw_dn, + GTlsInteraction *interaction, + GTlsDatabaseLookupFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_ALL +GList* g_tls_database_lookup_certificates_issued_by_finish (GTlsDatabase *self, + GAsyncResult *result, + GError **error); + +G_END_DECLS + +#endif /* __G_TLS_DATABASE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsfiledatabase.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsfiledatabase.h new file mode 100644 index 0000000..57db68e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsfiledatabase.h @@ -0,0 +1,60 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2010 Collabora, Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * See the included COPYING file for more information. + * + * Author: Stef Walter + */ + +#ifndef __G_TLS_FILE_DATABASE_H__ +#define __G_TLS_FILE_DATABASE_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_TLS_FILE_DATABASE (g_tls_file_database_get_type ()) +#define G_TLS_FILE_DATABASE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TLS_FILE_DATABASE, GTlsFileDatabase)) +#define G_IS_TLS_FILE_DATABASE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TLS_FILE_DATABASE)) +#define G_TLS_FILE_DATABASE_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_TLS_FILE_DATABASE, GTlsFileDatabaseInterface)) + +typedef struct _GTlsFileDatabaseInterface GTlsFileDatabaseInterface; + +/** + * GTlsFileDatabaseInterface: + * @g_iface: The parent interface. + * + * Provides an interface for #GTlsFileDatabase implementations. + * + */ +struct _GTlsFileDatabaseInterface +{ + GTypeInterface g_iface; + + /*< private >*/ + /* Padding for future expansion */ + gpointer padding[8]; +}; + +GIO_AVAILABLE_IN_ALL +GType g_tls_file_database_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GTlsDatabase* g_tls_file_database_new (const gchar *anchors, + GError **error); + +G_END_DECLS + +#endif /* __G_TLS_FILE_DATABASE_H___ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsinteraction.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsinteraction.h new file mode 100644 index 0000000..68e3662 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsinteraction.h @@ -0,0 +1,150 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2011 Collabora, Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Stef Walter + */ + +#ifndef __G_TLS_INTERACTION_H__ +#define __G_TLS_INTERACTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_TLS_INTERACTION (g_tls_interaction_get_type ()) +#define G_TLS_INTERACTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_TLS_INTERACTION, GTlsInteraction)) +#define G_TLS_INTERACTION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_TLS_INTERACTION, GTlsInteractionClass)) +#define G_IS_TLS_INTERACTION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_TLS_INTERACTION)) +#define G_IS_TLS_INTERACTION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_TLS_INTERACTION)) +#define G_TLS_INTERACTION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_TLS_INTERACTION, GTlsInteractionClass)) + +typedef struct _GTlsInteractionClass GTlsInteractionClass; +typedef struct _GTlsInteractionPrivate GTlsInteractionPrivate; + +struct _GTlsInteraction +{ + /*< private >*/ + GObject parent_instance; + GTlsInteractionPrivate *priv; +}; + +struct _GTlsInteractionClass +{ + /*< private >*/ + GObjectClass parent_class; + + /*< public >*/ + GTlsInteractionResult (* ask_password) (GTlsInteraction *interaction, + GTlsPassword *password, + GCancellable *cancellable, + GError **error); + + void (* ask_password_async) (GTlsInteraction *interaction, + GTlsPassword *password, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + GTlsInteractionResult (* ask_password_finish) (GTlsInteraction *interaction, + GAsyncResult *result, + GError **error); + + GTlsInteractionResult (* request_certificate) (GTlsInteraction *interaction, + GTlsConnection *connection, + GTlsCertificateRequestFlags flags, + GCancellable *cancellable, + GError **error); + + void (* request_certificate_async) (GTlsInteraction *interaction, + GTlsConnection *connection, + GTlsCertificateRequestFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + GTlsInteractionResult (* request_certificate_finish) (GTlsInteraction *interaction, + GAsyncResult *result, + GError **error); + + /*< private >*/ + /* Padding for future expansion */ + gpointer padding[21]; +}; + +GIO_AVAILABLE_IN_ALL +GType g_tls_interaction_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GTlsInteractionResult g_tls_interaction_invoke_ask_password (GTlsInteraction *interaction, + GTlsPassword *password, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +GTlsInteractionResult g_tls_interaction_ask_password (GTlsInteraction *interaction, + GTlsPassword *password, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +void g_tls_interaction_ask_password_async (GTlsInteraction *interaction, + GTlsPassword *password, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_ALL +GTlsInteractionResult g_tls_interaction_ask_password_finish (GTlsInteraction *interaction, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_2_40 +GTlsInteractionResult g_tls_interaction_invoke_request_certificate (GTlsInteraction *interaction, + GTlsConnection *connection, + GTlsCertificateRequestFlags flags, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_40 +GTlsInteractionResult g_tls_interaction_request_certificate (GTlsInteraction *interaction, + GTlsConnection *connection, + GTlsCertificateRequestFlags flags, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_2_40 +void g_tls_interaction_request_certificate_async (GTlsInteraction *interaction, + GTlsConnection *connection, + GTlsCertificateRequestFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_AVAILABLE_IN_2_40 +GTlsInteractionResult g_tls_interaction_request_certificate_finish (GTlsInteraction *interaction, + GAsyncResult *result, + GError **error); + +G_END_DECLS + +#endif /* __G_TLS_INTERACTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlspassword.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlspassword.h new file mode 100644 index 0000000..a33ec73 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlspassword.h @@ -0,0 +1,121 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2011 Collabora, Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Stef Walter + */ + +#ifndef __G_TLS_PASSWORD_H__ +#define __G_TLS_PASSWORD_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_TLS_PASSWORD (g_tls_password_get_type ()) +#define G_TLS_PASSWORD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_TLS_PASSWORD, GTlsPassword)) +#define G_TLS_PASSWORD_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_TLS_PASSWORD, GTlsPasswordClass)) +#define G_IS_TLS_PASSWORD(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_TLS_PASSWORD)) +#define G_IS_TLS_PASSWORD_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_TLS_PASSWORD)) +#define G_TLS_PASSWORD_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_TLS_PASSWORD, GTlsPasswordClass)) + +typedef struct _GTlsPasswordClass GTlsPasswordClass; +typedef struct _GTlsPasswordPrivate GTlsPasswordPrivate; + +struct _GTlsPassword +{ + GObject parent_instance; + + GTlsPasswordPrivate *priv; +}; + +/** + * GTlsPasswordClass: + * @get_value: virtual method for g_tls_password_get_value() + * @set_value: virtual method for g_tls_password_set_value() + * @get_default_warning: virtual method for g_tls_password_get_warning() if no + * value has been set using g_tls_password_set_warning() + * + * Class structure for #GTlsPassword. + */ +struct _GTlsPasswordClass +{ + GObjectClass parent_class; + + /* methods */ + + const guchar * ( *get_value) (GTlsPassword *password, + gsize *length); + + void ( *set_value) (GTlsPassword *password, + guchar *value, + gssize length, + GDestroyNotify destroy); + + const gchar* ( *get_default_warning) (GTlsPassword *password); + + /*< private >*/ + /* Padding for future expansion */ + gpointer padding[4]; +}; + +GIO_AVAILABLE_IN_ALL +GType g_tls_password_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GTlsPassword * g_tls_password_new (GTlsPasswordFlags flags, + const gchar *description); + +GIO_AVAILABLE_IN_ALL +const guchar * g_tls_password_get_value (GTlsPassword *password, + gsize *length); +GIO_AVAILABLE_IN_ALL +void g_tls_password_set_value (GTlsPassword *password, + const guchar *value, + gssize length); +GIO_AVAILABLE_IN_ALL +void g_tls_password_set_value_full (GTlsPassword *password, + guchar *value, + gssize length, + GDestroyNotify destroy); + +GIO_AVAILABLE_IN_ALL +GTlsPasswordFlags g_tls_password_get_flags (GTlsPassword *password); +GIO_AVAILABLE_IN_ALL +void g_tls_password_set_flags (GTlsPassword *password, + GTlsPasswordFlags flags); + +GIO_AVAILABLE_IN_ALL +const gchar* g_tls_password_get_description (GTlsPassword *password); +GIO_AVAILABLE_IN_ALL +void g_tls_password_set_description (GTlsPassword *password, + const gchar *description); + +GIO_AVAILABLE_IN_ALL +const gchar * g_tls_password_get_warning (GTlsPassword *password); +GIO_AVAILABLE_IN_ALL +void g_tls_password_set_warning (GTlsPassword *password, + const gchar *warning); + +G_END_DECLS + +#endif /* __G_TLS_PASSWORD_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsserverconnection.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsserverconnection.h new file mode 100644 index 0000000..f84c25b --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gtlsserverconnection.h @@ -0,0 +1,71 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_TLS_SERVER_CONNECTION_H__ +#define __G_TLS_SERVER_CONNECTION_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_TLS_SERVER_CONNECTION (g_tls_server_connection_get_type ()) +#define G_TLS_SERVER_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TLS_SERVER_CONNECTION, GTlsServerConnection)) +#define G_IS_TLS_SERVER_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TLS_SERVER_CONNECTION)) +#define G_TLS_SERVER_CONNECTION_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_TLS_SERVER_CONNECTION, GTlsServerConnectionInterface)) + +/** + * GTlsServerConnection: + * + * TLS server-side connection. This is the server-side implementation + * of a #GTlsConnection. + * + * Since: 2.28 + */ +typedef struct _GTlsServerConnectionInterface GTlsServerConnectionInterface; + +/** + * GTlsServerConnectionInterface: + * @g_iface: The parent interface. + * + * vtable for a #GTlsServerConnection implementation. + * + * Since: 2.26 + */ +struct _GTlsServerConnectionInterface +{ + GTypeInterface g_iface; + +}; + +GIO_AVAILABLE_IN_ALL +GType g_tls_server_connection_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GIOStream * g_tls_server_connection_new (GIOStream *base_io_stream, + GTlsCertificate *certificate, + GError **error); + +G_END_DECLS + +#endif /* __G_TLS_SERVER_CONNECTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gunixconnection.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gunixconnection.h new file mode 100644 index 0000000..e08e818 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gunixconnection.h @@ -0,0 +1,102 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2009 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + */ + +#ifndef __G_UNIX_CONNECTION_H__ +#define __G_UNIX_CONNECTION_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_UNIX_CONNECTION (g_unix_connection_get_type ()) +#define G_UNIX_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_UNIX_CONNECTION, GUnixConnection)) +#define G_UNIX_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_UNIX_CONNECTION, GUnixConnectionClass)) +#define G_IS_UNIX_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_UNIX_CONNECTION)) +#define G_IS_UNIX_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_UNIX_CONNECTION)) +#define G_UNIX_CONNECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_UNIX_CONNECTION, GUnixConnectionClass)) + +typedef struct _GUnixConnection GUnixConnection; +typedef struct _GUnixConnectionPrivate GUnixConnectionPrivate; +typedef struct _GUnixConnectionClass GUnixConnectionClass; + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixConnection, g_object_unref) + +struct _GUnixConnectionClass +{ + GSocketConnectionClass parent_class; +}; + +struct _GUnixConnection +{ + GSocketConnection parent_instance; + GUnixConnectionPrivate *priv; +}; + +GIO_AVAILABLE_IN_ALL +GType g_unix_connection_get_type (void); + +GIO_AVAILABLE_IN_ALL +gboolean g_unix_connection_send_fd (GUnixConnection *connection, + gint fd, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_ALL +gint g_unix_connection_receive_fd (GUnixConnection *connection, + GCancellable *cancellable, + GError **error); + +GIO_AVAILABLE_IN_ALL +gboolean g_unix_connection_send_credentials (GUnixConnection *connection, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_32 +void g_unix_connection_send_credentials_async (GUnixConnection *connection, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_2_32 +gboolean g_unix_connection_send_credentials_finish (GUnixConnection *connection, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_2_32 +GCredentials *g_unix_connection_receive_credentials (GUnixConnection *connection, + GCancellable *cancellable, + GError **error); +GIO_AVAILABLE_IN_2_32 +void g_unix_connection_receive_credentials_async (GUnixConnection *connection, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +GCredentials *g_unix_connection_receive_credentials_finish (GUnixConnection *connection, + GAsyncResult *result, + GError **error); + +G_END_DECLS + +#endif /* __G_UNIX_CONNECTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gunixcredentialsmessage.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gunixcredentialsmessage.h new file mode 100644 index 0000000..cd42d25 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gunixcredentialsmessage.h @@ -0,0 +1,89 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2010 Red Hat, Inc. + * Copyright (C) 2009 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: David Zeuthen + */ + +#ifndef __G_UNIX_CREDENTIALS_MESSAGE_H__ +#define __G_UNIX_CREDENTIALS_MESSAGE_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_UNIX_CREDENTIALS_MESSAGE (g_unix_credentials_message_get_type ()) +#define G_UNIX_CREDENTIALS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_CREDENTIALS_MESSAGE, GUnixCredentialsMessage)) +#define G_UNIX_CREDENTIALS_MESSAGE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), G_TYPE_UNIX_CREDENTIALS_MESSAGE, GUnixCredentialsMessageClass)) +#define G_IS_UNIX_CREDENTIALS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_CREDENTIALS_MESSAGE)) +#define G_IS_UNIX_CREDENTIALS_MESSAGE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), G_TYPE_UNIX_CREDENTIALS_MESSAGE)) +#define G_UNIX_CREDENTIALS_MESSAGE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_UNIX_CREDENTIALS_MESSAGE, GUnixCredentialsMessageClass)) + +typedef struct _GUnixCredentialsMessagePrivate GUnixCredentialsMessagePrivate; +typedef struct _GUnixCredentialsMessageClass GUnixCredentialsMessageClass; + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixCredentialsMessage, g_object_unref) + +/** + * GUnixCredentialsMessageClass: + * + * Class structure for #GUnixCredentialsMessage. + * + * Since: 2.26 + */ +struct _GUnixCredentialsMessageClass +{ + GSocketControlMessageClass parent_class; + + /*< private >*/ + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); +}; + +/** + * GUnixCredentialsMessage: + * + * The #GUnixCredentialsMessage structure contains only private data + * and should only be accessed using the provided API. + * + * Since: 2.26 + */ +struct _GUnixCredentialsMessage +{ + GSocketControlMessage parent_instance; + GUnixCredentialsMessagePrivate *priv; +}; + +GIO_AVAILABLE_IN_ALL +GType g_unix_credentials_message_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GSocketControlMessage *g_unix_credentials_message_new (void); +GIO_AVAILABLE_IN_ALL +GSocketControlMessage *g_unix_credentials_message_new_with_credentials (GCredentials *credentials); +GIO_AVAILABLE_IN_ALL +GCredentials *g_unix_credentials_message_get_credentials (GUnixCredentialsMessage *message); + +GIO_AVAILABLE_IN_ALL +gboolean g_unix_credentials_message_is_supported (void); + +G_END_DECLS + +#endif /* __G_UNIX_CREDENTIALS_MESSAGE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gunixfdlist.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gunixfdlist.h new file mode 100644 index 0000000..df5587e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gunixfdlist.h @@ -0,0 +1,97 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright © 2009 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Ryan Lortie + */ + +#ifndef __G_UNIX_FD_LIST_H__ +#define __G_UNIX_FD_LIST_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_UNIX_FD_LIST (g_unix_fd_list_get_type ()) +#define G_UNIX_FD_LIST(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ + G_TYPE_UNIX_FD_LIST, GUnixFDList)) +#define G_UNIX_FD_LIST_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ + G_TYPE_UNIX_FD_LIST, GUnixFDListClass)) +#define G_IS_UNIX_FD_LIST(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_UNIX_FD_LIST)) +#define G_IS_UNIX_FD_LIST_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ + G_TYPE_UNIX_FD_LIST)) +#define G_UNIX_FD_LIST_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ + G_TYPE_UNIX_FD_LIST, GUnixFDListClass)) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixFDList, g_object_unref) + +typedef struct _GUnixFDListPrivate GUnixFDListPrivate; +typedef struct _GUnixFDListClass GUnixFDListClass; + +struct _GUnixFDListClass +{ + GObjectClass parent_class; + + /*< private >*/ + + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); +}; + +struct _GUnixFDList +{ + GObject parent_instance; + GUnixFDListPrivate *priv; +}; + +GIO_AVAILABLE_IN_ALL +GType g_unix_fd_list_get_type (void) G_GNUC_CONST; +GIO_AVAILABLE_IN_ALL +GUnixFDList * g_unix_fd_list_new (void); +GIO_AVAILABLE_IN_ALL +GUnixFDList * g_unix_fd_list_new_from_array (const gint *fds, + gint n_fds); + +GIO_AVAILABLE_IN_ALL +gint g_unix_fd_list_append (GUnixFDList *list, + gint fd, + GError **error); + +GIO_AVAILABLE_IN_ALL +gint g_unix_fd_list_get_length (GUnixFDList *list); + +GIO_AVAILABLE_IN_ALL +gint g_unix_fd_list_get (GUnixFDList *list, + gint index_, + GError **error); + +GIO_AVAILABLE_IN_ALL +const gint * g_unix_fd_list_peek_fds (GUnixFDList *list, + gint *length); + +GIO_AVAILABLE_IN_ALL +gint * g_unix_fd_list_steal_fds (GUnixFDList *list, + gint *length); + +G_END_DECLS + +#endif /* __G_UNIX_FD_LIST_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gunixsocketaddress.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gunixsocketaddress.h new file mode 100644 index 0000000..705674b --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gunixsocketaddress.h @@ -0,0 +1,83 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Authors: Christian Kellner + * Samuel Cormier-Iijima + */ + +#ifndef __G_UNIX_SOCKET_ADDRESS_H__ +#define __G_UNIX_SOCKET_ADDRESS_H__ + +#include + +G_BEGIN_DECLS + +#define G_TYPE_UNIX_SOCKET_ADDRESS (g_unix_socket_address_get_type ()) +#define G_UNIX_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_SOCKET_ADDRESS, GUnixSocketAddress)) +#define G_UNIX_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_SOCKET_ADDRESS, GUnixSocketAddressClass)) +#define G_IS_UNIX_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_SOCKET_ADDRESS)) +#define G_IS_UNIX_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_UNIX_SOCKET_ADDRESS)) +#define G_UNIX_SOCKET_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_UNIX_SOCKET_ADDRESS, GUnixSocketAddressClass)) + +typedef struct _GUnixSocketAddress GUnixSocketAddress; +typedef struct _GUnixSocketAddressClass GUnixSocketAddressClass; +typedef struct _GUnixSocketAddressPrivate GUnixSocketAddressPrivate; + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixSocketAddress, g_object_unref) + +struct _GUnixSocketAddress +{ + GSocketAddress parent_instance; + + /*< private >*/ + GUnixSocketAddressPrivate *priv; +}; + +struct _GUnixSocketAddressClass +{ + GSocketAddressClass parent_class; +}; + +GIO_AVAILABLE_IN_ALL +GType g_unix_socket_address_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GSocketAddress *g_unix_socket_address_new (const gchar *path); +GIO_DEPRECATED_FOR(g_unix_socket_address_new_with_type) +GSocketAddress *g_unix_socket_address_new_abstract (const gchar *path, + gint path_len); +GIO_AVAILABLE_IN_ALL +GSocketAddress *g_unix_socket_address_new_with_type (const gchar *path, + gint path_len, + GUnixSocketAddressType type); +GIO_AVAILABLE_IN_ALL +const char * g_unix_socket_address_get_path (GUnixSocketAddress *address); +GIO_AVAILABLE_IN_ALL +gsize g_unix_socket_address_get_path_len (GUnixSocketAddress *address); +GIO_AVAILABLE_IN_ALL +GUnixSocketAddressType g_unix_socket_address_get_address_type (GUnixSocketAddress *address); +GIO_DEPRECATED +gboolean g_unix_socket_address_get_is_abstract (GUnixSocketAddress *address); + +GIO_AVAILABLE_IN_ALL +gboolean g_unix_socket_address_abstract_names_supported (void); + +G_END_DECLS + +#endif /* __G_UNIX_SOCKET_ADDRESS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gvfs.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gvfs.h new file mode 100644 index 0000000..cbe9792 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gvfs.h @@ -0,0 +1,170 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_VFS_H__ +#define __G_VFS_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_VFS (g_vfs_get_type ()) +#define G_VFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_VFS, GVfs)) +#define G_VFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_VFS, GVfsClass)) +#define G_VFS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_VFS, GVfsClass)) +#define G_IS_VFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_VFS)) +#define G_IS_VFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_VFS)) + +/** + * GVfsFileLookupFunc: + * @vfs: a #GVfs + * @identifier: the identifier to look up a #GFile for. This can either + * be an URI or a parse name as returned by g_file_get_parse_name() + * @user_data: user data passed to the function + * + * This function type is used by g_vfs_register_uri_scheme() to make it + * possible for a client to associate an URI scheme to a different #GFile + * implementation. + * + * The client should return a reference to the new file that has been + * created for @uri, or %NULL to continue with the default implementation. + * + * Returns: (transfer full): a #GFile for @identifier. + * + * Since: 2.50 + */ +typedef GFile * (* GVfsFileLookupFunc) (GVfs *vfs, + const char *identifier, + gpointer user_data); + +/** + * G_VFS_EXTENSION_POINT_NAME: + * + * Extension point for #GVfs functionality. + * See [Extending GIO][extending-gio]. + */ +#define G_VFS_EXTENSION_POINT_NAME "gio-vfs" + +/** + * GVfs: + * + * Virtual File System object. + **/ +typedef struct _GVfsClass GVfsClass; + +struct _GVfs +{ + GObject parent_instance; +}; + +struct _GVfsClass +{ + GObjectClass parent_class; + + /* Virtual Table */ + + gboolean (* is_active) (GVfs *vfs); + GFile * (* get_file_for_path) (GVfs *vfs, + const char *path); + GFile * (* get_file_for_uri) (GVfs *vfs, + const char *uri); + const gchar * const * (* get_supported_uri_schemes) (GVfs *vfs); + GFile * (* parse_name) (GVfs *vfs, + const char *parse_name); + + /*< private >*/ + void (* local_file_add_info) (GVfs *vfs, + const char *filename, + guint64 device, + GFileAttributeMatcher *attribute_matcher, + GFileInfo *info, + GCancellable *cancellable, + gpointer *extra_data, + GDestroyNotify *free_extra_data); + void (* add_writable_namespaces) (GVfs *vfs, + GFileAttributeInfoList *list); + gboolean (* local_file_set_attributes) (GVfs *vfs, + const char *filename, + GFileInfo *info, + GFileQueryInfoFlags flags, + GCancellable *cancellable, + GError **error); + void (* local_file_removed) (GVfs *vfs, + const char *filename); + void (* local_file_moved) (GVfs *vfs, + const char *source, + const char *dest); + GIcon * (* deserialize_icon) (GVfs *vfs, + GVariant *value); + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_vfs_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +gboolean g_vfs_is_active (GVfs *vfs); +GIO_AVAILABLE_IN_ALL +GFile * g_vfs_get_file_for_path (GVfs *vfs, + const char *path); +GIO_AVAILABLE_IN_ALL +GFile * g_vfs_get_file_for_uri (GVfs *vfs, + const char *uri); +GIO_AVAILABLE_IN_ALL +const gchar* const * g_vfs_get_supported_uri_schemes (GVfs *vfs); + +GIO_AVAILABLE_IN_ALL +GFile * g_vfs_parse_name (GVfs *vfs, + const char *parse_name); + +GIO_AVAILABLE_IN_ALL +GVfs * g_vfs_get_default (void); +GIO_AVAILABLE_IN_ALL +GVfs * g_vfs_get_local (void); + +GIO_AVAILABLE_IN_2_50 +gboolean g_vfs_register_uri_scheme (GVfs *vfs, + const char *scheme, + GVfsFileLookupFunc uri_func, + gpointer uri_data, + GDestroyNotify uri_destroy, + GVfsFileLookupFunc parse_name_func, + gpointer parse_name_data, + GDestroyNotify parse_name_destroy); +GIO_AVAILABLE_IN_2_50 +gboolean g_vfs_unregister_uri_scheme (GVfs *vfs, + const char *scheme); + + +G_END_DECLS + +#endif /* __G_VFS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gvolume.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gvolume.h new file mode 100644 index 0000000..2d6e14e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gvolume.h @@ -0,0 +1,255 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + * David Zeuthen + */ + +#ifndef __G_VOLUME_H__ +#define __G_VOLUME_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * G_VOLUME_IDENTIFIER_KIND_HAL_UDI: + * + * The string used to obtain a Hal UDI with g_volume_get_identifier(). + * + * Deprecated: 2.58: Do not use, HAL is deprecated. + */ +#define G_VOLUME_IDENTIFIER_KIND_HAL_UDI "hal-udi" GIO_DEPRECATED_MACRO_IN_2_58 + +/** + * G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE: + * + * The string used to obtain a Unix device path with g_volume_get_identifier(). + */ +#define G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE "unix-device" + +/** + * G_VOLUME_IDENTIFIER_KIND_LABEL: + * + * The string used to obtain a filesystem label with g_volume_get_identifier(). + */ +#define G_VOLUME_IDENTIFIER_KIND_LABEL "label" + +/** + * G_VOLUME_IDENTIFIER_KIND_UUID: + * + * The string used to obtain a UUID with g_volume_get_identifier(). + */ +#define G_VOLUME_IDENTIFIER_KIND_UUID "uuid" + +/** + * G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT: + * + * The string used to obtain a NFS mount with g_volume_get_identifier(). + */ +#define G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT "nfs-mount" + +/** + * G_VOLUME_IDENTIFIER_KIND_CLASS: + * + * The string used to obtain the volume class with g_volume_get_identifier(). + * + * Known volume classes include `device`, `network`, and `loop`. Other + * classes may be added in the future. + * + * This is intended to be used by applications to classify #GVolume + * instances into different sections - for example a file manager or + * file chooser can use this information to show `network` volumes under + * a "Network" heading and `device` volumes under a "Devices" heading. + */ +#define G_VOLUME_IDENTIFIER_KIND_CLASS "class" + + +#define G_TYPE_VOLUME (g_volume_get_type ()) +#define G_VOLUME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_VOLUME, GVolume)) +#define G_IS_VOLUME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_VOLUME)) +#define G_VOLUME_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_VOLUME, GVolumeIface)) + +/** + * GVolumeIface: + * @g_iface: The parent interface. + * @changed: Changed signal that is emitted when the volume's state has changed. + * @removed: The removed signal that is emitted when the #GVolume have been removed. If the recipient is holding references to the object they should release them so the object can be finalized. + * @get_name: Gets a string containing the name of the #GVolume. + * @get_icon: Gets a #GIcon for the #GVolume. + * @get_uuid: Gets the UUID for the #GVolume. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available. + * @get_drive: Gets a #GDrive the volume is located on. Returns %NULL if the #GVolume is not associated with a #GDrive. + * @get_mount: Gets a #GMount representing the mounted volume. Returns %NULL if the #GVolume is not mounted. + * @can_mount: Returns %TRUE if the #GVolume can be mounted. + * @can_eject: Checks if a #GVolume can be ejected. + * @mount_fn: Mounts a given #GVolume. + * #GVolume implementations must emit the #GMountOperation::aborted + * signal before completing a mount operation that is aborted while + * awaiting input from the user through a #GMountOperation instance. + * @mount_finish: Finishes a mount operation. + * @eject: Ejects a given #GVolume. + * @eject_finish: Finishes an eject operation. + * @get_identifier: Returns the [identifier][volume-identifier] of the given kind, or %NULL if + * the #GVolume doesn't have one. + * @enumerate_identifiers: Returns an array strings listing the kinds + * of [identifiers][volume-identifier] which the #GVolume has. + * @should_automount: Returns %TRUE if the #GVolume should be automatically mounted. + * @get_activation_root: Returns the activation root for the #GVolume if it is known in advance or %NULL if + * it is not known. + * @eject_with_operation: Starts ejecting a #GVolume using a #GMountOperation. Since 2.22. + * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22. + * @get_sort_key: Gets a key used for sorting #GVolume instance or %NULL if no such key exists. Since 2.32. + * @get_symbolic_icon: Gets a symbolic #GIcon for the #GVolume. Since 2.34. + * + * Interface for implementing operations for mountable volumes. + **/ +typedef struct _GVolumeIface GVolumeIface; + +struct _GVolumeIface +{ + GTypeInterface g_iface; + + /* signals */ + + void (* changed) (GVolume *volume); + void (* removed) (GVolume *volume); + + /* Virtual Table */ + + char * (* get_name) (GVolume *volume); + GIcon * (* get_icon) (GVolume *volume); + char * (* get_uuid) (GVolume *volume); + GDrive * (* get_drive) (GVolume *volume); + GMount * (* get_mount) (GVolume *volume); + gboolean (* can_mount) (GVolume *volume); + gboolean (* can_eject) (GVolume *volume); + void (* mount_fn) (GVolume *volume, + GMountMountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* mount_finish) (GVolume *volume, + GAsyncResult *result, + GError **error); + void (* eject) (GVolume *volume, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* eject_finish) (GVolume *volume, + GAsyncResult *result, + GError **error); + + char * (* get_identifier) (GVolume *volume, + const char *kind); + char ** (* enumerate_identifiers) (GVolume *volume); + + gboolean (* should_automount) (GVolume *volume); + + GFile * (* get_activation_root) (GVolume *volume); + + void (* eject_with_operation) (GVolume *volume, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* eject_with_operation_finish) (GVolume *volume, + GAsyncResult *result, + GError **error); + + const gchar * (* get_sort_key) (GVolume *volume); + GIcon * (* get_symbolic_icon) (GVolume *volume); +}; + +GIO_AVAILABLE_IN_ALL +GType g_volume_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +char * g_volume_get_name (GVolume *volume); +GIO_AVAILABLE_IN_ALL +GIcon * g_volume_get_icon (GVolume *volume); +GIO_AVAILABLE_IN_ALL +GIcon * g_volume_get_symbolic_icon (GVolume *volume); +GIO_AVAILABLE_IN_ALL +char * g_volume_get_uuid (GVolume *volume); +GIO_AVAILABLE_IN_ALL +GDrive * g_volume_get_drive (GVolume *volume); +GIO_AVAILABLE_IN_ALL +GMount * g_volume_get_mount (GVolume *volume); +GIO_AVAILABLE_IN_ALL +gboolean g_volume_can_mount (GVolume *volume); +GIO_AVAILABLE_IN_ALL +gboolean g_volume_can_eject (GVolume *volume); +GIO_AVAILABLE_IN_ALL +gboolean g_volume_should_automount (GVolume *volume); +GIO_AVAILABLE_IN_ALL +void g_volume_mount (GVolume *volume, + GMountMountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_volume_mount_finish (GVolume *volume, + GAsyncResult *result, + GError **error); +GIO_DEPRECATED_FOR(g_volume_eject_with_operation) +void g_volume_eject (GVolume *volume, + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +GIO_DEPRECATED_FOR(g_volume_eject_with_operation_finish) +gboolean g_volume_eject_finish (GVolume *volume, + GAsyncResult *result, + GError **error); +GIO_AVAILABLE_IN_ALL +char * g_volume_get_identifier (GVolume *volume, + const char *kind); +GIO_AVAILABLE_IN_ALL +char ** g_volume_enumerate_identifiers (GVolume *volume); + +GIO_AVAILABLE_IN_ALL +GFile * g_volume_get_activation_root (GVolume *volume); + +GIO_AVAILABLE_IN_ALL +void g_volume_eject_with_operation (GVolume *volume, + GMountUnmountFlags flags, + GMountOperation *mount_operation, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GIO_AVAILABLE_IN_ALL +gboolean g_volume_eject_with_operation_finish (GVolume *volume, + GAsyncResult *result, + GError **error); + +GIO_AVAILABLE_IN_2_32 +const gchar *g_volume_get_sort_key (GVolume *volume); + +G_END_DECLS + +#endif /* __G_VOLUME_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gvolumemonitor.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gvolumemonitor.h new file mode 100644 index 0000000..11bd331 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gvolumemonitor.h @@ -0,0 +1,156 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ + +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + * David Zeuthen + */ + +#ifndef __G_VOLUME_MONITOR_H__ +#define __G_VOLUME_MONITOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_TYPE_VOLUME_MONITOR (g_volume_monitor_get_type ()) +#define G_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_VOLUME_MONITOR, GVolumeMonitor)) +#define G_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_VOLUME_MONITOR, GVolumeMonitorClass)) +#define G_VOLUME_MONITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_VOLUME_MONITOR, GVolumeMonitorClass)) +#define G_IS_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_VOLUME_MONITOR)) +#define G_IS_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_VOLUME_MONITOR)) + +/** + * G_VOLUME_MONITOR_EXTENSION_POINT_NAME: + * + * Extension point for volume monitor functionality. + * See [Extending GIO][extending-gio]. + */ +#define G_VOLUME_MONITOR_EXTENSION_POINT_NAME "gio-volume-monitor" + +/** + * GVolumeMonitor: + * + * A Volume Monitor that watches for volume events. + **/ +typedef struct _GVolumeMonitorClass GVolumeMonitorClass; + +struct _GVolumeMonitor +{ + GObject parent_instance; + + /*< private >*/ + gpointer priv; +}; + +struct _GVolumeMonitorClass +{ + GObjectClass parent_class; + + /*< public >*/ + /* signals */ + void (* volume_added) (GVolumeMonitor *volume_monitor, + GVolume *volume); + void (* volume_removed) (GVolumeMonitor *volume_monitor, + GVolume *volume); + void (* volume_changed) (GVolumeMonitor *volume_monitor, + GVolume *volume); + + void (* mount_added) (GVolumeMonitor *volume_monitor, + GMount *mount); + void (* mount_removed) (GVolumeMonitor *volume_monitor, + GMount *mount); + void (* mount_pre_unmount) (GVolumeMonitor *volume_monitor, + GMount *mount); + void (* mount_changed) (GVolumeMonitor *volume_monitor, + GMount *mount); + + void (* drive_connected) (GVolumeMonitor *volume_monitor, + GDrive *drive); + void (* drive_disconnected) (GVolumeMonitor *volume_monitor, + GDrive *drive); + void (* drive_changed) (GVolumeMonitor *volume_monitor, + GDrive *drive); + + /* Vtable */ + + gboolean (* is_supported) (void); + + GList * (* get_connected_drives) (GVolumeMonitor *volume_monitor); + GList * (* get_volumes) (GVolumeMonitor *volume_monitor); + GList * (* get_mounts) (GVolumeMonitor *volume_monitor); + + GVolume * (* get_volume_for_uuid) (GVolumeMonitor *volume_monitor, + const char *uuid); + + GMount * (* get_mount_for_uuid) (GVolumeMonitor *volume_monitor, + const char *uuid); + + + /* These arguments are unfortunately backwards by mistake (bug #520169). Deprecated in 2.20. */ + GVolume * (* adopt_orphan_mount) (GMount *mount, + GVolumeMonitor *volume_monitor); + + /* signal added in 2.17 */ + void (* drive_eject_button) (GVolumeMonitor *volume_monitor, + GDrive *drive); + + /* signal added in 2.21 */ + void (* drive_stop_button) (GVolumeMonitor *volume_monitor, + GDrive *drive); + + /*< private >*/ + /* Padding for future expansion */ + void (*_g_reserved1) (void); + void (*_g_reserved2) (void); + void (*_g_reserved3) (void); + void (*_g_reserved4) (void); + void (*_g_reserved5) (void); + void (*_g_reserved6) (void); +}; + +GIO_AVAILABLE_IN_ALL +GType g_volume_monitor_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GVolumeMonitor *g_volume_monitor_get (void); +GIO_AVAILABLE_IN_ALL +GList * g_volume_monitor_get_connected_drives (GVolumeMonitor *volume_monitor); +GIO_AVAILABLE_IN_ALL +GList * g_volume_monitor_get_volumes (GVolumeMonitor *volume_monitor); +GIO_AVAILABLE_IN_ALL +GList * g_volume_monitor_get_mounts (GVolumeMonitor *volume_monitor); +GIO_AVAILABLE_IN_ALL +GVolume * g_volume_monitor_get_volume_for_uuid (GVolumeMonitor *volume_monitor, + const char *uuid); +GIO_AVAILABLE_IN_ALL +GMount * g_volume_monitor_get_mount_for_uuid (GVolumeMonitor *volume_monitor, + const char *uuid); + +GIO_DEPRECATED +GVolume * g_volume_monitor_adopt_orphan_mount (GMount *mount); + +G_END_DECLS + +#endif /* __G_VOLUME_MONITOR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gzlibcompressor.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gzlibcompressor.h new file mode 100644 index 0000000..b8a99ea --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gzlibcompressor.h @@ -0,0 +1,64 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2009 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_ZLIB_COMPRESSOR_H__ +#define __G_ZLIB_COMPRESSOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +#define G_TYPE_ZLIB_COMPRESSOR (g_zlib_compressor_get_type ()) +#define G_ZLIB_COMPRESSOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_ZLIB_COMPRESSOR, GZlibCompressor)) +#define G_ZLIB_COMPRESSOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_ZLIB_COMPRESSOR, GZlibCompressorClass)) +#define G_IS_ZLIB_COMPRESSOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_ZLIB_COMPRESSOR)) +#define G_IS_ZLIB_COMPRESSOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_ZLIB_COMPRESSOR)) +#define G_ZLIB_COMPRESSOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_ZLIB_COMPRESSOR, GZlibCompressorClass)) + +typedef struct _GZlibCompressorClass GZlibCompressorClass; + +struct _GZlibCompressorClass +{ + GObjectClass parent_class; +}; + +GIO_AVAILABLE_IN_ALL +GType g_zlib_compressor_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GZlibCompressor *g_zlib_compressor_new (GZlibCompressorFormat format, + int level); + +GIO_AVAILABLE_IN_ALL +GFileInfo *g_zlib_compressor_get_file_info (GZlibCompressor *compressor); +GIO_AVAILABLE_IN_ALL +void g_zlib_compressor_set_file_info (GZlibCompressor *compressor, + GFileInfo *file_info); + +G_END_DECLS + +#endif /* __G_ZLIB_COMPRESSOR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gio/gzlibdecompressor.h b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gzlibdecompressor.h new file mode 100644 index 0000000..ef97439 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gio/gzlibdecompressor.h @@ -0,0 +1,60 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2009 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Alexander Larsson + */ + +#ifndef __G_ZLIB_DECOMPRESSOR_H__ +#define __G_ZLIB_DECOMPRESSOR_H__ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +#define G_TYPE_ZLIB_DECOMPRESSOR (g_zlib_decompressor_get_type ()) +#define G_ZLIB_DECOMPRESSOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_ZLIB_DECOMPRESSOR, GZlibDecompressor)) +#define G_ZLIB_DECOMPRESSOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_ZLIB_DECOMPRESSOR, GZlibDecompressorClass)) +#define G_IS_ZLIB_DECOMPRESSOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_ZLIB_DECOMPRESSOR)) +#define G_IS_ZLIB_DECOMPRESSOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_ZLIB_DECOMPRESSOR)) +#define G_ZLIB_DECOMPRESSOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_ZLIB_DECOMPRESSOR, GZlibDecompressorClass)) + +typedef struct _GZlibDecompressorClass GZlibDecompressorClass; + +struct _GZlibDecompressorClass +{ + GObjectClass parent_class; +}; + +GIO_AVAILABLE_IN_ALL +GType g_zlib_decompressor_get_type (void) G_GNUC_CONST; + +GIO_AVAILABLE_IN_ALL +GZlibDecompressor *g_zlib_decompressor_new (GZlibCompressorFormat format); + +GIO_AVAILABLE_IN_ALL +GFileInfo *g_zlib_decompressor_get_file_info (GZlibDecompressor *decompressor); + +G_END_DECLS + +#endif /* __G_ZLIB_DECOMPRESSOR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib-object.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib-object.h new file mode 100644 index 0000000..b00392d --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib-object.h @@ -0,0 +1,46 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1998, 1999, 2000 Tim Janik and Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ +#ifndef __GLIB_GOBJECT_H__ +#define __GLIB_GOBJECT_H__ + +#define __GLIB_GOBJECT_H_INSIDE__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#undef __GLIB_GOBJECT_H_INSIDE__ + +#endif /* __GLIB_GOBJECT_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib-unix.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib-unix.h new file mode 100644 index 0000000..7cf4f0d --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib-unix.h @@ -0,0 +1,125 @@ +/* glib-unix.h - Unix specific integration + * Copyright (C) 2011 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_UNIX_H__ +#define __G_UNIX_H__ + +/* We need to include the UNIX headers needed to use the APIs below, + * but we also take this opportunity to include a wide selection of + * other UNIX headers. If one of the headers below is broken on some + * system, work around it here (or better, fix the system or tell + * people to use a better one). + */ +#include +#include +#include +#include +#include + +#include + +#ifndef G_OS_UNIX +#error "This header may only be used on UNIX" +#endif + +G_BEGIN_DECLS + +/** + * G_UNIX_ERROR: + * + * Error domain for API in the g_unix_ namespace. Note that there is no + * exported enumeration mapping %errno. Instead, all functions ensure that + * %errno is relevant. The code for all %G_UNIX_ERROR is always 0, and the + * error message is always generated via g_strerror(). + * + * It is expected that most code will not look at %errno from these APIs. + * Important cases where one would want to differentiate between errors are + * already covered by existing cross-platform GLib API, such as e.g. #GFile + * wrapping `ENOENT`. However, it is provided for completeness, at least. + */ +#define G_UNIX_ERROR (g_unix_error_quark()) + +GLIB_AVAILABLE_IN_2_30 +GQuark g_unix_error_quark (void); + +GLIB_AVAILABLE_IN_2_30 +gboolean g_unix_open_pipe (gint *fds, + gint flags, + GError **error); + +GLIB_AVAILABLE_IN_2_30 +gboolean g_unix_set_fd_nonblocking (gint fd, + gboolean nonblock, + GError **error); + +GLIB_AVAILABLE_IN_2_30 +GSource *g_unix_signal_source_new (gint signum); + +GLIB_AVAILABLE_IN_2_30 +guint g_unix_signal_add_full (gint priority, + gint signum, + GSourceFunc handler, + gpointer user_data, + GDestroyNotify notify); + +GLIB_AVAILABLE_IN_2_30 +guint g_unix_signal_add (gint signum, + GSourceFunc handler, + gpointer user_data); + +/** + * GUnixFDSourceFunc: + * @fd: the fd that triggered the event + * @condition: the IO conditions reported on @fd + * @user_data: user data passed to g_unix_fd_add() + * + * The type of functions to be called when a UNIX fd watch source + * triggers. + * + * Returns: %FALSE if the source should be removed + **/ +typedef gboolean (*GUnixFDSourceFunc) (gint fd, + GIOCondition condition, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_36 +GSource *g_unix_fd_source_new (gint fd, + GIOCondition condition); + +GLIB_AVAILABLE_IN_2_36 +guint g_unix_fd_add_full (gint priority, + gint fd, + GIOCondition condition, + GUnixFDSourceFunc function, + gpointer user_data, + GDestroyNotify notify); + +GLIB_AVAILABLE_IN_2_36 +guint g_unix_fd_add (gint fd, + GIOCondition condition, + GUnixFDSourceFunc function, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_64 +struct passwd *g_unix_get_passwd_entry (const gchar *user_name, + GError **error); + +G_END_DECLS + +#endif /* __G_UNIX_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib.h new file mode 100644 index 0000000..40e5019 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib.h @@ -0,0 +1,122 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_LIB_H__ +#define __G_LIB_H__ + +#define __GLIB_H_INSIDE__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef G_PLATFORM_WIN32 +#include +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include + +#undef __GLIB_H_INSIDE__ + +#endif /* __G_LIB_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/gallocator.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/gallocator.h new file mode 100644 index 0000000..005e92b --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/gallocator.h @@ -0,0 +1,88 @@ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef __G_ALLOCATOR_H__ +#define __G_ALLOCATOR_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +typedef struct _GAllocator GAllocator; +typedef struct _GMemChunk GMemChunk; + +#define G_ALLOC_ONLY 1 +#define G_ALLOC_AND_FREE 2 +#define G_ALLOCATOR_LIST 1 +#define G_ALLOCATOR_SLIST 2 +#define G_ALLOCATOR_NODE 3 + +#define g_chunk_new(type, chunk) ((type *) g_mem_chunk_alloc (chunk)) +#define g_chunk_new0(type, chunk) ((type *) g_mem_chunk_alloc0 (chunk)) +#define g_chunk_free(mem, mem_chunk) (g_mem_chunk_free (mem_chunk, mem)) +#define g_mem_chunk_create(type, x, y) (g_mem_chunk_new (NULL, sizeof (type), 0, 0)) + + +GLIB_DEPRECATED +GMemChunk * g_mem_chunk_new (const gchar *name, + gint atom_size, + gsize area_size, + gint type); +GLIB_DEPRECATED +void g_mem_chunk_destroy (GMemChunk *mem_chunk); +GLIB_DEPRECATED +gpointer g_mem_chunk_alloc (GMemChunk *mem_chunk); +GLIB_DEPRECATED +gpointer g_mem_chunk_alloc0 (GMemChunk *mem_chunk); +GLIB_DEPRECATED +void g_mem_chunk_free (GMemChunk *mem_chunk, + gpointer mem); +GLIB_DEPRECATED +void g_mem_chunk_clean (GMemChunk *mem_chunk); +GLIB_DEPRECATED +void g_mem_chunk_reset (GMemChunk *mem_chunk); +GLIB_DEPRECATED +void g_mem_chunk_print (GMemChunk *mem_chunk); +GLIB_DEPRECATED +void g_mem_chunk_info (void); +GLIB_DEPRECATED +void g_blow_chunks (void); + + +GLIB_DEPRECATED +GAllocator * g_allocator_new (const gchar *name, + guint n_preallocs); +GLIB_DEPRECATED +void g_allocator_free (GAllocator *allocator); +GLIB_DEPRECATED +void g_list_push_allocator (GAllocator *allocator); +GLIB_DEPRECATED +void g_list_pop_allocator (void); +GLIB_DEPRECATED +void g_slist_push_allocator (GAllocator *allocator); +GLIB_DEPRECATED +void g_slist_pop_allocator (void); +GLIB_DEPRECATED +void g_node_push_allocator (GAllocator *allocator); +GLIB_DEPRECATED +void g_node_pop_allocator (void); + +G_END_DECLS + +#endif /* __G_ALLOCATOR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/gcache.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/gcache.h new file mode 100644 index 0000000..201f7cf --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/gcache.h @@ -0,0 +1,77 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_CACHE_H__ +#define __G_CACHE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +typedef struct _GCache GCache GLIB_DEPRECATED_TYPE_IN_2_26_FOR(GHashTable); + +typedef gpointer (*GCacheNewFunc) (gpointer key) GLIB_DEPRECATED_TYPE_IN_2_26; +typedef gpointer (*GCacheDupFunc) (gpointer value) GLIB_DEPRECATED_TYPE_IN_2_26; +typedef void (*GCacheDestroyFunc) (gpointer value) GLIB_DEPRECATED_TYPE_IN_2_26; + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + +/* Caches + */ +GLIB_DEPRECATED +GCache* g_cache_new (GCacheNewFunc value_new_func, + GCacheDestroyFunc value_destroy_func, + GCacheDupFunc key_dup_func, + GCacheDestroyFunc key_destroy_func, + GHashFunc hash_key_func, + GHashFunc hash_value_func, + GEqualFunc key_equal_func); +GLIB_DEPRECATED +void g_cache_destroy (GCache *cache); +GLIB_DEPRECATED +gpointer g_cache_insert (GCache *cache, + gpointer key); +GLIB_DEPRECATED +void g_cache_remove (GCache *cache, + gconstpointer value); +GLIB_DEPRECATED +void g_cache_key_foreach (GCache *cache, + GHFunc func, + gpointer user_data); +GLIB_DEPRECATED +void g_cache_value_foreach (GCache *cache, + GHFunc func, + gpointer user_data); + +G_GNUC_END_IGNORE_DEPRECATIONS + +G_END_DECLS + +#endif /* __G_CACHE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/gcompletion.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/gcompletion.h new file mode 100644 index 0000000..2be87d2 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/gcompletion.h @@ -0,0 +1,85 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_COMPLETION_H__ +#define __G_COMPLETION_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +typedef struct _GCompletion GCompletion; + +typedef gchar* (*GCompletionFunc) (gpointer); + +/* GCompletion + */ + +typedef gint (*GCompletionStrncmpFunc) (const gchar *s1, + const gchar *s2, + gsize n); + +struct _GCompletion +{ + GList* items; + GCompletionFunc func; + + gchar* prefix; + GList* cache; + GCompletionStrncmpFunc strncmp_func; +}; + +GLIB_DEPRECATED_IN_2_26 +GCompletion* g_completion_new (GCompletionFunc func); +GLIB_DEPRECATED_IN_2_26 +void g_completion_add_items (GCompletion* cmp, + GList* items); +GLIB_DEPRECATED_IN_2_26 +void g_completion_remove_items (GCompletion* cmp, + GList* items); +GLIB_DEPRECATED_IN_2_26 +void g_completion_clear_items (GCompletion* cmp); +GLIB_DEPRECATED_IN_2_26 +GList* g_completion_complete (GCompletion* cmp, + const gchar* prefix, + gchar** new_prefix); +GLIB_DEPRECATED_IN_2_26 +GList* g_completion_complete_utf8 (GCompletion *cmp, + const gchar* prefix, + gchar** new_prefix); +GLIB_DEPRECATED_IN_2_26 +void g_completion_set_compare (GCompletion *cmp, + GCompletionStrncmpFunc strncmp_func); +GLIB_DEPRECATED_IN_2_26 +void g_completion_free (GCompletion* cmp); + +G_END_DECLS + +#endif /* __G_COMPLETION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/gmain.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/gmain.h new file mode 100644 index 0000000..ed01f8e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/gmain.h @@ -0,0 +1,137 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_DEPRECATED_MAIN_H__ +#define __G_DEPRECATED_MAIN_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/* ============== Compat main loop stuff ================== */ + +/** + * g_main_new: + * @is_running: set to %TRUE to indicate that the loop is running. This + * is not very important since calling g_main_run() will set this + * to %TRUE anyway. + * + * Creates a new #GMainLoop for th default main context. + * + * Returns: a new #GMainLoop + * + * Deprecated: 2.2: Use g_main_loop_new() instead + */ +#define g_main_new(is_running) g_main_loop_new (NULL, is_running) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_new) + +/** + * g_main_run: + * @loop: a #GMainLoop + * + * Runs a main loop until it stops running. + * + * Deprecated: 2.2: Use g_main_loop_run() instead + */ +#define g_main_run(loop) g_main_loop_run(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_run) + +/** + * g_main_quit: + * @loop: a #GMainLoop + * + * Stops the #GMainLoop. + * If g_main_run() was called to run the #GMainLoop, it will now return. + * + * Deprecated: 2.2: Use g_main_loop_quit() instead + */ +#define g_main_quit(loop) g_main_loop_quit(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_quit) + +/** + * g_main_destroy: + * @loop: a #GMainLoop + * + * Frees the memory allocated for the #GMainLoop. + * + * Deprecated: 2.2: Use g_main_loop_unref() instead + */ +#define g_main_destroy(loop) g_main_loop_unref(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_unref) + +/** + * g_main_is_running: + * @loop: a #GMainLoop + * + * Checks if the main loop is running. + * + * Returns: %TRUE if the main loop is running + * + * Deprecated: 2.2: Use g_main_loop_is_running() instead + */ +#define g_main_is_running(loop) g_main_loop_is_running(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_is_running) + +/** + * g_main_iteration: + * @may_block: set to %TRUE if it should block (i.e. wait) until an event + * source becomes ready. It will return after an event source has been + * processed. If set to %FALSE it will return immediately if no event + * source is ready to be processed. + * + * Runs a single iteration for the default #GMainContext. + * + * Returns: %TRUE if more events are pending. + * + * Deprecated: 2.2: Use g_main_context_iteration() instead. + */ +#define g_main_iteration(may_block) g_main_context_iteration (NULL, may_block) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_context_iteration) + +/** + * g_main_pending: + * + * Checks if any events are pending for the default #GMainContext + * (i.e. ready to be processed). + * + * Returns: %TRUE if any events are pending. + * + * Deprecated: 2.2: Use g_main_context_pending() instead. + */ +#define g_main_pending() g_main_context_pending (NULL) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_context_pending) + +/** + * g_main_set_poll_func: + * @func: the function to call to poll all file descriptors + * + * Sets the function to use for the handle polling of file descriptors + * for the default main context. + * + * Deprecated: 2.2: Use g_main_context_set_poll_func() again + */ +#define g_main_set_poll_func(func) g_main_context_set_poll_func (NULL, func) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_context_set_poll_func) + +G_END_DECLS + +#endif /* __G_DEPRECATED_MAIN_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/grel.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/grel.h new file mode 100644 index 0000000..071e609 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/grel.h @@ -0,0 +1,107 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_REL_H__ +#define __G_REL_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +typedef struct _GRelation GRelation; +typedef struct _GTuples GTuples; + +struct _GTuples +{ + guint len; +}; + +/* GRelation + * + * Indexed Relations. Imagine a really simple table in a + * database. Relations are not ordered. This data type is meant for + * maintaining a N-way mapping. + * + * g_relation_new() creates a relation with FIELDS fields + * + * g_relation_destroy() frees all resources + * g_tuples_destroy() frees the result of g_relation_select() + * + * g_relation_index() indexes relation FIELD with the provided + * equality and hash functions. this must be done before any + * calls to insert are made. + * + * g_relation_insert() inserts a new tuple. you are expected to + * provide the right number of fields. + * + * g_relation_delete() deletes all relations with KEY in FIELD + * g_relation_select() returns ... + * g_relation_count() counts ... + */ + +GLIB_DEPRECATED_IN_2_26 +GRelation* g_relation_new (gint fields); +GLIB_DEPRECATED_IN_2_26 +void g_relation_destroy (GRelation *relation); +GLIB_DEPRECATED_IN_2_26 +void g_relation_index (GRelation *relation, + gint field, + GHashFunc hash_func, + GEqualFunc key_equal_func); +GLIB_DEPRECATED_IN_2_26 +void g_relation_insert (GRelation *relation, + ...); +GLIB_DEPRECATED_IN_2_26 +gint g_relation_delete (GRelation *relation, + gconstpointer key, + gint field); +GLIB_DEPRECATED_IN_2_26 +GTuples* g_relation_select (GRelation *relation, + gconstpointer key, + gint field); +GLIB_DEPRECATED_IN_2_26 +gint g_relation_count (GRelation *relation, + gconstpointer key, + gint field); +GLIB_DEPRECATED_IN_2_26 +gboolean g_relation_exists (GRelation *relation, + ...); +GLIB_DEPRECATED_IN_2_26 +void g_relation_print (GRelation *relation); +GLIB_DEPRECATED_IN_2_26 +void g_tuples_destroy (GTuples *tuples); +GLIB_DEPRECATED_IN_2_26 +gpointer g_tuples_index (GTuples *tuples, + gint index_, + gint field); + +G_END_DECLS + +#endif /* __G_REL_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/gthread.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/gthread.h new file mode 100644 index 0000000..a366136 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/deprecated/gthread.h @@ -0,0 +1,295 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_DEPRECATED_THREAD_H__ +#define __G_DEPRECATED_THREAD_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + +typedef enum +{ + G_THREAD_PRIORITY_LOW, + G_THREAD_PRIORITY_NORMAL, + G_THREAD_PRIORITY_HIGH, + G_THREAD_PRIORITY_URGENT +} GThreadPriority GLIB_DEPRECATED_TYPE_IN_2_32; + +struct _GThread +{ + /*< private >*/ + GThreadFunc func; + gpointer data; + gboolean joinable; + GThreadPriority priority; +}; + +typedef struct _GThreadFunctions GThreadFunctions GLIB_DEPRECATED_TYPE_IN_2_32; +struct _GThreadFunctions +{ + GMutex* (*mutex_new) (void); + void (*mutex_lock) (GMutex *mutex); + gboolean (*mutex_trylock) (GMutex *mutex); + void (*mutex_unlock) (GMutex *mutex); + void (*mutex_free) (GMutex *mutex); + GCond* (*cond_new) (void); + void (*cond_signal) (GCond *cond); + void (*cond_broadcast) (GCond *cond); + void (*cond_wait) (GCond *cond, + GMutex *mutex); + gboolean (*cond_timed_wait) (GCond *cond, + GMutex *mutex, + GTimeVal *end_time); + void (*cond_free) (GCond *cond); + GPrivate* (*private_new) (GDestroyNotify destructor); + gpointer (*private_get) (GPrivate *private_key); + void (*private_set) (GPrivate *private_key, + gpointer data); + void (*thread_create) (GThreadFunc func, + gpointer data, + gulong stack_size, + gboolean joinable, + gboolean bound, + GThreadPriority priority, + gpointer thread, + GError **error); + void (*thread_yield) (void); + void (*thread_join) (gpointer thread); + void (*thread_exit) (void); + void (*thread_set_priority)(gpointer thread, + GThreadPriority priority); + void (*thread_self) (gpointer thread); + gboolean (*thread_equal) (gpointer thread1, + gpointer thread2); +} GLIB_DEPRECATED_TYPE_IN_2_32; + +GLIB_VAR GThreadFunctions g_thread_functions_for_glib_use; +GLIB_VAR gboolean g_thread_use_default_impl; + +GLIB_VAR guint64 (*g_thread_gettime) (void); + +GLIB_DEPRECATED_IN_2_32_FOR(g_thread_new) +GThread *g_thread_create (GThreadFunc func, + gpointer data, + gboolean joinable, + GError **error); + +GLIB_DEPRECATED_IN_2_32_FOR(g_thread_new) +GThread *g_thread_create_full (GThreadFunc func, + gpointer data, + gulong stack_size, + gboolean joinable, + gboolean bound, + GThreadPriority priority, + GError **error); + +GLIB_DEPRECATED_IN_2_32 +void g_thread_set_priority (GThread *thread, + GThreadPriority priority); + +GLIB_DEPRECATED_IN_2_32 +void g_thread_foreach (GFunc thread_func, + gpointer user_data); + +#ifndef G_OS_WIN32 +#include +#include +#endif + +#define g_static_mutex_get_mutex g_static_mutex_get_mutex_impl GLIB_DEPRECATED_MACRO_IN_2_32 +#ifndef G_OS_WIN32 +#define G_STATIC_MUTEX_INIT { NULL, PTHREAD_MUTEX_INITIALIZER } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_init) +#else +#define G_STATIC_MUTEX_INIT { NULL } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_init) +#endif +typedef struct +{ + GMutex *mutex; +#ifndef G_OS_WIN32 + /* only for ABI compatibility reasons */ + pthread_mutex_t unused; +#endif +} GStaticMutex GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GMutex); + +#define g_static_mutex_lock(mutex) \ + g_mutex_lock (g_static_mutex_get_mutex (mutex)) GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_lock) +#define g_static_mutex_trylock(mutex) \ + g_mutex_trylock (g_static_mutex_get_mutex (mutex)) GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_trylock) +#define g_static_mutex_unlock(mutex) \ + g_mutex_unlock (g_static_mutex_get_mutex (mutex)) GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_unlock) + +GLIB_DEPRECATED_IN_2_32_FOR(g_mutex_init) +void g_static_mutex_init (GStaticMutex *mutex); +GLIB_DEPRECATED_IN_2_32_FOR(g_mutex_clear) +void g_static_mutex_free (GStaticMutex *mutex); +GLIB_DEPRECATED_IN_2_32_FOR(GMutex) +GMutex *g_static_mutex_get_mutex_impl (GStaticMutex *mutex); + +typedef struct _GStaticRecMutex GStaticRecMutex GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GRecMutex); +struct _GStaticRecMutex +{ + /*< private >*/ + GStaticMutex mutex; + guint depth; + + /* ABI compat only */ + union { +#ifdef G_OS_WIN32 + void *owner; +#else + pthread_t owner; +#endif + gdouble dummy; + } unused; +} GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GRecMutex); + +#define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT, 0, { 0 } } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_rec_mutex_init) +GLIB_DEPRECATED_IN_2_32_FOR(g_rec_mutex_init) +void g_static_rec_mutex_init (GStaticRecMutex *mutex); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rec_mutex_lock) +void g_static_rec_mutex_lock (GStaticRecMutex *mutex); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rec_mutex_try_lock) +gboolean g_static_rec_mutex_trylock (GStaticRecMutex *mutex); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rec_mutex_unlock) +void g_static_rec_mutex_unlock (GStaticRecMutex *mutex); + +GLIB_DEPRECATED_IN_2_32 +void g_static_rec_mutex_lock_full (GStaticRecMutex *mutex, + guint depth); + +GLIB_DEPRECATED_IN_2_32 +guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rec_mutex_free) +void g_static_rec_mutex_free (GStaticRecMutex *mutex); + +typedef struct _GStaticRWLock GStaticRWLock GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GRWLock); +struct _GStaticRWLock +{ + /*< private >*/ + GStaticMutex mutex; + GCond *read_cond; + GCond *write_cond; + guint read_counter; + gboolean have_writer; + guint want_to_read; + guint want_to_write; +} GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GRWLock); + +#define G_STATIC_RW_LOCK_INIT { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, 0, 0 } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_rw_lock_init) + +GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_init) +void g_static_rw_lock_init (GStaticRWLock *lock); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_reader_lock) +void g_static_rw_lock_reader_lock (GStaticRWLock *lock); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_reader_trylock) +gboolean g_static_rw_lock_reader_trylock (GStaticRWLock *lock); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_reader_unlock) +void g_static_rw_lock_reader_unlock (GStaticRWLock *lock); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_writer_lock) +void g_static_rw_lock_writer_lock (GStaticRWLock *lock); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_writer_trylock) +gboolean g_static_rw_lock_writer_trylock (GStaticRWLock *lock); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_writer_unlock) +void g_static_rw_lock_writer_unlock (GStaticRWLock *lock); + +GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_free) +void g_static_rw_lock_free (GStaticRWLock *lock); + +GLIB_DEPRECATED_IN_2_32 +GPrivate * g_private_new (GDestroyNotify notify); + +typedef struct _GStaticPrivate GStaticPrivate GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GPrivate); +struct _GStaticPrivate +{ + /*< private >*/ + guint index; +} GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GPrivate); + +#define G_STATIC_PRIVATE_INIT { 0 } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(G_PRIVATE_INIT) +GLIB_DEPRECATED_IN_2_32 +void g_static_private_init (GStaticPrivate *private_key); + +GLIB_DEPRECATED_IN_2_32_FOR(g_private_get) +gpointer g_static_private_get (GStaticPrivate *private_key); + +GLIB_DEPRECATED_IN_2_32_FOR(g_private_set) +void g_static_private_set (GStaticPrivate *private_key, + gpointer data, + GDestroyNotify notify); + +GLIB_DEPRECATED_IN_2_32 +void g_static_private_free (GStaticPrivate *private_key); + +GLIB_DEPRECATED_IN_2_32 +gboolean g_once_init_enter_impl (volatile gsize *location); + +GLIB_DEPRECATED_IN_2_32 +void g_thread_init (gpointer vtable); +GLIB_DEPRECATED_IN_2_32 +void g_thread_init_with_errorcheck_mutexes (gpointer vtable); + +GLIB_DEPRECATED_IN_2_32 +gboolean g_thread_get_initialized (void); + +GLIB_VAR gboolean g_threads_got_initialized; + +#define g_thread_supported() (1) GLIB_DEPRECATED_MACRO_IN_2_32 + +GLIB_DEPRECATED_IN_2_32 +GMutex * g_mutex_new (void); +GLIB_DEPRECATED_IN_2_32 +void g_mutex_free (GMutex *mutex); +GLIB_DEPRECATED_IN_2_32 +GCond * g_cond_new (void); +GLIB_DEPRECATED_IN_2_32 +void g_cond_free (GCond *cond); +GLIB_DEPRECATED_IN_2_32 +gboolean g_cond_timed_wait (GCond *cond, + GMutex *mutex, + GTimeVal *timeval); + +G_GNUC_END_IGNORE_DEPRECATIONS + +G_END_DECLS + +#endif /* __G_DEPRECATED_THREAD_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/galloca.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/galloca.h new file mode 100644 index 0000000..db01fe5 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/galloca.h @@ -0,0 +1,147 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_ALLOCA_H__ +#define __G_ALLOCA_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +#if defined(__BIONIC__) && defined (GLIB_HAVE_ALLOCA_H) +# include +#elif defined(__GNUC__) +/* GCC does the right thing */ +# undef alloca +# define alloca(size) __builtin_alloca (size) +#elif defined (GLIB_HAVE_ALLOCA_H) +/* a native and working alloca.h is there */ +# include +#else /* !__GNUC__ && !GLIB_HAVE_ALLOCA_H */ +# if defined(_MSC_VER) || defined(__DMC__) +# include +# define alloca _alloca +# else /* !_MSC_VER && !__DMC__ */ +# ifdef _AIX +# pragma alloca +# else /* !_AIX */ +# ifndef alloca /* predefined by HP cc +Olibcalls */ +G_BEGIN_DECLS +char *alloca (); +G_END_DECLS +# endif /* !alloca */ +# endif /* !_AIX */ +# endif /* !_MSC_VER && !__DMC__ */ +#endif /* !__GNUC__ && !GLIB_HAVE_ALLOCA_H */ + +/** + * g_alloca: + * @size: number of bytes to allocate. + * + * Allocates @size bytes on the stack; these bytes will be freed when the current + * stack frame is cleaned up. This macro essentially just wraps the alloca() + * function present on most UNIX variants. + * Thus it provides the same advantages and pitfalls as alloca(): + * + * - alloca() is very fast, as on most systems it's implemented by just adjusting + * the stack pointer register. + * + * - It doesn't cause any memory fragmentation, within its scope, separate alloca() + * blocks just build up and are released together at function end. + * + * - Allocation sizes have to fit into the current stack frame. For instance in a + * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes, + * so be sparse with alloca() uses. + * + * - Allocation failure due to insufficient stack space is not indicated with a %NULL + * return like e.g. with malloc(). Instead, most systems probably handle it the same + * way as out of stack space situations from infinite function recursion, i.e. + * with a segmentation fault. + * + * - Allowing @size to be specified by an untrusted party would allow for them + * to trigger a segmentation fault by specifying a large size, leading to a + * denial of service vulnerability. @size must always be entirely under the + * control of the program. + * + * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays. + * Stack space allocated with alloca() in the same scope as a variable sized array + * will be freed together with the variable sized array upon exit of that scope, and + * not upon exit of the enclosing function scope. + * + * Returns: space for @size bytes, allocated on the stack + */ +#define g_alloca(size) alloca (size) + +/** + * g_alloca0: + * @size: number of bytes to allocate. + * + * Wraps g_alloca() and initializes allocated memory to zeroes. + * If @size is `0` it returns %NULL. + * + * Note that the @size argument will be evaluated multiple times. + * + * Returns: (nullable) (transfer full): space for @size bytes, allocated on the stack + * + * Since: 2.72 + */ +#define g_alloca0(size) ((size) == 0 ? NULL : memset (g_alloca (size), 0, (size))) + +/** + * g_newa: + * @struct_type: Type of memory chunks to be allocated + * @n_structs: Number of chunks to be allocated + * + * Wraps g_alloca() in a more typesafe manner. + * + * As mentioned in the documentation for g_alloca(), @n_structs must always be + * entirely under the control of the program, or you may introduce a denial of + * service vulnerability. In addition, the multiplication of @struct_type by + * @n_structs is not checked, so an overflow may lead to a remote code execution + * vulnerability. + * + * Returns: Pointer to stack space for @n_structs chunks of type @struct_type + */ +#define g_newa(struct_type, n_structs) ((struct_type*) g_alloca (sizeof (struct_type) * (gsize) (n_structs))) + +/** + * g_newa0: + * @struct_type: the type of the elements to allocate. + * @n_structs: the number of elements to allocate. + * + * Wraps g_alloca0() in a more typesafe manner. + * + * Returns: (nullable) (transfer full): Pointer to stack space for @n_structs + * chunks of type @struct_type + * + * Since: 2.72 + */ +#define g_newa0(struct_type, n_structs) ((struct_type*) g_alloca0 (sizeof (struct_type) * (gsize) (n_structs))) + +#endif /* __G_ALLOCA_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/garray.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/garray.h new file mode 100644 index 0000000..5dc32b2 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/garray.h @@ -0,0 +1,323 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_ARRAY_H__ +#define __G_ARRAY_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +typedef struct _GBytes GBytes; +typedef struct _GArray GArray; +typedef struct _GByteArray GByteArray; +typedef struct _GPtrArray GPtrArray; + +struct _GArray +{ + gchar *data; + guint len; +}; + +struct _GByteArray +{ + guint8 *data; + guint len; +}; + +struct _GPtrArray +{ + gpointer *pdata; + guint len; +}; + +/* Resizable arrays. remove fills any cleared spot and shortens the + * array, while preserving the order. remove_fast will distort the + * order by moving the last element to the position of the removed. + */ + +#define g_array_append_val(a,v) g_array_append_vals (a, &(v), 1) +#define g_array_prepend_val(a,v) g_array_prepend_vals (a, &(v), 1) +#define g_array_insert_val(a,i,v) g_array_insert_vals (a, i, &(v), 1) +#define g_array_index(a,t,i) (((t*) (void *) (a)->data) [(i)]) + +GLIB_AVAILABLE_IN_ALL +GArray* g_array_new (gboolean zero_terminated, + gboolean clear_, + guint element_size); +GLIB_AVAILABLE_IN_2_76 +GArray* g_array_new_take (gpointer data, + gsize len, + gboolean clear, + gsize element_size); +GLIB_AVAILABLE_IN_2_76 +GArray* g_array_new_take_zero_terminated (gpointer data, + gboolean clear, + gsize element_size); +GLIB_AVAILABLE_IN_2_64 +gpointer g_array_steal (GArray *array, + gsize *len); +GLIB_AVAILABLE_IN_ALL +GArray* g_array_sized_new (gboolean zero_terminated, + gboolean clear_, + guint element_size, + guint reserved_size); +GLIB_AVAILABLE_IN_2_62 +GArray* g_array_copy (GArray *array); +GLIB_AVAILABLE_IN_ALL +gchar* g_array_free (GArray *array, + gboolean free_segment); +GLIB_AVAILABLE_IN_ALL +GArray *g_array_ref (GArray *array); +GLIB_AVAILABLE_IN_ALL +void g_array_unref (GArray *array); +GLIB_AVAILABLE_IN_ALL +guint g_array_get_element_size (GArray *array); +GLIB_AVAILABLE_IN_ALL +GArray* g_array_append_vals (GArray *array, + gconstpointer data, + guint len); +GLIB_AVAILABLE_IN_ALL +GArray* g_array_prepend_vals (GArray *array, + gconstpointer data, + guint len); +GLIB_AVAILABLE_IN_ALL +GArray* g_array_insert_vals (GArray *array, + guint index_, + gconstpointer data, + guint len); +GLIB_AVAILABLE_IN_ALL +GArray* g_array_set_size (GArray *array, + guint length); +GLIB_AVAILABLE_IN_ALL +GArray* g_array_remove_index (GArray *array, + guint index_); +GLIB_AVAILABLE_IN_ALL +GArray* g_array_remove_index_fast (GArray *array, + guint index_); +GLIB_AVAILABLE_IN_ALL +GArray* g_array_remove_range (GArray *array, + guint index_, + guint length); +GLIB_AVAILABLE_IN_ALL +void g_array_sort (GArray *array, + GCompareFunc compare_func); +GLIB_AVAILABLE_IN_ALL +void g_array_sort_with_data (GArray *array, + GCompareDataFunc compare_func, + gpointer user_data); +GLIB_AVAILABLE_IN_2_62 +gboolean g_array_binary_search (GArray *array, + gconstpointer target, + GCompareFunc compare_func, + guint *out_match_index); +GLIB_AVAILABLE_IN_ALL +void g_array_set_clear_func (GArray *array, + GDestroyNotify clear_func); + +/* Resizable pointer array. This interface is much less complicated + * than the above. Add appends a pointer. Remove fills any cleared + * spot and shortens the array. remove_fast will again distort order. + */ +#define g_ptr_array_index(array,index_) ((array)->pdata)[index_] +GLIB_AVAILABLE_IN_ALL +GPtrArray* g_ptr_array_new (void); +GLIB_AVAILABLE_IN_ALL +GPtrArray* g_ptr_array_new_with_free_func (GDestroyNotify element_free_func); +GLIB_AVAILABLE_IN_2_76 +GPtrArray* g_ptr_array_new_take (gpointer *data, + gsize len, + GDestroyNotify element_free_func); +GLIB_AVAILABLE_IN_2_76 +GPtrArray* g_ptr_array_new_from_array (gpointer *data, + gsize len, + GCopyFunc copy_func, + gpointer copy_func_user_data, + GDestroyNotify element_free_func); +GLIB_AVAILABLE_IN_2_64 +gpointer* g_ptr_array_steal (GPtrArray *array, + gsize *len); +GLIB_AVAILABLE_IN_2_62 +GPtrArray *g_ptr_array_copy (GPtrArray *array, + GCopyFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GPtrArray* g_ptr_array_sized_new (guint reserved_size); +GLIB_AVAILABLE_IN_ALL +GPtrArray* g_ptr_array_new_full (guint reserved_size, + GDestroyNotify element_free_func); +GLIB_AVAILABLE_IN_2_74 +GPtrArray* g_ptr_array_new_null_terminated (guint reserved_size, + GDestroyNotify element_free_func, + gboolean null_terminated); +GLIB_AVAILABLE_IN_2_76 +GPtrArray* g_ptr_array_new_take_null_terminated (gpointer *data, + GDestroyNotify element_free_func); +GLIB_AVAILABLE_IN_2_76 +GPtrArray* g_ptr_array_new_from_null_terminated_array (gpointer *data, + GCopyFunc copy_func, + gpointer copy_func_user_data, + GDestroyNotify element_free_func); +GLIB_AVAILABLE_IN_ALL +gpointer* g_ptr_array_free (GPtrArray *array, + gboolean free_seg); +GLIB_AVAILABLE_IN_ALL +GPtrArray* g_ptr_array_ref (GPtrArray *array); +GLIB_AVAILABLE_IN_ALL +void g_ptr_array_unref (GPtrArray *array); +GLIB_AVAILABLE_IN_ALL +void g_ptr_array_set_free_func (GPtrArray *array, + GDestroyNotify element_free_func); +GLIB_AVAILABLE_IN_ALL +void g_ptr_array_set_size (GPtrArray *array, + gint length); +GLIB_AVAILABLE_IN_ALL +gpointer g_ptr_array_remove_index (GPtrArray *array, + guint index_); +GLIB_AVAILABLE_IN_ALL +gpointer g_ptr_array_remove_index_fast (GPtrArray *array, + guint index_); +GLIB_AVAILABLE_IN_2_58 +gpointer g_ptr_array_steal_index (GPtrArray *array, + guint index_); +GLIB_AVAILABLE_IN_2_58 +gpointer g_ptr_array_steal_index_fast (GPtrArray *array, + guint index_); +GLIB_AVAILABLE_IN_ALL +gboolean g_ptr_array_remove (GPtrArray *array, + gpointer data); +GLIB_AVAILABLE_IN_ALL +gboolean g_ptr_array_remove_fast (GPtrArray *array, + gpointer data); +GLIB_AVAILABLE_IN_ALL +GPtrArray *g_ptr_array_remove_range (GPtrArray *array, + guint index_, + guint length); +GLIB_AVAILABLE_IN_ALL +void g_ptr_array_add (GPtrArray *array, + gpointer data); +GLIB_AVAILABLE_IN_2_62 +void g_ptr_array_extend (GPtrArray *array_to_extend, + GPtrArray *array, + GCopyFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_2_62 +void g_ptr_array_extend_and_steal (GPtrArray *array_to_extend, + GPtrArray *array); +GLIB_AVAILABLE_IN_2_40 +void g_ptr_array_insert (GPtrArray *array, + gint index_, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_ptr_array_sort (GPtrArray *array, + GCompareFunc compare_func); +GLIB_AVAILABLE_IN_ALL +void g_ptr_array_sort_with_data (GPtrArray *array, + GCompareDataFunc compare_func, + gpointer user_data); +GLIB_AVAILABLE_IN_2_76 +void g_ptr_array_sort_values (GPtrArray *array, + GCompareFunc compare_func); +GLIB_AVAILABLE_IN_2_76 +void g_ptr_array_sort_values_with_data (GPtrArray *array, + GCompareDataFunc compare_func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +void g_ptr_array_foreach (GPtrArray *array, + GFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_2_54 +gboolean g_ptr_array_find (GPtrArray *haystack, + gconstpointer needle, + guint *index_); +GLIB_AVAILABLE_IN_2_54 +gboolean g_ptr_array_find_with_equal_func (GPtrArray *haystack, + gconstpointer needle, + GEqualFunc equal_func, + guint *index_); + +GLIB_AVAILABLE_IN_2_74 +gboolean g_ptr_array_is_null_terminated (GPtrArray *array); + +/* Byte arrays, an array of guint8. Implemented as a GArray, + * but type-safe. + */ + +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_new (void); +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_new_take (guint8 *data, + gsize len); +GLIB_AVAILABLE_IN_2_64 +guint8* g_byte_array_steal (GByteArray *array, + gsize *len); +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_sized_new (guint reserved_size); +GLIB_AVAILABLE_IN_ALL +guint8* g_byte_array_free (GByteArray *array, + gboolean free_segment); +GLIB_AVAILABLE_IN_ALL +GBytes* g_byte_array_free_to_bytes (GByteArray *array); +GLIB_AVAILABLE_IN_ALL +GByteArray *g_byte_array_ref (GByteArray *array); +GLIB_AVAILABLE_IN_ALL +void g_byte_array_unref (GByteArray *array); +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_append (GByteArray *array, + const guint8 *data, + guint len); +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_prepend (GByteArray *array, + const guint8 *data, + guint len); +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_set_size (GByteArray *array, + guint length); +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_remove_index (GByteArray *array, + guint index_); +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_remove_index_fast (GByteArray *array, + guint index_); +GLIB_AVAILABLE_IN_ALL +GByteArray* g_byte_array_remove_range (GByteArray *array, + guint index_, + guint length); +GLIB_AVAILABLE_IN_ALL +void g_byte_array_sort (GByteArray *array, + GCompareFunc compare_func); +GLIB_AVAILABLE_IN_ALL +void g_byte_array_sort_with_data (GByteArray *array, + GCompareDataFunc compare_func, + gpointer user_data); + +G_END_DECLS + +#endif /* __G_ARRAY_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gasyncqueue.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gasyncqueue.h new file mode 100644 index 0000000..b1de117 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gasyncqueue.h @@ -0,0 +1,126 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_ASYNCQUEUE_H__ +#define __G_ASYNCQUEUE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +typedef struct _GAsyncQueue GAsyncQueue; + +GLIB_AVAILABLE_IN_ALL +GAsyncQueue *g_async_queue_new (void); +GLIB_AVAILABLE_IN_ALL +GAsyncQueue *g_async_queue_new_full (GDestroyNotify item_free_func); +GLIB_AVAILABLE_IN_ALL +void g_async_queue_lock (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +void g_async_queue_unlock (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +GAsyncQueue *g_async_queue_ref (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +void g_async_queue_unref (GAsyncQueue *queue); + +GLIB_DEPRECATED_FOR(g_async_queue_ref) +void g_async_queue_ref_unlocked (GAsyncQueue *queue); + +GLIB_DEPRECATED_FOR(g_async_queue_unref) +void g_async_queue_unref_and_unlock (GAsyncQueue *queue); + +GLIB_AVAILABLE_IN_ALL +void g_async_queue_push (GAsyncQueue *queue, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_async_queue_push_unlocked (GAsyncQueue *queue, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_async_queue_push_sorted (GAsyncQueue *queue, + gpointer data, + GCompareDataFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +void g_async_queue_push_sorted_unlocked (GAsyncQueue *queue, + gpointer data, + GCompareDataFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gpointer g_async_queue_pop (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +gpointer g_async_queue_pop_unlocked (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +gpointer g_async_queue_try_pop (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +gpointer g_async_queue_try_pop_unlocked (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +gpointer g_async_queue_timeout_pop (GAsyncQueue *queue, + guint64 timeout); +GLIB_AVAILABLE_IN_ALL +gpointer g_async_queue_timeout_pop_unlocked (GAsyncQueue *queue, + guint64 timeout); +GLIB_AVAILABLE_IN_ALL +gint g_async_queue_length (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +gint g_async_queue_length_unlocked (GAsyncQueue *queue); +GLIB_AVAILABLE_IN_ALL +void g_async_queue_sort (GAsyncQueue *queue, + GCompareDataFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +void g_async_queue_sort_unlocked (GAsyncQueue *queue, + GCompareDataFunc func, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_46 +gboolean g_async_queue_remove (GAsyncQueue *queue, + gpointer item); +GLIB_AVAILABLE_IN_2_46 +gboolean g_async_queue_remove_unlocked (GAsyncQueue *queue, + gpointer item); +GLIB_AVAILABLE_IN_2_46 +void g_async_queue_push_front (GAsyncQueue *queue, + gpointer item); +GLIB_AVAILABLE_IN_2_46 +void g_async_queue_push_front_unlocked (GAsyncQueue *queue, + gpointer item); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED_FOR(g_async_queue_timeout_pop) +gpointer g_async_queue_timed_pop (GAsyncQueue *queue, + GTimeVal *end_time); +GLIB_DEPRECATED_FOR(g_async_queue_timeout_pop_unlocked) +gpointer g_async_queue_timed_pop_unlocked (GAsyncQueue *queue, + GTimeVal *end_time); +G_GNUC_END_IGNORE_DEPRECATIONS + +G_END_DECLS + +#endif /* __G_ASYNCQUEUE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gatomic.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gatomic.h new file mode 100644 index 0000000..148424d --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gatomic.h @@ -0,0 +1,587 @@ +/* + * Copyright © 2011 Ryan Lortie + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Author: Ryan Lortie + */ + +#ifndef __G_ATOMIC_H__ +#define __G_ATOMIC_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +gint g_atomic_int_get (const volatile gint *atomic); +GLIB_AVAILABLE_IN_ALL +void g_atomic_int_set (volatile gint *atomic, + gint newval); +GLIB_AVAILABLE_IN_ALL +void g_atomic_int_inc (volatile gint *atomic); +GLIB_AVAILABLE_IN_ALL +gboolean g_atomic_int_dec_and_test (volatile gint *atomic); +GLIB_AVAILABLE_IN_ALL +gboolean g_atomic_int_compare_and_exchange (volatile gint *atomic, + gint oldval, + gint newval); +GLIB_AVAILABLE_IN_2_74 +gboolean g_atomic_int_compare_and_exchange_full (gint *atomic, + gint oldval, + gint newval, + gint *preval); +GLIB_AVAILABLE_IN_2_74 +gint g_atomic_int_exchange (gint *atomic, + gint newval); +GLIB_AVAILABLE_IN_ALL +gint g_atomic_int_add (volatile gint *atomic, + gint val); +GLIB_AVAILABLE_IN_2_30 +guint g_atomic_int_and (volatile guint *atomic, + guint val); +GLIB_AVAILABLE_IN_2_30 +guint g_atomic_int_or (volatile guint *atomic, + guint val); +GLIB_AVAILABLE_IN_ALL +guint g_atomic_int_xor (volatile guint *atomic, + guint val); + +GLIB_AVAILABLE_IN_ALL +gpointer g_atomic_pointer_get (const volatile void *atomic); +GLIB_AVAILABLE_IN_ALL +void g_atomic_pointer_set (volatile void *atomic, + gpointer newval); +GLIB_AVAILABLE_IN_ALL +gboolean g_atomic_pointer_compare_and_exchange (volatile void *atomic, + gpointer oldval, + gpointer newval); +GLIB_AVAILABLE_IN_2_74 +gboolean g_atomic_pointer_compare_and_exchange_full (void *atomic, + gpointer oldval, + gpointer newval, + void *preval); +GLIB_AVAILABLE_IN_2_74 +gpointer g_atomic_pointer_exchange (void *atomic, + gpointer newval); +GLIB_AVAILABLE_IN_ALL +gssize g_atomic_pointer_add (volatile void *atomic, + gssize val); +GLIB_AVAILABLE_IN_2_30 +gsize g_atomic_pointer_and (volatile void *atomic, + gsize val); +GLIB_AVAILABLE_IN_2_30 +gsize g_atomic_pointer_or (volatile void *atomic, + gsize val); +GLIB_AVAILABLE_IN_ALL +gsize g_atomic_pointer_xor (volatile void *atomic, + gsize val); + +GLIB_DEPRECATED_IN_2_30_FOR(g_atomic_int_add) +gint g_atomic_int_exchange_and_add (volatile gint *atomic, + gint val); + +G_END_DECLS + +#if defined(G_ATOMIC_LOCK_FREE) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) + +/* We prefer the new C11-style atomic extension of GCC if available */ +#if defined(__ATOMIC_SEQ_CST) + +#define g_atomic_int_get(atomic) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + gint gaig_temp; \ + (void) (0 ? *(atomic) ^ *(atomic) : 1); \ + __atomic_load ((gint *)(atomic), &gaig_temp, __ATOMIC_SEQ_CST); \ + (gint) gaig_temp; \ + })) +#define g_atomic_int_set(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + gint gais_temp = (gint) (newval); \ + (void) (0 ? *(atomic) ^ (newval) : 1); \ + __atomic_store ((gint *)(atomic), &gais_temp, __ATOMIC_SEQ_CST); \ + })) + +#if defined(glib_typeof) +#define g_atomic_pointer_get(atomic) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + glib_typeof (*(atomic)) gapg_temp_newval; \ + glib_typeof ((atomic)) gapg_temp_atomic = (atomic); \ + __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ + gapg_temp_newval; \ + })) +#define g_atomic_pointer_set(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + glib_typeof ((atomic)) gaps_temp_atomic = (atomic); \ + glib_typeof (*(atomic)) gaps_temp_newval = (newval); \ + (void) (0 ? (gpointer) * (atomic) : NULL); \ + __atomic_store (gaps_temp_atomic, &gaps_temp_newval, __ATOMIC_SEQ_CST); \ + })) +#else /* if !(defined(glib_typeof) */ +#define g_atomic_pointer_get(atomic) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + gpointer gapg_temp_newval; \ + gpointer *gapg_temp_atomic = (gpointer *)(atomic); \ + __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ + gapg_temp_newval; \ + })) +#define g_atomic_pointer_set(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + gpointer *gaps_temp_atomic = (gpointer *)(atomic); \ + gpointer gaps_temp_newval = (gpointer)(newval); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + __atomic_store (gaps_temp_atomic, &gaps_temp_newval, __ATOMIC_SEQ_CST); \ + })) +#endif /* if defined(glib_typeof) */ + +#define g_atomic_int_inc(atomic) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ *(atomic) : 1); \ + (void) __atomic_fetch_add ((atomic), 1, __ATOMIC_SEQ_CST); \ + })) +#define g_atomic_int_dec_and_test(atomic) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ *(atomic) : 1); \ + __atomic_fetch_sub ((atomic), 1, __ATOMIC_SEQ_CST) == 1; \ + })) +#if defined(glib_typeof) && defined(G_CXX_STD_VERSION) +/* See comments below about equivalent g_atomic_pointer_compare_and_exchange() + * shenanigans for type-safety when compiling in C++ mode. */ +#define g_atomic_int_compare_and_exchange(atomic, oldval, newval) \ + (G_GNUC_EXTENSION ({ \ + glib_typeof (*(atomic)) gaicae_oldval = (oldval); \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (newval) ^ (oldval) : 1); \ + __atomic_compare_exchange_n ((atomic), &gaicae_oldval, (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \ + })) +#else /* if !(defined(glib_typeof) && defined(G_CXX_STD_VERSION)) */ +#define g_atomic_int_compare_and_exchange(atomic, oldval, newval) \ + (G_GNUC_EXTENSION ({ \ + gint gaicae_oldval = (oldval); \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (newval) ^ (oldval) : 1); \ + __atomic_compare_exchange_n ((atomic), (void *) (&(gaicae_oldval)), (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \ + })) +#endif /* defined(glib_typeof) */ +#define g_atomic_int_compare_and_exchange_full(atomic, oldval, newval, preval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + G_STATIC_ASSERT (sizeof *(preval) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (newval) ^ (oldval) ^ *(preval) : 1); \ + *(preval) = (oldval); \ + __atomic_compare_exchange_n ((atomic), (preval), (newval), FALSE, \ + __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) \ + ? TRUE : FALSE; \ + })) +#define g_atomic_int_exchange(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (newval) : 1); \ + (gint) __atomic_exchange_n ((atomic), (newval), __ATOMIC_SEQ_CST); \ + })) +#define g_atomic_int_add(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (val) : 1); \ + (gint) __atomic_fetch_add ((atomic), (val), __ATOMIC_SEQ_CST); \ + })) +#define g_atomic_int_and(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (val) : 1); \ + (guint) __atomic_fetch_and ((atomic), (val), __ATOMIC_SEQ_CST); \ + })) +#define g_atomic_int_or(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (val) : 1); \ + (guint) __atomic_fetch_or ((atomic), (val), __ATOMIC_SEQ_CST); \ + })) +#define g_atomic_int_xor(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (val) : 1); \ + (guint) __atomic_fetch_xor ((atomic), (val), __ATOMIC_SEQ_CST); \ + })) + +#if defined(glib_typeof) && defined(G_CXX_STD_VERSION) +/* This is typesafe because we check we can assign oldval to the type of + * (*atomic). Unfortunately it can only be done in C++ because gcc/clang warn + * when atomic is volatile and not oldval, or when atomic is gsize* and oldval + * is NULL. Note that clang++ force us to be typesafe because it is an error if the 2nd + * argument of __atomic_compare_exchange_n() has a different type than the + * first. + * https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1919 + * https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1715#note_1024120. */ +#define g_atomic_pointer_compare_and_exchange(atomic, oldval, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof (static_cast((oldval))) \ + == sizeof (gpointer)); \ + glib_typeof (*(atomic)) gapcae_oldval = (oldval); \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + __atomic_compare_exchange_n ((atomic), &gapcae_oldval, (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \ + })) +#else /* if !(defined(glib_typeof) && defined(G_CXX_STD_VERSION) */ +#define g_atomic_pointer_compare_and_exchange(atomic, oldval, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof (oldval) == sizeof (gpointer)); \ + gpointer gapcae_oldval = (gpointer)(oldval); \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + __atomic_compare_exchange_n ((atomic), (void *) (&(gapcae_oldval)), (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \ + })) +#endif /* defined(glib_typeof) */ +#define g_atomic_pointer_compare_and_exchange_full(atomic, oldval, newval, preval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + G_STATIC_ASSERT (sizeof *(preval) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (void) (0 ? (gpointer) *(preval) : NULL); \ + *(preval) = (oldval); \ + __atomic_compare_exchange_n ((atomic), (preval), (newval), FALSE, \ + __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? \ + TRUE : FALSE; \ + })) +#define g_atomic_pointer_exchange(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (gpointer) __atomic_exchange_n ((atomic), (newval), __ATOMIC_SEQ_CST); \ + })) +#define g_atomic_pointer_add(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (void) (0 ? (val) ^ (val) : 1); \ + (gssize) __atomic_fetch_add ((atomic), (val), __ATOMIC_SEQ_CST); \ + })) +#define g_atomic_pointer_and(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + gsize *gapa_atomic = (gsize *) (atomic); \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gsize)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (void) (0 ? (val) ^ (val) : 1); \ + (gsize) __atomic_fetch_and (gapa_atomic, (val), __ATOMIC_SEQ_CST); \ + })) +#define g_atomic_pointer_or(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + gsize *gapo_atomic = (gsize *) (atomic); \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gsize)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (void) (0 ? (val) ^ (val) : 1); \ + (gsize) __atomic_fetch_or (gapo_atomic, (val), __ATOMIC_SEQ_CST); \ + })) +#define g_atomic_pointer_xor(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + gsize *gapx_atomic = (gsize *) (atomic); \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gsize)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (void) (0 ? (val) ^ (val) : 1); \ + (gsize) __atomic_fetch_xor (gapx_atomic, (val), __ATOMIC_SEQ_CST); \ + })) + +#else /* defined(__ATOMIC_SEQ_CST) */ + +/* We want to achieve __ATOMIC_SEQ_CST semantics here. See + * https://en.cppreference.com/w/c/atomic/memory_order#Constants. For load + * operations, that means performing an *acquire*: + * > A load operation with this memory order performs the acquire operation on + * > the affected memory location: no reads or writes in the current thread can + * > be reordered before this load. All writes in other threads that release + * > the same atomic variable are visible in the current thread. + * + * “no reads or writes in the current thread can be reordered before this load” + * is implemented using a compiler barrier (a no-op `__asm__` section) to + * prevent instruction reordering. Writes in other threads are synchronised + * using `__sync_synchronize()`. It’s unclear from the GCC documentation whether + * `__sync_synchronize()` acts as a compiler barrier, hence our explicit use of + * one. + * + * For store operations, `__ATOMIC_SEQ_CST` means performing a *release*: + * > A store operation with this memory order performs the release operation: + * > no reads or writes in the current thread can be reordered after this store. + * > All writes in the current thread are visible in other threads that acquire + * > the same atomic variable (see Release-Acquire ordering below) and writes + * > that carry a dependency into the atomic variable become visible in other + * > threads that consume the same atomic (see Release-Consume ordering below). + * + * “no reads or writes in the current thread can be reordered after this store” + * is implemented using a compiler barrier to prevent instruction reordering. + * “All writes in the current thread are visible in other threads” is implemented + * using `__sync_synchronize()`; similarly for “writes that carry a dependency”. + */ +#define g_atomic_int_get(atomic) \ + (G_GNUC_EXTENSION ({ \ + gint gaig_result; \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ *(atomic) : 1); \ + gaig_result = (gint) *(atomic); \ + __sync_synchronize (); \ + __asm__ __volatile__ ("" : : : "memory"); \ + gaig_result; \ + })) +#define g_atomic_int_set(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (newval) : 1); \ + __sync_synchronize (); \ + __asm__ __volatile__ ("" : : : "memory"); \ + *(atomic) = (newval); \ + })) +#define g_atomic_pointer_get(atomic) \ + (G_GNUC_EXTENSION ({ \ + gpointer gapg_result; \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + gapg_result = (gpointer) *(atomic); \ + __sync_synchronize (); \ + __asm__ __volatile__ ("" : : : "memory"); \ + gapg_result; \ + })) +#if defined(glib_typeof) +#define g_atomic_pointer_set(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + __sync_synchronize (); \ + __asm__ __volatile__ ("" : : : "memory"); \ + *(atomic) = (glib_typeof (*(atomic))) (gsize) (newval); \ + })) +#else /* if !(defined(glib_typeof) */ +#define g_atomic_pointer_set(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + __sync_synchronize (); \ + __asm__ __volatile__ ("" : : : "memory"); \ + *(atomic) = (gpointer) (gsize) (newval); \ + })) +#endif /* if defined(glib_typeof) */ + +#define g_atomic_int_inc(atomic) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ *(atomic) : 1); \ + (void) __sync_fetch_and_add ((atomic), 1); \ + })) +#define g_atomic_int_dec_and_test(atomic) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ *(atomic) : 1); \ + __sync_fetch_and_sub ((atomic), 1) == 1; \ + })) +#define g_atomic_int_compare_and_exchange(atomic, oldval, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (newval) ^ (oldval) : 1); \ + __sync_bool_compare_and_swap ((atomic), (oldval), (newval)) ? TRUE : FALSE; \ + })) +#define g_atomic_int_compare_and_exchange_full(atomic, oldval, newval, preval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + G_STATIC_ASSERT (sizeof *(preval) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (newval) ^ (oldval) ^ *(preval) : 1); \ + *(preval) = __sync_val_compare_and_swap ((atomic), (oldval), (newval)); \ + (*(preval) == (oldval)) ? TRUE : FALSE; \ + })) +#if defined(_GLIB_GCC_HAVE_SYNC_SWAP) +#define g_atomic_int_exchange(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (newval) : 1); \ + (gint) __sync_swap ((atomic), (newval)); \ + })) +#else /* defined(_GLIB_GCC_HAVE_SYNC_SWAP) */ + #define g_atomic_int_exchange(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + gint oldval; \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (newval) : 1); \ + do \ + { \ + oldval = *atomic; \ + } while (!__sync_bool_compare_and_swap (atomic, oldval, newval)); \ + oldval; \ + })) +#endif /* defined(_GLIB_GCC_HAVE_SYNC_SWAP) */ +#define g_atomic_int_add(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (val) : 1); \ + (gint) __sync_fetch_and_add ((atomic), (val)); \ + })) +#define g_atomic_int_and(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (val) : 1); \ + (guint) __sync_fetch_and_and ((atomic), (val)); \ + })) +#define g_atomic_int_or(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (val) : 1); \ + (guint) __sync_fetch_and_or ((atomic), (val)); \ + })) +#define g_atomic_int_xor(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \ + (void) (0 ? *(atomic) ^ (val) : 1); \ + (guint) __sync_fetch_and_xor ((atomic), (val)); \ + })) + +#define g_atomic_pointer_compare_and_exchange(atomic, oldval, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + __sync_bool_compare_and_swap ((atomic), (oldval), (newval)) ? TRUE : FALSE; \ + })) +#define g_atomic_pointer_compare_and_exchange_full(atomic, oldval, newval, preval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + G_STATIC_ASSERT (sizeof *(preval) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (void) (0 ? (gpointer) *(preval) : NULL); \ + *(preval) = __sync_val_compare_and_swap ((atomic), (oldval), (newval)); \ + (*(preval) == (oldval)) ? TRUE : FALSE; \ + })) +#if defined(_GLIB_GCC_HAVE_SYNC_SWAP) +#define g_atomic_pointer_exchange(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (gpointer) __sync_swap ((atomic), (newval)); \ + })) +#else +#define g_atomic_pointer_exchange(atomic, newval) \ + (G_GNUC_EXTENSION ({ \ + gpointer oldval; \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + do \ + { \ + oldval = (gpointer) *atomic; \ + } while (!__sync_bool_compare_and_swap (atomic, oldval, newval)); \ + oldval; \ + })) +#endif /* defined(_GLIB_GCC_HAVE_SYNC_SWAP) */ +#define g_atomic_pointer_add(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (void) (0 ? (val) ^ (val) : 1); \ + (gssize) __sync_fetch_and_add ((atomic), (val)); \ + })) +#define g_atomic_pointer_and(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (void) (0 ? (val) ^ (val) : 1); \ + (gsize) __sync_fetch_and_and ((atomic), (val)); \ + })) +#define g_atomic_pointer_or(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (void) (0 ? (val) ^ (val) : 1); \ + (gsize) __sync_fetch_and_or ((atomic), (val)); \ + })) +#define g_atomic_pointer_xor(atomic, val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(atomic) : NULL); \ + (void) (0 ? (val) ^ (val) : 1); \ + (gsize) __sync_fetch_and_xor ((atomic), (val)); \ + })) + +#endif /* !defined(__ATOMIC_SEQ_CST) */ + +#else /* defined(G_ATOMIC_LOCK_FREE) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) */ + +#define g_atomic_int_get(atomic) \ + (g_atomic_int_get ((gint *) (atomic))) +#define g_atomic_int_set(atomic, newval) \ + (g_atomic_int_set ((gint *) (atomic), (gint) (newval))) +#define g_atomic_int_compare_and_exchange(atomic, oldval, newval) \ + (g_atomic_int_compare_and_exchange ((gint *) (atomic), (oldval), (newval))) +#define g_atomic_int_compare_and_exchange_full(atomic, oldval, newval, preval) \ + (g_atomic_int_compare_and_exchange_full ((gint *) (atomic), (oldval), (newval), (gint *) (preval))) +#define g_atomic_int_exchange(atomic, newval) \ + (g_atomic_int_exchange ((gint *) (atomic), (newval))) +#define g_atomic_int_add(atomic, val) \ + (g_atomic_int_add ((gint *) (atomic), (val))) +#define g_atomic_int_and(atomic, val) \ + (g_atomic_int_and ((guint *) (atomic), (val))) +#define g_atomic_int_or(atomic, val) \ + (g_atomic_int_or ((guint *) (atomic), (val))) +#define g_atomic_int_xor(atomic, val) \ + (g_atomic_int_xor ((guint *) (atomic), (val))) +#define g_atomic_int_inc(atomic) \ + (g_atomic_int_inc ((gint *) (atomic))) +#define g_atomic_int_dec_and_test(atomic) \ + (g_atomic_int_dec_and_test ((gint *) (atomic))) + +#if defined(glib_typeof) + /* The (void *) cast in the middle *looks* redundant, because + * g_atomic_pointer_get returns void * already, but it's to silence + * -Werror=bad-function-cast when we're doing something like: + * guintptr a, b; ...; a = g_atomic_pointer_get (&b); + * which would otherwise be assigning the void * result of + * g_atomic_pointer_get directly to the pointer-sized but + * non-pointer-typed result. */ +#define g_atomic_pointer_get(atomic) \ + (glib_typeof (*(atomic))) (void *) ((g_atomic_pointer_get) ((void *) atomic)) +#else /* !(defined(glib_typeof) */ +#define g_atomic_pointer_get(atomic) \ + (g_atomic_pointer_get (atomic)) +#endif + +#define g_atomic_pointer_set(atomic, newval) \ + (g_atomic_pointer_set ((atomic), (gpointer) (newval))) + +#define g_atomic_pointer_compare_and_exchange(atomic, oldval, newval) \ + (g_atomic_pointer_compare_and_exchange ((atomic), (gpointer) (oldval), (gpointer) (newval))) +#define g_atomic_pointer_compare_and_exchange_full(atomic, oldval, newval, prevval) \ + (g_atomic_pointer_compare_and_exchange_full ((atomic), (gpointer) (oldval), (gpointer) (newval), (prevval))) +#define g_atomic_pointer_exchange(atomic, newval) \ + (g_atomic_pointer_exchange ((atomic), (gpointer) (newval))) +#define g_atomic_pointer_add(atomic, val) \ + (g_atomic_pointer_add ((atomic), (gssize) (val))) +#define g_atomic_pointer_and(atomic, val) \ + (g_atomic_pointer_and ((atomic), (gsize) (val))) +#define g_atomic_pointer_or(atomic, val) \ + (g_atomic_pointer_or ((atomic), (gsize) (val))) +#define g_atomic_pointer_xor(atomic, val) \ + (g_atomic_pointer_xor ((atomic), (gsize) (val))) + +#endif /* defined(G_ATOMIC_LOCK_FREE) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) */ + +#endif /* __G_ATOMIC_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gbacktrace.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gbacktrace.h new file mode 100644 index 0000000..11293b3 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gbacktrace.h @@ -0,0 +1,74 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_BACKTRACE_H__ +#define __G_BACKTRACE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#ifdef __sun__ +#include +#endif +#include + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +void g_on_error_query (const gchar *prg_name); +GLIB_AVAILABLE_IN_ALL +void g_on_error_stack_trace (const gchar *prg_name); + +/** + * G_BREAKPOINT: + * + * Inserts a breakpoint instruction into the code. + * + * On architectures which support it, this is implemented as a soft interrupt + * and on other architectures it raises a `SIGTRAP` signal. + * + * `SIGTRAP` is used rather than abort() to allow breakpoints to be skipped past + * in a debugger if they are not the desired target of debugging. + */ +#if (defined (__i386__) || defined (__x86_64__)) && defined (__GNUC__) && __GNUC__ >= 2 +# define G_BREAKPOINT() G_STMT_START{ __asm__ __volatile__ ("int $03"); }G_STMT_END +#elif (defined (_MSC_VER) || defined (__DMC__)) && defined (_M_IX86) +# define G_BREAKPOINT() G_STMT_START{ __asm int 3h }G_STMT_END +#elif defined (_MSC_VER) +# define G_BREAKPOINT() G_STMT_START{ __debugbreak(); }G_STMT_END +#elif defined (__alpha__) && !defined(__osf__) && defined (__GNUC__) && __GNUC__ >= 2 +# define G_BREAKPOINT() G_STMT_START{ __asm__ __volatile__ ("bpt"); }G_STMT_END +#elif defined (__APPLE__) || (defined(_WIN32) && (defined(__clang__) || defined(__GNUC__))) +# define G_BREAKPOINT() G_STMT_START{ __builtin_trap(); }G_STMT_END +#else /* !__i386__ && !__alpha__ */ +# define G_BREAKPOINT() G_STMT_START{ raise (SIGTRAP); }G_STMT_END +#endif /* __i386__ */ + +G_END_DECLS + +#endif /* __G_BACKTRACE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gbase64.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gbase64.h new file mode 100644 index 0000000..4cb9ef2 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gbase64.h @@ -0,0 +1,63 @@ +/* gbase64.h - Base64 coding functions + * + * Copyright (C) 2005 Alexander Larsson + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_BASE64_H__ +#define __G_BASE64_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +gsize g_base64_encode_step (const guchar *in, + gsize len, + gboolean break_lines, + gchar *out, + gint *state, + gint *save); +GLIB_AVAILABLE_IN_ALL +gsize g_base64_encode_close (gboolean break_lines, + gchar *out, + gint *state, + gint *save); +GLIB_AVAILABLE_IN_ALL +gchar* g_base64_encode (const guchar *data, + gsize len) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gsize g_base64_decode_step (const gchar *in, + gsize len, + guchar *out, + gint *state, + guint *save); +GLIB_AVAILABLE_IN_ALL +guchar *g_base64_decode (const gchar *text, + gsize *out_len) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +guchar *g_base64_decode_inplace (gchar *text, + gsize *out_len); + + +G_END_DECLS + +#endif /* __G_BASE64_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gbitlock.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gbitlock.h new file mode 100644 index 0000000..bef2c09 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gbitlock.h @@ -0,0 +1,78 @@ +/* + * Copyright © 2008 Ryan Lortie + * Copyright © 2010 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Author: Ryan Lortie + */ + +#ifndef __G_BITLOCK_H__ +#define __G_BITLOCK_H__ + +#include + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +void g_bit_lock (volatile gint *address, + gint lock_bit); +GLIB_AVAILABLE_IN_ALL +gboolean g_bit_trylock (volatile gint *address, + gint lock_bit); +GLIB_AVAILABLE_IN_ALL +void g_bit_unlock (volatile gint *address, + gint lock_bit); + +GLIB_AVAILABLE_IN_ALL +void g_pointer_bit_lock (volatile void *address, + gint lock_bit); +GLIB_AVAILABLE_IN_ALL +gboolean g_pointer_bit_trylock (volatile void *address, + gint lock_bit); +GLIB_AVAILABLE_IN_ALL +void g_pointer_bit_unlock (volatile void *address, + gint lock_bit); + +#ifdef __GNUC__ + +#define g_pointer_bit_lock(address, lock_bit) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(address) == sizeof (gpointer)); \ + g_pointer_bit_lock ((address), (lock_bit)); \ + })) + +#define g_pointer_bit_trylock(address, lock_bit) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(address) == sizeof (gpointer)); \ + g_pointer_bit_trylock ((address), (lock_bit)); \ + })) + +#define g_pointer_bit_unlock(address, lock_bit) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(address) == sizeof (gpointer)); \ + g_pointer_bit_unlock ((address), (lock_bit)); \ + })) + +#endif + +G_END_DECLS + +#endif /* __G_BITLOCK_H_ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gbookmarkfile.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gbookmarkfile.h new file mode 100644 index 0000000..f753420 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gbookmarkfile.h @@ -0,0 +1,300 @@ +/* gbookmarkfile.h: parsing and building desktop bookmarks + * + * Copyright (C) 2005-2006 Emmanuele Bassi + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_BOOKMARK_FILE_H__ +#define __G_BOOKMARK_FILE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include + +G_BEGIN_DECLS + +/** + * G_BOOKMARK_FILE_ERROR: + * + * Error domain for bookmark file parsing. + * + * Errors in this domain will be from the #GBookmarkFileError + * enumeration. See #GError for information on error domains. + */ +#define G_BOOKMARK_FILE_ERROR (g_bookmark_file_error_quark ()) + + +/** + * GBookmarkFileError: + * @G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed + * @G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found + * @G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did + * not register a bookmark + * @G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found + * @G_BOOKMARK_FILE_ERROR_READ: document was ill formed + * @G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was + * in an unknown encoding + * @G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing + * @G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found + * + * Error codes returned by bookmark file parsing. + */ +typedef enum +{ + G_BOOKMARK_FILE_ERROR_INVALID_URI, + G_BOOKMARK_FILE_ERROR_INVALID_VALUE, + G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED, + G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND, + G_BOOKMARK_FILE_ERROR_READ, + G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING, + G_BOOKMARK_FILE_ERROR_WRITE, + G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND +} GBookmarkFileError; + +GLIB_AVAILABLE_IN_ALL +GQuark g_bookmark_file_error_quark (void); + +/** + * GBookmarkFile: + * + * An opaque data structure representing a set of bookmarks. + */ +typedef struct _GBookmarkFile GBookmarkFile; + +GLIB_AVAILABLE_IN_ALL +GBookmarkFile *g_bookmark_file_new (void); +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_free (GBookmarkFile *bookmark); + +GLIB_AVAILABLE_IN_2_76 +GBookmarkFile *g_bookmark_file_copy (GBookmarkFile *bookmark); + +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_load_from_file (GBookmarkFile *bookmark, + const gchar *filename, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_load_from_data (GBookmarkFile *bookmark, + const gchar *data, + gsize length, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_load_from_data_dirs (GBookmarkFile *bookmark, + const gchar *file, + gchar **full_path, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar * g_bookmark_file_to_data (GBookmarkFile *bookmark, + gsize *length, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_to_file (GBookmarkFile *bookmark, + const gchar *filename, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_set_title (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *title); +GLIB_AVAILABLE_IN_ALL +gchar * g_bookmark_file_get_title (GBookmarkFile *bookmark, + const gchar *uri, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_set_description (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *description); +GLIB_AVAILABLE_IN_ALL +gchar * g_bookmark_file_get_description (GBookmarkFile *bookmark, + const gchar *uri, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_set_mime_type (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *mime_type); +GLIB_AVAILABLE_IN_ALL +gchar * g_bookmark_file_get_mime_type (GBookmarkFile *bookmark, + const gchar *uri, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_set_groups (GBookmarkFile *bookmark, + const gchar *uri, + const gchar **groups, + gsize length); +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_add_group (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *group); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_has_group (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *group, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar ** g_bookmark_file_get_groups (GBookmarkFile *bookmark, + const gchar *uri, + gsize *length, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_add_application (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *name, + const gchar *exec); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_has_application (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *name, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar ** g_bookmark_file_get_applications (GBookmarkFile *bookmark, + const gchar *uri, + gsize *length, + GError **error); +GLIB_DEPRECATED_IN_2_66_FOR(g_bookmark_file_set_application_info) +gboolean g_bookmark_file_set_app_info (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *name, + const gchar *exec, + gint count, + time_t stamp, + GError **error); +GLIB_AVAILABLE_IN_2_66 +gboolean g_bookmark_file_set_application_info (GBookmarkFile *bookmark, + const char *uri, + const char *name, + const char *exec, + int count, + GDateTime *stamp, + GError **error); +GLIB_DEPRECATED_IN_2_66_FOR(g_bookmark_file_get_application_info) +gboolean g_bookmark_file_get_app_info (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *name, + gchar **exec, + guint *count, + time_t *stamp, + GError **error); +GLIB_AVAILABLE_IN_2_66 +gboolean g_bookmark_file_get_application_info (GBookmarkFile *bookmark, + const char *uri, + const char *name, + char **exec, + unsigned int *count, + GDateTime **stamp, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_set_is_private (GBookmarkFile *bookmark, + const gchar *uri, + gboolean is_private); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_get_is_private (GBookmarkFile *bookmark, + const gchar *uri, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_bookmark_file_set_icon (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *href, + const gchar *mime_type); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_get_icon (GBookmarkFile *bookmark, + const gchar *uri, + gchar **href, + gchar **mime_type, + GError **error); +GLIB_DEPRECATED_IN_2_66_FOR(g_bookmark_file_set_added_date_time) +void g_bookmark_file_set_added (GBookmarkFile *bookmark, + const gchar *uri, + time_t added); +GLIB_AVAILABLE_IN_2_66 +void g_bookmark_file_set_added_date_time (GBookmarkFile *bookmark, + const char *uri, + GDateTime *added); +GLIB_DEPRECATED_IN_2_66_FOR(g_bookmark_file_get_added_date_time) +time_t g_bookmark_file_get_added (GBookmarkFile *bookmark, + const gchar *uri, + GError **error); +GLIB_AVAILABLE_IN_2_66 +GDateTime *g_bookmark_file_get_added_date_time (GBookmarkFile *bookmark, + const char *uri, + GError **error); +GLIB_DEPRECATED_IN_2_66_FOR(g_bookmark_file_set_modified_date_time) +void g_bookmark_file_set_modified (GBookmarkFile *bookmark, + const gchar *uri, + time_t modified); +GLIB_AVAILABLE_IN_2_66 +void g_bookmark_file_set_modified_date_time (GBookmarkFile *bookmark, + const char *uri, + GDateTime *modified); +GLIB_DEPRECATED_IN_2_66_FOR(g_bookmark_file_get_modified_date_time) +time_t g_bookmark_file_get_modified (GBookmarkFile *bookmark, + const gchar *uri, + GError **error); +GLIB_AVAILABLE_IN_2_66 +GDateTime *g_bookmark_file_get_modified_date_time (GBookmarkFile *bookmark, + const char *uri, + GError **error); +GLIB_DEPRECATED_IN_2_66_FOR(g_bookmark_file_set_visited_date_time) +void g_bookmark_file_set_visited (GBookmarkFile *bookmark, + const gchar *uri, + time_t visited); +GLIB_AVAILABLE_IN_2_66 +void g_bookmark_file_set_visited_date_time (GBookmarkFile *bookmark, + const char *uri, + GDateTime *visited); +GLIB_DEPRECATED_IN_2_66_FOR(g_bookmark_file_get_visited_date_time) +time_t g_bookmark_file_get_visited (GBookmarkFile *bookmark, + const gchar *uri, + GError **error); +GLIB_AVAILABLE_IN_2_66 +GDateTime *g_bookmark_file_get_visited_date_time (GBookmarkFile *bookmark, + const char *uri, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_has_item (GBookmarkFile *bookmark, + const gchar *uri); +GLIB_AVAILABLE_IN_ALL +gint g_bookmark_file_get_size (GBookmarkFile *bookmark); +GLIB_AVAILABLE_IN_ALL +gchar ** g_bookmark_file_get_uris (GBookmarkFile *bookmark, + gsize *length); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_remove_group (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *group, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_remove_application (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *name, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_remove_item (GBookmarkFile *bookmark, + const gchar *uri, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_bookmark_file_move_item (GBookmarkFile *bookmark, + const gchar *old_uri, + const gchar *new_uri, + GError **error); + +G_END_DECLS + +#endif /* __G_BOOKMARK_FILE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gbytes.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gbytes.h new file mode 100644 index 0000000..d934989 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gbytes.h @@ -0,0 +1,99 @@ +/* + * Copyright © 2009, 2010 Codethink Limited + * Copyright © 2011 Collabora Ltd. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Author: Ryan Lortie + * Stef Walter + */ + +#ifndef __G_BYTES_H__ +#define __G_BYTES_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +GBytes * g_bytes_new (gconstpointer data, + gsize size); + +GLIB_AVAILABLE_IN_ALL +GBytes * g_bytes_new_take (gpointer data, + gsize size); + +GLIB_AVAILABLE_IN_ALL +GBytes * g_bytes_new_static (gconstpointer data, + gsize size); + +GLIB_AVAILABLE_IN_ALL +GBytes * g_bytes_new_with_free_func (gconstpointer data, + gsize size, + GDestroyNotify free_func, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +GBytes * g_bytes_new_from_bytes (GBytes *bytes, + gsize offset, + gsize length); + +GLIB_AVAILABLE_IN_ALL +gconstpointer g_bytes_get_data (GBytes *bytes, + gsize *size); + +GLIB_AVAILABLE_IN_ALL +gsize g_bytes_get_size (GBytes *bytes); + +GLIB_AVAILABLE_IN_ALL +GBytes * g_bytes_ref (GBytes *bytes); + +GLIB_AVAILABLE_IN_ALL +void g_bytes_unref (GBytes *bytes); + +GLIB_AVAILABLE_IN_ALL +gpointer g_bytes_unref_to_data (GBytes *bytes, + gsize *size); + +GLIB_AVAILABLE_IN_ALL +GByteArray * g_bytes_unref_to_array (GBytes *bytes); + +GLIB_AVAILABLE_IN_ALL +guint g_bytes_hash (gconstpointer bytes); + +GLIB_AVAILABLE_IN_ALL +gboolean g_bytes_equal (gconstpointer bytes1, + gconstpointer bytes2); + +GLIB_AVAILABLE_IN_ALL +gint g_bytes_compare (gconstpointer bytes1, + gconstpointer bytes2); + +GLIB_AVAILABLE_IN_2_70 +gconstpointer g_bytes_get_region (GBytes *bytes, + gsize element_size, + gsize offset, + gsize n_elements); + + +G_END_DECLS + +#endif /* __G_BYTES_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gcharset.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gcharset.h new file mode 100644 index 0000000..144ec7a --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gcharset.h @@ -0,0 +1,49 @@ +/* gcharset.h - Charset functions + * + * Copyright (C) 2011 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_CHARSET_H__ +#define __G_CHARSET_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +gboolean g_get_charset (const char **charset); +GLIB_AVAILABLE_IN_ALL +gchar * g_get_codeset (void); +GLIB_AVAILABLE_IN_2_62 +gboolean g_get_console_charset (const char **charset); + +GLIB_AVAILABLE_IN_ALL +const gchar * const * g_get_language_names (void); +GLIB_AVAILABLE_IN_2_58 +const gchar * const * g_get_language_names_with_category + (const gchar *category_name); +GLIB_AVAILABLE_IN_ALL +gchar ** g_get_locale_variants (const gchar *locale); + +G_END_DECLS + +#endif /* __G_CHARSET_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gchecksum.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gchecksum.h new file mode 100644 index 0000000..e5c54e7 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gchecksum.h @@ -0,0 +1,106 @@ +/* gchecksum.h - data hashing functions + * + * Copyright (C) 2007 Emmanuele Bassi + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_CHECKSUM_H__ +#define __G_CHECKSUM_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +/** + * GChecksumType: + * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm + * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm + * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm + * @G_CHECKSUM_SHA384: Use the SHA-384 hashing algorithm (Since: 2.51) + * @G_CHECKSUM_SHA512: Use the SHA-512 hashing algorithm (Since: 2.36) + * + * The hashing algorithm to be used by #GChecksum when performing the + * digest of some data. + * + * Note that the #GChecksumType enumeration may be extended at a later + * date to include new hashing algorithm types. + * + * Since: 2.16 + */ +typedef enum { + G_CHECKSUM_MD5, + G_CHECKSUM_SHA1, + G_CHECKSUM_SHA256, + G_CHECKSUM_SHA512, + G_CHECKSUM_SHA384 +} GChecksumType; + +/** + * GChecksum: + * + * An opaque structure representing a checksumming operation. + * + * To create a new GChecksum, use g_checksum_new(). To free + * a GChecksum, use g_checksum_free(). + * + * Since: 2.16 + */ +typedef struct _GChecksum GChecksum; + +GLIB_AVAILABLE_IN_ALL +gssize g_checksum_type_get_length (GChecksumType checksum_type); + +GLIB_AVAILABLE_IN_ALL +GChecksum * g_checksum_new (GChecksumType checksum_type); +GLIB_AVAILABLE_IN_ALL +void g_checksum_reset (GChecksum *checksum); +GLIB_AVAILABLE_IN_ALL +GChecksum * g_checksum_copy (const GChecksum *checksum); +GLIB_AVAILABLE_IN_ALL +void g_checksum_free (GChecksum *checksum); +GLIB_AVAILABLE_IN_ALL +void g_checksum_update (GChecksum *checksum, + const guchar *data, + gssize length); +GLIB_AVAILABLE_IN_ALL +const gchar * g_checksum_get_string (GChecksum *checksum); +GLIB_AVAILABLE_IN_ALL +void g_checksum_get_digest (GChecksum *checksum, + guint8 *buffer, + gsize *digest_len); + +GLIB_AVAILABLE_IN_ALL +gchar *g_compute_checksum_for_data (GChecksumType checksum_type, + const guchar *data, + gsize length); +GLIB_AVAILABLE_IN_ALL +gchar *g_compute_checksum_for_string (GChecksumType checksum_type, + const gchar *str, + gssize length); + +GLIB_AVAILABLE_IN_2_34 +gchar *g_compute_checksum_for_bytes (GChecksumType checksum_type, + GBytes *data); + +G_END_DECLS + +#endif /* __G_CHECKSUM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gconvert.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gconvert.h new file mode 100644 index 0000000..81b41c0 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gconvert.h @@ -0,0 +1,179 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_CONVERT_H__ +#define __G_CONVERT_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * GConvertError: + * @G_CONVERT_ERROR_NO_CONVERSION: Conversion between the requested character + * sets is not supported. + * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input; + * or the character sequence could not be represented in the target + * character set. + * @G_CONVERT_ERROR_FAILED: Conversion failed for some reason. + * @G_CONVERT_ERROR_PARTIAL_INPUT: Partial character sequence at end of input. + * @G_CONVERT_ERROR_BAD_URI: URI is invalid. + * @G_CONVERT_ERROR_NOT_ABSOLUTE_PATH: Pathname is not an absolute path. + * @G_CONVERT_ERROR_NO_MEMORY: No memory available. Since: 2.40 + * @G_CONVERT_ERROR_EMBEDDED_NUL: An embedded NUL character is present in + * conversion output where a NUL-terminated string is expected. + * Since: 2.56 + * + * Error codes returned by character set conversion routines. + */ +typedef enum +{ + G_CONVERT_ERROR_NO_CONVERSION, + G_CONVERT_ERROR_ILLEGAL_SEQUENCE, + G_CONVERT_ERROR_FAILED, + G_CONVERT_ERROR_PARTIAL_INPUT, + G_CONVERT_ERROR_BAD_URI, + G_CONVERT_ERROR_NOT_ABSOLUTE_PATH, + G_CONVERT_ERROR_NO_MEMORY, + G_CONVERT_ERROR_EMBEDDED_NUL +} GConvertError; + +/** + * G_CONVERT_ERROR: + * + * Error domain for character set conversions. Errors in this domain will + * be from the #GConvertError enumeration. See #GError for information on + * error domains. + */ +#define G_CONVERT_ERROR g_convert_error_quark() +GLIB_AVAILABLE_IN_ALL +GQuark g_convert_error_quark (void); + +/** + * GIConv: (skip) + * + * The GIConv struct wraps an iconv() conversion descriptor. It contains + * private data and should only be accessed using the following functions. + */ +typedef struct _GIConv *GIConv; + +GLIB_AVAILABLE_IN_ALL +GIConv g_iconv_open (const gchar *to_codeset, + const gchar *from_codeset); +GLIB_AVAILABLE_IN_ALL +gsize g_iconv (GIConv converter, + gchar **inbuf, + gsize *inbytes_left, + gchar **outbuf, + gsize *outbytes_left); +GLIB_AVAILABLE_IN_ALL +gint g_iconv_close (GIConv converter); + + +GLIB_AVAILABLE_IN_ALL +gchar* g_convert (const gchar *str, + gssize len, + const gchar *to_codeset, + const gchar *from_codeset, + gsize *bytes_read, + gsize *bytes_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_convert_with_iconv (const gchar *str, + gssize len, + GIConv converter, + gsize *bytes_read, + gsize *bytes_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_convert_with_fallback (const gchar *str, + gssize len, + const gchar *to_codeset, + const gchar *from_codeset, + const gchar *fallback, + gsize *bytes_read, + gsize *bytes_written, + GError **error) G_GNUC_MALLOC; + + +/* Convert between libc's idea of strings and UTF-8. + */ +GLIB_AVAILABLE_IN_ALL +gchar* g_locale_to_utf8 (const gchar *opsysstring, + gssize len, + gsize *bytes_read, + gsize *bytes_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_locale_from_utf8 (const gchar *utf8string, + gssize len, + gsize *bytes_read, + gsize *bytes_written, + GError **error) G_GNUC_MALLOC; + +/* Convert between the operating system (or C runtime) + * representation of file names and UTF-8. + */ +GLIB_AVAILABLE_IN_ALL +gchar* g_filename_to_utf8 (const gchar *opsysstring, + gssize len, + gsize *bytes_read, + gsize *bytes_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_filename_from_utf8 (const gchar *utf8string, + gssize len, + gsize *bytes_read, + gsize *bytes_written, + GError **error) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gchar *g_filename_from_uri (const gchar *uri, + gchar **hostname, + GError **error) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gchar *g_filename_to_uri (const gchar *filename, + const gchar *hostname, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar *g_filename_display_name (const gchar *filename) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gboolean g_get_filename_charsets (const gchar ***filename_charsets); + +GLIB_AVAILABLE_IN_ALL +gchar *g_filename_display_basename (const gchar *filename) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gchar **g_uri_list_extract_uris (const gchar *uri_list); + +G_END_DECLS + +#endif /* __G_CONVERT_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gdataset.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gdataset.h new file mode 100644 index 0000000..a0d44b0 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gdataset.h @@ -0,0 +1,156 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_DATASET_H__ +#define __G_DATASET_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +typedef struct _GData GData; + +typedef void (*GDataForeachFunc) (GQuark key_id, + gpointer data, + gpointer user_data); + +/* Keyed Data List + */ +GLIB_AVAILABLE_IN_ALL +void g_datalist_init (GData **datalist); +GLIB_AVAILABLE_IN_ALL +void g_datalist_clear (GData **datalist); +GLIB_AVAILABLE_IN_ALL +gpointer g_datalist_id_get_data (GData **datalist, + GQuark key_id); +GLIB_AVAILABLE_IN_ALL +void g_datalist_id_set_data_full (GData **datalist, + GQuark key_id, + gpointer data, + GDestroyNotify destroy_func); +GLIB_AVAILABLE_IN_2_74 +void g_datalist_id_remove_multiple (GData **datalist, + GQuark *keys, + gsize n_keys); + +typedef gpointer (*GDuplicateFunc) (gpointer data, gpointer user_data); + +GLIB_AVAILABLE_IN_2_34 +gpointer g_datalist_id_dup_data (GData **datalist, + GQuark key_id, + GDuplicateFunc dup_func, + gpointer user_data); +GLIB_AVAILABLE_IN_2_34 +gboolean g_datalist_id_replace_data (GData **datalist, + GQuark key_id, + gpointer oldval, + gpointer newval, + GDestroyNotify destroy, + GDestroyNotify *old_destroy); + +GLIB_AVAILABLE_IN_ALL +gpointer g_datalist_id_remove_no_notify (GData **datalist, + GQuark key_id); +GLIB_AVAILABLE_IN_ALL +void g_datalist_foreach (GData **datalist, + GDataForeachFunc func, + gpointer user_data); + +/** + * G_DATALIST_FLAGS_MASK: + * + * A bitmask that restricts the possible flags passed to + * g_datalist_set_flags(). Passing a flags value where + * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error. + */ +#define G_DATALIST_FLAGS_MASK 0x3 + +GLIB_AVAILABLE_IN_ALL +void g_datalist_set_flags (GData **datalist, + guint flags); +GLIB_AVAILABLE_IN_ALL +void g_datalist_unset_flags (GData **datalist, + guint flags); +GLIB_AVAILABLE_IN_ALL +guint g_datalist_get_flags (GData **datalist); + +#define g_datalist_id_set_data(dl, q, d) \ + g_datalist_id_set_data_full ((dl), (q), (d), NULL) +#define g_datalist_id_remove_data(dl, q) \ + g_datalist_id_set_data ((dl), (q), NULL) +#define g_datalist_set_data_full(dl, k, d, f) \ + g_datalist_id_set_data_full ((dl), g_quark_from_string (k), (d), (f)) +#define g_datalist_remove_no_notify(dl, k) \ + g_datalist_id_remove_no_notify ((dl), g_quark_try_string (k)) +#define g_datalist_set_data(dl, k, d) \ + g_datalist_set_data_full ((dl), (k), (d), NULL) +#define g_datalist_remove_data(dl, k) \ + g_datalist_id_set_data ((dl), g_quark_try_string (k), NULL) + +/* Location Associated Keyed Data + */ +GLIB_AVAILABLE_IN_ALL +void g_dataset_destroy (gconstpointer dataset_location); +GLIB_AVAILABLE_IN_ALL +gpointer g_dataset_id_get_data (gconstpointer dataset_location, + GQuark key_id); +GLIB_AVAILABLE_IN_ALL +gpointer g_datalist_get_data (GData **datalist, + const gchar *key); +GLIB_AVAILABLE_IN_ALL +void g_dataset_id_set_data_full (gconstpointer dataset_location, + GQuark key_id, + gpointer data, + GDestroyNotify destroy_func); +GLIB_AVAILABLE_IN_ALL +gpointer g_dataset_id_remove_no_notify (gconstpointer dataset_location, + GQuark key_id); +GLIB_AVAILABLE_IN_ALL +void g_dataset_foreach (gconstpointer dataset_location, + GDataForeachFunc func, + gpointer user_data); +#define g_dataset_id_set_data(l, k, d) \ + g_dataset_id_set_data_full ((l), (k), (d), NULL) +#define g_dataset_id_remove_data(l, k) \ + g_dataset_id_set_data ((l), (k), NULL) +#define g_dataset_get_data(l, k) \ + (g_dataset_id_get_data ((l), g_quark_try_string (k))) +#define g_dataset_set_data_full(l, k, d, f) \ + g_dataset_id_set_data_full ((l), g_quark_from_string (k), (d), (f)) +#define g_dataset_remove_no_notify(l, k) \ + g_dataset_id_remove_no_notify ((l), g_quark_try_string (k)) +#define g_dataset_set_data(l, k, d) \ + g_dataset_set_data_full ((l), (k), (d), NULL) +#define g_dataset_remove_data(l, k) \ + g_dataset_id_set_data ((l), g_quark_try_string (k), NULL) + +G_END_DECLS + +#endif /* __G_DATASET_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gdate.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gdate.h new file mode 100644 index 0000000..5ef21cb --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gdate.h @@ -0,0 +1,309 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_DATE_H__ +#define __G_DATE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +#include +#include + +G_BEGIN_DECLS + +/* GDate + * + * Date calculations (not time for now, to be resolved). These are a + * mutant combination of Steffen Beyer's DateCalc routines + * (http://www.perl.com/CPAN/authors/id/STBEY/) and Jon Trowbridge's + * date routines (written for in-house software). Written by Havoc + * Pennington + */ + +typedef gint32 GTime GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime); +typedef guint16 GDateYear; +typedef guint8 GDateDay; /* day of the month */ +typedef struct _GDate GDate; + +/* enum used to specify order of appearance in parsed date strings */ +typedef enum +{ + G_DATE_DAY = 0, + G_DATE_MONTH = 1, + G_DATE_YEAR = 2 +} GDateDMY; + +/* actual week and month values */ +typedef enum +{ + G_DATE_BAD_WEEKDAY = 0, + G_DATE_MONDAY = 1, + G_DATE_TUESDAY = 2, + G_DATE_WEDNESDAY = 3, + G_DATE_THURSDAY = 4, + G_DATE_FRIDAY = 5, + G_DATE_SATURDAY = 6, + G_DATE_SUNDAY = 7 +} GDateWeekday; +typedef enum +{ + G_DATE_BAD_MONTH = 0, + G_DATE_JANUARY = 1, + G_DATE_FEBRUARY = 2, + G_DATE_MARCH = 3, + G_DATE_APRIL = 4, + G_DATE_MAY = 5, + G_DATE_JUNE = 6, + G_DATE_JULY = 7, + G_DATE_AUGUST = 8, + G_DATE_SEPTEMBER = 9, + G_DATE_OCTOBER = 10, + G_DATE_NOVEMBER = 11, + G_DATE_DECEMBER = 12 +} GDateMonth; + +#define G_DATE_BAD_JULIAN 0U +#define G_DATE_BAD_DAY 0U +#define G_DATE_BAD_YEAR 0U + +/* Note: directly manipulating structs is generally a bad idea, but + * in this case it's an *incredibly* bad idea, because all or part + * of this struct can be invalid at any given time. Use the functions, + * or you will get hosed, I promise. + */ +struct _GDate +{ + guint julian_days : 32; /* julian days representation - we use a + * bitfield hoping that 64 bit platforms + * will pack this whole struct in one big + * int + */ + + guint julian : 1; /* julian is valid */ + guint dmy : 1; /* dmy is valid */ + + /* DMY representation */ + guint day : 6; + guint month : 4; + guint year : 16; +}; + +/* g_date_new() returns an invalid date, you then have to _set() stuff + * to get a usable object. You can also allocate a GDate statically, + * then call g_date_clear() to initialize. + */ +GLIB_AVAILABLE_IN_ALL +GDate* g_date_new (void); +GLIB_AVAILABLE_IN_ALL +GDate* g_date_new_dmy (GDateDay day, + GDateMonth month, + GDateYear year); +GLIB_AVAILABLE_IN_ALL +GDate* g_date_new_julian (guint32 julian_day); +GLIB_AVAILABLE_IN_ALL +void g_date_free (GDate *date); +GLIB_AVAILABLE_IN_2_56 +GDate* g_date_copy (const GDate *date); + +/* check g_date_valid() after doing an operation that might fail, like + * _parse. Almost all g_date operations are undefined on invalid + * dates (the exceptions are the mutators, since you need those to + * return to validity). + */ +GLIB_AVAILABLE_IN_ALL +gboolean g_date_valid (const GDate *date); +GLIB_AVAILABLE_IN_ALL +gboolean g_date_valid_day (GDateDay day) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_date_valid_month (GDateMonth month) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_date_valid_year (GDateYear year) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_date_valid_weekday (GDateWeekday weekday) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_date_valid_julian (guint32 julian_date) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_date_valid_dmy (GDateDay day, + GDateMonth month, + GDateYear year) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +GDateWeekday g_date_get_weekday (const GDate *date); +GLIB_AVAILABLE_IN_ALL +GDateMonth g_date_get_month (const GDate *date); +GLIB_AVAILABLE_IN_ALL +GDateYear g_date_get_year (const GDate *date); +GLIB_AVAILABLE_IN_ALL +GDateDay g_date_get_day (const GDate *date); +GLIB_AVAILABLE_IN_ALL +guint32 g_date_get_julian (const GDate *date); +GLIB_AVAILABLE_IN_ALL +guint g_date_get_day_of_year (const GDate *date); +/* First monday/sunday is the start of week 1; if we haven't reached + * that day, return 0. These are not ISO weeks of the year; that + * routine needs to be added. + * these functions return the number of weeks, starting on the + * corresponding day + */ +GLIB_AVAILABLE_IN_ALL +guint g_date_get_monday_week_of_year (const GDate *date); +GLIB_AVAILABLE_IN_ALL +guint g_date_get_sunday_week_of_year (const GDate *date); +GLIB_AVAILABLE_IN_ALL +guint g_date_get_iso8601_week_of_year (const GDate *date); + +/* If you create a static date struct you need to clear it to get it + * in a safe state before use. You can clear a whole array at + * once with the ndates argument. + */ +GLIB_AVAILABLE_IN_ALL +void g_date_clear (GDate *date, + guint n_dates); + +/* The parse routine is meant for dates typed in by a user, so it + * permits many formats but tries to catch common typos. If your data + * needs to be strictly validated, it is not an appropriate function. + */ +GLIB_AVAILABLE_IN_ALL +void g_date_set_parse (GDate *date, + const gchar *str); +GLIB_AVAILABLE_IN_ALL +void g_date_set_time_t (GDate *date, + time_t timet); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED_IN_2_62_FOR(g_date_set_time_t) +void g_date_set_time_val (GDate *date, + GTimeVal *timeval); +GLIB_DEPRECATED_FOR(g_date_set_time_t) +void g_date_set_time (GDate *date, + GTime time_); +G_GNUC_END_IGNORE_DEPRECATIONS +GLIB_AVAILABLE_IN_ALL +void g_date_set_month (GDate *date, + GDateMonth month); +GLIB_AVAILABLE_IN_ALL +void g_date_set_day (GDate *date, + GDateDay day); +GLIB_AVAILABLE_IN_ALL +void g_date_set_year (GDate *date, + GDateYear year); +GLIB_AVAILABLE_IN_ALL +void g_date_set_dmy (GDate *date, + GDateDay day, + GDateMonth month, + GDateYear y); +GLIB_AVAILABLE_IN_ALL +void g_date_set_julian (GDate *date, + guint32 julian_date); +GLIB_AVAILABLE_IN_ALL +gboolean g_date_is_first_of_month (const GDate *date); +GLIB_AVAILABLE_IN_ALL +gboolean g_date_is_last_of_month (const GDate *date); + +/* To go forward by some number of weeks just go forward weeks*7 days */ +GLIB_AVAILABLE_IN_ALL +void g_date_add_days (GDate *date, + guint n_days); +GLIB_AVAILABLE_IN_ALL +void g_date_subtract_days (GDate *date, + guint n_days); + +/* If you add/sub months while day > 28, the day might change */ +GLIB_AVAILABLE_IN_ALL +void g_date_add_months (GDate *date, + guint n_months); +GLIB_AVAILABLE_IN_ALL +void g_date_subtract_months (GDate *date, + guint n_months); + +/* If it's feb 29, changing years can move you to the 28th */ +GLIB_AVAILABLE_IN_ALL +void g_date_add_years (GDate *date, + guint n_years); +GLIB_AVAILABLE_IN_ALL +void g_date_subtract_years (GDate *date, + guint n_years); +GLIB_AVAILABLE_IN_ALL +gboolean g_date_is_leap_year (GDateYear year) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +guint8 g_date_get_days_in_month (GDateMonth month, + GDateYear year) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +guint8 g_date_get_monday_weeks_in_year (GDateYear year) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +guint8 g_date_get_sunday_weeks_in_year (GDateYear year) G_GNUC_CONST; + +/* Returns the number of days between the two dates. If date2 comes + before date1, a negative value is return. */ +GLIB_AVAILABLE_IN_ALL +gint g_date_days_between (const GDate *date1, + const GDate *date2); + +/* qsort-friendly (with a cast...) */ +GLIB_AVAILABLE_IN_ALL +gint g_date_compare (const GDate *lhs, + const GDate *rhs); +GLIB_AVAILABLE_IN_ALL +void g_date_to_struct_tm (const GDate *date, + struct tm *tm); + +GLIB_AVAILABLE_IN_ALL +void g_date_clamp (GDate *date, + const GDate *min_date, + const GDate *max_date); + +/* Swap date1 and date2's values if date1 > date2. */ +GLIB_AVAILABLE_IN_ALL +void g_date_order (GDate *date1, GDate *date2); + +/* Just like strftime() except you can only use date-related formats. + * Using a time format is undefined. + */ +GLIB_AVAILABLE_IN_ALL +gsize g_date_strftime (gchar *s, + gsize slen, + const gchar *format, + const GDate *date); + +#define g_date_weekday g_date_get_weekday GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_weekday) +#define g_date_month g_date_get_month GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_month) +#define g_date_year g_date_get_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_year) +#define g_date_day g_date_get_day GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_day) +#define g_date_julian g_date_get_julian GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_julian) +#define g_date_day_of_year g_date_get_day_of_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_day_of_year) +#define g_date_monday_week_of_year g_date_get_monday_week_of_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_monday_week_of_year) +#define g_date_sunday_week_of_year g_date_get_sunday_week_of_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_sunday_week_of_year) +#define g_date_days_in_month g_date_get_days_in_month GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_days_in_month) +#define g_date_monday_weeks_in_year g_date_get_monday_weeks_in_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_monday_weeks_in_year) +#define g_date_sunday_weeks_in_year g_date_get_sunday_weeks_in_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_sunday_weeks_in_year) + +G_END_DECLS + +#endif /* __G_DATE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gdatetime.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gdatetime.h new file mode 100644 index 0000000..4312433 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gdatetime.h @@ -0,0 +1,275 @@ +/* + * Copyright (C) 2009-2010 Christian Hergert + * Copyright © 2010 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * licence, or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + * + * Authors: Christian Hergert + * Thiago Santos + * Emmanuele Bassi + * Ryan Lortie + */ + +#ifndef __G_DATE_TIME_H__ +#define __G_DATE_TIME_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * G_TIME_SPAN_DAY: + * + * Evaluates to a time span of one day. + * + * Since: 2.26 + */ +#define G_TIME_SPAN_DAY (G_GINT64_CONSTANT (86400000000)) + +/** + * G_TIME_SPAN_HOUR: + * + * Evaluates to a time span of one hour. + * + * Since: 2.26 + */ +#define G_TIME_SPAN_HOUR (G_GINT64_CONSTANT (3600000000)) + +/** + * G_TIME_SPAN_MINUTE: + * + * Evaluates to a time span of one minute. + * + * Since: 2.26 + */ +#define G_TIME_SPAN_MINUTE (G_GINT64_CONSTANT (60000000)) + +/** + * G_TIME_SPAN_SECOND: + * + * Evaluates to a time span of one second. + * + * Since: 2.26 + */ +#define G_TIME_SPAN_SECOND (G_GINT64_CONSTANT (1000000)) + +/** + * G_TIME_SPAN_MILLISECOND: + * + * Evaluates to a time span of one millisecond. + * + * Since: 2.26 + */ +#define G_TIME_SPAN_MILLISECOND (G_GINT64_CONSTANT (1000)) + +/** + * GTimeSpan: + * + * A value representing an interval of time, in microseconds. + * + * Since: 2.26 + */ +typedef gint64 GTimeSpan; + +/** + * GDateTime: + * + * An opaque structure that represents a date and time, including a time zone. + * + * Since: 2.26 + */ +typedef struct _GDateTime GDateTime; + +GLIB_AVAILABLE_IN_ALL +void g_date_time_unref (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_ref (GDateTime *datetime); + +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new_now (GTimeZone *tz); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new_now_local (void); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new_now_utc (void); + +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new_from_unix_local (gint64 t); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new_from_unix_utc (gint64 t); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED_IN_2_62_FOR(g_date_time_new_from_unix_local) +GDateTime * g_date_time_new_from_timeval_local (const GTimeVal *tv); +GLIB_DEPRECATED_IN_2_62_FOR(g_date_time_new_from_unix_utc) +GDateTime * g_date_time_new_from_timeval_utc (const GTimeVal *tv); +G_GNUC_END_IGNORE_DEPRECATIONS + +GLIB_AVAILABLE_IN_2_56 +GDateTime * g_date_time_new_from_iso8601 (const gchar *text, + GTimeZone *default_tz); + +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new (GTimeZone *tz, + gint year, + gint month, + gint day, + gint hour, + gint minute, + gdouble seconds); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new_local (gint year, + gint month, + gint day, + gint hour, + gint minute, + gdouble seconds); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_new_utc (gint year, + gint month, + gint day, + gint hour, + gint minute, + gdouble seconds); + +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add (GDateTime *datetime, + GTimeSpan timespan); + +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add_years (GDateTime *datetime, + gint years); +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add_months (GDateTime *datetime, + gint months); +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add_weeks (GDateTime *datetime, + gint weeks); +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add_days (GDateTime *datetime, + gint days); + +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add_hours (GDateTime *datetime, + gint hours); +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add_minutes (GDateTime *datetime, + gint minutes); +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add_seconds (GDateTime *datetime, + gdouble seconds); + +GLIB_AVAILABLE_IN_ALL +G_GNUC_WARN_UNUSED_RESULT +GDateTime * g_date_time_add_full (GDateTime *datetime, + gint years, + gint months, + gint days, + gint hours, + gint minutes, + gdouble seconds); + +GLIB_AVAILABLE_IN_ALL +gint g_date_time_compare (gconstpointer dt1, + gconstpointer dt2); +GLIB_AVAILABLE_IN_ALL +GTimeSpan g_date_time_difference (GDateTime *end, + GDateTime *begin); +GLIB_AVAILABLE_IN_ALL +guint g_date_time_hash (gconstpointer datetime); +GLIB_AVAILABLE_IN_ALL +gboolean g_date_time_equal (gconstpointer dt1, + gconstpointer dt2); + +GLIB_AVAILABLE_IN_ALL +void g_date_time_get_ymd (GDateTime *datetime, + gint *year, + gint *month, + gint *day); + +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_year (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_month (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_day_of_month (GDateTime *datetime); + +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_week_numbering_year (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_week_of_year (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_day_of_week (GDateTime *datetime); + +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_day_of_year (GDateTime *datetime); + +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_hour (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_minute (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_second (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gint g_date_time_get_microsecond (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gdouble g_date_time_get_seconds (GDateTime *datetime); + +GLIB_AVAILABLE_IN_ALL +gint64 g_date_time_to_unix (GDateTime *datetime); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED_IN_2_62_FOR(g_date_time_to_unix) +gboolean g_date_time_to_timeval (GDateTime *datetime, + GTimeVal *tv); +G_GNUC_END_IGNORE_DEPRECATIONS + +GLIB_AVAILABLE_IN_ALL +GTimeSpan g_date_time_get_utc_offset (GDateTime *datetime); +GLIB_AVAILABLE_IN_2_58 +GTimeZone * g_date_time_get_timezone (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +const gchar * g_date_time_get_timezone_abbreviation (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +gboolean g_date_time_is_daylight_savings (GDateTime *datetime); + +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_to_timezone (GDateTime *datetime, + GTimeZone *tz); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_to_local (GDateTime *datetime); +GLIB_AVAILABLE_IN_ALL +GDateTime * g_date_time_to_utc (GDateTime *datetime); + +GLIB_AVAILABLE_IN_ALL +gchar * g_date_time_format (GDateTime *datetime, + const gchar *format) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_2_62 +gchar * g_date_time_format_iso8601 (GDateTime *datetime) G_GNUC_MALLOC; + +G_END_DECLS + +#endif /* __G_DATE_TIME_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gdir.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gdir.h new file mode 100644 index 0000000..0d3ee82 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gdir.h @@ -0,0 +1,54 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * gdir.c: Simplified wrapper around the DIRENT functions. + * + * Copyright 2001 Hans Breuer + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef __G_DIR_H__ +#define __G_DIR_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +#ifdef G_OS_UNIX +#include +#endif + +G_BEGIN_DECLS + +typedef struct _GDir GDir; + +GLIB_AVAILABLE_IN_ALL +GDir * g_dir_open (const gchar *path, + guint flags, + GError **error); +GLIB_AVAILABLE_IN_ALL +const gchar * g_dir_read_name (GDir *dir); +GLIB_AVAILABLE_IN_ALL +void g_dir_rewind (GDir *dir); +GLIB_AVAILABLE_IN_ALL +void g_dir_close (GDir *dir); + +G_END_DECLS + +#endif /* __G_DIR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/genviron.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/genviron.h new file mode 100644 index 0000000..3ac3846 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/genviron.h @@ -0,0 +1,65 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_ENVIRON_H__ +#define __G_ENVIRON_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +const gchar * g_getenv (const gchar *variable); +GLIB_AVAILABLE_IN_ALL +gboolean g_setenv (const gchar *variable, + const gchar *value, + gboolean overwrite); +GLIB_AVAILABLE_IN_ALL +void g_unsetenv (const gchar *variable); +GLIB_AVAILABLE_IN_ALL +gchar ** g_listenv (void); + +GLIB_AVAILABLE_IN_ALL +gchar ** g_get_environ (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_environ_getenv (gchar **envp, + const gchar *variable); +GLIB_AVAILABLE_IN_ALL +gchar ** g_environ_setenv (gchar **envp, + const gchar *variable, + const gchar *value, + gboolean overwrite) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +gchar ** g_environ_unsetenv (gchar **envp, + const gchar *variable) G_GNUC_WARN_UNUSED_RESULT; + +G_END_DECLS + +#endif /* __G_ENVIRON_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gerror.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gerror.h new file mode 100644 index 0000000..1aebfbe --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gerror.h @@ -0,0 +1,263 @@ +/* gerror.h - Error reporting system + * + * Copyright 2000 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_ERROR_H__ +#define __G_ERROR_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +#include + +G_BEGIN_DECLS + +/** + * GError: + * @domain: error domain, e.g. %G_FILE_ERROR + * @code: error code, e.g. %G_FILE_ERROR_NOENT + * @message: human-readable informative error message + * + * The `GError` structure contains information about + * an error that has occurred. + */ +typedef struct _GError GError; + +struct _GError +{ + GQuark domain; + gint code; + gchar *message; +}; + +/** + * G_DEFINE_EXTENDED_ERROR: + * @ErrorType: name to return a #GQuark for + * @error_type: prefix for the function name + * + * A convenience macro which defines two functions. First, returning + * the #GQuark for the extended error type @ErrorType; it is called + * `error_type_quark()`. Second, returning the private data from a + * passed #GError; it is called `error_type_get_private()`. + * + * For this macro to work, a type named `ErrorTypePrivate` should be + * defined, `error_type_private_init()`, `error_type_private_copy()` + * and `error_type_private_clear()` functions need to be either + * declared or defined. The functions should be similar to + * #GErrorInitFunc, #GErrorCopyFunc and #GErrorClearFunc, + * respectively, but they should receive the private data type instead + * of #GError. + * + * See [Extended #GError Domains][gerror-extended-domains] for an example. + * + * Since: 2.68 + */ +#define G_DEFINE_EXTENDED_ERROR(ErrorType, error_type) \ +static inline ErrorType ## Private * \ +error_type ## _get_private (const GError *error) \ +{ \ + /* Copied from gtype.c (STRUCT_ALIGNMENT and ALIGN_STRUCT macros). */ \ + const gsize sa = 2 * sizeof (gsize); \ + const gsize as = (sizeof (ErrorType ## Private) + (sa - 1)) & -sa; \ + g_return_val_if_fail (error != NULL, NULL); \ + g_return_val_if_fail (error->domain == error_type ## _quark (), NULL); \ + return (ErrorType ## Private *) (((guint8 *)error) - as); \ +} \ + \ +static void \ +g_error_with_ ## error_type ## _private_init (GError *error) \ +{ \ + ErrorType ## Private *priv = error_type ## _get_private (error); \ + error_type ## _private_init (priv); \ +} \ + \ +static void \ +g_error_with_ ## error_type ## _private_copy (const GError *src_error, \ + GError *dest_error) \ +{ \ + const ErrorType ## Private *src_priv = error_type ## _get_private (src_error); \ + ErrorType ## Private *dest_priv = error_type ## _get_private (dest_error); \ + error_type ## _private_copy (src_priv, dest_priv); \ +} \ + \ +static void \ +g_error_with_ ## error_type ## _private_clear (GError *error) \ +{ \ + ErrorType ## Private *priv = error_type ## _get_private (error); \ + error_type ## _private_clear (priv); \ +} \ + \ +GQuark \ +error_type ## _quark (void) \ +{ \ + static GQuark q; \ + static gsize initialized = 0; \ + \ + if (g_once_init_enter (&initialized)) \ + { \ + q = g_error_domain_register_static (#ErrorType, \ + sizeof (ErrorType ## Private), \ + g_error_with_ ## error_type ## _private_init, \ + g_error_with_ ## error_type ## _private_copy, \ + g_error_with_ ## error_type ## _private_clear); \ + g_once_init_leave (&initialized, 1); \ + } \ + \ + return q; \ +} + +/** + * GErrorInitFunc: + * @error: extended error + * + * Specifies the type of function which is called just after an + * extended error instance is created and its fields filled. It should + * only initialize the fields in the private data, which can be + * received with the generated `*_get_private()` function. + * + * Normally, it is better to use G_DEFINE_EXTENDED_ERROR(), as it + * already takes care of getting the private data from @error. + * + * Since: 2.68 + */ +typedef void (*GErrorInitFunc) (GError *error); + +/** + * GErrorCopyFunc: + * @src_error: source extended error + * @dest_error: destination extended error + * + * Specifies the type of function which is called when an extended + * error instance is copied. It is passed the pointer to the + * destination error and source error, and should copy only the fields + * of the private data from @src_error to @dest_error. + * + * Normally, it is better to use G_DEFINE_EXTENDED_ERROR(), as it + * already takes care of getting the private data from @src_error and + * @dest_error. + * + * Since: 2.68 + */ +typedef void (*GErrorCopyFunc) (const GError *src_error, GError *dest_error); + +/** + * GErrorClearFunc: + * @error: extended error to clear + * + * Specifies the type of function which is called when an extended + * error instance is freed. It is passed the error pointer about to be + * freed, and should free the error's private data fields. + * + * Normally, it is better to use G_DEFINE_EXTENDED_ERROR(), as it + * already takes care of getting the private data from @error. + * + * Since: 2.68 + */ +typedef void (*GErrorClearFunc) (GError *error); + +GLIB_AVAILABLE_IN_2_68 +GQuark g_error_domain_register_static (const char *error_type_name, + gsize error_type_private_size, + GErrorInitFunc error_type_init, + GErrorCopyFunc error_type_copy, + GErrorClearFunc error_type_clear); + +GLIB_AVAILABLE_IN_2_68 +GQuark g_error_domain_register (const char *error_type_name, + gsize error_type_private_size, + GErrorInitFunc error_type_init, + GErrorCopyFunc error_type_copy, + GErrorClearFunc error_type_clear); + +GLIB_AVAILABLE_IN_ALL +GError* g_error_new (GQuark domain, + gint code, + const gchar *format, + ...) G_GNUC_PRINTF (3, 4); + +GLIB_AVAILABLE_IN_ALL +GError* g_error_new_literal (GQuark domain, + gint code, + const gchar *message); +GLIB_AVAILABLE_IN_ALL +GError* g_error_new_valist (GQuark domain, + gint code, + const gchar *format, + va_list args) G_GNUC_PRINTF(3, 0); + +GLIB_AVAILABLE_IN_ALL +void g_error_free (GError *error); +GLIB_AVAILABLE_IN_ALL +GError* g_error_copy (const GError *error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_error_matches (const GError *error, + GQuark domain, + gint code); + +/* if (err) *err = g_error_new(domain, code, format, ...), also has + * some sanity checks. + */ +GLIB_AVAILABLE_IN_ALL +void g_set_error (GError **err, + GQuark domain, + gint code, + const gchar *format, + ...) G_GNUC_PRINTF (4, 5); + +GLIB_AVAILABLE_IN_ALL +void g_set_error_literal (GError **err, + GQuark domain, + gint code, + const gchar *message); + +/* if (dest) *dest = src; also has some sanity checks. + */ +GLIB_AVAILABLE_IN_ALL +void g_propagate_error (GError **dest, + GError *src); + +/* if (err && *err) { g_error_free(*err); *err = NULL; } */ +GLIB_AVAILABLE_IN_ALL +void g_clear_error (GError **err); + +/* if (err) prefix the formatted string to the ->message */ +GLIB_AVAILABLE_IN_ALL +void g_prefix_error (GError **err, + const gchar *format, + ...) G_GNUC_PRINTF (2, 3); + +/* if (err) prefix the string to the ->message */ +GLIB_AVAILABLE_IN_2_70 +void g_prefix_error_literal (GError **err, + const gchar *prefix); + +/* g_propagate_error then g_error_prefix on dest */ +GLIB_AVAILABLE_IN_ALL +void g_propagate_prefixed_error (GError **dest, + GError *src, + const gchar *format, + ...) G_GNUC_PRINTF (3, 4); + +G_END_DECLS + +#endif /* __G_ERROR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gfileutils.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gfileutils.h new file mode 100644 index 0000000..c056dd0 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gfileutils.h @@ -0,0 +1,223 @@ +/* gfileutils.h - File utility functions + * + * Copyright 2000 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_FILEUTILS_H__ +#define __G_FILEUTILS_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +#define G_FILE_ERROR g_file_error_quark () + +typedef enum +{ + G_FILE_ERROR_EXIST, + G_FILE_ERROR_ISDIR, + G_FILE_ERROR_ACCES, + G_FILE_ERROR_NAMETOOLONG, + G_FILE_ERROR_NOENT, + G_FILE_ERROR_NOTDIR, + G_FILE_ERROR_NXIO, + G_FILE_ERROR_NODEV, + G_FILE_ERROR_ROFS, + G_FILE_ERROR_TXTBSY, + G_FILE_ERROR_FAULT, + G_FILE_ERROR_LOOP, + G_FILE_ERROR_NOSPC, + G_FILE_ERROR_NOMEM, + G_FILE_ERROR_MFILE, + G_FILE_ERROR_NFILE, + G_FILE_ERROR_BADF, + G_FILE_ERROR_INVAL, + G_FILE_ERROR_PIPE, + G_FILE_ERROR_AGAIN, + G_FILE_ERROR_INTR, + G_FILE_ERROR_IO, + G_FILE_ERROR_PERM, + G_FILE_ERROR_NOSYS, + G_FILE_ERROR_FAILED +} GFileError; + +/* For backward-compat reasons, these are synced to an old + * anonymous enum in libgnome. But don't use that enum + * in new code. + */ +typedef enum +{ + G_FILE_TEST_IS_REGULAR = 1 << 0, + G_FILE_TEST_IS_SYMLINK = 1 << 1, + G_FILE_TEST_IS_DIR = 1 << 2, + G_FILE_TEST_IS_EXECUTABLE = 1 << 3, + G_FILE_TEST_EXISTS = 1 << 4 +} GFileTest; + +/** + * GFileSetContentsFlags: + * @G_FILE_SET_CONTENTS_NONE: No guarantees about file consistency or durability. + * The most dangerous setting, which is slightly faster than other settings. + * @G_FILE_SET_CONTENTS_CONSISTENT: Guarantee file consistency: after a crash, + * either the old version of the file or the new version of the file will be + * available, but not a mixture. On Unix systems this equates to an `fsync()` + * on the file and use of an atomic `rename()` of the new version of the file + * over the old. + * @G_FILE_SET_CONTENTS_DURABLE: Guarantee file durability: after a crash, the + * new version of the file will be available. On Unix systems this equates to + * an `fsync()` on the file (if %G_FILE_SET_CONTENTS_CONSISTENT is unset), or + * the effects of %G_FILE_SET_CONTENTS_CONSISTENT plus an `fsync()` on the + * directory containing the file after calling `rename()`. + * @G_FILE_SET_CONTENTS_ONLY_EXISTING: Only apply consistency and durability + * guarantees if the file already exists. This may speed up file operations + * if the file doesn’t currently exist, but may result in a corrupted version + * of the new file if the system crashes while writing it. + * + * Flags to pass to g_file_set_contents_full() to affect its safety and + * performance. + * + * Since: 2.66 + */ +typedef enum +{ + G_FILE_SET_CONTENTS_NONE = 0, + G_FILE_SET_CONTENTS_CONSISTENT = 1 << 0, + G_FILE_SET_CONTENTS_DURABLE = 1 << 1, + G_FILE_SET_CONTENTS_ONLY_EXISTING = 1 << 2 +} GFileSetContentsFlags +GLIB_AVAILABLE_ENUMERATOR_IN_2_66; + +GLIB_AVAILABLE_IN_ALL +GQuark g_file_error_quark (void); +/* So other code can generate a GFileError */ +GLIB_AVAILABLE_IN_ALL +GFileError g_file_error_from_errno (gint err_no); + +GLIB_AVAILABLE_IN_ALL +gboolean g_file_test (const gchar *filename, + GFileTest test); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_get_contents (const gchar *filename, + gchar **contents, + gsize *length, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_file_set_contents (const gchar *filename, + const gchar *contents, + gssize length, + GError **error); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_AVAILABLE_IN_2_66 +gboolean g_file_set_contents_full (const gchar *filename, + const gchar *contents, + gssize length, + GFileSetContentsFlags flags, + int mode, + GError **error); +G_GNUC_END_IGNORE_DEPRECATIONS +GLIB_AVAILABLE_IN_ALL +gchar *g_file_read_link (const gchar *filename, + GError **error); + +/* Wrapper / workalike for mkdtemp() */ +GLIB_AVAILABLE_IN_2_30 +gchar *g_mkdtemp (gchar *tmpl); +GLIB_AVAILABLE_IN_2_30 +gchar *g_mkdtemp_full (gchar *tmpl, + gint mode); + +/* Wrapper / workalike for mkstemp() */ +GLIB_AVAILABLE_IN_ALL +gint g_mkstemp (gchar *tmpl); +GLIB_AVAILABLE_IN_ALL +gint g_mkstemp_full (gchar *tmpl, + gint flags, + gint mode); + +/* Wrappers for g_mkstemp and g_mkdtemp() */ +GLIB_AVAILABLE_IN_ALL +gint g_file_open_tmp (const gchar *tmpl, + gchar **name_used, + GError **error); +GLIB_AVAILABLE_IN_2_30 +gchar *g_dir_make_tmp (const gchar *tmpl, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gchar *g_build_path (const gchar *separator, + const gchar *first_element, + ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED; +GLIB_AVAILABLE_IN_ALL +gchar *g_build_pathv (const gchar *separator, + gchar **args) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gchar *g_build_filename (const gchar *first_element, + ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED; +GLIB_AVAILABLE_IN_ALL +gchar *g_build_filenamev (gchar **args) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_2_56 +gchar *g_build_filename_valist (const gchar *first_element, + va_list *args) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gint g_mkdir_with_parents (const gchar *pathname, + gint mode); + +#ifdef G_OS_WIN32 + +/* On Win32, the canonical directory separator is the backslash, and + * the search path separator is the semicolon. Note that also the + * (forward) slash works as directory separator. + */ +#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR || (c) == '/') + +#else /* !G_OS_WIN32 */ + +#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR) + +#endif /* !G_OS_WIN32 */ + +GLIB_AVAILABLE_IN_ALL +gboolean g_path_is_absolute (const gchar *file_name); +GLIB_AVAILABLE_IN_ALL +const gchar *g_path_skip_root (const gchar *file_name); + +GLIB_DEPRECATED_FOR(g_path_get_basename) +const gchar *g_basename (const gchar *file_name); +#define g_dirname g_path_get_dirname GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_path_get_dirname) + +GLIB_AVAILABLE_IN_ALL +gchar *g_get_current_dir (void); +GLIB_AVAILABLE_IN_ALL +gchar *g_path_get_basename (const gchar *file_name) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar *g_path_get_dirname (const gchar *file_name) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_2_58 +gchar *g_canonicalize_filename (const gchar *filename, + const gchar *relative_to) G_GNUC_MALLOC; + +G_END_DECLS + +#endif /* __G_FILEUTILS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/ggettext.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/ggettext.h new file mode 100644 index 0000000..33a1fbe --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/ggettext.h @@ -0,0 +1,65 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_GETTEXT_H__ +#define __G_GETTEXT_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +const gchar *g_strip_context (const gchar *msgid, + const gchar *msgval) G_GNUC_FORMAT(1); + +GLIB_AVAILABLE_IN_ALL +const gchar *g_dgettext (const gchar *domain, + const gchar *msgid) G_GNUC_FORMAT(2); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dcgettext (const gchar *domain, + const gchar *msgid, + gint category) G_GNUC_FORMAT(2); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dngettext (const gchar *domain, + const gchar *msgid, + const gchar *msgid_plural, + gulong n) G_GNUC_FORMAT(3); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dpgettext (const gchar *domain, + const gchar *msgctxtid, + gsize msgidoffset) G_GNUC_FORMAT(2); +GLIB_AVAILABLE_IN_ALL +const gchar *g_dpgettext2 (const gchar *domain, + const gchar *context, + const gchar *msgid) G_GNUC_FORMAT(3); + +G_END_DECLS + +#endif /* __G_GETTEXT_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/ghash.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/ghash.h new file mode 100644 index 0000000..3eb8f3b --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/ghash.h @@ -0,0 +1,206 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_HASH_H__ +#define __G_HASH_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include + +G_BEGIN_DECLS + +typedef struct _GHashTable GHashTable; + +typedef gboolean (*GHRFunc) (gpointer key, + gpointer value, + gpointer user_data); + +typedef struct _GHashTableIter GHashTableIter; + +struct _GHashTableIter +{ + /*< private >*/ + gpointer dummy1; + gpointer dummy2; + gpointer dummy3; + int dummy4; + gboolean dummy5; + gpointer dummy6; +}; + +GLIB_AVAILABLE_IN_ALL +GHashTable* g_hash_table_new (GHashFunc hash_func, + GEqualFunc key_equal_func); +GLIB_AVAILABLE_IN_ALL +GHashTable* g_hash_table_new_full (GHashFunc hash_func, + GEqualFunc key_equal_func, + GDestroyNotify key_destroy_func, + GDestroyNotify value_destroy_func); +GLIB_AVAILABLE_IN_2_72 +GHashTable *g_hash_table_new_similar (GHashTable *other_hash_table); +GLIB_AVAILABLE_IN_ALL +void g_hash_table_destroy (GHashTable *hash_table); +GLIB_AVAILABLE_IN_ALL +gboolean g_hash_table_insert (GHashTable *hash_table, + gpointer key, + gpointer value); +GLIB_AVAILABLE_IN_ALL +gboolean g_hash_table_replace (GHashTable *hash_table, + gpointer key, + gpointer value); +GLIB_AVAILABLE_IN_ALL +gboolean g_hash_table_add (GHashTable *hash_table, + gpointer key); +GLIB_AVAILABLE_IN_ALL +gboolean g_hash_table_remove (GHashTable *hash_table, + gconstpointer key); +GLIB_AVAILABLE_IN_ALL +void g_hash_table_remove_all (GHashTable *hash_table); +GLIB_AVAILABLE_IN_ALL +gboolean g_hash_table_steal (GHashTable *hash_table, + gconstpointer key); +GLIB_AVAILABLE_IN_2_58 +gboolean g_hash_table_steal_extended (GHashTable *hash_table, + gconstpointer lookup_key, + gpointer *stolen_key, + gpointer *stolen_value); +GLIB_AVAILABLE_IN_ALL +void g_hash_table_steal_all (GHashTable *hash_table); +GLIB_AVAILABLE_IN_2_76 +GPtrArray * g_hash_table_steal_all_keys (GHashTable *hash_table); +GLIB_AVAILABLE_IN_2_76 +GPtrArray * g_hash_table_steal_all_values (GHashTable *hash_table); +GLIB_AVAILABLE_IN_ALL +gpointer g_hash_table_lookup (GHashTable *hash_table, + gconstpointer key); +GLIB_AVAILABLE_IN_ALL +gboolean g_hash_table_contains (GHashTable *hash_table, + gconstpointer key); +GLIB_AVAILABLE_IN_ALL +gboolean g_hash_table_lookup_extended (GHashTable *hash_table, + gconstpointer lookup_key, + gpointer *orig_key, + gpointer *value); +GLIB_AVAILABLE_IN_ALL +void g_hash_table_foreach (GHashTable *hash_table, + GHFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gpointer g_hash_table_find (GHashTable *hash_table, + GHRFunc predicate, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +guint g_hash_table_foreach_remove (GHashTable *hash_table, + GHRFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +guint g_hash_table_foreach_steal (GHashTable *hash_table, + GHRFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +guint g_hash_table_size (GHashTable *hash_table); +GLIB_AVAILABLE_IN_ALL +GList * g_hash_table_get_keys (GHashTable *hash_table); +GLIB_AVAILABLE_IN_ALL +GList * g_hash_table_get_values (GHashTable *hash_table); +GLIB_AVAILABLE_IN_2_40 +gpointer * g_hash_table_get_keys_as_array (GHashTable *hash_table, + guint *length); +GLIB_AVAILABLE_IN_2_76 +GPtrArray * g_hash_table_get_keys_as_ptr_array (GHashTable *hash_table); + +GLIB_AVAILABLE_IN_2_76 +GPtrArray * g_hash_table_get_values_as_ptr_array (GHashTable *hash_table); + +GLIB_AVAILABLE_IN_ALL +void g_hash_table_iter_init (GHashTableIter *iter, + GHashTable *hash_table); +GLIB_AVAILABLE_IN_ALL +gboolean g_hash_table_iter_next (GHashTableIter *iter, + gpointer *key, + gpointer *value); +GLIB_AVAILABLE_IN_ALL +GHashTable* g_hash_table_iter_get_hash_table (GHashTableIter *iter); +GLIB_AVAILABLE_IN_ALL +void g_hash_table_iter_remove (GHashTableIter *iter); +GLIB_AVAILABLE_IN_2_30 +void g_hash_table_iter_replace (GHashTableIter *iter, + gpointer value); +GLIB_AVAILABLE_IN_ALL +void g_hash_table_iter_steal (GHashTableIter *iter); + +GLIB_AVAILABLE_IN_ALL +GHashTable* g_hash_table_ref (GHashTable *hash_table); +GLIB_AVAILABLE_IN_ALL +void g_hash_table_unref (GHashTable *hash_table); + +#define g_hash_table_freeze(hash_table) ((void)0) GLIB_DEPRECATED_MACRO_IN_2_26 +#define g_hash_table_thaw(hash_table) ((void)0) GLIB_DEPRECATED_MACRO_IN_2_26 + +/* Hash Functions + */ +GLIB_AVAILABLE_IN_ALL +gboolean g_str_equal (gconstpointer v1, + gconstpointer v2); + +/* Macro for optimization in the case it is not used as callback function */ +#define g_str_equal(v1, v2) (strcmp ((const char *) (v1), (const char *) (v2)) == 0) + +GLIB_AVAILABLE_IN_ALL +guint g_str_hash (gconstpointer v); + +GLIB_AVAILABLE_IN_ALL +gboolean g_int_equal (gconstpointer v1, + gconstpointer v2); +GLIB_AVAILABLE_IN_ALL +guint g_int_hash (gconstpointer v); + +GLIB_AVAILABLE_IN_ALL +gboolean g_int64_equal (gconstpointer v1, + gconstpointer v2); +GLIB_AVAILABLE_IN_ALL +guint g_int64_hash (gconstpointer v); + +GLIB_AVAILABLE_IN_ALL +gboolean g_double_equal (gconstpointer v1, + gconstpointer v2); +GLIB_AVAILABLE_IN_ALL +guint g_double_hash (gconstpointer v); + +GLIB_AVAILABLE_IN_ALL +guint g_direct_hash (gconstpointer v) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_direct_equal (gconstpointer v1, + gconstpointer v2) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __G_HASH_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/ghmac.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/ghmac.h new file mode 100644 index 0000000..346b451 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/ghmac.h @@ -0,0 +1,85 @@ +/* ghmac.h - secure data hashing + * + * Copyright (C) 2011 Stef Walter + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_HMAC_H__ +#define __G_HMAC_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include "gchecksum.h" + +G_BEGIN_DECLS + +/** + * GHmac: + * + * An opaque structure representing a HMAC operation. + * To create a new GHmac, use g_hmac_new(). To free + * a GHmac, use g_hmac_unref(). + * + * Since: 2.30 + */ +typedef struct _GHmac GHmac; + +GLIB_AVAILABLE_IN_2_30 +GHmac * g_hmac_new (GChecksumType digest_type, + const guchar *key, + gsize key_len); +GLIB_AVAILABLE_IN_2_30 +GHmac * g_hmac_copy (const GHmac *hmac); +GLIB_AVAILABLE_IN_2_30 +GHmac * g_hmac_ref (GHmac *hmac); +GLIB_AVAILABLE_IN_2_30 +void g_hmac_unref (GHmac *hmac); +GLIB_AVAILABLE_IN_2_30 +void g_hmac_update (GHmac *hmac, + const guchar *data, + gssize length); +GLIB_AVAILABLE_IN_2_30 +const gchar * g_hmac_get_string (GHmac *hmac); +GLIB_AVAILABLE_IN_2_30 +void g_hmac_get_digest (GHmac *hmac, + guint8 *buffer, + gsize *digest_len); + +GLIB_AVAILABLE_IN_2_30 +gchar *g_compute_hmac_for_data (GChecksumType digest_type, + const guchar *key, + gsize key_len, + const guchar *data, + gsize length); +GLIB_AVAILABLE_IN_2_30 +gchar *g_compute_hmac_for_string (GChecksumType digest_type, + const guchar *key, + gsize key_len, + const gchar *str, + gssize length); +GLIB_AVAILABLE_IN_2_50 +gchar *g_compute_hmac_for_bytes (GChecksumType digest_type, + GBytes *key, + GBytes *data); + + +G_END_DECLS + +#endif /* __G_CHECKSUM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/ghook.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/ghook.h new file mode 100644 index 0000000..1bd8582 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/ghook.h @@ -0,0 +1,204 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_HOOK_H__ +#define __G_HOOK_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + + +/* --- typedefs --- */ +typedef struct _GHook GHook; +typedef struct _GHookList GHookList; + +typedef gint (*GHookCompareFunc) (GHook *new_hook, + GHook *sibling); +typedef gboolean (*GHookFindFunc) (GHook *hook, + gpointer data); +typedef void (*GHookMarshaller) (GHook *hook, + gpointer marshal_data); +typedef gboolean (*GHookCheckMarshaller) (GHook *hook, + gpointer marshal_data); +typedef void (*GHookFunc) (gpointer data); +typedef gboolean (*GHookCheckFunc) (gpointer data); +typedef void (*GHookFinalizeFunc) (GHookList *hook_list, + GHook *hook); +typedef enum +{ + G_HOOK_FLAG_ACTIVE = 1 << 0, + G_HOOK_FLAG_IN_CALL = 1 << 1, + G_HOOK_FLAG_MASK = 0x0f +} GHookFlagMask; +#define G_HOOK_FLAG_USER_SHIFT (4) + + +/* --- structures --- */ +struct _GHookList +{ + gulong seq_id; + guint hook_size : 16; + guint is_setup : 1; + GHook *hooks; + gpointer dummy3; + GHookFinalizeFunc finalize_hook; + gpointer dummy[2]; +}; +struct _GHook +{ + gpointer data; + GHook *next; + GHook *prev; + guint ref_count; + gulong hook_id; + guint flags; + gpointer func; + GDestroyNotify destroy; +}; + + +/* --- macros --- */ +#define G_HOOK(hook) ((GHook*) (hook)) +#define G_HOOK_FLAGS(hook) (G_HOOK (hook)->flags) +#define G_HOOK_ACTIVE(hook) ((G_HOOK_FLAGS (hook) & \ + G_HOOK_FLAG_ACTIVE) != 0) +#define G_HOOK_IN_CALL(hook) ((G_HOOK_FLAGS (hook) & \ + G_HOOK_FLAG_IN_CALL) != 0) +#define G_HOOK_IS_VALID(hook) (G_HOOK (hook)->hook_id != 0 && \ + (G_HOOK_FLAGS (hook) & \ + G_HOOK_FLAG_ACTIVE)) +#define G_HOOK_IS_UNLINKED(hook) (G_HOOK (hook)->next == NULL && \ + G_HOOK (hook)->prev == NULL && \ + G_HOOK (hook)->hook_id == 0 && \ + G_HOOK (hook)->ref_count == 0) + + +/* --- prototypes --- */ +/* callback maintenance functions */ +GLIB_AVAILABLE_IN_ALL +void g_hook_list_init (GHookList *hook_list, + guint hook_size); +GLIB_AVAILABLE_IN_ALL +void g_hook_list_clear (GHookList *hook_list); +GLIB_AVAILABLE_IN_ALL +GHook* g_hook_alloc (GHookList *hook_list); +GLIB_AVAILABLE_IN_ALL +void g_hook_free (GHookList *hook_list, + GHook *hook); +GLIB_AVAILABLE_IN_ALL +GHook * g_hook_ref (GHookList *hook_list, + GHook *hook); +GLIB_AVAILABLE_IN_ALL +void g_hook_unref (GHookList *hook_list, + GHook *hook); +GLIB_AVAILABLE_IN_ALL +gboolean g_hook_destroy (GHookList *hook_list, + gulong hook_id); +GLIB_AVAILABLE_IN_ALL +void g_hook_destroy_link (GHookList *hook_list, + GHook *hook); +GLIB_AVAILABLE_IN_ALL +void g_hook_prepend (GHookList *hook_list, + GHook *hook); +GLIB_AVAILABLE_IN_ALL +void g_hook_insert_before (GHookList *hook_list, + GHook *sibling, + GHook *hook); +GLIB_AVAILABLE_IN_ALL +void g_hook_insert_sorted (GHookList *hook_list, + GHook *hook, + GHookCompareFunc func); +GLIB_AVAILABLE_IN_ALL +GHook* g_hook_get (GHookList *hook_list, + gulong hook_id); +GLIB_AVAILABLE_IN_ALL +GHook* g_hook_find (GHookList *hook_list, + gboolean need_valids, + GHookFindFunc func, + gpointer data); +GLIB_AVAILABLE_IN_ALL +GHook* g_hook_find_data (GHookList *hook_list, + gboolean need_valids, + gpointer data); +GLIB_AVAILABLE_IN_ALL +GHook* g_hook_find_func (GHookList *hook_list, + gboolean need_valids, + gpointer func); +GLIB_AVAILABLE_IN_ALL +GHook* g_hook_find_func_data (GHookList *hook_list, + gboolean need_valids, + gpointer func, + gpointer data); +/* return the first valid hook, and increment its reference count */ +GLIB_AVAILABLE_IN_ALL +GHook* g_hook_first_valid (GHookList *hook_list, + gboolean may_be_in_call); +/* return the next valid hook with incremented reference count, and + * decrement the reference count of the original hook + */ +GLIB_AVAILABLE_IN_ALL +GHook* g_hook_next_valid (GHookList *hook_list, + GHook *hook, + gboolean may_be_in_call); +/* GHookCompareFunc implementation to insert hooks sorted by their id */ +GLIB_AVAILABLE_IN_ALL +gint g_hook_compare_ids (GHook *new_hook, + GHook *sibling); +/* convenience macros */ +#define g_hook_append( hook_list, hook ) \ + g_hook_insert_before ((hook_list), NULL, (hook)) +/* invoke all valid hooks with the (*GHookFunc) signature. + */ +GLIB_AVAILABLE_IN_ALL +void g_hook_list_invoke (GHookList *hook_list, + gboolean may_recurse); +/* invoke all valid hooks with the (*GHookCheckFunc) signature, + * and destroy the hook if FALSE is returned. + */ +GLIB_AVAILABLE_IN_ALL +void g_hook_list_invoke_check (GHookList *hook_list, + gboolean may_recurse); +/* invoke a marshaller on all valid hooks. + */ +GLIB_AVAILABLE_IN_ALL +void g_hook_list_marshal (GHookList *hook_list, + gboolean may_recurse, + GHookMarshaller marshaller, + gpointer marshal_data); +GLIB_AVAILABLE_IN_ALL +void g_hook_list_marshal_check (GHookList *hook_list, + gboolean may_recurse, + GHookCheckMarshaller marshaller, + gpointer marshal_data); + +G_END_DECLS + +#endif /* __G_HOOK_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/ghostutils.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/ghostutils.h new file mode 100644 index 0000000..6f35097 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/ghostutils.h @@ -0,0 +1,45 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 2008 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_HOST_UTILS_H__ +#define __G_HOST_UTILS_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +gboolean g_hostname_is_non_ascii (const gchar *hostname); +GLIB_AVAILABLE_IN_ALL +gboolean g_hostname_is_ascii_encoded (const gchar *hostname); +GLIB_AVAILABLE_IN_ALL +gboolean g_hostname_is_ip_address (const gchar *hostname); + +GLIB_AVAILABLE_IN_ALL +gchar *g_hostname_to_ascii (const gchar *hostname); +GLIB_AVAILABLE_IN_ALL +gchar *g_hostname_to_unicode (const gchar *hostname); + +G_END_DECLS + +#endif /* __G_HOST_UTILS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gi18n-lib.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gi18n-lib.h new file mode 100644 index 0000000..fe9e79d --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gi18n-lib.h @@ -0,0 +1,38 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997, 2002 Peter Mattis, Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef __G_I18N_LIB_H__ +#define __G_I18N_LIB_H__ + +#include + +#include +#include + +#ifndef GETTEXT_PACKAGE +#error You must define GETTEXT_PACKAGE before including gi18n-lib.h. Did you forget to include config.h? +#endif + +#define _(String) ((char *) g_dgettext (GETTEXT_PACKAGE, String)) +#define Q_(String) g_dpgettext (GETTEXT_PACKAGE, String, 0) +#define N_(String) (String) +#define C_(Context,String) g_dpgettext (GETTEXT_PACKAGE, Context "\004" String, strlen (Context) + 1) +#define NC_(Context, String) (String) + +#endif /* __G_I18N_LIB_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gi18n.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gi18n.h new file mode 100644 index 0000000..dbb2cb3 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gi18n.h @@ -0,0 +1,34 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997, 2002 Peter Mattis, Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef __G_I18N_H__ +#define __G_I18N_H__ + +#include + +#include +#include + +#define _(String) gettext (String) +#define Q_(String) g_dpgettext (NULL, String, 0) +#define N_(String) (String) +#define C_(Context,String) g_dpgettext (NULL, Context "\004" String, strlen (Context) + 1) +#define NC_(Context, String) (String) + +#endif /* __G_I18N_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/giochannel.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/giochannel.h new file mode 100644 index 0000000..913019c --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/giochannel.h @@ -0,0 +1,407 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_IOCHANNEL_H__ +#define __G_IOCHANNEL_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include + +G_BEGIN_DECLS + +/* GIOChannel + */ + +typedef struct _GIOChannel GIOChannel; +typedef struct _GIOFuncs GIOFuncs; + +typedef enum +{ + G_IO_ERROR_NONE, + G_IO_ERROR_AGAIN, + G_IO_ERROR_INVAL, + G_IO_ERROR_UNKNOWN +} GIOError; + +#define G_IO_CHANNEL_ERROR g_io_channel_error_quark() + +typedef enum +{ + /* Derived from errno */ + G_IO_CHANNEL_ERROR_FBIG, + G_IO_CHANNEL_ERROR_INVAL, + G_IO_CHANNEL_ERROR_IO, + G_IO_CHANNEL_ERROR_ISDIR, + G_IO_CHANNEL_ERROR_NOSPC, + G_IO_CHANNEL_ERROR_NXIO, + G_IO_CHANNEL_ERROR_OVERFLOW, + G_IO_CHANNEL_ERROR_PIPE, + /* Other */ + G_IO_CHANNEL_ERROR_FAILED +} GIOChannelError; + +typedef enum +{ + G_IO_STATUS_ERROR, + G_IO_STATUS_NORMAL, + G_IO_STATUS_EOF, + G_IO_STATUS_AGAIN +} GIOStatus; + +typedef enum +{ + G_SEEK_CUR, + G_SEEK_SET, + G_SEEK_END +} GSeekType; + +typedef enum +{ + G_IO_FLAG_NONE GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0, + G_IO_FLAG_APPEND = 1 << 0, + G_IO_FLAG_NONBLOCK = 1 << 1, + G_IO_FLAG_IS_READABLE = 1 << 2, /* Read only flag */ + G_IO_FLAG_IS_WRITABLE = 1 << 3, /* Read only flag */ + G_IO_FLAG_IS_WRITEABLE = 1 << 3, /* Misspelling in 2.29.10 and earlier */ + G_IO_FLAG_IS_SEEKABLE = 1 << 4, /* Read only flag */ + G_IO_FLAG_MASK = (1 << 5) - 1, + G_IO_FLAG_GET_MASK = G_IO_FLAG_MASK, + G_IO_FLAG_SET_MASK = G_IO_FLAG_APPEND | G_IO_FLAG_NONBLOCK +} GIOFlags; + +struct _GIOChannel +{ + /*< private >*/ + gint ref_count; + GIOFuncs *funcs; + + gchar *encoding; + GIConv read_cd; + GIConv write_cd; + gchar *line_term; /* String which indicates the end of a line of text */ + guint line_term_len; /* So we can have null in the line term */ + + gsize buf_size; + GString *read_buf; /* Raw data from the channel */ + GString *encoded_read_buf; /* Channel data converted to UTF-8 */ + GString *write_buf; /* Data ready to be written to the file */ + gchar partial_write_buf[6]; /* UTF-8 partial characters, null terminated */ + + /* Group the flags together, immediately after partial_write_buf, to save memory */ + + guint use_buffer : 1; /* The encoding uses the buffers */ + guint do_encode : 1; /* The encoding uses the GIConv coverters */ + guint close_on_unref : 1; /* Close the channel on final unref */ + guint is_readable : 1; /* Cached GIOFlag */ + guint is_writeable : 1; /* ditto */ + guint is_seekable : 1; /* ditto */ + + gpointer reserved1; + gpointer reserved2; +}; + +typedef gboolean (*GIOFunc) (GIOChannel *source, + GIOCondition condition, + gpointer data); +struct _GIOFuncs +{ + GIOStatus (*io_read) (GIOChannel *channel, + gchar *buf, + gsize count, + gsize *bytes_read, + GError **err); + GIOStatus (*io_write) (GIOChannel *channel, + const gchar *buf, + gsize count, + gsize *bytes_written, + GError **err); + GIOStatus (*io_seek) (GIOChannel *channel, + gint64 offset, + GSeekType type, + GError **err); + GIOStatus (*io_close) (GIOChannel *channel, + GError **err); + GSource* (*io_create_watch) (GIOChannel *channel, + GIOCondition condition); + void (*io_free) (GIOChannel *channel); + GIOStatus (*io_set_flags) (GIOChannel *channel, + GIOFlags flags, + GError **err); + GIOFlags (*io_get_flags) (GIOChannel *channel); +}; + +GLIB_AVAILABLE_IN_ALL +void g_io_channel_init (GIOChannel *channel); +GLIB_AVAILABLE_IN_ALL +GIOChannel *g_io_channel_ref (GIOChannel *channel); +GLIB_AVAILABLE_IN_ALL +void g_io_channel_unref (GIOChannel *channel); + +GLIB_DEPRECATED_FOR(g_io_channel_read_chars) +GIOError g_io_channel_read (GIOChannel *channel, + gchar *buf, + gsize count, + gsize *bytes_read); + +GLIB_DEPRECATED_FOR(g_io_channel_write_chars) +GIOError g_io_channel_write (GIOChannel *channel, + const gchar *buf, + gsize count, + gsize *bytes_written); + +GLIB_DEPRECATED_FOR(g_io_channel_seek_position) +GIOError g_io_channel_seek (GIOChannel *channel, + gint64 offset, + GSeekType type); + +GLIB_DEPRECATED_FOR(g_io_channel_shutdown) +void g_io_channel_close (GIOChannel *channel); + +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_shutdown (GIOChannel *channel, + gboolean flush, + GError **err); +GLIB_AVAILABLE_IN_ALL +guint g_io_add_watch_full (GIOChannel *channel, + gint priority, + GIOCondition condition, + GIOFunc func, + gpointer user_data, + GDestroyNotify notify); +GLIB_AVAILABLE_IN_ALL +GSource * g_io_create_watch (GIOChannel *channel, + GIOCondition condition); +GLIB_AVAILABLE_IN_ALL +guint g_io_add_watch (GIOChannel *channel, + GIOCondition condition, + GIOFunc func, + gpointer user_data); + +/* character encoding conversion involved functions. + */ + +GLIB_AVAILABLE_IN_ALL +void g_io_channel_set_buffer_size (GIOChannel *channel, + gsize size); +GLIB_AVAILABLE_IN_ALL +gsize g_io_channel_get_buffer_size (GIOChannel *channel); +GLIB_AVAILABLE_IN_ALL +GIOCondition g_io_channel_get_buffer_condition (GIOChannel *channel); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_set_flags (GIOChannel *channel, + GIOFlags flags, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOFlags g_io_channel_get_flags (GIOChannel *channel); +GLIB_AVAILABLE_IN_ALL +void g_io_channel_set_line_term (GIOChannel *channel, + const gchar *line_term, + gint length); +GLIB_AVAILABLE_IN_ALL +const gchar * g_io_channel_get_line_term (GIOChannel *channel, + gint *length); +GLIB_AVAILABLE_IN_ALL +void g_io_channel_set_buffered (GIOChannel *channel, + gboolean buffered); +GLIB_AVAILABLE_IN_ALL +gboolean g_io_channel_get_buffered (GIOChannel *channel); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_set_encoding (GIOChannel *channel, + const gchar *encoding, + GError **error); +GLIB_AVAILABLE_IN_ALL +const gchar * g_io_channel_get_encoding (GIOChannel *channel); +GLIB_AVAILABLE_IN_ALL +void g_io_channel_set_close_on_unref (GIOChannel *channel, + gboolean do_close); +GLIB_AVAILABLE_IN_ALL +gboolean g_io_channel_get_close_on_unref (GIOChannel *channel); + + +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_flush (GIOChannel *channel, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_read_line (GIOChannel *channel, + gchar **str_return, + gsize *length, + gsize *terminator_pos, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_read_line_string (GIOChannel *channel, + GString *buffer, + gsize *terminator_pos, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_read_to_end (GIOChannel *channel, + gchar **str_return, + gsize *length, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_read_chars (GIOChannel *channel, + gchar *buf, + gsize count, + gsize *bytes_read, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_read_unichar (GIOChannel *channel, + gunichar *thechar, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_write_chars (GIOChannel *channel, + const gchar *buf, + gssize count, + gsize *bytes_written, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_write_unichar (GIOChannel *channel, + gunichar thechar, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOStatus g_io_channel_seek_position (GIOChannel *channel, + gint64 offset, + GSeekType type, + GError **error); +GLIB_AVAILABLE_IN_ALL +GIOChannel* g_io_channel_new_file (const gchar *filename, + const gchar *mode, + GError **error); + +/* Error handling */ + +GLIB_AVAILABLE_IN_ALL +GQuark g_io_channel_error_quark (void); +GLIB_AVAILABLE_IN_ALL +GIOChannelError g_io_channel_error_from_errno (gint en); + +/* On Unix, IO channels created with this function for any file + * descriptor or socket. + * + * On Win32, this can be used either for files opened with the MSVCRT + * (the Microsoft run-time C library) _open() or _pipe, including file + * descriptors 0, 1 and 2 (corresponding to stdin, stdout and stderr), + * or for Winsock SOCKETs. If the parameter is a legal file + * descriptor, it is assumed to be such, otherwise it should be a + * SOCKET. This relies on SOCKETs and file descriptors not + * overlapping. If you want to be certain, call either + * g_io_channel_win32_new_fd() or g_io_channel_win32_new_socket() + * instead as appropriate. + * + * The term file descriptor as used in the context of Win32 refers to + * the emulated Unix-like file descriptors MSVCRT provides. The native + * corresponding concept is file HANDLE. There isn't as of yet a way to + * get GIOChannels for Win32 file HANDLEs. + */ +GLIB_AVAILABLE_IN_ALL +GIOChannel* g_io_channel_unix_new (int fd); +GLIB_AVAILABLE_IN_ALL +gint g_io_channel_unix_get_fd (GIOChannel *channel); + + +/* Hook for GClosure / GSource integration. Don't touch */ +GLIB_VAR GSourceFuncs g_io_watch_funcs; + +#ifdef G_OS_WIN32 + +/* You can use this "pseudo file descriptor" in a GPollFD to add + * polling for Windows messages. GTK applications should not do that. + */ + +#define G_WIN32_MSG_HANDLE 19981206 + +/* Use this to get a GPollFD from a GIOChannel, so that you can call + * g_io_channel_win32_poll(). After calling this you should only use + * g_io_channel_read() to read from the GIOChannel, i.e. never read() + * from the underlying file descriptor. For SOCKETs, it is possible to call + * recv(). + */ +GLIB_AVAILABLE_IN_ALL +void g_io_channel_win32_make_pollfd (GIOChannel *channel, + GIOCondition condition, + GPollFD *fd); + +/* This can be used to wait until at least one of the channels is readable. + * On Unix you would do a select() on the file descriptors of the channels. + */ +GLIB_AVAILABLE_IN_ALL +gint g_io_channel_win32_poll (GPollFD *fds, + gint n_fds, + gint timeout_); + +/* Create an IO channel for Windows messages for window handle hwnd. */ +#if GLIB_SIZEOF_VOID_P == 8 +/* We use gsize here so that it is still an integer type and not a + * pointer, like the guint in the traditional prototype. We can't use + * intptr_t as that is not portable enough. + */ +GLIB_AVAILABLE_IN_ALL +GIOChannel *g_io_channel_win32_new_messages (gsize hwnd); +#else +GLIB_AVAILABLE_IN_ALL +GIOChannel *g_io_channel_win32_new_messages (guint hwnd); +#endif + +/* Create an IO channel for C runtime (emulated Unix-like) file + * descriptors. After calling g_io_add_watch() on a IO channel + * returned by this function, you shouldn't call read() on the file + * descriptor. This is because adding polling for a file descriptor is + * implemented on Win32 by starting a thread that sits blocked in a + * read() from the file descriptor most of the time. All reads from + * the file descriptor should be done by this internal GLib + * thread. Your code should call only g_io_channel_read_chars(). + */ +GLIB_AVAILABLE_IN_ALL +GIOChannel* g_io_channel_win32_new_fd (gint fd); + +/* Get the C runtime file descriptor of a channel. */ +GLIB_AVAILABLE_IN_ALL +gint g_io_channel_win32_get_fd (GIOChannel *channel); + +/* Create an IO channel for a winsock socket. The parameter should be + * a SOCKET. Contrary to IO channels for file descriptors (on *Win32), + * you can use normal recv() or recvfrom() on sockets even if GLib + * is polling them. + */ +GLIB_AVAILABLE_IN_ALL +GIOChannel *g_io_channel_win32_new_socket (gint socket); + +GLIB_DEPRECATED_FOR(g_io_channel_win32_new_socket) +GIOChannel *g_io_channel_win32_new_stream_socket (gint socket); + +GLIB_AVAILABLE_IN_ALL +void g_io_channel_win32_set_debug (GIOChannel *channel, + gboolean flag); + +#endif + +G_END_DECLS + +#endif /* __G_IOCHANNEL_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gkeyfile.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gkeyfile.h new file mode 100644 index 0000000..9d026d6 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gkeyfile.h @@ -0,0 +1,332 @@ +/* gkeyfile.h - desktop entry file parser + * + * Copyright 2004 Red Hat, Inc. + * + * Ray Strode + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_KEY_FILE_H__ +#define __G_KEY_FILE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +typedef enum +{ + G_KEY_FILE_ERROR_UNKNOWN_ENCODING, + G_KEY_FILE_ERROR_PARSE, + G_KEY_FILE_ERROR_NOT_FOUND, + G_KEY_FILE_ERROR_KEY_NOT_FOUND, + G_KEY_FILE_ERROR_GROUP_NOT_FOUND, + G_KEY_FILE_ERROR_INVALID_VALUE +} GKeyFileError; + +#define G_KEY_FILE_ERROR g_key_file_error_quark() + +GLIB_AVAILABLE_IN_ALL +GQuark g_key_file_error_quark (void); + +typedef struct _GKeyFile GKeyFile; + +typedef enum +{ + G_KEY_FILE_NONE = 0, + G_KEY_FILE_KEEP_COMMENTS = 1 << 0, + G_KEY_FILE_KEEP_TRANSLATIONS = 1 << 1 +} GKeyFileFlags; + +GLIB_AVAILABLE_IN_ALL +GKeyFile *g_key_file_new (void); +GLIB_AVAILABLE_IN_ALL +GKeyFile *g_key_file_ref (GKeyFile *key_file); +GLIB_AVAILABLE_IN_ALL +void g_key_file_unref (GKeyFile *key_file); +GLIB_AVAILABLE_IN_ALL +void g_key_file_free (GKeyFile *key_file); +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_list_separator (GKeyFile *key_file, + gchar separator); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_load_from_file (GKeyFile *key_file, + const gchar *file, + GKeyFileFlags flags, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_load_from_data (GKeyFile *key_file, + const gchar *data, + gsize length, + GKeyFileFlags flags, + GError **error); +GLIB_AVAILABLE_IN_2_50 +gboolean g_key_file_load_from_bytes (GKeyFile *key_file, + GBytes *bytes, + GKeyFileFlags flags, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_load_from_dirs (GKeyFile *key_file, + const gchar *file, + const gchar **search_dirs, + gchar **full_path, + GKeyFileFlags flags, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_load_from_data_dirs (GKeyFile *key_file, + const gchar *file, + gchar **full_path, + GKeyFileFlags flags, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar *g_key_file_to_data (GKeyFile *key_file, + gsize *length, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_2_40 +gboolean g_key_file_save_to_file (GKeyFile *key_file, + const gchar *filename, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar *g_key_file_get_start_group (GKeyFile *key_file) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar **g_key_file_get_groups (GKeyFile *key_file, + gsize *length); +GLIB_AVAILABLE_IN_ALL +gchar **g_key_file_get_keys (GKeyFile *key_file, + const gchar *group_name, + gsize *length, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_has_group (GKeyFile *key_file, + const gchar *group_name); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_has_key (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar *g_key_file_get_value (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_value (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *value); +GLIB_AVAILABLE_IN_ALL +gchar *g_key_file_get_string (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_string (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *string); +GLIB_AVAILABLE_IN_ALL +gchar *g_key_file_get_locale_string (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *locale, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_2_56 +gchar *g_key_file_get_locale_for_key (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *locale) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_locale_string (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *locale, + const gchar *string); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_get_boolean (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_boolean (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gboolean value); +GLIB_AVAILABLE_IN_ALL +gint g_key_file_get_integer (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_integer (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gint value); +GLIB_AVAILABLE_IN_ALL +gint64 g_key_file_get_int64 (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_int64 (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gint64 value); +GLIB_AVAILABLE_IN_ALL +guint64 g_key_file_get_uint64 (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_uint64 (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + guint64 value); +GLIB_AVAILABLE_IN_ALL +gdouble g_key_file_get_double (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_double (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gdouble value); +GLIB_AVAILABLE_IN_ALL +gchar **g_key_file_get_string_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gsize *length, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_string_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar * const list[], + gsize length); +GLIB_AVAILABLE_IN_ALL +gchar **g_key_file_get_locale_string_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *locale, + gsize *length, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_locale_string_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *locale, + const gchar * const list[], + gsize length); +GLIB_AVAILABLE_IN_ALL +gboolean *g_key_file_get_boolean_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gsize *length, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_boolean_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gboolean list[], + gsize length); +GLIB_AVAILABLE_IN_ALL +gint *g_key_file_get_integer_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gsize *length, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_double_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gdouble list[], + gsize length); +GLIB_AVAILABLE_IN_ALL +gdouble *g_key_file_get_double_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gsize *length, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_key_file_set_integer_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gint list[], + gsize length); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_set_comment (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *comment, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar *g_key_file_get_comment (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_remove_comment (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_remove_key (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_key_file_remove_group (GKeyFile *key_file, + const gchar *group_name, + GError **error); + +/* Defines for handling freedesktop.org Desktop files */ +#define G_KEY_FILE_DESKTOP_GROUP "Desktop Entry" + +#define G_KEY_FILE_DESKTOP_KEY_TYPE "Type" +#define G_KEY_FILE_DESKTOP_KEY_VERSION "Version" +#define G_KEY_FILE_DESKTOP_KEY_NAME "Name" +#define G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME "GenericName" +#define G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY "NoDisplay" +#define G_KEY_FILE_DESKTOP_KEY_COMMENT "Comment" +#define G_KEY_FILE_DESKTOP_KEY_ICON "Icon" +#define G_KEY_FILE_DESKTOP_KEY_HIDDEN "Hidden" +#define G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN "OnlyShowIn" +#define G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN "NotShowIn" +#define G_KEY_FILE_DESKTOP_KEY_TRY_EXEC "TryExec" +#define G_KEY_FILE_DESKTOP_KEY_EXEC "Exec" +#define G_KEY_FILE_DESKTOP_KEY_PATH "Path" +#define G_KEY_FILE_DESKTOP_KEY_TERMINAL "Terminal" +#define G_KEY_FILE_DESKTOP_KEY_MIME_TYPE "MimeType" +#define G_KEY_FILE_DESKTOP_KEY_CATEGORIES "Categories" +#define G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY "StartupNotify" +#define G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS "StartupWMClass" +#define G_KEY_FILE_DESKTOP_KEY_URL "URL" +#define G_KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE "DBusActivatable" +#define G_KEY_FILE_DESKTOP_KEY_ACTIONS "Actions" + +#define G_KEY_FILE_DESKTOP_TYPE_APPLICATION "Application" +#define G_KEY_FILE_DESKTOP_TYPE_LINK "Link" +#define G_KEY_FILE_DESKTOP_TYPE_DIRECTORY "Directory" + +G_END_DECLS + +#endif /* __G_KEY_FILE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/glib-autocleanups.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/glib-autocleanups.h new file mode 100644 index 0000000..6adf232 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/glib-autocleanups.h @@ -0,0 +1,107 @@ +/* + * Copyright © 2015 Canonical Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Author: Ryan Lortie + */ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +static inline void +g_autoptr_cleanup_generic_gfree (void *p) +{ + void **pp = (void**)p; + g_free (*pp); +} + +static inline void +g_autoptr_cleanup_gstring_free (GString *string) +{ + if (string) + g_string_free (string, TRUE); +} + +/* Ignore deprecations in case we refer to a type which was added in a more + * recent GLib version than the user’s #GLIB_VERSION_MAX_ALLOWED definition. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + +/* If adding a cleanup here, please also add a test case to + * glib/tests/autoptr.c + */ +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAsyncQueue, g_async_queue_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GBookmarkFile, g_bookmark_file_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GBytes, g_bytes_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GChecksum, g_checksum_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDateTime, g_date_time_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDate, g_date_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDir, g_dir_close) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GError, g_error_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GHashTable, g_hash_table_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GHmac, g_hmac_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GIOChannel, g_io_channel_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GKeyFile, g_key_file_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GList, g_list_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GArray, g_array_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPtrArray, g_ptr_array_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GByteArray, g_byte_array_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMainContext, g_main_context_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMainContextPusher, g_main_context_pusher_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMainLoop, g_main_loop_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSource, g_source_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMappedFile, g_mapped_file_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMarkupParseContext, g_markup_parse_context_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNode, g_node_destroy) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GOptionContext, g_option_context_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GOptionGroup, g_option_group_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPatternSpec, g_pattern_spec_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GQueue, g_queue_free) +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GQueue, g_queue_clear) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GRand, g_rand_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GRegex, g_regex_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMatchInfo, g_match_info_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GScanner, g_scanner_destroy) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSequence, g_sequence_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSList, g_slist_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GString, g_autoptr_cleanup_gstring_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GStringChunk, g_string_chunk_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GStrvBuilder, g_strv_builder_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GThread, g_thread_unref) +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GMutex, g_mutex_clear) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMutexLocker, g_mutex_locker_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GRecMutexLocker, g_rec_mutex_locker_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GRWLockWriterLocker, g_rw_lock_writer_locker_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GRWLockReaderLocker, g_rw_lock_reader_locker_free) +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GCond, g_cond_clear) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTimer, g_timer_destroy) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTimeZone, g_time_zone_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTree, g_tree_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariant, g_variant_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariantBuilder, g_variant_builder_unref) +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GVariantBuilder, g_variant_builder_clear) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariantIter, g_variant_iter_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariantDict, g_variant_dict_unref) +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GVariantDict, g_variant_dict_clear) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariantType, g_variant_type_free) +G_DEFINE_AUTO_CLEANUP_FREE_FUNC(GStrv, g_strfreev, NULL) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GRefString, g_ref_string_release) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUri, g_uri_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (GPathBuf, g_path_buf_free) +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (GPathBuf, g_path_buf_clear) + +G_GNUC_END_IGNORE_DEPRECATIONS diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/glib-typeof.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/glib-typeof.h new file mode 100644 index 0000000..c3519fa --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/glib-typeof.h @@ -0,0 +1,47 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 2021 Iain Lane, Xavier Claessens + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef __GLIB_TYPEOF_H__ +#define __GLIB_TYPEOF_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +/* + * We can only use __typeof__ on GCC >= 4.8, and not when compiling C++. Since + * __typeof__ is used in a few places in GLib, provide a pre-processor symbol + * to factor the check out from callers. + * + * This symbol is private. + */ +#undef glib_typeof +#if !G_CXX_STD_CHECK_VERSION (11) && \ + (G_GNUC_CHECK_VERSION(4, 8) || defined(__clang__)) +#define glib_typeof(t) __typeof__ (t) +#elif G_CXX_STD_CHECK_VERSION (11) && \ + GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_68 +/* C++11 decltype() is close enough for our usage */ +#include +#define glib_typeof(t) typename std::remove_reference::type +#endif + +#endif /* __GLIB_TYPEOF_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/glib-visibility.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/glib-visibility.h new file mode 100644 index 0000000..296c9ab --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/glib-visibility.h @@ -0,0 +1,952 @@ +#pragma once + +#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(GLIB_STATIC_COMPILATION) +# define _GLIB_EXPORT __declspec(dllexport) +# define _GLIB_IMPORT __declspec(dllimport) +#elif __GNUC__ >= 4 +# define _GLIB_EXPORT __attribute__((visibility("default"))) +# define _GLIB_IMPORT +#else +# define _GLIB_EXPORT +# define _GLIB_IMPORT +#endif +#ifdef GLIB_COMPILATION +# define _GLIB_API _GLIB_EXPORT +#else +# define _GLIB_API _GLIB_IMPORT +#endif + +#define _GLIB_EXTERN _GLIB_API extern + +#define GLIB_VAR _GLIB_EXTERN +#define GLIB_AVAILABLE_IN_ALL _GLIB_EXTERN + +#ifdef GLIB_DISABLE_DEPRECATION_WARNINGS +#define GLIB_DEPRECATED _GLIB_EXTERN +#define GLIB_DEPRECATED_FOR(f) _GLIB_EXTERN +#define GLIB_UNAVAILABLE(maj,min) _GLIB_EXTERN +#define GLIB_UNAVAILABLE_STATIC_INLINE(maj,min) +#else +#define GLIB_DEPRECATED G_DEPRECATED _GLIB_EXTERN +#define GLIB_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _GLIB_EXTERN +#define GLIB_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _GLIB_EXTERN +#define GLIB_UNAVAILABLE_STATIC_INLINE(maj,min) G_UNAVAILABLE(maj,min) +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_26 +#define GLIB_DEPRECATED_IN_2_26 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_26_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_26 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_26_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_26 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_26_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_26 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_26_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_26 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_26_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_26 +#define GLIB_DEPRECATED_MACRO_IN_2_26_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_26 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_26_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_26 +#define GLIB_DEPRECATED_TYPE_IN_2_26_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_26 +#define GLIB_AVAILABLE_IN_2_26 GLIB_UNAVAILABLE (2, 26) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_26 GLIB_UNAVAILABLE_STATIC_INLINE (2, 26) +#define GLIB_AVAILABLE_MACRO_IN_2_26 GLIB_UNAVAILABLE_MACRO (2, 26) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_26 GLIB_UNAVAILABLE_ENUMERATOR (2, 26) +#define GLIB_AVAILABLE_TYPE_IN_2_26 GLIB_UNAVAILABLE_TYPE (2, 26) +#else +#define GLIB_AVAILABLE_IN_2_26 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_26 +#define GLIB_AVAILABLE_MACRO_IN_2_26 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_26 +#define GLIB_AVAILABLE_TYPE_IN_2_26 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_28 +#define GLIB_DEPRECATED_IN_2_28 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_28_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_28 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_28_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_28 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_28_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_28 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_28_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_28 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_28_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_28 +#define GLIB_DEPRECATED_MACRO_IN_2_28_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_28 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_28_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_28 +#define GLIB_DEPRECATED_TYPE_IN_2_28_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_28 +#define GLIB_AVAILABLE_IN_2_28 GLIB_UNAVAILABLE (2, 28) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_28 GLIB_UNAVAILABLE_STATIC_INLINE (2, 28) +#define GLIB_AVAILABLE_MACRO_IN_2_28 GLIB_UNAVAILABLE_MACRO (2, 28) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_28 GLIB_UNAVAILABLE_ENUMERATOR (2, 28) +#define GLIB_AVAILABLE_TYPE_IN_2_28 GLIB_UNAVAILABLE_TYPE (2, 28) +#else +#define GLIB_AVAILABLE_IN_2_28 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_28 +#define GLIB_AVAILABLE_MACRO_IN_2_28 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_28 +#define GLIB_AVAILABLE_TYPE_IN_2_28 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_30 +#define GLIB_DEPRECATED_IN_2_30 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_30_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_30 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_30_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_30 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_30_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_30 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_30_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_30 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_30_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_30 +#define GLIB_DEPRECATED_MACRO_IN_2_30_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_30 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_30_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_30 +#define GLIB_DEPRECATED_TYPE_IN_2_30_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_30 +#define GLIB_AVAILABLE_IN_2_30 GLIB_UNAVAILABLE (2, 30) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_30 GLIB_UNAVAILABLE_STATIC_INLINE (2, 30) +#define GLIB_AVAILABLE_MACRO_IN_2_30 GLIB_UNAVAILABLE_MACRO (2, 30) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_30 GLIB_UNAVAILABLE_ENUMERATOR (2, 30) +#define GLIB_AVAILABLE_TYPE_IN_2_30 GLIB_UNAVAILABLE_TYPE (2, 30) +#else +#define GLIB_AVAILABLE_IN_2_30 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_30 +#define GLIB_AVAILABLE_MACRO_IN_2_30 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_30 +#define GLIB_AVAILABLE_TYPE_IN_2_30 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_32 +#define GLIB_DEPRECATED_IN_2_32 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_32_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_32 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_32_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_32 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_32 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_32_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_32 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_32_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_32 +#define GLIB_DEPRECATED_MACRO_IN_2_32_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_32 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_32 +#define GLIB_DEPRECATED_TYPE_IN_2_32_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_32 +#define GLIB_AVAILABLE_IN_2_32 GLIB_UNAVAILABLE (2, 32) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_32 GLIB_UNAVAILABLE_STATIC_INLINE (2, 32) +#define GLIB_AVAILABLE_MACRO_IN_2_32 GLIB_UNAVAILABLE_MACRO (2, 32) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_32 GLIB_UNAVAILABLE_ENUMERATOR (2, 32) +#define GLIB_AVAILABLE_TYPE_IN_2_32 GLIB_UNAVAILABLE_TYPE (2, 32) +#else +#define GLIB_AVAILABLE_IN_2_32 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_32 +#define GLIB_AVAILABLE_MACRO_IN_2_32 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_32 +#define GLIB_AVAILABLE_TYPE_IN_2_32 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_34 +#define GLIB_DEPRECATED_IN_2_34 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_34_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_34 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_34_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_34 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_34_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_34 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_34_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_34 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_34_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_34 +#define GLIB_DEPRECATED_MACRO_IN_2_34_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_34 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_34_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_34 +#define GLIB_DEPRECATED_TYPE_IN_2_34_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_34 +#define GLIB_AVAILABLE_IN_2_34 GLIB_UNAVAILABLE (2, 34) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_34 GLIB_UNAVAILABLE_STATIC_INLINE (2, 34) +#define GLIB_AVAILABLE_MACRO_IN_2_34 GLIB_UNAVAILABLE_MACRO (2, 34) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_34 GLIB_UNAVAILABLE_ENUMERATOR (2, 34) +#define GLIB_AVAILABLE_TYPE_IN_2_34 GLIB_UNAVAILABLE_TYPE (2, 34) +#else +#define GLIB_AVAILABLE_IN_2_34 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_34 +#define GLIB_AVAILABLE_MACRO_IN_2_34 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_34 +#define GLIB_AVAILABLE_TYPE_IN_2_34 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_36 +#define GLIB_DEPRECATED_IN_2_36 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_36_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_36 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_36_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_36 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_36_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_36 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_36_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_36 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_36_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_36 +#define GLIB_DEPRECATED_MACRO_IN_2_36_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_36 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_36_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_36 +#define GLIB_DEPRECATED_TYPE_IN_2_36_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_36 +#define GLIB_AVAILABLE_IN_2_36 GLIB_UNAVAILABLE (2, 36) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_36 GLIB_UNAVAILABLE_STATIC_INLINE (2, 36) +#define GLIB_AVAILABLE_MACRO_IN_2_36 GLIB_UNAVAILABLE_MACRO (2, 36) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_36 GLIB_UNAVAILABLE_ENUMERATOR (2, 36) +#define GLIB_AVAILABLE_TYPE_IN_2_36 GLIB_UNAVAILABLE_TYPE (2, 36) +#else +#define GLIB_AVAILABLE_IN_2_36 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_36 +#define GLIB_AVAILABLE_MACRO_IN_2_36 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_36 +#define GLIB_AVAILABLE_TYPE_IN_2_36 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_38 +#define GLIB_DEPRECATED_IN_2_38 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_38_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_38 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_38_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_38 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_38_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_38 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_38_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_38 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_38_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_38 +#define GLIB_DEPRECATED_MACRO_IN_2_38_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_38 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_38_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_38 +#define GLIB_DEPRECATED_TYPE_IN_2_38_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 +#define GLIB_AVAILABLE_IN_2_38 GLIB_UNAVAILABLE (2, 38) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_38 GLIB_UNAVAILABLE_STATIC_INLINE (2, 38) +#define GLIB_AVAILABLE_MACRO_IN_2_38 GLIB_UNAVAILABLE_MACRO (2, 38) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_38 GLIB_UNAVAILABLE_ENUMERATOR (2, 38) +#define GLIB_AVAILABLE_TYPE_IN_2_38 GLIB_UNAVAILABLE_TYPE (2, 38) +#else +#define GLIB_AVAILABLE_IN_2_38 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_38 +#define GLIB_AVAILABLE_MACRO_IN_2_38 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_38 +#define GLIB_AVAILABLE_TYPE_IN_2_38 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_40 +#define GLIB_DEPRECATED_IN_2_40 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_40_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_40 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_40_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_40 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_40_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_40 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_40_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_40 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_40_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_40 +#define GLIB_DEPRECATED_MACRO_IN_2_40_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_40 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_40_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_40 +#define GLIB_DEPRECATED_TYPE_IN_2_40_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_40 +#define GLIB_AVAILABLE_IN_2_40 GLIB_UNAVAILABLE (2, 40) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_40 GLIB_UNAVAILABLE_STATIC_INLINE (2, 40) +#define GLIB_AVAILABLE_MACRO_IN_2_40 GLIB_UNAVAILABLE_MACRO (2, 40) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_40 GLIB_UNAVAILABLE_ENUMERATOR (2, 40) +#define GLIB_AVAILABLE_TYPE_IN_2_40 GLIB_UNAVAILABLE_TYPE (2, 40) +#else +#define GLIB_AVAILABLE_IN_2_40 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_40 +#define GLIB_AVAILABLE_MACRO_IN_2_40 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_40 +#define GLIB_AVAILABLE_TYPE_IN_2_40 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_42 +#define GLIB_DEPRECATED_IN_2_42 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_42_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_42 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_42_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_42 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_42_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_42 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_42_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_42 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_42_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_42 +#define GLIB_DEPRECATED_MACRO_IN_2_42_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_42 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_42_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_42 +#define GLIB_DEPRECATED_TYPE_IN_2_42_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_42 +#define GLIB_AVAILABLE_IN_2_42 GLIB_UNAVAILABLE (2, 42) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_42 GLIB_UNAVAILABLE_STATIC_INLINE (2, 42) +#define GLIB_AVAILABLE_MACRO_IN_2_42 GLIB_UNAVAILABLE_MACRO (2, 42) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_42 GLIB_UNAVAILABLE_ENUMERATOR (2, 42) +#define GLIB_AVAILABLE_TYPE_IN_2_42 GLIB_UNAVAILABLE_TYPE (2, 42) +#else +#define GLIB_AVAILABLE_IN_2_42 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_42 +#define GLIB_AVAILABLE_MACRO_IN_2_42 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_42 +#define GLIB_AVAILABLE_TYPE_IN_2_42 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_44 +#define GLIB_DEPRECATED_IN_2_44 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_44_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_44 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_44_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_44 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_44_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_44 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_44_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_44 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_44_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_44 +#define GLIB_DEPRECATED_MACRO_IN_2_44_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_44 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_44_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_44 +#define GLIB_DEPRECATED_TYPE_IN_2_44_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_44 +#define GLIB_AVAILABLE_IN_2_44 GLIB_UNAVAILABLE (2, 44) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_44 GLIB_UNAVAILABLE_STATIC_INLINE (2, 44) +#define GLIB_AVAILABLE_MACRO_IN_2_44 GLIB_UNAVAILABLE_MACRO (2, 44) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_44 GLIB_UNAVAILABLE_ENUMERATOR (2, 44) +#define GLIB_AVAILABLE_TYPE_IN_2_44 GLIB_UNAVAILABLE_TYPE (2, 44) +#else +#define GLIB_AVAILABLE_IN_2_44 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_44 +#define GLIB_AVAILABLE_MACRO_IN_2_44 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_44 +#define GLIB_AVAILABLE_TYPE_IN_2_44 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_46 +#define GLIB_DEPRECATED_IN_2_46 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_46_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_46 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_46_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_46 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_46_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_46 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_46_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_46 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_46_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_46 +#define GLIB_DEPRECATED_MACRO_IN_2_46_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_46 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_46_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_46 +#define GLIB_DEPRECATED_TYPE_IN_2_46_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_46 +#define GLIB_AVAILABLE_IN_2_46 GLIB_UNAVAILABLE (2, 46) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_46 GLIB_UNAVAILABLE_STATIC_INLINE (2, 46) +#define GLIB_AVAILABLE_MACRO_IN_2_46 GLIB_UNAVAILABLE_MACRO (2, 46) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_46 GLIB_UNAVAILABLE_ENUMERATOR (2, 46) +#define GLIB_AVAILABLE_TYPE_IN_2_46 GLIB_UNAVAILABLE_TYPE (2, 46) +#else +#define GLIB_AVAILABLE_IN_2_46 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_46 +#define GLIB_AVAILABLE_MACRO_IN_2_46 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_46 +#define GLIB_AVAILABLE_TYPE_IN_2_46 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_48 +#define GLIB_DEPRECATED_IN_2_48 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_48_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_48 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_48_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_48 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_48_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_48 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_48_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_48 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_48_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_48 +#define GLIB_DEPRECATED_MACRO_IN_2_48_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_48 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_48_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_48 +#define GLIB_DEPRECATED_TYPE_IN_2_48_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_48 +#define GLIB_AVAILABLE_IN_2_48 GLIB_UNAVAILABLE (2, 48) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_48 GLIB_UNAVAILABLE_STATIC_INLINE (2, 48) +#define GLIB_AVAILABLE_MACRO_IN_2_48 GLIB_UNAVAILABLE_MACRO (2, 48) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_48 GLIB_UNAVAILABLE_ENUMERATOR (2, 48) +#define GLIB_AVAILABLE_TYPE_IN_2_48 GLIB_UNAVAILABLE_TYPE (2, 48) +#else +#define GLIB_AVAILABLE_IN_2_48 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_48 +#define GLIB_AVAILABLE_MACRO_IN_2_48 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_48 +#define GLIB_AVAILABLE_TYPE_IN_2_48 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_50 +#define GLIB_DEPRECATED_IN_2_50 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_50_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_50 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_50_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_50 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_50_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_50 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_50_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_50 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_50_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_50 +#define GLIB_DEPRECATED_MACRO_IN_2_50_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_50 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_50_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_50 +#define GLIB_DEPRECATED_TYPE_IN_2_50_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_50 +#define GLIB_AVAILABLE_IN_2_50 GLIB_UNAVAILABLE (2, 50) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_50 GLIB_UNAVAILABLE_STATIC_INLINE (2, 50) +#define GLIB_AVAILABLE_MACRO_IN_2_50 GLIB_UNAVAILABLE_MACRO (2, 50) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_50 GLIB_UNAVAILABLE_ENUMERATOR (2, 50) +#define GLIB_AVAILABLE_TYPE_IN_2_50 GLIB_UNAVAILABLE_TYPE (2, 50) +#else +#define GLIB_AVAILABLE_IN_2_50 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_50 +#define GLIB_AVAILABLE_MACRO_IN_2_50 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_50 +#define GLIB_AVAILABLE_TYPE_IN_2_50 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_52 +#define GLIB_DEPRECATED_IN_2_52 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_52_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_52 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_52_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_52 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_52_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_52 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_52_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_52 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_52_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_52 +#define GLIB_DEPRECATED_MACRO_IN_2_52_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_52 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_52_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_52 +#define GLIB_DEPRECATED_TYPE_IN_2_52_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_52 +#define GLIB_AVAILABLE_IN_2_52 GLIB_UNAVAILABLE (2, 52) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_52 GLIB_UNAVAILABLE_STATIC_INLINE (2, 52) +#define GLIB_AVAILABLE_MACRO_IN_2_52 GLIB_UNAVAILABLE_MACRO (2, 52) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_52 GLIB_UNAVAILABLE_ENUMERATOR (2, 52) +#define GLIB_AVAILABLE_TYPE_IN_2_52 GLIB_UNAVAILABLE_TYPE (2, 52) +#else +#define GLIB_AVAILABLE_IN_2_52 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_52 +#define GLIB_AVAILABLE_MACRO_IN_2_52 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_52 +#define GLIB_AVAILABLE_TYPE_IN_2_52 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_54 +#define GLIB_DEPRECATED_IN_2_54 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_54_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_54 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_54_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_54 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_54_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_54 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_54_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_54 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_54_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_54 +#define GLIB_DEPRECATED_MACRO_IN_2_54_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_54 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_54_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_54 +#define GLIB_DEPRECATED_TYPE_IN_2_54_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_54 +#define GLIB_AVAILABLE_IN_2_54 GLIB_UNAVAILABLE (2, 54) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_54 GLIB_UNAVAILABLE_STATIC_INLINE (2, 54) +#define GLIB_AVAILABLE_MACRO_IN_2_54 GLIB_UNAVAILABLE_MACRO (2, 54) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_54 GLIB_UNAVAILABLE_ENUMERATOR (2, 54) +#define GLIB_AVAILABLE_TYPE_IN_2_54 GLIB_UNAVAILABLE_TYPE (2, 54) +#else +#define GLIB_AVAILABLE_IN_2_54 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_54 +#define GLIB_AVAILABLE_MACRO_IN_2_54 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_54 +#define GLIB_AVAILABLE_TYPE_IN_2_54 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_56 +#define GLIB_DEPRECATED_IN_2_56 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_56_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_56 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_56_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_56 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_56_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_56 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_56_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_56 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_56_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_56 +#define GLIB_DEPRECATED_MACRO_IN_2_56_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_56 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_56_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_56 +#define GLIB_DEPRECATED_TYPE_IN_2_56_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_56 +#define GLIB_AVAILABLE_IN_2_56 GLIB_UNAVAILABLE (2, 56) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_56 GLIB_UNAVAILABLE_STATIC_INLINE (2, 56) +#define GLIB_AVAILABLE_MACRO_IN_2_56 GLIB_UNAVAILABLE_MACRO (2, 56) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_56 GLIB_UNAVAILABLE_ENUMERATOR (2, 56) +#define GLIB_AVAILABLE_TYPE_IN_2_56 GLIB_UNAVAILABLE_TYPE (2, 56) +#else +#define GLIB_AVAILABLE_IN_2_56 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_56 +#define GLIB_AVAILABLE_MACRO_IN_2_56 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_56 +#define GLIB_AVAILABLE_TYPE_IN_2_56 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_58 +#define GLIB_DEPRECATED_IN_2_58 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_58_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_58 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_58_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_58 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_58_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_58 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_58_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_58 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_58_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_58 +#define GLIB_DEPRECATED_MACRO_IN_2_58_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_58 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_58_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_58 +#define GLIB_DEPRECATED_TYPE_IN_2_58_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_58 +#define GLIB_AVAILABLE_IN_2_58 GLIB_UNAVAILABLE (2, 58) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_58 GLIB_UNAVAILABLE_STATIC_INLINE (2, 58) +#define GLIB_AVAILABLE_MACRO_IN_2_58 GLIB_UNAVAILABLE_MACRO (2, 58) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_58 GLIB_UNAVAILABLE_ENUMERATOR (2, 58) +#define GLIB_AVAILABLE_TYPE_IN_2_58 GLIB_UNAVAILABLE_TYPE (2, 58) +#else +#define GLIB_AVAILABLE_IN_2_58 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_58 +#define GLIB_AVAILABLE_MACRO_IN_2_58 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_58 +#define GLIB_AVAILABLE_TYPE_IN_2_58 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_60 +#define GLIB_DEPRECATED_IN_2_60 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_60_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_60 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_60_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_60 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_60_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_60 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_60_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_60 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_60_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_60 +#define GLIB_DEPRECATED_MACRO_IN_2_60_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_60 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_60_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_60 +#define GLIB_DEPRECATED_TYPE_IN_2_60_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_60 +#define GLIB_AVAILABLE_IN_2_60 GLIB_UNAVAILABLE (2, 60) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_60 GLIB_UNAVAILABLE_STATIC_INLINE (2, 60) +#define GLIB_AVAILABLE_MACRO_IN_2_60 GLIB_UNAVAILABLE_MACRO (2, 60) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_60 GLIB_UNAVAILABLE_ENUMERATOR (2, 60) +#define GLIB_AVAILABLE_TYPE_IN_2_60 GLIB_UNAVAILABLE_TYPE (2, 60) +#else +#define GLIB_AVAILABLE_IN_2_60 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_60 +#define GLIB_AVAILABLE_MACRO_IN_2_60 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_60 +#define GLIB_AVAILABLE_TYPE_IN_2_60 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_62 +#define GLIB_DEPRECATED_IN_2_62 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_62_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_62 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_62_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_62 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_62_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_62 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_62_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_62 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_62_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_62 +#define GLIB_DEPRECATED_MACRO_IN_2_62_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_62 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_62_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_62 +#define GLIB_DEPRECATED_TYPE_IN_2_62_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_62 +#define GLIB_AVAILABLE_IN_2_62 GLIB_UNAVAILABLE (2, 62) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_62 GLIB_UNAVAILABLE_STATIC_INLINE (2, 62) +#define GLIB_AVAILABLE_MACRO_IN_2_62 GLIB_UNAVAILABLE_MACRO (2, 62) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_62 GLIB_UNAVAILABLE_ENUMERATOR (2, 62) +#define GLIB_AVAILABLE_TYPE_IN_2_62 GLIB_UNAVAILABLE_TYPE (2, 62) +#else +#define GLIB_AVAILABLE_IN_2_62 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_62 +#define GLIB_AVAILABLE_MACRO_IN_2_62 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_62 +#define GLIB_AVAILABLE_TYPE_IN_2_62 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_64 +#define GLIB_DEPRECATED_IN_2_64 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_64_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_64 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_64_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_64 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_64_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_64 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_64_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_64 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_64_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_64 +#define GLIB_DEPRECATED_MACRO_IN_2_64_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_64 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_64_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_64 +#define GLIB_DEPRECATED_TYPE_IN_2_64_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_64 +#define GLIB_AVAILABLE_IN_2_64 GLIB_UNAVAILABLE (2, 64) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_64 GLIB_UNAVAILABLE_STATIC_INLINE (2, 64) +#define GLIB_AVAILABLE_MACRO_IN_2_64 GLIB_UNAVAILABLE_MACRO (2, 64) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_64 GLIB_UNAVAILABLE_ENUMERATOR (2, 64) +#define GLIB_AVAILABLE_TYPE_IN_2_64 GLIB_UNAVAILABLE_TYPE (2, 64) +#else +#define GLIB_AVAILABLE_IN_2_64 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_64 +#define GLIB_AVAILABLE_MACRO_IN_2_64 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_64 +#define GLIB_AVAILABLE_TYPE_IN_2_64 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_66 +#define GLIB_DEPRECATED_IN_2_66 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_66_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_66 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_66_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_66 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_66_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_66 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_66_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_66 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_66_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_66 +#define GLIB_DEPRECATED_MACRO_IN_2_66_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_66 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_66_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_66 +#define GLIB_DEPRECATED_TYPE_IN_2_66_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_66 +#define GLIB_AVAILABLE_IN_2_66 GLIB_UNAVAILABLE (2, 66) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_66 GLIB_UNAVAILABLE_STATIC_INLINE (2, 66) +#define GLIB_AVAILABLE_MACRO_IN_2_66 GLIB_UNAVAILABLE_MACRO (2, 66) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_66 GLIB_UNAVAILABLE_ENUMERATOR (2, 66) +#define GLIB_AVAILABLE_TYPE_IN_2_66 GLIB_UNAVAILABLE_TYPE (2, 66) +#else +#define GLIB_AVAILABLE_IN_2_66 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_66 +#define GLIB_AVAILABLE_MACRO_IN_2_66 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_66 +#define GLIB_AVAILABLE_TYPE_IN_2_66 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_68 +#define GLIB_DEPRECATED_IN_2_68 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_68_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_68 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_68_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_68 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_68_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_68 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_68_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_68 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_68_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_68 +#define GLIB_DEPRECATED_MACRO_IN_2_68_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_68 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_68_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_68 +#define GLIB_DEPRECATED_TYPE_IN_2_68_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_68 +#define GLIB_AVAILABLE_IN_2_68 GLIB_UNAVAILABLE (2, 68) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_68 GLIB_UNAVAILABLE_STATIC_INLINE (2, 68) +#define GLIB_AVAILABLE_MACRO_IN_2_68 GLIB_UNAVAILABLE_MACRO (2, 68) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_68 GLIB_UNAVAILABLE_ENUMERATOR (2, 68) +#define GLIB_AVAILABLE_TYPE_IN_2_68 GLIB_UNAVAILABLE_TYPE (2, 68) +#else +#define GLIB_AVAILABLE_IN_2_68 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_68 +#define GLIB_AVAILABLE_MACRO_IN_2_68 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_68 +#define GLIB_AVAILABLE_TYPE_IN_2_68 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_70 +#define GLIB_DEPRECATED_IN_2_70 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_70_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_70 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_70_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_70 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_70_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_70 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_70_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_70 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_70_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_70 +#define GLIB_DEPRECATED_MACRO_IN_2_70_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_70 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_70_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_70 +#define GLIB_DEPRECATED_TYPE_IN_2_70_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_70 +#define GLIB_AVAILABLE_IN_2_70 GLIB_UNAVAILABLE (2, 70) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_70 GLIB_UNAVAILABLE_STATIC_INLINE (2, 70) +#define GLIB_AVAILABLE_MACRO_IN_2_70 GLIB_UNAVAILABLE_MACRO (2, 70) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_70 GLIB_UNAVAILABLE_ENUMERATOR (2, 70) +#define GLIB_AVAILABLE_TYPE_IN_2_70 GLIB_UNAVAILABLE_TYPE (2, 70) +#else +#define GLIB_AVAILABLE_IN_2_70 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_70 +#define GLIB_AVAILABLE_MACRO_IN_2_70 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_70 +#define GLIB_AVAILABLE_TYPE_IN_2_70 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_72 +#define GLIB_DEPRECATED_IN_2_72 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_72_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_72 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_72_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_72 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_72_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_72 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_72_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_72 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_72_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_72 +#define GLIB_DEPRECATED_MACRO_IN_2_72_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_72 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_72_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_72 +#define GLIB_DEPRECATED_TYPE_IN_2_72_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_72 +#define GLIB_AVAILABLE_IN_2_72 GLIB_UNAVAILABLE (2, 72) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_72 GLIB_UNAVAILABLE_STATIC_INLINE (2, 72) +#define GLIB_AVAILABLE_MACRO_IN_2_72 GLIB_UNAVAILABLE_MACRO (2, 72) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_72 GLIB_UNAVAILABLE_ENUMERATOR (2, 72) +#define GLIB_AVAILABLE_TYPE_IN_2_72 GLIB_UNAVAILABLE_TYPE (2, 72) +#else +#define GLIB_AVAILABLE_IN_2_72 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_72 +#define GLIB_AVAILABLE_MACRO_IN_2_72 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_72 +#define GLIB_AVAILABLE_TYPE_IN_2_72 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_74 +#define GLIB_DEPRECATED_IN_2_74 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_74_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_74 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_74_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_74 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_74_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_74 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_74_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_74 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_74_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_74 +#define GLIB_DEPRECATED_MACRO_IN_2_74_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_74 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_74_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_74 +#define GLIB_DEPRECATED_TYPE_IN_2_74_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_74 +#define GLIB_AVAILABLE_IN_2_74 GLIB_UNAVAILABLE (2, 74) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_74 GLIB_UNAVAILABLE_STATIC_INLINE (2, 74) +#define GLIB_AVAILABLE_MACRO_IN_2_74 GLIB_UNAVAILABLE_MACRO (2, 74) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_74 GLIB_UNAVAILABLE_ENUMERATOR (2, 74) +#define GLIB_AVAILABLE_TYPE_IN_2_74 GLIB_UNAVAILABLE_TYPE (2, 74) +#else +#define GLIB_AVAILABLE_IN_2_74 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_74 +#define GLIB_AVAILABLE_MACRO_IN_2_74 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_74 +#define GLIB_AVAILABLE_TYPE_IN_2_74 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_76 +#define GLIB_DEPRECATED_IN_2_76 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_76_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_76 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_76_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_76 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_76_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_76 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_76_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_76 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_76_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_76 +#define GLIB_DEPRECATED_MACRO_IN_2_76_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_76 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_76_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_76 +#define GLIB_DEPRECATED_TYPE_IN_2_76_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_76 +#define GLIB_AVAILABLE_IN_2_76 GLIB_UNAVAILABLE (2, 76) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_76 GLIB_UNAVAILABLE_STATIC_INLINE (2, 76) +#define GLIB_AVAILABLE_MACRO_IN_2_76 GLIB_UNAVAILABLE_MACRO (2, 76) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_76 GLIB_UNAVAILABLE_ENUMERATOR (2, 76) +#define GLIB_AVAILABLE_TYPE_IN_2_76 GLIB_UNAVAILABLE_TYPE (2, 76) +#else +#define GLIB_AVAILABLE_IN_2_76 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_76 +#define GLIB_AVAILABLE_MACRO_IN_2_76 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_76 +#define GLIB_AVAILABLE_TYPE_IN_2_76 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_78 +#define GLIB_DEPRECATED_IN_2_78 GLIB_DEPRECATED +#define GLIB_DEPRECATED_IN_2_78_FOR(f) GLIB_DEPRECATED_FOR (f) +#define GLIB_DEPRECATED_MACRO_IN_2_78 GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_IN_2_78_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_78 GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_78_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GLIB_DEPRECATED_TYPE_IN_2_78 GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_IN_2_78_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GLIB_DEPRECATED_IN_2_78 _GLIB_EXTERN +#define GLIB_DEPRECATED_IN_2_78_FOR(f) _GLIB_EXTERN +#define GLIB_DEPRECATED_MACRO_IN_2_78 +#define GLIB_DEPRECATED_MACRO_IN_2_78_FOR(f) +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_78 +#define GLIB_DEPRECATED_ENUMERATOR_IN_2_78_FOR(f) +#define GLIB_DEPRECATED_TYPE_IN_2_78 +#define GLIB_DEPRECATED_TYPE_IN_2_78_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_78 +#define GLIB_AVAILABLE_IN_2_78 GLIB_UNAVAILABLE (2, 78) +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_78 GLIB_UNAVAILABLE_STATIC_INLINE (2, 78) +#define GLIB_AVAILABLE_MACRO_IN_2_78 GLIB_UNAVAILABLE_MACRO (2, 78) +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_78 GLIB_UNAVAILABLE_ENUMERATOR (2, 78) +#define GLIB_AVAILABLE_TYPE_IN_2_78 GLIB_UNAVAILABLE_TYPE (2, 78) +#else +#define GLIB_AVAILABLE_IN_2_78 _GLIB_EXTERN +#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_78 +#define GLIB_AVAILABLE_MACRO_IN_2_78 +#define GLIB_AVAILABLE_ENUMERATOR_IN_2_78 +#define GLIB_AVAILABLE_TYPE_IN_2_78 +#endif diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/glist.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/glist.h new file mode 100644 index 0000000..2a453b7 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/glist.h @@ -0,0 +1,179 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_LIST_H__ +#define __G_LIST_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +typedef struct _GList GList; + +struct _GList +{ + gpointer data; + GList *next; + GList *prev; +}; + +/* Doubly linked lists + */ +GLIB_AVAILABLE_IN_ALL +GList* g_list_alloc (void) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +void g_list_free (GList *list); +GLIB_AVAILABLE_IN_ALL +void g_list_free_1 (GList *list); +#define g_list_free1 g_list_free_1 +GLIB_AVAILABLE_IN_ALL +void g_list_free_full (GList *list, + GDestroyNotify free_func); +GLIB_AVAILABLE_IN_ALL +GList* g_list_append (GList *list, + gpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_prepend (GList *list, + gpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_insert (GList *list, + gpointer data, + gint position) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_insert_sorted (GList *list, + gpointer data, + GCompareFunc func) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_insert_sorted_with_data (GList *list, + gpointer data, + GCompareDataFunc func, + gpointer user_data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_insert_before (GList *list, + GList *sibling, + gpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_2_62 +GList* g_list_insert_before_link (GList *list, + GList *sibling, + GList *link_) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_concat (GList *list1, + GList *list2) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_remove (GList *list, + gconstpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_remove_all (GList *list, + gconstpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_remove_link (GList *list, + GList *llink) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_delete_link (GList *list, + GList *link_) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_reverse (GList *list) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_copy (GList *list) G_GNUC_WARN_UNUSED_RESULT; + +GLIB_AVAILABLE_IN_2_34 +GList* g_list_copy_deep (GList *list, + GCopyFunc func, + gpointer user_data) G_GNUC_WARN_UNUSED_RESULT; + +GLIB_AVAILABLE_IN_ALL +GList* g_list_nth (GList *list, + guint n); +GLIB_AVAILABLE_IN_ALL +GList* g_list_nth_prev (GList *list, + guint n); +GLIB_AVAILABLE_IN_ALL +GList* g_list_find (GList *list, + gconstpointer data); +GLIB_AVAILABLE_IN_ALL +GList* g_list_find_custom (GList *list, + gconstpointer data, + GCompareFunc func); +GLIB_AVAILABLE_IN_ALL +gint g_list_position (GList *list, + GList *llink); +GLIB_AVAILABLE_IN_ALL +gint g_list_index (GList *list, + gconstpointer data); +GLIB_AVAILABLE_IN_ALL +GList* g_list_last (GList *list); +GLIB_AVAILABLE_IN_ALL +GList* g_list_first (GList *list); +GLIB_AVAILABLE_IN_ALL +guint g_list_length (GList *list); +GLIB_AVAILABLE_IN_ALL +void g_list_foreach (GList *list, + GFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GList* g_list_sort (GList *list, + GCompareFunc compare_func) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GList* g_list_sort_with_data (GList *list, + GCompareDataFunc compare_func, + gpointer user_data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +gpointer g_list_nth_data (GList *list, + guint n); + +GLIB_AVAILABLE_IN_2_64 +void g_clear_list (GList **list_ptr, + GDestroyNotify destroy); + +#define g_clear_list(list_ptr, destroy) \ + G_STMT_START { \ + GList *_list; \ + \ + _list = *(list_ptr); \ + if (_list) \ + { \ + *list_ptr = NULL; \ + \ + if ((destroy) != NULL) \ + g_list_free_full (_list, (destroy)); \ + else \ + g_list_free (_list); \ + } \ + } G_STMT_END \ + GLIB_AVAILABLE_MACRO_IN_2_64 + + +#define g_list_previous(list) ((list) ? (((GList *)(list))->prev) : NULL) +#define g_list_next(list) ((list) ? (((GList *)(list))->next) : NULL) + +G_END_DECLS + +#endif /* __G_LIST_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmacros.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmacros.h new file mode 100644 index 0000000..1be50a4 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmacros.h @@ -0,0 +1,1425 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +/* This file must not include any other glib header file and must thus + * not refer to variables from glibconfig.h + */ + +#ifndef __G_MACROS_H__ +#define __G_MACROS_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +/* We include stddef.h to get the system's definition of NULL + */ +#include + +/* + * Note: Clang (but not clang-cl) defines __GNUC__ and __GNUC_MINOR__. + * Both Clang 11.1 on current Arch Linux and Apple's Clang 12.0 define + * __GNUC__ = 4 and __GNUC_MINOR__ = 2. So G_GNUC_CHECK_VERSION(4, 2) on + * current Clang will be 1. + */ +#ifdef __GNUC__ +#define G_GNUC_CHECK_VERSION(major, minor) \ + ((__GNUC__ > (major)) || \ + ((__GNUC__ == (major)) && \ + (__GNUC_MINOR__ >= (minor)))) +#else +#define G_GNUC_CHECK_VERSION(major, minor) 0 +#endif + +/* Here we provide G_GNUC_EXTENSION as an alias for __extension__, + * where this is valid. This allows for warningless compilation of + * "long long" types even in the presence of '-ansi -pedantic'. + */ +#if G_GNUC_CHECK_VERSION(2, 8) +#define G_GNUC_EXTENSION __extension__ +#else +#define G_GNUC_EXTENSION +#endif + +#if !defined (__cplusplus) + +# undef G_CXX_STD_VERSION +# define G_CXX_STD_CHECK_VERSION(version) (0) + +# if defined (__STDC_VERSION__) +# define G_C_STD_VERSION __STDC_VERSION__ +# else +# define G_C_STD_VERSION 199000L +# endif /* defined (__STDC_VERSION__) */ + +# define G_C_STD_CHECK_VERSION(version) ( \ + ((version) >= 199000L && (version) <= G_C_STD_VERSION) || \ + ((version) == 89 && G_C_STD_VERSION >= 199000L) || \ + ((version) == 90 && G_C_STD_VERSION >= 199000L) || \ + ((version) == 99 && G_C_STD_VERSION >= 199901L) || \ + ((version) == 11 && G_C_STD_VERSION >= 201112L) || \ + ((version) == 17 && G_C_STD_VERSION >= 201710L) || \ + 0) + +#else /* defined (__cplusplus) */ + +# undef G_C_STD_VERSION +# define G_C_STD_CHECK_VERSION(version) (0) + +# if defined (_MSVC_LANG) +# define G_CXX_STD_VERSION (_MSVC_LANG > __cplusplus ? _MSVC_LANG : __cplusplus) +# else +# define G_CXX_STD_VERSION __cplusplus +# endif /* defined(_MSVC_LANG) */ + +# define G_CXX_STD_CHECK_VERSION(version) ( \ + ((version) >= 199711L && (version) <= G_CXX_STD_VERSION) || \ + ((version) == 98 && G_CXX_STD_VERSION >= 199711L) || \ + ((version) == 03 && G_CXX_STD_VERSION >= 199711L) || \ + ((version) == 11 && G_CXX_STD_VERSION >= 201103L) || \ + ((version) == 14 && G_CXX_STD_VERSION >= 201402L) || \ + ((version) == 17 && G_CXX_STD_VERSION >= 201703L) || \ + ((version) == 20 && G_CXX_STD_VERSION >= 202002L) || \ + 0) + +#endif /* !defined (__cplusplus) */ + +/* Every compiler that we target supports inlining, but some of them may + * complain about it if we don't say "__inline". If we have C99, or if + * we are using C++, then we can use "inline" directly. + * Otherwise, we say "__inline" to avoid the warning. + * Unfortunately Visual Studio does not define __STDC_VERSION__ (if not + * using /std:cXX) so we need to check whether we are on Visual Studio 2013 + * or earlier to see whether we need to say "__inline" in C mode. + */ +#define G_CAN_INLINE +#ifdef G_C_STD_VERSION +# ifdef _MSC_VER +# if (_MSC_VER < 1900) +# define G_INLINE_DEFINE_NEEDED +# endif +# elif !G_C_STD_CHECK_VERSION (99) +# define G_INLINE_DEFINE_NEEDED +# endif +#endif + +#ifdef G_INLINE_DEFINE_NEEDED +# undef inline +# define inline __inline +#endif + +#undef G_INLINE_DEFINE_NEEDED + +/** + * G_INLINE_FUNC: + * + * This macro used to be used to conditionally define inline functions + * in a compatible way before this feature was supported in all + * compilers. These days, GLib requires inlining support from the + * compiler, so your GLib-using programs can safely assume that the + * "inline" keyword works properly. + * + * Never use this macro anymore. Just say "static inline". + * + * Deprecated: 2.48: Use "static inline" instead + */ + +/* For historical reasons we need to continue to support those who + * define G_IMPLEMENT_INLINES to mean "don't implement this here". + */ +#ifdef G_IMPLEMENT_INLINES +# define G_INLINE_FUNC extern GLIB_DEPRECATED_MACRO_IN_2_48_FOR(static inline) +# undef G_CAN_INLINE +#else +# define G_INLINE_FUNC static inline GLIB_DEPRECATED_MACRO_IN_2_48_FOR(static inline) +#endif /* G_IMPLEMENT_INLINES */ + +/* + * Attribute support detection. Works on clang and GCC >= 5 + * https://clang.llvm.org/docs/LanguageExtensions.html#has-attribute + * https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005fattribute.html + */ + +#ifdef __has_attribute +#define g_macro__has_attribute __has_attribute +#else + +/* + * Fallback for GCC < 5 and other compilers not supporting __has_attribute. + */ +#define g_macro__has_attribute(x) g_macro__has_attribute_##x + +#define g_macro__has_attribute___alloc_size__ G_GNUC_CHECK_VERSION (4, 3) +#define g_macro__has_attribute___always_inline__ G_GNUC_CHECK_VERSION (2, 0) +#define g_macro__has_attribute___const__ G_GNUC_CHECK_VERSION (2, 4) +#define g_macro__has_attribute___deprecated__ G_GNUC_CHECK_VERSION (3, 1) +#define g_macro__has_attribute___format__ G_GNUC_CHECK_VERSION (2, 4) +#define g_macro__has_attribute___format_arg__ G_GNUC_CHECK_VERSION (2, 4) +#define g_macro__has_attribute___malloc__ G_GNUC_CHECK_VERSION (2, 96) +#define g_macro__has_attribute___no_instrument_function__ G_GNUC_CHECK_VERSION (2, 4) +#define g_macro__has_attribute___noinline__ G_GNUC_CHECK_VERSION (2, 96) +#define g_macro__has_attribute___noreturn__ (G_GNUC_CHECK_VERSION (2, 8) || (0x5110 <= __SUNPRO_C)) +#define g_macro__has_attribute___pure__ G_GNUC_CHECK_VERSION (2, 96) +#define g_macro__has_attribute___sentinel__ G_GNUC_CHECK_VERSION (4, 0) +#define g_macro__has_attribute___unused__ G_GNUC_CHECK_VERSION (2, 4) +#define g_macro__has_attribute_cleanup G_GNUC_CHECK_VERSION (3, 3) +#define g_macro__has_attribute_fallthrough G_GNUC_CHECK_VERSION (6, 0) +#define g_macro__has_attribute_may_alias G_GNUC_CHECK_VERSION (3, 3) +#define g_macro__has_attribute_warn_unused_result G_GNUC_CHECK_VERSION (3, 4) + +#endif + +/* Provide macros to feature the GCC function attribute. + */ + +/** + * G_GNUC_PURE: + * + * Expands to the GNU C `pure` function attribute if the compiler is gcc. + * Declaring a function as `pure` enables better optimization of calls to + * the function. A `pure` function has no effects except its return value + * and the return value depends only on the parameters and/or global + * variables. + * + * Place the attribute after the declaration, just before the semicolon. + * + * |[ + * gboolean g_type_check_value (const GValue *value) G_GNUC_PURE; + * ]| + * + * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-pure-function-attribute) for more details. + */ + +/** + * G_GNUC_MALLOC: + * + * Expands to the + * [GNU C `malloc` function attribute](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-functions-that-behave-like-malloc) + * if the compiler is gcc. + * Declaring a function as `malloc` enables better optimization of the function, + * but must only be done if the allocation behaviour of the function is fully + * understood, otherwise miscompilation can result. + * + * A function can have the `malloc` attribute if it returns a pointer which is + * guaranteed to not alias with any other pointer valid when the function + * returns, and moreover no pointers to valid objects occur in any storage + * addressed by the returned pointer. + * + * In practice, this means that `G_GNUC_MALLOC` can be used with any function + * which returns unallocated or zeroed-out memory, but not with functions which + * return initialised structures containing other pointers, or with functions + * that reallocate memory. This definition changed in GLib 2.58 to match the + * stricter definition introduced around GCC 5. + * + * Place the attribute after the declaration, just before the semicolon. + * + * |[ + * gpointer g_malloc (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); + * ]| + * + * See the + * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-functions-that-behave-like-malloc) + * for more details. + * + * Since: 2.6 + */ + +/** + * G_GNUC_NO_INLINE: + * + * Expands to the GNU C `noinline` function attribute if the compiler is gcc. + * If the compiler is not gcc, this macro expands to nothing. + * + * Declaring a function as `noinline` prevents the function from being + * considered for inlining. + * + * This macro is provided for retro-compatibility and will be eventually + * deprecated, but %G_NO_INLINE should be used instead. + * + * The attribute may be placed before the declaration or definition, + * right before the `static` keyword. + * + * |[ + * G_GNUC_NO_INLINE + * static int + * do_not_inline_this (void) + * { + * ... + * } + * ]| + * + * See the + * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-noinline-function-attribute) + * for more details. + * + * See also: %G_NO_INLINE, %G_ALWAYS_INLINE. + * + * Since: 2.58 + */ + +#if g_macro__has_attribute(__pure__) +#define G_GNUC_PURE __attribute__((__pure__)) +#else +#define G_GNUC_PURE +#endif + +#if g_macro__has_attribute(__malloc__) +#define G_GNUC_MALLOC __attribute__ ((__malloc__)) +#else +#define G_GNUC_MALLOC +#endif + +#if g_macro__has_attribute(__noinline__) +#define G_GNUC_NO_INLINE __attribute__ ((__noinline__)) \ + GLIB_AVAILABLE_MACRO_IN_2_58 +#else +#define G_GNUC_NO_INLINE \ + GLIB_AVAILABLE_MACRO_IN_2_58 +#endif + +/** + * G_GNUC_NULL_TERMINATED: + * + * Expands to the GNU C `sentinel` function attribute if the compiler is gcc. + * This function attribute only applies to variadic functions and instructs + * the compiler to check that the argument list is terminated with an + * explicit %NULL. + * + * Place the attribute after the declaration, just before the semicolon. + * + * |[ + * gchar *g_strconcat (const gchar *string1, + * ...) G_GNUC_NULL_TERMINATED; + * ]| + * + * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-sentinel-function-attribute) for more details. + * + * Since: 2.8 + */ +#if g_macro__has_attribute(__sentinel__) +#define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__)) +#else +#define G_GNUC_NULL_TERMINATED +#endif + +/* + * Clang feature detection: http://clang.llvm.org/docs/LanguageExtensions.html + * These are not available on GCC, but since the pre-processor doesn't do + * operator short-circuiting, we can't use it in a statement or we'll get: + * + * error: missing binary operator before token "(" + * + * So we define it to 0 to satisfy the pre-processor. + */ + +#ifdef __has_feature +#define g_macro__has_feature __has_feature +#else +#define g_macro__has_feature(x) 0 +#endif + +#ifdef __has_builtin +#define g_macro__has_builtin __has_builtin +#else +#define g_macro__has_builtin(x) 0 +#endif + +#ifdef __has_extension +#define g_macro__has_extension __has_extension +#else +#define g_macro__has_extension(x) 0 +#endif + +/** + * G_GNUC_ALLOC_SIZE: + * @x: the index of the argument specifying the allocation size + * + * Expands to the GNU C `alloc_size` function attribute if the compiler + * is a new enough gcc. This attribute tells the compiler that the + * function returns a pointer to memory of a size that is specified + * by the @xth function parameter. + * + * Place the attribute after the function declaration, just before the + * semicolon. + * + * |[ + * gpointer g_malloc (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); + * ]| + * + * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-alloc_005fsize-function-attribute) for more details. + * + * Since: 2.18 + */ + +/** + * G_GNUC_ALLOC_SIZE2: + * @x: the index of the argument specifying one factor of the allocation size + * @y: the index of the argument specifying the second factor of the allocation size + * + * Expands to the GNU C `alloc_size` function attribute if the compiler is a + * new enough gcc. This attribute tells the compiler that the function returns + * a pointer to memory of a size that is specified by the product of two + * function parameters. + * + * Place the attribute after the function declaration, just before the + * semicolon. + * + * |[ + * gpointer g_malloc_n (gsize n_blocks, + * gsize n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1, 2); + * ]| + * + * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-alloc_005fsize-function-attribute) for more details. + * + * Since: 2.18 + */ +#if g_macro__has_attribute(__alloc_size__) +#define G_GNUC_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) +#define G_GNUC_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y))) +#else +#define G_GNUC_ALLOC_SIZE(x) +#define G_GNUC_ALLOC_SIZE2(x,y) +#endif + +/** + * G_GNUC_PRINTF: + * @format_idx: the index of the argument corresponding to the + * format string (the arguments are numbered from 1) + * @arg_idx: the index of the first of the format arguments, or 0 if + * there are no format arguments + * + * Expands to the GNU C `format` function attribute if the compiler is gcc. + * This is used for declaring functions which take a variable number of + * arguments, with the same syntax as `printf()`. It allows the compiler + * to type-check the arguments passed to the function. + * + * Place the attribute after the function declaration, just before the + * semicolon. + * + * See the + * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-3288) + * for more details. + * + * |[ + * gint g_snprintf (gchar *string, + * gulong n, + * gchar const *format, + * ...) G_GNUC_PRINTF (3, 4); + * ]| + */ + +/** + * G_GNUC_SCANF: + * @format_idx: the index of the argument corresponding to + * the format string (the arguments are numbered from 1) + * @arg_idx: the index of the first of the format arguments, or 0 if + * there are no format arguments + * + * Expands to the GNU C `format` function attribute if the compiler is gcc. + * This is used for declaring functions which take a variable number of + * arguments, with the same syntax as `scanf()`. It allows the compiler + * to type-check the arguments passed to the function. + * + * |[ + * int my_scanf (MyStream *stream, + * const char *format, + * ...) G_GNUC_SCANF (2, 3); + * int my_vscanf (MyStream *stream, + * const char *format, + * va_list ap) G_GNUC_SCANF (2, 0); + * ]| + * + * See the + * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-3288) + * for details. + */ + +/** + * G_GNUC_STRFTIME: + * @format_idx: the index of the argument corresponding to + * the format string (the arguments are numbered from 1) + * + * Expands to the GNU C `strftime` format function attribute if the compiler + * is gcc. This is used for declaring functions which take a format argument + * which is passed to `strftime()` or an API implementing its formats. It allows + * the compiler check the format passed to the function. + * + * |[ + * gsize my_strftime (MyBuffer *buffer, + * const char *format, + * const struct tm *tm) G_GNUC_STRFTIME (2); + * ]| + * + * See the + * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-3288) + * for details. + * + * Since: 2.60 + */ + +/** + * G_GNUC_FORMAT: + * @arg_idx: the index of the argument + * + * Expands to the GNU C `format_arg` function attribute if the compiler + * is gcc. This function attribute specifies that a function takes a + * format string for a `printf()`, `scanf()`, `strftime()` or `strfmon()` style + * function and modifies it, so that the result can be passed to a `printf()`, + * `scanf()`, `strftime()` or `strfmon()` style function (with the remaining + * arguments to the format function the same as they would have been + * for the unmodified string). + * + * Place the attribute after the function declaration, just before the + * semicolon. + * + * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-nonliteral-1) for more details. + * + * |[ + * gchar *g_dgettext (gchar *domain_name, gchar *msgid) G_GNUC_FORMAT (2); + * ]| + */ + +/** + * G_GNUC_NORETURN: + * + * Expands to the GNU C `noreturn` function attribute if the compiler is gcc. + * It is used for declaring functions which never return. It enables + * optimization of the function, and avoids possible compiler warnings. + * + * Since 2.68, it is recommended that code uses %G_NORETURN instead of + * %G_GNUC_NORETURN, as that works on more platforms and compilers (in + * particular, MSVC and C++11) than %G_GNUC_NORETURN, which works with GCC and + * Clang only. %G_GNUC_NORETURN continues to work, so has not been deprecated + * yet. + * + * Place the attribute after the declaration, just before the semicolon. + * + * |[ + * void g_abort (void) G_GNUC_NORETURN; + * ]| + * + * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-noreturn-function-attribute) for more details. + */ + +/** + * G_GNUC_CONST: + * + * Expands to the GNU C `const` function attribute if the compiler is gcc. + * Declaring a function as `const` enables better optimization of calls to + * the function. A `const` function doesn't examine any values except its + * parameters, and has no effects except its return value. + * + * Place the attribute after the declaration, just before the semicolon. + * + * |[ + * gchar g_ascii_tolower (gchar c) G_GNUC_CONST; + * ]| + * + * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-const-function-attribute) for more details. + * + * A function that has pointer arguments and examines the data pointed to + * must not be declared `const`. Likewise, a function that calls a non-`const` + * function usually must not be `const`. It doesn't make sense for a `const` + * function to return `void`. + */ + +/** + * G_GNUC_UNUSED: + * + * Expands to the GNU C `unused` function attribute if the compiler is gcc. + * It is used for declaring functions and arguments which may never be used. + * It avoids possible compiler warnings. + * + * For functions, place the attribute after the declaration, just before the + * semicolon. For arguments, place the attribute at the beginning of the + * argument declaration. + * + * |[ + * void my_unused_function (G_GNUC_UNUSED gint unused_argument, + * gint other_argument) G_GNUC_UNUSED; + * ]| + * + * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-unused-function-attribute) for more details. + */ + +/** + * G_GNUC_NO_INSTRUMENT: + * + * Expands to the GNU C `no_instrument_function` function attribute if the + * compiler is gcc. Functions with this attribute will not be instrumented + * for profiling, when the compiler is called with the + * `-finstrument-functions` option. + * + * Place the attribute after the declaration, just before the semicolon. + * + * |[ + * int do_uninteresting_things (void) G_GNUC_NO_INSTRUMENT; + * ]| + * + * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-no_005finstrument_005ffunction-function-attribute) for more details. + */ + +#if g_macro__has_attribute(__format__) + +#if !defined (__clang__) && G_GNUC_CHECK_VERSION (4, 4) +#define G_GNUC_PRINTF( format_idx, arg_idx ) \ + __attribute__((__format__ (gnu_printf, format_idx, arg_idx))) +#define G_GNUC_SCANF( format_idx, arg_idx ) \ + __attribute__((__format__ (gnu_scanf, format_idx, arg_idx))) +#define G_GNUC_STRFTIME( format_idx ) \ + __attribute__((__format__ (gnu_strftime, format_idx, 0))) \ + GLIB_AVAILABLE_MACRO_IN_2_60 +#else +#define G_GNUC_PRINTF( format_idx, arg_idx ) \ + __attribute__((__format__ (__printf__, format_idx, arg_idx))) +#define G_GNUC_SCANF( format_idx, arg_idx ) \ + __attribute__((__format__ (__scanf__, format_idx, arg_idx))) +#define G_GNUC_STRFTIME( format_idx ) \ + __attribute__((__format__ (__strftime__, format_idx, 0))) \ + GLIB_AVAILABLE_MACRO_IN_2_60 +#endif + +#else + +#define G_GNUC_PRINTF( format_idx, arg_idx ) +#define G_GNUC_SCANF( format_idx, arg_idx ) +#define G_GNUC_STRFTIME( format_idx ) \ + GLIB_AVAILABLE_MACRO_IN_2_60 + +#endif + +#if g_macro__has_attribute(__format_arg__) +#define G_GNUC_FORMAT(arg_idx) \ + __attribute__ ((__format_arg__ (arg_idx))) +#else +#define G_GNUC_FORMAT( arg_idx ) +#endif + +#if g_macro__has_attribute(__noreturn__) +#define G_GNUC_NORETURN \ + __attribute__ ((__noreturn__)) +#else +/* NOTE: MSVC has __declspec(noreturn) but unlike GCC __attribute__, + * __declspec can only be placed at the start of the function prototype + * and not at the end, so we can't use it without breaking API. + */ +#define G_GNUC_NORETURN +#endif + +#if g_macro__has_attribute(__const__) +#define G_GNUC_CONST \ + __attribute__ ((__const__)) +#else +#define G_GNUC_CONST +#endif + +#if g_macro__has_attribute(__unused__) +#define G_GNUC_UNUSED \ + __attribute__ ((__unused__)) +#else +#define G_GNUC_UNUSED +#endif + +#if g_macro__has_attribute(__no_instrument_function__) +#define G_GNUC_NO_INSTRUMENT \ + __attribute__ ((__no_instrument_function__)) +#else +#define G_GNUC_NO_INSTRUMENT +#endif + +/** + * G_GNUC_FALLTHROUGH: + * + * Expands to the GNU C `fallthrough` statement attribute if the compiler supports it. + * This allows declaring case statement to explicitly fall through in switch + * statements. To enable this feature, use `-Wimplicit-fallthrough` during + * compilation. + * + * Put the attribute right before the case statement you want to fall through + * to. + * + * |[ + * switch (foo) + * { + * case 1: + * g_message ("it's 1"); + * G_GNUC_FALLTHROUGH; + * case 2: + * g_message ("it's either 1 or 2"); + * break; + * } + * ]| + * + * + * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html#index-fallthrough-statement-attribute) for more details. + * + * Since: 2.60 + */ +#if g_macro__has_attribute(fallthrough) +#define G_GNUC_FALLTHROUGH __attribute__((fallthrough)) \ + GLIB_AVAILABLE_MACRO_IN_2_60 +#else +#define G_GNUC_FALLTHROUGH \ + GLIB_AVAILABLE_MACRO_IN_2_60 +#endif + +/** + * G_GNUC_DEPRECATED: + * + * Expands to the GNU C `deprecated` attribute if the compiler is gcc. + * It can be used to mark `typedef`s, variables and functions as deprecated. + * When called with the `-Wdeprecated-declarations` option, + * gcc will generate warnings when deprecated interfaces are used. + * + * Place the attribute after the declaration, just before the semicolon. + * + * |[ + * int my_mistake (void) G_GNUC_DEPRECATED; + * ]| + * + * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-deprecated-function-attribute) for more details. + * + * Since: 2.2 + */ +#if g_macro__has_attribute(__deprecated__) +#define G_GNUC_DEPRECATED __attribute__((__deprecated__)) +#else +#define G_GNUC_DEPRECATED +#endif /* __GNUC__ */ + +/** + * G_GNUC_DEPRECATED_FOR: + * @f: the intended replacement for the deprecated symbol, + * such as the name of a function + * + * Like %G_GNUC_DEPRECATED, but names the intended replacement for the + * deprecated symbol if the version of gcc in use is new enough to support + * custom deprecation messages. + * + * Place the attribute after the declaration, just before the semicolon. + * + * |[ + * int my_mistake (void) G_GNUC_DEPRECATED_FOR(my_replacement); + * ]| + * + * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-deprecated-function-attribute) for more details. + * + * Note that if @f is a macro, it will be expanded in the warning message. + * You can enclose it in quotes to prevent this. (The quotes will show up + * in the warning, but it's better than showing the macro expansion.) + * + * Since: 2.26 + */ +#if G_GNUC_CHECK_VERSION(4, 5) || defined(__clang__) +#define G_GNUC_DEPRECATED_FOR(f) \ + __attribute__((deprecated("Use " #f " instead"))) \ + GLIB_AVAILABLE_MACRO_IN_2_26 +#else +#define G_GNUC_DEPRECATED_FOR(f) G_GNUC_DEPRECATED \ + GLIB_AVAILABLE_MACRO_IN_2_26 +#endif /* __GNUC__ */ + +#ifdef __ICC +#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma ("warning (push)") \ + _Pragma ("warning (disable:1478)") +#define G_GNUC_END_IGNORE_DEPRECATIONS \ + _Pragma ("warning (pop)") +#elif G_GNUC_CHECK_VERSION(4, 6) +#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#define G_GNUC_END_IGNORE_DEPRECATIONS \ + _Pragma ("GCC diagnostic pop") +#elif defined (_MSC_VER) && (_MSC_VER >= 1500) && !defined (__clang__) +#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + __pragma (warning (push)) \ + __pragma (warning (disable : 4996)) +#define G_GNUC_END_IGNORE_DEPRECATIONS \ + __pragma (warning (pop)) +#elif defined (__clang__) +#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") +#define G_GNUC_END_IGNORE_DEPRECATIONS \ + _Pragma("clang diagnostic pop") +#else +#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS +#define G_GNUC_END_IGNORE_DEPRECATIONS +#define GLIB_CANNOT_IGNORE_DEPRECATIONS +#endif + +/** + * G_GNUC_MAY_ALIAS: + * + * Expands to the GNU C `may_alias` type attribute if the compiler is gcc. + * Types with this attribute will not be subjected to type-based alias + * analysis, but are assumed to alias with any other type, just like `char`. + * + * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-may_005falias-type-attribute) for details. + * + * Since: 2.14 + */ +#if g_macro__has_attribute(may_alias) +#define G_GNUC_MAY_ALIAS __attribute__((may_alias)) +#else +#define G_GNUC_MAY_ALIAS +#endif + +/** + * G_GNUC_WARN_UNUSED_RESULT: + * + * Expands to the GNU C `warn_unused_result` function attribute if the compiler + * is gcc. This function attribute makes the compiler emit a warning if the + * result of a function call is ignored. + * + * Place the attribute after the declaration, just before the semicolon. + * + * |[ + * GList *g_list_append (GList *list, + * gpointer data) G_GNUC_WARN_UNUSED_RESULT; + * ]| + * + * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-warn_005funused_005fresult-function-attribute) for more details. + * + * Since: 2.10 + */ +#if g_macro__has_attribute(warn_unused_result) +#define G_GNUC_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +#define G_GNUC_WARN_UNUSED_RESULT +#endif /* __GNUC__ */ + +/** + * G_GNUC_FUNCTION: + * + * Expands to "" on all modern compilers, and to __FUNCTION__ on gcc + * version 2.x. Don't use it. + * + * Deprecated: 2.16: Use G_STRFUNC() instead + */ + +/** + * G_GNUC_PRETTY_FUNCTION: + * + * Expands to "" on all modern compilers, and to __PRETTY_FUNCTION__ + * on gcc version 2.x. Don't use it. + * + * Deprecated: 2.16: Use G_STRFUNC() instead + */ + +/* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with + * macros, so we can refer to them as strings unconditionally. + * usage not-recommended since gcc-3.0 + * + * Mark them as deprecated since 2.26, since that’s when version macros were + * introduced. + */ +#if defined (__GNUC__) && (__GNUC__ < 3) +#define G_GNUC_FUNCTION __FUNCTION__ GLIB_DEPRECATED_MACRO_IN_2_26_FOR(G_STRFUNC) +#define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__ GLIB_DEPRECATED_MACRO_IN_2_26_FOR(G_STRFUNC) +#else /* !__GNUC__ */ +#define G_GNUC_FUNCTION "" GLIB_DEPRECATED_MACRO_IN_2_26_FOR(G_STRFUNC) +#define G_GNUC_PRETTY_FUNCTION "" GLIB_DEPRECATED_MACRO_IN_2_26_FOR(G_STRFUNC) +#endif /* !__GNUC__ */ + +#if g_macro__has_feature(attribute_analyzer_noreturn) && defined(__clang_analyzer__) +#define G_ANALYZER_ANALYZING 1 +#define G_ANALYZER_NORETURN __attribute__((analyzer_noreturn)) +#elif defined(__COVERITY__) +#define G_ANALYZER_ANALYZING 1 +#define G_ANALYZER_NORETURN __attribute__((noreturn)) +#else +#define G_ANALYZER_ANALYZING 0 +#define G_ANALYZER_NORETURN +#endif + +#define G_STRINGIFY(macro_or_string) G_STRINGIFY_ARG (macro_or_string) +#define G_STRINGIFY_ARG(contents) #contents + +#ifndef __GI_SCANNER__ /* The static assert macro really confuses the introspection parser */ +#define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2 +#define G_PASTE(identifier1,identifier2) G_PASTE_ARGS (identifier1, identifier2) +#if G_CXX_STD_CHECK_VERSION (11) +#define G_STATIC_ASSERT(expr) static_assert (expr, "Expression evaluates to false") +#elif (G_C_STD_CHECK_VERSION (11) || \ + g_macro__has_feature(c_static_assert) || g_macro__has_extension(c_static_assert)) +#define G_STATIC_ASSERT(expr) _Static_assert (expr, "Expression evaluates to false") +#else +#ifdef __COUNTER__ +#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED +#else +#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __LINE__)[(expr) ? 1 : -1] G_GNUC_UNUSED +#endif +#endif /* G_CXX_STD_CHECK_VERSION (11) */ +#define G_STATIC_ASSERT_EXPR(expr) ((void) sizeof (char[(expr) ? 1 : -1])) +#endif /* !__GI_SCANNER__ */ + +/* Provide a string identifying the current code position */ +#if defined (__GNUC__) && (__GNUC__ < 3) && !defined (G_CXX_STD_VERSION) +#define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) ":" __PRETTY_FUNCTION__ "()" +#else +#define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) +#endif + +/* Provide a string identifying the current function, non-concatenatable */ +#if defined (__GNUC__) && defined (G_CXX_STD_VERSION) +#define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__)) +#elif G_C_STD_CHECK_VERSION (99) +#define G_STRFUNC ((const char*) (__func__)) +#elif defined (__GNUC__) || (defined(_MSC_VER) && (_MSC_VER > 1300)) +#define G_STRFUNC ((const char*) (__FUNCTION__)) +#else +#define G_STRFUNC ((const char*) ("???")) +#endif + +/* Guard C code in headers, while including them from C++ */ +#ifdef G_CXX_STD_VERSION +#define G_BEGIN_DECLS extern "C" { +#define G_END_DECLS } +#else +#define G_BEGIN_DECLS +#define G_END_DECLS +#endif + +/* Provide definitions for some commonly used macros. + * Some of them are only provided if they haven't already + * been defined. It is assumed that if they are already + * defined then the current definition is correct. + */ +#ifndef NULL +# if G_CXX_STD_CHECK_VERSION (11) +# define NULL (nullptr) +# elif defined (G_CXX_STD_VERSION) +# define NULL (0L) +# else +# define NULL ((void*) 0) +# endif /* G_CXX_STD_CHECK_VERSION (11) */ +#endif + +#ifndef FALSE +#define FALSE (0) +#endif + +#ifndef TRUE +#define TRUE (!FALSE) +#endif + +#undef MAX +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) + +#undef MIN +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) + +#undef ABS +#define ABS(a) (((a) < 0) ? -(a) : (a)) + +#undef CLAMP +#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) + +#define G_APPROX_VALUE(a, b, epsilon) \ + (((a) > (b) ? (a) - (b) : (b) - (a)) < (epsilon)) + +/* Count the number of elements in an array. The array must be defined + * as such; using this with a dynamically allocated array will give + * incorrect results. + */ +#define G_N_ELEMENTS(arr) (sizeof (arr) / sizeof ((arr)[0])) + +/* Macros by analogy to GINT_TO_POINTER, GPOINTER_TO_INT + */ +#define GPOINTER_TO_SIZE(p) ((gsize) (p)) +#define GSIZE_TO_POINTER(s) ((gpointer) (guintptr) (gsize) (s)) + +/* Provide convenience macros for handling structure + * fields through their offsets. + */ + +#if G_GNUC_CHECK_VERSION(4, 0) || defined(_MSC_VER) +#define G_STRUCT_OFFSET(struct_type, member) \ + ((glong) offsetof (struct_type, member)) +#else +#define G_STRUCT_OFFSET(struct_type, member) \ + ((glong) ((guint8*) &((struct_type*) 0)->member)) +#endif + +#define G_STRUCT_MEMBER_P(struct_p, struct_offset) \ + ((gpointer) ((guint8*) (struct_p) + (glong) (struct_offset))) +#define G_STRUCT_MEMBER(member_type, struct_p, struct_offset) \ + (*(member_type*) G_STRUCT_MEMBER_P ((struct_p), (struct_offset))) + +/* Provide simple macro statement wrappers: + * G_STMT_START { statements; } G_STMT_END; + * This can be used as a single statement, like: + * if (x) G_STMT_START { ... } G_STMT_END; else ... + * This intentionally does not use compiler extensions like GCC's '({...})' to + * avoid portability issue or side effects when compiled with different compilers. + * MSVC complains about "while(0)": C4127: "Conditional expression is constant", + * so we use __pragma to avoid the warning since the use here is intentional. + */ +#if !(defined (G_STMT_START) && defined (G_STMT_END)) +#define G_STMT_START do +#if defined (_MSC_VER) && (_MSC_VER >= 1500) +#define G_STMT_END \ + __pragma(warning(push)) \ + __pragma(warning(disable:4127)) \ + while(0) \ + __pragma(warning(pop)) +#else +#define G_STMT_END while (0) +#endif +#endif + +/* Provide G_ALIGNOF alignment macro. + * + * Note we cannot use the gcc __alignof__ operator here, as that returns the + * preferred alignment rather than the minimal alignment. See + * https://gitlab.gnome.org/GNOME/glib/merge_requests/538/diffs#note_390790. + */ + +/** + * G_ALIGNOF + * @type: a type-name + * + * Return the minimal alignment required by the platform ABI for values of the given + * type. The address of a variable or struct member of the given type must always be + * a multiple of this alignment. For example, most platforms require int variables + * to be aligned at a 4-byte boundary, so `G_ALIGNOF (int)` is 4 on most platforms. + * + * Note this is not necessarily the same as the value returned by GCC’s + * `__alignof__` operator, which returns the preferred alignment for a type. + * The preferred alignment may be a stricter alignment than the minimal + * alignment. + * + * Since: 2.60 + */ +#if G_C_STD_CHECK_VERSION (11) +#define G_ALIGNOF(type) _Alignof (type) \ + GLIB_AVAILABLE_MACRO_IN_2_60 +#else +#define G_ALIGNOF(type) (G_STRUCT_OFFSET (struct { char a; type b; }, b)) \ + GLIB_AVAILABLE_MACRO_IN_2_60 +#endif + +/** + * G_CONST_RETURN: + * + * If %G_DISABLE_CONST_RETURNS is defined, this macro expands + * to nothing. By default, the macro expands to const. The macro + * can be used in place of const for functions that return a value + * that should not be modified. The purpose of this macro is to allow + * us to turn on const for returned constant strings by default, while + * allowing programmers who find that annoying to turn it off. This macro + * should only be used for return values and for "out" parameters, it + * doesn't make sense for "in" parameters. + * + * Deprecated: 2.30: API providers should replace all existing uses with + * const and API consumers should adjust their code accordingly + */ +#ifdef G_DISABLE_CONST_RETURNS +#define G_CONST_RETURN GLIB_DEPRECATED_MACRO_IN_2_30_FOR(const) +#else +#define G_CONST_RETURN const GLIB_DEPRECATED_MACRO_IN_2_30_FOR(const) +#endif + +/** + * G_NORETURN: + * + * Expands to the GNU C or MSVC `noreturn` function attribute depending on + * the compiler. It is used for declaring functions which never return. + * Enables optimization of the function, and avoids possible compiler warnings. + * + * Note that %G_NORETURN supersedes the previous %G_GNUC_NORETURN macro, which + * will eventually be deprecated. %G_NORETURN supports more platforms. + * + * Place the attribute before the function declaration as follows: + * + * |[ + * G_NORETURN void g_abort (void); + * ]| + * + * Since: 2.68 + */ +/* Note: We can’t annotate this with GLIB_AVAILABLE_MACRO_IN_2_68 because it’s + * used within the GLib headers in function declarations which are always + * evaluated when a header is included. This results in warnings in third party + * code which includes glib.h, even if the third party code doesn’t use the new + * macro itself. */ +#if G_CXX_STD_CHECK_VERSION (11) + /* Use ISO C++11 syntax when the compiler supports it. */ +# define G_NORETURN [[noreturn]] +#elif g_macro__has_attribute(__noreturn__) + /* For compatibility with G_NORETURN_FUNCPTR on clang, use + __attribute__((__noreturn__)), not _Noreturn. */ +# define G_NORETURN __attribute__ ((__noreturn__)) +#elif defined (_MSC_VER) && (1200 <= _MSC_VER) + /* Use MSVC specific syntax. */ +# define G_NORETURN __declspec (noreturn) + /* Use ISO C11 syntax when the compiler supports it. */ +#elif G_C_STD_CHECK_VERSION (11) +# define G_NORETURN _Noreturn +#else +# define G_NORETURN /* empty */ +#endif + +/** + * G_NORETURN_FUNCPTR: + * + * Expands to the GNU C or MSVC `noreturn` function attribute depending on + * the compiler. It is used for declaring function pointers which never return. + * Enables optimization of the function, and avoids possible compiler warnings. + * + * Place the attribute before the function declaration as follows: + * + * |[ + * G_NORETURN_FUNCPTR void (*funcptr) (void); + * ]| + * + * Note that if the function is not a function pointer, you can simply use + * the %G_NORETURN macro as follows: + * + * |[ + * G_NORETURN void g_abort (void); + * ]| + * + * Since: 2.68 + */ +#if g_macro__has_attribute(__noreturn__) +# define G_NORETURN_FUNCPTR __attribute__ ((__noreturn__)) \ + GLIB_AVAILABLE_MACRO_IN_2_68 +#else +# define G_NORETURN_FUNCPTR /* empty */ \ + GLIB_AVAILABLE_MACRO_IN_2_68 +#endif + +/** + * G_ALWAYS_INLINE: + * + * Expands to the GNU C `always_inline` or MSVC `__forceinline` function + * attribute depending on the compiler. It is used for declaring functions + * as always inlined, ignoring the compiler optimization levels. + * + * The attribute may be placed before the declaration or definition, + * right before the `static` keyword. + * + * |[ + * G_ALWAYS_INLINE + * static int + * do_inline_this (void) + * { + * ... + * } + * ]| + * + * See the + * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-always_005finline-function-attribute) + * and the + * [MSVC documentation](https://docs.microsoft.com/en-us/visualstudio/misc/inline-inline-forceinline) + * + * Since: 2.74 + */ +/* Note: We can’t annotate this with GLIB_AVAILABLE_MACRO_IN_2_74 because it’s + * used within the GLib headers in function declarations which are always + * evaluated when a header is included. This results in warnings in third party + * code which includes glib.h, even if the third party code doesn’t use the new + * macro itself. */ +#if g_macro__has_attribute(__always_inline__) +# if G_CXX_STD_CHECK_VERSION (11) + /* Use ISO C++11 syntax when the compiler supports it. */ +# define G_ALWAYS_INLINE [[gnu::always_inline]] +# else +# define G_ALWAYS_INLINE __attribute__ ((__always_inline__)) +# endif +#elif defined (_MSC_VER) + /* Use MSVC specific syntax. */ +# if G_CXX_STD_CHECK_VERSION (20) && _MSC_VER >= 1927 +# define G_ALWAYS_INLINE [[msvc::forceinline]] +# else +# define G_ALWAYS_INLINE __forceinline +# endif +#else +# define G_ALWAYS_INLINE /* empty */ +#endif + +/** + * G_NO_INLINE: + * + * Expands to the GNU C or MSVC `noinline` function attribute + * depending on the compiler. It is used for declaring functions + * preventing from being considered for inlining. + * + * Note that %G_NO_INLINE supersedes the previous %G_GNUC_NO_INLINE + * macro, which will eventually be deprecated. + * %G_NO_INLINE supports more platforms. + * + * The attribute may be placed before the declaration or definition, + * right before the `static` keyword. + * + * |[ + * G_NO_INLINE + * static int + * do_not_inline_this (void) + * { + * ... + * } + * ]| + * + * Since: 2.74 + */ +/* Note: We can’t annotate this with GLIB_AVAILABLE_MACRO_IN_2_74 because it’s + * used within the GLib headers in function declarations which are always + * evaluated when a header is included. This results in warnings in third party + * code which includes glib.h, even if the third party code doesn’t use the new + * macro itself. */ +#if g_macro__has_attribute(__noinline__) +# if G_CXX_STD_CHECK_VERSION (11) + /* Use ISO C++11 syntax when the compiler supports it. */ +# if defined (__GNUC__) +# define G_NO_INLINE [[gnu::noinline]] +# elif defined (_MSC_VER) +# if G_CXX_STD_CHECK_VERSION (20) && _MSC_VER >= 1927 +# define G_NO_INLINE [[msvc::noinline]] +# else +# define G_NO_INLINE __declspec (noinline) +# endif +# endif +# else +# define G_NO_INLINE __attribute__ ((__noinline__)) +# endif +#elif defined (_MSC_VER) && (1200 <= _MSC_VER) + /* Use MSVC specific syntax. */ + /* Use ISO C++11 syntax when the compiler supports it. */ +# if G_CXX_STD_CHECK_VERSION (20) && _MSC_VER >= 1927 +# define G_NO_INLINE [[msvc::noinline]] +# else +# define G_NO_INLINE __declspec (noinline) +# endif +#else +# define G_NO_INLINE /* empty */ +#endif + +/* + * The G_LIKELY and G_UNLIKELY macros let the programmer give hints to + * the compiler about the expected result of an expression. Some compilers + * can use this information for optimizations. + * + * The _G_BOOLEAN_EXPR macro is intended to trigger a gcc warning when + * putting assignments in g_return_if_fail (). + */ +#if G_GNUC_CHECK_VERSION(2, 0) && defined(__OPTIMIZE__) +#define _G_BOOLEAN_EXPR_IMPL(uniq, expr) \ + G_GNUC_EXTENSION ({ \ + int G_PASTE (_g_boolean_var_, uniq); \ + if (expr) \ + G_PASTE (_g_boolean_var_, uniq) = 1; \ + else \ + G_PASTE (_g_boolean_var_, uniq) = 0; \ + G_PASTE (_g_boolean_var_, uniq); \ +}) +#define _G_BOOLEAN_EXPR(expr) _G_BOOLEAN_EXPR_IMPL (__COUNTER__, expr) +#define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR(expr), 1)) +#define G_UNLIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR(expr), 0)) +#else +#define G_LIKELY(expr) (expr) +#define G_UNLIKELY(expr) (expr) +#endif + +#if __GNUC__ >= 4 && !defined(_WIN32) && !defined(__CYGWIN__) +#define G_HAVE_GNUC_VISIBILITY 1 +#endif + +/* GLIB_CANNOT_IGNORE_DEPRECATIONS is defined above for compilers that do not + * have a way to temporarily suppress deprecation warnings. In these cases, + * suppress the deprecated attribute altogether (otherwise a simple #include + * will emit a barrage of warnings). + */ +#if defined(GLIB_CANNOT_IGNORE_DEPRECATIONS) +#define G_DEPRECATED +#elif G_GNUC_CHECK_VERSION(3, 1) || defined(__clang__) +#define G_DEPRECATED __attribute__((__deprecated__)) +#elif defined(_MSC_VER) && (_MSC_VER >= 1300) +#define G_DEPRECATED __declspec(deprecated) +#else +#define G_DEPRECATED +#endif + +#if defined(GLIB_CANNOT_IGNORE_DEPRECATIONS) +#define G_DEPRECATED_FOR(f) G_DEPRECATED +#elif G_GNUC_CHECK_VERSION(4, 5) || defined(__clang__) +#define G_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "' instead"))) +#elif defined(_MSC_FULL_VER) && (_MSC_FULL_VER > 140050320) +#define G_DEPRECATED_FOR(f) __declspec(deprecated("is deprecated. Use '" #f "' instead")) +#else +#define G_DEPRECATED_FOR(f) G_DEPRECATED +#endif + +#if G_GNUC_CHECK_VERSION(4, 5) || defined(__clang__) +#define G_UNAVAILABLE(maj,min) __attribute__((deprecated("Not available before " #maj "." #min))) +#elif defined(_MSC_FULL_VER) && (_MSC_FULL_VER > 140050320) +#define G_UNAVAILABLE(maj,min) __declspec(deprecated("is not available before " #maj "." #min)) +#else +#define G_UNAVAILABLE(maj,min) G_DEPRECATED +#endif + +/* These macros are used to mark deprecated symbols in GLib headers, + * and thus have to be exposed in installed headers. But please + * do *not* use them in other projects. Instead, use G_DEPRECATED + * or define your own wrappers around it. + */ + +#if !defined(GLIB_DISABLE_DEPRECATION_WARNINGS) && \ + (G_GNUC_CHECK_VERSION(4, 6) || \ + __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4)) +#define _GLIB_GNUC_DO_PRAGMA(x) _Pragma(G_STRINGIFY (x)) +#define GLIB_DEPRECATED_MACRO _GLIB_GNUC_DO_PRAGMA(GCC warning "Deprecated pre-processor symbol") +#define GLIB_DEPRECATED_MACRO_FOR(f) \ + _GLIB_GNUC_DO_PRAGMA(GCC warning G_STRINGIFY (Deprecated pre-processor symbol: replace with #f)) +#define GLIB_UNAVAILABLE_MACRO(maj,min) \ + _GLIB_GNUC_DO_PRAGMA(GCC warning G_STRINGIFY (Not available before maj.min)) +#else +#define GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_FOR(f) +#define GLIB_UNAVAILABLE_MACRO(maj,min) +#endif + +#if !defined(GLIB_DISABLE_DEPRECATION_WARNINGS) && \ + (G_GNUC_CHECK_VERSION(6, 1) || \ + (defined (__clang_major__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 0)))) +#define GLIB_DEPRECATED_ENUMERATOR G_DEPRECATED +#define GLIB_DEPRECATED_ENUMERATOR_FOR(f) G_DEPRECATED_FOR(f) +#define GLIB_UNAVAILABLE_ENUMERATOR(maj,min) G_UNAVAILABLE(maj,min) +#else +#define GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_FOR(f) +#define GLIB_UNAVAILABLE_ENUMERATOR(maj,min) +#endif + +#if !defined(GLIB_DISABLE_DEPRECATION_WARNINGS) && \ + (G_GNUC_CHECK_VERSION(3, 1) || \ + (defined (__clang_major__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 0)))) +#define GLIB_DEPRECATED_TYPE G_DEPRECATED +#define GLIB_DEPRECATED_TYPE_FOR(f) G_DEPRECATED_FOR(f) +#define GLIB_UNAVAILABLE_TYPE(maj,min) G_UNAVAILABLE(maj,min) +#else +#define GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_FOR(f) +#define GLIB_UNAVAILABLE_TYPE(maj,min) +#endif + +#ifndef __GI_SCANNER__ + +#if g_macro__has_attribute(cleanup) + +/* these macros are private; note that gstdio.h also uses _GLIB_CLEANUP */ +#define _GLIB_AUTOPTR_FUNC_NAME(TypeName) glib_autoptr_cleanup_##TypeName +#define _GLIB_AUTOPTR_CLEAR_FUNC_NAME(TypeName) glib_autoptr_clear_##TypeName +#define _GLIB_AUTOPTR_TYPENAME(TypeName) TypeName##_autoptr +#define _GLIB_AUTOPTR_LIST_FUNC_NAME(TypeName) glib_listautoptr_cleanup_##TypeName +#define _GLIB_AUTOPTR_LIST_TYPENAME(TypeName) TypeName##_listautoptr +#define _GLIB_AUTOPTR_SLIST_FUNC_NAME(TypeName) glib_slistautoptr_cleanup_##TypeName +#define _GLIB_AUTOPTR_SLIST_TYPENAME(TypeName) TypeName##_slistautoptr +#define _GLIB_AUTOPTR_QUEUE_FUNC_NAME(TypeName) glib_queueautoptr_cleanup_##TypeName +#define _GLIB_AUTOPTR_QUEUE_TYPENAME(TypeName) TypeName##_queueautoptr +#define _GLIB_AUTO_FUNC_NAME(TypeName) glib_auto_cleanup_##TypeName +#define _GLIB_CLEANUP(func) __attribute__((cleanup(func))) +#define _GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS(TypeName, ParentName, cleanup) \ + typedef TypeName *_GLIB_AUTOPTR_TYPENAME(TypeName); \ + typedef GList *_GLIB_AUTOPTR_LIST_TYPENAME(TypeName); \ + typedef GSList *_GLIB_AUTOPTR_SLIST_TYPENAME(TypeName); \ + typedef GQueue *_GLIB_AUTOPTR_QUEUE_TYPENAME(TypeName); \ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + static G_GNUC_UNUSED inline void _GLIB_AUTOPTR_CLEAR_FUNC_NAME(TypeName) (TypeName *_ptr) \ + { if (_ptr) (cleanup) ((ParentName *) _ptr); } \ + static G_GNUC_UNUSED inline void _GLIB_AUTOPTR_FUNC_NAME(TypeName) (TypeName **_ptr) \ + { _GLIB_AUTOPTR_CLEAR_FUNC_NAME(TypeName) (*_ptr); } \ + static G_GNUC_UNUSED inline void _GLIB_AUTOPTR_LIST_FUNC_NAME(TypeName) (GList **_l) \ + { g_list_free_full (*_l, (GDestroyNotify) (void(*)(void)) cleanup); } \ + static G_GNUC_UNUSED inline void _GLIB_AUTOPTR_SLIST_FUNC_NAME(TypeName) (GSList **_l) \ + { g_slist_free_full (*_l, (GDestroyNotify) (void(*)(void)) cleanup); } \ + static G_GNUC_UNUSED inline void _GLIB_AUTOPTR_QUEUE_FUNC_NAME(TypeName) (GQueue **_q) \ + { if (*_q) g_queue_free_full (*_q, (GDestroyNotify) (void(*)(void)) cleanup); } \ + G_GNUC_END_IGNORE_DEPRECATIONS +#define _GLIB_DEFINE_AUTOPTR_CHAINUP(ModuleObjName, ParentName) \ + _GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS(ModuleObjName, ParentName, _GLIB_AUTOPTR_CLEAR_FUNC_NAME(ParentName)) + + +/* these macros are API */ +#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func) \ + _GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS(TypeName, TypeName, func) +#define G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TypeName, func) \ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + static G_GNUC_UNUSED inline void _GLIB_AUTO_FUNC_NAME(TypeName) (TypeName *_ptr) { (func) (_ptr); } \ + G_GNUC_END_IGNORE_DEPRECATIONS +#define G_DEFINE_AUTO_CLEANUP_FREE_FUNC(TypeName, func, none) \ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + static G_GNUC_UNUSED inline void _GLIB_AUTO_FUNC_NAME(TypeName) (TypeName *_ptr) { if (*_ptr != none) (func) (*_ptr); } \ + G_GNUC_END_IGNORE_DEPRECATIONS +#define g_autoptr(TypeName) _GLIB_CLEANUP(_GLIB_AUTOPTR_FUNC_NAME(TypeName)) _GLIB_AUTOPTR_TYPENAME(TypeName) +#define g_autolist(TypeName) _GLIB_CLEANUP(_GLIB_AUTOPTR_LIST_FUNC_NAME(TypeName)) _GLIB_AUTOPTR_LIST_TYPENAME(TypeName) +#define g_autoslist(TypeName) _GLIB_CLEANUP(_GLIB_AUTOPTR_SLIST_FUNC_NAME(TypeName)) _GLIB_AUTOPTR_SLIST_TYPENAME(TypeName) +#define g_autoqueue(TypeName) _GLIB_CLEANUP(_GLIB_AUTOPTR_QUEUE_FUNC_NAME(TypeName)) _GLIB_AUTOPTR_QUEUE_TYPENAME(TypeName) +#define g_auto(TypeName) _GLIB_CLEANUP(_GLIB_AUTO_FUNC_NAME(TypeName)) TypeName +#define g_autofree _GLIB_CLEANUP(g_autoptr_cleanup_generic_gfree) + +#else /* not GNU C */ +/* this (dummy) macro is private */ +#define _GLIB_DEFINE_AUTOPTR_CHAINUP(ModuleObjName, ParentName) + +/* these (dummy) macros are API */ +#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func) +#define G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TypeName, func) +#define G_DEFINE_AUTO_CLEANUP_FREE_FUNC(TypeName, func, none) + +/* no declaration of g_auto() or g_autoptr() here */ +#endif /* __GNUC__ */ + +#else + +#define _GLIB_DEFINE_AUTOPTR_CHAINUP(ModuleObjName, ParentName) + +#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func) +#define G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TypeName, func) +#define G_DEFINE_AUTO_CLEANUP_FREE_FUNC(TypeName, func, none) + +#endif /* __GI_SCANNER__ */ + +/** + * G_SIZEOF_MEMBER: + * @struct_type: a structure type, e.g. #GOutputVector + * @member: a field in the structure, e.g. `size` + * + * Returns the size of @member in the struct definition without having a + * declared instance of @struct_type. + * + * Returns: the size of @member in bytes. + * + * Since: 2.64 + */ +#define G_SIZEOF_MEMBER(struct_type, member) \ + GLIB_AVAILABLE_MACRO_IN_2_64 \ + sizeof (((struct_type *) 0)->member) + +#endif /* __G_MACROS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmain.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmain.h new file mode 100644 index 0000000..14a1d2b --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmain.h @@ -0,0 +1,862 @@ +/* gmain.h - the GLib Main loop + * Copyright (C) 1998-2000 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_MAIN_H__ +#define __G_MAIN_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include + +G_BEGIN_DECLS + +typedef enum /*< flags >*/ +{ + G_IO_IN GLIB_SYSDEF_POLLIN, + G_IO_OUT GLIB_SYSDEF_POLLOUT, + G_IO_PRI GLIB_SYSDEF_POLLPRI, + G_IO_ERR GLIB_SYSDEF_POLLERR, + G_IO_HUP GLIB_SYSDEF_POLLHUP, + G_IO_NVAL GLIB_SYSDEF_POLLNVAL +} GIOCondition; + +/** + * GMainContextFlags: + * @G_MAIN_CONTEXT_FLAGS_NONE: Default behaviour. + * @G_MAIN_CONTEXT_FLAGS_OWNERLESS_POLLING: Assume that polling for events will + * free the thread to process other jobs. That's useful if you're using + * `g_main_context_{prepare,query,check,dispatch}` to integrate GMainContext in + * other event loops. + * + * Flags to pass to g_main_context_new_with_flags() which affect the behaviour + * of a #GMainContext. + * + * Since: 2.72 + */ +GLIB_AVAILABLE_TYPE_IN_2_72 +typedef enum /*< flags >*/ +{ + G_MAIN_CONTEXT_FLAGS_NONE = 0, + G_MAIN_CONTEXT_FLAGS_OWNERLESS_POLLING = 1 +} GMainContextFlags; + + +/** + * GMainContext: + * + * The `GMainContext` struct is an opaque data + * type representing a set of sources to be handled in a main loop. + */ +typedef struct _GMainContext GMainContext; + +/** + * GMainLoop: + * + * The `GMainLoop` struct is an opaque data type + * representing the main event loop of a GLib or GTK application. + */ +typedef struct _GMainLoop GMainLoop; + +/** + * GSource: + * + * The `GSource` struct is an opaque data type + * representing an event source. + */ +typedef struct _GSource GSource; +typedef struct _GSourcePrivate GSourcePrivate; + +/** + * GSourceCallbackFuncs: + * @ref: Called when a reference is added to the callback object + * @unref: Called when a reference to the callback object is dropped + * @get: Called to extract the callback function and data from the + * callback object. + * + * The `GSourceCallbackFuncs` struct contains + * functions for managing callback objects. + */ +typedef struct _GSourceCallbackFuncs GSourceCallbackFuncs; + +/** + * GSourceFuncs: + * @prepare: Called before all the file descriptors are polled. If the + * source can determine that it is ready here (without waiting for the + * results of the poll() call) it should return %TRUE. It can also return + * a @timeout_ value which should be the maximum timeout (in milliseconds) + * which should be passed to the poll() call. The actual timeout used will + * be -1 if all sources returned -1, or it will be the minimum of all + * the @timeout_ values returned which were >= 0. Since 2.36 this may + * be %NULL, in which case the effect is as if the function always returns + * %FALSE with a timeout of -1. If @prepare returns a + * timeout and the source also has a ready time set, then the + * lower of the two will be used. + * @check: Called after all the file descriptors are polled. The source + * should return %TRUE if it is ready to be dispatched. Note that some + * time may have passed since the previous prepare function was called, + * so the source should be checked again here. Since 2.36 this may + * be %NULL, in which case the effect is as if the function always returns + * %FALSE. + * @dispatch: Called to dispatch the event source, after it has returned + * %TRUE in either its @prepare or its @check function, or if a ready time + * has been reached. The @dispatch function receives a callback function and + * user data. The callback function may be %NULL if the source was never + * connected to a callback using g_source_set_callback(). The @dispatch + * function should call the callback function with @user_data and whatever + * additional parameters are needed for this type of event source. The + * return value of the @dispatch function should be %G_SOURCE_REMOVE if the + * source should be removed or %G_SOURCE_CONTINUE to keep it. + * @finalize: Called when the source is finalized. At this point, the source + * will have been destroyed, had its callback cleared, and have been removed + * from its #GMainContext, but it will still have its final reference count, + * so methods can be called on it from within this function. + * + * The `GSourceFuncs` struct contains a table of + * functions used to handle event sources in a generic manner. + * + * For idle sources, the prepare and check functions always return %TRUE + * to indicate that the source is always ready to be processed. The prepare + * function also returns a timeout value of 0 to ensure that the poll() call + * doesn't block (since that would be time wasted which could have been spent + * running the idle function). + * + * For timeout sources, the prepare and check functions both return %TRUE + * if the timeout interval has expired. The prepare function also returns + * a timeout value to ensure that the poll() call doesn't block too long + * and miss the next timeout. + * + * For file descriptor sources, the prepare function typically returns %FALSE, + * since it must wait until poll() has been called before it knows whether + * any events need to be processed. It sets the returned timeout to -1 to + * indicate that it doesn't mind how long the poll() call blocks. In the + * check function, it tests the results of the poll() call to see if the + * required condition has been met, and returns %TRUE if so. + */ +typedef struct _GSourceFuncs GSourceFuncs; + +/** + * GPid: + * + * A type which is used to hold a process identification. + * + * On UNIX, processes are identified by a process id (an integer), + * while Windows uses process handles (which are pointers). + * + * GPid is used in GLib only for descendant processes spawned with + * the g_spawn functions. + */ +/* defined in glibconfig.h */ + +/** + * G_PID_FORMAT: + * + * A format specifier that can be used in printf()-style format strings + * when printing a #GPid. + * + * Since: 2.50 + */ +/* defined in glibconfig.h */ + +/** + * GSourceFunc: + * @user_data: data passed to the function, set when the source was + * created with one of the above functions + * + * Specifies the type of function passed to g_timeout_add(), + * g_timeout_add_full(), g_idle_add(), and g_idle_add_full(). + * + * When calling g_source_set_callback(), you may need to cast a function of a + * different type to this type. Use G_SOURCE_FUNC() to avoid warnings about + * incompatible function types. + * + * Returns: %FALSE if the source should be removed. %G_SOURCE_CONTINUE and + * %G_SOURCE_REMOVE are more memorable names for the return value. + */ +typedef gboolean (*GSourceFunc) (gpointer user_data); + +/** + * GSourceOnceFunc: + * @user_data: data passed to the function, set when the source was + * created + * + * A source function that is only called once before being removed from the main + * context automatically. + * + * See: g_idle_add_once(), g_timeout_add_once() + * + * Since: 2.74 + */ +typedef void (* GSourceOnceFunc) (gpointer user_data); + +/** + * G_SOURCE_FUNC: + * @f: a function pointer. + * + * Cast a function pointer to a #GSourceFunc, suppressing warnings from GCC 8 + * onwards with `-Wextra` or `-Wcast-function-type` enabled about the function + * types being incompatible. + * + * For example, the correct type of callback for a source created by + * g_child_watch_source_new() is #GChildWatchFunc, which accepts more arguments + * than #GSourceFunc. Casting the function with `(GSourceFunc)` to call + * g_source_set_callback() will trigger a warning, even though it will be cast + * back to the correct type before it is called by the source. + * + * Since: 2.58 + */ +#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f)) GLIB_AVAILABLE_MACRO_IN_2_58 + +/** + * GChildWatchFunc: + * @pid: the process id of the child process + * @wait_status: Status information about the child process, encoded + * in a platform-specific manner + * @user_data: user data passed to g_child_watch_add() + * + * Prototype of a #GChildWatchSource callback, called when a child + * process has exited. + * + * To interpret @wait_status, see the documentation + * for g_spawn_check_wait_status(). In particular, + * on Unix platforms, note that it is usually not equal + * to the integer passed to `exit()` or returned from `main()`. + */ +typedef void (*GChildWatchFunc) (GPid pid, + gint wait_status, + gpointer user_data); + + +/** + * GSourceDisposeFunc: + * @source: #GSource that is currently being disposed + * + * Dispose function for @source. See g_source_set_dispose_function() for + * details. + * + * Since: 2.64 + */ +GLIB_AVAILABLE_TYPE_IN_2_64 +typedef void (*GSourceDisposeFunc) (GSource *source); + +struct _GSource +{ + /*< private >*/ + gpointer callback_data; + GSourceCallbackFuncs *callback_funcs; + + const GSourceFuncs *source_funcs; + guint ref_count; + + GMainContext *context; + + gint priority; + guint flags; + guint source_id; + + GSList *poll_fds; + + GSource *prev; + GSource *next; + + char *name; + + GSourcePrivate *priv; +}; + +struct _GSourceCallbackFuncs +{ + void (*ref) (gpointer cb_data); + void (*unref) (gpointer cb_data); + void (*get) (gpointer cb_data, + GSource *source, + GSourceFunc *func, + gpointer *data); +}; + +/** + * GSourceDummyMarshal: + * + * This is just a placeholder for #GClosureMarshal, + * which cannot be used here for dependency reasons. + */ +typedef void (*GSourceDummyMarshal) (void); + +struct _GSourceFuncs +{ + gboolean (*prepare) (GSource *source, + gint *timeout_);/* Can be NULL */ + gboolean (*check) (GSource *source);/* Can be NULL */ + gboolean (*dispatch) (GSource *source, + GSourceFunc callback, + gpointer user_data); + void (*finalize) (GSource *source); /* Can be NULL */ + + /*< private >*/ + /* For use by g_source_set_closure */ + GSourceFunc closure_callback; + GSourceDummyMarshal closure_marshal; /* Really is of type GClosureMarshal */ +}; + +/* Standard priorities */ + +/** + * G_PRIORITY_HIGH: + * + * Use this for high priority event sources. + * + * It is not used within GLib or GTK. + */ +#define G_PRIORITY_HIGH -100 + +/** + * G_PRIORITY_DEFAULT: + * + * Use this for default priority event sources. + * + * In GLib this priority is used when adding timeout functions + * with g_timeout_add(). In GDK this priority is used for events + * from the X server. + */ +#define G_PRIORITY_DEFAULT 0 + +/** + * G_PRIORITY_HIGH_IDLE: + * + * Use this for high priority idle functions. + * + * GTK uses %G_PRIORITY_HIGH_IDLE + 10 for resizing operations, + * and %G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is + * done to ensure that any pending resizes are processed before any + * pending redraws, so that widgets are not redrawn twice unnecessarily.) + */ +#define G_PRIORITY_HIGH_IDLE 100 + +/** + * G_PRIORITY_DEFAULT_IDLE: + * + * Use this for default priority idle functions. + * + * In GLib this priority is used when adding idle functions with + * g_idle_add(). + */ +#define G_PRIORITY_DEFAULT_IDLE 200 + +/** + * G_PRIORITY_LOW: + * + * Use this for very low priority background tasks. + * + * It is not used within GLib or GTK. + */ +#define G_PRIORITY_LOW 300 + +/** + * G_SOURCE_REMOVE: + * + * Use this macro as the return value of a #GSourceFunc to remove + * the #GSource from the main loop. + * + * Since: 2.32 + */ +#define G_SOURCE_REMOVE FALSE + +/** + * G_SOURCE_CONTINUE: + * + * Use this macro as the return value of a #GSourceFunc to leave + * the #GSource in the main loop. + * + * Since: 2.32 + */ +#define G_SOURCE_CONTINUE TRUE + +/* GMainContext: */ + +GLIB_AVAILABLE_IN_ALL +GMainContext *g_main_context_new (void); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_AVAILABLE_IN_2_72 +GMainContext *g_main_context_new_with_flags (GMainContextFlags flags); +G_GNUC_END_IGNORE_DEPRECATIONS +GLIB_AVAILABLE_IN_ALL +GMainContext *g_main_context_ref (GMainContext *context); +GLIB_AVAILABLE_IN_ALL +void g_main_context_unref (GMainContext *context); +GLIB_AVAILABLE_IN_ALL +GMainContext *g_main_context_default (void); + +GLIB_AVAILABLE_IN_ALL +gboolean g_main_context_iteration (GMainContext *context, + gboolean may_block); +GLIB_AVAILABLE_IN_ALL +gboolean g_main_context_pending (GMainContext *context); + +/* For implementation of legacy interfaces + */ +GLIB_AVAILABLE_IN_ALL +GSource *g_main_context_find_source_by_id (GMainContext *context, + guint source_id); +GLIB_AVAILABLE_IN_ALL +GSource *g_main_context_find_source_by_user_data (GMainContext *context, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GSource *g_main_context_find_source_by_funcs_user_data (GMainContext *context, + GSourceFuncs *funcs, + gpointer user_data); + +/* Low level functions for implementing custom main loops. + */ +GLIB_AVAILABLE_IN_ALL +void g_main_context_wakeup (GMainContext *context); +GLIB_AVAILABLE_IN_ALL +gboolean g_main_context_acquire (GMainContext *context); +GLIB_AVAILABLE_IN_ALL +void g_main_context_release (GMainContext *context); +GLIB_AVAILABLE_IN_ALL +gboolean g_main_context_is_owner (GMainContext *context); +GLIB_DEPRECATED_IN_2_58_FOR(g_main_context_is_owner) +gboolean g_main_context_wait (GMainContext *context, + GCond *cond, + GMutex *mutex); + +GLIB_AVAILABLE_IN_ALL +gboolean g_main_context_prepare (GMainContext *context, + gint *priority); +GLIB_AVAILABLE_IN_ALL +gint g_main_context_query (GMainContext *context, + gint max_priority, + gint *timeout_, + GPollFD *fds, + gint n_fds); +GLIB_AVAILABLE_IN_ALL +gboolean g_main_context_check (GMainContext *context, + gint max_priority, + GPollFD *fds, + gint n_fds); +GLIB_AVAILABLE_IN_ALL +void g_main_context_dispatch (GMainContext *context); + +GLIB_AVAILABLE_IN_ALL +void g_main_context_set_poll_func (GMainContext *context, + GPollFunc func); +GLIB_AVAILABLE_IN_ALL +GPollFunc g_main_context_get_poll_func (GMainContext *context); + +/* Low level functions for use by source implementations + */ +GLIB_AVAILABLE_IN_ALL +void g_main_context_add_poll (GMainContext *context, + GPollFD *fd, + gint priority); +GLIB_AVAILABLE_IN_ALL +void g_main_context_remove_poll (GMainContext *context, + GPollFD *fd); + +GLIB_AVAILABLE_IN_ALL +gint g_main_depth (void); +GLIB_AVAILABLE_IN_ALL +GSource *g_main_current_source (void); + +/* GMainContexts for other threads + */ +GLIB_AVAILABLE_IN_ALL +void g_main_context_push_thread_default (GMainContext *context); +GLIB_AVAILABLE_IN_ALL +void g_main_context_pop_thread_default (GMainContext *context); +GLIB_AVAILABLE_IN_ALL +GMainContext *g_main_context_get_thread_default (void); +GLIB_AVAILABLE_IN_ALL +GMainContext *g_main_context_ref_thread_default (void); + +/** + * GMainContextPusher: + * + * Opaque type. See g_main_context_pusher_new() for details. + * + * Since: 2.64 + */ +typedef void GMainContextPusher GLIB_AVAILABLE_TYPE_IN_2_64; + +/** + * g_main_context_pusher_new: + * @main_context: (transfer none): a main context to push + * + * Push @main_context as the new thread-default main context for the current + * thread, using g_main_context_push_thread_default(), and return a new + * #GMainContextPusher. Pop with g_main_context_pusher_free(). Using + * g_main_context_pop_thread_default() on @main_context while a + * #GMainContextPusher exists for it can lead to undefined behaviour. + * + * Using two #GMainContextPushers in the same scope is not allowed, as it leads + * to an undefined pop order. + * + * This is intended to be used with g_autoptr(). Note that g_autoptr() + * is only available when using GCC or clang, so the following example + * will only work with those compilers: + * |[ + * typedef struct + * { + * ... + * GMainContext *context; + * ... + * } MyObject; + * + * static void + * my_object_do_stuff (MyObject *self) + * { + * g_autoptr(GMainContextPusher) pusher = g_main_context_pusher_new (self->context); + * + * // Code with main context as the thread default here + * + * if (cond) + * // No need to pop + * return; + * + * // Optionally early pop + * g_clear_pointer (&pusher, g_main_context_pusher_free); + * + * // Code with main context no longer the thread default here + * } + * ]| + * + * Returns: (transfer full): a #GMainContextPusher + * Since: 2.64 + */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_AVAILABLE_STATIC_INLINE_IN_2_64 +static inline GMainContextPusher * +g_main_context_pusher_new (GMainContext *main_context) +{ + g_main_context_push_thread_default (main_context); + return (GMainContextPusher *) main_context; +} +G_GNUC_END_IGNORE_DEPRECATIONS + +/** + * g_main_context_pusher_free: + * @pusher: (transfer full): a #GMainContextPusher + * + * Pop @pusher’s main context as the thread default main context. + * See g_main_context_pusher_new() for details. + * + * This will pop the #GMainContext as the current thread-default main context, + * but will not call g_main_context_unref() on it. + * + * Since: 2.64 + */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_AVAILABLE_STATIC_INLINE_IN_2_64 +static inline void +g_main_context_pusher_free (GMainContextPusher *pusher) +{ + g_main_context_pop_thread_default ((GMainContext *) pusher); +} +G_GNUC_END_IGNORE_DEPRECATIONS + +/* GMainLoop: */ + +GLIB_AVAILABLE_IN_ALL +GMainLoop *g_main_loop_new (GMainContext *context, + gboolean is_running); +GLIB_AVAILABLE_IN_ALL +void g_main_loop_run (GMainLoop *loop); +GLIB_AVAILABLE_IN_ALL +void g_main_loop_quit (GMainLoop *loop); +GLIB_AVAILABLE_IN_ALL +GMainLoop *g_main_loop_ref (GMainLoop *loop); +GLIB_AVAILABLE_IN_ALL +void g_main_loop_unref (GMainLoop *loop); +GLIB_AVAILABLE_IN_ALL +gboolean g_main_loop_is_running (GMainLoop *loop); +GLIB_AVAILABLE_IN_ALL +GMainContext *g_main_loop_get_context (GMainLoop *loop); + +/* GSource: */ + +GLIB_AVAILABLE_IN_ALL +GSource *g_source_new (GSourceFuncs *source_funcs, + guint struct_size); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_AVAILABLE_IN_2_64 +void g_source_set_dispose_function (GSource *source, + GSourceDisposeFunc dispose); +G_GNUC_END_IGNORE_DEPRECATIONS + +GLIB_AVAILABLE_IN_ALL +GSource *g_source_ref (GSource *source); +GLIB_AVAILABLE_IN_ALL +void g_source_unref (GSource *source); + +GLIB_AVAILABLE_IN_ALL +guint g_source_attach (GSource *source, + GMainContext *context); +GLIB_AVAILABLE_IN_ALL +void g_source_destroy (GSource *source); + +GLIB_AVAILABLE_IN_ALL +void g_source_set_priority (GSource *source, + gint priority); +GLIB_AVAILABLE_IN_ALL +gint g_source_get_priority (GSource *source); +GLIB_AVAILABLE_IN_ALL +void g_source_set_can_recurse (GSource *source, + gboolean can_recurse); +GLIB_AVAILABLE_IN_ALL +gboolean g_source_get_can_recurse (GSource *source); +GLIB_AVAILABLE_IN_ALL +guint g_source_get_id (GSource *source); + +GLIB_AVAILABLE_IN_ALL +GMainContext *g_source_get_context (GSource *source); + +GLIB_AVAILABLE_IN_ALL +void g_source_set_callback (GSource *source, + GSourceFunc func, + gpointer data, + GDestroyNotify notify); + +GLIB_AVAILABLE_IN_ALL +void g_source_set_funcs (GSource *source, + GSourceFuncs *funcs); +GLIB_AVAILABLE_IN_ALL +gboolean g_source_is_destroyed (GSource *source); + +GLIB_AVAILABLE_IN_ALL +void g_source_set_name (GSource *source, + const char *name); +GLIB_AVAILABLE_IN_2_70 +void g_source_set_static_name (GSource *source, + const char *name); +GLIB_AVAILABLE_IN_ALL +const char * g_source_get_name (GSource *source); +GLIB_AVAILABLE_IN_ALL +void g_source_set_name_by_id (guint tag, + const char *name); + +GLIB_AVAILABLE_IN_2_36 +void g_source_set_ready_time (GSource *source, + gint64 ready_time); +GLIB_AVAILABLE_IN_2_36 +gint64 g_source_get_ready_time (GSource *source); + +#ifdef G_OS_UNIX +GLIB_AVAILABLE_IN_2_36 +gpointer g_source_add_unix_fd (GSource *source, + gint fd, + GIOCondition events); +GLIB_AVAILABLE_IN_2_36 +void g_source_modify_unix_fd (GSource *source, + gpointer tag, + GIOCondition new_events); +GLIB_AVAILABLE_IN_2_36 +void g_source_remove_unix_fd (GSource *source, + gpointer tag); +GLIB_AVAILABLE_IN_2_36 +GIOCondition g_source_query_unix_fd (GSource *source, + gpointer tag); +#endif + +/* Used to implement g_source_connect_closure and internally*/ +GLIB_AVAILABLE_IN_ALL +void g_source_set_callback_indirect (GSource *source, + gpointer callback_data, + GSourceCallbackFuncs *callback_funcs); + +GLIB_AVAILABLE_IN_ALL +void g_source_add_poll (GSource *source, + GPollFD *fd); +GLIB_AVAILABLE_IN_ALL +void g_source_remove_poll (GSource *source, + GPollFD *fd); + +GLIB_AVAILABLE_IN_ALL +void g_source_add_child_source (GSource *source, + GSource *child_source); +GLIB_AVAILABLE_IN_ALL +void g_source_remove_child_source (GSource *source, + GSource *child_source); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED_IN_2_28_FOR(g_source_get_time) +void g_source_get_current_time (GSource *source, + GTimeVal *timeval); +G_GNUC_END_IGNORE_DEPRECATIONS + +GLIB_AVAILABLE_IN_ALL +gint64 g_source_get_time (GSource *source); + + /* void g_source_connect_closure (GSource *source, + GClosure *closure); + */ + +/* Specific source types + */ +GLIB_AVAILABLE_IN_ALL +GSource *g_idle_source_new (void); +GLIB_AVAILABLE_IN_ALL +GSource *g_child_watch_source_new (GPid pid); +GLIB_AVAILABLE_IN_ALL +GSource *g_timeout_source_new (guint interval); +GLIB_AVAILABLE_IN_ALL +GSource *g_timeout_source_new_seconds (guint interval); + +/* Miscellaneous functions + */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED_IN_2_62_FOR(g_get_real_time) +void g_get_current_time (GTimeVal *result); +G_GNUC_END_IGNORE_DEPRECATIONS + +GLIB_AVAILABLE_IN_ALL +gint64 g_get_monotonic_time (void); +GLIB_AVAILABLE_IN_ALL +gint64 g_get_real_time (void); + + +/* Source manipulation by ID */ +GLIB_AVAILABLE_IN_ALL +gboolean g_source_remove (guint tag); +GLIB_AVAILABLE_IN_ALL +gboolean g_source_remove_by_user_data (gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, + gpointer user_data); + +/** + * GClearHandleFunc: + * @handle_id: the handle ID to clear + * + * Specifies the type of function passed to g_clear_handle_id(). + * The implementation is expected to free the resource identified + * by @handle_id; for instance, if @handle_id is a #GSource ID, + * g_source_remove() can be used. + * + * Since: 2.56 + */ +typedef void (* GClearHandleFunc) (guint handle_id); + +GLIB_AVAILABLE_IN_2_56 +void g_clear_handle_id (guint *tag_ptr, + GClearHandleFunc clear_func); + +#define g_clear_handle_id(tag_ptr, clear_func) \ + G_STMT_START { \ + G_STATIC_ASSERT (sizeof *(tag_ptr) == sizeof (guint)); \ + guint *_tag_ptr = (guint *) (tag_ptr); \ + guint _handle_id; \ + \ + _handle_id = *_tag_ptr; \ + if (_handle_id > 0) \ + { \ + *_tag_ptr = 0; \ + clear_func (_handle_id); \ + } \ + } G_STMT_END \ + GLIB_AVAILABLE_MACRO_IN_2_56 + +/* Idles, child watchers and timeouts */ +GLIB_AVAILABLE_IN_ALL +guint g_timeout_add_full (gint priority, + guint interval, + GSourceFunc function, + gpointer data, + GDestroyNotify notify); +GLIB_AVAILABLE_IN_ALL +guint g_timeout_add (guint interval, + GSourceFunc function, + gpointer data); +GLIB_AVAILABLE_IN_2_74 +guint g_timeout_add_once (guint interval, + GSourceOnceFunc function, + gpointer data); +GLIB_AVAILABLE_IN_ALL +guint g_timeout_add_seconds_full (gint priority, + guint interval, + GSourceFunc function, + gpointer data, + GDestroyNotify notify); +GLIB_AVAILABLE_IN_ALL +guint g_timeout_add_seconds (guint interval, + GSourceFunc function, + gpointer data); +GLIB_AVAILABLE_IN_2_78 +guint g_timeout_add_seconds_once (guint interval, + GSourceOnceFunc function, + gpointer data); +GLIB_AVAILABLE_IN_ALL +guint g_child_watch_add_full (gint priority, + GPid pid, + GChildWatchFunc function, + gpointer data, + GDestroyNotify notify); +GLIB_AVAILABLE_IN_ALL +guint g_child_watch_add (GPid pid, + GChildWatchFunc function, + gpointer data); +GLIB_AVAILABLE_IN_ALL +guint g_idle_add (GSourceFunc function, + gpointer data); +GLIB_AVAILABLE_IN_ALL +guint g_idle_add_full (gint priority, + GSourceFunc function, + gpointer data, + GDestroyNotify notify); +GLIB_AVAILABLE_IN_2_74 +guint g_idle_add_once (GSourceOnceFunc function, + gpointer data); +GLIB_AVAILABLE_IN_ALL +gboolean g_idle_remove_by_data (gpointer data); + +GLIB_AVAILABLE_IN_ALL +void g_main_context_invoke_full (GMainContext *context, + gint priority, + GSourceFunc function, + gpointer data, + GDestroyNotify notify); +GLIB_AVAILABLE_IN_ALL +void g_main_context_invoke (GMainContext *context, + GSourceFunc function, + gpointer data); + +GLIB_AVAILABLE_STATIC_INLINE_IN_2_70 +static inline int +g_steal_fd (int *fd_ptr) +{ + int fd = *fd_ptr; + *fd_ptr = -1; + return fd; +} + +/* Hook for GClosure / GSource integration. Don't touch */ +GLIB_VAR GSourceFuncs g_timeout_funcs; +GLIB_VAR GSourceFuncs g_child_watch_funcs; +GLIB_VAR GSourceFuncs g_idle_funcs; +#ifdef G_OS_UNIX +GLIB_VAR GSourceFuncs g_unix_signal_funcs; +GLIB_VAR GSourceFuncs g_unix_fd_source_funcs; +#endif + +G_END_DECLS + +#endif /* __G_MAIN_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmappedfile.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmappedfile.h new file mode 100644 index 0000000..4f5f698 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmappedfile.h @@ -0,0 +1,60 @@ +/* GLIB - Library of useful routines for C programming + * gmappedfile.h: Simplified wrapper around the mmap function + * + * Copyright 2005 Matthias Clasen + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef __G_MAPPED_FILE_H__ +#define __G_MAPPED_FILE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +typedef struct _GMappedFile GMappedFile; + +GLIB_AVAILABLE_IN_ALL +GMappedFile *g_mapped_file_new (const gchar *filename, + gboolean writable, + GError **error); +GLIB_AVAILABLE_IN_ALL +GMappedFile *g_mapped_file_new_from_fd (gint fd, + gboolean writable, + GError **error); +GLIB_AVAILABLE_IN_ALL +gsize g_mapped_file_get_length (GMappedFile *file); +GLIB_AVAILABLE_IN_ALL +gchar *g_mapped_file_get_contents (GMappedFile *file); +GLIB_AVAILABLE_IN_2_34 +GBytes * g_mapped_file_get_bytes (GMappedFile *file); +GLIB_AVAILABLE_IN_ALL +GMappedFile *g_mapped_file_ref (GMappedFile *file); +GLIB_AVAILABLE_IN_ALL +void g_mapped_file_unref (GMappedFile *file); + +GLIB_DEPRECATED_FOR(g_mapped_file_unref) +void g_mapped_file_free (GMappedFile *file); + +G_END_DECLS + +#endif /* __G_MAPPED_FILE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmarkup.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmarkup.h new file mode 100644 index 0000000..5b57813 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmarkup.h @@ -0,0 +1,265 @@ +/* gmarkup.h - Simple XML-like string parser/writer + * + * Copyright 2000 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_MARKUP_H__ +#define __G_MARKUP_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +#include +#include + +G_BEGIN_DECLS + +/** + * GMarkupError: + * @G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8 + * @G_MARKUP_ERROR_EMPTY: document contained nothing, or only whitespace + * @G_MARKUP_ERROR_PARSE: document was ill-formed + * @G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser + * functions; element wasn't known + * @G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser + * functions; attribute wasn't known + * @G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser + * functions; content was invalid + * @G_MARKUP_ERROR_MISSING_ATTRIBUTE: error should be set by #GMarkupParser + * functions; a required attribute was missing + * + * Error codes returned by markup parsing. + */ +typedef enum +{ + G_MARKUP_ERROR_BAD_UTF8, + G_MARKUP_ERROR_EMPTY, + G_MARKUP_ERROR_PARSE, + /* The following are primarily intended for specific GMarkupParser + * implementations to set. + */ + G_MARKUP_ERROR_UNKNOWN_ELEMENT, + G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, + G_MARKUP_ERROR_INVALID_CONTENT, + G_MARKUP_ERROR_MISSING_ATTRIBUTE +} GMarkupError; + +/** + * G_MARKUP_ERROR: + * + * Error domain for markup parsing. + * Errors in this domain will be from the #GMarkupError enumeration. + * See #GError for information on error domains. + */ +#define G_MARKUP_ERROR g_markup_error_quark () + +GLIB_AVAILABLE_IN_ALL +GQuark g_markup_error_quark (void); + +/** + * GMarkupParseFlags: + * @G_MARKUP_DEFAULT_FLAGS: No special behaviour. Since: 2.74 + * @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use + * @G_MARKUP_TREAT_CDATA_AS_TEXT: When this flag is set, CDATA marked + * sections are not passed literally to the @passthrough function of + * the parser. Instead, the content of the section (without the + * ``) is + * passed to the @text function. This flag was added in GLib 2.12 + * @G_MARKUP_PREFIX_ERROR_POSITION: Normally errors caught by GMarkup + * itself have line/column information prefixed to them to let the + * caller know the location of the error. When this flag is set the + * location information is also prefixed to errors generated by the + * #GMarkupParser implementation functions + * @G_MARKUP_IGNORE_QUALIFIED: Ignore (don't report) qualified + * attributes and tags, along with their contents. A qualified + * attribute or tag is one that contains ':' in its name (ie: is in + * another namespace). Since: 2.40. + * + * Flags that affect the behaviour of the parser. + */ +typedef enum +{ + G_MARKUP_DEFAULT_FLAGS GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0, + G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 << 0, + G_MARKUP_TREAT_CDATA_AS_TEXT = 1 << 1, + G_MARKUP_PREFIX_ERROR_POSITION = 1 << 2, + G_MARKUP_IGNORE_QUALIFIED = 1 << 3 +} GMarkupParseFlags; + +/** + * GMarkupParseContext: + * + * A parse context is used to parse a stream of bytes that + * you expect to contain marked-up text. + * + * See g_markup_parse_context_new(), #GMarkupParser, and so + * on for more details. + */ +typedef struct _GMarkupParseContext GMarkupParseContext; +typedef struct _GMarkupParser GMarkupParser; + +/** + * GMarkupParser: + * @start_element: Callback to invoke when the opening tag of an element + * is seen. The callback's @attribute_names and @attribute_values parameters + * are %NULL-terminated. + * @end_element: Callback to invoke when the closing tag of an element + * is seen. Note that this is also called for empty tags like + * ``. + * @text: Callback to invoke when some text is seen (text is always + * inside an element). Note that the text of an element may be spread + * over multiple calls of this function. If the + * %G_MARKUP_TREAT_CDATA_AS_TEXT flag is set, this function is also + * called for the content of CDATA marked sections. + * @passthrough: Callback to invoke for comments, processing instructions + * and doctype declarations; if you're re-writing the parsed document, + * write the passthrough text back out in the same position. If the + * %G_MARKUP_TREAT_CDATA_AS_TEXT flag is not set, this function is also + * called for CDATA marked sections. + * @error: Callback to invoke when an error occurs. + * + * Any of the fields in #GMarkupParser can be %NULL, in which case they + * will be ignored. Except for the @error function, any of these callbacks + * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT, + * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT + * errors are intended to be set from these callbacks. If you set an error + * from a callback, g_markup_parse_context_parse() will report that error + * back to its caller. + */ +struct _GMarkupParser +{ + /* Called for open tags */ + void (*start_element) (GMarkupParseContext *context, + const gchar *element_name, + const gchar **attribute_names, + const gchar **attribute_values, + gpointer user_data, + GError **error); + + /* Called for close tags */ + void (*end_element) (GMarkupParseContext *context, + const gchar *element_name, + gpointer user_data, + GError **error); + + /* Called for character data */ + /* text is not nul-terminated */ + void (*text) (GMarkupParseContext *context, + const gchar *text, + gsize text_len, + gpointer user_data, + GError **error); + + /* Called for strings that should be re-saved verbatim in this same + * position, but are not otherwise interpretable. At the moment + * this includes comments and processing instructions. + */ + /* text is not nul-terminated. */ + void (*passthrough) (GMarkupParseContext *context, + const gchar *passthrough_text, + gsize text_len, + gpointer user_data, + GError **error); + + /* Called on error, including one set by other + * methods in the vtable. The GError should not be freed. + */ + void (*error) (GMarkupParseContext *context, + GError *error, + gpointer user_data); +}; + +GLIB_AVAILABLE_IN_ALL +GMarkupParseContext *g_markup_parse_context_new (const GMarkupParser *parser, + GMarkupParseFlags flags, + gpointer user_data, + GDestroyNotify user_data_dnotify); +GLIB_AVAILABLE_IN_2_36 +GMarkupParseContext *g_markup_parse_context_ref (GMarkupParseContext *context); +GLIB_AVAILABLE_IN_2_36 +void g_markup_parse_context_unref (GMarkupParseContext *context); +GLIB_AVAILABLE_IN_ALL +void g_markup_parse_context_free (GMarkupParseContext *context); +GLIB_AVAILABLE_IN_ALL +gboolean g_markup_parse_context_parse (GMarkupParseContext *context, + const gchar *text, + gssize text_len, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_markup_parse_context_push (GMarkupParseContext *context, + const GMarkupParser *parser, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gpointer g_markup_parse_context_pop (GMarkupParseContext *context); + +GLIB_AVAILABLE_IN_ALL +gboolean g_markup_parse_context_end_parse (GMarkupParseContext *context, + GError **error); +GLIB_AVAILABLE_IN_ALL +const gchar * g_markup_parse_context_get_element (GMarkupParseContext *context); +GLIB_AVAILABLE_IN_ALL +const GSList * g_markup_parse_context_get_element_stack (GMarkupParseContext *context); + +/* For user-constructed error messages, has no precise semantics */ +GLIB_AVAILABLE_IN_ALL +void g_markup_parse_context_get_position (GMarkupParseContext *context, + gint *line_number, + gint *char_number); +GLIB_AVAILABLE_IN_ALL +gpointer g_markup_parse_context_get_user_data (GMarkupParseContext *context); + +/* useful when saving */ +GLIB_AVAILABLE_IN_ALL +gchar* g_markup_escape_text (const gchar *text, + gssize length); + +GLIB_AVAILABLE_IN_ALL +gchar *g_markup_printf_escaped (const char *format, + ...) G_GNUC_PRINTF (1, 2); +GLIB_AVAILABLE_IN_ALL +gchar *g_markup_vprintf_escaped (const char *format, + va_list args) G_GNUC_PRINTF(1, 0); + +typedef enum +{ + G_MARKUP_COLLECT_INVALID, + G_MARKUP_COLLECT_STRING, + G_MARKUP_COLLECT_STRDUP, + G_MARKUP_COLLECT_BOOLEAN, + G_MARKUP_COLLECT_TRISTATE, + + G_MARKUP_COLLECT_OPTIONAL = (1 << 16) +} GMarkupCollectType; + + +/* useful from start_element */ +GLIB_AVAILABLE_IN_ALL +gboolean g_markup_collect_attributes (const gchar *element_name, + const gchar **attribute_names, + const gchar **attribute_values, + GError **error, + GMarkupCollectType first_type, + const gchar *first_attr, + ...); + +G_END_DECLS + +#endif /* __G_MARKUP_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmem.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmem.h new file mode 100644 index 0000000..9f3d427 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmem.h @@ -0,0 +1,425 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_MEM_H__ +#define __G_MEM_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +/** + * GMemVTable: + * @malloc: function to use for allocating memory. + * @realloc: function to use for reallocating memory. + * @free: function to use to free memory. + * @calloc: function to use for allocating zero-filled memory. + * @try_malloc: function to use for allocating memory without a default error handler. + * @try_realloc: function to use for reallocating memory without a default error handler. + * + * A set of functions used to perform memory allocation. The same #GMemVTable must + * be used for all allocations in the same program; a call to g_mem_set_vtable(), + * if it exists, should be prior to any use of GLib. + * + * This functions related to this has been deprecated in 2.46, and no longer work. + */ +typedef struct _GMemVTable GMemVTable; + + +#if GLIB_SIZEOF_VOID_P > GLIB_SIZEOF_LONG +/** + * G_MEM_ALIGN: + * + * Indicates the number of bytes to which memory will be aligned on the + * current platform. + */ +# define G_MEM_ALIGN GLIB_SIZEOF_VOID_P +#else /* GLIB_SIZEOF_VOID_P <= GLIB_SIZEOF_LONG */ +# define G_MEM_ALIGN GLIB_SIZEOF_LONG +#endif /* GLIB_SIZEOF_VOID_P <= GLIB_SIZEOF_LONG */ + + +/* Memory allocation functions + */ + +GLIB_AVAILABLE_IN_ALL +void (g_free) (gpointer mem); +GLIB_AVAILABLE_IN_2_76 +void g_free_sized (gpointer mem, + size_t size); + +GLIB_AVAILABLE_IN_2_34 +void g_clear_pointer (gpointer *pp, + GDestroyNotify destroy); + +GLIB_AVAILABLE_IN_ALL +gpointer g_malloc (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_ALL +gpointer g_malloc0 (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_ALL +gpointer g_realloc (gpointer mem, + gsize n_bytes) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +gpointer g_try_malloc (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_ALL +gpointer g_try_malloc0 (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_ALL +gpointer g_try_realloc (gpointer mem, + gsize n_bytes) G_GNUC_WARN_UNUSED_RESULT; + +GLIB_AVAILABLE_IN_ALL +gpointer g_malloc_n (gsize n_blocks, + gsize n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2); +GLIB_AVAILABLE_IN_ALL +gpointer g_malloc0_n (gsize n_blocks, + gsize n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2); +GLIB_AVAILABLE_IN_ALL +gpointer g_realloc_n (gpointer mem, + gsize n_blocks, + gsize n_block_bytes) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +gpointer g_try_malloc_n (gsize n_blocks, + gsize n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2); +GLIB_AVAILABLE_IN_ALL +gpointer g_try_malloc0_n (gsize n_blocks, + gsize n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2); +GLIB_AVAILABLE_IN_ALL +gpointer g_try_realloc_n (gpointer mem, + gsize n_blocks, + gsize n_block_bytes) G_GNUC_WARN_UNUSED_RESULT; + +GLIB_AVAILABLE_IN_2_72 +gpointer g_aligned_alloc (gsize n_blocks, + gsize n_block_bytes, + gsize alignment) G_GNUC_WARN_UNUSED_RESULT G_GNUC_ALLOC_SIZE2(1,2); +GLIB_AVAILABLE_IN_2_72 +gpointer g_aligned_alloc0 (gsize n_blocks, + gsize n_block_bytes, + gsize alignment) G_GNUC_WARN_UNUSED_RESULT G_GNUC_ALLOC_SIZE2(1,2); +GLIB_AVAILABLE_IN_2_72 +void g_aligned_free (gpointer mem); +GLIB_AVAILABLE_IN_2_76 +void g_aligned_free_sized (gpointer mem, + size_t alignment, + size_t size); + +#if defined(glib_typeof) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_58 +#define g_clear_pointer(pp, destroy) \ + G_STMT_START \ + { \ + G_STATIC_ASSERT (sizeof *(pp) == sizeof (gpointer)); \ + glib_typeof ((pp)) _pp = (pp); \ + glib_typeof (*(pp)) _ptr = *_pp; \ + *_pp = NULL; \ + if (_ptr) \ + (destroy) (_ptr); \ + } \ + G_STMT_END \ + GLIB_AVAILABLE_MACRO_IN_2_34 +#else /* __GNUC__ */ +#define g_clear_pointer(pp, destroy) \ + G_STMT_START { \ + G_STATIC_ASSERT (sizeof *(pp) == sizeof (gpointer)); \ + /* Only one access, please; work around type aliasing */ \ + union { char *in; gpointer *out; } _pp; \ + gpointer _p; \ + /* This assignment is needed to avoid a gcc warning */ \ + GDestroyNotify _destroy = (GDestroyNotify) (destroy); \ + \ + _pp.in = (char *) (pp); \ + _p = *_pp.out; \ + if (_p) \ + { \ + *_pp.out = NULL; \ + _destroy (_p); \ + } \ + } G_STMT_END \ + GLIB_AVAILABLE_MACRO_IN_2_34 +#endif /* __GNUC__ */ + + +#if G_GNUC_CHECK_VERSION (4, 1) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_78 && defined(G_HAVE_FREE_SIZED) + +#define g_free(mem) \ + (__builtin_object_size ((mem), 0) != ((size_t) - 1)) ? \ + g_free_sized (mem, __builtin_object_size ((mem), 0)) : (g_free) (mem) + +#endif /* G_GNUC_CHECK_VERSION (4, 1) && && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_78 && defined(G_HAVE_FREE_SIZED) */ + +/** + * g_steal_pointer: + * @pp: (not nullable): a pointer to a pointer + * + * Sets @pp to %NULL, returning the value that was there before. + * + * Conceptually, this transfers the ownership of the pointer from the + * referenced variable to the "caller" of the macro (ie: "steals" the + * reference). + * + * The return value will be properly typed, according to the type of + * @pp. + * + * This can be very useful when combined with g_autoptr() to prevent the + * return value of a function from being automatically freed. Consider + * the following example (which only works on GCC and clang): + * + * |[ + * GObject * + * create_object (void) + * { + * g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL); + * + * if (early_error_case) + * return NULL; + * + * return g_steal_pointer (&obj); + * } + * ]| + * + * It can also be used in similar ways for 'out' parameters and is + * particularly useful for dealing with optional out parameters: + * + * |[ + * gboolean + * get_object (GObject **obj_out) + * { + * g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL); + * + * if (early_error_case) + * return FALSE; + * + * if (obj_out) + * *obj_out = g_steal_pointer (&obj); + * + * return TRUE; + * } + * ]| + * + * In the above example, the object will be automatically freed in the + * early error case and also in the case that %NULL was given for + * @obj_out. + * + * Since: 2.44 + */ +GLIB_AVAILABLE_STATIC_INLINE_IN_2_44 +static inline gpointer +g_steal_pointer (gpointer pp) +{ + gpointer *ptr = (gpointer *) pp; + gpointer ref; + + ref = *ptr; + *ptr = NULL; + + return ref; +} + +/* type safety */ +#if defined(glib_typeof) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_58 +#define g_steal_pointer(pp) ((glib_typeof (*pp)) (g_steal_pointer) (pp)) +#else /* __GNUC__ */ +/* This version does not depend on gcc extensions, but gcc does not warn + * about incompatible-pointer-types: */ +#define g_steal_pointer(pp) \ + (0 ? (*(pp)) : (g_steal_pointer) (pp)) +#endif /* __GNUC__ */ + +/* Optimise: avoid the call to the (slower) _n function if we can + * determine at compile-time that no overflow happens. + */ +#if defined (__GNUC__) && (__GNUC__ >= 2) && defined (__OPTIMIZE__) +# define _G_NEW(struct_type, n_structs, func) \ + (struct_type *) (G_GNUC_EXTENSION ({ \ + gsize __n = (gsize) (n_structs); \ + gsize __s = sizeof (struct_type); \ + gpointer __p; \ + if (__s == 1) \ + __p = g_##func (__n); \ + else if (__builtin_constant_p (__n) && \ + (__s == 0 || __n <= G_MAXSIZE / __s)) \ + __p = g_##func (__n * __s); \ + else \ + __p = g_##func##_n (__n, __s); \ + __p; \ + })) +# define _G_RENEW(struct_type, mem, n_structs, func) \ + (struct_type *) (G_GNUC_EXTENSION ({ \ + gsize __n = (gsize) (n_structs); \ + gsize __s = sizeof (struct_type); \ + gpointer __p = (gpointer) (mem); \ + if (__s == 1) \ + __p = g_##func (__p, __n); \ + else if (__builtin_constant_p (__n) && \ + (__s == 0 || __n <= G_MAXSIZE / __s)) \ + __p = g_##func (__p, __n * __s); \ + else \ + __p = g_##func##_n (__p, __n, __s); \ + __p; \ + })) + +#else + +/* Unoptimised version: always call the _n() function. */ + +#define _G_NEW(struct_type, n_structs, func) \ + ((struct_type *) g_##func##_n ((n_structs), sizeof (struct_type))) +#define _G_RENEW(struct_type, mem, n_structs, func) \ + ((struct_type *) g_##func##_n (mem, (n_structs), sizeof (struct_type))) + +#endif + +/** + * g_new: + * @struct_type: the type of the elements to allocate + * @n_structs: the number of elements to allocate + * + * Allocates @n_structs elements of type @struct_type. + * The returned pointer is cast to a pointer to the given type. + * If @n_structs is 0 it returns %NULL. + * Care is taken to avoid overflow when calculating the size of the allocated block. + * + * Since the returned pointer is already casted to the right type, + * it is normally unnecessary to cast it explicitly, and doing + * so might hide memory allocation errors. + * + * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type + */ +#define g_new(struct_type, n_structs) _G_NEW (struct_type, n_structs, malloc) +/** + * g_new0: + * @struct_type: the type of the elements to allocate. + * @n_structs: the number of elements to allocate. + * + * Allocates @n_structs elements of type @struct_type, initialized to 0's. + * The returned pointer is cast to a pointer to the given type. + * If @n_structs is 0 it returns %NULL. + * Care is taken to avoid overflow when calculating the size of the allocated block. + * + * Since the returned pointer is already casted to the right type, + * it is normally unnecessary to cast it explicitly, and doing + * so might hide memory allocation errors. + * + * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type. + */ +#define g_new0(struct_type, n_structs) _G_NEW (struct_type, n_structs, malloc0) +/** + * g_renew: + * @struct_type: the type of the elements to allocate + * @mem: the currently allocated memory + * @n_structs: the number of elements to allocate + * + * Reallocates the memory pointed to by @mem, so that it now has space for + * @n_structs elements of type @struct_type. It returns the new address of + * the memory, which may have been moved. + * Care is taken to avoid overflow when calculating the size of the allocated block. + * + * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type + */ +#define g_renew(struct_type, mem, n_structs) _G_RENEW (struct_type, mem, n_structs, realloc) +/** + * g_try_new: + * @struct_type: the type of the elements to allocate + * @n_structs: the number of elements to allocate + * + * Attempts to allocate @n_structs elements of type @struct_type, and returns + * %NULL on failure. Contrast with g_new(), which aborts the program on failure. + * The returned pointer is cast to a pointer to the given type. + * The function returns %NULL when @n_structs is 0 of if an overflow occurs. + * + * Since: 2.8 + * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type + */ +#define g_try_new(struct_type, n_structs) _G_NEW (struct_type, n_structs, try_malloc) +/** + * g_try_new0: + * @struct_type: the type of the elements to allocate + * @n_structs: the number of elements to allocate + * + * Attempts to allocate @n_structs elements of type @struct_type, initialized + * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts + * the program on failure. + * The returned pointer is cast to a pointer to the given type. + * The function returns %NULL when @n_structs is 0 or if an overflow occurs. + * + * Since: 2.8 + * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type + */ +#define g_try_new0(struct_type, n_structs) _G_NEW (struct_type, n_structs, try_malloc0) +/** + * g_try_renew: + * @struct_type: the type of the elements to allocate + * @mem: the currently allocated memory + * @n_structs: the number of elements to allocate + * + * Attempts to reallocate the memory pointed to by @mem, so that it now has + * space for @n_structs elements of type @struct_type, and returns %NULL on + * failure. Contrast with g_renew(), which aborts the program on failure. + * It returns the new address of the memory, which may have been moved. + * The function returns %NULL if an overflow occurs. + * + * Since: 2.8 + * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type + */ +#define g_try_renew(struct_type, mem, n_structs) _G_RENEW (struct_type, mem, n_structs, try_realloc) + + +/* Memory allocation virtualization for debugging purposes + * g_mem_set_vtable() has to be the very first GLib function called + * if being used + */ +struct _GMemVTable { + gpointer (*malloc) (gsize n_bytes); + gpointer (*realloc) (gpointer mem, + gsize n_bytes); + void (*free) (gpointer mem); + /* optional; set to NULL if not used ! */ + gpointer (*calloc) (gsize n_blocks, + gsize n_block_bytes); + gpointer (*try_malloc) (gsize n_bytes); + gpointer (*try_realloc) (gpointer mem, + gsize n_bytes); +}; +GLIB_DEPRECATED_IN_2_46 +void g_mem_set_vtable (GMemVTable *vtable); +GLIB_DEPRECATED_IN_2_46 +gboolean g_mem_is_system_malloc (void); + +GLIB_VAR gboolean g_mem_gc_friendly; + +/* Memory profiler and checker, has to be enabled via g_mem_set_vtable() + */ +GLIB_VAR GMemVTable *glib_mem_profiler_table; +GLIB_DEPRECATED_IN_2_46 +void g_mem_profile (void); + +G_END_DECLS + +#endif /* __G_MEM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmessages.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmessages.h new file mode 100644 index 0000000..eab6d06 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gmessages.h @@ -0,0 +1,690 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_MESSAGES_H__ +#define __G_MESSAGES_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include +#include +#include + +G_BEGIN_DECLS + +/* calculate a string size, guaranteed to fit format + args. + */ +GLIB_AVAILABLE_IN_ALL +gsize g_printf_string_upper_bound (const gchar* format, + va_list args) G_GNUC_PRINTF(1, 0); + +/* Log level shift offset for user defined + * log levels (0-7 are used by GLib). + */ +#define G_LOG_LEVEL_USER_SHIFT (8) + +/* Glib log levels and flags. + */ +typedef enum +{ + /* log flags */ + G_LOG_FLAG_RECURSION = 1 << 0, + G_LOG_FLAG_FATAL = 1 << 1, + + /* GLib log levels */ + G_LOG_LEVEL_ERROR = 1 << 2, /* always fatal */ + G_LOG_LEVEL_CRITICAL = 1 << 3, + G_LOG_LEVEL_WARNING = 1 << 4, + G_LOG_LEVEL_MESSAGE = 1 << 5, + G_LOG_LEVEL_INFO = 1 << 6, + G_LOG_LEVEL_DEBUG = 1 << 7, + + G_LOG_LEVEL_MASK = ~(G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL) +} GLogLevelFlags; + +/* GLib log levels that are considered fatal by default */ +#define G_LOG_FATAL_MASK (G_LOG_FLAG_RECURSION | G_LOG_LEVEL_ERROR) + +typedef void (*GLogFunc) (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data); + +/* Logging mechanism + */ +GLIB_AVAILABLE_IN_ALL +guint g_log_set_handler (const gchar *log_domain, + GLogLevelFlags log_levels, + GLogFunc log_func, + gpointer user_data); +GLIB_AVAILABLE_IN_2_46 +guint g_log_set_handler_full (const gchar *log_domain, + GLogLevelFlags log_levels, + GLogFunc log_func, + gpointer user_data, + GDestroyNotify destroy); +GLIB_AVAILABLE_IN_ALL +void g_log_remove_handler (const gchar *log_domain, + guint handler_id); +GLIB_AVAILABLE_IN_ALL +void g_log_default_handler (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer unused_data); +GLIB_AVAILABLE_IN_ALL +GLogFunc g_log_set_default_handler (GLogFunc log_func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +void g_log (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *format, + ...) G_GNUC_PRINTF (3, 4); +GLIB_AVAILABLE_IN_ALL +void g_logv (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *format, + va_list args) G_GNUC_PRINTF(3, 0); +GLIB_AVAILABLE_IN_ALL +GLogLevelFlags g_log_set_fatal_mask (const gchar *log_domain, + GLogLevelFlags fatal_mask); +GLIB_AVAILABLE_IN_ALL +GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask); + +/* Structured logging mechanism. */ + +/** + * GLogWriterOutput: + * @G_LOG_WRITER_HANDLED: Log writer has handled the log entry. + * @G_LOG_WRITER_UNHANDLED: Log writer could not handle the log entry. + * + * Return values from #GLogWriterFuncs to indicate whether the given log entry + * was successfully handled by the writer, or whether there was an error in + * handling it (and hence a fallback writer should be used). + * + * If a #GLogWriterFunc ignores a log entry, it should return + * %G_LOG_WRITER_HANDLED. + * + * Since: 2.50 + */ +typedef enum +{ + G_LOG_WRITER_HANDLED = 1, + G_LOG_WRITER_UNHANDLED = 0, +} GLogWriterOutput; + +/** + * GLogField: + * @key: field name (UTF-8 string) + * @value: field value (arbitrary bytes) + * @length: length of @value, in bytes, or -1 if it is nul-terminated + * + * Structure representing a single field in a structured log entry. See + * g_log_structured() for details. + * + * Log fields may contain arbitrary values, including binary with embedded nul + * bytes. If the field contains a string, the string must be UTF-8 encoded and + * have a trailing nul byte. Otherwise, @length must be set to a non-negative + * value. + * + * Since: 2.50 + */ +typedef struct _GLogField GLogField; +struct _GLogField +{ + const gchar *key; + gconstpointer value; + gssize length; +}; + +/** + * GLogWriterFunc: + * @log_level: log level of the message + * @fields: (array length=n_fields): fields forming the message + * @n_fields: number of @fields + * @user_data: user data passed to g_log_set_writer_func() + * + * Writer function for log entries. A log entry is a collection of one or more + * #GLogFields, using the standard [field names from journal + * specification](https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html). + * See g_log_structured() for more information. + * + * Writer functions must ignore fields which they do not recognise, unless they + * can write arbitrary binary output, as field values may be arbitrary binary. + * + * @log_level is guaranteed to be included in @fields as the `PRIORITY` field, + * but is provided separately for convenience of deciding whether or where to + * output the log entry. + * + * Writer functions should return %G_LOG_WRITER_HANDLED if they handled the log + * message successfully or if they deliberately ignored it. If there was an + * error handling the message (for example, if the writer function is meant to + * send messages to a remote logging server and there is a network error), it + * should return %G_LOG_WRITER_UNHANDLED. This allows writer functions to be + * chained and fall back to simpler handlers in case of failure. + * + * Returns: %G_LOG_WRITER_HANDLED if the log entry was handled successfully; + * %G_LOG_WRITER_UNHANDLED otherwise + * + * Since: 2.50 + */ +typedef GLogWriterOutput (*GLogWriterFunc) (GLogLevelFlags log_level, + const GLogField *fields, + gsize n_fields, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_50 +void g_log_structured (const gchar *log_domain, + GLogLevelFlags log_level, + ...); +GLIB_AVAILABLE_IN_2_50 +void g_log_structured_array (GLogLevelFlags log_level, + const GLogField *fields, + gsize n_fields); + +GLIB_AVAILABLE_IN_2_50 +void g_log_variant (const gchar *log_domain, + GLogLevelFlags log_level, + GVariant *fields); + +GLIB_AVAILABLE_IN_2_50 +void g_log_set_writer_func (GLogWriterFunc func, + gpointer user_data, + GDestroyNotify user_data_free); + +GLIB_AVAILABLE_IN_2_50 +gboolean g_log_writer_supports_color (gint output_fd); +GLIB_AVAILABLE_IN_2_50 +gboolean g_log_writer_is_journald (gint output_fd); + +GLIB_AVAILABLE_IN_2_50 +gchar *g_log_writer_format_fields (GLogLevelFlags log_level, + const GLogField *fields, + gsize n_fields, + gboolean use_color); + +GLIB_AVAILABLE_IN_2_50 +GLogWriterOutput g_log_writer_journald (GLogLevelFlags log_level, + const GLogField *fields, + gsize n_fields, + gpointer user_data); +GLIB_AVAILABLE_IN_2_50 +GLogWriterOutput g_log_writer_standard_streams (GLogLevelFlags log_level, + const GLogField *fields, + gsize n_fields, + gpointer user_data); +GLIB_AVAILABLE_IN_2_50 +GLogWriterOutput g_log_writer_default (GLogLevelFlags log_level, + const GLogField *fields, + gsize n_fields, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_68 +void g_log_writer_default_set_use_stderr (gboolean use_stderr); +GLIB_AVAILABLE_IN_2_68 +gboolean g_log_writer_default_would_drop (GLogLevelFlags log_level, + const char *log_domain); + +/* G_MESSAGES_DEBUG enablement */ +GLIB_AVAILABLE_IN_2_72 +gboolean g_log_get_debug_enabled (void); +GLIB_AVAILABLE_IN_2_72 +void g_log_set_debug_enabled (gboolean enabled); + +/** + * G_DEBUG_HERE: + * + * A convenience form of g_log_structured(), recommended to be added to + * functions when debugging. It prints the current monotonic time and the code + * location using %G_STRLOC. + * + * Since: 2.50 + */ +#define G_DEBUG_HERE() \ + g_log_structured (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + "CODE_FILE", __FILE__, \ + "CODE_LINE", G_STRINGIFY (__LINE__), \ + "CODE_FUNC", G_STRFUNC, \ + "MESSAGE", "%" G_GINT64_FORMAT ": %s", \ + g_get_monotonic_time (), G_STRLOC) + +/* internal */ +void _g_log_fallback_handler (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer unused_data); + +/* Internal functions, used to implement the following macros */ +GLIB_AVAILABLE_IN_ALL +void g_return_if_fail_warning (const char *log_domain, + const char *pretty_function, + const char *expression) G_ANALYZER_NORETURN; +GLIB_AVAILABLE_IN_ALL +void g_warn_message (const char *domain, + const char *file, + int line, + const char *func, + const char *warnexpr) G_ANALYZER_NORETURN; +G_NORETURN +GLIB_DEPRECATED +void g_assert_warning (const char *log_domain, + const char *file, + const int line, + const char *pretty_function, + const char *expression); + +GLIB_AVAILABLE_IN_2_56 +void g_log_structured_standard (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *file, + const gchar *line, + const gchar *func, + const gchar *message_format, + ...) G_GNUC_PRINTF (6, 7); + +#ifndef G_LOG_DOMAIN +#define G_LOG_DOMAIN ((gchar*) 0) +#endif /* G_LOG_DOMAIN */ + +#if defined(G_HAVE_ISO_VARARGS) && !G_ANALYZER_ANALYZING +#if defined(G_LOG_USE_STRUCTURED) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_56 +#define g_error(...) G_STMT_START { \ + g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, __VA_ARGS__); \ + for (;;) ; \ + } G_STMT_END +#define g_message(...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, __VA_ARGS__) +#define g_critical(...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, __VA_ARGS__) +#define g_warning(...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, __VA_ARGS__) +#define g_info(...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, __VA_ARGS__) +#define g_debug(...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, __VA_ARGS__) +#else +/* for(;;) ; so that GCC knows that control doesn't go past g_error(). + * Put space before ending semicolon to avoid C++ build warnings. + */ +#define g_error(...) G_STMT_START { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_ERROR, \ + __VA_ARGS__); \ + for (;;) ; \ + } G_STMT_END +#define g_message(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + __VA_ARGS__) +#define g_critical(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ + __VA_ARGS__) +#define g_warning(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_WARNING, \ + __VA_ARGS__) +#define g_info(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_INFO, \ + __VA_ARGS__) +#define g_debug(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_DEBUG, \ + __VA_ARGS__) +#endif +#elif defined(G_HAVE_GNUC_VARARGS) && !G_ANALYZER_ANALYZING +#if defined(G_LOG_USE_STRUCTURED) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_56 +#define g_error(format...) G_STMT_START { \ + g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, format); \ + for (;;) ; \ + } G_STMT_END +#define g_message(format...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, format) +#define g_critical(format...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, format) +#define g_warning(format...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, format) +#define g_info(format...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, format) +#define g_debug(format...) g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + __FILE__, G_STRINGIFY (__LINE__), \ + G_STRFUNC, format) +#else +#define g_error(format...) G_STMT_START { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_ERROR, \ + format); \ + for (;;) ; \ + } G_STMT_END + +#define g_message(format...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + format) +#define g_critical(format...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ + format) +#define g_warning(format...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_WARNING, \ + format) +#define g_info(format...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_INFO, \ + format) +#define g_debug(format...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_DEBUG, \ + format) +#endif +#else /* no varargs macros */ +G_NORETURN static void g_error (const gchar *format, ...) G_ANALYZER_NORETURN; +static void g_critical (const gchar *format, ...) G_ANALYZER_NORETURN; + +static inline void +g_error (const gchar *format, + ...) +{ + va_list args; + va_start (args, format); + g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args); + va_end (args); + + for(;;) ; +} +static inline void +g_message (const gchar *format, + ...) +{ + va_list args; + va_start (args, format); + g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format, args); + va_end (args); +} +static inline void +g_critical (const gchar *format, + ...) +{ + va_list args; + va_start (args, format); + g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, format, args); + va_end (args); +} +static inline void +g_warning (const gchar *format, + ...) +{ + va_list args; + va_start (args, format); + g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, format, args); + va_end (args); +} +static inline void +g_info (const gchar *format, + ...) +{ + va_list args; + va_start (args, format); + g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format, args); + va_end (args); +} +static inline void +g_debug (const gchar *format, + ...) +{ + va_list args; + va_start (args, format); + g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format, args); + va_end (args); +} +#endif /* !__GNUC__ */ + +/** + * g_warning_once: + * @...: format string, followed by parameters to insert + * into the format string (as with printf()) + * + * Logs a warning only once. + * + * g_warning_once() calls g_warning() with the passed message the first time + * the statement is executed; subsequent times it is a no-op. + * + * Note! On platforms where the compiler doesn't support variadic macros, the + * warning is printed each time instead of only once. + * + * Since: 2.64 + */ +#if defined(G_HAVE_ISO_VARARGS) && !G_ANALYZER_ANALYZING +#define g_warning_once(...) \ + G_STMT_START { \ + static int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; /* (atomic) */ \ + if (g_atomic_int_compare_and_exchange (&G_PASTE (_GWarningOnceBoolean, __LINE__), \ + 0, 1)) \ + g_warning (__VA_ARGS__); \ + } G_STMT_END \ + GLIB_AVAILABLE_MACRO_IN_2_64 +#elif defined(G_HAVE_GNUC_VARARGS) && !G_ANALYZER_ANALYZING +#define g_warning_once(format...) \ + G_STMT_START { \ + static int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; /* (atomic) */ \ + if (g_atomic_int_compare_and_exchange (&G_PASTE (_GWarningOnceBoolean, __LINE__), \ + 0, 1)) \ + g_warning (format); \ + } G_STMT_END \ + GLIB_AVAILABLE_MACRO_IN_2_64 +#else +#define g_warning_once g_warning +#endif + +/** + * GPrintFunc: + * @string: the message to output + * + * Specifies the type of the print handler functions. + * These are called with the complete formatted string to output. + */ +typedef void (*GPrintFunc) (const gchar *string); +GLIB_AVAILABLE_IN_ALL +void g_print (const gchar *format, + ...) G_GNUC_PRINTF (1, 2); +GLIB_AVAILABLE_IN_ALL +GPrintFunc g_set_print_handler (GPrintFunc func); +GLIB_AVAILABLE_IN_ALL +void g_printerr (const gchar *format, + ...) G_GNUC_PRINTF (1, 2); +GLIB_AVAILABLE_IN_ALL +GPrintFunc g_set_printerr_handler (GPrintFunc func); + +/** + * g_warn_if_reached: + * + * Logs a warning. + * + * Since: 2.16 + */ +#define g_warn_if_reached() \ + do { \ + g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, NULL); \ + } while (0) + +/** + * g_warn_if_fail: + * @expr: the expression to check + * + * Logs a warning if the expression is not true. + * + * Since: 2.16 + */ +#define g_warn_if_fail(expr) \ + do { \ + if G_LIKELY (expr) ; \ + else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, #expr); \ + } while (0) + +#ifdef G_DISABLE_CHECKS + +/** + * g_return_if_fail: + * @expr: the expression to check + * + * Verifies that the expression @expr, usually representing a precondition, + * evaluates to %TRUE. If the function returns a value, use + * g_return_val_if_fail() instead. + * + * If @expr evaluates to %FALSE, the current function should be considered to + * have undefined behaviour (a programmer error). The only correct solution + * to such an error is to change the module that is calling the current + * function, so that it avoids this incorrect call. + * + * To make this undefined behaviour visible, if @expr evaluates to %FALSE, + * the result is usually that a critical message is logged and the current + * function returns. + * + * If `G_DISABLE_CHECKS` is defined then the check is not performed. You + * should therefore not depend on any side effects of @expr. + * + * To debug failure of a g_return_if_fail() check, run the code under a debugger + * with `G_DEBUG=fatal-criticals` or `G_DEBUG=fatal-warnings` defined in the + * environment (see [Running GLib Applications](glib-running.html)): + * + * |[ + * G_DEBUG=fatal-warnings gdb ./my-program + * ]| + * + * Any unrelated failures can be skipped over in + * [gdb](https://www.gnu.org/software/gdb/) using the `continue` command. + */ +#define g_return_if_fail(expr) G_STMT_START{ (void)0; }G_STMT_END + +/** + * g_return_val_if_fail: + * @expr: the expression to check + * @val: the value to return from the current function + * if the expression is not true + * + * Verifies that the expression @expr, usually representing a precondition, + * evaluates to %TRUE. If the function does not return a value, use + * g_return_if_fail() instead. + * + * If @expr evaluates to %FALSE, the current function should be considered to + * have undefined behaviour (a programmer error). The only correct solution + * to such an error is to change the module that is calling the current + * function, so that it avoids this incorrect call. + * + * To make this undefined behaviour visible, if @expr evaluates to %FALSE, + * the result is usually that a critical message is logged and @val is + * returned from the current function. + * + * If `G_DISABLE_CHECKS` is defined then the check is not performed. You + * should therefore not depend on any side effects of @expr. + * + * See g_return_if_fail() for guidance on how to debug failure of this check. + */ +#define g_return_val_if_fail(expr,val) G_STMT_START{ (void)0; }G_STMT_END + +/** + * g_return_if_reached: + * + * Logs a critical message and returns from the current function. + * This can only be used in functions which do not return a value. + * + * See g_return_if_fail() for guidance on how to debug failure of this check. + */ +#define g_return_if_reached() G_STMT_START{ return; }G_STMT_END + +/** + * g_return_val_if_reached: + * @val: the value to return from the current function + * + * Logs a critical message and returns @val. + * + * See g_return_if_fail() for guidance on how to debug failure of this check. + */ +#define g_return_val_if_reached(val) G_STMT_START{ return (val); }G_STMT_END + +#else /* !G_DISABLE_CHECKS */ + +#define g_return_if_fail(expr) \ + G_STMT_START { \ + if (G_LIKELY (expr)) \ + { } \ + else \ + { \ + g_return_if_fail_warning (G_LOG_DOMAIN, \ + G_STRFUNC, \ + #expr); \ + return; \ + } \ + } G_STMT_END + +#define g_return_val_if_fail(expr, val) \ + G_STMT_START { \ + if (G_LIKELY (expr)) \ + { } \ + else \ + { \ + g_return_if_fail_warning (G_LOG_DOMAIN, \ + G_STRFUNC, \ + #expr); \ + return (val); \ + } \ + } G_STMT_END + +#define g_return_if_reached() \ + G_STMT_START { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ + "file %s: line %d (%s): should not be reached", \ + __FILE__, \ + __LINE__, \ + G_STRFUNC); \ + return; \ + } G_STMT_END + +#define g_return_val_if_reached(val) \ + G_STMT_START { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ + "file %s: line %d (%s): should not be reached", \ + __FILE__, \ + __LINE__, \ + G_STRFUNC); \ + return (val); \ + } G_STMT_END + +#endif /* !G_DISABLE_CHECKS */ + +G_END_DECLS + +#endif /* __G_MESSAGES_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gnode.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gnode.h new file mode 100644 index 0000000..94ab996 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gnode.h @@ -0,0 +1,309 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_NODE_H__ +#define __G_NODE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +typedef struct _GNode GNode; + +/* Tree traverse flags */ +typedef enum +{ + G_TRAVERSE_LEAVES = 1 << 0, + G_TRAVERSE_NON_LEAVES = 1 << 1, + G_TRAVERSE_ALL = G_TRAVERSE_LEAVES | G_TRAVERSE_NON_LEAVES, + G_TRAVERSE_MASK = 0x03, + G_TRAVERSE_LEAFS = G_TRAVERSE_LEAVES, + G_TRAVERSE_NON_LEAFS = G_TRAVERSE_NON_LEAVES +} GTraverseFlags; + +/* Tree traverse orders */ +typedef enum +{ + G_IN_ORDER, + G_PRE_ORDER, + G_POST_ORDER, + G_LEVEL_ORDER +} GTraverseType; + +typedef gboolean (*GNodeTraverseFunc) (GNode *node, + gpointer data); +typedef void (*GNodeForeachFunc) (GNode *node, + gpointer data); + +/* N-way tree implementation + */ +struct _GNode +{ + gpointer data; + GNode *next; + GNode *prev; + GNode *parent; + GNode *children; +}; + +/** + * G_NODE_IS_ROOT: + * @node: a #GNode + * + * Returns %TRUE if a #GNode is the root of a tree. + * + * Returns: %TRUE if the #GNode is the root of a tree + * (i.e. it has no parent or siblings) + */ +#define G_NODE_IS_ROOT(node) (((GNode*) (node))->parent == NULL && \ + ((GNode*) (node))->prev == NULL && \ + ((GNode*) (node))->next == NULL) + +/** + * G_NODE_IS_LEAF: + * @node: a #GNode + * + * Returns %TRUE if a #GNode is a leaf node. + * + * Returns: %TRUE if the #GNode is a leaf node + * (i.e. it has no children) + */ +#define G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL) + +GLIB_AVAILABLE_IN_ALL +GNode* g_node_new (gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_node_destroy (GNode *root); +GLIB_AVAILABLE_IN_ALL +void g_node_unlink (GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_copy_deep (GNode *node, + GCopyFunc copy_func, + gpointer data); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_copy (GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_insert (GNode *parent, + gint position, + GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_insert_before (GNode *parent, + GNode *sibling, + GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_insert_after (GNode *parent, + GNode *sibling, + GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_prepend (GNode *parent, + GNode *node); +GLIB_AVAILABLE_IN_ALL +guint g_node_n_nodes (GNode *root, + GTraverseFlags flags); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_get_root (GNode *node); +GLIB_AVAILABLE_IN_ALL +gboolean g_node_is_ancestor (GNode *node, + GNode *descendant); +GLIB_AVAILABLE_IN_ALL +guint g_node_depth (GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_find (GNode *root, + GTraverseType order, + GTraverseFlags flags, + gpointer data); + +/* convenience macros */ +/** + * g_node_append: + * @parent: the #GNode to place the new #GNode under + * @node: the #GNode to insert + * + * Inserts a #GNode as the last child of the given parent. + * + * Returns: the inserted #GNode + */ +#define g_node_append(parent, node) \ + g_node_insert_before ((parent), NULL, (node)) + +/** + * g_node_insert_data: + * @parent: the #GNode to place the new #GNode under + * @position: the position to place the new #GNode at. If position is -1, + * the new #GNode is inserted as the last child of @parent + * @data: the data for the new #GNode + * + * Inserts a new #GNode at the given position. + * + * Returns: the new #GNode + */ +#define g_node_insert_data(parent, position, data) \ + g_node_insert ((parent), (position), g_node_new (data)) + +/** + * g_node_insert_data_after: + * @parent: the #GNode to place the new #GNode under + * @sibling: the sibling #GNode to place the new #GNode after + * @data: the data for the new #GNode + * + * Inserts a new #GNode after the given sibling. + * + * Returns: the new #GNode + */ + +#define g_node_insert_data_after(parent, sibling, data) \ + g_node_insert_after ((parent), (sibling), g_node_new (data)) +/** + * g_node_insert_data_before: + * @parent: the #GNode to place the new #GNode under + * @sibling: the sibling #GNode to place the new #GNode before + * @data: the data for the new #GNode + * + * Inserts a new #GNode before the given sibling. + * + * Returns: the new #GNode + */ +#define g_node_insert_data_before(parent, sibling, data) \ + g_node_insert_before ((parent), (sibling), g_node_new (data)) + +/** + * g_node_prepend_data: + * @parent: the #GNode to place the new #GNode under + * @data: the data for the new #GNode + * + * Inserts a new #GNode as the first child of the given parent. + * + * Returns: the new #GNode + */ +#define g_node_prepend_data(parent, data) \ + g_node_prepend ((parent), g_node_new (data)) + +/** + * g_node_append_data: + * @parent: the #GNode to place the new #GNode under + * @data: the data for the new #GNode + * + * Inserts a new #GNode as the last child of the given parent. + * + * Returns: the new #GNode + */ +#define g_node_append_data(parent, data) \ + g_node_insert_before ((parent), NULL, g_node_new (data)) + +/* traversal function, assumes that 'node' is root + * (only traverses 'node' and its subtree). + * this function is just a high level interface to + * low level traversal functions, optimized for speed. + */ +GLIB_AVAILABLE_IN_ALL +void g_node_traverse (GNode *root, + GTraverseType order, + GTraverseFlags flags, + gint max_depth, + GNodeTraverseFunc func, + gpointer data); + +/* return the maximum tree height starting with 'node', this is an expensive + * operation, since we need to visit all nodes. this could be shortened by + * adding 'guint height' to struct _GNode, but then again, this is not very + * often needed, and would make g_node_insert() more time consuming. + */ +GLIB_AVAILABLE_IN_ALL +guint g_node_max_height (GNode *root); + +GLIB_AVAILABLE_IN_ALL +void g_node_children_foreach (GNode *node, + GTraverseFlags flags, + GNodeForeachFunc func, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_node_reverse_children (GNode *node); +GLIB_AVAILABLE_IN_ALL +guint g_node_n_children (GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_nth_child (GNode *node, + guint n); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_last_child (GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_find_child (GNode *node, + GTraverseFlags flags, + gpointer data); +GLIB_AVAILABLE_IN_ALL +gint g_node_child_position (GNode *node, + GNode *child); +GLIB_AVAILABLE_IN_ALL +gint g_node_child_index (GNode *node, + gpointer data); + +GLIB_AVAILABLE_IN_ALL +GNode* g_node_first_sibling (GNode *node); +GLIB_AVAILABLE_IN_ALL +GNode* g_node_last_sibling (GNode *node); + +/** + * g_node_prev_sibling: + * @node: a #GNode + * + * Gets the previous sibling of a #GNode. + * + * Returns: the previous sibling of @node, or %NULL if @node is the first + * node or %NULL + */ +#define g_node_prev_sibling(node) ((node) ? \ + ((GNode*) (node))->prev : NULL) + +/** + * g_node_next_sibling: + * @node: a #GNode + * + * Gets the next sibling of a #GNode. + * + * Returns: the next sibling of @node, or %NULL if @node is the last node + * or %NULL + */ +#define g_node_next_sibling(node) ((node) ? \ + ((GNode*) (node))->next : NULL) + +/** + * g_node_first_child: + * @node: a #GNode + * + * Gets the first child of a #GNode. + * + * Returns: the first child of @node, or %NULL if @node is %NULL + * or has no children + */ +#define g_node_first_child(node) ((node) ? \ + ((GNode*) (node))->children : NULL) + +G_END_DECLS + +#endif /* __G_NODE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/goption.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/goption.h new file mode 100644 index 0000000..dcb0e55 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/goption.h @@ -0,0 +1,409 @@ +/* goption.h - Option parser + * + * Copyright (C) 2004 Anders Carlsson + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_OPTION_H__ +#define __G_OPTION_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +/** + * GOptionContext: + * + * A `GOptionContext` struct defines which options + * are accepted by the commandline option parser. The struct has only private + * fields and should not be directly accessed. + */ +typedef struct _GOptionContext GOptionContext; + +/** + * GOptionGroup: + * + * A `GOptionGroup` struct defines the options in a single + * group. The struct has only private fields and should not be directly accessed. + * + * All options in a group share the same translation function. Libraries which + * need to parse commandline options are expected to provide a function for + * getting a `GOptionGroup` holding their options, which + * the application can then add to its #GOptionContext. + */ +typedef struct _GOptionGroup GOptionGroup; +typedef struct _GOptionEntry GOptionEntry; + +/** + * GOptionFlags: + * @G_OPTION_FLAG_NONE: No flags. Since: 2.42. + * @G_OPTION_FLAG_HIDDEN: The option doesn't appear in `--help` output. + * @G_OPTION_FLAG_IN_MAIN: The option appears in the main section of the + * `--help` output, even if it is defined in a group. + * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this + * flag indicates that the sense of the option is reversed. i.e. %FALSE will + * be stored into the argument rather than %TRUE. + * @G_OPTION_FLAG_NO_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, + * this flag indicates that the callback does not take any argument + * (like a %G_OPTION_ARG_NONE option). Since 2.8 + * @G_OPTION_FLAG_FILENAME: For options of the %G_OPTION_ARG_CALLBACK + * kind, this flag indicates that the argument should be passed to the + * callback in the GLib filename encoding rather than UTF-8. Since 2.8 + * @G_OPTION_FLAG_OPTIONAL_ARG: For options of the %G_OPTION_ARG_CALLBACK + * kind, this flag indicates that the argument supply is optional. + * If no argument is given then data of %GOptionParseFunc will be + * set to NULL. Since 2.8 + * @G_OPTION_FLAG_NOALIAS: This flag turns off the automatic conflict + * resolution which prefixes long option names with `groupname-` if + * there is a conflict. This option should only be used in situations + * where aliasing is necessary to model some legacy commandline interface. + * It is not safe to use this option, unless all option groups are under + * your direct control. Since 2.8. + * + * Flags which modify individual options. + */ +typedef enum +{ + G_OPTION_FLAG_NONE = 0, + G_OPTION_FLAG_HIDDEN = 1 << 0, + G_OPTION_FLAG_IN_MAIN = 1 << 1, + G_OPTION_FLAG_REVERSE = 1 << 2, + G_OPTION_FLAG_NO_ARG = 1 << 3, + G_OPTION_FLAG_FILENAME = 1 << 4, + G_OPTION_FLAG_OPTIONAL_ARG = 1 << 5, + G_OPTION_FLAG_NOALIAS = 1 << 6 +} GOptionFlags; + +/** + * GOptionArg: + * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags or booleans. + * @G_OPTION_ARG_STRING: The option takes a UTF-8 string argument. + * @G_OPTION_ARG_INT: The option takes an integer argument. + * @G_OPTION_ARG_CALLBACK: The option provides a callback (of type + * #GOptionArgFunc) to parse the extra argument. + * @G_OPTION_ARG_FILENAME: The option takes a filename as argument, which will + be in the GLib filename encoding rather than UTF-8. + * @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple + * uses of the option are collected into an array of strings. + * @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument, + * multiple uses of the option are collected into an array of strings. + * @G_OPTION_ARG_DOUBLE: The option takes a double argument. The argument + * can be formatted either for the user's locale or for the "C" locale. + * Since 2.12 + * @G_OPTION_ARG_INT64: The option takes a 64-bit integer. Like + * %G_OPTION_ARG_INT but for larger numbers. The number can be in + * decimal base, or in hexadecimal (when prefixed with `0x`, for + * example, `0xffffffff`). Since 2.12 + * + * The #GOptionArg enum values determine which type of extra argument the + * options expect to find. If an option expects an extra argument, it can + * be specified in several ways; with a short option: `-x arg`, with a long + * option: `--name arg` or combined in a single argument: `--name=arg`. + */ +typedef enum +{ + G_OPTION_ARG_NONE, + G_OPTION_ARG_STRING, + G_OPTION_ARG_INT, + G_OPTION_ARG_CALLBACK, + G_OPTION_ARG_FILENAME, + G_OPTION_ARG_STRING_ARRAY, + G_OPTION_ARG_FILENAME_ARRAY, + G_OPTION_ARG_DOUBLE, + G_OPTION_ARG_INT64 +} GOptionArg; + +/** + * GOptionArgFunc: + * @option_name: The name of the option being parsed. This will be either a + * single dash followed by a single letter (for a short name) or two dashes + * followed by a long option name. + * @value: The value to be parsed. + * @data: User data added to the #GOptionGroup containing the option when it + * was created with g_option_group_new() + * @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED + * is intended to be used for errors in #GOptionArgFunc callbacks. + * + * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK + * options. + * + * Returns: %TRUE if the option was successfully parsed, %FALSE if an error + * occurred, in which case @error should be set with g_set_error() + */ +typedef gboolean (*GOptionArgFunc) (const gchar *option_name, + const gchar *value, + gpointer data, + GError **error); + +/** + * GOptionParseFunc: + * @context: The active #GOptionContext + * @group: The group to which the function belongs + * @data: User data added to the #GOptionGroup containing the option when it + * was created with g_option_group_new() + * @error: A return location for error details + * + * The type of function that can be called before and after parsing. + * + * Returns: %TRUE if the function completed successfully, %FALSE if an error + * occurred, in which case @error should be set with g_set_error() + */ +typedef gboolean (*GOptionParseFunc) (GOptionContext *context, + GOptionGroup *group, + gpointer data, + GError **error); + +/** + * GOptionErrorFunc: + * @context: The active #GOptionContext + * @group: The group to which the function belongs + * @data: User data added to the #GOptionGroup containing the option when it + * was created with g_option_group_new() + * @error: The #GError containing details about the parse error + * + * The type of function to be used as callback when a parse error occurs. + */ +typedef void (*GOptionErrorFunc) (GOptionContext *context, + GOptionGroup *group, + gpointer data, + GError **error); + +/** + * G_OPTION_ERROR: + * + * Error domain for option parsing. Errors in this domain will + * be from the #GOptionError enumeration. See #GError for information on + * error domains. + */ +#define G_OPTION_ERROR (g_option_error_quark ()) + +/** + * GOptionError: + * @G_OPTION_ERROR_UNKNOWN_OPTION: An option was not known to the parser. + * This error will only be reported, if the parser hasn't been instructed + * to ignore unknown options, see g_option_context_set_ignore_unknown_options(). + * @G_OPTION_ERROR_BAD_VALUE: A value couldn't be parsed. + * @G_OPTION_ERROR_FAILED: A #GOptionArgFunc callback failed. + * + * Error codes returned by option parsing. + */ +typedef enum +{ + G_OPTION_ERROR_UNKNOWN_OPTION, + G_OPTION_ERROR_BAD_VALUE, + G_OPTION_ERROR_FAILED +} GOptionError; + +GLIB_AVAILABLE_IN_ALL +GQuark g_option_error_quark (void); + +/** + * GOptionEntry: + * @long_name: The long name of an option can be used to specify it + * in a commandline as `--long_name`. Every option must have a + * long name. To resolve conflicts if multiple option groups contain + * the same long name, it is also possible to specify the option as + * `--groupname-long_name`. + * @short_name: If an option has a short name, it can be specified + * `-short_name` in a commandline. @short_name must be a printable + * ASCII character different from '-', or zero if the option has no + * short name. + * @flags: Flags from #GOptionFlags + * @arg: The type of the option, as a #GOptionArg + * @arg_data: If the @arg type is %G_OPTION_ARG_CALLBACK, then @arg_data + * must point to a #GOptionArgFunc callback function, which will be + * called to handle the extra argument. Otherwise, @arg_data is a + * pointer to a location to store the value, the required type of + * the location depends on the @arg type: + * - %G_OPTION_ARG_NONE: %gboolean + * - %G_OPTION_ARG_STRING: %gchar* + * - %G_OPTION_ARG_INT: %gint + * - %G_OPTION_ARG_FILENAME: %gchar* + * - %G_OPTION_ARG_STRING_ARRAY: %gchar** + * - %G_OPTION_ARG_FILENAME_ARRAY: %gchar** + * - %G_OPTION_ARG_DOUBLE: %gdouble + * If @arg type is %G_OPTION_ARG_STRING or %G_OPTION_ARG_FILENAME, + * the location will contain a newly allocated string if the option + * was given. That string needs to be freed by the callee using g_free(). + * Likewise if @arg type is %G_OPTION_ARG_STRING_ARRAY or + * %G_OPTION_ARG_FILENAME_ARRAY, the data should be freed using g_strfreev(). + * @description: the description for the option in `--help` + * output. The @description is translated using the @translate_func + * of the group, see g_option_group_set_translation_domain(). + * @arg_description: The placeholder to use for the extra argument parsed + * by the option in `--help` output. The @arg_description is translated + * using the @translate_func of the group, see + * g_option_group_set_translation_domain(). + * + * A GOptionEntry struct defines a single option. To have an effect, they + * must be added to a #GOptionGroup with g_option_context_add_main_entries() + * or g_option_group_add_entries(). + */ +struct _GOptionEntry +{ + const gchar *long_name; + gchar short_name; + gint flags; + + GOptionArg arg; + gpointer arg_data; + + const gchar *description; + const gchar *arg_description; +}; + +/** + * G_OPTION_REMAINING: + * + * If a long option in the main group has this name, it is not treated as a + * regular option. Instead it collects all non-option arguments which would + * otherwise be left in `argv`. The option must be of type + * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY + * or %G_OPTION_ARG_FILENAME_ARRAY. + * + * + * Using %G_OPTION_REMAINING instead of simply scanning `argv` + * for leftover arguments has the advantage that GOption takes care of + * necessary encoding conversions for strings or filenames. + * + * Since: 2.6 + */ +#define G_OPTION_REMAINING "" + +/** + * G_OPTION_ENTRY_NULL: + * + * A #GOptionEntry array requires a %NULL terminator, this macro can + * be used as terminator instead of an explicit `{ 0 }` but it cannot + * be assigned to a variable. + * + * |[ + * GOptionEntry option[] = { G_OPTION_ENTRY_NULL }; + * ]| + * + * Since: 2.70 + */ +#define G_OPTION_ENTRY_NULL \ + GLIB_AVAILABLE_MACRO_IN_2_70 \ + { NULL, 0, 0, 0, NULL, NULL, NULL } + + +GLIB_AVAILABLE_IN_ALL +GOptionContext *g_option_context_new (const gchar *parameter_string); +GLIB_AVAILABLE_IN_ALL +void g_option_context_set_summary (GOptionContext *context, + const gchar *summary); +GLIB_AVAILABLE_IN_ALL +const gchar * g_option_context_get_summary (GOptionContext *context); +GLIB_AVAILABLE_IN_ALL +void g_option_context_set_description (GOptionContext *context, + const gchar *description); +GLIB_AVAILABLE_IN_ALL +const gchar * g_option_context_get_description (GOptionContext *context); +GLIB_AVAILABLE_IN_ALL +void g_option_context_free (GOptionContext *context); +GLIB_AVAILABLE_IN_ALL +void g_option_context_set_help_enabled (GOptionContext *context, + gboolean help_enabled); +GLIB_AVAILABLE_IN_ALL +gboolean g_option_context_get_help_enabled (GOptionContext *context); +GLIB_AVAILABLE_IN_ALL +void g_option_context_set_ignore_unknown_options (GOptionContext *context, + gboolean ignore_unknown); +GLIB_AVAILABLE_IN_ALL +gboolean g_option_context_get_ignore_unknown_options (GOptionContext *context); + +GLIB_AVAILABLE_IN_2_44 +void g_option_context_set_strict_posix (GOptionContext *context, + gboolean strict_posix); +GLIB_AVAILABLE_IN_2_44 +gboolean g_option_context_get_strict_posix (GOptionContext *context); + +GLIB_AVAILABLE_IN_ALL +void g_option_context_add_main_entries (GOptionContext *context, + const GOptionEntry *entries, + const gchar *translation_domain); +GLIB_AVAILABLE_IN_ALL +gboolean g_option_context_parse (GOptionContext *context, + gint *argc, + gchar ***argv, + GError **error); +GLIB_AVAILABLE_IN_2_40 +gboolean g_option_context_parse_strv (GOptionContext *context, + gchar ***arguments, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_option_context_set_translate_func (GOptionContext *context, + GTranslateFunc func, + gpointer data, + GDestroyNotify destroy_notify); +GLIB_AVAILABLE_IN_ALL +void g_option_context_set_translation_domain (GOptionContext *context, + const gchar *domain); + +GLIB_AVAILABLE_IN_ALL +void g_option_context_add_group (GOptionContext *context, + GOptionGroup *group); +GLIB_AVAILABLE_IN_ALL +void g_option_context_set_main_group (GOptionContext *context, + GOptionGroup *group); +GLIB_AVAILABLE_IN_ALL +GOptionGroup *g_option_context_get_main_group (GOptionContext *context); +GLIB_AVAILABLE_IN_ALL +gchar *g_option_context_get_help (GOptionContext *context, + gboolean main_help, + GOptionGroup *group); + +GLIB_AVAILABLE_IN_ALL +GOptionGroup *g_option_group_new (const gchar *name, + const gchar *description, + const gchar *help_description, + gpointer user_data, + GDestroyNotify destroy); +GLIB_AVAILABLE_IN_ALL +void g_option_group_set_parse_hooks (GOptionGroup *group, + GOptionParseFunc pre_parse_func, + GOptionParseFunc post_parse_func); +GLIB_AVAILABLE_IN_ALL +void g_option_group_set_error_hook (GOptionGroup *group, + GOptionErrorFunc error_func); +GLIB_DEPRECATED_IN_2_44 +void g_option_group_free (GOptionGroup *group); +GLIB_AVAILABLE_IN_2_44 +GOptionGroup *g_option_group_ref (GOptionGroup *group); +GLIB_AVAILABLE_IN_2_44 +void g_option_group_unref (GOptionGroup *group); +GLIB_AVAILABLE_IN_ALL +void g_option_group_add_entries (GOptionGroup *group, + const GOptionEntry *entries); +GLIB_AVAILABLE_IN_ALL +void g_option_group_set_translate_func (GOptionGroup *group, + GTranslateFunc func, + gpointer data, + GDestroyNotify destroy_notify); +GLIB_AVAILABLE_IN_ALL +void g_option_group_set_translation_domain (GOptionGroup *group, + const gchar *domain); + +G_END_DECLS + +#endif /* __G_OPTION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gpathbuf.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gpathbuf.h new file mode 100644 index 0000000..b423419 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gpathbuf.h @@ -0,0 +1,90 @@ +/* gpathbuf.h: A mutable path builder + * + * SPDX-FileCopyrightText: 2023 Emmanuele Bassi + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#pragma once + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +typedef struct _GPathBuf GPathBuf; + +/** + * GPathBuf: (copy-func g_path_buf_copy) (free-func g_path_buf_free) + * + * A mutable path builder. + * + * Since: 2.76 + */ +struct _GPathBuf +{ + /*< private >*/ + gpointer dummy[8]; +}; + +/** + * G_PATH_BUF_INIT: + * + * Initializes a #GPathBuf on the stack. + * + * A stack-allocated `GPathBuf` must be initialized if it is used + * together with g_auto() to avoid warnings and crashes if the + * function returns before calling g_path_buf_init(). + * + * |[ + * g_auto (GPathBuf) buf = G_PATH_BUF_INIT; + * ]| + * + * Since: 2.76 + */ +#define G_PATH_BUF_INIT { { NULL, } } \ + GLIB_AVAILABLE_MACRO_IN_2_76 + +GLIB_AVAILABLE_IN_2_76 +GPathBuf * g_path_buf_new (void); +GLIB_AVAILABLE_IN_2_76 +GPathBuf * g_path_buf_new_from_path (const char *path); +GLIB_AVAILABLE_IN_2_76 +GPathBuf * g_path_buf_init (GPathBuf *buf); +GLIB_AVAILABLE_IN_2_76 +GPathBuf * g_path_buf_init_from_path (GPathBuf *buf, + const char *path); +GLIB_AVAILABLE_IN_2_76 +void g_path_buf_clear (GPathBuf *buf); +GLIB_AVAILABLE_IN_2_76 +char * g_path_buf_clear_to_path (GPathBuf *buf) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_2_76 +void g_path_buf_free (GPathBuf *buf); +GLIB_AVAILABLE_IN_2_76 +char * g_path_buf_free_to_path (GPathBuf *buf) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_2_76 +GPathBuf * g_path_buf_copy (GPathBuf *buf); + +GLIB_AVAILABLE_IN_2_76 +GPathBuf * g_path_buf_push (GPathBuf *buf, + const char *path); +GLIB_AVAILABLE_IN_2_76 +gboolean g_path_buf_pop (GPathBuf *buf); + +GLIB_AVAILABLE_IN_2_76 +gboolean g_path_buf_set_filename (GPathBuf *buf, + const char *file_name); +GLIB_AVAILABLE_IN_2_76 +gboolean g_path_buf_set_extension (GPathBuf *buf, + const char *extension); + +GLIB_AVAILABLE_IN_2_76 +char * g_path_buf_to_path (GPathBuf *buf) G_GNUC_WARN_UNUSED_RESULT; + +GLIB_AVAILABLE_IN_2_76 +gboolean g_path_buf_equal (gconstpointer v1, + gconstpointer v2); + +G_END_DECLS diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gpattern.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gpattern.h new file mode 100644 index 0000000..c8ceb84 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gpattern.h @@ -0,0 +1,65 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997, 1999 Peter Mattis, Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef __G_PATTERN_H__ +#define __G_PATTERN_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + + +typedef struct _GPatternSpec GPatternSpec; + +GLIB_AVAILABLE_IN_ALL +GPatternSpec* g_pattern_spec_new (const gchar *pattern); +GLIB_AVAILABLE_IN_ALL +void g_pattern_spec_free (GPatternSpec *pspec); +GLIB_AVAILABLE_IN_2_70 +GPatternSpec *g_pattern_spec_copy (GPatternSpec *pspec); +GLIB_AVAILABLE_IN_ALL +gboolean g_pattern_spec_equal (GPatternSpec *pspec1, + GPatternSpec *pspec2); +GLIB_AVAILABLE_IN_2_70 +gboolean g_pattern_spec_match (GPatternSpec *pspec, + gsize string_length, + const gchar *string, + const gchar *string_reversed); +GLIB_AVAILABLE_IN_2_70 +gboolean g_pattern_spec_match_string (GPatternSpec *pspec, + const gchar *string); +GLIB_DEPRECATED_IN_2_70_FOR (g_pattern_spec_match) +gboolean g_pattern_match (GPatternSpec *pspec, + guint string_length, + const gchar *string, + const gchar *string_reversed); +GLIB_DEPRECATED_IN_2_70_FOR (g_pattern_spec_match_string) +gboolean g_pattern_match_string (GPatternSpec *pspec, + const gchar *string); +GLIB_AVAILABLE_IN_ALL +gboolean g_pattern_match_simple (const gchar *pattern, + const gchar *string); + +G_END_DECLS + +#endif /* __G_PATTERN_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gpoll.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gpoll.h new file mode 100644 index 0000000..bd72bc4 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gpoll.h @@ -0,0 +1,122 @@ +/* gpoll.h - poll(2) support + * Copyright (C) 2008 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_POLL_H__ +#define __G_POLL_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (__G_MAIN_H__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +/* Any definitions using GPollFD or GPollFunc are primarily + * for Unix and not guaranteed to be the compatible on all + * operating systems on which GLib runs. Right now, the + * GLib does use these functions on Win32 as well, but interprets + * them in a fairly different way than on Unix. If you use + * these definitions, you are should be prepared to recode + * for different operating systems. + * + * Note that on systems with a working poll(2), that function is used + * in place of g_poll(). Thus g_poll() must have the same signature as + * poll(), meaning GPollFD must have the same layout as struct pollfd. + * + * On Win32, the fd in a GPollFD should be Win32 HANDLE (*not* a file + * descriptor as provided by the C runtime) that can be used by + * MsgWaitForMultipleObjects. This does *not* include file handles + * from CreateFile, SOCKETs, nor pipe handles. (But you can use + * WSAEventSelect to signal events when a SOCKET is readable). + * + * On Win32, fd can also be the special value G_WIN32_MSG_HANDLE to + * indicate polling for messages. + * + * But note that G_WIN32_MSG_HANDLE GPollFDs should not be used by GDK + * (GTK) programs, as GDK itself wants to read messages and convert them + * to GDK events. + * + * So, unless you really know what you are doing, it's best not to try + * to use the main loop polling stuff for your own needs on + * Windows. + */ +typedef struct _GPollFD GPollFD; + +/** + * GPollFunc: + * @ufds: an array of #GPollFD elements + * @nfsd: the number of elements in @ufds + * @timeout_: the maximum time to wait for an event of the file descriptors. + * A negative value indicates an infinite timeout. + * + * Specifies the type of function passed to g_main_context_set_poll_func(). + * The semantics of the function should match those of the poll() system call. + * + * Returns: the number of #GPollFD elements which have events or errors + * reported, or -1 if an error occurred. + */ +typedef gint (*GPollFunc) (GPollFD *ufds, + guint nfsd, + gint timeout_); + +/** + * GPollFD: + * @fd: the file descriptor to poll (or a HANDLE on Win32) + * @events: a bitwise combination from #GIOCondition, specifying which + * events should be polled for. Typically for reading from a file + * descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and + * for writing you would use %G_IO_OUT | %G_IO_ERR. + * @revents: a bitwise combination of flags from #GIOCondition, returned + * from the poll() function to indicate which events occurred. + * + * Represents a file descriptor, which events to poll for, and which events + * occurred. + */ +struct _GPollFD +{ +#if defined (G_OS_WIN32) && GLIB_SIZEOF_VOID_P == 8 +#ifndef __GTK_DOC_IGNORE__ + gint64 fd; +#endif +#else + gint fd; +#endif + gushort events; + gushort revents; +}; + +/** + * G_POLLFD_FORMAT: + * + * A format specifier that can be used in printf()-style format strings + * when printing the @fd member of a #GPollFD. + */ +/* defined in glibconfig.h */ + +GLIB_AVAILABLE_IN_ALL +gint +g_poll (GPollFD *fds, + guint nfds, + gint timeout); + +G_END_DECLS + +#endif /* __G_POLL_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gprimes.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gprimes.h new file mode 100644 index 0000000..f35b5fd --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gprimes.h @@ -0,0 +1,52 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_PRIMES_H__ +#define __G_PRIMES_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/* Prime numbers. + */ + +/* This function returns prime numbers spaced by approximately 1.5-2.0 + * and is for use in resizing data structures which prefer + * prime-valued sizes. The closest spaced prime function returns the + * next largest prime, or the highest it knows about which is about + * MAXINT/4. + */ +GLIB_AVAILABLE_IN_ALL +guint g_spaced_primes_closest (guint num) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __G_PRIMES_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gprintf.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gprintf.h new file mode 100644 index 0000000..78b2520 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gprintf.h @@ -0,0 +1,59 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997, 2002 Peter Mattis, Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef __G_PRINTF_H__ +#define __G_PRINTF_H__ + +#include +#include +#include + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +gint g_printf (gchar const *format, + ...) G_GNUC_PRINTF (1, 2); +GLIB_AVAILABLE_IN_ALL +gint g_fprintf (FILE *file, + gchar const *format, + ...) G_GNUC_PRINTF (2, 3); +GLIB_AVAILABLE_IN_ALL +gint g_sprintf (gchar *string, + gchar const *format, + ...) G_GNUC_PRINTF (2, 3); + +GLIB_AVAILABLE_IN_ALL +gint g_vprintf (gchar const *format, + va_list args) G_GNUC_PRINTF(1, 0); +GLIB_AVAILABLE_IN_ALL +gint g_vfprintf (FILE *file, + gchar const *format, + va_list args) G_GNUC_PRINTF(2, 0); +GLIB_AVAILABLE_IN_ALL +gint g_vsprintf (gchar *string, + gchar const *format, + va_list args) G_GNUC_PRINTF(2, 0); +GLIB_AVAILABLE_IN_ALL +gint g_vasprintf (gchar **string, + gchar const *format, + va_list args) G_GNUC_PRINTF(2, 0); + +G_END_DECLS + +#endif /* __G_PRINTF_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gqsort.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gqsort.h new file mode 100644 index 0000000..c04c038 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gqsort.h @@ -0,0 +1,47 @@ + /* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_QSORT_H__ +#define __G_QSORT_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +void g_qsort_with_data (gconstpointer pbase, + gint total_elems, + gsize size, + GCompareDataFunc compare_func, + gpointer user_data); + +G_END_DECLS + +#endif /* __G_QSORT_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gquark.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gquark.h new file mode 100644 index 0000000..d0c4403 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gquark.h @@ -0,0 +1,70 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_QUARK_H__ +#define __G_QUARK_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +typedef guint32 GQuark; + +/* Quarks (string<->id association) + */ +GLIB_AVAILABLE_IN_ALL +GQuark g_quark_try_string (const gchar *string); +GLIB_AVAILABLE_IN_ALL +GQuark g_quark_from_static_string (const gchar *string); +GLIB_AVAILABLE_IN_ALL +GQuark g_quark_from_string (const gchar *string); +GLIB_AVAILABLE_IN_ALL +const gchar * g_quark_to_string (GQuark quark) G_GNUC_CONST; + +#define G_DEFINE_QUARK(QN, q_n) \ +GQuark \ +q_n##_quark (void) \ +{ \ + static GQuark q; \ + \ + if G_UNLIKELY (q == 0) \ + q = g_quark_from_static_string (#QN); \ + \ + return q; \ +} + +GLIB_AVAILABLE_IN_ALL +const gchar * g_intern_string (const gchar *string); +GLIB_AVAILABLE_IN_ALL +const gchar * g_intern_static_string (const gchar *string); + +G_END_DECLS + +#endif /* __G_QUARK_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gqueue.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gqueue.h new file mode 100644 index 0000000..c3a28c8 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gqueue.h @@ -0,0 +1,205 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_QUEUE_H__ +#define __G_QUEUE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +typedef struct _GQueue GQueue; + +/** + * GQueue: + * @head: a pointer to the first element of the queue + * @tail: a pointer to the last element of the queue + * @length: the number of elements in the queue + * + * Contains the public fields of a + * [Queue][glib-Double-ended-Queues]. + */ +struct _GQueue +{ + GList *head; + GList *tail; + guint length; +}; + +/** + * G_QUEUE_INIT: + * + * A statically-allocated #GQueue must be initialized with this + * macro before it can be used. This macro can be used to initialize + * a variable, but it cannot be assigned to a variable. In that case + * you have to use g_queue_init(). + * + * |[ + * GQueue my_queue = G_QUEUE_INIT; + * ]| + * + * Since: 2.14 + */ +#define G_QUEUE_INIT { NULL, NULL, 0 } + +/* Queues + */ +GLIB_AVAILABLE_IN_ALL +GQueue* g_queue_new (void); +GLIB_AVAILABLE_IN_ALL +void g_queue_free (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +void g_queue_free_full (GQueue *queue, + GDestroyNotify free_func); +GLIB_AVAILABLE_IN_ALL +void g_queue_init (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +void g_queue_clear (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +gboolean g_queue_is_empty (GQueue *queue); +GLIB_AVAILABLE_IN_2_60 +void g_queue_clear_full (GQueue *queue, + GDestroyNotify free_func); +GLIB_AVAILABLE_IN_ALL +guint g_queue_get_length (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +void g_queue_reverse (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +GQueue * g_queue_copy (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +void g_queue_foreach (GQueue *queue, + GFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GList * g_queue_find (GQueue *queue, + gconstpointer data); +GLIB_AVAILABLE_IN_ALL +GList * g_queue_find_custom (GQueue *queue, + gconstpointer data, + GCompareFunc func); +GLIB_AVAILABLE_IN_ALL +void g_queue_sort (GQueue *queue, + GCompareDataFunc compare_func, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +void g_queue_push_head (GQueue *queue, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_queue_push_tail (GQueue *queue, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_queue_push_nth (GQueue *queue, + gpointer data, + gint n); +GLIB_AVAILABLE_IN_ALL +gpointer g_queue_pop_head (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +gpointer g_queue_pop_tail (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +gpointer g_queue_pop_nth (GQueue *queue, + guint n); +GLIB_AVAILABLE_IN_ALL +gpointer g_queue_peek_head (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +gpointer g_queue_peek_tail (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +gpointer g_queue_peek_nth (GQueue *queue, + guint n); +GLIB_AVAILABLE_IN_ALL +gint g_queue_index (GQueue *queue, + gconstpointer data); +GLIB_AVAILABLE_IN_ALL +gboolean g_queue_remove (GQueue *queue, + gconstpointer data); +GLIB_AVAILABLE_IN_ALL +guint g_queue_remove_all (GQueue *queue, + gconstpointer data); +GLIB_AVAILABLE_IN_ALL +void g_queue_insert_before (GQueue *queue, + GList *sibling, + gpointer data); +GLIB_AVAILABLE_IN_2_62 +void g_queue_insert_before_link + (GQueue *queue, + GList *sibling, + GList *link_); +GLIB_AVAILABLE_IN_ALL +void g_queue_insert_after (GQueue *queue, + GList *sibling, + gpointer data); +GLIB_AVAILABLE_IN_2_62 +void g_queue_insert_after_link + (GQueue *queue, + GList *sibling, + GList *link_); +GLIB_AVAILABLE_IN_ALL +void g_queue_insert_sorted (GQueue *queue, + gpointer data, + GCompareDataFunc func, + gpointer user_data); + +GLIB_AVAILABLE_IN_ALL +void g_queue_push_head_link (GQueue *queue, + GList *link_); +GLIB_AVAILABLE_IN_ALL +void g_queue_push_tail_link (GQueue *queue, + GList *link_); +GLIB_AVAILABLE_IN_ALL +void g_queue_push_nth_link (GQueue *queue, + gint n, + GList *link_); +GLIB_AVAILABLE_IN_ALL +GList* g_queue_pop_head_link (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +GList* g_queue_pop_tail_link (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +GList* g_queue_pop_nth_link (GQueue *queue, + guint n); +GLIB_AVAILABLE_IN_ALL +GList* g_queue_peek_head_link (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +GList* g_queue_peek_tail_link (GQueue *queue); +GLIB_AVAILABLE_IN_ALL +GList* g_queue_peek_nth_link (GQueue *queue, + guint n); +GLIB_AVAILABLE_IN_ALL +gint g_queue_link_index (GQueue *queue, + GList *link_); +GLIB_AVAILABLE_IN_ALL +void g_queue_unlink (GQueue *queue, + GList *link_); +GLIB_AVAILABLE_IN_ALL +void g_queue_delete_link (GQueue *queue, + GList *link_); + +G_END_DECLS + +#endif /* __G_QUEUE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/grand.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/grand.h new file mode 100644 index 0000000..c4ae956 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/grand.h @@ -0,0 +1,101 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_RAND_H__ +#define __G_RAND_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +typedef struct _GRand GRand; + +/* GRand - a good and fast random number generator: Mersenne Twister + * see http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html for more info. + * The range functions return a value in the interval [begin, end). + * int -> [0..2^32-1] + * int_range -> [begin..end-1] + * double -> [0..1) + * double_range -> [begin..end) + */ + +GLIB_AVAILABLE_IN_ALL +GRand* g_rand_new_with_seed (guint32 seed); +GLIB_AVAILABLE_IN_ALL +GRand* g_rand_new_with_seed_array (const guint32 *seed, + guint seed_length); +GLIB_AVAILABLE_IN_ALL +GRand* g_rand_new (void); +GLIB_AVAILABLE_IN_ALL +void g_rand_free (GRand *rand_); +GLIB_AVAILABLE_IN_ALL +GRand* g_rand_copy (GRand *rand_); +GLIB_AVAILABLE_IN_ALL +void g_rand_set_seed (GRand *rand_, + guint32 seed); +GLIB_AVAILABLE_IN_ALL +void g_rand_set_seed_array (GRand *rand_, + const guint32 *seed, + guint seed_length); + +#define g_rand_boolean(rand_) ((g_rand_int (rand_) & (1 << 15)) != 0) + +GLIB_AVAILABLE_IN_ALL +guint32 g_rand_int (GRand *rand_); +GLIB_AVAILABLE_IN_ALL +gint32 g_rand_int_range (GRand *rand_, + gint32 begin, + gint32 end); +GLIB_AVAILABLE_IN_ALL +gdouble g_rand_double (GRand *rand_); +GLIB_AVAILABLE_IN_ALL +gdouble g_rand_double_range (GRand *rand_, + gdouble begin, + gdouble end); +GLIB_AVAILABLE_IN_ALL +void g_random_set_seed (guint32 seed); + +#define g_random_boolean() ((g_random_int () & (1 << 15)) != 0) + +GLIB_AVAILABLE_IN_ALL +guint32 g_random_int (void); +GLIB_AVAILABLE_IN_ALL +gint32 g_random_int_range (gint32 begin, + gint32 end); +GLIB_AVAILABLE_IN_ALL +gdouble g_random_double (void); +GLIB_AVAILABLE_IN_ALL +gdouble g_random_double_range (gdouble begin, + gdouble end); + + +G_END_DECLS + +#endif /* __G_RAND_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/grcbox.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/grcbox.h new file mode 100644 index 0000000..f101e43 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/grcbox.h @@ -0,0 +1,91 @@ +/* grcbox.h: Reference counted data + * + * Copyright 2018 Emmanuele Bassi + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#pragma once + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_2_58 +gpointer g_rc_box_alloc (gsize block_size) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_2_58 +gpointer g_rc_box_alloc0 (gsize block_size) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_2_58 +gpointer g_rc_box_dup (gsize block_size, + gconstpointer mem_block) G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_2_58 +gpointer g_rc_box_acquire (gpointer mem_block); +GLIB_AVAILABLE_IN_2_58 +void g_rc_box_release (gpointer mem_block); +GLIB_AVAILABLE_IN_2_58 +void g_rc_box_release_full (gpointer mem_block, + GDestroyNotify clear_func); + +GLIB_AVAILABLE_IN_2_58 +gsize g_rc_box_get_size (gpointer mem_block); + +GLIB_AVAILABLE_IN_2_58 +gpointer g_atomic_rc_box_alloc (gsize block_size) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_2_58 +gpointer g_atomic_rc_box_alloc0 (gsize block_size) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_2_58 +gpointer g_atomic_rc_box_dup (gsize block_size, + gconstpointer mem_block) G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_2_58 +gpointer g_atomic_rc_box_acquire (gpointer mem_block); +GLIB_AVAILABLE_IN_2_58 +void g_atomic_rc_box_release (gpointer mem_block); +GLIB_AVAILABLE_IN_2_58 +void g_atomic_rc_box_release_full (gpointer mem_block, + GDestroyNotify clear_func); + +GLIB_AVAILABLE_IN_2_58 +gsize g_atomic_rc_box_get_size (gpointer mem_block); + +#define g_rc_box_new(type) \ + ((type *) g_rc_box_alloc (sizeof (type))) +#define g_rc_box_new0(type) \ + ((type *) g_rc_box_alloc0 (sizeof (type))) +#define g_atomic_rc_box_new(type) \ + ((type *) g_atomic_rc_box_alloc (sizeof (type))) +#define g_atomic_rc_box_new0(type) \ + ((type *) g_atomic_rc_box_alloc0 (sizeof (type))) + +#if defined(glib_typeof) +/* Type check to avoid assigning references to different types */ +#define g_rc_box_acquire(mem_block) \ + ((glib_typeof (mem_block)) (g_rc_box_acquire) (mem_block)) +#define g_atomic_rc_box_acquire(mem_block) \ + ((glib_typeof (mem_block)) (g_atomic_rc_box_acquire) (mem_block)) + +/* Type check to avoid duplicating data to different types */ +#define g_rc_box_dup(block_size, mem_block) \ + ((glib_typeof (mem_block)) (g_rc_box_dup) (block_size, mem_block)) +#define g_atomic_rc_box_dup(block_size, mem_block) \ + ((glib_typeof (mem_block)) (g_atomic_rc_box_dup) (block_size, mem_block)) +#endif + +G_END_DECLS diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/grefcount.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/grefcount.h new file mode 100644 index 0000000..53b9693 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/grefcount.h @@ -0,0 +1,179 @@ +/* grefcount.h: Reference counting + * + * Copyright 2018 Emmanuele Bassi + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef __GREFCOUNT_H__ +#define __GREFCOUNT_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_2_58 +void g_ref_count_init (grefcount *rc); +GLIB_AVAILABLE_IN_2_58 +void g_ref_count_inc (grefcount *rc); +GLIB_AVAILABLE_IN_2_58 +gboolean g_ref_count_dec (grefcount *rc); +GLIB_AVAILABLE_IN_2_58 +gboolean g_ref_count_compare (grefcount *rc, + gint val); + +GLIB_AVAILABLE_IN_2_58 +void g_atomic_ref_count_init (gatomicrefcount *arc); +GLIB_AVAILABLE_IN_2_58 +void g_atomic_ref_count_inc (gatomicrefcount *arc); +GLIB_AVAILABLE_IN_2_58 +gboolean g_atomic_ref_count_dec (gatomicrefcount *arc); +GLIB_AVAILABLE_IN_2_58 +gboolean g_atomic_ref_count_compare (gatomicrefcount *arc, + gint val); + +/** + * G_REF_COUNT_INIT: + * + * Evaluates to the initial reference count for `grefcount`. + * + * This macro is useful for initializing `grefcount` fields inside + * structures, for instance: + * + * |[ + * typedef struct { + * grefcount ref_count; + * char *name; + * char *address; + * } Person; + * + * static const Person default_person = { + * .ref_count = G_REF_COUNT_INIT, + * .name = "Default name", + * .address = "Default address", + * }; + * ]| + * + * Since: 2.78 + */ +#define G_REF_COUNT_INIT -1 \ + GLIB_AVAILABLE_MACRO_IN_2_78 + +/** + * G_ATOMIC_REF_COUNT_INIT: + * + * Evaluates to the initial reference count for `gatomicrefcount`. + * + * This macro is useful for initializing `gatomicrefcount` fields inside + * structures, for instance: + * + * |[ + * typedef struct { + * gatomicrefcount ref_count; + * char *name; + * char *address; + * } Person; + * + * static const Person default_person = { + * .ref_count = G_ATOMIC_REF_COUNT_INIT, + * .name = "Default name", + * .address = "Default address", + * }; + * ]| + * + * Since: 2.78 + */ +#define G_ATOMIC_REF_COUNT_INIT 1 \ + GLIB_AVAILABLE_MACRO_IN_2_78 + +/* On GCC we can use __extension__ to inline the API without using + * ancillary functions; we only do this when disabling checks, as + * it disables warnings when saturating the reference counters + */ +#if defined(__GNUC__) && defined(G_DISABLE_CHECKS) + +# define g_ref_count_init(rc) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(rc) == sizeof (grefcount)); \ + (void) (0 ? *(rc) ^ *(rc) : 1); \ + *(rc) = -1; \ + })) + +# define g_ref_count_inc(rc) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(rc) == sizeof (grefcount)); \ + (void) (0 ? *(rc) ^ *(rc) : 1); \ + if (*(rc) == G_MININT) ; else { \ + *(rc) -= 1; \ + } \ + })) + +# define g_ref_count_dec(rc) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(rc) == sizeof (grefcount)); \ + grefcount __rc = *(rc); \ + __rc += 1; \ + if (__rc == 0) ; else { \ + *(rc) = __rc; \ + } \ + (gboolean) (__rc == 0); \ + })) + +# define g_ref_count_compare(rc,val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(rc) == sizeof (grefcount)); \ + (void) (0 ? *(rc) ^ (val) : 1); \ + (gboolean) (*(rc) == -(val)); \ + })) + +# define g_atomic_ref_count_init(rc) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(rc) == sizeof (gatomicrefcount)); \ + (void) (0 ? *(rc) ^ *(rc) : 1); \ + *(rc) = 1; \ + })) + +# define g_atomic_ref_count_inc(rc) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(rc) == sizeof (gatomicrefcount)); \ + (void) (0 ? *(rc) ^ *(rc) : 1); \ + (void) (g_atomic_int_get (rc) == G_MAXINT ? 0 : g_atomic_int_inc ((rc))); \ + })) + +# define g_atomic_ref_count_dec(rc) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(rc) == sizeof (gatomicrefcount)); \ + (void) (0 ? *(rc) ^ *(rc) : 1); \ + g_atomic_int_dec_and_test ((rc)); \ + })) + +# define g_atomic_ref_count_compare(rc,val) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(rc) == sizeof (gatomicrefcount)); \ + (void) (0 ? *(rc) ^ (val) : 1); \ + (gboolean) (g_atomic_int_get (rc) == (val)); \ + })) + +#endif /* __GNUC__ && G_DISABLE_CHECKS */ + +G_END_DECLS + +#endif /* __GREFCOUNT_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/grefstring.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/grefstring.h new file mode 100644 index 0000000..ae7d173 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/grefstring.h @@ -0,0 +1,59 @@ +/* grefstring.h: Reference counted strings + * + * Copyright 2018 Emmanuele Bassi + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#pragma once + +#include "gmem.h" +#include "gmacros.h" + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_2_58 +char * g_ref_string_new (const char *str); +GLIB_AVAILABLE_IN_2_58 +char * g_ref_string_new_len (const char *str, + gssize len); +GLIB_AVAILABLE_IN_2_58 +char * g_ref_string_new_intern (const char *str); + +GLIB_AVAILABLE_IN_2_58 +char * g_ref_string_acquire (char *str); +GLIB_AVAILABLE_IN_2_58 +void g_ref_string_release (char *str); + +GLIB_AVAILABLE_IN_2_58 +gsize g_ref_string_length (char *str); + +/** + * GRefString: + * + * A typedef for a reference-counted string. A pointer to a #GRefString can be + * treated like a standard `char*` array by all code, but can additionally have + * `g_ref_string_*()` methods called on it. `g_ref_string_*()` methods cannot be + * called on `char*` arrays not allocated using g_ref_string_new(). + * + * If using #GRefString with autocleanups, g_autoptr() must be used rather than + * g_autofree(), so that the reference counting metadata is also freed. + * + * Since: 2.58 + */ +typedef char GRefString; + +G_END_DECLS diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gregex.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gregex.h new file mode 100644 index 0000000..30eb387 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gregex.h @@ -0,0 +1,620 @@ +/* GRegex -- regular expression API wrapper around PCRE. + * + * Copyright (C) 1999, 2000 Scott Wimer + * Copyright (C) 2004, Matthias Clasen + * Copyright (C) 2005 - 2007, Marco Barisione + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_REGEX_H__ +#define __G_REGEX_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +/** + * GRegexError: + * @G_REGEX_ERROR_COMPILE: Compilation of the regular expression failed. + * @G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression failed. + * @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement + * string. + * @G_REGEX_ERROR_MATCH: The match process failed. + * @G_REGEX_ERROR_INTERNAL: Internal error of the regular expression engine. + * Since 2.16 + * @G_REGEX_ERROR_STRAY_BACKSLASH: "\\" at end of pattern. Since 2.16 + * @G_REGEX_ERROR_MISSING_CONTROL_CHAR: "\\c" at end of pattern. Since 2.16 + * @G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: Unrecognized character follows "\\". + * Since 2.16 + * @G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: Numbers out of order in "{}" + * quantifier. Since 2.16 + * @G_REGEX_ERROR_QUANTIFIER_TOO_BIG: Number too big in "{}" quantifier. + * Since 2.16 + * @G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: Missing terminating "]" for + * character class. Since 2.16 + * @G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: Invalid escape sequence + * in character class. Since 2.16 + * @G_REGEX_ERROR_RANGE_OUT_OF_ORDER: Range out of order in character class. + * Since 2.16 + * @G_REGEX_ERROR_NOTHING_TO_REPEAT: Nothing to repeat. Since 2.16 + * @G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: Unrecognized character after "(?", + * "(?<" or "(?P". Since 2.16 + * @G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: POSIX named classes are + * supported only within a class. Since 2.16 + * @G_REGEX_ERROR_UNMATCHED_PARENTHESIS: Missing terminating ")" or ")" + * without opening "(". Since 2.16 + * @G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: Reference to non-existent + * subpattern. Since 2.16 + * @G_REGEX_ERROR_UNTERMINATED_COMMENT: Missing terminating ")" after comment. + * Since 2.16 + * @G_REGEX_ERROR_EXPRESSION_TOO_LARGE: Regular expression too large. + * Since 2.16 + * @G_REGEX_ERROR_MEMORY_ERROR: Failed to get memory. Since 2.16 + * @G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: Lookbehind assertion is not + * fixed length. Since 2.16 + * @G_REGEX_ERROR_MALFORMED_CONDITION: Malformed number or name after "(?(". + * Since 2.16 + * @G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: Conditional group contains + * more than two branches. Since 2.16 + * @G_REGEX_ERROR_ASSERTION_EXPECTED: Assertion expected after "(?(". + * Since 2.16 + * @G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: Unknown POSIX class name. + * Since 2.16 + * @G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: POSIX collating + * elements are not supported. Since 2.16 + * @G_REGEX_ERROR_HEX_CODE_TOO_LARGE: Character value in "\\x{...}" sequence + * is too large. Since 2.16 + * @G_REGEX_ERROR_INVALID_CONDITION: Invalid condition "(?(0)". Since 2.16 + * @G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: \\C not allowed in + * lookbehind assertion. Since 2.16 + * @G_REGEX_ERROR_INFINITE_LOOP: Recursive call could loop indefinitely. + * Since 2.16 + * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: Missing terminator + * in subpattern name. Since 2.16 + * @G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: Two named subpatterns have + * the same name. Since 2.16 + * @G_REGEX_ERROR_MALFORMED_PROPERTY: Malformed "\\P" or "\\p" sequence. + * Since 2.16 + * @G_REGEX_ERROR_UNKNOWN_PROPERTY: Unknown property name after "\\P" or + * "\\p". Since 2.16 + * @G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: Subpattern name is too long + * (maximum 32 characters). Since 2.16 + * @G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: Too many named subpatterns (maximum + * 10,000). Since 2.16 + * @G_REGEX_ERROR_INVALID_OCTAL_VALUE: Octal value is greater than "\\377". + * Since 2.16 + * @G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: "DEFINE" group contains more + * than one branch. Since 2.16 + * @G_REGEX_ERROR_DEFINE_REPETION: Repeating a "DEFINE" group is not allowed. + * This error is never raised. Since: 2.16 Deprecated: 2.34 + * @G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: Inconsistent newline options. + * Since 2.16 + * @G_REGEX_ERROR_MISSING_BACK_REFERENCE: "\\g" is not followed by a braced, + * angle-bracketed, or quoted name or number, or by a plain number. Since: 2.16 + * @G_REGEX_ERROR_INVALID_RELATIVE_REFERENCE: relative reference must not be zero. Since: 2.34 + * @G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN: the backtracing + * control verb used does not allow an argument. Since: 2.34 + * @G_REGEX_ERROR_UNKNOWN_BACKTRACKING_CONTROL_VERB: unknown backtracing + * control verb. Since: 2.34 + * @G_REGEX_ERROR_NUMBER_TOO_BIG: number is too big in escape sequence. Since: 2.34 + * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME: Missing subpattern name. Since: 2.34 + * @G_REGEX_ERROR_MISSING_DIGIT: Missing digit. Since 2.34 + * @G_REGEX_ERROR_INVALID_DATA_CHARACTER: In JavaScript compatibility mode, + * "[" is an invalid data character. Since: 2.34 + * @G_REGEX_ERROR_EXTRA_SUBPATTERN_NAME: different names for subpatterns of the + * same number are not allowed. Since: 2.34 + * @G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED: the backtracing control + * verb requires an argument. Since: 2.34 + * @G_REGEX_ERROR_INVALID_CONTROL_CHAR: "\\c" must be followed by an ASCII + * character. Since: 2.34 + * @G_REGEX_ERROR_MISSING_NAME: "\\k" is not followed by a braced, angle-bracketed, or + * quoted name. Since: 2.34 + * @G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS: "\\N" is not supported in a class. Since: 2.34 + * @G_REGEX_ERROR_TOO_MANY_FORWARD_REFERENCES: too many forward references. Since: 2.34 + * @G_REGEX_ERROR_NAME_TOO_LONG: the name is too long in "(*MARK)", "(*PRUNE)", + * "(*SKIP)", or "(*THEN)". Since: 2.34 + * @G_REGEX_ERROR_CHARACTER_VALUE_TOO_LARGE: the character value in the \\u sequence is + * too large. Since: 2.34 + * + * Error codes returned by regular expressions functions. + * + * Since: 2.14 + */ +typedef enum +{ + G_REGEX_ERROR_COMPILE, + G_REGEX_ERROR_OPTIMIZE, + G_REGEX_ERROR_REPLACE, + G_REGEX_ERROR_MATCH, + G_REGEX_ERROR_INTERNAL, + + /* These are the error codes from PCRE + 100 */ + G_REGEX_ERROR_STRAY_BACKSLASH = 101, + G_REGEX_ERROR_MISSING_CONTROL_CHAR = 102, + G_REGEX_ERROR_UNRECOGNIZED_ESCAPE = 103, + G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER = 104, + G_REGEX_ERROR_QUANTIFIER_TOO_BIG = 105, + G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS = 106, + G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS = 107, + G_REGEX_ERROR_RANGE_OUT_OF_ORDER = 108, + G_REGEX_ERROR_NOTHING_TO_REPEAT = 109, + G_REGEX_ERROR_UNRECOGNIZED_CHARACTER = 112, + G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS = 113, + G_REGEX_ERROR_UNMATCHED_PARENTHESIS = 114, + G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE = 115, + G_REGEX_ERROR_UNTERMINATED_COMMENT = 118, + G_REGEX_ERROR_EXPRESSION_TOO_LARGE = 120, + G_REGEX_ERROR_MEMORY_ERROR = 121, + G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND = 125, + G_REGEX_ERROR_MALFORMED_CONDITION = 126, + G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES = 127, + G_REGEX_ERROR_ASSERTION_EXPECTED = 128, + G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME = 130, + G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED = 131, + G_REGEX_ERROR_HEX_CODE_TOO_LARGE = 134, + G_REGEX_ERROR_INVALID_CONDITION = 135, + G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND = 136, + G_REGEX_ERROR_INFINITE_LOOP = 140, + G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR = 142, + G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME = 143, + G_REGEX_ERROR_MALFORMED_PROPERTY = 146, + G_REGEX_ERROR_UNKNOWN_PROPERTY = 147, + G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG = 148, + G_REGEX_ERROR_TOO_MANY_SUBPATTERNS = 149, + G_REGEX_ERROR_INVALID_OCTAL_VALUE = 151, + G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE = 154, + G_REGEX_ERROR_DEFINE_REPETION = 155, + G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS = 156, + G_REGEX_ERROR_MISSING_BACK_REFERENCE = 157, + G_REGEX_ERROR_INVALID_RELATIVE_REFERENCE = 158, + G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN = 159, + G_REGEX_ERROR_UNKNOWN_BACKTRACKING_CONTROL_VERB = 160, + G_REGEX_ERROR_NUMBER_TOO_BIG = 161, + G_REGEX_ERROR_MISSING_SUBPATTERN_NAME = 162, + G_REGEX_ERROR_MISSING_DIGIT = 163, + G_REGEX_ERROR_INVALID_DATA_CHARACTER = 164, + G_REGEX_ERROR_EXTRA_SUBPATTERN_NAME = 165, + G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED = 166, + G_REGEX_ERROR_INVALID_CONTROL_CHAR = 168, + G_REGEX_ERROR_MISSING_NAME = 169, + G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS = 171, + G_REGEX_ERROR_TOO_MANY_FORWARD_REFERENCES = 172, + G_REGEX_ERROR_NAME_TOO_LONG = 175, + G_REGEX_ERROR_CHARACTER_VALUE_TOO_LARGE = 176 +} GRegexError; + +/** + * G_REGEX_ERROR: + * + * Error domain for regular expressions. Errors in this domain will be + * from the #GRegexError enumeration. See #GError for information on + * error domains. + * + * Since: 2.14 + */ +#define G_REGEX_ERROR g_regex_error_quark () + +GLIB_AVAILABLE_IN_ALL +GQuark g_regex_error_quark (void); + +/** + * GRegexCompileFlags: + * @G_REGEX_DEFAULT: No special options set. Since: 2.74 + * @G_REGEX_CASELESS: Letters in the pattern match both upper- and + * lowercase letters. This option can be changed within a pattern + * by a "(?i)" option setting. + * @G_REGEX_MULTILINE: By default, GRegex treats the strings as consisting + * of a single line of characters (even if it actually contains + * newlines). The "start of line" metacharacter ("^") matches only + * at the start of the string, while the "end of line" metacharacter + * ("$") matches only at the end of the string, or before a terminating + * newline (unless %G_REGEX_DOLLAR_ENDONLY is set). When + * %G_REGEX_MULTILINE is set, the "start of line" and "end of line" + * constructs match immediately following or immediately before any + * newline in the string, respectively, as well as at the very start + * and end. This can be changed within a pattern by a "(?m)" option + * setting. + * @G_REGEX_DOTALL: A dot metacharacter (".") in the pattern matches all + * characters, including newlines. Without it, newlines are excluded. + * This option can be changed within a pattern by a ("?s") option setting. + * @G_REGEX_EXTENDED: Whitespace data characters in the pattern are + * totally ignored except when escaped or inside a character class. + * Whitespace does not include the VT character (code 11). In addition, + * characters between an unescaped "#" outside a character class and + * the next newline character, inclusive, are also ignored. This can + * be changed within a pattern by a "(?x)" option setting. + * @G_REGEX_ANCHORED: The pattern is forced to be "anchored", that is, + * it is constrained to match only at the first matching point in the + * string that is being searched. This effect can also be achieved by + * appropriate constructs in the pattern itself such as the "^" + * metacharacter. + * @G_REGEX_DOLLAR_ENDONLY: A dollar metacharacter ("$") in the pattern + * matches only at the end of the string. Without this option, a + * dollar also matches immediately before the final character if + * it is a newline (but not before any other newlines). This option + * is ignored if %G_REGEX_MULTILINE is set. + * @G_REGEX_UNGREEDY: Inverts the "greediness" of the quantifiers so that + * they are not greedy by default, but become greedy if followed by "?". + * It can also be set by a "(?U)" option setting within the pattern. + * @G_REGEX_RAW: Usually strings must be valid UTF-8 strings, using this + * flag they are considered as a raw sequence of bytes. + * @G_REGEX_NO_AUTO_CAPTURE: Disables the use of numbered capturing + * parentheses in the pattern. Any opening parenthesis that is not + * followed by "?" behaves as if it were followed by "?:" but named + * parentheses can still be used for capturing (and they acquire numbers + * in the usual way). + * @G_REGEX_OPTIMIZE: Since 2.74 and the port to pcre2, requests JIT + * compilation, which, if the just-in-time compiler is available, further + * processes a compiled pattern into machine code that executes much + * faster. However, it comes at the cost of extra processing before the + * match is performed, so it is most beneficial to use this when the same + * compiled pattern is used for matching many times. Before 2.74 this + * option used the built-in non-JIT optimizations in pcre1. + * @G_REGEX_FIRSTLINE: Limits an unanchored pattern to match before (or at) the + * first newline. Since: 2.34 + * @G_REGEX_DUPNAMES: Names used to identify capturing subpatterns need not + * be unique. This can be helpful for certain types of pattern when it + * is known that only one instance of the named subpattern can ever be + * matched. + * @G_REGEX_NEWLINE_CR: Usually any newline character or character sequence is + * recognized. If this option is set, the only recognized newline character + * is '\r'. + * @G_REGEX_NEWLINE_LF: Usually any newline character or character sequence is + * recognized. If this option is set, the only recognized newline character + * is '\n'. + * @G_REGEX_NEWLINE_CRLF: Usually any newline character or character sequence is + * recognized. If this option is set, the only recognized newline character + * sequence is '\r\n'. + * @G_REGEX_NEWLINE_ANYCRLF: Usually any newline character or character sequence + * is recognized. If this option is set, the only recognized newline character + * sequences are '\r', '\n', and '\r\n'. Since: 2.34 + * @G_REGEX_BSR_ANYCRLF: Usually any newline character or character sequence + * is recognised. If this option is set, then "\R" only recognizes the newline + * characters '\r', '\n' and '\r\n'. Since: 2.34 + * @G_REGEX_JAVASCRIPT_COMPAT: Changes behaviour so that it is compatible with + * JavaScript rather than PCRE. Since GLib 2.74 this is no longer supported, + * as libpcre2 does not support it. Since: 2.34 Deprecated: 2.74 + * + * Flags specifying compile-time options. + * + * Since: 2.14 + */ +/* Remember to update G_REGEX_COMPILE_MASK in gregex.c after + * adding a new flag. + */ +typedef enum +{ + G_REGEX_DEFAULT GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0, + G_REGEX_CASELESS = 1 << 0, + G_REGEX_MULTILINE = 1 << 1, + G_REGEX_DOTALL = 1 << 2, + G_REGEX_EXTENDED = 1 << 3, + G_REGEX_ANCHORED = 1 << 4, + G_REGEX_DOLLAR_ENDONLY = 1 << 5, + G_REGEX_UNGREEDY = 1 << 9, + G_REGEX_RAW = 1 << 11, + G_REGEX_NO_AUTO_CAPTURE = 1 << 12, + G_REGEX_OPTIMIZE = 1 << 13, + G_REGEX_FIRSTLINE = 1 << 18, + G_REGEX_DUPNAMES = 1 << 19, + G_REGEX_NEWLINE_CR = 1 << 20, + G_REGEX_NEWLINE_LF = 1 << 21, + G_REGEX_NEWLINE_CRLF = G_REGEX_NEWLINE_CR | G_REGEX_NEWLINE_LF, + G_REGEX_NEWLINE_ANYCRLF = G_REGEX_NEWLINE_CR | 1 << 22, + G_REGEX_BSR_ANYCRLF = 1 << 23, + G_REGEX_JAVASCRIPT_COMPAT GLIB_DEPRECATED_ENUMERATOR_IN_2_74 = 1 << 25 +} GRegexCompileFlags; + +/** + * GRegexMatchFlags: + * @G_REGEX_MATCH_DEFAULT: No special options set. Since: 2.74 + * @G_REGEX_MATCH_ANCHORED: The pattern is forced to be "anchored", that is, + * it is constrained to match only at the first matching point in the + * string that is being searched. This effect can also be achieved by + * appropriate constructs in the pattern itself such as the "^" + * metacharacter. + * @G_REGEX_MATCH_NOTBOL: Specifies that first character of the string is + * not the beginning of a line, so the circumflex metacharacter should + * not match before it. Setting this without %G_REGEX_MULTILINE (at + * compile time) causes circumflex never to match. This option affects + * only the behaviour of the circumflex metacharacter, it does not + * affect "\A". + * @G_REGEX_MATCH_NOTEOL: Specifies that the end of the subject string is + * not the end of a line, so the dollar metacharacter should not match + * it nor (except in multiline mode) a newline immediately before it. + * Setting this without %G_REGEX_MULTILINE (at compile time) causes + * dollar never to match. This option affects only the behaviour of + * the dollar metacharacter, it does not affect "\Z" or "\z". + * @G_REGEX_MATCH_NOTEMPTY: An empty string is not considered to be a valid + * match if this option is set. If there are alternatives in the pattern, + * they are tried. If all the alternatives match the empty string, the + * entire match fails. For example, if the pattern "a?b?" is applied to + * a string not beginning with "a" or "b", it matches the empty string + * at the start of the string. With this flag set, this match is not + * valid, so GRegex searches further into the string for occurrences + * of "a" or "b". + * @G_REGEX_MATCH_PARTIAL: Turns on the partial matching feature, for more + * documentation on partial matching see g_match_info_is_partial_match(). + * @G_REGEX_MATCH_NEWLINE_CR: Overrides the newline definition set when + * creating a new #GRegex, setting the '\r' character as line terminator. + * @G_REGEX_MATCH_NEWLINE_LF: Overrides the newline definition set when + * creating a new #GRegex, setting the '\n' character as line terminator. + * @G_REGEX_MATCH_NEWLINE_CRLF: Overrides the newline definition set when + * creating a new #GRegex, setting the '\r\n' characters sequence as line terminator. + * @G_REGEX_MATCH_NEWLINE_ANY: Overrides the newline definition set when + * creating a new #GRegex, any Unicode newline sequence + * is recognised as a newline. These are '\r', '\n' and '\rn', and the + * single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), + * U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and + * U+2029 PARAGRAPH SEPARATOR. + * @G_REGEX_MATCH_NEWLINE_ANYCRLF: Overrides the newline definition set when + * creating a new #GRegex; any '\r', '\n', or '\r\n' character sequence + * is recognized as a newline. Since: 2.34 + * @G_REGEX_MATCH_BSR_ANYCRLF: Overrides the newline definition for "\R" set when + * creating a new #GRegex; only '\r', '\n', or '\r\n' character sequences + * are recognized as a newline by "\R". Since: 2.34 + * @G_REGEX_MATCH_BSR_ANY: Overrides the newline definition for "\R" set when + * creating a new #GRegex; any Unicode newline character or character sequence + * are recognized as a newline by "\R". These are '\r', '\n' and '\rn', and the + * single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), + * U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and + * U+2029 PARAGRAPH SEPARATOR. Since: 2.34 + * @G_REGEX_MATCH_PARTIAL_SOFT: An alias for %G_REGEX_MATCH_PARTIAL. Since: 2.34 + * @G_REGEX_MATCH_PARTIAL_HARD: Turns on the partial matching feature. In contrast to + * to %G_REGEX_MATCH_PARTIAL_SOFT, this stops matching as soon as a partial match + * is found, without continuing to search for a possible complete match. See + * g_match_info_is_partial_match() for more information. Since: 2.34 + * @G_REGEX_MATCH_NOTEMPTY_ATSTART: Like %G_REGEX_MATCH_NOTEMPTY, but only applied to + * the start of the matched string. For anchored + * patterns this can only happen for pattern containing "\K". Since: 2.34 + * + * Flags specifying match-time options. + * + * Since: 2.14 + */ +/* Remember to update G_REGEX_MATCH_MASK in gregex.c after + * adding a new flag. */ +typedef enum +{ + G_REGEX_MATCH_DEFAULT GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0, + G_REGEX_MATCH_ANCHORED = 1 << 4, + G_REGEX_MATCH_NOTBOL = 1 << 7, + G_REGEX_MATCH_NOTEOL = 1 << 8, + G_REGEX_MATCH_NOTEMPTY = 1 << 10, + G_REGEX_MATCH_PARTIAL = 1 << 15, + G_REGEX_MATCH_NEWLINE_CR = 1 << 20, + G_REGEX_MATCH_NEWLINE_LF = 1 << 21, + G_REGEX_MATCH_NEWLINE_CRLF = G_REGEX_MATCH_NEWLINE_CR | G_REGEX_MATCH_NEWLINE_LF, + G_REGEX_MATCH_NEWLINE_ANY = 1 << 22, + G_REGEX_MATCH_NEWLINE_ANYCRLF = G_REGEX_MATCH_NEWLINE_CR | G_REGEX_MATCH_NEWLINE_ANY, + G_REGEX_MATCH_BSR_ANYCRLF = 1 << 23, + G_REGEX_MATCH_BSR_ANY = 1 << 24, + G_REGEX_MATCH_PARTIAL_SOFT = G_REGEX_MATCH_PARTIAL, + G_REGEX_MATCH_PARTIAL_HARD = 1 << 27, + G_REGEX_MATCH_NOTEMPTY_ATSTART = 1 << 28 +} GRegexMatchFlags; + +/** + * GRegex: + * + * A GRegex is the "compiled" form of a regular expression pattern. + * This structure is opaque and its fields cannot be accessed directly. + * + * Since: 2.14 + */ +typedef struct _GRegex GRegex; + + +/** + * GMatchInfo: + * + * A GMatchInfo is an opaque struct used to return information about + * matches. + */ +typedef struct _GMatchInfo GMatchInfo; + +/** + * GRegexEvalCallback: + * @match_info: the #GMatchInfo generated by the match. + * Use g_match_info_get_regex() and g_match_info_get_string() if you + * need the #GRegex or the matched string. + * @result: a #GString containing the new string + * @user_data: user data passed to g_regex_replace_eval() + * + * Specifies the type of the function passed to g_regex_replace_eval(). + * It is called for each occurrence of the pattern in the string passed + * to g_regex_replace_eval(), and it should append the replacement to + * @result. + * + * Returns: %FALSE to continue the replacement process, %TRUE to stop it + * + * Since: 2.14 + */ +typedef gboolean (*GRegexEvalCallback) (const GMatchInfo *match_info, + GString *result, + gpointer user_data); + + +GLIB_AVAILABLE_IN_ALL +GRegex *g_regex_new (const gchar *pattern, + GRegexCompileFlags compile_options, + GRegexMatchFlags match_options, + GError **error); +GLIB_AVAILABLE_IN_ALL +GRegex *g_regex_ref (GRegex *regex); +GLIB_AVAILABLE_IN_ALL +void g_regex_unref (GRegex *regex); +GLIB_AVAILABLE_IN_ALL +const gchar *g_regex_get_pattern (const GRegex *regex); +GLIB_AVAILABLE_IN_ALL +gint g_regex_get_max_backref (const GRegex *regex); +GLIB_AVAILABLE_IN_ALL +gint g_regex_get_capture_count (const GRegex *regex); +GLIB_AVAILABLE_IN_ALL +gboolean g_regex_get_has_cr_or_lf (const GRegex *regex); +GLIB_AVAILABLE_IN_2_38 +gint g_regex_get_max_lookbehind (const GRegex *regex); +GLIB_AVAILABLE_IN_ALL +gint g_regex_get_string_number (const GRegex *regex, + const gchar *name); +GLIB_AVAILABLE_IN_ALL +gchar *g_regex_escape_string (const gchar *string, + gint length); +GLIB_AVAILABLE_IN_ALL +gchar *g_regex_escape_nul (const gchar *string, + gint length); + +GLIB_AVAILABLE_IN_ALL +GRegexCompileFlags g_regex_get_compile_flags (const GRegex *regex); +GLIB_AVAILABLE_IN_ALL +GRegexMatchFlags g_regex_get_match_flags (const GRegex *regex); + +/* Matching. */ +GLIB_AVAILABLE_IN_ALL +gboolean g_regex_match_simple (const gchar *pattern, + const gchar *string, + GRegexCompileFlags compile_options, + GRegexMatchFlags match_options); +GLIB_AVAILABLE_IN_ALL +gboolean g_regex_match (const GRegex *regex, + const gchar *string, + GRegexMatchFlags match_options, + GMatchInfo **match_info); +GLIB_AVAILABLE_IN_ALL +gboolean g_regex_match_full (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + GRegexMatchFlags match_options, + GMatchInfo **match_info, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_regex_match_all (const GRegex *regex, + const gchar *string, + GRegexMatchFlags match_options, + GMatchInfo **match_info); +GLIB_AVAILABLE_IN_ALL +gboolean g_regex_match_all_full (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + GRegexMatchFlags match_options, + GMatchInfo **match_info, + GError **error); + +/* String splitting. */ +GLIB_AVAILABLE_IN_ALL +gchar **g_regex_split_simple (const gchar *pattern, + const gchar *string, + GRegexCompileFlags compile_options, + GRegexMatchFlags match_options); +GLIB_AVAILABLE_IN_ALL +gchar **g_regex_split (const GRegex *regex, + const gchar *string, + GRegexMatchFlags match_options); +GLIB_AVAILABLE_IN_ALL +gchar **g_regex_split_full (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + GRegexMatchFlags match_options, + gint max_tokens, + GError **error); + +/* String replacement. */ +GLIB_AVAILABLE_IN_ALL +gchar *g_regex_replace (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + const gchar *replacement, + GRegexMatchFlags match_options, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar *g_regex_replace_literal (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + const gchar *replacement, + GRegexMatchFlags match_options, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar *g_regex_replace_eval (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + GRegexMatchFlags match_options, + GRegexEvalCallback eval, + gpointer user_data, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_regex_check_replacement (const gchar *replacement, + gboolean *has_references, + GError **error); + +/* Match info */ +GLIB_AVAILABLE_IN_ALL +GRegex *g_match_info_get_regex (const GMatchInfo *match_info); +GLIB_AVAILABLE_IN_ALL +const gchar *g_match_info_get_string (const GMatchInfo *match_info); + +GLIB_AVAILABLE_IN_ALL +GMatchInfo *g_match_info_ref (GMatchInfo *match_info); +GLIB_AVAILABLE_IN_ALL +void g_match_info_unref (GMatchInfo *match_info); +GLIB_AVAILABLE_IN_ALL +void g_match_info_free (GMatchInfo *match_info); +GLIB_AVAILABLE_IN_ALL +gboolean g_match_info_next (GMatchInfo *match_info, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_match_info_matches (const GMatchInfo *match_info); +GLIB_AVAILABLE_IN_ALL +gint g_match_info_get_match_count (const GMatchInfo *match_info); +GLIB_AVAILABLE_IN_ALL +gboolean g_match_info_is_partial_match (const GMatchInfo *match_info); +GLIB_AVAILABLE_IN_ALL +gchar *g_match_info_expand_references(const GMatchInfo *match_info, + const gchar *string_to_expand, + GError **error); +GLIB_AVAILABLE_IN_ALL +gchar *g_match_info_fetch (const GMatchInfo *match_info, + gint match_num); +GLIB_AVAILABLE_IN_ALL +gboolean g_match_info_fetch_pos (const GMatchInfo *match_info, + gint match_num, + gint *start_pos, + gint *end_pos); +GLIB_AVAILABLE_IN_ALL +gchar *g_match_info_fetch_named (const GMatchInfo *match_info, + const gchar *name); +GLIB_AVAILABLE_IN_ALL +gboolean g_match_info_fetch_named_pos (const GMatchInfo *match_info, + const gchar *name, + gint *start_pos, + gint *end_pos); +GLIB_AVAILABLE_IN_ALL +gchar **g_match_info_fetch_all (const GMatchInfo *match_info); + +G_END_DECLS + +#endif /* __G_REGEX_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gscanner.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gscanner.h new file mode 100644 index 0000000..bbad353 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gscanner.h @@ -0,0 +1,301 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_SCANNER_H__ +#define __G_SCANNER_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +typedef struct _GScanner GScanner; +typedef struct _GScannerConfig GScannerConfig; +typedef union _GTokenValue GTokenValue; + +typedef void (*GScannerMsgFunc) (GScanner *scanner, + gchar *message, + gboolean error); + +/* GScanner: Flexible lexical scanner for general purpose. + */ + +/* Character sets */ +#define G_CSET_A_2_Z "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +#define G_CSET_a_2_z "abcdefghijklmnopqrstuvwxyz" +#define G_CSET_DIGITS "0123456789" +#define G_CSET_LATINC "\300\301\302\303\304\305\306"\ + "\307\310\311\312\313\314\315\316\317\320"\ + "\321\322\323\324\325\326"\ + "\330\331\332\333\334\335\336" +#define G_CSET_LATINS "\337\340\341\342\343\344\345\346"\ + "\347\350\351\352\353\354\355\356\357\360"\ + "\361\362\363\364\365\366"\ + "\370\371\372\373\374\375\376\377" + +/* Error types */ +typedef enum +{ + G_ERR_UNKNOWN, + G_ERR_UNEXP_EOF, + G_ERR_UNEXP_EOF_IN_STRING, + G_ERR_UNEXP_EOF_IN_COMMENT, + G_ERR_NON_DIGIT_IN_CONST, + G_ERR_DIGIT_RADIX, + G_ERR_FLOAT_RADIX, + G_ERR_FLOAT_MALFORMED +} GErrorType; + +/* Token types */ +typedef enum +{ + G_TOKEN_EOF = 0, + + G_TOKEN_LEFT_PAREN = '(', + G_TOKEN_RIGHT_PAREN = ')', + G_TOKEN_LEFT_CURLY = '{', + G_TOKEN_RIGHT_CURLY = '}', + G_TOKEN_LEFT_BRACE = '[', + G_TOKEN_RIGHT_BRACE = ']', + G_TOKEN_EQUAL_SIGN = '=', + G_TOKEN_COMMA = ',', + + G_TOKEN_NONE = 256, + + G_TOKEN_ERROR, + + G_TOKEN_CHAR, + G_TOKEN_BINARY, + G_TOKEN_OCTAL, + G_TOKEN_INT, + G_TOKEN_HEX, + G_TOKEN_FLOAT, + G_TOKEN_STRING, + + G_TOKEN_SYMBOL, + G_TOKEN_IDENTIFIER, + G_TOKEN_IDENTIFIER_NULL, + + G_TOKEN_COMMENT_SINGLE, + G_TOKEN_COMMENT_MULTI, + + /*< private >*/ + G_TOKEN_LAST +} GTokenType; + +union _GTokenValue +{ + gpointer v_symbol; + gchar *v_identifier; + gulong v_binary; + gulong v_octal; + gulong v_int; + guint64 v_int64; + gdouble v_float; + gulong v_hex; + gchar *v_string; + gchar *v_comment; + guchar v_char; + guint v_error; +}; + +struct _GScannerConfig +{ + /* Character sets + */ + gchar *cset_skip_characters; /* default: " \t\n" */ + gchar *cset_identifier_first; + gchar *cset_identifier_nth; + gchar *cpair_comment_single; /* default: "#\n" */ + + /* Should symbol lookup work case sensitive? + */ + guint case_sensitive : 1; + + /* Boolean values to be adjusted "on the fly" + * to configure scanning behaviour. + */ + guint skip_comment_multi : 1; /* C like comment */ + guint skip_comment_single : 1; /* single line comment */ + guint scan_comment_multi : 1; /* scan multi line comments? */ + guint scan_identifier : 1; + guint scan_identifier_1char : 1; + guint scan_identifier_NULL : 1; + guint scan_symbols : 1; + guint scan_binary : 1; + guint scan_octal : 1; + guint scan_float : 1; + guint scan_hex : 1; /* '0x0ff0' */ + guint scan_hex_dollar : 1; /* '$0ff0' */ + guint scan_string_sq : 1; /* string: 'anything' */ + guint scan_string_dq : 1; /* string: "\\-escapes!\n" */ + guint numbers_2_int : 1; /* bin, octal, hex => int */ + guint int_2_float : 1; /* int => G_TOKEN_FLOAT? */ + guint identifier_2_string : 1; + guint char_2_token : 1; /* return G_TOKEN_CHAR? */ + guint symbol_2_token : 1; + guint scope_0_fallback : 1; /* try scope 0 on lookups? */ + guint store_int64 : 1; /* use value.v_int64 rather than v_int */ + + /*< private >*/ + guint padding_dummy; +}; + +struct _GScanner +{ + /* unused fields */ + gpointer user_data; + guint max_parse_errors; + + /* g_scanner_error() increments this field */ + guint parse_errors; + + /* name of input stream, featured by the default message handler */ + const gchar *input_name; + + /* quarked data */ + GData *qdata; + + /* link into the scanner configuration */ + GScannerConfig *config; + + /* fields filled in after g_scanner_get_next_token() */ + GTokenType token; + GTokenValue value; + guint line; + guint position; + + /* fields filled in after g_scanner_peek_next_token() */ + GTokenType next_token; + GTokenValue next_value; + guint next_line; + guint next_position; + + /*< private >*/ + /* to be considered private */ + GHashTable *symbol_table; + gint input_fd; + const gchar *text; + const gchar *text_end; + gchar *buffer; + guint scope_id; + + /*< public >*/ + /* handler function for _warn and _error */ + GScannerMsgFunc msg_handler; +}; + +GLIB_AVAILABLE_IN_ALL +GScanner* g_scanner_new (const GScannerConfig *config_templ); +GLIB_AVAILABLE_IN_ALL +void g_scanner_destroy (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +void g_scanner_input_file (GScanner *scanner, + gint input_fd); +GLIB_AVAILABLE_IN_ALL +void g_scanner_sync_file_offset (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +void g_scanner_input_text (GScanner *scanner, + const gchar *text, + guint text_len); +GLIB_AVAILABLE_IN_ALL +GTokenType g_scanner_get_next_token (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +GTokenType g_scanner_peek_next_token (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +GTokenType g_scanner_cur_token (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +GTokenValue g_scanner_cur_value (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +guint g_scanner_cur_line (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +guint g_scanner_cur_position (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +gboolean g_scanner_eof (GScanner *scanner); +GLIB_AVAILABLE_IN_ALL +guint g_scanner_set_scope (GScanner *scanner, + guint scope_id); +GLIB_AVAILABLE_IN_ALL +void g_scanner_scope_add_symbol (GScanner *scanner, + guint scope_id, + const gchar *symbol, + gpointer value); +GLIB_AVAILABLE_IN_ALL +void g_scanner_scope_remove_symbol (GScanner *scanner, + guint scope_id, + const gchar *symbol); +GLIB_AVAILABLE_IN_ALL +gpointer g_scanner_scope_lookup_symbol (GScanner *scanner, + guint scope_id, + const gchar *symbol); +GLIB_AVAILABLE_IN_ALL +void g_scanner_scope_foreach_symbol (GScanner *scanner, + guint scope_id, + GHFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +gpointer g_scanner_lookup_symbol (GScanner *scanner, + const gchar *symbol); +GLIB_AVAILABLE_IN_ALL +void g_scanner_unexp_token (GScanner *scanner, + GTokenType expected_token, + const gchar *identifier_spec, + const gchar *symbol_spec, + const gchar *symbol_name, + const gchar *message, + gint is_error); +GLIB_AVAILABLE_IN_ALL +void g_scanner_error (GScanner *scanner, + const gchar *format, + ...) G_GNUC_PRINTF (2,3); +GLIB_AVAILABLE_IN_ALL +void g_scanner_warn (GScanner *scanner, + const gchar *format, + ...) G_GNUC_PRINTF (2,3); + +/* keep downward source compatibility */ +#define g_scanner_add_symbol( scanner, symbol, value ) G_STMT_START { \ + g_scanner_scope_add_symbol ((scanner), 0, (symbol), (value)); \ +} G_STMT_END GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_scanner_scope_add_symbol) +#define g_scanner_remove_symbol( scanner, symbol ) G_STMT_START { \ + g_scanner_scope_remove_symbol ((scanner), 0, (symbol)); \ +} G_STMT_END GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_scanner_scope_remove_symbol) +#define g_scanner_foreach_symbol( scanner, func, data ) G_STMT_START { \ + g_scanner_scope_foreach_symbol ((scanner), 0, (func), (data)); \ +} G_STMT_END GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_scanner_scope_foreach_symbol) + +/* The following two functions are deprecated and will be removed in + * the next major release. They do no good. */ +#define g_scanner_freeze_symbol_table(scanner) ((void)0) GLIB_DEPRECATED_MACRO_IN_2_26 +#define g_scanner_thaw_symbol_table(scanner) ((void)0) GLIB_DEPRECATED_MACRO_IN_2_26 + +G_END_DECLS + +#endif /* __G_SCANNER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gsequence.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gsequence.h new file mode 100644 index 0000000..c1b3404 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gsequence.h @@ -0,0 +1,175 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 + * Soeren Sandmann (sandmann@daimi.au.dk) + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef __G_SEQUENCE_H__ +#define __G_SEQUENCE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +typedef struct _GSequence GSequence; +typedef struct _GSequenceNode GSequenceIter; + +typedef gint (* GSequenceIterCompareFunc) (GSequenceIter *a, + GSequenceIter *b, + gpointer data); + + +/* GSequence */ +GLIB_AVAILABLE_IN_ALL +GSequence * g_sequence_new (GDestroyNotify data_destroy); +GLIB_AVAILABLE_IN_ALL +void g_sequence_free (GSequence *seq); +GLIB_AVAILABLE_IN_ALL +gint g_sequence_get_length (GSequence *seq); +GLIB_AVAILABLE_IN_ALL +void g_sequence_foreach (GSequence *seq, + GFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +void g_sequence_foreach_range (GSequenceIter *begin, + GSequenceIter *end, + GFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +void g_sequence_sort (GSequence *seq, + GCompareDataFunc cmp_func, + gpointer cmp_data); +GLIB_AVAILABLE_IN_ALL +void g_sequence_sort_iter (GSequence *seq, + GSequenceIterCompareFunc cmp_func, + gpointer cmp_data); +GLIB_AVAILABLE_IN_2_48 +gboolean g_sequence_is_empty (GSequence *seq); + + +/* Getting iters */ +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_get_begin_iter (GSequence *seq); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_get_end_iter (GSequence *seq); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_get_iter_at_pos (GSequence *seq, + gint pos); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_append (GSequence *seq, + gpointer data); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_prepend (GSequence *seq, + gpointer data); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_insert_before (GSequenceIter *iter, + gpointer data); +GLIB_AVAILABLE_IN_ALL +void g_sequence_move (GSequenceIter *src, + GSequenceIter *dest); +GLIB_AVAILABLE_IN_ALL +void g_sequence_swap (GSequenceIter *a, + GSequenceIter *b); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_insert_sorted (GSequence *seq, + gpointer data, + GCompareDataFunc cmp_func, + gpointer cmp_data); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_insert_sorted_iter (GSequence *seq, + gpointer data, + GSequenceIterCompareFunc iter_cmp, + gpointer cmp_data); +GLIB_AVAILABLE_IN_ALL +void g_sequence_sort_changed (GSequenceIter *iter, + GCompareDataFunc cmp_func, + gpointer cmp_data); +GLIB_AVAILABLE_IN_ALL +void g_sequence_sort_changed_iter (GSequenceIter *iter, + GSequenceIterCompareFunc iter_cmp, + gpointer cmp_data); +GLIB_AVAILABLE_IN_ALL +void g_sequence_remove (GSequenceIter *iter); +GLIB_AVAILABLE_IN_ALL +void g_sequence_remove_range (GSequenceIter *begin, + GSequenceIter *end); +GLIB_AVAILABLE_IN_ALL +void g_sequence_move_range (GSequenceIter *dest, + GSequenceIter *begin, + GSequenceIter *end); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_search (GSequence *seq, + gpointer data, + GCompareDataFunc cmp_func, + gpointer cmp_data); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_search_iter (GSequence *seq, + gpointer data, + GSequenceIterCompareFunc iter_cmp, + gpointer cmp_data); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_lookup (GSequence *seq, + gpointer data, + GCompareDataFunc cmp_func, + gpointer cmp_data); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_lookup_iter (GSequence *seq, + gpointer data, + GSequenceIterCompareFunc iter_cmp, + gpointer cmp_data); + + +/* Dereferencing */ +GLIB_AVAILABLE_IN_ALL +gpointer g_sequence_get (GSequenceIter *iter); +GLIB_AVAILABLE_IN_ALL +void g_sequence_set (GSequenceIter *iter, + gpointer data); + +/* Operations on GSequenceIter * */ +GLIB_AVAILABLE_IN_ALL +gboolean g_sequence_iter_is_begin (GSequenceIter *iter); +GLIB_AVAILABLE_IN_ALL +gboolean g_sequence_iter_is_end (GSequenceIter *iter); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_iter_next (GSequenceIter *iter); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_iter_prev (GSequenceIter *iter); +GLIB_AVAILABLE_IN_ALL +gint g_sequence_iter_get_position (GSequenceIter *iter); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_iter_move (GSequenceIter *iter, + gint delta); +GLIB_AVAILABLE_IN_ALL +GSequence * g_sequence_iter_get_sequence (GSequenceIter *iter); + + +/* Search */ +GLIB_AVAILABLE_IN_ALL +gint g_sequence_iter_compare (GSequenceIter *a, + GSequenceIter *b); +GLIB_AVAILABLE_IN_ALL +GSequenceIter *g_sequence_range_get_midpoint (GSequenceIter *begin, + GSequenceIter *end); + +G_END_DECLS + +#endif /* __G_SEQUENCE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gshell.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gshell.h new file mode 100644 index 0000000..4084b69 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gshell.h @@ -0,0 +1,59 @@ +/* gshell.h - Shell-related utilities + * + * Copyright 2000 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_SHELL_H__ +#define __G_SHELL_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define G_SHELL_ERROR g_shell_error_quark () + +typedef enum +{ + /* mismatched or otherwise mangled quoting */ + G_SHELL_ERROR_BAD_QUOTING, + /* string to be parsed was empty */ + G_SHELL_ERROR_EMPTY_STRING, + G_SHELL_ERROR_FAILED +} GShellError; + +GLIB_AVAILABLE_IN_ALL +GQuark g_shell_error_quark (void); + +GLIB_AVAILABLE_IN_ALL +gchar* g_shell_quote (const gchar *unquoted_string); +GLIB_AVAILABLE_IN_ALL +gchar* g_shell_unquote (const gchar *quoted_string, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_shell_parse_argv (const gchar *command_line, + gint *argcp, + gchar ***argvp, + GError **error); + +G_END_DECLS + +#endif /* __G_SHELL_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gslice.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gslice.h new file mode 100644 index 0000000..eb67786 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gslice.h @@ -0,0 +1,117 @@ +/* GLIB sliced memory - fast threaded memory chunk allocator + * Copyright (C) 2005 Tim Janik + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef __G_SLICE_H__ +#define __G_SLICE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +/* slices - fast allocation/release of small memory blocks + */ +GLIB_AVAILABLE_IN_ALL +gpointer g_slice_alloc (gsize block_size) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_ALL +gpointer g_slice_alloc0 (gsize block_size) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_ALL +gpointer g_slice_copy (gsize block_size, + gconstpointer mem_block) G_GNUC_ALLOC_SIZE(1); +GLIB_AVAILABLE_IN_ALL +void g_slice_free1 (gsize block_size, + gpointer mem_block); +GLIB_AVAILABLE_IN_ALL +void g_slice_free_chain_with_offset (gsize block_size, + gpointer mem_chain, + gsize next_offset); +#define g_slice_new(type) ((type*) g_slice_alloc (sizeof (type))) + +/* Allow the compiler to inline memset(). Since the size is a constant, this + * can significantly improve performance. */ +#if defined (__GNUC__) && (__GNUC__ >= 2) && defined (__OPTIMIZE__) +# define g_slice_new0(type) \ + (type *) (G_GNUC_EXTENSION ({ \ + gsize __s = sizeof (type); \ + gpointer __p; \ + __p = g_slice_alloc (__s); \ + memset (__p, 0, __s); \ + __p; \ + })) +#else +# define g_slice_new0(type) ((type*) g_slice_alloc0 (sizeof (type))) +#endif + +/* MemoryBlockType * + * g_slice_dup (MemoryBlockType, + * MemoryBlockType *mem_block); + * g_slice_free (MemoryBlockType, + * MemoryBlockType *mem_block); + * g_slice_free_chain (MemoryBlockType, + * MemoryBlockType *first_chain_block, + * memory_block_next_field); + * pseudo prototypes for the macro + * definitions following below. + */ + +/* we go through extra hoops to ensure type safety */ +#define g_slice_dup(type, mem) \ + (1 ? (type*) g_slice_copy (sizeof (type), (mem)) \ + : ((void) ((type*) 0 == (mem)), (type*) 0)) +#define g_slice_free(type, mem) \ +G_STMT_START { \ + if (1) g_slice_free1 (sizeof (type), (mem)); \ + else (void) ((type*) 0 == (mem)); \ +} G_STMT_END +#define g_slice_free_chain(type, mem_chain, next) \ +G_STMT_START { \ + if (1) g_slice_free_chain_with_offset (sizeof (type), \ + (mem_chain), G_STRUCT_OFFSET (type, next)); \ + else (void) ((type*) 0 == (mem_chain)); \ +} G_STMT_END + +/* --- internal debugging API --- */ +typedef enum { + G_SLICE_CONFIG_ALWAYS_MALLOC = 1, + G_SLICE_CONFIG_BYPASS_MAGAZINES, + G_SLICE_CONFIG_WORKING_SET_MSECS, + G_SLICE_CONFIG_COLOR_INCREMENT, + G_SLICE_CONFIG_CHUNK_SIZES, + G_SLICE_CONFIG_CONTENTION_COUNTER +} GSliceConfig; + +GLIB_DEPRECATED_IN_2_34 +void g_slice_set_config (GSliceConfig ckey, gint64 value); +GLIB_DEPRECATED_IN_2_34 +gint64 g_slice_get_config (GSliceConfig ckey); +GLIB_DEPRECATED_IN_2_34 +gint64* g_slice_get_config_state (GSliceConfig ckey, gint64 address, guint *n_values); + +#ifdef G_ENABLE_DEBUG +GLIB_AVAILABLE_IN_ALL +void g_slice_debug_tree_statistics (void); +#endif + +G_END_DECLS + +#endif /* __G_SLICE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gslist.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gslist.h new file mode 100644 index 0000000..c8e0cf2 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gslist.h @@ -0,0 +1,166 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_SLIST_H__ +#define __G_SLIST_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +typedef struct _GSList GSList; + +struct _GSList +{ + gpointer data; + GSList *next; +}; + +/* Singly linked lists + */ +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_alloc (void) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +void g_slist_free (GSList *list); +GLIB_AVAILABLE_IN_ALL +void g_slist_free_1 (GSList *list); +#define g_slist_free1 g_slist_free_1 +GLIB_AVAILABLE_IN_ALL +void g_slist_free_full (GSList *list, + GDestroyNotify free_func); +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_append (GSList *list, + gpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_prepend (GSList *list, + gpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_insert (GSList *list, + gpointer data, + gint position) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_insert_sorted (GSList *list, + gpointer data, + GCompareFunc func) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_insert_sorted_with_data (GSList *list, + gpointer data, + GCompareDataFunc func, + gpointer user_data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_insert_before (GSList *slist, + GSList *sibling, + gpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_concat (GSList *list1, + GSList *list2) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_remove (GSList *list, + gconstpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_remove_all (GSList *list, + gconstpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_remove_link (GSList *list, + GSList *link_) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_delete_link (GSList *list, + GSList *link_) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_reverse (GSList *list) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_copy (GSList *list) G_GNUC_WARN_UNUSED_RESULT; + +GLIB_AVAILABLE_IN_2_34 +GSList* g_slist_copy_deep (GSList *list, + GCopyFunc func, + gpointer user_data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_nth (GSList *list, + guint n); +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_find (GSList *list, + gconstpointer data); +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_find_custom (GSList *list, + gconstpointer data, + GCompareFunc func); +GLIB_AVAILABLE_IN_ALL +gint g_slist_position (GSList *list, + GSList *llink); +GLIB_AVAILABLE_IN_ALL +gint g_slist_index (GSList *list, + gconstpointer data); +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_last (GSList *list); +GLIB_AVAILABLE_IN_ALL +guint g_slist_length (GSList *list); +GLIB_AVAILABLE_IN_ALL +void g_slist_foreach (GSList *list, + GFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_sort (GSList *list, + GCompareFunc compare_func) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +GSList* g_slist_sort_with_data (GSList *list, + GCompareDataFunc compare_func, + gpointer user_data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL +gpointer g_slist_nth_data (GSList *list, + guint n); + +GLIB_AVAILABLE_IN_2_64 +void g_clear_slist (GSList **slist_ptr, + GDestroyNotify destroy); + +#define g_clear_slist(slist_ptr, destroy) \ + G_STMT_START { \ + GSList *_slist; \ + \ + _slist = *(slist_ptr); \ + if (_slist) \ + { \ + *slist_ptr = NULL; \ + \ + if ((destroy) != NULL) \ + g_slist_free_full (_slist, (destroy)); \ + else \ + g_slist_free (_slist); \ + } \ + } G_STMT_END \ + GLIB_AVAILABLE_MACRO_IN_2_64 + +#define g_slist_next(slist) ((slist) ? (((GSList *)(slist))->next) : NULL) + +G_END_DECLS + +#endif /* __G_SLIST_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gspawn.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gspawn.h new file mode 100644 index 0000000..a3c4aca --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gspawn.h @@ -0,0 +1,323 @@ +/* gspawn.h - Process launching + * + * Copyright 2000 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_SPAWN_H__ +#define __G_SPAWN_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + + +/* I'm not sure I remember our proposed naming convention here. */ +/** + * G_SPAWN_ERROR: + * + * Error domain for spawning processes. Errors in this domain will + * be from the #GSpawnError enumeration. See #GError for information on + * error domains. + */ +#define G_SPAWN_ERROR g_spawn_error_quark () + +/** + * GSpawnError: + * @G_SPAWN_ERROR_FORK: Fork failed due to lack of memory. + * @G_SPAWN_ERROR_READ: Read or select on pipes failed. + * @G_SPAWN_ERROR_CHDIR: Changing to working directory failed. + * @G_SPAWN_ERROR_ACCES: execv() returned `EACCES` + * @G_SPAWN_ERROR_PERM: execv() returned `EPERM` + * @G_SPAWN_ERROR_TOO_BIG: execv() returned `E2BIG` + * @G_SPAWN_ERROR_2BIG: deprecated alias for %G_SPAWN_ERROR_TOO_BIG (deprecated since GLib 2.32) + * @G_SPAWN_ERROR_NOEXEC: execv() returned `ENOEXEC` + * @G_SPAWN_ERROR_NAMETOOLONG: execv() returned `ENAMETOOLONG` + * @G_SPAWN_ERROR_NOENT: execv() returned `ENOENT` + * @G_SPAWN_ERROR_NOMEM: execv() returned `ENOMEM` + * @G_SPAWN_ERROR_NOTDIR: execv() returned `ENOTDIR` + * @G_SPAWN_ERROR_LOOP: execv() returned `ELOOP` + * @G_SPAWN_ERROR_TXTBUSY: execv() returned `ETXTBUSY` + * @G_SPAWN_ERROR_IO: execv() returned `EIO` + * @G_SPAWN_ERROR_NFILE: execv() returned `ENFILE` + * @G_SPAWN_ERROR_MFILE: execv() returned `EMFILE` + * @G_SPAWN_ERROR_INVAL: execv() returned `EINVAL` + * @G_SPAWN_ERROR_ISDIR: execv() returned `EISDIR` + * @G_SPAWN_ERROR_LIBBAD: execv() returned `ELIBBAD` + * @G_SPAWN_ERROR_FAILED: Some other fatal failure, + * `error->message` should explain. + * + * Error codes returned by spawning processes. + */ +typedef enum +{ + G_SPAWN_ERROR_FORK, /* fork failed due to lack of memory */ + G_SPAWN_ERROR_READ, /* read or select on pipes failed */ + G_SPAWN_ERROR_CHDIR, /* changing to working dir failed */ + G_SPAWN_ERROR_ACCES, /* execv() returned EACCES */ + G_SPAWN_ERROR_PERM, /* execv() returned EPERM */ + G_SPAWN_ERROR_TOO_BIG,/* execv() returned E2BIG */ + G_SPAWN_ERROR_2BIG GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR(G_SPAWN_ERROR_TOO_BIG) = G_SPAWN_ERROR_TOO_BIG, + G_SPAWN_ERROR_NOEXEC, /* execv() returned ENOEXEC */ + G_SPAWN_ERROR_NAMETOOLONG, /* "" "" ENAMETOOLONG */ + G_SPAWN_ERROR_NOENT, /* "" "" ENOENT */ + G_SPAWN_ERROR_NOMEM, /* "" "" ENOMEM */ + G_SPAWN_ERROR_NOTDIR, /* "" "" ENOTDIR */ + G_SPAWN_ERROR_LOOP, /* "" "" ELOOP */ + G_SPAWN_ERROR_TXTBUSY, /* "" "" ETXTBUSY */ + G_SPAWN_ERROR_IO, /* "" "" EIO */ + G_SPAWN_ERROR_NFILE, /* "" "" ENFILE */ + G_SPAWN_ERROR_MFILE, /* "" "" EMFLE */ + G_SPAWN_ERROR_INVAL, /* "" "" EINVAL */ + G_SPAWN_ERROR_ISDIR, /* "" "" EISDIR */ + G_SPAWN_ERROR_LIBBAD, /* "" "" ELIBBAD */ + G_SPAWN_ERROR_FAILED /* other fatal failure, error->message + * should explain + */ +} GSpawnError; + +/** + * G_SPAWN_EXIT_ERROR: + * + * Error domain used by g_spawn_check_wait_status(). The code + * will be the program exit code. + */ +#define G_SPAWN_EXIT_ERROR g_spawn_exit_error_quark () + +/** + * GSpawnChildSetupFunc: + * @data: user data passed to the function. + * + * Specifies the type of the setup function passed to g_spawn_async(), + * g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very + * limited ways, be used to affect the child's execution. + * + * On POSIX platforms, the function is called in the child after GLib + * has performed all the setup it plans to perform, but before calling + * exec(). Actions taken in this function will only affect the child, + * not the parent. + * + * On Windows, the function is called in the parent. Its usefulness on + * Windows is thus questionable. In many cases executing the child setup + * function in the parent can have ill effects, and you should be very + * careful when porting software to Windows that uses child setup + * functions. + * + * However, even on POSIX, you are extremely limited in what you can + * safely do from a #GSpawnChildSetupFunc, because any mutexes that were + * held by other threads in the parent process at the time of the fork() + * will still be locked in the child process, and they will never be + * unlocked (since the threads that held them don't exist in the child). + * POSIX allows only async-signal-safe functions (see signal(7)) to be + * called in the child between fork() and exec(), which drastically limits + * the usefulness of child setup functions. + * + * In particular, it is not safe to call any function which may + * call malloc(), which includes POSIX functions such as setenv(). + * If you need to set up the child environment differently from + * the parent, you should use g_get_environ(), g_environ_setenv(), + * and g_environ_unsetenv(), and then pass the complete environment + * list to the `g_spawn...` function. + */ +typedef void (* GSpawnChildSetupFunc) (gpointer data); + +/** + * GSpawnFlags: + * @G_SPAWN_DEFAULT: no flags, default behaviour + * @G_SPAWN_LEAVE_DESCRIPTORS_OPEN: the parent's open file descriptors will + * be inherited by the child; otherwise all descriptors except stdin, + * stdout and stderr will be closed before calling exec() in the child. + * @G_SPAWN_DO_NOT_REAP_CHILD: the child will not be automatically reaped; + * you must use g_child_watch_add() yourself (or call waitpid() or handle + * `SIGCHLD` yourself), or the child will become a zombie. + * @G_SPAWN_SEARCH_PATH: `argv[0]` need not be an absolute path, it will be + * looked for in the user's `PATH`. + * @G_SPAWN_STDOUT_TO_DEV_NULL: the child's standard output will be discarded, + * instead of going to the same location as the parent's standard output. + * @G_SPAWN_STDERR_TO_DEV_NULL: the child's standard error will be discarded. + * @G_SPAWN_CHILD_INHERITS_STDIN: the child will inherit the parent's standard + * input (by default, the child's standard input is attached to `/dev/null`). + * @G_SPAWN_FILE_AND_ARGV_ZERO: the first element of `argv` is the file to + * execute, while the remaining elements are the actual argument vector + * to pass to the file. Normally g_spawn_async_with_pipes() uses `argv[0]` + * as the file to execute, and passes all of `argv` to the child. + * @G_SPAWN_SEARCH_PATH_FROM_ENVP: if `argv[0]` is not an absolute path, + * it will be looked for in the `PATH` from the passed child environment. + * Since: 2.34 + * @G_SPAWN_CLOEXEC_PIPES: create all pipes with the `O_CLOEXEC` flag set. + * Since: 2.40 + * @G_SPAWN_CHILD_INHERITS_STDOUT: the child will inherit the parent's standard output. + * Since: 2.74 + * @G_SPAWN_CHILD_INHERITS_STDERR: the child will inherit the parent's standard error. + * Since: 2.74 + * @G_SPAWN_STDIN_FROM_DEV_NULL: the child's standard input is attached to `/dev/null`. + * Since: 2.74 + * + * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes(). + */ +typedef enum +{ + G_SPAWN_DEFAULT = 0, + G_SPAWN_LEAVE_DESCRIPTORS_OPEN = 1 << 0, + G_SPAWN_DO_NOT_REAP_CHILD = 1 << 1, + /* look for argv[0] in the path i.e. use execvp() */ + G_SPAWN_SEARCH_PATH = 1 << 2, + /* Dump output to /dev/null */ + G_SPAWN_STDOUT_TO_DEV_NULL = 1 << 3, + G_SPAWN_STDERR_TO_DEV_NULL = 1 << 4, + G_SPAWN_CHILD_INHERITS_STDIN = 1 << 5, + G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6, + G_SPAWN_SEARCH_PATH_FROM_ENVP = 1 << 7, + G_SPAWN_CLOEXEC_PIPES = 1 << 8, + + /** + * G_SPAWN_CHILD_INHERITS_STDOUT: + * + * The child will inherit the parent's standard output. + * + * Since: 2.74 + */ + G_SPAWN_CHILD_INHERITS_STDOUT = 1 << 9, + + /** + * G_SPAWN_CHILD_INHERITS_STDERR: + * + * The child will inherit the parent's standard error. + * + * Since: 2.74 + */ + G_SPAWN_CHILD_INHERITS_STDERR = 1 << 10, + + /** + * G_SPAWN_STDIN_FROM_DEV_NULL: + * + * The child's standard input is attached to `/dev/null`. + * + * Since: 2.74 + */ + G_SPAWN_STDIN_FROM_DEV_NULL = 1 << 11 +} GSpawnFlags; + +GLIB_AVAILABLE_IN_ALL +GQuark g_spawn_error_quark (void); +GLIB_AVAILABLE_IN_ALL +GQuark g_spawn_exit_error_quark (void); + +GLIB_AVAILABLE_IN_ALL +gboolean g_spawn_async (const gchar *working_directory, + gchar **argv, + gchar **envp, + GSpawnFlags flags, + GSpawnChildSetupFunc child_setup, + gpointer user_data, + GPid *child_pid, + GError **error); + + +/* Opens pipes for non-NULL standard_output, standard_input, standard_error, + * and returns the parent's end of the pipes. + */ +GLIB_AVAILABLE_IN_ALL +gboolean g_spawn_async_with_pipes (const gchar *working_directory, + gchar **argv, + gchar **envp, + GSpawnFlags flags, + GSpawnChildSetupFunc child_setup, + gpointer user_data, + GPid *child_pid, + gint *standard_input, + gint *standard_output, + gint *standard_error, + GError **error); + +GLIB_AVAILABLE_IN_2_68 +gboolean g_spawn_async_with_pipes_and_fds (const gchar *working_directory, + const gchar * const *argv, + const gchar * const *envp, + GSpawnFlags flags, + GSpawnChildSetupFunc child_setup, + gpointer user_data, + gint stdin_fd, + gint stdout_fd, + gint stderr_fd, + const gint *source_fds, + const gint *target_fds, + gsize n_fds, + GPid *child_pid_out, + gint *stdin_pipe_out, + gint *stdout_pipe_out, + gint *stderr_pipe_out, + GError **error); + +/* Lets you provide fds for stdin/stdout/stderr */ +GLIB_AVAILABLE_IN_2_58 +gboolean g_spawn_async_with_fds (const gchar *working_directory, + gchar **argv, + gchar **envp, + GSpawnFlags flags, + GSpawnChildSetupFunc child_setup, + gpointer user_data, + GPid *child_pid, + gint stdin_fd, + gint stdout_fd, + gint stderr_fd, + GError **error); + +/* If standard_output or standard_error are non-NULL, the full + * standard output or error of the command will be placed there. + */ + +GLIB_AVAILABLE_IN_ALL +gboolean g_spawn_sync (const gchar *working_directory, + gchar **argv, + gchar **envp, + GSpawnFlags flags, + GSpawnChildSetupFunc child_setup, + gpointer user_data, + gchar **standard_output, + gchar **standard_error, + gint *wait_status, + GError **error); + +GLIB_AVAILABLE_IN_ALL +gboolean g_spawn_command_line_sync (const gchar *command_line, + gchar **standard_output, + gchar **standard_error, + gint *wait_status, + GError **error); +GLIB_AVAILABLE_IN_ALL +gboolean g_spawn_command_line_async (const gchar *command_line, + GError **error); + +GLIB_AVAILABLE_IN_2_70 +gboolean g_spawn_check_wait_status (gint wait_status, + GError **error); + +GLIB_DEPRECATED_IN_2_70_FOR(g_spawn_check_wait_status) +gboolean g_spawn_check_exit_status (gint wait_status, + GError **error); + +GLIB_AVAILABLE_IN_ALL +void g_spawn_close_pid (GPid pid); + +G_END_DECLS + +#endif /* __G_SPAWN_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gstdio.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gstdio.h new file mode 100644 index 0000000..7acdb9c --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gstdio.h @@ -0,0 +1,231 @@ +/* gstdio.h - GFilename wrappers for C library functions + * + * Copyright 2004 Tor Lillqvist + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_STDIO_H__ +#define __G_STDIO_H__ + +#include + +#include +#include + +G_BEGIN_DECLS + +#if (defined (__MINGW64_VERSION_MAJOR) || defined (_MSC_VER)) && !defined(_WIN64) + +/* Make it clear that we mean the struct with 32-bit st_size and + * 32-bit st_*time fields as that is how the 32-bit GLib DLL normally + * has been compiled. If you get a compiler warning when calling + * g_stat(), do take it seriously and make sure that the type of + * struct stat the code in GLib fills in matches the struct the type + * of struct stat you pass to g_stat(). To avoid hassle, to get file + * attributes just use the GIO API instead which doesn't use struct + * stat. + * + * Sure, it would be nicer to use a struct with 64-bit st_size and + * 64-bit st_*time fields, but changing that now would break ABI. And + * in MinGW, a plain "struct stat" is the one with 32-bit st_size and + * st_*time fields. + */ + +typedef struct _stat32 GStatBuf; + +#elif defined(__MINGW64_VERSION_MAJOR) && defined(_WIN64) + +typedef struct _stat64 GStatBuf; + +#else + +typedef struct stat GStatBuf; + +#endif + +#if defined(G_OS_UNIX) && !defined(G_STDIO_WRAP_ON_UNIX) + +/* Just pass on to the system functions, so there's no potential for data + * format mismatches, especially with large file interfaces. + * A few functions can't be handled in this way, since they are not defined + * in a portable system header that we could include here. + * + * G_STDIO_WRAP_ON_UNIX is not public API and its behaviour is not guaranteed + * in future. + */ + +#ifndef __GTK_DOC_IGNORE__ +#define g_chmod chmod +#define g_open open +#define g_creat creat +#define g_rename rename +#define g_mkdir mkdir +#define g_stat stat +#define g_lstat lstat +#define g_remove remove +#define g_fopen fopen +#define g_freopen freopen +#define g_fsync fsync +#define g_utime utime +#endif + +GLIB_AVAILABLE_IN_ALL +int g_access (const gchar *filename, + int mode); + +GLIB_AVAILABLE_IN_ALL +int g_chdir (const gchar *path); + +GLIB_AVAILABLE_IN_ALL +int g_unlink (const gchar *filename); + +GLIB_AVAILABLE_IN_ALL +int g_rmdir (const gchar *filename); + +#else /* ! G_OS_UNIX */ + +/* Wrappers for C library functions that take pathname arguments. On + * Unix, the pathname is a file name as it literally is in the file + * system. On well-maintained systems with consistent users who know + * what they are doing and no exchange of files with others this would + * be a well-defined encoding, preferably UTF-8. On Windows, the + * pathname is always in UTF-8, even if that is not the on-disk + * encoding, and not the encoding accepted by the C library or Win32 + * API. + */ + +GLIB_AVAILABLE_IN_ALL +int g_access (const gchar *filename, + int mode); + +GLIB_AVAILABLE_IN_ALL +int g_chmod (const gchar *filename, + int mode); + +GLIB_AVAILABLE_IN_ALL +int g_open (const gchar *filename, + int flags, + int mode); + +GLIB_AVAILABLE_IN_ALL +int g_creat (const gchar *filename, + int mode); + +GLIB_AVAILABLE_IN_ALL +int g_rename (const gchar *oldfilename, + const gchar *newfilename); + +GLIB_AVAILABLE_IN_ALL +int g_mkdir (const gchar *filename, + int mode); + +GLIB_AVAILABLE_IN_ALL +int g_chdir (const gchar *path); + +GLIB_AVAILABLE_IN_ALL +int g_stat (const gchar *filename, + GStatBuf *buf); + +GLIB_AVAILABLE_IN_ALL +int g_lstat (const gchar *filename, + GStatBuf *buf); + +GLIB_AVAILABLE_IN_ALL +int g_unlink (const gchar *filename); + +GLIB_AVAILABLE_IN_ALL +int g_remove (const gchar *filename); + +GLIB_AVAILABLE_IN_ALL +int g_rmdir (const gchar *filename); + +GLIB_AVAILABLE_IN_ALL +FILE *g_fopen (const gchar *filename, + const gchar *mode); + +GLIB_AVAILABLE_IN_ALL +FILE *g_freopen (const gchar *filename, + const gchar *mode, + FILE *stream); + +GLIB_AVAILABLE_IN_2_64 +gint g_fsync (gint fd); + +struct utimbuf; /* Don't need the real definition of struct utimbuf when just + * including this header. + */ + +GLIB_AVAILABLE_IN_ALL +int g_utime (const gchar *filename, + struct utimbuf *utb); + +#endif /* G_OS_UNIX */ + +GLIB_AVAILABLE_IN_2_36 +gboolean g_close (gint fd, + GError **error); + +GLIB_AVAILABLE_STATIC_INLINE_IN_2_76 +static inline gboolean +g_clear_fd (int *fd_ptr, + GError **error) +{ + int fd = *fd_ptr; + + *fd_ptr = -1; + + if (fd < 0) + return TRUE; + + /* Suppress "Not available before" warning */ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS + return g_close (fd, error); + G_GNUC_END_IGNORE_DEPRECATIONS +} + +/* g_autofd should be defined on the same compilers where g_autofree is + * This avoids duplicating the feature-detection here. */ +#ifdef g_autofree +#ifndef __GTK_DOC_IGNORE__ +/* Not public API */ +static inline void +_g_clear_fd_ignore_error (int *fd_ptr) +{ + /* Don't overwrite thread-local errno if closing the fd fails */ + int errsv = errno; + + /* Suppress "Not available before" warning */ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS + + if (!g_clear_fd (fd_ptr, NULL)) + { + /* Do nothing: we ignore all errors, except for EBADF which + * is a programming error, checked for by g_close(). */ + } + + G_GNUC_END_IGNORE_DEPRECATIONS + + errno = errsv; +} +#endif + +#define g_autofd _GLIB_CLEANUP(_g_clear_fd_ignore_error) GLIB_AVAILABLE_MACRO_IN_2_76 +#endif + +G_END_DECLS + +#endif /* __G_STDIO_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gstrfuncs.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gstrfuncs.h new file mode 100644 index 0000000..cb021b6 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gstrfuncs.h @@ -0,0 +1,504 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_STRFUNCS_H__ +#define __G_STRFUNCS_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +#include +#include +#include +#include + +G_BEGIN_DECLS + +/* Functions like the ones in that are not affected by locale. */ +typedef enum { + G_ASCII_ALNUM = 1 << 0, + G_ASCII_ALPHA = 1 << 1, + G_ASCII_CNTRL = 1 << 2, + G_ASCII_DIGIT = 1 << 3, + G_ASCII_GRAPH = 1 << 4, + G_ASCII_LOWER = 1 << 5, + G_ASCII_PRINT = 1 << 6, + G_ASCII_PUNCT = 1 << 7, + G_ASCII_SPACE = 1 << 8, + G_ASCII_UPPER = 1 << 9, + G_ASCII_XDIGIT = 1 << 10 +} GAsciiType; + +GLIB_VAR const guint16 * const g_ascii_table; + +#define g_ascii_isalnum(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_ALNUM) != 0) + +#define g_ascii_isalpha(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_ALPHA) != 0) + +#define g_ascii_iscntrl(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_CNTRL) != 0) + +#define g_ascii_isdigit(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_DIGIT) != 0) + +#define g_ascii_isgraph(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_GRAPH) != 0) + +#define g_ascii_islower(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_LOWER) != 0) + +#define g_ascii_isprint(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_PRINT) != 0) + +#define g_ascii_ispunct(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_PUNCT) != 0) + +#define g_ascii_isspace(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_SPACE) != 0) + +#define g_ascii_isupper(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_UPPER) != 0) + +#define g_ascii_isxdigit(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_XDIGIT) != 0) + +GLIB_AVAILABLE_IN_ALL +gchar g_ascii_tolower (gchar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gchar g_ascii_toupper (gchar c) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gint g_ascii_digit_value (gchar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gint g_ascii_xdigit_value (gchar c) G_GNUC_CONST; + +/* String utility functions that modify a string argument or + * return a constant string that must not be freed. + */ +#define G_STR_DELIMITERS "_-|> <." +GLIB_AVAILABLE_IN_ALL +gchar* g_strdelimit (gchar *string, + const gchar *delimiters, + gchar new_delimiter); +GLIB_AVAILABLE_IN_ALL +gchar* g_strcanon (gchar *string, + const gchar *valid_chars, + gchar substitutor); +GLIB_AVAILABLE_IN_ALL +const gchar * g_strerror (gint errnum) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +const gchar * g_strsignal (gint signum) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gchar * g_strreverse (gchar *string); +GLIB_AVAILABLE_IN_ALL +gsize g_strlcpy (gchar *dest, + const gchar *src, + gsize dest_size); +GLIB_AVAILABLE_IN_ALL +gsize g_strlcat (gchar *dest, + const gchar *src, + gsize dest_size); +GLIB_AVAILABLE_IN_ALL +gchar * g_strstr_len (const gchar *haystack, + gssize haystack_len, + const gchar *needle); +GLIB_AVAILABLE_IN_ALL +gchar * g_strrstr (const gchar *haystack, + const gchar *needle); +GLIB_AVAILABLE_IN_ALL +gchar * g_strrstr_len (const gchar *haystack, + gssize haystack_len, + const gchar *needle); + +GLIB_AVAILABLE_IN_ALL +gboolean (g_str_has_suffix) (const gchar *str, + const gchar *suffix); +GLIB_AVAILABLE_IN_ALL +gboolean (g_str_has_prefix) (const gchar *str, + const gchar *prefix); + +#if G_GNUC_CHECK_VERSION (2, 0) +#ifndef __GTK_DOC_IGNORE__ +#ifndef __GI_SCANNER__ + +/* This macro is defeat a false -Wnonnull warning in GCC. + * Without it, it thinks strlen and memcmp may be getting passed NULL + * despite the explicit check for NULL right above the calls. + */ +#define _G_STR_NONNULL(x) ((x) + !(x)) + +#define g_str_has_prefix(STR, PREFIX) \ + (__builtin_constant_p (PREFIX)? \ + G_GNUC_EXTENSION ({ \ + const char * const __str = (STR); \ + const char * const __prefix = (PREFIX); \ + gboolean __result = FALSE; \ + \ + if G_UNLIKELY (__str == NULL || __prefix == NULL) \ + __result = (g_str_has_prefix) (__str, __prefix); \ + else \ + { \ + const size_t __str_len = strlen (_G_STR_NONNULL (__str)); \ + const size_t __prefix_len = strlen (_G_STR_NONNULL (__prefix)); \ + if (__str_len >= __prefix_len) \ + __result = memcmp (_G_STR_NONNULL (__str), \ + _G_STR_NONNULL (__prefix), \ + __prefix_len) == 0; \ + } \ + __result; \ + }) \ + : \ + (g_str_has_prefix) (STR, PREFIX) \ + ) + +#define g_str_has_suffix(STR, SUFFIX) \ + (__builtin_constant_p (SUFFIX)? \ + G_GNUC_EXTENSION ({ \ + const char * const __str = (STR); \ + const char * const __suffix = (SUFFIX); \ + gboolean __result = FALSE; \ + \ + if G_UNLIKELY (__str == NULL || __suffix == NULL) \ + __result = (g_str_has_suffix) (__str, __suffix); \ + else \ + { \ + const size_t __str_len = strlen (_G_STR_NONNULL (__str)); \ + const size_t __suffix_len = strlen (_G_STR_NONNULL (__suffix)); \ + if (__str_len >= __suffix_len) \ + __result = memcmp (__str + __str_len - __suffix_len, \ + _G_STR_NONNULL (__suffix), \ + __suffix_len) == 0; \ + } \ + __result; \ + }) \ + : \ + (g_str_has_suffix) (STR, SUFFIX) \ + ) + +#endif /* !defined (__GI_SCANNER__) */ +#endif /* !defined (__GTK_DOC_IGNORE__) */ +#endif /* G_GNUC_CHECK_VERSION (2, 0) */ + +/* String to/from double conversion functions */ + +GLIB_AVAILABLE_IN_ALL +gdouble g_strtod (const gchar *nptr, + gchar **endptr); +GLIB_AVAILABLE_IN_ALL +gdouble g_ascii_strtod (const gchar *nptr, + gchar **endptr); +GLIB_AVAILABLE_IN_ALL +guint64 g_ascii_strtoull (const gchar *nptr, + gchar **endptr, + guint base); +GLIB_AVAILABLE_IN_ALL +gint64 g_ascii_strtoll (const gchar *nptr, + gchar **endptr, + guint base); +/* 29 bytes should enough for all possible values that + * g_ascii_dtostr can produce. + * Then add 10 for good measure */ +#define G_ASCII_DTOSTR_BUF_SIZE (29 + 10) +GLIB_AVAILABLE_IN_ALL +gchar * g_ascii_dtostr (gchar *buffer, + gint buf_len, + gdouble d); +GLIB_AVAILABLE_IN_ALL +gchar * g_ascii_formatd (gchar *buffer, + gint buf_len, + const gchar *format, + gdouble d); + +/* removes leading spaces */ +GLIB_AVAILABLE_IN_ALL +gchar* g_strchug (gchar *string); +/* removes trailing spaces */ +GLIB_AVAILABLE_IN_ALL +gchar* g_strchomp (gchar *string); +/* removes leading & trailing spaces */ +#define g_strstrip( string ) g_strchomp (g_strchug (string)) + +GLIB_AVAILABLE_IN_ALL +gint g_ascii_strcasecmp (const gchar *s1, + const gchar *s2); +GLIB_AVAILABLE_IN_ALL +gint g_ascii_strncasecmp (const gchar *s1, + const gchar *s2, + gsize n); +GLIB_AVAILABLE_IN_ALL +gchar* g_ascii_strdown (const gchar *str, + gssize len) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_ascii_strup (const gchar *str, + gssize len) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_2_40 +gboolean g_str_is_ascii (const gchar *str); + +GLIB_DEPRECATED +gint g_strcasecmp (const gchar *s1, + const gchar *s2); +GLIB_DEPRECATED +gint g_strncasecmp (const gchar *s1, + const gchar *s2, + guint n); +GLIB_DEPRECATED +gchar* g_strdown (gchar *string); +GLIB_DEPRECATED +gchar* g_strup (gchar *string); + + +/* String utility functions that return a newly allocated string which + * ought to be freed with g_free from the caller at some point. + */ +GLIB_AVAILABLE_IN_ALL +gchar* (g_strdup) (const gchar *str) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_strdup_printf (const gchar *format, + ...) G_GNUC_PRINTF (1, 2) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_strdup_vprintf (const gchar *format, + va_list args) G_GNUC_PRINTF(1, 0) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_strndup (const gchar *str, + gsize n) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_strnfill (gsize length, + gchar fill_char) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_strconcat (const gchar *string1, + ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED; +GLIB_AVAILABLE_IN_ALL +gchar* g_strjoin (const gchar *separator, + ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED; + +#if G_GNUC_CHECK_VERSION(2, 0) +#ifndef __GTK_DOC_IGNORE__ +#ifndef __GI_SCANNER__ + +G_ALWAYS_INLINE static inline char * +g_strdup_inline (const char *str) +{ + if (__builtin_constant_p (!str) && !str) + return NULL; + + if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) + { + const size_t len = strlen (str) + 1; + char *dup_str = (char *) g_malloc (len); + return (char *) memcpy (dup_str, str, len); + } + + return g_strdup (str); +} + +#define g_strdup(x) g_strdup_inline (x) + +#endif /* !defined (__GI_SCANNER__) */ +#endif /* !defined (__GTK_DOC_IGNORE__) */ +#endif /* G_GNUC_CHECK_VERSION (2, 0) */ + +/* Make a copy of a string interpreting C string -style escape + * sequences. Inverse of g_strescape. The recognized sequences are \b + * \f \n \r \t \\ \" and the octal format. + */ +GLIB_AVAILABLE_IN_ALL +gchar* g_strcompress (const gchar *source) G_GNUC_MALLOC; + +/* Copy a string escaping nonprintable characters like in C strings. + * Inverse of g_strcompress. The exceptions parameter, if non-NULL, points + * to a string containing characters that are not to be escaped. + * + * Deprecated API: gchar* g_strescape (const gchar *source); + * Luckily this function wasn't used much, using NULL as second parameter + * provides mostly identical semantics. + */ +GLIB_AVAILABLE_IN_ALL +gchar* g_strescape (const gchar *source, + const gchar *exceptions) G_GNUC_MALLOC; + +GLIB_DEPRECATED_IN_2_68_FOR (g_memdup2) +gpointer g_memdup (gconstpointer mem, + guint byte_size) G_GNUC_ALLOC_SIZE(2); + +GLIB_AVAILABLE_IN_2_68 +gpointer g_memdup2 (gconstpointer mem, + gsize byte_size) G_GNUC_ALLOC_SIZE(2); + +/* NULL terminated string arrays. + * g_strsplit(), g_strsplit_set() split up string into max_tokens tokens + * at delim and return a newly allocated string array. + * g_strjoinv() concatenates all of str_array's strings, sliding in an + * optional separator, the returned string is newly allocated. + * g_strfreev() frees the array itself and all of its strings. + * g_strdupv() copies a NULL-terminated array of strings + * g_strv_length() returns the length of a NULL-terminated array of strings + */ +typedef gchar** GStrv; +GLIB_AVAILABLE_IN_ALL +gchar** g_strsplit (const gchar *string, + const gchar *delimiter, + gint max_tokens); +GLIB_AVAILABLE_IN_ALL +gchar ** g_strsplit_set (const gchar *string, + const gchar *delimiters, + gint max_tokens); +GLIB_AVAILABLE_IN_ALL +gchar* g_strjoinv (const gchar *separator, + gchar **str_array) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +void g_strfreev (gchar **str_array); +GLIB_AVAILABLE_IN_ALL +gchar** g_strdupv (gchar **str_array); +GLIB_AVAILABLE_IN_ALL +guint g_strv_length (gchar **str_array); + +GLIB_AVAILABLE_IN_ALL +gchar* g_stpcpy (gchar *dest, + const char *src); + +GLIB_AVAILABLE_IN_2_40 +gchar * g_str_to_ascii (const gchar *str, + const gchar *from_locale); + +GLIB_AVAILABLE_IN_2_40 +gchar ** g_str_tokenize_and_fold (const gchar *string, + const gchar *translit_locale, + gchar ***ascii_alternates); + +GLIB_AVAILABLE_IN_2_40 +gboolean g_str_match_string (const gchar *search_term, + const gchar *potential_hit, + gboolean accept_alternates); + +GLIB_AVAILABLE_IN_2_44 +gboolean g_strv_contains (const gchar * const *strv, + const gchar *str); + +GLIB_AVAILABLE_IN_2_60 +gboolean g_strv_equal (const gchar * const *strv1, + const gchar * const *strv2); + +/* Convenience ASCII string to number API */ + +/** + * GNumberParserError: + * @G_NUMBER_PARSER_ERROR_INVALID: String was not a valid number. + * @G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS: String was a number, but out of bounds. + * + * Error codes returned by functions converting a string to a number. + * + * Since: 2.54 + */ +typedef enum + { + G_NUMBER_PARSER_ERROR_INVALID, + G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS, + } GNumberParserError; + +/** + * G_NUMBER_PARSER_ERROR: + * + * Domain for errors returned by functions converting a string to a + * number. + * + * Since: 2.54 + */ +#define G_NUMBER_PARSER_ERROR (g_number_parser_error_quark ()) + +GLIB_AVAILABLE_IN_2_54 +GQuark g_number_parser_error_quark (void); + +GLIB_AVAILABLE_IN_2_54 +gboolean g_ascii_string_to_signed (const gchar *str, + guint base, + gint64 min, + gint64 max, + gint64 *out_num, + GError **error); + +GLIB_AVAILABLE_IN_2_54 +gboolean g_ascii_string_to_unsigned (const gchar *str, + guint base, + guint64 min, + guint64 max, + guint64 *out_num, + GError **error); + +/** + * g_set_str: (skip) + * @str_pointer: (inout) (not optional) (nullable): a pointer to either a string or %NULL + * @new_str: (nullable): a string to assign to @str_pointer, or %NULL + * + * Updates a pointer to a string to a copy of @new_str. The previous string + * pointed to by @str_pointer will be freed with g_free(). + * + * @str_pointer must not be %NULL, but can point to a %NULL value. + * + * One convenient usage of this function is in implementing property settings: + * |[ + * void + * foo_set_bar (Foo *foo, + * const char *new_bar) + * { + * g_return_if_fail (IS_FOO (foo)); + * + * if (g_set_str (&foo->bar, new_bar)) + * g_object_notify (foo, "bar"); + * } + * ]| + * + * Returns: %TRUE if the value of @str_pointer changed, %FALSE otherwise + * + * Since: 2.76 + */ +GLIB_AVAILABLE_STATIC_INLINE_IN_2_76 +static inline gboolean +g_set_str (char **str_pointer, + const char *new_str) +{ + char *copy; + + if (*str_pointer == new_str || + (*str_pointer && new_str && strcmp (*str_pointer, new_str) == 0)) + return FALSE; + + copy = g_strdup (new_str); + g_free (*str_pointer); + *str_pointer = copy; + + return TRUE; +} + +G_END_DECLS + +#endif /* __G_STRFUNCS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gstring.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gstring.h new file mode 100644 index 0000000..b4ccb34 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gstring.h @@ -0,0 +1,296 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_STRING_H__ +#define __G_STRING_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include +#include +#include /* for G_CAN_INLINE */ +#include + +G_BEGIN_DECLS + +typedef struct _GString GString; + +struct _GString +{ + gchar *str; + gsize len; + gsize allocated_len; +}; + +GLIB_AVAILABLE_IN_ALL +GString* g_string_new (const gchar *init); +GLIB_AVAILABLE_IN_2_78 +GString* g_string_new_take (gchar *init); +GLIB_AVAILABLE_IN_ALL +GString* g_string_new_len (const gchar *init, + gssize len); +GLIB_AVAILABLE_IN_ALL +GString* g_string_sized_new (gsize dfl_size); +GLIB_AVAILABLE_IN_ALL +gchar* (g_string_free) (GString *string, + gboolean free_segment); +GLIB_AVAILABLE_IN_2_76 +gchar* g_string_free_and_steal (GString *string) G_GNUC_WARN_UNUSED_RESULT; + +#if G_GNUC_CHECK_VERSION (2, 0) && (GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_76) + +#define g_string_free(str, free_segment) \ + (__builtin_constant_p (free_segment) ? \ + ((free_segment) ? \ + (g_string_free) ((str), (free_segment)) : \ + g_string_free_and_steal (str)) \ + : \ + (g_string_free) ((str), (free_segment))) + +#endif /* G_GNUC_CHECK_VERSION (2, 0) && (GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_76) */ + +GLIB_AVAILABLE_IN_2_34 +GBytes* g_string_free_to_bytes (GString *string); +GLIB_AVAILABLE_IN_ALL +gboolean g_string_equal (const GString *v, + const GString *v2); +GLIB_AVAILABLE_IN_ALL +guint g_string_hash (const GString *str); +GLIB_AVAILABLE_IN_ALL +GString* g_string_assign (GString *string, + const gchar *rval); +GLIB_AVAILABLE_IN_ALL +GString* g_string_truncate (GString *string, + gsize len); +GLIB_AVAILABLE_IN_ALL +GString* g_string_set_size (GString *string, + gsize len); +GLIB_AVAILABLE_IN_ALL +GString* g_string_insert_len (GString *string, + gssize pos, + const gchar *val, + gssize len); +GLIB_AVAILABLE_IN_ALL +GString* g_string_append (GString *string, + const gchar *val); +GLIB_AVAILABLE_IN_ALL +GString* g_string_append_len (GString *string, + const gchar *val, + gssize len); +GLIB_AVAILABLE_IN_ALL +GString* g_string_append_c (GString *string, + gchar c); +GLIB_AVAILABLE_IN_ALL +GString* g_string_append_unichar (GString *string, + gunichar wc); +GLIB_AVAILABLE_IN_ALL +GString* g_string_prepend (GString *string, + const gchar *val); +GLIB_AVAILABLE_IN_ALL +GString* g_string_prepend_c (GString *string, + gchar c); +GLIB_AVAILABLE_IN_ALL +GString* g_string_prepend_unichar (GString *string, + gunichar wc); +GLIB_AVAILABLE_IN_ALL +GString* g_string_prepend_len (GString *string, + const gchar *val, + gssize len); +GLIB_AVAILABLE_IN_ALL +GString* g_string_insert (GString *string, + gssize pos, + const gchar *val); +GLIB_AVAILABLE_IN_ALL +GString* g_string_insert_c (GString *string, + gssize pos, + gchar c); +GLIB_AVAILABLE_IN_ALL +GString* g_string_insert_unichar (GString *string, + gssize pos, + gunichar wc); +GLIB_AVAILABLE_IN_ALL +GString* g_string_overwrite (GString *string, + gsize pos, + const gchar *val); +GLIB_AVAILABLE_IN_ALL +GString* g_string_overwrite_len (GString *string, + gsize pos, + const gchar *val, + gssize len); +GLIB_AVAILABLE_IN_ALL +GString* g_string_erase (GString *string, + gssize pos, + gssize len); +GLIB_AVAILABLE_IN_2_68 +guint g_string_replace (GString *string, + const gchar *find, + const gchar *replace, + guint limit); +GLIB_AVAILABLE_IN_ALL +GString* g_string_ascii_down (GString *string); +GLIB_AVAILABLE_IN_ALL +GString* g_string_ascii_up (GString *string); +GLIB_AVAILABLE_IN_ALL +void g_string_vprintf (GString *string, + const gchar *format, + va_list args) + G_GNUC_PRINTF(2, 0); +GLIB_AVAILABLE_IN_ALL +void g_string_printf (GString *string, + const gchar *format, + ...) G_GNUC_PRINTF (2, 3); +GLIB_AVAILABLE_IN_ALL +void g_string_append_vprintf (GString *string, + const gchar *format, + va_list args) + G_GNUC_PRINTF(2, 0); +GLIB_AVAILABLE_IN_ALL +void g_string_append_printf (GString *string, + const gchar *format, + ...) G_GNUC_PRINTF (2, 3); +GLIB_AVAILABLE_IN_ALL +GString* g_string_append_uri_escaped (GString *string, + const gchar *unescaped, + const gchar *reserved_chars_allowed, + gboolean allow_utf8); + +#ifdef G_CAN_INLINE + +#if defined (_MSC_VER) && !defined (__clang__) +#pragma warning (push) +#pragma warning (disable : 4141) /* silence "warning C4141: 'inline' used more than once" */ +#endif + +#ifndef __GTK_DOC_IGNORE__ + +G_ALWAYS_INLINE +static inline GString* +g_string_append_c_inline (GString *gstring, + gchar c) +{ + if (G_LIKELY (gstring != NULL && + gstring->len + 1 < gstring->allocated_len)) + { + gstring->str[gstring->len++] = c; + gstring->str[gstring->len] = 0; + } + else + g_string_insert_c (gstring, -1, c); + return gstring; +} + +#define g_string_append_c(gstr,c) \ + g_string_append_c_inline (gstr, c) + +G_ALWAYS_INLINE +static inline GString * +g_string_append_len_inline (GString *gstring, + const char *val, + gssize len) +{ + gsize len_unsigned; + + if G_UNLIKELY (gstring == NULL) + return g_string_append_len (gstring, val, len); + + if G_UNLIKELY (val == NULL) + return (len != 0) ? g_string_append_len (gstring, val, len) : gstring; + + if (len < 0) + len_unsigned = strlen (val); + else + len_unsigned = (gsize) len; + + if (G_LIKELY (gstring->len + len_unsigned < gstring->allocated_len)) + { + char *end = gstring->str + gstring->len; + if (G_LIKELY (val + len_unsigned <= end || val > end + len_unsigned)) + memcpy (end, val, len_unsigned); + else + memmove (end, val, len_unsigned); + gstring->len += len_unsigned; + gstring->str[gstring->len] = 0; + return gstring; + } + else + return g_string_insert_len (gstring, -1, val, len); +} + +#define g_string_append_len(gstr, val, len) \ + g_string_append_len_inline (gstr, val, len) + +G_ALWAYS_INLINE +static inline GString * +g_string_truncate_inline (GString *gstring, + gsize len) +{ + gstring->len = MIN (len, gstring->len); + gstring->str[gstring->len] = '\0'; + return gstring; +} + +#define g_string_truncate(gstr, len) \ + g_string_truncate_inline (gstr, len) + +#if G_GNUC_CHECK_VERSION (2, 0) + +#define g_string_append(gstr, val) \ + (__builtin_constant_p (val) ? \ + G_GNUC_EXTENSION ({ \ + const char * const __val = (val); \ + g_string_append_len (gstr, __val, \ + G_LIKELY (__val != NULL) ? \ + (gssize) strlen (_G_STR_NONNULL (__val)) \ + : (gssize) -1); \ + }) \ + : \ + g_string_append_len (gstr, val, (gssize) -1)) + +#endif /* G_GNUC_CHECK_VERSION (2, 0) */ + +#endif /* __GTK_DOC_IGNORE__ */ + +#if defined (_MSC_VER) && !defined (__clang__) +#pragma warning (pop) /* #pragma warning (disable : 4141) */ +#endif + +#endif /* G_CAN_INLINE */ + +GLIB_DEPRECATED +GString *g_string_down (GString *string); +GLIB_DEPRECATED +GString *g_string_up (GString *string); + +#define g_string_sprintf g_string_printf GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_string_printf) +#define g_string_sprintfa g_string_append_printf GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_string_append_printf) + +G_END_DECLS + +#endif /* __G_STRING_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gstringchunk.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gstringchunk.h new file mode 100644 index 0000000..a79a4cb --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gstringchunk.h @@ -0,0 +1,59 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_STRINGCHUNK_H__ +#define __G_STRINGCHUNK_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +typedef struct _GStringChunk GStringChunk; + +GLIB_AVAILABLE_IN_ALL +GStringChunk* g_string_chunk_new (gsize size); +GLIB_AVAILABLE_IN_ALL +void g_string_chunk_free (GStringChunk *chunk); +GLIB_AVAILABLE_IN_ALL +void g_string_chunk_clear (GStringChunk *chunk); +GLIB_AVAILABLE_IN_ALL +gchar* g_string_chunk_insert (GStringChunk *chunk, + const gchar *string); +GLIB_AVAILABLE_IN_ALL +gchar* g_string_chunk_insert_len (GStringChunk *chunk, + const gchar *string, + gssize len); +GLIB_AVAILABLE_IN_ALL +gchar* g_string_chunk_insert_const (GStringChunk *chunk, + const gchar *string); + +G_END_DECLS + +#endif /* __G_STRING_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gstrvbuilder.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gstrvbuilder.h new file mode 100644 index 0000000..c8acbaa --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gstrvbuilder.h @@ -0,0 +1,69 @@ +/* + * Copyright © 2020 Canonical Ltd. + * Copyright © 2021 Alexandros Theodotou + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef __G_STRVBUILDER_H__ +#define __G_STRVBUILDER_H__ + +#if !defined(__GLIB_H_INSIDE__) && !defined(GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +/** + * GStrvBuilder: + * + * A helper object to build a %NULL-terminated string array + * by appending. See g_strv_builder_new(). + * + * Since: 2.68 + */ +typedef struct _GStrvBuilder GStrvBuilder; + +GLIB_AVAILABLE_IN_2_68 +GStrvBuilder *g_strv_builder_new (void); + +GLIB_AVAILABLE_IN_2_68 +void g_strv_builder_unref (GStrvBuilder *builder); + +GLIB_AVAILABLE_IN_2_68 +GStrvBuilder *g_strv_builder_ref (GStrvBuilder *builder); + +GLIB_AVAILABLE_IN_2_68 +void g_strv_builder_add (GStrvBuilder *builder, + const char *value); + +GLIB_AVAILABLE_IN_2_70 +void g_strv_builder_addv (GStrvBuilder *builder, + const char **value); + +GLIB_AVAILABLE_IN_2_70 +void g_strv_builder_add_many (GStrvBuilder *builder, + ...) G_GNUC_NULL_TERMINATED; + +GLIB_AVAILABLE_IN_2_68 +GStrv g_strv_builder_end (GStrvBuilder *builder); + +G_END_DECLS + +#endif /* __G_STRVBUILDER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtestutils.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtestutils.h new file mode 100644 index 0000000..30ede25 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtestutils.h @@ -0,0 +1,763 @@ +/* GLib testing utilities + * Copyright (C) 2007 Imendio AB + * Authors: Tim Janik + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef __G_TEST_UTILS_H__ +#define __G_TEST_UTILS_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include +#include +#include +#include +#include + +G_BEGIN_DECLS + +typedef struct GTestCase GTestCase; +typedef struct GTestSuite GTestSuite; +typedef void (*GTestFunc) (void); +typedef void (*GTestDataFunc) (gconstpointer user_data); +typedef void (*GTestFixtureFunc) (gpointer fixture, + gconstpointer user_data); + +/* assertion API */ +#define g_assert_cmpstr(s1, cmp, s2) G_STMT_START { \ + const char *__s1 = (s1), *__s2 = (s2); \ + if (g_strcmp0 (__s1, __s2) cmp 0) ; else \ + g_assertion_message_cmpstr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #s1 " " #cmp " " #s2, __s1, #cmp, __s2); \ + } G_STMT_END +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_78 +#define g_assert_cmpint(n1, cmp, n2) G_STMT_START { \ + gint64 __n1 = (n1), __n2 = (n2); \ + if (__n1 cmp __n2) ; else \ + g_assertion_message_cmpint (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #n1 " " #cmp " " #n2, (guint64)__n1, #cmp, (guint64)__n2, 'i'); \ + } G_STMT_END +#define g_assert_cmpuint(n1, cmp, n2) G_STMT_START { \ + guint64 __n1 = (n1), __n2 = (n2); \ + if (__n1 cmp __n2) ; else \ + g_assertion_message_cmpint (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #n1 " " #cmp " " #n2, __n1, #cmp, __n2, 'u'); \ + } G_STMT_END +#define g_assert_cmphex(n1, cmp, n2) G_STMT_START { \ + guint64 __n1 = (n1), __n2 = (n2); \ + if (__n1 cmp __n2) ; else \ + g_assertion_message_cmpint (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #n1 " " #cmp " " #n2, __n1, #cmp, __n2, 'x'); \ + } G_STMT_END +#else /* GLIB_VERSION_MIN_REQUIRED < GLIB_VERSION_2_78 */ +#define g_assert_cmpint(n1, cmp, n2) G_STMT_START { \ + gint64 __n1 = (n1), __n2 = (n2); \ + if (__n1 cmp __n2) ; else \ + g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #n1 " " #cmp " " #n2, (long double) __n1, #cmp, (long double) __n2, 'i'); \ + } G_STMT_END +#define g_assert_cmpuint(n1, cmp, n2) G_STMT_START { \ + guint64 __n1 = (n1), __n2 = (n2); \ + if (__n1 cmp __n2) ; else \ + g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #n1 " " #cmp " " #n2, (long double) __n1, #cmp, (long double) __n2, 'i'); \ + } G_STMT_END +#define g_assert_cmphex(n1, cmp, n2) G_STMT_START {\ + guint64 __n1 = (n1), __n2 = (n2); \ + if (__n1 cmp __n2) ; else \ + g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #n1 " " #cmp " " #n2, (long double) __n1, #cmp, (long double) __n2, 'x'); \ + } G_STMT_END +#endif /* GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_78 */ +#define g_assert_cmpfloat(n1,cmp,n2) G_STMT_START { \ + long double __n1 = (long double) (n1), __n2 = (long double) (n2); \ + if (__n1 cmp __n2) ; else \ + g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #n1 " " #cmp " " #n2, (long double) __n1, #cmp, (long double) __n2, 'f'); \ + } G_STMT_END +#define g_assert_cmpfloat_with_epsilon(n1,n2,epsilon) \ + G_STMT_START { \ + double __n1 = (n1), __n2 = (n2), __epsilon = (epsilon); \ + if (G_APPROX_VALUE (__n1, __n2, __epsilon)) ; else \ + g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #n1 " == " #n2 " (+/- " #epsilon ")", __n1, "==", __n2, 'f'); \ + } G_STMT_END +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_78 +#define g_assert_cmpmem(m1, l1, m2, l2) G_STMT_START {\ + gconstpointer __m1 = m1, __m2 = m2; \ + size_t __l1 = (size_t) l1, __l2 = (size_t) l2; \ + if (__l1 != 0 && __m1 == NULL) \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "assertion failed (" #l1 " == 0 || " #m1 " != NULL)"); \ + else if (__l2 != 0 && __m2 == NULL) \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "assertion failed (" #l2 " == 0 || " #m2 " != NULL)"); \ + else if (__l1 != __l2) \ + g_assertion_message_cmpint (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #l1 " (len(" #m1 ")) == " #l2 " (len(" #m2 "))", \ + __l1, "==", __l2, 'u'); \ + else if (__l1 != 0 && __m2 != NULL && memcmp (__m1, __m2, __l1) != 0) \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "assertion failed (" #m1 " == " #m2 ")"); \ + } G_STMT_END +#else /* GLIB_VERSION_MIN_REQUIRED < GLIB_VERSION_2_78 */ +#define g_assert_cmpmem(m1, l1, m2, l2) G_STMT_START {\ + gconstpointer __m1 = m1, __m2 = m2; \ + size_t __l1 = (size_t) l1, __l2 = (size_t) l2; \ + if (__l1 != 0 && __m1 == NULL) \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "assertion failed (" #l1 " == 0 || " #m1 " != NULL)"); \ + else if (__l2 != 0 && __m2 == NULL) \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "assertion failed (" #l2 " == 0 || " #m2 " != NULL)"); \ + else if (__l1 != __l2) \ + g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #l1 " (len(" #m1 ")) == " #l2 " (len(" #m2 "))", \ + (long double) __l1, "==", (long double) __l2, 'i'); \ + else if (__l1 != 0 && __m2 != NULL && memcmp (__m1, __m2, __l1) != 0) \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "assertion failed (" #m1 " == " #m2 ")"); \ + } G_STMT_END +#endif /* GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_78 */ +#define g_assert_cmpvariant(v1, v2) \ + G_STMT_START \ + { \ + GVariant *__v1 = (v1), *__v2 = (v2); \ + if (!g_variant_equal (__v1, __v2)) \ + { \ + gchar *__s1, *__s2, *__msg; \ + __s1 = g_variant_print (__v1, TRUE); \ + __s2 = g_variant_print (__v2, TRUE); \ + __msg = g_strdup_printf ("assertion failed (" #v1 " == " #v2 "): %s does not equal %s", __s1, __s2); \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, __msg); \ + g_free (__s1); \ + g_free (__s2); \ + g_free (__msg); \ + } \ + } \ + G_STMT_END +#define g_assert_cmpstrv(strv1, strv2) \ + G_STMT_START \ + { \ + const char * const *__strv1 = (const char * const *) (strv1); \ + const char * const *__strv2 = (const char * const *) (strv2); \ + if (!__strv1 || !__strv2) \ + { \ + if (__strv1) \ + { \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "assertion failed (" #strv1 " == " #strv2 "): " #strv2 " is NULL, but " #strv1 " is not"); \ + } \ + else if (__strv2) \ + { \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "assertion failed (" #strv1 " == " #strv2 "): " #strv1 " is NULL, but " #strv2 " is not"); \ + } \ + } \ + else \ + { \ + guint __l1 = g_strv_length ((char **) __strv1); \ + guint __l2 = g_strv_length ((char **) __strv2); \ + if (__l1 != __l2) \ + { \ + char *__msg; \ + __msg = g_strdup_printf ("assertion failed (" #strv1 " == " #strv2 "): length %u does not equal length %u", __l1, __l2); \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, __msg); \ + g_free (__msg); \ + } \ + else \ + { \ + guint __i; \ + for (__i = 0; __i < __l1; __i++) \ + { \ + if (g_strcmp0 (__strv1[__i], __strv2[__i]) != 0) \ + { \ + g_assertion_message_cmpstrv (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #strv1 " == " #strv2, \ + __strv1, __strv2, __i); \ + } \ + } \ + } \ + } \ + } \ + G_STMT_END +#define g_assert_no_errno(expr) G_STMT_START { \ + int __ret, __errsv; \ + errno = 0; \ + __ret = expr; \ + __errsv = errno; \ + if (__ret < 0) \ + { \ + gchar *__msg; \ + __msg = g_strdup_printf ("assertion failed (" #expr " >= 0): errno %i: %s", __errsv, g_strerror (__errsv)); \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, __msg); \ + g_free (__msg); \ + } \ + } G_STMT_END \ + GLIB_AVAILABLE_MACRO_IN_2_66 +#define g_assert_no_error(err) G_STMT_START { \ + if (err) \ + g_assertion_message_error (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #err, err, 0, 0); \ + } G_STMT_END +#define g_assert_error(err, dom, c) G_STMT_START { \ + if (!err || (err)->domain != dom || (err)->code != c) \ + g_assertion_message_error (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #err, err, dom, c); \ + } G_STMT_END +#define g_assert_true(expr) G_STMT_START { \ + if G_LIKELY (expr) ; else \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "'" #expr "' should be TRUE"); \ + } G_STMT_END +#define g_assert_false(expr) G_STMT_START { \ + if G_LIKELY (!(expr)) ; else \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "'" #expr "' should be FALSE"); \ + } G_STMT_END + +/* Use nullptr in C++ to catch misuse of these macros. */ +#if G_CXX_STD_CHECK_VERSION (11) +#define g_assert_null(expr) G_STMT_START { if G_LIKELY ((expr) == nullptr) ; else \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "'" #expr "' should be nullptr"); \ + } G_STMT_END +#define g_assert_nonnull(expr) G_STMT_START { \ + if G_LIKELY ((expr) != nullptr) ; else \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "'" #expr "' should not be nullptr"); \ + } G_STMT_END +#else /* not C++ */ +#define g_assert_null(expr) G_STMT_START { if G_LIKELY ((expr) == NULL) ; else \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "'" #expr "' should be NULL"); \ + } G_STMT_END +#define g_assert_nonnull(expr) G_STMT_START { \ + if G_LIKELY ((expr) != NULL) ; else \ + g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + "'" #expr "' should not be NULL"); \ + } G_STMT_END +#endif + +#ifdef G_DISABLE_ASSERT +/* https://gcc.gnu.org/onlinedocs/gcc-8.3.0/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005funreachable + * GCC 5 is not a strict lower bound for versions of GCC which provide __builtin_unreachable(). */ +#if __GNUC__ >= 5 || g_macro__has_builtin(__builtin_unreachable) +#define g_assert_not_reached() G_STMT_START { (void) 0; __builtin_unreachable (); } G_STMT_END +#elif defined (_MSC_VER) +#define g_assert_not_reached() G_STMT_START { (void) 0; __assume (0); } G_STMT_END +#else /* if __builtin_unreachable() is not supported: */ +#define g_assert_not_reached() G_STMT_START { (void) 0; } G_STMT_END +#endif + +#define g_assert(expr) G_STMT_START { (void) 0; } G_STMT_END +#else /* !G_DISABLE_ASSERT */ +#define g_assert_not_reached() G_STMT_START { g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, NULL); } G_STMT_END +#define g_assert(expr) G_STMT_START { \ + if G_LIKELY (expr) ; else \ + g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ + #expr); \ + } G_STMT_END +#endif /* !G_DISABLE_ASSERT */ + +GLIB_AVAILABLE_IN_ALL +int g_strcmp0 (const char *str1, + const char *str2); + +/* report performance results */ +GLIB_AVAILABLE_IN_ALL +void g_test_minimized_result (double minimized_quantity, + const char *format, + ...) G_GNUC_PRINTF (2, 3); +GLIB_AVAILABLE_IN_ALL +void g_test_maximized_result (double maximized_quantity, + const char *format, + ...) G_GNUC_PRINTF (2, 3); + +/* initialize testing framework */ +GLIB_AVAILABLE_IN_ALL +void g_test_init (int *argc, + char ***argv, + ...) G_GNUC_NULL_TERMINATED; + +/** + * G_TEST_OPTION_ISOLATE_DIRS: + * + * Creates a unique temporary directory for each unit test and uses + * g_set_user_dirs() to set XDG directories to point into subdirectories of it + * for the duration of the unit test. The directory tree is cleaned up after the + * test finishes successfully. Note that this doesn’t take effect until + * g_test_run() is called, so calls to (for example) g_get_user_home_dir() will + * return the system-wide value when made in a test program’s main() function. + * + * The following functions will return subdirectories of the temporary directory + * when this option is used. The specific subdirectory paths in use are not + * guaranteed to be stable API — always use a getter function to retrieve them. + * + * - g_get_home_dir() + * - g_get_user_cache_dir() + * - g_get_system_config_dirs() + * - g_get_user_config_dir() + * - g_get_system_data_dirs() + * - g_get_user_data_dir() + * - g_get_user_state_dir() + * - g_get_user_runtime_dir() + * + * The subdirectories may not be created by the test harness; as with normal + * calls to functions like g_get_user_cache_dir(), the caller must be prepared + * to create the directory if it doesn’t exist. + * + * Since: 2.60 + */ +#define G_TEST_OPTION_ISOLATE_DIRS "isolate_dirs" + +/* While we discourage its use, g_assert() is often used in unit tests + * (especially in legacy code). g_assert_*() should really be used instead. + * g_assert() can be disabled at client program compile time, which can render + * tests useless. Highlight that to the user. */ +#ifdef G_DISABLE_ASSERT +#if defined(G_HAVE_ISO_VARARGS) +#define g_test_init(argc, argv, ...) \ + G_STMT_START { \ + g_printerr ("Tests were compiled with G_DISABLE_ASSERT and are likely no-ops. Aborting.\n"); \ + exit (1); \ + } G_STMT_END +#elif defined(G_HAVE_GNUC_VARARGS) +#define g_test_init(argc, argv...) \ + G_STMT_START { \ + g_printerr ("Tests were compiled with G_DISABLE_ASSERT and are likely no-ops. Aborting.\n"); \ + exit (1); \ + } G_STMT_END +#else /* no varargs */ + /* do nothing */ +#endif /* varargs support */ +#endif /* G_DISABLE_ASSERT */ + +/* query testing framework config */ +#define g_test_initialized() (g_test_config_vars->test_initialized) +#define g_test_quick() (g_test_config_vars->test_quick) +#define g_test_slow() (!g_test_config_vars->test_quick) +#define g_test_thorough() (!g_test_config_vars->test_quick) +#define g_test_perf() (g_test_config_vars->test_perf) +#define g_test_verbose() (g_test_config_vars->test_verbose) +#define g_test_quiet() (g_test_config_vars->test_quiet) +#define g_test_undefined() (g_test_config_vars->test_undefined) +GLIB_AVAILABLE_IN_2_38 +gboolean g_test_subprocess (void); + +/* run all tests under toplevel suite (path: /) */ +GLIB_AVAILABLE_IN_ALL +int g_test_run (void); +/* hook up a test functions under test path */ +GLIB_AVAILABLE_IN_ALL +void g_test_add_func (const char *testpath, + GTestFunc test_func); + +GLIB_AVAILABLE_IN_ALL +void g_test_add_data_func (const char *testpath, + gconstpointer test_data, + GTestDataFunc test_func); + +GLIB_AVAILABLE_IN_2_34 +void g_test_add_data_func_full (const char *testpath, + gpointer test_data, + GTestDataFunc test_func, + GDestroyNotify data_free_func); + +/* tell about currently run test */ +GLIB_AVAILABLE_IN_2_68 +const char * g_test_get_path (void); + +/* tell about failure */ +GLIB_AVAILABLE_IN_2_30 +void g_test_fail (void); +GLIB_AVAILABLE_IN_2_70 +void g_test_fail_printf (const char *format, + ...) G_GNUC_PRINTF (1, 2); +GLIB_AVAILABLE_IN_2_38 +void g_test_incomplete (const gchar *msg); +GLIB_AVAILABLE_IN_2_70 +void g_test_incomplete_printf (const char *format, + ...) G_GNUC_PRINTF (1, 2); +GLIB_AVAILABLE_IN_2_38 +void g_test_skip (const gchar *msg); +GLIB_AVAILABLE_IN_2_70 +void g_test_skip_printf (const char *format, + ...) G_GNUC_PRINTF (1, 2); +GLIB_AVAILABLE_IN_2_38 +gboolean g_test_failed (void); +GLIB_AVAILABLE_IN_2_38 +void g_test_set_nonfatal_assertions (void); +GLIB_AVAILABLE_IN_2_78 +void g_test_disable_crash_reporting (void); + +/** + * g_test_add: + * @testpath: The test path for a new test case. + * @Fixture: The type of a fixture data structure. + * @tdata: Data argument for the test functions. + * @fsetup: The function to set up the fixture data. + * @ftest: The actual test function. + * @fteardown: The function to tear down the fixture data. + * + * Hook up a new test case at @testpath, similar to g_test_add_func(). + * A fixture data structure with setup and teardown functions may be provided, + * similar to g_test_create_case(). + * + * g_test_add() is implemented as a macro, so that the fsetup(), ftest() and + * fteardown() callbacks can expect a @Fixture pointer as their first argument + * in a type safe manner. They otherwise have type #GTestFixtureFunc. + * + * Since: 2.16 + */ +#define g_test_add(testpath, Fixture, tdata, fsetup, ftest, fteardown) \ + G_STMT_START { \ + void (*add_vtable) (const char*, \ + gsize, \ + gconstpointer, \ + void (*) (Fixture*, gconstpointer), \ + void (*) (Fixture*, gconstpointer), \ + void (*) (Fixture*, gconstpointer)) = (void (*) (const gchar *, gsize, gconstpointer, void (*) (Fixture*, gconstpointer), void (*) (Fixture*, gconstpointer), void (*) (Fixture*, gconstpointer))) g_test_add_vtable; \ + add_vtable \ + (testpath, sizeof (Fixture), tdata, fsetup, ftest, fteardown); \ + } G_STMT_END + +/* add test messages to the test report */ +GLIB_AVAILABLE_IN_ALL +void g_test_message (const char *format, + ...) G_GNUC_PRINTF (1, 2); +GLIB_AVAILABLE_IN_ALL +void g_test_bug_base (const char *uri_pattern); +GLIB_AVAILABLE_IN_ALL +void g_test_bug (const char *bug_uri_snippet); +GLIB_AVAILABLE_IN_2_62 +void g_test_summary (const char *summary); +/* measure test timings */ +GLIB_AVAILABLE_IN_ALL +void g_test_timer_start (void); +GLIB_AVAILABLE_IN_ALL +double g_test_timer_elapsed (void); /* elapsed seconds */ +GLIB_AVAILABLE_IN_ALL +double g_test_timer_last (void); /* repeat last elapsed() result */ + +/* automatically g_free or g_object_unref upon teardown */ +GLIB_AVAILABLE_IN_ALL +void g_test_queue_free (gpointer gfree_pointer); +GLIB_AVAILABLE_IN_ALL +void g_test_queue_destroy (GDestroyNotify destroy_func, + gpointer destroy_data); +#define g_test_queue_unref(gobject) g_test_queue_destroy (g_object_unref, gobject) + +/** + * GTestTrapFlags: + * @G_TEST_TRAP_DEFAULT: Default behaviour. Since: 2.74 + * @G_TEST_TRAP_SILENCE_STDOUT: Redirect stdout of the test child to + * `/dev/null` so it cannot be observed on the console during test + * runs. The actual output is still captured though to allow later + * tests with g_test_trap_assert_stdout(). + * @G_TEST_TRAP_SILENCE_STDERR: Redirect stderr of the test child to + * `/dev/null` so it cannot be observed on the console during test + * runs. The actual output is still captured though to allow later + * tests with g_test_trap_assert_stderr(). + * @G_TEST_TRAP_INHERIT_STDIN: If this flag is given, stdin of the + * child process is shared with stdin of its parent process. + * It is redirected to `/dev/null` otherwise. + * + * Test traps are guards around forked tests. + * These flags determine what traps to set. + * + * Deprecated: 2.38: #GTestTrapFlags is used only with g_test_trap_fork(), + * which is deprecated. g_test_trap_subprocess() uses + * #GTestSubprocessFlags. + */ +typedef enum { + G_TEST_TRAP_DEFAULT GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0, + G_TEST_TRAP_SILENCE_STDOUT = 1 << 7, + G_TEST_TRAP_SILENCE_STDERR = 1 << 8, + G_TEST_TRAP_INHERIT_STDIN = 1 << 9 +} GTestTrapFlags GLIB_DEPRECATED_TYPE_IN_2_38_FOR(GTestSubprocessFlags); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + +GLIB_DEPRECATED_IN_2_38_FOR (g_test_trap_subprocess) +gboolean g_test_trap_fork (guint64 usec_timeout, + GTestTrapFlags test_trap_flags); + +G_GNUC_END_IGNORE_DEPRECATIONS + +typedef enum { + G_TEST_SUBPROCESS_DEFAULT GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0, + G_TEST_SUBPROCESS_INHERIT_STDIN = 1 << 0, + G_TEST_SUBPROCESS_INHERIT_STDOUT = 1 << 1, + G_TEST_SUBPROCESS_INHERIT_STDERR = 1 << 2 +} GTestSubprocessFlags; + +GLIB_AVAILABLE_IN_2_38 +void g_test_trap_subprocess (const char *test_path, + guint64 usec_timeout, + GTestSubprocessFlags test_flags); + +GLIB_AVAILABLE_IN_ALL +gboolean g_test_trap_has_passed (void); +GLIB_AVAILABLE_IN_ALL +gboolean g_test_trap_reached_timeout (void); +#define g_test_trap_assert_passed() g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 0, 0) +#define g_test_trap_assert_failed() g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 1, 0) +#define g_test_trap_assert_stdout(soutpattern) g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 2, soutpattern) +#define g_test_trap_assert_stdout_unmatched(soutpattern) g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 3, soutpattern) +#define g_test_trap_assert_stderr(serrpattern) g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 4, serrpattern) +#define g_test_trap_assert_stderr_unmatched(serrpattern) g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 5, serrpattern) + +/* provide seed-able random numbers for tests */ +#define g_test_rand_bit() (0 != (g_test_rand_int() & (1 << 15))) +GLIB_AVAILABLE_IN_ALL +gint32 g_test_rand_int (void); +GLIB_AVAILABLE_IN_ALL +gint32 g_test_rand_int_range (gint32 begin, + gint32 end); +GLIB_AVAILABLE_IN_ALL +double g_test_rand_double (void); +GLIB_AVAILABLE_IN_ALL +double g_test_rand_double_range (double range_start, + double range_end); + +/* + * semi-internal API: non-documented symbols with stable ABI. You + * should use the non-internal helper macros instead. However, for + * compatibility reason, you may use this semi-internal API. + */ +GLIB_AVAILABLE_IN_ALL +GTestCase* g_test_create_case (const char *test_name, + gsize data_size, + gconstpointer test_data, + GTestFixtureFunc data_setup, + GTestFixtureFunc data_test, + GTestFixtureFunc data_teardown); +GLIB_AVAILABLE_IN_ALL +GTestSuite* g_test_create_suite (const char *suite_name); +GLIB_AVAILABLE_IN_ALL +GTestSuite* g_test_get_root (void); +GLIB_AVAILABLE_IN_ALL +void g_test_suite_add (GTestSuite *suite, + GTestCase *test_case); +GLIB_AVAILABLE_IN_ALL +void g_test_suite_add_suite (GTestSuite *suite, + GTestSuite *nestedsuite); +GLIB_AVAILABLE_IN_ALL +int g_test_run_suite (GTestSuite *suite); + +GLIB_AVAILABLE_IN_2_70 +void g_test_case_free (GTestCase *test_case); + +GLIB_AVAILABLE_IN_2_70 +void g_test_suite_free (GTestSuite *suite); + +GLIB_AVAILABLE_IN_ALL +void g_test_trap_assertions (const char *domain, + const char *file, + int line, + const char *func, + guint64 assertion_flags, /* 0-pass, 1-fail, 2-outpattern, 4-errpattern */ + const char *pattern); +GLIB_AVAILABLE_IN_ALL +void g_assertion_message (const char *domain, + const char *file, + int line, + const char *func, + const char *message) G_ANALYZER_NORETURN; +G_NORETURN +GLIB_AVAILABLE_IN_ALL +void g_assertion_message_expr (const char *domain, + const char *file, + int line, + const char *func, + const char *expr); +GLIB_AVAILABLE_IN_ALL +void g_assertion_message_cmpstr (const char *domain, + const char *file, + int line, + const char *func, + const char *expr, + const char *arg1, + const char *cmp, + const char *arg2) G_ANALYZER_NORETURN; + +GLIB_AVAILABLE_IN_2_68 +void g_assertion_message_cmpstrv (const char *domain, + const char *file, + int line, + const char *func, + const char *expr, + const char * const *arg1, + const char * const *arg2, + gsize first_wrong_idx) G_ANALYZER_NORETURN; +GLIB_AVAILABLE_IN_2_78 +void g_assertion_message_cmpint (const char *domain, + const char *file, + int line, + const char *func, + const char *expr, + guint64 arg1, + const char *cmp, + guint64 arg2, + char numtype) G_ANALYZER_NORETURN; +GLIB_AVAILABLE_IN_ALL +void g_assertion_message_cmpnum (const char *domain, + const char *file, + int line, + const char *func, + const char *expr, + long double arg1, + const char *cmp, + long double arg2, + char numtype) G_ANALYZER_NORETURN; +GLIB_AVAILABLE_IN_ALL +void g_assertion_message_error (const char *domain, + const char *file, + int line, + const char *func, + const char *expr, + const GError *error, + GQuark error_domain, + int error_code) G_ANALYZER_NORETURN; +GLIB_AVAILABLE_IN_ALL +void g_test_add_vtable (const char *testpath, + gsize data_size, + gconstpointer test_data, + GTestFixtureFunc data_setup, + GTestFixtureFunc data_test, + GTestFixtureFunc data_teardown); +typedef struct { + gboolean test_initialized; + gboolean test_quick; /* disable thorough tests */ + gboolean test_perf; /* run performance tests */ + gboolean test_verbose; /* extra info */ + gboolean test_quiet; /* reduce output */ + gboolean test_undefined; /* run tests that are meant to assert */ +} GTestConfig; +GLIB_VAR const GTestConfig * const g_test_config_vars; + +/* internal logging API */ +typedef enum { + G_TEST_RUN_SUCCESS, + G_TEST_RUN_SKIPPED, + G_TEST_RUN_FAILURE, + G_TEST_RUN_INCOMPLETE +} GTestResult; + +typedef enum { + G_TEST_LOG_NONE, + G_TEST_LOG_ERROR, /* s:msg */ + G_TEST_LOG_START_BINARY, /* s:binaryname s:seed */ + G_TEST_LOG_LIST_CASE, /* s:testpath */ + G_TEST_LOG_SKIP_CASE, /* s:testpath */ + G_TEST_LOG_START_CASE, /* s:testpath */ + G_TEST_LOG_STOP_CASE, /* d:status d:nforks d:elapsed */ + G_TEST_LOG_MIN_RESULT, /* s:blurb d:result */ + G_TEST_LOG_MAX_RESULT, /* s:blurb d:result */ + G_TEST_LOG_MESSAGE, /* s:blurb */ + G_TEST_LOG_START_SUITE, + G_TEST_LOG_STOP_SUITE +} GTestLogType; + +typedef struct { + GTestLogType log_type; + guint n_strings; + gchar **strings; /* NULL terminated */ + guint n_nums; + long double *nums; +} GTestLogMsg; +typedef struct { + /*< private >*/ + GString *data; + GSList *msgs; +} GTestLogBuffer; + +GLIB_AVAILABLE_IN_ALL +const char* g_test_log_type_name (GTestLogType log_type); +GLIB_AVAILABLE_IN_ALL +GTestLogBuffer* g_test_log_buffer_new (void); +GLIB_AVAILABLE_IN_ALL +void g_test_log_buffer_free (GTestLogBuffer *tbuffer); +GLIB_AVAILABLE_IN_ALL +void g_test_log_buffer_push (GTestLogBuffer *tbuffer, + guint n_bytes, + const guint8 *bytes); +GLIB_AVAILABLE_IN_ALL +GTestLogMsg* g_test_log_buffer_pop (GTestLogBuffer *tbuffer); +GLIB_AVAILABLE_IN_ALL +void g_test_log_msg_free (GTestLogMsg *tmsg); + +/** + * GTestLogFatalFunc: + * @log_domain: the log domain of the message + * @log_level: the log level of the message (including the fatal and recursion flags) + * @message: the message to process + * @user_data: user data, set in g_test_log_set_fatal_handler() + * + * Specifies the prototype of fatal log handler functions. + * + * Returns: %TRUE if the program should abort, %FALSE otherwise + * + * Since: 2.22 + */ +typedef gboolean (*GTestLogFatalFunc) (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data); +GLIB_AVAILABLE_IN_ALL +void +g_test_log_set_fatal_handler (GTestLogFatalFunc log_func, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_34 +void g_test_expect_message (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *pattern); +GLIB_AVAILABLE_IN_2_34 +void g_test_assert_expected_messages_internal (const char *domain, + const char *file, + int line, + const char *func); + +typedef enum +{ + G_TEST_DIST, + G_TEST_BUILT +} GTestFileType; + +GLIB_AVAILABLE_IN_2_38 +gchar * g_test_build_filename (GTestFileType file_type, + const gchar *first_path, + ...) G_GNUC_NULL_TERMINATED; +GLIB_AVAILABLE_IN_2_38 +const gchar *g_test_get_dir (GTestFileType file_type); +GLIB_AVAILABLE_IN_2_38 +const gchar *g_test_get_filename (GTestFileType file_type, + const gchar *first_path, + ...) G_GNUC_NULL_TERMINATED; + +#define g_test_assert_expected_messages() g_test_assert_expected_messages_internal (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC) + +G_END_DECLS + +#endif /* __G_TEST_UTILS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gthread.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gthread.h new file mode 100644 index 0000000..14bb5a0 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gthread.h @@ -0,0 +1,603 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_THREAD_H__ +#define __G_THREAD_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include + +G_BEGIN_DECLS + +#define G_THREAD_ERROR g_thread_error_quark () +GLIB_AVAILABLE_IN_ALL +GQuark g_thread_error_quark (void); + +typedef enum +{ + G_THREAD_ERROR_AGAIN /* Resource temporarily unavailable */ +} GThreadError; + +typedef gpointer (*GThreadFunc) (gpointer data); + +typedef struct _GThread GThread; + +typedef union _GMutex GMutex; +typedef struct _GRecMutex GRecMutex; +typedef struct _GRWLock GRWLock; +typedef struct _GCond GCond; +typedef struct _GPrivate GPrivate; +typedef struct _GOnce GOnce; + +union _GMutex +{ + /*< private >*/ + gpointer p; + guint i[2]; +}; + +struct _GRWLock +{ + /*< private >*/ + gpointer p; + guint i[2]; +}; + +struct _GCond +{ + /*< private >*/ + gpointer p; + guint i[2]; +}; + +struct _GRecMutex +{ + /*< private >*/ + gpointer p; + guint i[2]; +}; + +#define G_PRIVATE_INIT(notify) { NULL, (notify), { NULL, NULL } } +struct _GPrivate +{ + /*< private >*/ + gpointer p; + GDestroyNotify notify; + gpointer future[2]; +}; + +typedef enum +{ + G_ONCE_STATUS_NOTCALLED, + G_ONCE_STATUS_PROGRESS, + G_ONCE_STATUS_READY +} GOnceStatus; + +#define G_ONCE_INIT { G_ONCE_STATUS_NOTCALLED, NULL } +struct _GOnce +{ + volatile GOnceStatus status; + volatile gpointer retval; +}; + +#define G_LOCK_NAME(name) g__ ## name ## _lock +#define G_LOCK_DEFINE_STATIC(name) static G_LOCK_DEFINE (name) +#define G_LOCK_DEFINE(name) GMutex G_LOCK_NAME (name) +#define G_LOCK_EXTERN(name) extern GMutex G_LOCK_NAME (name) + +#ifdef G_DEBUG_LOCKS +# define G_LOCK(name) G_STMT_START{ \ + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + "file %s: line %d (%s): locking: %s ", \ + __FILE__, __LINE__, G_STRFUNC, \ + #name); \ + g_mutex_lock (&G_LOCK_NAME (name)); \ + }G_STMT_END +# define G_UNLOCK(name) G_STMT_START{ \ + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + "file %s: line %d (%s): unlocking: %s ", \ + __FILE__, __LINE__, G_STRFUNC, \ + #name); \ + g_mutex_unlock (&G_LOCK_NAME (name)); \ + }G_STMT_END +# define G_TRYLOCK(name) \ + (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + "file %s: line %d (%s): try locking: %s ", \ + __FILE__, __LINE__, G_STRFUNC, \ + #name), g_mutex_trylock (&G_LOCK_NAME (name))) +#else /* !G_DEBUG_LOCKS */ +# define G_LOCK(name) g_mutex_lock (&G_LOCK_NAME (name)) +# define G_UNLOCK(name) g_mutex_unlock (&G_LOCK_NAME (name)) +# define G_TRYLOCK(name) g_mutex_trylock (&G_LOCK_NAME (name)) +#endif /* !G_DEBUG_LOCKS */ + +GLIB_AVAILABLE_IN_2_32 +GThread * g_thread_ref (GThread *thread); +GLIB_AVAILABLE_IN_2_32 +void g_thread_unref (GThread *thread); +GLIB_AVAILABLE_IN_2_32 +GThread * g_thread_new (const gchar *name, + GThreadFunc func, + gpointer data); +GLIB_AVAILABLE_IN_2_32 +GThread * g_thread_try_new (const gchar *name, + GThreadFunc func, + gpointer data, + GError **error); +GLIB_AVAILABLE_IN_ALL +GThread * g_thread_self (void); +G_NORETURN GLIB_AVAILABLE_IN_ALL +void g_thread_exit (gpointer retval); +GLIB_AVAILABLE_IN_ALL +gpointer g_thread_join (GThread *thread); +GLIB_AVAILABLE_IN_ALL +void g_thread_yield (void); + + +GLIB_AVAILABLE_IN_2_32 +void g_mutex_init (GMutex *mutex); +GLIB_AVAILABLE_IN_2_32 +void g_mutex_clear (GMutex *mutex); +GLIB_AVAILABLE_IN_ALL +void g_mutex_lock (GMutex *mutex); +GLIB_AVAILABLE_IN_ALL +gboolean g_mutex_trylock (GMutex *mutex); +GLIB_AVAILABLE_IN_ALL +void g_mutex_unlock (GMutex *mutex); + +GLIB_AVAILABLE_IN_2_32 +void g_rw_lock_init (GRWLock *rw_lock); +GLIB_AVAILABLE_IN_2_32 +void g_rw_lock_clear (GRWLock *rw_lock); +GLIB_AVAILABLE_IN_2_32 +void g_rw_lock_writer_lock (GRWLock *rw_lock); +GLIB_AVAILABLE_IN_2_32 +gboolean g_rw_lock_writer_trylock (GRWLock *rw_lock); +GLIB_AVAILABLE_IN_2_32 +void g_rw_lock_writer_unlock (GRWLock *rw_lock); +GLIB_AVAILABLE_IN_2_32 +void g_rw_lock_reader_lock (GRWLock *rw_lock); +GLIB_AVAILABLE_IN_2_32 +gboolean g_rw_lock_reader_trylock (GRWLock *rw_lock); +GLIB_AVAILABLE_IN_2_32 +void g_rw_lock_reader_unlock (GRWLock *rw_lock); + +GLIB_AVAILABLE_IN_2_32 +void g_rec_mutex_init (GRecMutex *rec_mutex); +GLIB_AVAILABLE_IN_2_32 +void g_rec_mutex_clear (GRecMutex *rec_mutex); +GLIB_AVAILABLE_IN_2_32 +void g_rec_mutex_lock (GRecMutex *rec_mutex); +GLIB_AVAILABLE_IN_2_32 +gboolean g_rec_mutex_trylock (GRecMutex *rec_mutex); +GLIB_AVAILABLE_IN_2_32 +void g_rec_mutex_unlock (GRecMutex *rec_mutex); + +GLIB_AVAILABLE_IN_2_32 +void g_cond_init (GCond *cond); +GLIB_AVAILABLE_IN_2_32 +void g_cond_clear (GCond *cond); +GLIB_AVAILABLE_IN_ALL +void g_cond_wait (GCond *cond, + GMutex *mutex); +GLIB_AVAILABLE_IN_ALL +void g_cond_signal (GCond *cond); +GLIB_AVAILABLE_IN_ALL +void g_cond_broadcast (GCond *cond); +GLIB_AVAILABLE_IN_2_32 +gboolean g_cond_wait_until (GCond *cond, + GMutex *mutex, + gint64 end_time); + +GLIB_AVAILABLE_IN_ALL +gpointer g_private_get (GPrivate *key); +GLIB_AVAILABLE_IN_ALL +void g_private_set (GPrivate *key, + gpointer value); +GLIB_AVAILABLE_IN_2_32 +void g_private_replace (GPrivate *key, + gpointer value); + +GLIB_AVAILABLE_IN_ALL +gpointer g_once_impl (GOnce *once, + GThreadFunc func, + gpointer arg); +GLIB_AVAILABLE_IN_ALL +gboolean g_once_init_enter (volatile void *location); +GLIB_AVAILABLE_IN_ALL +void g_once_init_leave (volatile void *location, + gsize result); + +/* Use C11-style atomic extensions to check the fast path for status=ready. If + * they are not available, fall back to using a mutex and condition variable in + * g_once_impl(). + * + * On the C11-style codepath, only the load of once->status needs to be atomic, + * as the writes to it and once->retval in g_once_impl() are related by a + * happens-before relation. Release-acquire semantics are defined such that any + * atomic/non-atomic write which happens-before a store/release is guaranteed to + * be seen by the load/acquire of the same atomic variable. */ +#if defined(G_ATOMIC_LOCK_FREE) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) && defined(__ATOMIC_SEQ_CST) +# define g_once(once, func, arg) \ + ((__atomic_load_n (&(once)->status, __ATOMIC_ACQUIRE) == G_ONCE_STATUS_READY) ? \ + (once)->retval : \ + g_once_impl ((once), (func), (arg))) +#else +# define g_once(once, func, arg) g_once_impl ((once), (func), (arg)) +#endif + +#ifdef __GNUC__ +# define g_once_init_enter(location) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(location) == sizeof (gpointer)); \ + (void) (0 ? (gpointer) *(location) : NULL); \ + (!g_atomic_pointer_get (location) && \ + g_once_init_enter (location)); \ + })) +# define g_once_init_leave(location, result) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(location) == sizeof (gpointer)); \ + 0 ? (void) (*(location) = (result)) : (void) 0; \ + g_once_init_leave ((location), (gsize) (result)); \ + })) +#else +# define g_once_init_enter(location) \ + (g_once_init_enter((location))) +# define g_once_init_leave(location, result) \ + (g_once_init_leave((location), (gsize) (result))) +#endif + +GLIB_AVAILABLE_IN_2_36 +guint g_get_num_processors (void); + +/** + * GMutexLocker: + * + * Opaque type. See g_mutex_locker_new() for details. + * Since: 2.44 + */ +typedef void GMutexLocker; + +/** + * g_mutex_locker_new: + * @mutex: a mutex to lock + * + * Lock @mutex and return a new #GMutexLocker. Unlock with + * g_mutex_locker_free(). Using g_mutex_unlock() on @mutex + * while a #GMutexLocker exists can lead to undefined behaviour. + * + * No allocation is performed, it is equivalent to a g_mutex_lock() call. + * + * This is intended to be used with g_autoptr(). Note that g_autoptr() + * is only available when using GCC or clang, so the following example + * will only work with those compilers: + * |[ + * typedef struct + * { + * ... + * GMutex mutex; + * ... + * } MyObject; + * + * static void + * my_object_do_stuff (MyObject *self) + * { + * g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&self->mutex); + * + * // Code with mutex locked here + * + * if (cond) + * // No need to unlock + * return; + * + * // Optionally early unlock + * g_clear_pointer (&locker, g_mutex_locker_free); + * + * // Code with mutex unlocked here + * } + * ]| + * + * Returns: a #GMutexLocker + * Since: 2.44 + */ +GLIB_AVAILABLE_STATIC_INLINE_IN_2_44 +static inline GMutexLocker * +g_mutex_locker_new (GMutex *mutex) +{ + g_mutex_lock (mutex); + return (GMutexLocker *) mutex; +} + +/** + * g_mutex_locker_free: + * @locker: a GMutexLocker + * + * Unlock @locker's mutex. See g_mutex_locker_new() for details. + * + * No memory is freed, it is equivalent to a g_mutex_unlock() call. + * + * Since: 2.44 + */ +GLIB_AVAILABLE_STATIC_INLINE_IN_2_44 +static inline void +g_mutex_locker_free (GMutexLocker *locker) +{ + g_mutex_unlock ((GMutex *) locker); +} + +/** + * GRecMutexLocker: + * + * Opaque type. See g_rec_mutex_locker_new() for details. + * Since: 2.60 + */ +typedef void GRecMutexLocker; + +/** + * g_rec_mutex_locker_new: + * @rec_mutex: a recursive mutex to lock + * + * Lock @rec_mutex and return a new #GRecMutexLocker. Unlock with + * g_rec_mutex_locker_free(). Using g_rec_mutex_unlock() on @rec_mutex + * while a #GRecMutexLocker exists can lead to undefined behaviour. + * + * No allocation is performed, it is equivalent to a g_rec_mutex_lock() call. + * + * This is intended to be used with g_autoptr(). Note that g_autoptr() + * is only available when using GCC or clang, so the following example + * will only work with those compilers: + * |[ + * typedef struct + * { + * ... + * GRecMutex rec_mutex; + * ... + * } MyObject; + * + * static void + * my_object_do_stuff (MyObject *self) + * { + * g_autoptr(GRecMutexLocker) locker = g_rec_mutex_locker_new (&self->rec_mutex); + * + * // Code with rec_mutex locked here + * + * if (cond) + * // No need to unlock + * return; + * + * // Optionally early unlock + * g_clear_pointer (&locker, g_rec_mutex_locker_free); + * + * // Code with rec_mutex unlocked here + * } + * ]| + * + * Returns: a #GRecMutexLocker + * Since: 2.60 + */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_AVAILABLE_STATIC_INLINE_IN_2_60 +static inline GRecMutexLocker * +g_rec_mutex_locker_new (GRecMutex *rec_mutex) +{ + g_rec_mutex_lock (rec_mutex); + return (GRecMutexLocker *) rec_mutex; +} +G_GNUC_END_IGNORE_DEPRECATIONS + +/** + * g_rec_mutex_locker_free: + * @locker: a GRecMutexLocker + * + * Unlock @locker's recursive mutex. See g_rec_mutex_locker_new() for details. + * + * No memory is freed, it is equivalent to a g_rec_mutex_unlock() call. + * + * Since: 2.60 + */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_AVAILABLE_STATIC_INLINE_IN_2_60 +static inline void +g_rec_mutex_locker_free (GRecMutexLocker *locker) +{ + g_rec_mutex_unlock ((GRecMutex *) locker); +} +G_GNUC_END_IGNORE_DEPRECATIONS + +/** + * GRWLockWriterLocker: + * + * Opaque type. See g_rw_lock_writer_locker_new() for details. + * Since: 2.62 + */ +typedef void GRWLockWriterLocker; + +/** + * g_rw_lock_writer_locker_new: + * @rw_lock: a #GRWLock + * + * Obtain a write lock on @rw_lock and return a new #GRWLockWriterLocker. + * Unlock with g_rw_lock_writer_locker_free(). Using g_rw_lock_writer_unlock() + * on @rw_lock while a #GRWLockWriterLocker exists can lead to undefined + * behaviour. + * + * No allocation is performed, it is equivalent to a g_rw_lock_writer_lock() call. + * + * This is intended to be used with g_autoptr(). Note that g_autoptr() + * is only available when using GCC or clang, so the following example + * will only work with those compilers: + * |[ + * typedef struct + * { + * ... + * GRWLock rw_lock; + * GPtrArray *array; + * ... + * } MyObject; + * + * static gchar * + * my_object_get_data (MyObject *self, guint index) + * { + * g_autoptr(GRWLockReaderLocker) locker = g_rw_lock_reader_locker_new (&self->rw_lock); + * + * // Code with a read lock obtained on rw_lock here + * + * if (self->array == NULL) + * // No need to unlock + * return NULL; + * + * if (index < self->array->len) + * // No need to unlock + * return g_ptr_array_index (self->array, index); + * + * // Optionally early unlock + * g_clear_pointer (&locker, g_rw_lock_reader_locker_free); + * + * // Code with rw_lock unlocked here + * return NULL; + * } + * + * static void + * my_object_set_data (MyObject *self, guint index, gpointer data) + * { + * g_autoptr(GRWLockWriterLocker) locker = g_rw_lock_writer_locker_new (&self->rw_lock); + * + * // Code with a write lock obtained on rw_lock here + * + * if (self->array == NULL) + * self->array = g_ptr_array_new (); + * + * if (cond) + * // No need to unlock + * return; + * + * if (index >= self->array->len) + * g_ptr_array_set_size (self->array, index+1); + * g_ptr_array_index (self->array, index) = data; + * + * // Optionally early unlock + * g_clear_pointer (&locker, g_rw_lock_writer_locker_free); + * + * // Code with rw_lock unlocked here + * } + * ]| + * + * Returns: a #GRWLockWriterLocker + * Since: 2.62 + */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_AVAILABLE_STATIC_INLINE_IN_2_62 +static inline GRWLockWriterLocker * +g_rw_lock_writer_locker_new (GRWLock *rw_lock) +{ + g_rw_lock_writer_lock (rw_lock); + return (GRWLockWriterLocker *) rw_lock; +} +G_GNUC_END_IGNORE_DEPRECATIONS + +/** + * g_rw_lock_writer_locker_free: + * @locker: a GRWLockWriterLocker + * + * Release a write lock on @locker's read-write lock. See + * g_rw_lock_writer_locker_new() for details. + * + * No memory is freed, it is equivalent to a g_rw_lock_writer_unlock() call. + * + * Since: 2.62 + */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_AVAILABLE_STATIC_INLINE_IN_2_62 +static inline void +g_rw_lock_writer_locker_free (GRWLockWriterLocker *locker) +{ + g_rw_lock_writer_unlock ((GRWLock *) locker); +} +G_GNUC_END_IGNORE_DEPRECATIONS + +/** + * GRWLockReaderLocker: + * + * Opaque type. See g_rw_lock_reader_locker_new() for details. + * Since: 2.62 + */ +typedef void GRWLockReaderLocker; + +/** + * g_rw_lock_reader_locker_new: + * @rw_lock: a #GRWLock + * + * Obtain a read lock on @rw_lock and return a new #GRWLockReaderLocker. + * Unlock with g_rw_lock_reader_locker_free(). Using g_rw_lock_reader_unlock() + * on @rw_lock while a #GRWLockReaderLocker exists can lead to undefined + * behaviour. + * + * No allocation is performed, it is equivalent to a g_rw_lock_reader_lock() call. + * + * This is intended to be used with g_autoptr(). For a code sample, see + * g_rw_lock_writer_locker_new(). + * + * Returns: a #GRWLockReaderLocker + * Since: 2.62 + */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_AVAILABLE_STATIC_INLINE_IN_2_62 +static inline GRWLockReaderLocker * +g_rw_lock_reader_locker_new (GRWLock *rw_lock) +{ + g_rw_lock_reader_lock (rw_lock); + return (GRWLockReaderLocker *) rw_lock; +} +G_GNUC_END_IGNORE_DEPRECATIONS + +/** + * g_rw_lock_reader_locker_free: + * @locker: a GRWLockReaderLocker + * + * Release a read lock on @locker's read-write lock. See + * g_rw_lock_reader_locker_new() for details. + * + * No memory is freed, it is equivalent to a g_rw_lock_reader_unlock() call. + * + * Since: 2.62 + */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_AVAILABLE_STATIC_INLINE_IN_2_62 +static inline void +g_rw_lock_reader_locker_free (GRWLockReaderLocker *locker) +{ + g_rw_lock_reader_unlock ((GRWLock *) locker); +} +G_GNUC_END_IGNORE_DEPRECATIONS + +G_END_DECLS + +#endif /* __G_THREAD_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gthreadpool.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gthreadpool.h new file mode 100644 index 0000000..921bee4 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gthreadpool.h @@ -0,0 +1,105 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_THREADPOOL_H__ +#define __G_THREADPOOL_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +typedef struct _GThreadPool GThreadPool; + +/* Thread Pools + */ + +struct _GThreadPool +{ + GFunc func; + gpointer user_data; + gboolean exclusive; +}; + +GLIB_AVAILABLE_IN_ALL +GThreadPool * g_thread_pool_new (GFunc func, + gpointer user_data, + gint max_threads, + gboolean exclusive, + GError **error); +GLIB_AVAILABLE_IN_2_70 +GThreadPool * g_thread_pool_new_full (GFunc func, + gpointer user_data, + GDestroyNotify item_free_func, + gint max_threads, + gboolean exclusive, + GError **error); +GLIB_AVAILABLE_IN_ALL +void g_thread_pool_free (GThreadPool *pool, + gboolean immediate, + gboolean wait_); +GLIB_AVAILABLE_IN_ALL +gboolean g_thread_pool_push (GThreadPool *pool, + gpointer data, + GError **error); +GLIB_AVAILABLE_IN_ALL +guint g_thread_pool_unprocessed (GThreadPool *pool); +GLIB_AVAILABLE_IN_ALL +void g_thread_pool_set_sort_function (GThreadPool *pool, + GCompareDataFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_2_46 +gboolean g_thread_pool_move_to_front (GThreadPool *pool, + gpointer data); + +GLIB_AVAILABLE_IN_ALL +gboolean g_thread_pool_set_max_threads (GThreadPool *pool, + gint max_threads, + GError **error); +GLIB_AVAILABLE_IN_ALL +gint g_thread_pool_get_max_threads (GThreadPool *pool); +GLIB_AVAILABLE_IN_ALL +guint g_thread_pool_get_num_threads (GThreadPool *pool); + +GLIB_AVAILABLE_IN_ALL +void g_thread_pool_set_max_unused_threads (gint max_threads); +GLIB_AVAILABLE_IN_ALL +gint g_thread_pool_get_max_unused_threads (void); +GLIB_AVAILABLE_IN_ALL +guint g_thread_pool_get_num_unused_threads (void); +GLIB_AVAILABLE_IN_ALL +void g_thread_pool_stop_unused_threads (void); +GLIB_AVAILABLE_IN_ALL +void g_thread_pool_set_max_idle_time (guint interval); +GLIB_AVAILABLE_IN_ALL +guint g_thread_pool_get_max_idle_time (void); + +G_END_DECLS + +#endif /* __G_THREADPOOL_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtimer.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtimer.h new file mode 100644 index 0000000..439ffad --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtimer.h @@ -0,0 +1,80 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_TIMER_H__ +#define __G_TIMER_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/* Timer + */ + +/* microseconds per second */ +typedef struct _GTimer GTimer; + +#define G_USEC_PER_SEC 1000000 + +GLIB_AVAILABLE_IN_ALL +GTimer* g_timer_new (void); +GLIB_AVAILABLE_IN_ALL +void g_timer_destroy (GTimer *timer); +GLIB_AVAILABLE_IN_ALL +void g_timer_start (GTimer *timer); +GLIB_AVAILABLE_IN_ALL +void g_timer_stop (GTimer *timer); +GLIB_AVAILABLE_IN_ALL +void g_timer_reset (GTimer *timer); +GLIB_AVAILABLE_IN_ALL +void g_timer_continue (GTimer *timer); +GLIB_AVAILABLE_IN_ALL +gdouble g_timer_elapsed (GTimer *timer, + gulong *microseconds); +GLIB_AVAILABLE_IN_2_62 +gboolean g_timer_is_active (GTimer *timer); + +GLIB_AVAILABLE_IN_ALL +void g_usleep (gulong microseconds); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED_IN_2_62 +void g_time_val_add (GTimeVal *time_, + glong microseconds); +GLIB_DEPRECATED_IN_2_62_FOR(g_date_time_new_from_iso8601) +gboolean g_time_val_from_iso8601 (const gchar *iso_date, + GTimeVal *time_); +GLIB_DEPRECATED_IN_2_62_FOR(g_date_time_format) +gchar* g_time_val_to_iso8601 (GTimeVal *time_) G_GNUC_MALLOC; +G_GNUC_END_IGNORE_DEPRECATIONS + +G_END_DECLS + +#endif /* __G_TIMER_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtimezone.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtimezone.h new file mode 100644 index 0000000..679ed4e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtimezone.h @@ -0,0 +1,98 @@ +/* + * Copyright © 2010 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Author: Ryan Lortie + */ + +#ifndef __G_TIME_ZONE_H__ +#define __G_TIME_ZONE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +typedef struct _GTimeZone GTimeZone; + +/** + * GTimeType: + * @G_TIME_TYPE_STANDARD: the time is in local standard time + * @G_TIME_TYPE_DAYLIGHT: the time is in local daylight time + * @G_TIME_TYPE_UNIVERSAL: the time is in UTC + * + * Disambiguates a given time in two ways. + * + * First, specifies if the given time is in universal or local time. + * + * Second, if the time is in local time, specifies if it is local + * standard time or local daylight time. This is important for the case + * where the same local time occurs twice (during daylight savings time + * transitions, for example). + */ +typedef enum +{ + G_TIME_TYPE_STANDARD, + G_TIME_TYPE_DAYLIGHT, + G_TIME_TYPE_UNIVERSAL +} GTimeType; + +GLIB_DEPRECATED_IN_2_68_FOR (g_time_zone_new_identifier) +GTimeZone * g_time_zone_new (const gchar *identifier); +GLIB_AVAILABLE_IN_2_68 +GTimeZone * g_time_zone_new_identifier (const gchar *identifier); +GLIB_AVAILABLE_IN_ALL +GTimeZone * g_time_zone_new_utc (void); +GLIB_AVAILABLE_IN_ALL +GTimeZone * g_time_zone_new_local (void); +GLIB_AVAILABLE_IN_2_58 +GTimeZone * g_time_zone_new_offset (gint32 seconds); + +GLIB_AVAILABLE_IN_ALL +GTimeZone * g_time_zone_ref (GTimeZone *tz); +GLIB_AVAILABLE_IN_ALL +void g_time_zone_unref (GTimeZone *tz); + +GLIB_AVAILABLE_IN_ALL +gint g_time_zone_find_interval (GTimeZone *tz, + GTimeType type, + gint64 time_); + +GLIB_AVAILABLE_IN_ALL +gint g_time_zone_adjust_time (GTimeZone *tz, + GTimeType type, + gint64 *time_); + +GLIB_AVAILABLE_IN_ALL +const gchar * g_time_zone_get_abbreviation (GTimeZone *tz, + gint interval); +GLIB_AVAILABLE_IN_ALL +gint32 g_time_zone_get_offset (GTimeZone *tz, + gint interval); +GLIB_AVAILABLE_IN_ALL +gboolean g_time_zone_is_dst (GTimeZone *tz, + gint interval); +GLIB_AVAILABLE_IN_2_58 +const gchar * g_time_zone_get_identifier (GTimeZone *tz); + +G_END_DECLS + +#endif /* __G_TIME_ZONE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtrashstack.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtrashstack.h new file mode 100644 index 0000000..81456d3 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtrashstack.h @@ -0,0 +1,60 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_TRASH_STACK_H__ +#define __G_TRASH_STACK_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + +typedef struct _GTrashStack GTrashStack GLIB_DEPRECATED_TYPE_IN_2_48; +struct _GTrashStack +{ + GTrashStack *next; +} GLIB_DEPRECATED_TYPE_IN_2_48; + +GLIB_DEPRECATED_IN_2_48 +void g_trash_stack_push (GTrashStack **stack_p, + gpointer data_p); +GLIB_DEPRECATED_IN_2_48 +gpointer g_trash_stack_pop (GTrashStack **stack_p); +GLIB_DEPRECATED_IN_2_48 +gpointer g_trash_stack_peek (GTrashStack **stack_p); +GLIB_DEPRECATED_IN_2_48 +guint g_trash_stack_height (GTrashStack **stack_p); + +G_GNUC_END_IGNORE_DEPRECATIONS + +G_END_DECLS + +#endif /* __G_TRASH_STACK_H_ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtree.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtree.h new file mode 100644 index 0000000..74ab9ce --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtree.h @@ -0,0 +1,181 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_TREE_H__ +#define __G_TREE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#undef G_TREE_DEBUG + +typedef struct _GTree GTree; + +/** + * GTreeNode: + * + * An opaque type which identifies a specific node in a #GTree. + * + * Since: 2.68 + */ +typedef struct _GTreeNode GTreeNode; + +typedef gboolean (*GTraverseFunc) (gpointer key, + gpointer value, + gpointer data); + +/** + * GTraverseNodeFunc: + * @node: a #GTreeNode + * @data: user data passed to g_tree_foreach_node() + * + * Specifies the type of function passed to g_tree_foreach_node(). It is + * passed each node, together with the @user_data parameter passed to + * g_tree_foreach_node(). If the function returns %TRUE, the traversal is + * stopped. + * + * Returns: %TRUE to stop the traversal + * Since: 2.68 + */ +typedef gboolean (*GTraverseNodeFunc) (GTreeNode *node, + gpointer data); + +/* Balanced binary trees + */ +GLIB_AVAILABLE_IN_ALL +GTree* g_tree_new (GCompareFunc key_compare_func); +GLIB_AVAILABLE_IN_ALL +GTree* g_tree_new_with_data (GCompareDataFunc key_compare_func, + gpointer key_compare_data); +GLIB_AVAILABLE_IN_ALL +GTree* g_tree_new_full (GCompareDataFunc key_compare_func, + gpointer key_compare_data, + GDestroyNotify key_destroy_func, + GDestroyNotify value_destroy_func); +GLIB_AVAILABLE_IN_2_68 +GTreeNode *g_tree_node_first (GTree *tree); +GLIB_AVAILABLE_IN_2_68 +GTreeNode *g_tree_node_last (GTree *tree); +GLIB_AVAILABLE_IN_2_68 +GTreeNode *g_tree_node_previous (GTreeNode *node); +GLIB_AVAILABLE_IN_2_68 +GTreeNode *g_tree_node_next (GTreeNode *node); +GLIB_AVAILABLE_IN_ALL +GTree* g_tree_ref (GTree *tree); +GLIB_AVAILABLE_IN_ALL +void g_tree_unref (GTree *tree); +GLIB_AVAILABLE_IN_ALL +void g_tree_destroy (GTree *tree); +GLIB_AVAILABLE_IN_2_68 +GTreeNode *g_tree_insert_node (GTree *tree, + gpointer key, + gpointer value); +GLIB_AVAILABLE_IN_ALL +void g_tree_insert (GTree *tree, + gpointer key, + gpointer value); +GLIB_AVAILABLE_IN_2_68 +GTreeNode *g_tree_replace_node (GTree *tree, + gpointer key, + gpointer value); +GLIB_AVAILABLE_IN_ALL +void g_tree_replace (GTree *tree, + gpointer key, + gpointer value); +GLIB_AVAILABLE_IN_ALL +gboolean g_tree_remove (GTree *tree, + gconstpointer key); + +GLIB_AVAILABLE_IN_2_70 +void g_tree_remove_all (GTree *tree); + +GLIB_AVAILABLE_IN_ALL +gboolean g_tree_steal (GTree *tree, + gconstpointer key); +GLIB_AVAILABLE_IN_2_68 +gpointer g_tree_node_key (GTreeNode *node); +GLIB_AVAILABLE_IN_2_68 +gpointer g_tree_node_value (GTreeNode *node); +GLIB_AVAILABLE_IN_2_68 +GTreeNode *g_tree_lookup_node (GTree *tree, + gconstpointer key); +GLIB_AVAILABLE_IN_ALL +gpointer g_tree_lookup (GTree *tree, + gconstpointer key); +GLIB_AVAILABLE_IN_ALL +gboolean g_tree_lookup_extended (GTree *tree, + gconstpointer lookup_key, + gpointer *orig_key, + gpointer *value); +GLIB_AVAILABLE_IN_ALL +void g_tree_foreach (GTree *tree, + GTraverseFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_2_68 +void g_tree_foreach_node (GTree *tree, + GTraverseNodeFunc func, + gpointer user_data); + +GLIB_DEPRECATED +void g_tree_traverse (GTree *tree, + GTraverseFunc traverse_func, + GTraverseType traverse_type, + gpointer user_data); + +GLIB_AVAILABLE_IN_2_68 +GTreeNode *g_tree_search_node (GTree *tree, + GCompareFunc search_func, + gconstpointer user_data); +GLIB_AVAILABLE_IN_ALL +gpointer g_tree_search (GTree *tree, + GCompareFunc search_func, + gconstpointer user_data); +GLIB_AVAILABLE_IN_2_68 +GTreeNode *g_tree_lower_bound (GTree *tree, + gconstpointer key); +GLIB_AVAILABLE_IN_2_68 +GTreeNode *g_tree_upper_bound (GTree *tree, + gconstpointer key); +GLIB_AVAILABLE_IN_ALL +gint g_tree_height (GTree *tree); +GLIB_AVAILABLE_IN_ALL +gint g_tree_nnodes (GTree *tree); + +#ifdef G_TREE_DEBUG +/*< private >*/ +#ifndef __GTK_DOC_IGNORE__ +void g_tree_dump (GTree *tree); +#endif /* !__GTK_DOC_IGNORE__ */ +#endif /* G_TREE_DEBUG */ + +G_END_DECLS + +#endif /* __G_TREE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtypes.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtypes.h new file mode 100644 index 0000000..9d912d5 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gtypes.h @@ -0,0 +1,591 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_TYPES_H__ +#define __G_TYPES_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include + +/* Must be included after the 3 headers above */ +#include + +#include + +G_BEGIN_DECLS + +/* Provide type definitions for commonly used types. + * These are useful because a "gint8" can be adjusted + * to be 1 byte (8 bits) on all platforms. Similarly and + * more importantly, "gint32" can be adjusted to be + * 4 bytes (32 bits) on all platforms. + */ + +typedef char gchar; +typedef short gshort; +typedef long glong; +typedef int gint; +typedef gint gboolean; + +typedef unsigned char guchar; +typedef unsigned short gushort; +typedef unsigned long gulong; +typedef unsigned int guint; + +typedef float gfloat; +typedef double gdouble; + +/* Define min and max constants for the fixed size numerical types */ +/** + * G_MININT8: (value -128) + * + * The minimum value which can be held in a #gint8. + * + * Since: 2.4 + */ +#define G_MININT8 ((gint8) (-G_MAXINT8 - 1)) +#define G_MAXINT8 ((gint8) 0x7f) +#define G_MAXUINT8 ((guint8) 0xff) + +/** + * G_MININT16: (value -32768) + * + * The minimum value which can be held in a #gint16. + * + * Since: 2.4 + */ +#define G_MININT16 ((gint16) (-G_MAXINT16 - 1)) +#define G_MAXINT16 ((gint16) 0x7fff) +#define G_MAXUINT16 ((guint16) 0xffff) + +/** + * G_MININT32: (value -2147483648) + * + * The minimum value which can be held in a #gint32. + * + * Since: 2.4 + */ +#define G_MININT32 ((gint32) (-G_MAXINT32 - 1)) +#define G_MAXINT32 ((gint32) 0x7fffffff) +#define G_MAXUINT32 ((guint32) 0xffffffff) + +/** + * G_MININT64: (value -9223372036854775808) + * + * The minimum value which can be held in a #gint64. + */ +#define G_MININT64 ((gint64) (-G_MAXINT64 - G_GINT64_CONSTANT(1))) +#define G_MAXINT64 G_GINT64_CONSTANT(0x7fffffffffffffff) +#define G_MAXUINT64 G_GUINT64_CONSTANT(0xffffffffffffffff) + +typedef void* gpointer; +typedef const void *gconstpointer; + +typedef gint (*GCompareFunc) (gconstpointer a, + gconstpointer b); +typedef gint (*GCompareDataFunc) (gconstpointer a, + gconstpointer b, + gpointer user_data); +typedef gboolean (*GEqualFunc) (gconstpointer a, + gconstpointer b); + +/** + * GEqualFuncFull: + * @a: a value + * @b: a value to compare with + * @user_data: user data provided by the caller + * + * Specifies the type of a function used to test two values for + * equality. The function should return %TRUE if both values are equal + * and %FALSE otherwise. + * + * This is a version of #GEqualFunc which provides a @user_data closure from + * the caller. + * + * Returns: %TRUE if @a = @b; %FALSE otherwise + * Since: 2.74 + */ +typedef gboolean (*GEqualFuncFull) (gconstpointer a, + gconstpointer b, + gpointer user_data); + +typedef void (*GDestroyNotify) (gpointer data); +typedef void (*GFunc) (gpointer data, + gpointer user_data); +typedef guint (*GHashFunc) (gconstpointer key); +typedef void (*GHFunc) (gpointer key, + gpointer value, + gpointer user_data); + +/** + * GCopyFunc: + * @src: (not nullable): A pointer to the data which should be copied + * @data: Additional data + * + * A function of this signature is used to copy the node data + * when doing a deep-copy of a tree. + * + * Returns: (not nullable): A pointer to the copy + * + * Since: 2.4 + */ +typedef gpointer (*GCopyFunc) (gconstpointer src, + gpointer data); +/** + * GFreeFunc: + * @data: a data pointer + * + * Declares a type of function which takes an arbitrary + * data pointer argument and has no return value. It is + * not currently used in GLib or GTK. + */ +typedef void (*GFreeFunc) (gpointer data); + +/** + * GTranslateFunc: + * @str: the untranslated string + * @data: user data specified when installing the function, e.g. + * in g_option_group_set_translate_func() + * + * The type of functions which are used to translate user-visible + * strings, for output. + * + * Returns: a translation of the string for the current locale. + * The returned string is owned by GLib and must not be freed. + */ +typedef const gchar * (*GTranslateFunc) (const gchar *str, + gpointer data); + + +/* Define some mathematical constants that aren't available + * symbolically in some strict ISO C implementations. + * + * Note that the large number of digits used in these definitions + * doesn't imply that GLib or current computers in general would be + * able to handle floating point numbers with an accuracy like this. + * It's mostly an exercise in futility and future proofing. For + * extended precision floating point support, look somewhere else + * than GLib. + */ +#define G_E 2.7182818284590452353602874713526624977572470937000 +#define G_LN2 0.69314718055994530941723212145817656807550013436026 +#define G_LN10 2.3025850929940456840179914546843642076011014886288 +#define G_PI 3.1415926535897932384626433832795028841971693993751 +#define G_PI_2 1.5707963267948966192313216916397514420985846996876 +#define G_PI_4 0.78539816339744830961566084581987572104929234984378 +#define G_SQRT2 1.4142135623730950488016887242096980785696718753769 + +/* Portable endian checks and conversions + * + * glibconfig.h defines G_BYTE_ORDER which expands to one of + * the below macros. + */ +#define G_LITTLE_ENDIAN 1234 +#define G_BIG_ENDIAN 4321 +#define G_PDP_ENDIAN 3412 /* unused, need specific PDP check */ + + +/* Basic bit swapping functions + */ +#define GUINT16_SWAP_LE_BE_CONSTANT(val) ((guint16) ( \ + (guint16) ((guint16) (val) >> 8) | \ + (guint16) ((guint16) (val) << 8))) + +#define GUINT32_SWAP_LE_BE_CONSTANT(val) ((guint32) ( \ + (((guint32) (val) & (guint32) 0x000000ffU) << 24) | \ + (((guint32) (val) & (guint32) 0x0000ff00U) << 8) | \ + (((guint32) (val) & (guint32) 0x00ff0000U) >> 8) | \ + (((guint32) (val) & (guint32) 0xff000000U) >> 24))) + +#define GUINT64_SWAP_LE_BE_CONSTANT(val) ((guint64) ( \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT (0x00000000000000ffU)) << 56) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT (0x000000000000ff00U)) << 40) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT (0x0000000000ff0000U)) << 24) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT (0x00000000ff000000U)) << 8) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT (0x000000ff00000000U)) >> 8) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT (0x0000ff0000000000U)) >> 24) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT (0x00ff000000000000U)) >> 40) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT (0xff00000000000000U)) >> 56))) + +/* Arch specific stuff for speed + */ +#if defined (__GNUC__) && (__GNUC__ >= 2) && defined (__OPTIMIZE__) + +# if __GNUC__ >= 4 && defined (__GNUC_MINOR__) && __GNUC_MINOR__ >= 3 +# define GUINT32_SWAP_LE_BE(val) ((guint32) __builtin_bswap32 ((guint32) (val))) +# define GUINT64_SWAP_LE_BE(val) ((guint64) __builtin_bswap64 ((guint64) (val))) +# endif + +# if defined (__i386__) +# define GUINT16_SWAP_LE_BE_IA32(val) \ + (G_GNUC_EXTENSION \ + ({ guint16 __v, __x = ((guint16) (val)); \ + if (__builtin_constant_p (__x)) \ + __v = GUINT16_SWAP_LE_BE_CONSTANT (__x); \ + else \ + __asm__ ("rorw $8, %w0" \ + : "=r" (__v) \ + : "0" (__x) \ + : "cc"); \ + __v; })) +# if !defined (__i486__) && !defined (__i586__) \ + && !defined (__pentium__) && !defined (__i686__) \ + && !defined (__pentiumpro__) && !defined (__pentium4__) +# define GUINT32_SWAP_LE_BE_IA32(val) \ + (G_GNUC_EXTENSION \ + ({ guint32 __v, __x = ((guint32) (val)); \ + if (__builtin_constant_p (__x)) \ + __v = GUINT32_SWAP_LE_BE_CONSTANT (__x); \ + else \ + __asm__ ("rorw $8, %w0\n\t" \ + "rorl $16, %0\n\t" \ + "rorw $8, %w0" \ + : "=r" (__v) \ + : "0" (__x) \ + : "cc"); \ + __v; })) +# else /* 486 and higher has bswap */ +# define GUINT32_SWAP_LE_BE_IA32(val) \ + (G_GNUC_EXTENSION \ + ({ guint32 __v, __x = ((guint32) (val)); \ + if (__builtin_constant_p (__x)) \ + __v = GUINT32_SWAP_LE_BE_CONSTANT (__x); \ + else \ + __asm__ ("bswap %0" \ + : "=r" (__v) \ + : "0" (__x)); \ + __v; })) +# endif /* processor specific 32-bit stuff */ +# define GUINT64_SWAP_LE_BE_IA32(val) \ + (G_GNUC_EXTENSION \ + ({ union { guint64 __ll; \ + guint32 __l[2]; } __w, __r; \ + __w.__ll = ((guint64) (val)); \ + if (__builtin_constant_p (__w.__ll)) \ + __r.__ll = GUINT64_SWAP_LE_BE_CONSTANT (__w.__ll); \ + else \ + { \ + __r.__l[0] = GUINT32_SWAP_LE_BE (__w.__l[1]); \ + __r.__l[1] = GUINT32_SWAP_LE_BE (__w.__l[0]); \ + } \ + __r.__ll; })) + /* Possibly just use the constant version and let gcc figure it out? */ +# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val)) +# ifndef GUINT32_SWAP_LE_BE +# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_IA32 (val)) +# endif +# ifndef GUINT64_SWAP_LE_BE +# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_IA32 (val)) +# endif +# elif defined (__ia64__) +# define GUINT16_SWAP_LE_BE_IA64(val) \ + (G_GNUC_EXTENSION \ + ({ guint16 __v, __x = ((guint16) (val)); \ + if (__builtin_constant_p (__x)) \ + __v = GUINT16_SWAP_LE_BE_CONSTANT (__x); \ + else \ + __asm__ __volatile__ ("shl %0 = %1, 48 ;;" \ + "mux1 %0 = %0, @rev ;;" \ + : "=r" (__v) \ + : "r" (__x)); \ + __v; })) +# define GUINT32_SWAP_LE_BE_IA64(val) \ + (G_GNUC_EXTENSION \ + ({ guint32 __v, __x = ((guint32) (val)); \ + if (__builtin_constant_p (__x)) \ + __v = GUINT32_SWAP_LE_BE_CONSTANT (__x); \ + else \ + __asm__ __volatile__ ("shl %0 = %1, 32 ;;" \ + "mux1 %0 = %0, @rev ;;" \ + : "=r" (__v) \ + : "r" (__x)); \ + __v; })) +# define GUINT64_SWAP_LE_BE_IA64(val) \ + (G_GNUC_EXTENSION \ + ({ guint64 __v, __x = ((guint64) (val)); \ + if (__builtin_constant_p (__x)) \ + __v = GUINT64_SWAP_LE_BE_CONSTANT (__x); \ + else \ + __asm__ __volatile__ ("mux1 %0 = %1, @rev ;;" \ + : "=r" (__v) \ + : "r" (__x)); \ + __v; })) +# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA64 (val)) +# ifndef GUINT32_SWAP_LE_BE +# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_IA64 (val)) +# endif +# ifndef GUINT64_SWAP_LE_BE +# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_IA64 (val)) +# endif +# elif defined (__x86_64__) +# define GUINT32_SWAP_LE_BE_X86_64(val) \ + (G_GNUC_EXTENSION \ + ({ guint32 __v, __x = ((guint32) (val)); \ + if (__builtin_constant_p (__x)) \ + __v = GUINT32_SWAP_LE_BE_CONSTANT (__x); \ + else \ + __asm__ ("bswapl %0" \ + : "=r" (__v) \ + : "0" (__x)); \ + __v; })) +# define GUINT64_SWAP_LE_BE_X86_64(val) \ + (G_GNUC_EXTENSION \ + ({ guint64 __v, __x = ((guint64) (val)); \ + if (__builtin_constant_p (__x)) \ + __v = GUINT64_SWAP_LE_BE_CONSTANT (__x); \ + else \ + __asm__ ("bswapq %0" \ + : "=r" (__v) \ + : "0" (__x)); \ + __v; })) + /* gcc seems to figure out optimal code for this on its own */ +# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val)) +# ifndef GUINT32_SWAP_LE_BE +# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_X86_64 (val)) +# endif +# ifndef GUINT64_SWAP_LE_BE +# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_X86_64 (val)) +# endif +# else /* generic gcc */ +# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val)) +# ifndef GUINT32_SWAP_LE_BE +# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_CONSTANT (val)) +# endif +# ifndef GUINT64_SWAP_LE_BE +# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_CONSTANT (val)) +# endif +# endif +#else /* generic */ +# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val)) +# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_CONSTANT (val)) +# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_CONSTANT (val)) +#endif /* generic */ + +#define GUINT16_SWAP_LE_PDP(val) ((guint16) (val)) +#define GUINT16_SWAP_BE_PDP(val) (GUINT16_SWAP_LE_BE (val)) +#define GUINT32_SWAP_LE_PDP(val) ((guint32) ( \ + (((guint32) (val) & (guint32) 0x0000ffffU) << 16) | \ + (((guint32) (val) & (guint32) 0xffff0000U) >> 16))) +#define GUINT32_SWAP_BE_PDP(val) ((guint32) ( \ + (((guint32) (val) & (guint32) 0x00ff00ffU) << 8) | \ + (((guint32) (val) & (guint32) 0xff00ff00U) >> 8))) + +/* The G*_TO_?E() macros are defined in glibconfig.h. + * The transformation is symmetric, so the FROM just maps to the TO. + */ +#define GINT16_FROM_LE(val) (GINT16_TO_LE (val)) +#define GUINT16_FROM_LE(val) (GUINT16_TO_LE (val)) +#define GINT16_FROM_BE(val) (GINT16_TO_BE (val)) +#define GUINT16_FROM_BE(val) (GUINT16_TO_BE (val)) +#define GINT32_FROM_LE(val) (GINT32_TO_LE (val)) +#define GUINT32_FROM_LE(val) (GUINT32_TO_LE (val)) +#define GINT32_FROM_BE(val) (GINT32_TO_BE (val)) +#define GUINT32_FROM_BE(val) (GUINT32_TO_BE (val)) + +#define GINT64_FROM_LE(val) (GINT64_TO_LE (val)) +#define GUINT64_FROM_LE(val) (GUINT64_TO_LE (val)) +#define GINT64_FROM_BE(val) (GINT64_TO_BE (val)) +#define GUINT64_FROM_BE(val) (GUINT64_TO_BE (val)) + +#define GLONG_FROM_LE(val) (GLONG_TO_LE (val)) +#define GULONG_FROM_LE(val) (GULONG_TO_LE (val)) +#define GLONG_FROM_BE(val) (GLONG_TO_BE (val)) +#define GULONG_FROM_BE(val) (GULONG_TO_BE (val)) + +#define GINT_FROM_LE(val) (GINT_TO_LE (val)) +#define GUINT_FROM_LE(val) (GUINT_TO_LE (val)) +#define GINT_FROM_BE(val) (GINT_TO_BE (val)) +#define GUINT_FROM_BE(val) (GUINT_TO_BE (val)) + +#define GSIZE_FROM_LE(val) (GSIZE_TO_LE (val)) +#define GSSIZE_FROM_LE(val) (GSSIZE_TO_LE (val)) +#define GSIZE_FROM_BE(val) (GSIZE_TO_BE (val)) +#define GSSIZE_FROM_BE(val) (GSSIZE_TO_BE (val)) + +/* Portable versions of host-network order stuff + */ +#define g_ntohl(val) (GUINT32_FROM_BE (val)) +#define g_ntohs(val) (GUINT16_FROM_BE (val)) +#define g_htonl(val) (GUINT32_TO_BE (val)) +#define g_htons(val) (GUINT16_TO_BE (val)) + +/* Overflow-checked unsigned integer arithmetic + */ +#ifndef _GLIB_TEST_OVERFLOW_FALLBACK +/* https://bugzilla.gnome.org/show_bug.cgi?id=769104 */ +#if __GNUC__ >= 5 && !defined(__INTEL_COMPILER) +#define _GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS +#elif g_macro__has_builtin(__builtin_add_overflow) +#define _GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS +#endif +#endif + +#ifdef _GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS + +#define g_uint_checked_add(dest, a, b) \ + (!__builtin_add_overflow(a, b, dest)) +#define g_uint_checked_mul(dest, a, b) \ + (!__builtin_mul_overflow(a, b, dest)) + +#define g_uint64_checked_add(dest, a, b) \ + (!__builtin_add_overflow(a, b, dest)) +#define g_uint64_checked_mul(dest, a, b) \ + (!__builtin_mul_overflow(a, b, dest)) + +#define g_size_checked_add(dest, a, b) \ + (!__builtin_add_overflow(a, b, dest)) +#define g_size_checked_mul(dest, a, b) \ + (!__builtin_mul_overflow(a, b, dest)) + +#else /* !_GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS */ + +/* The names of the following inlines are private. Use the macro + * definitions above. + */ +static inline gboolean _GLIB_CHECKED_ADD_UINT (guint *dest, guint a, guint b) { + *dest = a + b; return *dest >= a; } +static inline gboolean _GLIB_CHECKED_MUL_UINT (guint *dest, guint a, guint b) { + *dest = a * b; return !a || *dest / a == b; } +static inline gboolean _GLIB_CHECKED_ADD_UINT64 (guint64 *dest, guint64 a, guint64 b) { + *dest = a + b; return *dest >= a; } +static inline gboolean _GLIB_CHECKED_MUL_UINT64 (guint64 *dest, guint64 a, guint64 b) { + *dest = a * b; return !a || *dest / a == b; } +static inline gboolean _GLIB_CHECKED_ADD_SIZE (gsize *dest, gsize a, gsize b) { + *dest = a + b; return *dest >= a; } +static inline gboolean _GLIB_CHECKED_MUL_SIZE (gsize *dest, gsize a, gsize b) { + *dest = a * b; return !a || *dest / a == b; } + +#define g_uint_checked_add(dest, a, b) \ + _GLIB_CHECKED_ADD_UINT(dest, a, b) +#define g_uint_checked_mul(dest, a, b) \ + _GLIB_CHECKED_MUL_UINT(dest, a, b) + +#define g_uint64_checked_add(dest, a, b) \ + _GLIB_CHECKED_ADD_UINT64(dest, a, b) +#define g_uint64_checked_mul(dest, a, b) \ + _GLIB_CHECKED_MUL_UINT64(dest, a, b) + +#define g_size_checked_add(dest, a, b) \ + _GLIB_CHECKED_ADD_SIZE(dest, a, b) +#define g_size_checked_mul(dest, a, b) \ + _GLIB_CHECKED_MUL_SIZE(dest, a, b) + +#endif /* !_GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS */ + +/* IEEE Standard 754 Single Precision Storage Format (gfloat): + * + * 31 30 23 22 0 + * +--------+---------------+---------------+ + * | s 1bit | e[30:23] 8bit | f[22:0] 23bit | + * +--------+---------------+---------------+ + * B0------------------->B1------->B2-->B3--> + * + * IEEE Standard 754 Double Precision Storage Format (gdouble): + * + * 63 62 52 51 32 31 0 + * +--------+----------------+----------------+ +---------------+ + * | s 1bit | e[62:52] 11bit | f[51:32] 20bit | | f[31:0] 32bit | + * +--------+----------------+----------------+ +---------------+ + * B0--------------->B1---------->B2--->B3----> B4->B5->B6->B7-> + */ +/* subtract from biased_exponent to form base2 exponent (normal numbers) */ +typedef union _GDoubleIEEE754 GDoubleIEEE754; +typedef union _GFloatIEEE754 GFloatIEEE754; +#define G_IEEE754_FLOAT_BIAS (127) +#define G_IEEE754_DOUBLE_BIAS (1023) +/* multiply with base2 exponent to get base10 exponent (normal numbers) */ +#define G_LOG_2_BASE_10 (0.30102999566398119521) +#if G_BYTE_ORDER == G_LITTLE_ENDIAN +union _GFloatIEEE754 +{ + gfloat v_float; + struct { + guint mantissa : 23; + guint biased_exponent : 8; + guint sign : 1; + } mpn; +}; +union _GDoubleIEEE754 +{ + gdouble v_double; + struct { + guint mantissa_low : 32; + guint mantissa_high : 20; + guint biased_exponent : 11; + guint sign : 1; + } mpn; +}; +#elif G_BYTE_ORDER == G_BIG_ENDIAN +union _GFloatIEEE754 +{ + gfloat v_float; + struct { + guint sign : 1; + guint biased_exponent : 8; + guint mantissa : 23; + } mpn; +}; +union _GDoubleIEEE754 +{ + gdouble v_double; + struct { + guint sign : 1; + guint biased_exponent : 11; + guint mantissa_high : 20; + guint mantissa_low : 32; + } mpn; +}; +#else /* !G_LITTLE_ENDIAN && !G_BIG_ENDIAN */ +#error unknown ENDIAN type +#endif /* !G_LITTLE_ENDIAN && !G_BIG_ENDIAN */ + +typedef struct _GTimeVal GTimeVal GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime); + +struct _GTimeVal +{ + glong tv_sec; + glong tv_usec; +} GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime); + +typedef gint grefcount; +typedef gint gatomicrefcount; /* should be accessed only using atomics */ + +G_END_DECLS + +#endif /* __G_TYPES_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gunicode.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gunicode.h new file mode 100644 index 0000000..85b3e09 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gunicode.h @@ -0,0 +1,974 @@ +/* gunicode.h - Unicode manipulation functions + * + * Copyright (C) 1999, 2000 Tom Tromey + * Copyright 2000, 2005 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef __G_UNICODE_H__ +#define __G_UNICODE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +/** + * gunichar: + * + * A type which can hold any UTF-32 or UCS-4 character code, + * also known as a Unicode code point. + * + * If you want to produce the UTF-8 representation of a #gunichar, + * use g_ucs4_to_utf8(). See also g_utf8_to_ucs4() for the reverse + * process. + * + * To print/scan values of this type as integer, use + * %G_GINT32_MODIFIER and/or %G_GUINT32_FORMAT. + * + * The notation to express a Unicode code point in running text is + * as a hexadecimal number with four to six digits and uppercase + * letters, prefixed by the string "U+". Leading zeros are omitted, + * unless the code point would have fewer than four hexadecimal digits. + * For example, "U+0041 LATIN CAPITAL LETTER A". To print a code point + * in the U+-notation, use the format string "U+\%04"G_GINT32_FORMAT"X". + * To scan, use the format string "U+\%06"G_GINT32_FORMAT"X". + * + * |[ + * gunichar c; + * sscanf ("U+0041", "U+%06"G_GINT32_FORMAT"X", &c) + * g_print ("Read U+%04"G_GINT32_FORMAT"X", c); + * ]| + */ +typedef guint32 gunichar; + +/** + * gunichar2: + * + * A type which can hold any UTF-16 code + * pointUTF-16 also has so called + * surrogate pairs to encode characters beyond + * the BMP as pairs of 16bit numbers. Surrogate pairs cannot be stored + * in a single gunichar2 field, but all GLib functions accepting gunichar2 + * arrays will correctly interpret surrogate pairs.. + * + * To print/scan values of this type to/from text you need to convert + * to/from UTF-8, using g_utf16_to_utf8()/g_utf8_to_utf16(). + * + * To print/scan values of this type as integer, use + * %G_GINT16_MODIFIER and/or %G_GUINT16_FORMAT. + */ +typedef guint16 gunichar2; + +/** + * GUnicodeType: + * @G_UNICODE_CONTROL: General category "Other, Control" (Cc) + * @G_UNICODE_FORMAT: General category "Other, Format" (Cf) + * @G_UNICODE_UNASSIGNED: General category "Other, Not Assigned" (Cn) + * @G_UNICODE_PRIVATE_USE: General category "Other, Private Use" (Co) + * @G_UNICODE_SURROGATE: General category "Other, Surrogate" (Cs) + * @G_UNICODE_LOWERCASE_LETTER: General category "Letter, Lowercase" (Ll) + * @G_UNICODE_MODIFIER_LETTER: General category "Letter, Modifier" (Lm) + * @G_UNICODE_OTHER_LETTER: General category "Letter, Other" (Lo) + * @G_UNICODE_TITLECASE_LETTER: General category "Letter, Titlecase" (Lt) + * @G_UNICODE_UPPERCASE_LETTER: General category "Letter, Uppercase" (Lu) + * @G_UNICODE_SPACING_MARK: General category "Mark, Spacing" (Mc) + * @G_UNICODE_ENCLOSING_MARK: General category "Mark, Enclosing" (Me) + * @G_UNICODE_NON_SPACING_MARK: General category "Mark, Nonspacing" (Mn) + * @G_UNICODE_DECIMAL_NUMBER: General category "Number, Decimal Digit" (Nd) + * @G_UNICODE_LETTER_NUMBER: General category "Number, Letter" (Nl) + * @G_UNICODE_OTHER_NUMBER: General category "Number, Other" (No) + * @G_UNICODE_CONNECT_PUNCTUATION: General category "Punctuation, Connector" (Pc) + * @G_UNICODE_DASH_PUNCTUATION: General category "Punctuation, Dash" (Pd) + * @G_UNICODE_CLOSE_PUNCTUATION: General category "Punctuation, Close" (Pe) + * @G_UNICODE_FINAL_PUNCTUATION: General category "Punctuation, Final quote" (Pf) + * @G_UNICODE_INITIAL_PUNCTUATION: General category "Punctuation, Initial quote" (Pi) + * @G_UNICODE_OTHER_PUNCTUATION: General category "Punctuation, Other" (Po) + * @G_UNICODE_OPEN_PUNCTUATION: General category "Punctuation, Open" (Ps) + * @G_UNICODE_CURRENCY_SYMBOL: General category "Symbol, Currency" (Sc) + * @G_UNICODE_MODIFIER_SYMBOL: General category "Symbol, Modifier" (Sk) + * @G_UNICODE_MATH_SYMBOL: General category "Symbol, Math" (Sm) + * @G_UNICODE_OTHER_SYMBOL: General category "Symbol, Other" (So) + * @G_UNICODE_LINE_SEPARATOR: General category "Separator, Line" (Zl) + * @G_UNICODE_PARAGRAPH_SEPARATOR: General category "Separator, Paragraph" (Zp) + * @G_UNICODE_SPACE_SEPARATOR: General category "Separator, Space" (Zs) + * + * These are the possible character classifications from the + * Unicode specification. + * See [Unicode Character Database](http://www.unicode.org/reports/tr44/#General_Category_Values). + */ +typedef enum +{ + G_UNICODE_CONTROL, + G_UNICODE_FORMAT, + G_UNICODE_UNASSIGNED, + G_UNICODE_PRIVATE_USE, + G_UNICODE_SURROGATE, + G_UNICODE_LOWERCASE_LETTER, + G_UNICODE_MODIFIER_LETTER, + G_UNICODE_OTHER_LETTER, + G_UNICODE_TITLECASE_LETTER, + G_UNICODE_UPPERCASE_LETTER, + G_UNICODE_SPACING_MARK, + G_UNICODE_ENCLOSING_MARK, + G_UNICODE_NON_SPACING_MARK, + G_UNICODE_DECIMAL_NUMBER, + G_UNICODE_LETTER_NUMBER, + G_UNICODE_OTHER_NUMBER, + G_UNICODE_CONNECT_PUNCTUATION, + G_UNICODE_DASH_PUNCTUATION, + G_UNICODE_CLOSE_PUNCTUATION, + G_UNICODE_FINAL_PUNCTUATION, + G_UNICODE_INITIAL_PUNCTUATION, + G_UNICODE_OTHER_PUNCTUATION, + G_UNICODE_OPEN_PUNCTUATION, + G_UNICODE_CURRENCY_SYMBOL, + G_UNICODE_MODIFIER_SYMBOL, + G_UNICODE_MATH_SYMBOL, + G_UNICODE_OTHER_SYMBOL, + G_UNICODE_LINE_SEPARATOR, + G_UNICODE_PARAGRAPH_SEPARATOR, + G_UNICODE_SPACE_SEPARATOR +} GUnicodeType; + +/** + * G_UNICODE_COMBINING_MARK: + * + * Older name for %G_UNICODE_SPACING_MARK. + * + * Deprecated: 2.30: Use %G_UNICODE_SPACING_MARK. + */ +#define G_UNICODE_COMBINING_MARK G_UNICODE_SPACING_MARK GLIB_DEPRECATED_MACRO_IN_2_30_FOR(G_UNICODE_SPACING_MARK) + +/** + * GUnicodeBreakType: + * @G_UNICODE_BREAK_MANDATORY: Mandatory Break (BK) + * @G_UNICODE_BREAK_CARRIAGE_RETURN: Carriage Return (CR) + * @G_UNICODE_BREAK_LINE_FEED: Line Feed (LF) + * @G_UNICODE_BREAK_COMBINING_MARK: Attached Characters and Combining Marks (CM) + * @G_UNICODE_BREAK_SURROGATE: Surrogates (SG) + * @G_UNICODE_BREAK_ZERO_WIDTH_SPACE: Zero Width Space (ZW) + * @G_UNICODE_BREAK_INSEPARABLE: Inseparable (IN) + * @G_UNICODE_BREAK_NON_BREAKING_GLUE: Non-breaking ("Glue") (GL) + * @G_UNICODE_BREAK_CONTINGENT: Contingent Break Opportunity (CB) + * @G_UNICODE_BREAK_SPACE: Space (SP) + * @G_UNICODE_BREAK_AFTER: Break Opportunity After (BA) + * @G_UNICODE_BREAK_BEFORE: Break Opportunity Before (BB) + * @G_UNICODE_BREAK_BEFORE_AND_AFTER: Break Opportunity Before and After (B2) + * @G_UNICODE_BREAK_HYPHEN: Hyphen (HY) + * @G_UNICODE_BREAK_NON_STARTER: Nonstarter (NS) + * @G_UNICODE_BREAK_OPEN_PUNCTUATION: Opening Punctuation (OP) + * @G_UNICODE_BREAK_CLOSE_PUNCTUATION: Closing Punctuation (CL) + * @G_UNICODE_BREAK_QUOTATION: Ambiguous Quotation (QU) + * @G_UNICODE_BREAK_EXCLAMATION: Exclamation/Interrogation (EX) + * @G_UNICODE_BREAK_IDEOGRAPHIC: Ideographic (ID) + * @G_UNICODE_BREAK_NUMERIC: Numeric (NU) + * @G_UNICODE_BREAK_INFIX_SEPARATOR: Infix Separator (Numeric) (IS) + * @G_UNICODE_BREAK_SYMBOL: Symbols Allowing Break After (SY) + * @G_UNICODE_BREAK_ALPHABETIC: Ordinary Alphabetic and Symbol Characters (AL) + * @G_UNICODE_BREAK_PREFIX: Prefix (Numeric) (PR) + * @G_UNICODE_BREAK_POSTFIX: Postfix (Numeric) (PO) + * @G_UNICODE_BREAK_COMPLEX_CONTEXT: Complex Content Dependent (South East Asian) (SA) + * @G_UNICODE_BREAK_AMBIGUOUS: Ambiguous (Alphabetic or Ideographic) (AI) + * @G_UNICODE_BREAK_UNKNOWN: Unknown (XX) + * @G_UNICODE_BREAK_NEXT_LINE: Next Line (NL) + * @G_UNICODE_BREAK_WORD_JOINER: Word Joiner (WJ) + * @G_UNICODE_BREAK_HANGUL_L_JAMO: Hangul L Jamo (JL) + * @G_UNICODE_BREAK_HANGUL_V_JAMO: Hangul V Jamo (JV) + * @G_UNICODE_BREAK_HANGUL_T_JAMO: Hangul T Jamo (JT) + * @G_UNICODE_BREAK_HANGUL_LV_SYLLABLE: Hangul LV Syllable (H2) + * @G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE: Hangul LVT Syllable (H3) + * @G_UNICODE_BREAK_CLOSE_PARANTHESIS: Closing Parenthesis (CP). Since 2.28. Deprecated: 2.70: Use %G_UNICODE_BREAK_CLOSE_PARENTHESIS instead. + * @G_UNICODE_BREAK_CLOSE_PARENTHESIS: Closing Parenthesis (CP). Since 2.70 + * @G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER: Conditional Japanese Starter (CJ). Since: 2.32 + * @G_UNICODE_BREAK_HEBREW_LETTER: Hebrew Letter (HL). Since: 2.32 + * @G_UNICODE_BREAK_REGIONAL_INDICATOR: Regional Indicator (RI). Since: 2.36 + * @G_UNICODE_BREAK_EMOJI_BASE: Emoji Base (EB). Since: 2.50 + * @G_UNICODE_BREAK_EMOJI_MODIFIER: Emoji Modifier (EM). Since: 2.50 + * @G_UNICODE_BREAK_ZERO_WIDTH_JOINER: Zero Width Joiner (ZWJ). Since: 2.50 + * + * These are the possible line break classifications. + * + * Since new unicode versions may add new types here, applications should be ready + * to handle unknown values. They may be regarded as %G_UNICODE_BREAK_UNKNOWN. + * + * See [Unicode Line Breaking Algorithm](https://www.unicode.org/reports/tr14/). + */ +typedef enum +{ + G_UNICODE_BREAK_MANDATORY, + G_UNICODE_BREAK_CARRIAGE_RETURN, + G_UNICODE_BREAK_LINE_FEED, + G_UNICODE_BREAK_COMBINING_MARK, + G_UNICODE_BREAK_SURROGATE, + G_UNICODE_BREAK_ZERO_WIDTH_SPACE, + G_UNICODE_BREAK_INSEPARABLE, + G_UNICODE_BREAK_NON_BREAKING_GLUE, + G_UNICODE_BREAK_CONTINGENT, + G_UNICODE_BREAK_SPACE, + G_UNICODE_BREAK_AFTER, + G_UNICODE_BREAK_BEFORE, + G_UNICODE_BREAK_BEFORE_AND_AFTER, + G_UNICODE_BREAK_HYPHEN, + G_UNICODE_BREAK_NON_STARTER, + G_UNICODE_BREAK_OPEN_PUNCTUATION, + G_UNICODE_BREAK_CLOSE_PUNCTUATION, + G_UNICODE_BREAK_QUOTATION, + G_UNICODE_BREAK_EXCLAMATION, + G_UNICODE_BREAK_IDEOGRAPHIC, + G_UNICODE_BREAK_NUMERIC, + G_UNICODE_BREAK_INFIX_SEPARATOR, + G_UNICODE_BREAK_SYMBOL, + G_UNICODE_BREAK_ALPHABETIC, + G_UNICODE_BREAK_PREFIX, + G_UNICODE_BREAK_POSTFIX, + G_UNICODE_BREAK_COMPLEX_CONTEXT, + G_UNICODE_BREAK_AMBIGUOUS, + G_UNICODE_BREAK_UNKNOWN, + G_UNICODE_BREAK_NEXT_LINE, + G_UNICODE_BREAK_WORD_JOINER, + G_UNICODE_BREAK_HANGUL_L_JAMO, + G_UNICODE_BREAK_HANGUL_V_JAMO, + G_UNICODE_BREAK_HANGUL_T_JAMO, + G_UNICODE_BREAK_HANGUL_LV_SYLLABLE, + G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE, + G_UNICODE_BREAK_CLOSE_PARANTHESIS, + G_UNICODE_BREAK_CLOSE_PARENTHESIS GLIB_AVAILABLE_ENUMERATOR_IN_2_70 = G_UNICODE_BREAK_CLOSE_PARANTHESIS, + G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER, + G_UNICODE_BREAK_HEBREW_LETTER, + G_UNICODE_BREAK_REGIONAL_INDICATOR, + G_UNICODE_BREAK_EMOJI_BASE, + G_UNICODE_BREAK_EMOJI_MODIFIER, + G_UNICODE_BREAK_ZERO_WIDTH_JOINER +} GUnicodeBreakType; + +/** + * GUnicodeScript: + * @G_UNICODE_SCRIPT_INVALID_CODE: + * a value never returned from g_unichar_get_script() + * @G_UNICODE_SCRIPT_COMMON: a character used by multiple different scripts + * @G_UNICODE_SCRIPT_INHERITED: a mark glyph that takes its script from the + * base glyph to which it is attached + * @G_UNICODE_SCRIPT_ARABIC: Arabic + * @G_UNICODE_SCRIPT_ARMENIAN: Armenian + * @G_UNICODE_SCRIPT_BENGALI: Bengali + * @G_UNICODE_SCRIPT_BOPOMOFO: Bopomofo + * @G_UNICODE_SCRIPT_CHEROKEE: Cherokee + * @G_UNICODE_SCRIPT_COPTIC: Coptic + * @G_UNICODE_SCRIPT_CYRILLIC: Cyrillic + * @G_UNICODE_SCRIPT_DESERET: Deseret + * @G_UNICODE_SCRIPT_DEVANAGARI: Devanagari + * @G_UNICODE_SCRIPT_ETHIOPIC: Ethiopic + * @G_UNICODE_SCRIPT_GEORGIAN: Georgian + * @G_UNICODE_SCRIPT_GOTHIC: Gothic + * @G_UNICODE_SCRIPT_GREEK: Greek + * @G_UNICODE_SCRIPT_GUJARATI: Gujarati + * @G_UNICODE_SCRIPT_GURMUKHI: Gurmukhi + * @G_UNICODE_SCRIPT_HAN: Han + * @G_UNICODE_SCRIPT_HANGUL: Hangul + * @G_UNICODE_SCRIPT_HEBREW: Hebrew + * @G_UNICODE_SCRIPT_HIRAGANA: Hiragana + * @G_UNICODE_SCRIPT_KANNADA: Kannada + * @G_UNICODE_SCRIPT_KATAKANA: Katakana + * @G_UNICODE_SCRIPT_KHMER: Khmer + * @G_UNICODE_SCRIPT_LAO: Lao + * @G_UNICODE_SCRIPT_LATIN: Latin + * @G_UNICODE_SCRIPT_MALAYALAM: Malayalam + * @G_UNICODE_SCRIPT_MONGOLIAN: Mongolian + * @G_UNICODE_SCRIPT_MYANMAR: Myanmar + * @G_UNICODE_SCRIPT_OGHAM: Ogham + * @G_UNICODE_SCRIPT_OLD_ITALIC: Old Italic + * @G_UNICODE_SCRIPT_ORIYA: Oriya + * @G_UNICODE_SCRIPT_RUNIC: Runic + * @G_UNICODE_SCRIPT_SINHALA: Sinhala + * @G_UNICODE_SCRIPT_SYRIAC: Syriac + * @G_UNICODE_SCRIPT_TAMIL: Tamil + * @G_UNICODE_SCRIPT_TELUGU: Telugu + * @G_UNICODE_SCRIPT_THAANA: Thaana + * @G_UNICODE_SCRIPT_THAI: Thai + * @G_UNICODE_SCRIPT_TIBETAN: Tibetan + * @G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL: + * Canadian Aboriginal + * @G_UNICODE_SCRIPT_YI: Yi + * @G_UNICODE_SCRIPT_TAGALOG: Tagalog + * @G_UNICODE_SCRIPT_HANUNOO: Hanunoo + * @G_UNICODE_SCRIPT_BUHID: Buhid + * @G_UNICODE_SCRIPT_TAGBANWA: Tagbanwa + * @G_UNICODE_SCRIPT_BRAILLE: Braille + * @G_UNICODE_SCRIPT_CYPRIOT: Cypriot + * @G_UNICODE_SCRIPT_LIMBU: Limbu + * @G_UNICODE_SCRIPT_OSMANYA: Osmanya + * @G_UNICODE_SCRIPT_SHAVIAN: Shavian + * @G_UNICODE_SCRIPT_LINEAR_B: Linear B + * @G_UNICODE_SCRIPT_TAI_LE: Tai Le + * @G_UNICODE_SCRIPT_UGARITIC: Ugaritic + * @G_UNICODE_SCRIPT_NEW_TAI_LUE: + * New Tai Lue + * @G_UNICODE_SCRIPT_BUGINESE: Buginese + * @G_UNICODE_SCRIPT_GLAGOLITIC: Glagolitic + * @G_UNICODE_SCRIPT_TIFINAGH: Tifinagh + * @G_UNICODE_SCRIPT_SYLOTI_NAGRI: + * Syloti Nagri + * @G_UNICODE_SCRIPT_OLD_PERSIAN: + * Old Persian + * @G_UNICODE_SCRIPT_KHAROSHTHI: Kharoshthi + * @G_UNICODE_SCRIPT_UNKNOWN: an unassigned code point + * @G_UNICODE_SCRIPT_BALINESE: Balinese + * @G_UNICODE_SCRIPT_CUNEIFORM: Cuneiform + * @G_UNICODE_SCRIPT_PHOENICIAN: Phoenician + * @G_UNICODE_SCRIPT_PHAGS_PA: Phags-pa + * @G_UNICODE_SCRIPT_NKO: N'Ko + * @G_UNICODE_SCRIPT_KAYAH_LI: Kayah Li. Since 2.16.3 + * @G_UNICODE_SCRIPT_LEPCHA: Lepcha. Since 2.16.3 + * @G_UNICODE_SCRIPT_REJANG: Rejang. Since 2.16.3 + * @G_UNICODE_SCRIPT_SUNDANESE: Sundanese. Since 2.16.3 + * @G_UNICODE_SCRIPT_SAURASHTRA: Saurashtra. Since 2.16.3 + * @G_UNICODE_SCRIPT_CHAM: Cham. Since 2.16.3 + * @G_UNICODE_SCRIPT_OL_CHIKI: Ol Chiki. Since 2.16.3 + * @G_UNICODE_SCRIPT_VAI: Vai. Since 2.16.3 + * @G_UNICODE_SCRIPT_CARIAN: Carian. Since 2.16.3 + * @G_UNICODE_SCRIPT_LYCIAN: Lycian. Since 2.16.3 + * @G_UNICODE_SCRIPT_LYDIAN: Lydian. Since 2.16.3 + * @G_UNICODE_SCRIPT_AVESTAN: Avestan. Since 2.26 + * @G_UNICODE_SCRIPT_BAMUM: Bamum. Since 2.26 + * @G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS: + * Egyptian Hieroglpyhs. Since 2.26 + * @G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC: + * Imperial Aramaic. Since 2.26 + * @G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI: + * Inscriptional Pahlavi. Since 2.26 + * @G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN: + * Inscriptional Parthian. Since 2.26 + * @G_UNICODE_SCRIPT_JAVANESE: Javanese. Since 2.26 + * @G_UNICODE_SCRIPT_KAITHI: Kaithi. Since 2.26 + * @G_UNICODE_SCRIPT_LISU: Lisu. Since 2.26 + * @G_UNICODE_SCRIPT_MEETEI_MAYEK: + * Meetei Mayek. Since 2.26 + * @G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN: + * Old South Arabian. Since 2.26 + * @G_UNICODE_SCRIPT_OLD_TURKIC: Old Turkic. Since 2.28 + * @G_UNICODE_SCRIPT_SAMARITAN: Samaritan. Since 2.26 + * @G_UNICODE_SCRIPT_TAI_THAM: Tai Tham. Since 2.26 + * @G_UNICODE_SCRIPT_TAI_VIET: Tai Viet. Since 2.26 + * @G_UNICODE_SCRIPT_BATAK: Batak. Since 2.28 + * @G_UNICODE_SCRIPT_BRAHMI: Brahmi. Since 2.28 + * @G_UNICODE_SCRIPT_MANDAIC: Mandaic. Since 2.28 + * @G_UNICODE_SCRIPT_CHAKMA: Chakma. Since: 2.32 + * @G_UNICODE_SCRIPT_MEROITIC_CURSIVE: Meroitic Cursive. Since: 2.32 + * @G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS: Meroitic Hieroglyphs. Since: 2.32 + * @G_UNICODE_SCRIPT_MIAO: Miao. Since: 2.32 + * @G_UNICODE_SCRIPT_SHARADA: Sharada. Since: 2.32 + * @G_UNICODE_SCRIPT_SORA_SOMPENG: Sora Sompeng. Since: 2.32 + * @G_UNICODE_SCRIPT_TAKRI: Takri. Since: 2.32 + * @G_UNICODE_SCRIPT_BASSA_VAH: Bassa. Since: 2.42 + * @G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN: Caucasian Albanian. Since: 2.42 + * @G_UNICODE_SCRIPT_DUPLOYAN: Duployan. Since: 2.42 + * @G_UNICODE_SCRIPT_ELBASAN: Elbasan. Since: 2.42 + * @G_UNICODE_SCRIPT_GRANTHA: Grantha. Since: 2.42 + * @G_UNICODE_SCRIPT_KHOJKI: Kjohki. Since: 2.42 + * @G_UNICODE_SCRIPT_KHUDAWADI: Khudawadi, Sindhi. Since: 2.42 + * @G_UNICODE_SCRIPT_LINEAR_A: Linear A. Since: 2.42 + * @G_UNICODE_SCRIPT_MAHAJANI: Mahajani. Since: 2.42 + * @G_UNICODE_SCRIPT_MANICHAEAN: Manichaean. Since: 2.42 + * @G_UNICODE_SCRIPT_MENDE_KIKAKUI: Mende Kikakui. Since: 2.42 + * @G_UNICODE_SCRIPT_MODI: Modi. Since: 2.42 + * @G_UNICODE_SCRIPT_MRO: Mro. Since: 2.42 + * @G_UNICODE_SCRIPT_NABATAEAN: Nabataean. Since: 2.42 + * @G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN: Old North Arabian. Since: 2.42 + * @G_UNICODE_SCRIPT_OLD_PERMIC: Old Permic. Since: 2.42 + * @G_UNICODE_SCRIPT_PAHAWH_HMONG: Pahawh Hmong. Since: 2.42 + * @G_UNICODE_SCRIPT_PALMYRENE: Palmyrene. Since: 2.42 + * @G_UNICODE_SCRIPT_PAU_CIN_HAU: Pau Cin Hau. Since: 2.42 + * @G_UNICODE_SCRIPT_PSALTER_PAHLAVI: Psalter Pahlavi. Since: 2.42 + * @G_UNICODE_SCRIPT_SIDDHAM: Siddham. Since: 2.42 + * @G_UNICODE_SCRIPT_TIRHUTA: Tirhuta. Since: 2.42 + * @G_UNICODE_SCRIPT_WARANG_CITI: Warang Citi. Since: 2.42 + * @G_UNICODE_SCRIPT_AHOM: Ahom. Since: 2.48 + * @G_UNICODE_SCRIPT_ANATOLIAN_HIEROGLYPHS: Anatolian Hieroglyphs. Since: 2.48 + * @G_UNICODE_SCRIPT_HATRAN: Hatran. Since: 2.48 + * @G_UNICODE_SCRIPT_MULTANI: Multani. Since: 2.48 + * @G_UNICODE_SCRIPT_OLD_HUNGARIAN: Old Hungarian. Since: 2.48 + * @G_UNICODE_SCRIPT_SIGNWRITING: Signwriting. Since: 2.48 + * @G_UNICODE_SCRIPT_ADLAM: Adlam. Since: 2.50 + * @G_UNICODE_SCRIPT_BHAIKSUKI: Bhaiksuki. Since: 2.50 + * @G_UNICODE_SCRIPT_MARCHEN: Marchen. Since: 2.50 + * @G_UNICODE_SCRIPT_NEWA: Newa. Since: 2.50 + * @G_UNICODE_SCRIPT_OSAGE: Osage. Since: 2.50 + * @G_UNICODE_SCRIPT_TANGUT: Tangut. Since: 2.50 + * @G_UNICODE_SCRIPT_MASARAM_GONDI: Masaram Gondi. Since: 2.54 + * @G_UNICODE_SCRIPT_NUSHU: Nushu. Since: 2.54 + * @G_UNICODE_SCRIPT_SOYOMBO: Soyombo. Since: 2.54 + * @G_UNICODE_SCRIPT_ZANABAZAR_SQUARE: Zanabazar Square. Since: 2.54 + * @G_UNICODE_SCRIPT_DOGRA: Dogra. Since: 2.58 + * @G_UNICODE_SCRIPT_GUNJALA_GONDI: Gunjala Gondi. Since: 2.58 + * @G_UNICODE_SCRIPT_HANIFI_ROHINGYA: Hanifi Rohingya. Since: 2.58 + * @G_UNICODE_SCRIPT_MAKASAR: Makasar. Since: 2.58 + * @G_UNICODE_SCRIPT_MEDEFAIDRIN: Medefaidrin. Since: 2.58 + * @G_UNICODE_SCRIPT_OLD_SOGDIAN: Old Sogdian. Since: 2.58 + * @G_UNICODE_SCRIPT_SOGDIAN: Sogdian. Since: 2.58 + * @G_UNICODE_SCRIPT_ELYMAIC: Elym. Since: 2.62 + * @G_UNICODE_SCRIPT_NANDINAGARI: Nand. Since: 2.62 + * @G_UNICODE_SCRIPT_NYIAKENG_PUACHUE_HMONG: Rohg. Since: 2.62 + * @G_UNICODE_SCRIPT_WANCHO: Wcho. Since: 2.62 + * @G_UNICODE_SCRIPT_CHORASMIAN: Chorasmian. Since: 2.66 + * @G_UNICODE_SCRIPT_DIVES_AKURU: Dives Akuru. Since: 2.66 + * @G_UNICODE_SCRIPT_KHITAN_SMALL_SCRIPT: Khitan small script. Since: 2.66 + * @G_UNICODE_SCRIPT_YEZIDI: Yezidi. Since: 2.66 + * @G_UNICODE_SCRIPT_CYPRO_MINOAN: Cypro-Minoan. Since: 2.72 + * @G_UNICODE_SCRIPT_OLD_UYGHUR: Old Uyghur. Since: 2.72 + * @G_UNICODE_SCRIPT_TANGSA: Tangsa. Since: 2.72 + * @G_UNICODE_SCRIPT_TOTO: Toto. Since: 2.72 + * @G_UNICODE_SCRIPT_VITHKUQI: Vithkuqi. Since: 2.72 + * @G_UNICODE_SCRIPT_MATH: Mathematical notation. Since: 2.72 + * @G_UNICODE_SCRIPT_KAWI: Kawi. Since 2.74 + * @G_UNICODE_SCRIPT_NAG_MUNDARI: Nag Mundari. Since 2.74 + * + * The #GUnicodeScript enumeration identifies different writing + * systems. The values correspond to the names as defined in the + * Unicode standard. The enumeration has been added in GLib 2.14, + * and is interchangeable with #PangoScript. + * + * Note that new types may be added in the future. Applications + * should be ready to handle unknown values. + * See [Unicode Standard Annex #24: Script names](http://www.unicode.org/reports/tr24/). + */ +typedef enum +{ /* ISO 15924 code */ + G_UNICODE_SCRIPT_INVALID_CODE = -1, + G_UNICODE_SCRIPT_COMMON = 0, /* Zyyy */ + G_UNICODE_SCRIPT_INHERITED, /* Zinh (Qaai) */ + G_UNICODE_SCRIPT_ARABIC, /* Arab */ + G_UNICODE_SCRIPT_ARMENIAN, /* Armn */ + G_UNICODE_SCRIPT_BENGALI, /* Beng */ + G_UNICODE_SCRIPT_BOPOMOFO, /* Bopo */ + G_UNICODE_SCRIPT_CHEROKEE, /* Cher */ + G_UNICODE_SCRIPT_COPTIC, /* Copt (Qaac) */ + G_UNICODE_SCRIPT_CYRILLIC, /* Cyrl (Cyrs) */ + G_UNICODE_SCRIPT_DESERET, /* Dsrt */ + G_UNICODE_SCRIPT_DEVANAGARI, /* Deva */ + G_UNICODE_SCRIPT_ETHIOPIC, /* Ethi */ + G_UNICODE_SCRIPT_GEORGIAN, /* Geor (Geon, Geoa) */ + G_UNICODE_SCRIPT_GOTHIC, /* Goth */ + G_UNICODE_SCRIPT_GREEK, /* Grek */ + G_UNICODE_SCRIPT_GUJARATI, /* Gujr */ + G_UNICODE_SCRIPT_GURMUKHI, /* Guru */ + G_UNICODE_SCRIPT_HAN, /* Hani */ + G_UNICODE_SCRIPT_HANGUL, /* Hang */ + G_UNICODE_SCRIPT_HEBREW, /* Hebr */ + G_UNICODE_SCRIPT_HIRAGANA, /* Hira */ + G_UNICODE_SCRIPT_KANNADA, /* Knda */ + G_UNICODE_SCRIPT_KATAKANA, /* Kana */ + G_UNICODE_SCRIPT_KHMER, /* Khmr */ + G_UNICODE_SCRIPT_LAO, /* Laoo */ + G_UNICODE_SCRIPT_LATIN, /* Latn (Latf, Latg) */ + G_UNICODE_SCRIPT_MALAYALAM, /* Mlym */ + G_UNICODE_SCRIPT_MONGOLIAN, /* Mong */ + G_UNICODE_SCRIPT_MYANMAR, /* Mymr */ + G_UNICODE_SCRIPT_OGHAM, /* Ogam */ + G_UNICODE_SCRIPT_OLD_ITALIC, /* Ital */ + G_UNICODE_SCRIPT_ORIYA, /* Orya */ + G_UNICODE_SCRIPT_RUNIC, /* Runr */ + G_UNICODE_SCRIPT_SINHALA, /* Sinh */ + G_UNICODE_SCRIPT_SYRIAC, /* Syrc (Syrj, Syrn, Syre) */ + G_UNICODE_SCRIPT_TAMIL, /* Taml */ + G_UNICODE_SCRIPT_TELUGU, /* Telu */ + G_UNICODE_SCRIPT_THAANA, /* Thaa */ + G_UNICODE_SCRIPT_THAI, /* Thai */ + G_UNICODE_SCRIPT_TIBETAN, /* Tibt */ + G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */ + G_UNICODE_SCRIPT_YI, /* Yiii */ + G_UNICODE_SCRIPT_TAGALOG, /* Tglg */ + G_UNICODE_SCRIPT_HANUNOO, /* Hano */ + G_UNICODE_SCRIPT_BUHID, /* Buhd */ + G_UNICODE_SCRIPT_TAGBANWA, /* Tagb */ + + /* Unicode-4.0 additions */ + G_UNICODE_SCRIPT_BRAILLE, /* Brai */ + G_UNICODE_SCRIPT_CYPRIOT, /* Cprt */ + G_UNICODE_SCRIPT_LIMBU, /* Limb */ + G_UNICODE_SCRIPT_OSMANYA, /* Osma */ + G_UNICODE_SCRIPT_SHAVIAN, /* Shaw */ + G_UNICODE_SCRIPT_LINEAR_B, /* Linb */ + G_UNICODE_SCRIPT_TAI_LE, /* Tale */ + G_UNICODE_SCRIPT_UGARITIC, /* Ugar */ + + /* Unicode-4.1 additions */ + G_UNICODE_SCRIPT_NEW_TAI_LUE, /* Talu */ + G_UNICODE_SCRIPT_BUGINESE, /* Bugi */ + G_UNICODE_SCRIPT_GLAGOLITIC, /* Glag */ + G_UNICODE_SCRIPT_TIFINAGH, /* Tfng */ + G_UNICODE_SCRIPT_SYLOTI_NAGRI, /* Sylo */ + G_UNICODE_SCRIPT_OLD_PERSIAN, /* Xpeo */ + G_UNICODE_SCRIPT_KHAROSHTHI, /* Khar */ + + /* Unicode-5.0 additions */ + G_UNICODE_SCRIPT_UNKNOWN, /* Zzzz */ + G_UNICODE_SCRIPT_BALINESE, /* Bali */ + G_UNICODE_SCRIPT_CUNEIFORM, /* Xsux */ + G_UNICODE_SCRIPT_PHOENICIAN, /* Phnx */ + G_UNICODE_SCRIPT_PHAGS_PA, /* Phag */ + G_UNICODE_SCRIPT_NKO, /* Nkoo */ + + /* Unicode-5.1 additions */ + G_UNICODE_SCRIPT_KAYAH_LI, /* Kali */ + G_UNICODE_SCRIPT_LEPCHA, /* Lepc */ + G_UNICODE_SCRIPT_REJANG, /* Rjng */ + G_UNICODE_SCRIPT_SUNDANESE, /* Sund */ + G_UNICODE_SCRIPT_SAURASHTRA, /* Saur */ + G_UNICODE_SCRIPT_CHAM, /* Cham */ + G_UNICODE_SCRIPT_OL_CHIKI, /* Olck */ + G_UNICODE_SCRIPT_VAI, /* Vaii */ + G_UNICODE_SCRIPT_CARIAN, /* Cari */ + G_UNICODE_SCRIPT_LYCIAN, /* Lyci */ + G_UNICODE_SCRIPT_LYDIAN, /* Lydi */ + + /* Unicode-5.2 additions */ + G_UNICODE_SCRIPT_AVESTAN, /* Avst */ + G_UNICODE_SCRIPT_BAMUM, /* Bamu */ + G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS, /* Egyp */ + G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC, /* Armi */ + G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI, /* Phli */ + G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN, /* Prti */ + G_UNICODE_SCRIPT_JAVANESE, /* Java */ + G_UNICODE_SCRIPT_KAITHI, /* Kthi */ + G_UNICODE_SCRIPT_LISU, /* Lisu */ + G_UNICODE_SCRIPT_MEETEI_MAYEK, /* Mtei */ + G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN, /* Sarb */ + G_UNICODE_SCRIPT_OLD_TURKIC, /* Orkh */ + G_UNICODE_SCRIPT_SAMARITAN, /* Samr */ + G_UNICODE_SCRIPT_TAI_THAM, /* Lana */ + G_UNICODE_SCRIPT_TAI_VIET, /* Tavt */ + + /* Unicode-6.0 additions */ + G_UNICODE_SCRIPT_BATAK, /* Batk */ + G_UNICODE_SCRIPT_BRAHMI, /* Brah */ + G_UNICODE_SCRIPT_MANDAIC, /* Mand */ + + /* Unicode-6.1 additions */ + G_UNICODE_SCRIPT_CHAKMA, /* Cakm */ + G_UNICODE_SCRIPT_MEROITIC_CURSIVE, /* Merc */ + G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS, /* Mero */ + G_UNICODE_SCRIPT_MIAO, /* Plrd */ + G_UNICODE_SCRIPT_SHARADA, /* Shrd */ + G_UNICODE_SCRIPT_SORA_SOMPENG, /* Sora */ + G_UNICODE_SCRIPT_TAKRI, /* Takr */ + + /* Unicode 7.0 additions */ + G_UNICODE_SCRIPT_BASSA_VAH, /* Bass */ + G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN, /* Aghb */ + G_UNICODE_SCRIPT_DUPLOYAN, /* Dupl */ + G_UNICODE_SCRIPT_ELBASAN, /* Elba */ + G_UNICODE_SCRIPT_GRANTHA, /* Gran */ + G_UNICODE_SCRIPT_KHOJKI, /* Khoj */ + G_UNICODE_SCRIPT_KHUDAWADI, /* Sind */ + G_UNICODE_SCRIPT_LINEAR_A, /* Lina */ + G_UNICODE_SCRIPT_MAHAJANI, /* Mahj */ + G_UNICODE_SCRIPT_MANICHAEAN, /* Mani */ + G_UNICODE_SCRIPT_MENDE_KIKAKUI, /* Mend */ + G_UNICODE_SCRIPT_MODI, /* Modi */ + G_UNICODE_SCRIPT_MRO, /* Mroo */ + G_UNICODE_SCRIPT_NABATAEAN, /* Nbat */ + G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN, /* Narb */ + G_UNICODE_SCRIPT_OLD_PERMIC, /* Perm */ + G_UNICODE_SCRIPT_PAHAWH_HMONG, /* Hmng */ + G_UNICODE_SCRIPT_PALMYRENE, /* Palm */ + G_UNICODE_SCRIPT_PAU_CIN_HAU, /* Pauc */ + G_UNICODE_SCRIPT_PSALTER_PAHLAVI, /* Phlp */ + G_UNICODE_SCRIPT_SIDDHAM, /* Sidd */ + G_UNICODE_SCRIPT_TIRHUTA, /* Tirh */ + G_UNICODE_SCRIPT_WARANG_CITI, /* Wara */ + + /* Unicode 8.0 additions */ + G_UNICODE_SCRIPT_AHOM, /* Ahom */ + G_UNICODE_SCRIPT_ANATOLIAN_HIEROGLYPHS, /* Hluw */ + G_UNICODE_SCRIPT_HATRAN, /* Hatr */ + G_UNICODE_SCRIPT_MULTANI, /* Mult */ + G_UNICODE_SCRIPT_OLD_HUNGARIAN, /* Hung */ + G_UNICODE_SCRIPT_SIGNWRITING, /* Sgnw */ + + /* Unicode 9.0 additions */ + G_UNICODE_SCRIPT_ADLAM, /* Adlm */ + G_UNICODE_SCRIPT_BHAIKSUKI, /* Bhks */ + G_UNICODE_SCRIPT_MARCHEN, /* Marc */ + G_UNICODE_SCRIPT_NEWA, /* Newa */ + G_UNICODE_SCRIPT_OSAGE, /* Osge */ + G_UNICODE_SCRIPT_TANGUT, /* Tang */ + + /* Unicode 10.0 additions */ + G_UNICODE_SCRIPT_MASARAM_GONDI, /* Gonm */ + G_UNICODE_SCRIPT_NUSHU, /* Nshu */ + G_UNICODE_SCRIPT_SOYOMBO, /* Soyo */ + G_UNICODE_SCRIPT_ZANABAZAR_SQUARE, /* Zanb */ + + /* Unicode 11.0 additions */ + G_UNICODE_SCRIPT_DOGRA, /* Dogr */ + G_UNICODE_SCRIPT_GUNJALA_GONDI, /* Gong */ + G_UNICODE_SCRIPT_HANIFI_ROHINGYA, /* Rohg */ + G_UNICODE_SCRIPT_MAKASAR, /* Maka */ + G_UNICODE_SCRIPT_MEDEFAIDRIN, /* Medf */ + G_UNICODE_SCRIPT_OLD_SOGDIAN, /* Sogo */ + G_UNICODE_SCRIPT_SOGDIAN, /* Sogd */ + + /* Unicode 12.0 additions */ + G_UNICODE_SCRIPT_ELYMAIC, /* Elym */ + G_UNICODE_SCRIPT_NANDINAGARI, /* Nand */ + G_UNICODE_SCRIPT_NYIAKENG_PUACHUE_HMONG, /* Rohg */ + G_UNICODE_SCRIPT_WANCHO, /* Wcho */ + + /* Unicode 13.0 additions */ + G_UNICODE_SCRIPT_CHORASMIAN, /* Chrs */ + G_UNICODE_SCRIPT_DIVES_AKURU, /* Diak */ + G_UNICODE_SCRIPT_KHITAN_SMALL_SCRIPT, /* Kits */ + G_UNICODE_SCRIPT_YEZIDI, /* Yezi */ + + /* Unicode 14.0 additions */ + G_UNICODE_SCRIPT_CYPRO_MINOAN, /* Cpmn */ + G_UNICODE_SCRIPT_OLD_UYGHUR, /* Ougr */ + G_UNICODE_SCRIPT_TANGSA, /* Tnsa */ + G_UNICODE_SCRIPT_TOTO, /* Toto */ + G_UNICODE_SCRIPT_VITHKUQI, /* Vith */ + + /* not really a Unicode script, but part of ISO 15924 */ + G_UNICODE_SCRIPT_MATH, /* Zmth */ + + /* Unicode 15.0 additions */ + G_UNICODE_SCRIPT_KAWI GLIB_AVAILABLE_ENUMERATOR_IN_2_74, /* Kawi */ + G_UNICODE_SCRIPT_NAG_MUNDARI GLIB_AVAILABLE_ENUMERATOR_IN_2_74, /* Nag Mundari */ +} GUnicodeScript; + +GLIB_AVAILABLE_IN_ALL +guint32 g_unicode_script_to_iso15924 (GUnicodeScript script); +GLIB_AVAILABLE_IN_ALL +GUnicodeScript g_unicode_script_from_iso15924 (guint32 iso15924); + +/* These are all analogs of the functions. + */ +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isalnum (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isalpha (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_iscntrl (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isdigit (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isgraph (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_islower (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isprint (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_ispunct (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isspace (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isupper (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isxdigit (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_istitle (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_isdefined (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_iswide (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_iswide_cjk(gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_iszerowidth(gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_ismark (gunichar c) G_GNUC_CONST; + +/* More functions. These convert between the three cases. + * See the Unicode book to understand title case. */ +GLIB_AVAILABLE_IN_ALL +gunichar g_unichar_toupper (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gunichar g_unichar_tolower (gunichar c) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL +gunichar g_unichar_totitle (gunichar c) G_GNUC_CONST; + +/* If C is a digit (according to 'g_unichar_isdigit'), then return its + numeric value. Otherwise return -1. */ +GLIB_AVAILABLE_IN_ALL +gint g_unichar_digit_value (gunichar c) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gint g_unichar_xdigit_value (gunichar c) G_GNUC_CONST; + +/* Return the Unicode character type of a given character. */ +GLIB_AVAILABLE_IN_ALL +GUnicodeType g_unichar_type (gunichar c) G_GNUC_CONST; + +/* Return the line break property for a given character */ +GLIB_AVAILABLE_IN_ALL +GUnicodeBreakType g_unichar_break_type (gunichar c) G_GNUC_CONST; + +/* Returns the combining class for a given character */ +GLIB_AVAILABLE_IN_ALL +gint g_unichar_combining_class (gunichar uc) G_GNUC_CONST; + +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_get_mirror_char (gunichar ch, + gunichar *mirrored_ch); + +GLIB_AVAILABLE_IN_ALL +GUnicodeScript g_unichar_get_script (gunichar ch) G_GNUC_CONST; + +/* Validate a Unicode character */ +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_validate (gunichar ch) G_GNUC_CONST; + +/* Pairwise canonical compose/decompose */ +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_compose (gunichar a, + gunichar b, + gunichar *ch); +GLIB_AVAILABLE_IN_ALL +gboolean g_unichar_decompose (gunichar ch, + gunichar *a, + gunichar *b); + +GLIB_AVAILABLE_IN_ALL +gsize g_unichar_fully_decompose (gunichar ch, + gboolean compat, + gunichar *result, + gsize result_len); + +/** + * G_UNICHAR_MAX_DECOMPOSITION_LENGTH: + * + * The maximum length (in codepoints) of a compatibility or canonical + * decomposition of a single Unicode character. + * + * This is as defined by Unicode 6.1. + * + * Since: 2.32 + */ +#define G_UNICHAR_MAX_DECOMPOSITION_LENGTH 18 /* codepoints */ + +/* Compute canonical ordering of a string in-place. This rearranges + decomposed characters in the string according to their combining + classes. See the Unicode manual for more information. */ +GLIB_AVAILABLE_IN_ALL +void g_unicode_canonical_ordering (gunichar *string, + gsize len); + + +GLIB_DEPRECATED_IN_2_30 +gunichar *g_unicode_canonical_decomposition (gunichar ch, + gsize *result_len) G_GNUC_MALLOC; + +/* Array of skip-bytes-per-initial character. + */ +GLIB_VAR const gchar * const g_utf8_skip; + +/** + * g_utf8_next_char: + * @p: Pointer to the start of a valid UTF-8 character + * + * Skips to the next character in a UTF-8 string. + * + * The string must be valid; this macro is as fast as possible, and has + * no error-checking. + * + * You would use this macro to iterate over a string character by character. + * + * The macro returns the start of the next UTF-8 character. + * + * Before using this macro, use g_utf8_validate() to validate strings + * that may contain invalid UTF-8. + */ +#define g_utf8_next_char(p) (char *)((p) + g_utf8_skip[*(const guchar *)(p)]) + +GLIB_AVAILABLE_IN_ALL +gunichar g_utf8_get_char (const gchar *p) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +gunichar g_utf8_get_char_validated (const gchar *p, + gssize max_len) G_GNUC_PURE; + +GLIB_AVAILABLE_IN_ALL +gchar* g_utf8_offset_to_pointer (const gchar *str, + glong offset) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +glong g_utf8_pointer_to_offset (const gchar *str, + const gchar *pos) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +gchar* g_utf8_prev_char (const gchar *p) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +gchar* g_utf8_find_next_char (const gchar *p, + const gchar *end) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +gchar* g_utf8_find_prev_char (const gchar *str, + const gchar *p) G_GNUC_PURE; + +GLIB_AVAILABLE_IN_ALL +glong g_utf8_strlen (const gchar *p, + gssize max) G_GNUC_PURE; + +GLIB_AVAILABLE_IN_2_30 +gchar *g_utf8_substring (const gchar *str, + glong start_pos, + glong end_pos) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gchar *g_utf8_strncpy (gchar *dest, + const gchar *src, + gsize n); + +GLIB_AVAILABLE_IN_2_78 +gchar *g_utf8_truncate_middle (const gchar *string, + gsize truncate_length); + +/* Find the UTF-8 character corresponding to ch, in string p. These + functions are equivalants to strchr and strrchr */ +GLIB_AVAILABLE_IN_ALL +gchar* g_utf8_strchr (const gchar *p, + gssize len, + gunichar c); +GLIB_AVAILABLE_IN_ALL +gchar* g_utf8_strrchr (const gchar *p, + gssize len, + gunichar c); +GLIB_AVAILABLE_IN_ALL +gchar* g_utf8_strreverse (const gchar *str, + gssize len); + +GLIB_AVAILABLE_IN_ALL +gunichar2 *g_utf8_to_utf16 (const gchar *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gunichar * g_utf8_to_ucs4 (const gchar *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gunichar * g_utf8_to_ucs4_fast (const gchar *str, + glong len, + glong *items_written) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gunichar * g_utf16_to_ucs4 (const gunichar2 *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_utf16_to_utf8 (const gunichar2 *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gunichar2 *g_ucs4_to_utf16 (const gunichar *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar* g_ucs4_to_utf8 (const gunichar *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gint g_unichar_to_utf8 (gunichar c, + gchar *outbuf); + +GLIB_AVAILABLE_IN_ALL +gboolean g_utf8_validate (const gchar *str, + gssize max_len, + const gchar **end); +GLIB_AVAILABLE_IN_2_60 +gboolean g_utf8_validate_len (const gchar *str, + gsize max_len, + const gchar **end); + +GLIB_AVAILABLE_IN_ALL +gchar *g_utf8_strup (const gchar *str, + gssize len) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar *g_utf8_strdown (const gchar *str, + gssize len) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar *g_utf8_casefold (const gchar *str, + gssize len) G_GNUC_MALLOC; + +/** + * GNormalizeMode: + * @G_NORMALIZE_DEFAULT: standardize differences that do not affect the + * text content, such as the above-mentioned accent representation + * @G_NORMALIZE_NFD: another name for %G_NORMALIZE_DEFAULT + * @G_NORMALIZE_DEFAULT_COMPOSE: like %G_NORMALIZE_DEFAULT, but with + * composed forms rather than a maximally decomposed form + * @G_NORMALIZE_NFC: another name for %G_NORMALIZE_DEFAULT_COMPOSE + * @G_NORMALIZE_ALL: beyond %G_NORMALIZE_DEFAULT also standardize the + * "compatibility" characters in Unicode, such as SUPERSCRIPT THREE + * to the standard forms (in this case DIGIT THREE). Formatting + * information may be lost but for most text operations such + * characters should be considered the same + * @G_NORMALIZE_NFKD: another name for %G_NORMALIZE_ALL + * @G_NORMALIZE_ALL_COMPOSE: like %G_NORMALIZE_ALL, but with composed + * forms rather than a maximally decomposed form + * @G_NORMALIZE_NFKC: another name for %G_NORMALIZE_ALL_COMPOSE + * + * Defines how a Unicode string is transformed in a canonical + * form, standardizing such issues as whether a character with + * an accent is represented as a base character and combining + * accent or as a single precomposed character. Unicode strings + * should generally be normalized before comparing them. + */ +typedef enum { + G_NORMALIZE_DEFAULT, + G_NORMALIZE_NFD = G_NORMALIZE_DEFAULT, + G_NORMALIZE_DEFAULT_COMPOSE, + G_NORMALIZE_NFC = G_NORMALIZE_DEFAULT_COMPOSE, + G_NORMALIZE_ALL, + G_NORMALIZE_NFKD = G_NORMALIZE_ALL, + G_NORMALIZE_ALL_COMPOSE, + G_NORMALIZE_NFKC = G_NORMALIZE_ALL_COMPOSE +} GNormalizeMode; + +GLIB_AVAILABLE_IN_ALL +gchar *g_utf8_normalize (const gchar *str, + gssize len, + GNormalizeMode mode) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_ALL +gint g_utf8_collate (const gchar *str1, + const gchar *str2) G_GNUC_PURE; +GLIB_AVAILABLE_IN_ALL +gchar *g_utf8_collate_key (const gchar *str, + gssize len) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_ALL +gchar *g_utf8_collate_key_for_filename (const gchar *str, + gssize len) G_GNUC_MALLOC; + +GLIB_AVAILABLE_IN_2_52 +gchar *g_utf8_make_valid (const gchar *str, + gssize len) G_GNUC_MALLOC; + +G_END_DECLS + +#endif /* __G_UNICODE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/guri.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/guri.h new file mode 100644 index 0000000..5989eab --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/guri.h @@ -0,0 +1,420 @@ +/* GLIB - Library of useful routines for C programming + * Copyright © 2020 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see + * . + */ + +#pragma once + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + +typedef struct _GUri GUri; + +GLIB_AVAILABLE_IN_2_66 +GUri * g_uri_ref (GUri *uri); +GLIB_AVAILABLE_IN_2_66 +void g_uri_unref (GUri *uri); + +/** + * GUriFlags: + * @G_URI_FLAGS_NONE: No flags set. + * @G_URI_FLAGS_PARSE_RELAXED: Parse the URI more relaxedly than the + * [RFC 3986](https://tools.ietf.org/html/rfc3986) grammar specifies, + * fixing up or ignoring common mistakes in URIs coming from external + * sources. This is also needed for some obscure URI schemes where `;` + * separates the host from the path. Don’t use this flag unless you need to. + * @G_URI_FLAGS_HAS_PASSWORD: The userinfo field may contain a password, + * which will be separated from the username by `:`. + * @G_URI_FLAGS_HAS_AUTH_PARAMS: The userinfo may contain additional + * authentication-related parameters, which will be separated from + * the username and/or password by `;`. + * @G_URI_FLAGS_NON_DNS: The host component should not be assumed to be a + * DNS hostname or IP address (for example, for `smb` URIs with NetBIOS + * hostnames). + * @G_URI_FLAGS_ENCODED: When parsing a URI, this indicates that `%`-encoded + * characters in the userinfo, path, query, and fragment fields + * should not be decoded. (And likewise the host field if + * %G_URI_FLAGS_NON_DNS is also set.) When building a URI, it indicates + * that you have already `%`-encoded the components, and so #GUri + * should not do any encoding itself. + * @G_URI_FLAGS_ENCODED_QUERY: Same as %G_URI_FLAGS_ENCODED, for the query + * field only. + * @G_URI_FLAGS_ENCODED_PATH: Same as %G_URI_FLAGS_ENCODED, for the path only. + * @G_URI_FLAGS_ENCODED_FRAGMENT: Same as %G_URI_FLAGS_ENCODED, for the + * fragment only. + * @G_URI_FLAGS_SCHEME_NORMALIZE: A scheme-based normalization will be applied. + * For example, when parsing an HTTP URI changing omitted path to `/` and + * omitted port to `80`; and when building a URI, changing empty path to `/` + * and default port `80`). This only supports a subset of known schemes. (Since: 2.68) + * + * Flags that describe a URI. + * + * When parsing a URI, if you need to choose different flags based on + * the type of URI, you can use g_uri_peek_scheme() on the URI string + * to check the scheme first, and use that to decide what flags to + * parse it with. + * + * Since: 2.66 + */ +GLIB_AVAILABLE_TYPE_IN_2_66 +typedef enum { + G_URI_FLAGS_NONE = 0, + G_URI_FLAGS_PARSE_RELAXED = 1 << 0, + G_URI_FLAGS_HAS_PASSWORD = 1 << 1, + G_URI_FLAGS_HAS_AUTH_PARAMS = 1 << 2, + G_URI_FLAGS_ENCODED = 1 << 3, + G_URI_FLAGS_NON_DNS = 1 << 4, + G_URI_FLAGS_ENCODED_QUERY = 1 << 5, + G_URI_FLAGS_ENCODED_PATH = 1 << 6, + G_URI_FLAGS_ENCODED_FRAGMENT = 1 << 7, + G_URI_FLAGS_SCHEME_NORMALIZE GLIB_AVAILABLE_ENUMERATOR_IN_2_68 = 1 << 8, +} GUriFlags; + +GLIB_AVAILABLE_IN_2_66 +gboolean g_uri_split (const gchar *uri_ref, + GUriFlags flags, + gchar **scheme, + gchar **userinfo, + gchar **host, + gint *port, + gchar **path, + gchar **query, + gchar **fragment, + GError **error); +GLIB_AVAILABLE_IN_2_66 +gboolean g_uri_split_with_user (const gchar *uri_ref, + GUriFlags flags, + gchar **scheme, + gchar **user, + gchar **password, + gchar **auth_params, + gchar **host, + gint *port, + gchar **path, + gchar **query, + gchar **fragment, + GError **error); +GLIB_AVAILABLE_IN_2_66 +gboolean g_uri_split_network (const gchar *uri_string, + GUriFlags flags, + gchar **scheme, + gchar **host, + gint *port, + GError **error); + +GLIB_AVAILABLE_IN_2_66 +gboolean g_uri_is_valid (const gchar *uri_string, + GUriFlags flags, + GError **error); + +GLIB_AVAILABLE_IN_2_66 +gchar * g_uri_join (GUriFlags flags, + const gchar *scheme, + const gchar *userinfo, + const gchar *host, + gint port, + const gchar *path, + const gchar *query, + const gchar *fragment); +GLIB_AVAILABLE_IN_2_66 +gchar * g_uri_join_with_user (GUriFlags flags, + const gchar *scheme, + const gchar *user, + const gchar *password, + const gchar *auth_params, + const gchar *host, + gint port, + const gchar *path, + const gchar *query, + const gchar *fragment); + +GLIB_AVAILABLE_IN_2_66 +GUri * g_uri_parse (const gchar *uri_string, + GUriFlags flags, + GError **error); +GLIB_AVAILABLE_IN_2_66 +GUri * g_uri_parse_relative (GUri *base_uri, + const gchar *uri_ref, + GUriFlags flags, + GError **error); + +GLIB_AVAILABLE_IN_2_66 +gchar * g_uri_resolve_relative (const gchar *base_uri_string, + const gchar *uri_ref, + GUriFlags flags, + GError **error); + +GLIB_AVAILABLE_IN_2_66 +GUri * g_uri_build (GUriFlags flags, + const gchar *scheme, + const gchar *userinfo, + const gchar *host, + gint port, + const gchar *path, + const gchar *query, + const gchar *fragment); +GLIB_AVAILABLE_IN_2_66 +GUri * g_uri_build_with_user (GUriFlags flags, + const gchar *scheme, + const gchar *user, + const gchar *password, + const gchar *auth_params, + const gchar *host, + gint port, + const gchar *path, + const gchar *query, + const gchar *fragment); + +/** + * GUriHideFlags: + * @G_URI_HIDE_NONE: No flags set. + * @G_URI_HIDE_USERINFO: Hide the userinfo. + * @G_URI_HIDE_PASSWORD: Hide the password. + * @G_URI_HIDE_AUTH_PARAMS: Hide the auth_params. + * @G_URI_HIDE_QUERY: Hide the query. + * @G_URI_HIDE_FRAGMENT: Hide the fragment. + * + * Flags describing what parts of the URI to hide in + * g_uri_to_string_partial(). Note that %G_URI_HIDE_PASSWORD and + * %G_URI_HIDE_AUTH_PARAMS will only work if the #GUri was parsed with + * the corresponding flags. + * + * Since: 2.66 + */ +GLIB_AVAILABLE_TYPE_IN_2_66 +typedef enum { + G_URI_HIDE_NONE = 0, + G_URI_HIDE_USERINFO = 1 << 0, + G_URI_HIDE_PASSWORD = 1 << 1, + G_URI_HIDE_AUTH_PARAMS = 1 << 2, + G_URI_HIDE_QUERY = 1 << 3, + G_URI_HIDE_FRAGMENT = 1 << 4, +} GUriHideFlags; + +GLIB_AVAILABLE_IN_2_66 +char * g_uri_to_string (GUri *uri); +GLIB_AVAILABLE_IN_2_66 +char * g_uri_to_string_partial (GUri *uri, + GUriHideFlags flags); + +GLIB_AVAILABLE_IN_2_66 +const gchar *g_uri_get_scheme (GUri *uri); +GLIB_AVAILABLE_IN_2_66 +const gchar *g_uri_get_userinfo (GUri *uri); +GLIB_AVAILABLE_IN_2_66 +const gchar *g_uri_get_user (GUri *uri); +GLIB_AVAILABLE_IN_2_66 +const gchar *g_uri_get_password (GUri *uri); +GLIB_AVAILABLE_IN_2_66 +const gchar *g_uri_get_auth_params (GUri *uri); +GLIB_AVAILABLE_IN_2_66 +const gchar *g_uri_get_host (GUri *uri); +GLIB_AVAILABLE_IN_2_66 +gint g_uri_get_port (GUri *uri); +GLIB_AVAILABLE_IN_2_66 +const gchar *g_uri_get_path (GUri *uri); +GLIB_AVAILABLE_IN_2_66 +const gchar *g_uri_get_query (GUri *uri); +GLIB_AVAILABLE_IN_2_66 +const gchar *g_uri_get_fragment (GUri *uri); +GLIB_AVAILABLE_IN_2_66 +GUriFlags g_uri_get_flags (GUri *uri); + +/** + * GUriParamsFlags: + * @G_URI_PARAMS_NONE: No flags set. + * @G_URI_PARAMS_CASE_INSENSITIVE: Parameter names are case insensitive. + * @G_URI_PARAMS_WWW_FORM: Replace `+` with space character. Only useful for + * URLs on the web, using the `https` or `http` schemas. + * @G_URI_PARAMS_PARSE_RELAXED: See %G_URI_FLAGS_PARSE_RELAXED. + * + * Flags modifying the way parameters are handled by g_uri_parse_params() and + * #GUriParamsIter. + * + * Since: 2.66 + */ +GLIB_AVAILABLE_TYPE_IN_2_66 +typedef enum { + G_URI_PARAMS_NONE = 0, + G_URI_PARAMS_CASE_INSENSITIVE = 1 << 0, + G_URI_PARAMS_WWW_FORM = 1 << 1, + G_URI_PARAMS_PARSE_RELAXED = 1 << 2, +} GUriParamsFlags; + +GLIB_AVAILABLE_IN_2_66 +GHashTable *g_uri_parse_params (const gchar *params, + gssize length, + const gchar *separators, + GUriParamsFlags flags, + GError **error); + +typedef struct _GUriParamsIter GUriParamsIter; + +struct _GUriParamsIter +{ + /*< private >*/ + gint dummy0; + gpointer dummy1; + gpointer dummy2; + guint8 dummy3[256]; +}; + +GLIB_AVAILABLE_IN_2_66 +void g_uri_params_iter_init (GUriParamsIter *iter, + const gchar *params, + gssize length, + const gchar *separators, + GUriParamsFlags flags); + +GLIB_AVAILABLE_IN_2_66 +gboolean g_uri_params_iter_next (GUriParamsIter *iter, + gchar **attribute, + gchar **value, + GError **error); + +/** + * G_URI_ERROR: + * + * Error domain for URI methods. Errors in this domain will be from + * the #GUriError enumeration. See #GError for information on error + * domains. + * + * Since: 2.66 + */ +#define G_URI_ERROR (g_uri_error_quark ()) GLIB_AVAILABLE_MACRO_IN_2_66 +GLIB_AVAILABLE_IN_2_66 +GQuark g_uri_error_quark (void); + +/** + * GUriError: + * @G_URI_ERROR_FAILED: Generic error if no more specific error is available. + * See the error message for details. + * @G_URI_ERROR_BAD_SCHEME: The scheme of a URI could not be parsed. + * @G_URI_ERROR_BAD_USER: The user/userinfo of a URI could not be parsed. + * @G_URI_ERROR_BAD_PASSWORD: The password of a URI could not be parsed. + * @G_URI_ERROR_BAD_AUTH_PARAMS: The authentication parameters of a URI could not be parsed. + * @G_URI_ERROR_BAD_HOST: The host of a URI could not be parsed. + * @G_URI_ERROR_BAD_PORT: The port of a URI could not be parsed. + * @G_URI_ERROR_BAD_PATH: The path of a URI could not be parsed. + * @G_URI_ERROR_BAD_QUERY: The query of a URI could not be parsed. + * @G_URI_ERROR_BAD_FRAGMENT: The fragment of a URI could not be parsed. + * + * Error codes returned by #GUri methods. + * + * Since: 2.66 + */ +typedef enum { + G_URI_ERROR_FAILED, + G_URI_ERROR_BAD_SCHEME, + G_URI_ERROR_BAD_USER, + G_URI_ERROR_BAD_PASSWORD, + G_URI_ERROR_BAD_AUTH_PARAMS, + G_URI_ERROR_BAD_HOST, + G_URI_ERROR_BAD_PORT, + G_URI_ERROR_BAD_PATH, + G_URI_ERROR_BAD_QUERY, + G_URI_ERROR_BAD_FRAGMENT, +} GUriError; + +/** + * G_URI_RESERVED_CHARS_GENERIC_DELIMITERS: + * + * Generic delimiters characters as defined in + * [RFC 3986](https://tools.ietf.org/html/rfc3986). Includes `:/?#[]@`. + * + * Since: 2.16 + **/ +#define G_URI_RESERVED_CHARS_GENERIC_DELIMITERS ":/?#[]@" + +/** + * G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS: + * + * Subcomponent delimiter characters as defined in + * [RFC 3986](https://tools.ietf.org/html/rfc3986). Includes `!$&'()*+,;=`. + * + * Since: 2.16 + **/ +#define G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS "!$&'()*+,;=" + +/** + * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT: + * + * Allowed characters in path elements. Includes `!$&'()*+,;=:@`. + * + * Since: 2.16 + **/ +#define G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS ":@" + +/** + * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH: + * + * Allowed characters in a path. Includes `!$&'()*+,;=:@/`. + * + * Since: 2.16 + **/ +#define G_URI_RESERVED_CHARS_ALLOWED_IN_PATH G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT "/" + +/** + * G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO: + * + * Allowed characters in userinfo as defined in + * [RFC 3986](https://tools.ietf.org/html/rfc3986). Includes `!$&'()*+,;=:`. + * + * Since: 2.16 + **/ +#define G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS ":" + +GLIB_AVAILABLE_IN_ALL +char * g_uri_unescape_string (const char *escaped_string, + const char *illegal_characters); +GLIB_AVAILABLE_IN_ALL +char * g_uri_unescape_segment (const char *escaped_string, + const char *escaped_string_end, + const char *illegal_characters); + +GLIB_AVAILABLE_IN_ALL +char * g_uri_parse_scheme (const char *uri); +GLIB_AVAILABLE_IN_2_66 +const char *g_uri_peek_scheme (const char *uri); + +GLIB_AVAILABLE_IN_ALL +char * g_uri_escape_string (const char *unescaped, + const char *reserved_chars_allowed, + gboolean allow_utf8); + +GLIB_AVAILABLE_IN_2_66 +GBytes * g_uri_unescape_bytes (const char *escaped_string, + gssize length, + const char *illegal_characters, + GError **error); + +GLIB_AVAILABLE_IN_2_66 +char * g_uri_escape_bytes (const guint8 *unescaped, + gsize length, + const char *reserved_chars_allowed); + +G_GNUC_END_IGNORE_DEPRECATIONS + +G_END_DECLS diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gutils.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gutils.h new file mode 100644 index 0000000..efc6914 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gutils.h @@ -0,0 +1,479 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_UTILS_H__ +#define __G_UTILS_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_user_name (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_real_name (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_home_dir (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_tmp_dir (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_host_name (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_prgname (void); +GLIB_AVAILABLE_IN_ALL +void g_set_prgname (const gchar *prgname); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_application_name (void); +GLIB_AVAILABLE_IN_ALL +void g_set_application_name (const gchar *application_name); +GLIB_AVAILABLE_IN_2_64 +gchar * g_get_os_info (const gchar *key_name); + +/** + * G_OS_INFO_KEY_NAME: + * + * A key to get the name of the operating system excluding version information suitable for presentation to the user, e.g. "YoYoOS" + * + * Since: 2.64 + */ +#define G_OS_INFO_KEY_NAME \ + GLIB_AVAILABLE_MACRO_IN_2_64 \ + "NAME" + +/** + * G_OS_INFO_KEY_PRETTY_NAME: + * + * A key to get the name of the operating system in a format suitable for presentation to the user, e.g. "YoYoOS Foo" + * + * Since: 2.64 + */ +#define G_OS_INFO_KEY_PRETTY_NAME \ + GLIB_AVAILABLE_MACRO_IN_2_64 \ + "PRETTY_NAME" + +/** + * G_OS_INFO_KEY_VERSION: + * + * A key to get the operating system version suitable for presentation to the user, e.g. "42 (Foo)" + * + * Since: 2.64 + */ +#define G_OS_INFO_KEY_VERSION \ + GLIB_AVAILABLE_MACRO_IN_2_64 \ + "VERSION" + +/** + * G_OS_INFO_KEY_VERSION_CODENAME: + * + * A key to get a codename identifying the operating system release suitable for processing by scripts or usage in generated filenames, e.g. "foo" + * + * Since: 2.64 + */ +#define G_OS_INFO_KEY_VERSION_CODENAME \ + GLIB_AVAILABLE_MACRO_IN_2_64 \ + "VERSION_CODENAME" + +/** + * G_OS_INFO_KEY_VERSION_ID: + * + * A key to get the version of the operating system suitable for processing by scripts or usage in generated filenames, e.g. "42" + * + * Since: 2.64 + */ +#define G_OS_INFO_KEY_VERSION_ID \ + GLIB_AVAILABLE_MACRO_IN_2_64 \ + "VERSION_ID" + +/** + * G_OS_INFO_KEY_ID: + * + * A key to get an ID identifying the operating system suitable for processing by scripts or usage in generated filenames, e.g. "yoyoos" + * + * Since: 2.64 + */ +#define G_OS_INFO_KEY_ID \ + GLIB_AVAILABLE_MACRO_IN_2_64 \ + "ID" + +/** + * G_OS_INFO_KEY_HOME_URL: + * + * A key to get the homepage for the operating system, e.g. "https://www.yoyo-os.com/" + * + * Since: 2.64 + */ +#define G_OS_INFO_KEY_HOME_URL \ + GLIB_AVAILABLE_MACRO_IN_2_64 \ + "HOME_URL" + +/** + * G_OS_INFO_KEY_DOCUMENTATION_URL: + * + * A key to get the documentation page for the operating system, e.g. "https://docs.yoyo-os.com/" + * + * Since: 2.64 + */ +#define G_OS_INFO_KEY_DOCUMENTATION_URL \ + GLIB_AVAILABLE_MACRO_IN_2_64 \ + "DOCUMENTATION_URL" + +/** + * G_OS_INFO_KEY_SUPPORT_URL: + * + * A key to get the support page for the operating system, e.g. "https://support.yoyo-os.com/" + * + * Since: 2.64 + */ +#define G_OS_INFO_KEY_SUPPORT_URL \ + GLIB_AVAILABLE_MACRO_IN_2_64 \ + "SUPPORT_URL" + +/** + * G_OS_INFO_KEY_BUG_REPORT_URL: + * + * A key to get the bug reporting page for the operating system, e.g. "https://bugs.yoyo-os.com/" + * + * Since: 2.64 + */ +#define G_OS_INFO_KEY_BUG_REPORT_URL \ + GLIB_AVAILABLE_MACRO_IN_2_64 \ + "BUG_REPORT_URL" + +/** + * G_OS_INFO_KEY_PRIVACY_POLICY_URL: + * + * A key to get the privacy policy for the operating system, e.g. "https://privacy.yoyo-os.com/" + * + * Since: 2.64 + */ +#define G_OS_INFO_KEY_PRIVACY_POLICY_URL \ + GLIB_AVAILABLE_MACRO_IN_2_64 \ + "PRIVACY_POLICY_URL" + +GLIB_AVAILABLE_IN_ALL +void g_reload_user_special_dirs_cache (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_user_data_dir (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_user_config_dir (void); +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_user_cache_dir (void); +GLIB_AVAILABLE_IN_2_72 +const gchar * g_get_user_state_dir (void); +GLIB_AVAILABLE_IN_ALL +const gchar * const * g_get_system_data_dirs (void); + +#ifdef G_OS_WIN32 +/* This function is not part of the public GLib API */ +GLIB_AVAILABLE_IN_ALL +const gchar * const * g_win32_get_system_data_dirs_for_module (void (*address_of_function)(void)); +#endif + +#if defined (G_OS_WIN32) && defined (G_CAN_INLINE) +/* This function is not part of the public GLib API either. Just call + * g_get_system_data_dirs() in your code, never mind that that is + * actually a macro and you will in fact call this inline function. + */ +static inline const gchar * const * +_g_win32_get_system_data_dirs (void) +{ + return g_win32_get_system_data_dirs_for_module ((void (*)(void)) &_g_win32_get_system_data_dirs); +} +#define g_get_system_data_dirs _g_win32_get_system_data_dirs +#endif + +GLIB_AVAILABLE_IN_ALL +const gchar * const * g_get_system_config_dirs (void); + +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_user_runtime_dir (void); + +/** + * GUserDirectory: + * @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory + * @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory + * @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory + * @G_USER_DIRECTORY_MUSIC: the user's Music directory + * @G_USER_DIRECTORY_PICTURES: the user's Pictures directory + * @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory + * @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory + * @G_USER_DIRECTORY_VIDEOS: the user's Movies directory + * @G_USER_N_DIRECTORIES: the number of enum values + * + * These are logical ids for special directories which are defined + * depending on the platform used. You should use g_get_user_special_dir() + * to retrieve the full path associated to the logical id. + * + * The #GUserDirectory enumeration can be extended at later date. Not + * every platform has a directory for every logical id in this + * enumeration. + * + * Since: 2.14 + */ +typedef enum { + G_USER_DIRECTORY_DESKTOP, + G_USER_DIRECTORY_DOCUMENTS, + G_USER_DIRECTORY_DOWNLOAD, + G_USER_DIRECTORY_MUSIC, + G_USER_DIRECTORY_PICTURES, + G_USER_DIRECTORY_PUBLIC_SHARE, + G_USER_DIRECTORY_TEMPLATES, + G_USER_DIRECTORY_VIDEOS, + + G_USER_N_DIRECTORIES +} GUserDirectory; + +GLIB_AVAILABLE_IN_ALL +const gchar * g_get_user_special_dir (GUserDirectory directory); + +/** + * GDebugKey: + * @key: the string + * @value: the flag + * + * Associates a string with a bit flag. + * Used in g_parse_debug_string(). + */ +typedef struct _GDebugKey GDebugKey; +struct _GDebugKey +{ + const gchar *key; + guint value; +}; + +/* Miscellaneous utility functions + */ +GLIB_AVAILABLE_IN_ALL +guint g_parse_debug_string (const gchar *string, + const GDebugKey *keys, + guint nkeys); + +GLIB_AVAILABLE_IN_ALL +gint g_snprintf (gchar *string, + gulong n, + gchar const *format, + ...) G_GNUC_PRINTF (3, 4); +GLIB_AVAILABLE_IN_ALL +gint g_vsnprintf (gchar *string, + gulong n, + gchar const *format, + va_list args) + G_GNUC_PRINTF(3, 0); + +GLIB_AVAILABLE_IN_ALL +void g_nullify_pointer (gpointer *nullify_location); + +typedef enum +{ + G_FORMAT_SIZE_DEFAULT = 0, + G_FORMAT_SIZE_LONG_FORMAT = 1 << 0, + G_FORMAT_SIZE_IEC_UNITS = 1 << 1, + G_FORMAT_SIZE_BITS = 1 << 2, + G_FORMAT_SIZE_ONLY_VALUE GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 1 << 3, + G_FORMAT_SIZE_ONLY_UNIT GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 1 << 4 +} GFormatSizeFlags; + +GLIB_AVAILABLE_IN_2_30 +gchar *g_format_size_full (guint64 size, + GFormatSizeFlags flags); +GLIB_AVAILABLE_IN_2_30 +gchar *g_format_size (guint64 size); + +GLIB_DEPRECATED_IN_2_30_FOR(g_format_size) +gchar *g_format_size_for_display (goffset size); + +#define g_ATEXIT(proc) (atexit (proc)) GLIB_DEPRECATED_MACRO_IN_2_32 +#define g_memmove(dest,src,len) \ + G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END GLIB_DEPRECATED_MACRO_IN_2_40_FOR(memmove) + +/** + * GVoidFunc: + * + * Declares a type of function which takes no arguments + * and has no return value. It is used to specify the type + * function passed to g_atexit(). + */ +typedef void (*GVoidFunc) (void) GLIB_DEPRECATED_TYPE_IN_2_32; +#define ATEXIT(proc) g_ATEXIT(proc) GLIB_DEPRECATED_MACRO_IN_2_32 + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED +void g_atexit (GVoidFunc func); +G_GNUC_END_IGNORE_DEPRECATIONS + +#ifdef G_OS_WIN32 +/* It's a bad idea to wrap atexit() on Windows. If the GLib DLL calls + * atexit(), the function will be called when the GLib DLL is detached + * from the program, which is not what the caller wants. The caller + * wants the function to be called when it *itself* exits (or is + * detached, in case the caller, too, is a DLL). + */ +#if (defined(__MINGW_H) && !defined(_STDLIB_H_)) || (defined(_MSC_VER) && !defined(_INC_STDLIB)) +int atexit (void (*)(void)); +#endif +#define g_atexit(func) atexit(func) GLIB_DEPRECATED_MACRO_IN_2_32 +#endif + + +/* Look for an executable in PATH, following execvp() rules */ +GLIB_AVAILABLE_IN_ALL +gchar* g_find_program_in_path (const gchar *program); + +/* Bit tests + * + * These are defined in a convoluted way because we want the compiler to + * be able to inline the code for performance reasons, but for + * historical reasons, we must continue to provide non-inline versions + * on our ABI. + * + * We define these as functions in gutils.c which are just implemented + * as calls to the _impl() versions in order to preserve the ABI. + */ + +#define g_bit_nth_lsf(mask, nth_bit) g_bit_nth_lsf_impl(mask, nth_bit) +#define g_bit_nth_msf(mask, nth_bit) g_bit_nth_msf_impl(mask, nth_bit) +#define g_bit_storage(number) g_bit_storage_impl(number) + +GLIB_AVAILABLE_IN_ALL +gint (g_bit_nth_lsf) (gulong mask, + gint nth_bit); +GLIB_AVAILABLE_IN_ALL +gint (g_bit_nth_msf) (gulong mask, + gint nth_bit); +GLIB_AVAILABLE_IN_ALL +guint (g_bit_storage) (gulong number); + +static inline gint +g_bit_nth_lsf_impl (gulong mask, + gint nth_bit) +{ + if (G_UNLIKELY (nth_bit < -1)) + nth_bit = -1; + while (nth_bit < ((GLIB_SIZEOF_LONG * 8) - 1)) + { + nth_bit++; + if (mask & (1UL << nth_bit)) + return nth_bit; + } + return -1; +} + +static inline gint +g_bit_nth_msf_impl (gulong mask, + gint nth_bit) +{ + if (nth_bit < 0 || G_UNLIKELY (nth_bit > GLIB_SIZEOF_LONG * 8)) + nth_bit = GLIB_SIZEOF_LONG * 8; + while (nth_bit > 0) + { + nth_bit--; + if (mask & (1UL << nth_bit)) + return nth_bit; + } + return -1; +} + +static inline guint +g_bit_storage_impl (gulong number) +{ +#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__) + return G_LIKELY (number) ? + ((GLIB_SIZEOF_LONG * 8U - 1) ^ (guint) __builtin_clzl(number)) + 1 : 1; +#else + guint n_bits = 0; + + do + { + n_bits++; + number >>= 1; + } + while (number); + return n_bits; +#endif +} + +/* Crashes the program. */ +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_50 +#ifndef G_OS_WIN32 +# include +# define g_abort() abort () +#else +G_NORETURN GLIB_AVAILABLE_IN_2_50 void g_abort (void) G_ANALYZER_NORETURN; +#endif +#endif + +/* + * This macro is deprecated. This DllMain() is too complex. It is + * recommended to write an explicit minimal DLlMain() that just saves + * the handle to the DLL and then use that handle instead, for + * instance passing it to + * g_win32_get_package_installation_directory_of_module(). + * + * On Windows, this macro defines a DllMain function that stores the + * actual DLL name that the code being compiled will be included in. + * STATIC should be empty or 'static'. DLL_NAME is the name of the + * (pointer to the) char array where the DLL name will be stored. If + * this is used, you must also include . If you need a more complex + * DLL entry point function, you cannot use this. + * + * On non-Windows platforms, expands to nothing. + */ + +#ifndef G_PLATFORM_WIN32 +# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) GLIB_DEPRECATED_MACRO_IN_2_26 +#else +# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) \ +static char *dll_name; \ + \ +BOOL WINAPI \ +DllMain (HINSTANCE hinstDLL, \ + DWORD fdwReason, \ + LPVOID lpvReserved) \ +{ \ + wchar_t wcbfr[1000]; \ + char *tem; \ + switch (fdwReason) \ + { \ + case DLL_PROCESS_ATTACH: \ + GetModuleFileNameW ((HMODULE) hinstDLL, wcbfr, G_N_ELEMENTS (wcbfr)); \ + tem = g_utf16_to_utf8 (wcbfr, -1, NULL, NULL, NULL); \ + dll_name = g_path_get_basename (tem); \ + g_free (tem); \ + break; \ + } \ + \ + return TRUE; \ +} GLIB_DEPRECATED_MACRO_IN_2_26 +#endif /* G_PLATFORM_WIN32 */ + +G_END_DECLS + +#endif /* __G_UTILS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/guuid.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/guuid.h new file mode 100644 index 0000000..c653188 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/guuid.h @@ -0,0 +1,42 @@ +/* guuid.h - UUID functions + * + * Copyright (C) 2013-2015, 2017 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * licence, or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA. + * + * Authors: Marc-André Lureau + */ + +#ifndef __G_UUID_H__ +#define __G_UUID_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +GLIB_AVAILABLE_IN_2_52 +gboolean g_uuid_string_is_valid (const gchar *str); + +GLIB_AVAILABLE_IN_2_52 +gchar * g_uuid_string_random (void); + +G_END_DECLS + +#endif /* __G_UUID_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gvariant.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gvariant.h new file mode 100644 index 0000000..bdc3795 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gvariant.h @@ -0,0 +1,541 @@ +/* + * Copyright © 2007, 2008 Ryan Lortie + * Copyright © 2009, 2010 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Author: Ryan Lortie + */ + +#ifndef __G_VARIANT_H__ +#define __G_VARIANT_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include + +G_BEGIN_DECLS + +typedef struct _GVariant GVariant; + +typedef enum +{ + G_VARIANT_CLASS_BOOLEAN = 'b', + G_VARIANT_CLASS_BYTE = 'y', + G_VARIANT_CLASS_INT16 = 'n', + G_VARIANT_CLASS_UINT16 = 'q', + G_VARIANT_CLASS_INT32 = 'i', + G_VARIANT_CLASS_UINT32 = 'u', + G_VARIANT_CLASS_INT64 = 'x', + G_VARIANT_CLASS_UINT64 = 't', + G_VARIANT_CLASS_HANDLE = 'h', + G_VARIANT_CLASS_DOUBLE = 'd', + G_VARIANT_CLASS_STRING = 's', + G_VARIANT_CLASS_OBJECT_PATH = 'o', + G_VARIANT_CLASS_SIGNATURE = 'g', + G_VARIANT_CLASS_VARIANT = 'v', + G_VARIANT_CLASS_MAYBE = 'm', + G_VARIANT_CLASS_ARRAY = 'a', + G_VARIANT_CLASS_TUPLE = '(', + G_VARIANT_CLASS_DICT_ENTRY = '{' +} GVariantClass; + +GLIB_AVAILABLE_IN_ALL +void g_variant_unref (GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_ref (GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_ref_sink (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_is_floating (GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_take_ref (GVariant *value); + +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_variant_get_type (GVariant *value); +GLIB_AVAILABLE_IN_ALL +const gchar * g_variant_get_type_string (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_is_of_type (GVariant *value, + const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_is_container (GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariantClass g_variant_classify (GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_boolean (gboolean value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_byte (guint8 value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_int16 (gint16 value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_uint16 (guint16 value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_int32 (gint32 value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_uint32 (guint32 value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_int64 (gint64 value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_uint64 (guint64 value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_handle (gint32 value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_double (gdouble value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_string (const gchar *string); +GLIB_AVAILABLE_IN_2_38 +GVariant * g_variant_new_take_string (gchar *string); +GLIB_AVAILABLE_IN_2_38 +GVariant * g_variant_new_printf (const gchar *format_string, + ...) G_GNUC_PRINTF (1, 2); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_object_path (const gchar *object_path); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_is_object_path (const gchar *string); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_signature (const gchar *signature); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_is_signature (const gchar *string); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_variant (GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_strv (const gchar * const *strv, + gssize length); +GLIB_AVAILABLE_IN_2_30 +GVariant * g_variant_new_objv (const gchar * const *strv, + gssize length); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_bytestring (const gchar *string); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_bytestring_array (const gchar * const *strv, + gssize length); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_fixed_array (const GVariantType *element_type, + gconstpointer elements, + gsize n_elements, + gsize element_size); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_get_boolean (GVariant *value); +GLIB_AVAILABLE_IN_ALL +guint8 g_variant_get_byte (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gint16 g_variant_get_int16 (GVariant *value); +GLIB_AVAILABLE_IN_ALL +guint16 g_variant_get_uint16 (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gint32 g_variant_get_int32 (GVariant *value); +GLIB_AVAILABLE_IN_ALL +guint32 g_variant_get_uint32 (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gint64 g_variant_get_int64 (GVariant *value); +GLIB_AVAILABLE_IN_ALL +guint64 g_variant_get_uint64 (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gint32 g_variant_get_handle (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gdouble g_variant_get_double (GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_get_variant (GVariant *value); +GLIB_AVAILABLE_IN_ALL +const gchar * g_variant_get_string (GVariant *value, + gsize *length); +GLIB_AVAILABLE_IN_ALL +gchar * g_variant_dup_string (GVariant *value, + gsize *length); +GLIB_AVAILABLE_IN_ALL +const gchar ** g_variant_get_strv (GVariant *value, + gsize *length); +GLIB_AVAILABLE_IN_ALL +gchar ** g_variant_dup_strv (GVariant *value, + gsize *length); +GLIB_AVAILABLE_IN_2_30 +const gchar ** g_variant_get_objv (GVariant *value, + gsize *length); +GLIB_AVAILABLE_IN_ALL +gchar ** g_variant_dup_objv (GVariant *value, + gsize *length); +GLIB_AVAILABLE_IN_ALL +const gchar * g_variant_get_bytestring (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gchar * g_variant_dup_bytestring (GVariant *value, + gsize *length); +GLIB_AVAILABLE_IN_ALL +const gchar ** g_variant_get_bytestring_array (GVariant *value, + gsize *length); +GLIB_AVAILABLE_IN_ALL +gchar ** g_variant_dup_bytestring_array (GVariant *value, + gsize *length); + +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_maybe (const GVariantType *child_type, + GVariant *child); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_array (const GVariantType *child_type, + GVariant * const *children, + gsize n_children); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_tuple (GVariant * const *children, + gsize n_children); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_dict_entry (GVariant *key, + GVariant *value); + +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_get_maybe (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gsize g_variant_n_children (GVariant *value); +GLIB_AVAILABLE_IN_ALL +void g_variant_get_child (GVariant *value, + gsize index_, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_get_child_value (GVariant *value, + gsize index_); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_lookup (GVariant *dictionary, + const gchar *key, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_lookup_value (GVariant *dictionary, + const gchar *key, + const GVariantType *expected_type); +GLIB_AVAILABLE_IN_ALL +gconstpointer g_variant_get_fixed_array (GVariant *value, + gsize *n_elements, + gsize element_size); + +GLIB_AVAILABLE_IN_ALL +gsize g_variant_get_size (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gconstpointer g_variant_get_data (GVariant *value); +GLIB_AVAILABLE_IN_2_36 +GBytes * g_variant_get_data_as_bytes (GVariant *value); +GLIB_AVAILABLE_IN_ALL +void g_variant_store (GVariant *value, + gpointer data); + +GLIB_AVAILABLE_IN_ALL +gchar * g_variant_print (GVariant *value, + gboolean type_annotate); +GLIB_AVAILABLE_IN_ALL +GString * g_variant_print_string (GVariant *value, + GString *string, + gboolean type_annotate); + +GLIB_AVAILABLE_IN_ALL +guint g_variant_hash (gconstpointer value); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_equal (gconstpointer one, + gconstpointer two); + +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_get_normal_form (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_is_normal_form (GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_byteswap (GVariant *value); + +GLIB_AVAILABLE_IN_2_36 +GVariant * g_variant_new_from_bytes (const GVariantType *type, + GBytes *bytes, + gboolean trusted); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_from_data (const GVariantType *type, + gconstpointer data, + gsize size, + gboolean trusted, + GDestroyNotify notify, + gpointer user_data); + +typedef struct _GVariantIter GVariantIter; +struct _GVariantIter { + /*< private >*/ + guintptr x[16]; +}; + +GLIB_AVAILABLE_IN_ALL +GVariantIter * g_variant_iter_new (GVariant *value); +GLIB_AVAILABLE_IN_ALL +gsize g_variant_iter_init (GVariantIter *iter, + GVariant *value); +GLIB_AVAILABLE_IN_ALL +GVariantIter * g_variant_iter_copy (GVariantIter *iter); +GLIB_AVAILABLE_IN_ALL +gsize g_variant_iter_n_children (GVariantIter *iter); +GLIB_AVAILABLE_IN_ALL +void g_variant_iter_free (GVariantIter *iter); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_iter_next_value (GVariantIter *iter); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_iter_next (GVariantIter *iter, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_iter_loop (GVariantIter *iter, + const gchar *format_string, + ...); + + +typedef struct _GVariantBuilder GVariantBuilder; +struct _GVariantBuilder { + /*< private >*/ + union + { + struct { + gsize partial_magic; + const GVariantType *type; + guintptr y[14]; + } s; + guintptr x[16]; + } u; +}; + +typedef enum +{ + G_VARIANT_PARSE_ERROR_FAILED, + G_VARIANT_PARSE_ERROR_BASIC_TYPE_EXPECTED, + G_VARIANT_PARSE_ERROR_CANNOT_INFER_TYPE, + G_VARIANT_PARSE_ERROR_DEFINITE_TYPE_EXPECTED, + G_VARIANT_PARSE_ERROR_INPUT_NOT_AT_END, + G_VARIANT_PARSE_ERROR_INVALID_CHARACTER, + G_VARIANT_PARSE_ERROR_INVALID_FORMAT_STRING, + G_VARIANT_PARSE_ERROR_INVALID_OBJECT_PATH, + G_VARIANT_PARSE_ERROR_INVALID_SIGNATURE, + G_VARIANT_PARSE_ERROR_INVALID_TYPE_STRING, + G_VARIANT_PARSE_ERROR_NO_COMMON_TYPE, + G_VARIANT_PARSE_ERROR_NUMBER_OUT_OF_RANGE, + G_VARIANT_PARSE_ERROR_NUMBER_TOO_BIG, + G_VARIANT_PARSE_ERROR_TYPE_ERROR, + G_VARIANT_PARSE_ERROR_UNEXPECTED_TOKEN, + G_VARIANT_PARSE_ERROR_UNKNOWN_KEYWORD, + G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT, + G_VARIANT_PARSE_ERROR_VALUE_EXPECTED, + G_VARIANT_PARSE_ERROR_RECURSION +} GVariantParseError; +#define G_VARIANT_PARSE_ERROR (g_variant_parse_error_quark ()) + +GLIB_DEPRECATED_IN_2_38_FOR(g_variant_parse_error_quark) +GQuark g_variant_parser_get_error_quark (void); + +GLIB_AVAILABLE_IN_ALL +GQuark g_variant_parse_error_quark (void); + +/** + * G_VARIANT_BUILDER_INIT: + * @variant_type: a const GVariantType* + * + * A stack-allocated #GVariantBuilder must be initialized if it is + * used together with g_auto() to avoid warnings or crashes if + * function returns before g_variant_builder_init() is called on the + * builder. + * + * This macro can be used as initializer instead of an + * explicit zeroing a variable when declaring it and a following + * g_variant_builder_init(), but it cannot be assigned to a variable. + * + * The passed @variant_type should be a static GVariantType to avoid + * lifetime issues, as copying the @variant_type does not happen in + * the G_VARIANT_BUILDER_INIT() call, but rather in functions that + * make sure that #GVariantBuilder is valid. + * + * |[ + * g_auto(GVariantBuilder) builder = G_VARIANT_BUILDER_INIT (G_VARIANT_TYPE_BYTESTRING); + * ]| + * + * Since: 2.50 + */ +#define G_VARIANT_BUILDER_INIT(variant_type) \ + { \ + { \ + { \ + 2942751021u /* == GVSB_MAGIC_PARTIAL, see gvariant.c */, variant_type, { 0, } \ + } \ + } \ + } + +GLIB_AVAILABLE_IN_ALL +GVariantBuilder * g_variant_builder_new (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +void g_variant_builder_unref (GVariantBuilder *builder); +GLIB_AVAILABLE_IN_ALL +GVariantBuilder * g_variant_builder_ref (GVariantBuilder *builder); +GLIB_AVAILABLE_IN_ALL +void g_variant_builder_init (GVariantBuilder *builder, + const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_builder_end (GVariantBuilder *builder); +GLIB_AVAILABLE_IN_ALL +void g_variant_builder_clear (GVariantBuilder *builder); +GLIB_AVAILABLE_IN_ALL +void g_variant_builder_open (GVariantBuilder *builder, + const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +void g_variant_builder_close (GVariantBuilder *builder); +GLIB_AVAILABLE_IN_ALL +void g_variant_builder_add_value (GVariantBuilder *builder, + GVariant *value); +GLIB_AVAILABLE_IN_ALL +void g_variant_builder_add (GVariantBuilder *builder, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_ALL +void g_variant_builder_add_parsed (GVariantBuilder *builder, + const gchar *format, + ...); + +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new (const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_ALL +void g_variant_get (GVariant *value, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_va (const gchar *format_string, + const gchar **endptr, + va_list *app); +GLIB_AVAILABLE_IN_ALL +void g_variant_get_va (GVariant *value, + const gchar *format_string, + const gchar **endptr, + va_list *app); +GLIB_AVAILABLE_IN_2_34 +gboolean g_variant_check_format_string (GVariant *value, + const gchar *format_string, + gboolean copy_only); + +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_parse (const GVariantType *type, + const gchar *text, + const gchar *limit, + const gchar **endptr, + GError **error); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_parsed (const gchar *format, + ...); +GLIB_AVAILABLE_IN_ALL +GVariant * g_variant_new_parsed_va (const gchar *format, + va_list *app); + +GLIB_AVAILABLE_IN_2_40 +gchar * g_variant_parse_error_print_context (GError *error, + const gchar *source_str); + +GLIB_AVAILABLE_IN_ALL +gint g_variant_compare (gconstpointer one, + gconstpointer two); + +typedef struct _GVariantDict GVariantDict; +struct _GVariantDict { + /*< private >*/ + union + { + struct { + GVariant *asv; + gsize partial_magic; + guintptr y[14]; + } s; + guintptr x[16]; + } u; +}; + +/** + * G_VARIANT_DICT_INIT: + * @asv: (nullable): a GVariant* + * + * A stack-allocated #GVariantDict must be initialized if it is used + * together with g_auto() to avoid warnings or crashes if function + * returns before g_variant_dict_init() is called on the builder. + * + * This macro can be used as initializer instead of an explicit + * zeroing a variable when declaring it and a following + * g_variant_dict_init(), but it cannot be assigned to a variable. + * + * The passed @asv has to live long enough for #GVariantDict to gather + * the entries from, as the gathering does not happen in the + * G_VARIANT_DICT_INIT() call, but rather in functions that make sure + * that #GVariantDict is valid. In context where the initialization + * value has to be a constant expression, the only possible value of + * @asv is %NULL. It is still possible to call g_variant_dict_init() + * safely with a different @asv right after the variable was + * initialized with G_VARIANT_DICT_INIT(). + * + * |[ + * g_autoptr(GVariant) variant = get_asv_variant (); + * g_auto(GVariantDict) dict = G_VARIANT_DICT_INIT (variant); + * ]| + * + * Since: 2.50 + */ +#define G_VARIANT_DICT_INIT(asv) \ + { \ + { \ + { \ + asv, 3488698669u /* == GVSD_MAGIC_PARTIAL, see gvariant.c */, { 0, } \ + } \ + } \ + } + +GLIB_AVAILABLE_IN_2_40 +GVariantDict * g_variant_dict_new (GVariant *from_asv); + +GLIB_AVAILABLE_IN_2_40 +void g_variant_dict_init (GVariantDict *dict, + GVariant *from_asv); + +GLIB_AVAILABLE_IN_2_40 +gboolean g_variant_dict_lookup (GVariantDict *dict, + const gchar *key, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_2_40 +GVariant * g_variant_dict_lookup_value (GVariantDict *dict, + const gchar *key, + const GVariantType *expected_type); +GLIB_AVAILABLE_IN_2_40 +gboolean g_variant_dict_contains (GVariantDict *dict, + const gchar *key); +GLIB_AVAILABLE_IN_2_40 +void g_variant_dict_insert (GVariantDict *dict, + const gchar *key, + const gchar *format_string, + ...); +GLIB_AVAILABLE_IN_2_40 +void g_variant_dict_insert_value (GVariantDict *dict, + const gchar *key, + GVariant *value); +GLIB_AVAILABLE_IN_2_40 +gboolean g_variant_dict_remove (GVariantDict *dict, + const gchar *key); +GLIB_AVAILABLE_IN_2_40 +void g_variant_dict_clear (GVariantDict *dict); +GLIB_AVAILABLE_IN_2_40 +GVariant * g_variant_dict_end (GVariantDict *dict); +GLIB_AVAILABLE_IN_2_40 +GVariantDict * g_variant_dict_ref (GVariantDict *dict); +GLIB_AVAILABLE_IN_2_40 +void g_variant_dict_unref (GVariantDict *dict); + +G_END_DECLS + +#endif /* __G_VARIANT_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gvarianttype.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gvarianttype.h new file mode 100644 index 0000000..6374957 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gvarianttype.h @@ -0,0 +1,384 @@ +/* + * Copyright © 2007, 2008 Ryan Lortie + * Copyright © 2009, 2010 Codethink Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Author: Ryan Lortie + */ + +#ifndef __G_VARIANT_TYPE_H__ +#define __G_VARIANT_TYPE_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * GVariantType: + * + * A type in the GVariant type system. + * + * Two types may not be compared by value; use g_variant_type_equal() or + * g_variant_type_is_subtype_of(). May be copied using + * g_variant_type_copy() and freed using g_variant_type_free(). + **/ +typedef struct _GVariantType GVariantType; + +/** + * G_VARIANT_TYPE_BOOLEAN: + * + * The type of a value that can be either %TRUE or %FALSE. + **/ +#define G_VARIANT_TYPE_BOOLEAN ((const GVariantType *) "b") + +/** + * G_VARIANT_TYPE_BYTE: + * + * The type of an integer value that can range from 0 to 255. + **/ +#define G_VARIANT_TYPE_BYTE ((const GVariantType *) "y") + +/** + * G_VARIANT_TYPE_INT16: + * + * The type of an integer value that can range from -32768 to 32767. + **/ +#define G_VARIANT_TYPE_INT16 ((const GVariantType *) "n") + +/** + * G_VARIANT_TYPE_UINT16: + * + * The type of an integer value that can range from 0 to 65535. + * There were about this many people living in Toronto in the 1870s. + **/ +#define G_VARIANT_TYPE_UINT16 ((const GVariantType *) "q") + +/** + * G_VARIANT_TYPE_INT32: + * + * The type of an integer value that can range from -2147483648 to + * 2147483647. + **/ +#define G_VARIANT_TYPE_INT32 ((const GVariantType *) "i") + +/** + * G_VARIANT_TYPE_UINT32: + * + * The type of an integer value that can range from 0 to 4294967295. + * That's one number for everyone who was around in the late 1970s. + **/ +#define G_VARIANT_TYPE_UINT32 ((const GVariantType *) "u") + +/** + * G_VARIANT_TYPE_INT64: + * + * The type of an integer value that can range from + * -9223372036854775808 to 9223372036854775807. + **/ +#define G_VARIANT_TYPE_INT64 ((const GVariantType *) "x") + +/** + * G_VARIANT_TYPE_UINT64: + * + * The type of an integer value that can range from 0 + * to 18446744073709551615 (inclusive). That's a really big number, + * but a Rubik's cube can have a bit more than twice as many possible + * positions. + **/ +#define G_VARIANT_TYPE_UINT64 ((const GVariantType *) "t") + +/** + * G_VARIANT_TYPE_DOUBLE: + * + * The type of a double precision IEEE754 floating point number. + * These guys go up to about 1.80e308 (plus and minus) but miss out on + * some numbers in between. In any case, that's far greater than the + * estimated number of fundamental particles in the observable + * universe. + **/ +#define G_VARIANT_TYPE_DOUBLE ((const GVariantType *) "d") + +/** + * G_VARIANT_TYPE_STRING: + * + * The type of a string. "" is a string. %NULL is not a string. + **/ +#define G_VARIANT_TYPE_STRING ((const GVariantType *) "s") + +/** + * G_VARIANT_TYPE_OBJECT_PATH: + * + * The type of a D-Bus object reference. These are strings of a + * specific format used to identify objects at a given destination on + * the bus. + * + * If you are not interacting with D-Bus, then there is no reason to make + * use of this type. If you are, then the D-Bus specification contains a + * precise description of valid object paths. + **/ +#define G_VARIANT_TYPE_OBJECT_PATH ((const GVariantType *) "o") + +/** + * G_VARIANT_TYPE_SIGNATURE: + * + * The type of a D-Bus type signature. These are strings of a specific + * format used as type signatures for D-Bus methods and messages. + * + * If you are not interacting with D-Bus, then there is no reason to make + * use of this type. If you are, then the D-Bus specification contains a + * precise description of valid signature strings. + **/ +#define G_VARIANT_TYPE_SIGNATURE ((const GVariantType *) "g") + +/** + * G_VARIANT_TYPE_VARIANT: + * + * The type of a box that contains any other value (including another + * variant). + **/ +#define G_VARIANT_TYPE_VARIANT ((const GVariantType *) "v") + +/** + * G_VARIANT_TYPE_HANDLE: + * + * The type of a 32bit signed integer value, that by convention, is used + * as an index into an array of file descriptors that are sent alongside + * a D-Bus message. + * + * If you are not interacting with D-Bus, then there is no reason to make + * use of this type. + **/ +#define G_VARIANT_TYPE_HANDLE ((const GVariantType *) "h") + +/** + * G_VARIANT_TYPE_UNIT: + * + * The empty tuple type. Has only one instance. Known also as "triv" + * or "void". + **/ +#define G_VARIANT_TYPE_UNIT ((const GVariantType *) "()") + +/** + * G_VARIANT_TYPE_ANY: + * + * An indefinite type that is a supertype of every type (including + * itself). + **/ +#define G_VARIANT_TYPE_ANY ((const GVariantType *) "*") + +/** + * G_VARIANT_TYPE_BASIC: + * + * An indefinite type that is a supertype of every basic (ie: + * non-container) type. + **/ +#define G_VARIANT_TYPE_BASIC ((const GVariantType *) "?") + +/** + * G_VARIANT_TYPE_MAYBE: + * + * An indefinite type that is a supertype of every maybe type. + **/ +#define G_VARIANT_TYPE_MAYBE ((const GVariantType *) "m*") + +/** + * G_VARIANT_TYPE_ARRAY: + * + * An indefinite type that is a supertype of every array type. + **/ +#define G_VARIANT_TYPE_ARRAY ((const GVariantType *) "a*") + +/** + * G_VARIANT_TYPE_TUPLE: + * + * An indefinite type that is a supertype of every tuple type, + * regardless of the number of items in the tuple. + **/ +#define G_VARIANT_TYPE_TUPLE ((const GVariantType *) "r") + +/** + * G_VARIANT_TYPE_DICT_ENTRY: + * + * An indefinite type that is a supertype of every dictionary entry + * type. + **/ +#define G_VARIANT_TYPE_DICT_ENTRY ((const GVariantType *) "{?*}") + +/** + * G_VARIANT_TYPE_DICTIONARY: + * + * An indefinite type that is a supertype of every dictionary type -- + * that is, any array type that has an element type equal to any + * dictionary entry type. + **/ +#define G_VARIANT_TYPE_DICTIONARY ((const GVariantType *) "a{?*}") + +/** + * G_VARIANT_TYPE_STRING_ARRAY: + * + * The type of an array of strings. + **/ +#define G_VARIANT_TYPE_STRING_ARRAY ((const GVariantType *) "as") + +/** + * G_VARIANT_TYPE_OBJECT_PATH_ARRAY: + * + * The type of an array of object paths. + **/ +#define G_VARIANT_TYPE_OBJECT_PATH_ARRAY ((const GVariantType *) "ao") + +/** + * G_VARIANT_TYPE_BYTESTRING: + * + * The type of an array of bytes. This type is commonly used to pass + * around strings that may not be valid utf8. In that case, the + * convention is that the nul terminator character should be included as + * the last character in the array. + **/ +#define G_VARIANT_TYPE_BYTESTRING ((const GVariantType *) "ay") + +/** + * G_VARIANT_TYPE_BYTESTRING_ARRAY: + * + * The type of an array of byte strings (an array of arrays of bytes). + **/ +#define G_VARIANT_TYPE_BYTESTRING_ARRAY ((const GVariantType *) "aay") + +/** + * G_VARIANT_TYPE_VARDICT: + * + * The type of a dictionary mapping strings to variants (the ubiquitous + * "a{sv}" type). + * + * Since: 2.30 + **/ +#define G_VARIANT_TYPE_VARDICT ((const GVariantType *) "a{sv}") + + +/** + * G_VARIANT_TYPE: + * @type_string: a well-formed #GVariantType type string + * + * Converts a string to a const #GVariantType. Depending on the + * current debugging level, this function may perform a runtime check + * to ensure that @string is a valid GVariant type string. + * + * It is always a programmer error to use this macro with an invalid + * type string. If in doubt, use g_variant_type_string_is_valid() to + * check if the string is valid. + * + * Since 2.24 + **/ +#ifndef G_DISABLE_CHECKS +# define G_VARIANT_TYPE(type_string) (g_variant_type_checked_ ((type_string))) +#else +# define G_VARIANT_TYPE(type_string) ((const GVariantType *) (type_string)) +#endif + +/* type string checking */ +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_string_is_valid (const gchar *type_string); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_string_scan (const gchar *string, + const gchar *limit, + const gchar **endptr); + +/* create/destroy */ +GLIB_AVAILABLE_IN_ALL +void g_variant_type_free (GVariantType *type); +GLIB_AVAILABLE_IN_ALL +GVariantType * g_variant_type_copy (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +GVariantType * g_variant_type_new (const gchar *type_string); + +/* getters */ +GLIB_AVAILABLE_IN_ALL +gsize g_variant_type_get_string_length (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +const gchar * g_variant_type_peek_string (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gchar * g_variant_type_dup_string (const GVariantType *type); + +/* classification */ +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_definite (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_container (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_basic (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_maybe (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_array (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_tuple (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_dict_entry (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_variant (const GVariantType *type); + +/* for hash tables */ +GLIB_AVAILABLE_IN_ALL +guint g_variant_type_hash (gconstpointer type); +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_equal (gconstpointer type1, + gconstpointer type2); + +/* subtypes */ +GLIB_AVAILABLE_IN_ALL +gboolean g_variant_type_is_subtype_of (const GVariantType *type, + const GVariantType *supertype); + +/* type iterator interface */ +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_variant_type_element (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_variant_type_first (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_variant_type_next (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +gsize g_variant_type_n_items (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_variant_type_key (const GVariantType *type); +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_variant_type_value (const GVariantType *type); + +/* constructors */ +GLIB_AVAILABLE_IN_ALL +GVariantType * g_variant_type_new_array (const GVariantType *element); +GLIB_AVAILABLE_IN_ALL +GVariantType * g_variant_type_new_maybe (const GVariantType *element); +GLIB_AVAILABLE_IN_ALL +GVariantType * g_variant_type_new_tuple (const GVariantType * const *items, + gint length); +GLIB_AVAILABLE_IN_ALL +GVariantType * g_variant_type_new_dict_entry (const GVariantType *key, + const GVariantType *value); + +/*< private >*/ +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_variant_type_checked_ (const gchar *); +GLIB_AVAILABLE_IN_2_60 +gsize g_variant_type_string_get_depth_ (const gchar *type_string); + +G_END_DECLS + +#endif /* __G_VARIANT_TYPE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gversion.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gversion.h new file mode 100644 index 0000000..d15f548 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gversion.h @@ -0,0 +1,57 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_VERSION_H__ +#define __G_VERSION_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +GLIB_VAR const guint glib_major_version; +GLIB_VAR const guint glib_minor_version; +GLIB_VAR const guint glib_micro_version; +GLIB_VAR const guint glib_interface_age; +GLIB_VAR const guint glib_binary_age; + +GLIB_AVAILABLE_IN_ALL +const gchar * glib_check_version (guint required_major, + guint required_minor, + guint required_micro); + +#define GLIB_CHECK_VERSION(major,minor,micro) \ + (GLIB_MAJOR_VERSION > (major) || \ + (GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION > (minor)) || \ + (GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION == (minor) && \ + GLIB_MICRO_VERSION >= (micro))) + +G_END_DECLS + +#endif /* __G_VERSION_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gversionmacros.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gversionmacros.h new file mode 100644 index 0000000..2900178 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gversionmacros.h @@ -0,0 +1,490 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_VERSION_MACROS_H__ +#define __G_VERSION_MACROS_H__ + +#if !defined(__GLIB_H_INSIDE__) && !defined(GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +/* Version boundaries checks */ + +#define G_ENCODE_VERSION(major, minor) ((major) << 16 | (minor) << 8) + +/** +* GLIB_VERSION_2_2: +* +* A macro that evaluates to the 2.2 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.32 +*/ +#define GLIB_VERSION_2_2 (G_ENCODE_VERSION (2, 2)) +/** +* GLIB_VERSION_2_4: +* +* A macro that evaluates to the 2.4 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.32 +*/ +#define GLIB_VERSION_2_4 (G_ENCODE_VERSION (2, 4)) +/** +* GLIB_VERSION_2_6: +* +* A macro that evaluates to the 2.6 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.32 +*/ +#define GLIB_VERSION_2_6 (G_ENCODE_VERSION (2, 6)) +/** +* GLIB_VERSION_2_8: +* +* A macro that evaluates to the 2.8 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.32 +*/ +#define GLIB_VERSION_2_8 (G_ENCODE_VERSION (2, 8)) +/** +* GLIB_VERSION_2_10: +* +* A macro that evaluates to the 2.10 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.32 +*/ +#define GLIB_VERSION_2_10 (G_ENCODE_VERSION (2, 10)) +/** +* GLIB_VERSION_2_12: +* +* A macro that evaluates to the 2.12 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.32 +*/ +#define GLIB_VERSION_2_12 (G_ENCODE_VERSION (2, 12)) +/** +* GLIB_VERSION_2_14: +* +* A macro that evaluates to the 2.14 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.32 +*/ +#define GLIB_VERSION_2_14 (G_ENCODE_VERSION (2, 14)) +/** +* GLIB_VERSION_2_16: +* +* A macro that evaluates to the 2.16 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.32 +*/ +#define GLIB_VERSION_2_16 (G_ENCODE_VERSION (2, 16)) +/** +* GLIB_VERSION_2_18: +* +* A macro that evaluates to the 2.18 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.32 +*/ +#define GLIB_VERSION_2_18 (G_ENCODE_VERSION (2, 18)) +/** +* GLIB_VERSION_2_20: +* +* A macro that evaluates to the 2.20 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.32 +*/ +#define GLIB_VERSION_2_20 (G_ENCODE_VERSION (2, 20)) +/** +* GLIB_VERSION_2_22: +* +* A macro that evaluates to the 2.22 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.32 +*/ +#define GLIB_VERSION_2_22 (G_ENCODE_VERSION (2, 22)) +/** +* GLIB_VERSION_2_24: +* +* A macro that evaluates to the 2.24 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.32 +*/ +#define GLIB_VERSION_2_24 (G_ENCODE_VERSION (2, 24)) +/** +* GLIB_VERSION_2_26: +* +* A macro that evaluates to the 2.26 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.32 +*/ +#define GLIB_VERSION_2_26 (G_ENCODE_VERSION (2, 26)) +/** +* GLIB_VERSION_2_28: +* +* A macro that evaluates to the 2.28 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.32 +*/ +#define GLIB_VERSION_2_28 (G_ENCODE_VERSION (2, 28)) +/** +* GLIB_VERSION_2_30: +* +* A macro that evaluates to the 2.30 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.32 +*/ +#define GLIB_VERSION_2_30 (G_ENCODE_VERSION (2, 30)) +/** +* GLIB_VERSION_2_32: +* +* A macro that evaluates to the 2.32 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.32 +*/ +#define GLIB_VERSION_2_32 (G_ENCODE_VERSION (2, 32)) +/** +* GLIB_VERSION_2_34: +* +* A macro that evaluates to the 2.34 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.34 +*/ +#define GLIB_VERSION_2_34 (G_ENCODE_VERSION (2, 34)) +/** +* GLIB_VERSION_2_36: +* +* A macro that evaluates to the 2.36 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.36 +*/ +#define GLIB_VERSION_2_36 (G_ENCODE_VERSION (2, 36)) +/** +* GLIB_VERSION_2_38: +* +* A macro that evaluates to the 2.38 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.38 +*/ +#define GLIB_VERSION_2_38 (G_ENCODE_VERSION (2, 38)) +/** +* GLIB_VERSION_2_40: +* +* A macro that evaluates to the 2.40 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.40 +*/ +#define GLIB_VERSION_2_40 (G_ENCODE_VERSION (2, 40)) +/** +* GLIB_VERSION_2_42: +* +* A macro that evaluates to the 2.42 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.42 +*/ +#define GLIB_VERSION_2_42 (G_ENCODE_VERSION (2, 42)) +/** +* GLIB_VERSION_2_44: +* +* A macro that evaluates to the 2.44 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.44 +*/ +#define GLIB_VERSION_2_44 (G_ENCODE_VERSION (2, 44)) +/** +* GLIB_VERSION_2_46: +* +* A macro that evaluates to the 2.46 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.46 +*/ +#define GLIB_VERSION_2_46 (G_ENCODE_VERSION (2, 46)) +/** +* GLIB_VERSION_2_48: +* +* A macro that evaluates to the 2.48 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.48 +*/ +#define GLIB_VERSION_2_48 (G_ENCODE_VERSION (2, 48)) +/** +* GLIB_VERSION_2_50: +* +* A macro that evaluates to the 2.50 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.50 +*/ +#define GLIB_VERSION_2_50 (G_ENCODE_VERSION (2, 50)) +/** +* GLIB_VERSION_2_52: +* +* A macro that evaluates to the 2.52 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.52 +*/ +#define GLIB_VERSION_2_52 (G_ENCODE_VERSION (2, 52)) +/** +* GLIB_VERSION_2_54: +* +* A macro that evaluates to the 2.54 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.54 +*/ +#define GLIB_VERSION_2_54 (G_ENCODE_VERSION (2, 54)) +/** +* GLIB_VERSION_2_56: +* +* A macro that evaluates to the 2.56 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.56 +*/ +#define GLIB_VERSION_2_56 (G_ENCODE_VERSION (2, 56)) +/** +* GLIB_VERSION_2_58: +* +* A macro that evaluates to the 2.58 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.58 +*/ +#define GLIB_VERSION_2_58 (G_ENCODE_VERSION (2, 58)) +/** +* GLIB_VERSION_2_60: +* +* A macro that evaluates to the 2.60 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.60 +*/ +#define GLIB_VERSION_2_60 (G_ENCODE_VERSION (2, 60)) +/** +* GLIB_VERSION_2_62: +* +* A macro that evaluates to the 2.62 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.62 +*/ +#define GLIB_VERSION_2_62 (G_ENCODE_VERSION (2, 62)) +/** +* GLIB_VERSION_2_64: +* +* A macro that evaluates to the 2.64 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.64 +*/ +#define GLIB_VERSION_2_64 (G_ENCODE_VERSION (2, 64)) +/** +* GLIB_VERSION_2_66: +* +* A macro that evaluates to the 2.66 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.66 +*/ +#define GLIB_VERSION_2_66 (G_ENCODE_VERSION (2, 66)) +/** +* GLIB_VERSION_2_68: +* +* A macro that evaluates to the 2.68 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.68 +*/ +#define GLIB_VERSION_2_68 (G_ENCODE_VERSION (2, 68)) +/** +* GLIB_VERSION_2_70: +* +* A macro that evaluates to the 2.70 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.70 +*/ +#define GLIB_VERSION_2_70 (G_ENCODE_VERSION (2, 70)) +/** +* GLIB_VERSION_2_72: +* +* A macro that evaluates to the 2.72 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.72 +*/ +#define GLIB_VERSION_2_72 (G_ENCODE_VERSION (2, 72)) +/** +* GLIB_VERSION_2_74: +* +* A macro that evaluates to the 2.74 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.74 +*/ +#define GLIB_VERSION_2_74 (G_ENCODE_VERSION (2, 74)) +/** +* GLIB_VERSION_2_76: +* +* A macro that evaluates to the 2.76 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.76 +*/ +#define GLIB_VERSION_2_76 (G_ENCODE_VERSION (2, 76)) +/** +* GLIB_VERSION_2_78: +* +* A macro that evaluates to the 2.78 version of GLib, in a format +* that can be used by the C pre-processor. +* +* Since: 2.78 +*/ +#define GLIB_VERSION_2_78 (G_ENCODE_VERSION (2, 78)) + +/** + * GLIB_VERSION_CUR_STABLE: + * + * A macro that evaluates to the current stable version of GLib, in a format + * that can be used by the C pre-processor. + * + * During an unstable development cycle, this evaluates to the next stable + * (unreleased) version which will be the result of the development cycle. + * + * Since: 2.32 + */ +#if (GLIB_MINOR_VERSION % 2) +#define GLIB_VERSION_CUR_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION + 1)) +#else +#define GLIB_VERSION_CUR_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION)) +#endif + +/** + * GLIB_VERSION_PREV_STABLE: + * + * A macro that evaluates to the previous stable version of GLib, in a format + * that can be used by the C pre-processor. + * + * During an unstable development cycle, this evaluates to the most recent + * released stable release, which preceded this development cycle. + * + * Since: 2.32 + */ +#if (GLIB_MINOR_VERSION % 2) +#define GLIB_VERSION_PREV_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION - 1)) +#else +#define GLIB_VERSION_PREV_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION - 2)) +#endif + +/** + * GLIB_VERSION_MIN_REQUIRED: + * + * A macro that should be defined by the user prior to including + * the glib.h header. + * The definition should be one of the predefined GLib version + * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,... + * + * This macro defines the earliest version of GLib that the package is + * required to be able to compile against. + * + * If the compiler is configured to warn about the use of deprecated + * functions, then using functions that were deprecated in version + * %GLIB_VERSION_MIN_REQUIRED or earlier will cause warnings (but + * using functions deprecated in later releases will not). + * + * Since: 2.32 + */ +/* If the package sets GLIB_VERSION_MIN_REQUIRED to some future + * GLIB_VERSION_X_Y value that we don't know about, it will compare as + * 0 in preprocessor tests. + */ +#ifndef GLIB_VERSION_MIN_REQUIRED +#define GLIB_VERSION_MIN_REQUIRED (GLIB_VERSION_CUR_STABLE) +#elif GLIB_VERSION_MIN_REQUIRED == 0 +#undef GLIB_VERSION_MIN_REQUIRED +#define GLIB_VERSION_MIN_REQUIRED (GLIB_VERSION_CUR_STABLE + 2) +#endif + +/** + * GLIB_VERSION_MAX_ALLOWED: + * + * A macro that should be defined by the user prior to including + * the glib.h header. + * The definition should be one of the predefined GLib version + * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,... + * + * This macro defines the latest version of the GLib API that the + * package is allowed to make use of. + * + * If the compiler is configured to warn about the use of deprecated + * functions, then using functions added after version + * %GLIB_VERSION_MAX_ALLOWED will cause warnings. + * + * Unless you are using GLIB_CHECK_VERSION() or the like to compile + * different code depending on the GLib version, then this should be + * set to the same value as %GLIB_VERSION_MIN_REQUIRED. + * + * Since: 2.32 + */ +#if !defined(GLIB_VERSION_MAX_ALLOWED) || (GLIB_VERSION_MAX_ALLOWED == 0) +#undef GLIB_VERSION_MAX_ALLOWED +#define GLIB_VERSION_MAX_ALLOWED (GLIB_VERSION_CUR_STABLE) +#endif + +/* sanity checks */ +#if GLIB_VERSION_MIN_REQUIRED > GLIB_VERSION_CUR_STABLE +#error "GLIB_VERSION_MIN_REQUIRED must be <= GLIB_VERSION_CUR_STABLE" +#endif +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_MIN_REQUIRED +#error "GLIB_VERSION_MAX_ALLOWED must be >= GLIB_VERSION_MIN_REQUIRED" +#endif +#if GLIB_VERSION_MIN_REQUIRED < GLIB_VERSION_2_26 +#error "GLIB_VERSION_MIN_REQUIRED must be >= GLIB_VERSION_2_26" +#endif + +#endif /* __G_VERSION_MACROS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/glib/gwin32.h b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gwin32.h new file mode 100644 index 0000000..e38a7f9 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/glib/gwin32.h @@ -0,0 +1,142 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_WIN32_H__ +#define __G_WIN32_H__ + +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +#ifdef G_PLATFORM_WIN32 + +G_BEGIN_DECLS + +#ifndef MAXPATHLEN +#define MAXPATHLEN 1024 +#endif + +#ifdef G_OS_WIN32 + +/* + * To get prototypes for the following POSIXish functions, you have to + * include the indicated non-POSIX headers. The functions are defined + * in OLDNAMES.LIB (MSVC) or -lmoldname-msvc (mingw32). But note that + * for POSIX functions that take or return file names in the system + * codepage, in many cases you would want to use the GLib wrappers in + * gstdio.h and UTF-8 instead. + * + * getcwd: (MSVC), (mingw32) + * getpid: + * access: + * unlink: or + * open, read, write, lseek, close: + * rmdir: + * pipe: (actually, _pipe()) + */ + +/* For some POSIX functions that are not provided by the MS runtime, + * we provide emulation functions in glib, which are prefixed with + * g_win32_. Or that was the idea at some time, but there is just one + * of those: + */ +GLIB_AVAILABLE_IN_ALL +gint g_win32_ftruncate (gint f, + guint size); +#endif /* G_OS_WIN32 */ + +/* The MS setlocale uses locale names of the form "English_United + * States.1252" etc. We want the Unixish standard form "en", "zh_TW" + * etc. This function gets the current thread locale from Windows and + * returns it as a string of the above form for use in forming file + * names etc. The returned string should be deallocated with g_free(). + */ +GLIB_AVAILABLE_IN_ALL +gchar* g_win32_getlocale (void); + +/* Translate a Win32 error code (as returned by GetLastError()) into + * the corresponding message. The returned string should be deallocated + * with g_free(). + */ +GLIB_AVAILABLE_IN_ALL +gchar* g_win32_error_message (gint error); + +GLIB_DEPRECATED +gchar* g_win32_get_package_installation_directory (const gchar *package, + const gchar *dll_name); + +GLIB_DEPRECATED +gchar* g_win32_get_package_installation_subdirectory (const gchar *package, + const gchar *dll_name, + const gchar *subdir); + +GLIB_AVAILABLE_IN_ALL +gchar* g_win32_get_package_installation_directory_of_module (gpointer hmodule); + +GLIB_DEPRECATED_IN_2_44_FOR(g_win32_check_windows_version) +guint g_win32_get_windows_version (void); + +GLIB_AVAILABLE_IN_ALL +gchar* g_win32_locale_filename_from_utf8 (const gchar *utf8filename); + +GLIB_AVAILABLE_IN_2_40 +gchar ** g_win32_get_command_line (void); + +/* As of GLib 2.14 we only support NT-based Windows */ +#define G_WIN32_IS_NT_BASED() TRUE +#define G_WIN32_HAVE_WIDECHAR_API() TRUE + +/** + * GWin32OSType: + * @G_WIN32_OS_ANY: The running system can be a workstation or a server edition of + * Windows. The type of the running system is therefore not checked. + * @G_WIN32_OS_WORKSTATION: The running system is a workstation edition of Windows, + * such as Windows 7 Professional. + * @G_WIN32_OS_SERVER: The running system is a server edition of Windows, such as + * Windows Server 2008 R2. + * + * Type of Windows edition to check for at run-time. + **/ +typedef enum +{ + G_WIN32_OS_ANY, + G_WIN32_OS_WORKSTATION, + G_WIN32_OS_SERVER, +} GWin32OSType; + +GLIB_AVAILABLE_IN_2_44 +gboolean g_win32_check_windows_version (const gint major, + const gint minor, + const gint spver, + const GWin32OSType os_type); + +G_END_DECLS + +#endif /* G_PLATFORM_WIN32 */ + +#endif /* __G_WIN32_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gmodule.h b/vcpkg/installed/x64-osx/include/glib-2.0/gmodule.h new file mode 100644 index 0000000..5330a08 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gmodule.h @@ -0,0 +1,147 @@ +/* GMODULE - GLIB wrapper code for dynamic module loading + * Copyright (C) 1998 Tim Janik + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __GMODULE_H__ +#define __GMODULE_H__ + +#include +#include + +G_BEGIN_DECLS + +/* exporting and importing functions, this is special cased + * to feature Windows dll stubs. + */ +#if defined(_WIN32) || defined(__CYGWIN__) +# define G_MODULE_EXPORT __declspec(dllexport) +# define G_MODULE_IMPORT __declspec(dllimport) extern +#elif __GNUC__ >= 4 +# define G_MODULE_EXPORT __attribute__((visibility("default"))) +# define G_MODULE_IMPORT extern +#else /* !defined(_WIN32) && !defined(__CYGWIN__) && __GNUC__ < 4 */ +# define G_MODULE_EXPORT +# define G_MODULE_IMPORT extern +#endif + +/** + * GModuleFlags: + * @G_MODULE_BIND_LAZY: specifies that symbols are only resolved when + * needed. The default action is to bind all symbols when the module + * is loaded. + * @G_MODULE_BIND_LOCAL: specifies that symbols in the module should + * not be added to the global name space. The default action on most + * platforms is to place symbols in the module in the global name space, + * which may cause conflicts with existing symbols. + * @G_MODULE_BIND_MASK: mask for all flags. + * + * Flags passed to g_module_open(). + * Note that these flags are not supported on all platforms. + */ +typedef enum +{ + G_MODULE_BIND_LAZY = 1 << 0, + G_MODULE_BIND_LOCAL = 1 << 1, + G_MODULE_BIND_MASK = 0x03 +} GModuleFlags; + +typedef struct _GModule GModule; +typedef const gchar* (*GModuleCheckInit) (GModule *module); +typedef void (*GModuleUnload) (GModule *module); + +#define G_MODULE_ERROR g_module_error_quark () GMODULE_AVAILABLE_MACRO_IN_2_70 +GMODULE_AVAILABLE_IN_2_70 +GQuark g_module_error_quark (void); + +/** + * GModuleError: + * @G_MODULE_ERROR_FAILED: there was an error loading or opening a module file + * @G_MODULE_ERROR_CHECK_FAILED: a module returned an error from its `g_module_check_init()` function + * + * Errors returned by g_module_open_full(). + * + * Since: 2.70 + */ +typedef enum +{ + G_MODULE_ERROR_FAILED, + G_MODULE_ERROR_CHECK_FAILED, +} GModuleError +GMODULE_AVAILABLE_ENUMERATOR_IN_2_70; + +/* return TRUE if dynamic module loading is supported */ +GMODULE_AVAILABLE_IN_ALL +gboolean g_module_supported (void) G_GNUC_CONST; + +/* open a module 'file_name' and return handle, which is NULL on error */ +GMODULE_AVAILABLE_IN_ALL +GModule* g_module_open (const gchar *file_name, + GModuleFlags flags); + +GMODULE_AVAILABLE_IN_2_70 +GModule *g_module_open_full (const gchar *file_name, + GModuleFlags flags, + GError **error); + +/* close a previously opened module, returns TRUE on success */ +GMODULE_AVAILABLE_IN_ALL +gboolean g_module_close (GModule *module); + +/* make a module resident so g_module_close on it will be ignored */ +GMODULE_AVAILABLE_IN_ALL +void g_module_make_resident (GModule *module); + +/* query the last module error as a string */ +GMODULE_AVAILABLE_IN_ALL +const gchar * g_module_error (void); + +/* retrieve a symbol pointer from 'module', returns TRUE on success */ +GMODULE_AVAILABLE_IN_ALL +gboolean g_module_symbol (GModule *module, + const gchar *symbol_name, + gpointer *symbol); + +/* retrieve the file name from an existing module */ +GMODULE_AVAILABLE_IN_ALL +const gchar * g_module_name (GModule *module); + +/* Build the actual file name containing a module. 'directory' is the + * directory where the module file is supposed to be, or NULL or empty + * in which case it should either be in the current directory or, on + * some operating systems, in some standard place, for instance on the + * PATH. Hence, to be absolutely sure to get the correct module, + * always pass in a directory. The file name consists of the directory, + * if supplied, and 'module_name' suitably decorated according to + * the operating system's conventions (for instance lib*.so or *.dll). + * + * No checks are made that the file exists, or is of correct type. + */ +GMODULE_DEPRECATED_IN_2_76 +gchar* g_module_build_path (const gchar *directory, + const gchar *module_name); + +G_END_DECLS + +#endif /* __GMODULE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gmodule/gmodule-visibility.h b/vcpkg/installed/x64-osx/include/glib-2.0/gmodule/gmodule-visibility.h new file mode 100644 index 0000000..796d1ee --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gmodule/gmodule-visibility.h @@ -0,0 +1,952 @@ +#pragma once + +#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(GMODULE_STATIC_COMPILATION) +# define _GMODULE_EXPORT __declspec(dllexport) +# define _GMODULE_IMPORT __declspec(dllimport) +#elif __GNUC__ >= 4 +# define _GMODULE_EXPORT __attribute__((visibility("default"))) +# define _GMODULE_IMPORT +#else +# define _GMODULE_EXPORT +# define _GMODULE_IMPORT +#endif +#ifdef GMODULE_COMPILATION +# define _GMODULE_API _GMODULE_EXPORT +#else +# define _GMODULE_API _GMODULE_IMPORT +#endif + +#define _GMODULE_EXTERN _GMODULE_API extern + +#define GMODULE_VAR _GMODULE_EXTERN +#define GMODULE_AVAILABLE_IN_ALL _GMODULE_EXTERN + +#ifdef GLIB_DISABLE_DEPRECATION_WARNINGS +#define GMODULE_DEPRECATED _GMODULE_EXTERN +#define GMODULE_DEPRECATED_FOR(f) _GMODULE_EXTERN +#define GMODULE_UNAVAILABLE(maj,min) _GMODULE_EXTERN +#define GMODULE_UNAVAILABLE_STATIC_INLINE(maj,min) +#else +#define GMODULE_DEPRECATED G_DEPRECATED _GMODULE_EXTERN +#define GMODULE_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _GMODULE_EXTERN +#define GMODULE_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _GMODULE_EXTERN +#define GMODULE_UNAVAILABLE_STATIC_INLINE(maj,min) G_UNAVAILABLE(maj,min) +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_26 +#define GMODULE_DEPRECATED_IN_2_26 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_26_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_26 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_26_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_26 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_26_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_26 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_26_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_26 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_26_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_26 +#define GMODULE_DEPRECATED_MACRO_IN_2_26_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_26 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_26_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_26 +#define GMODULE_DEPRECATED_TYPE_IN_2_26_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_26 +#define GMODULE_AVAILABLE_IN_2_26 GMODULE_UNAVAILABLE (2, 26) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_26 GLIB_UNAVAILABLE_STATIC_INLINE (2, 26) +#define GMODULE_AVAILABLE_MACRO_IN_2_26 GLIB_UNAVAILABLE_MACRO (2, 26) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_26 GLIB_UNAVAILABLE_ENUMERATOR (2, 26) +#define GMODULE_AVAILABLE_TYPE_IN_2_26 GLIB_UNAVAILABLE_TYPE (2, 26) +#else +#define GMODULE_AVAILABLE_IN_2_26 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_26 +#define GMODULE_AVAILABLE_MACRO_IN_2_26 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_26 +#define GMODULE_AVAILABLE_TYPE_IN_2_26 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_28 +#define GMODULE_DEPRECATED_IN_2_28 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_28_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_28 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_28_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_28 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_28_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_28 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_28_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_28 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_28_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_28 +#define GMODULE_DEPRECATED_MACRO_IN_2_28_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_28 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_28_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_28 +#define GMODULE_DEPRECATED_TYPE_IN_2_28_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_28 +#define GMODULE_AVAILABLE_IN_2_28 GMODULE_UNAVAILABLE (2, 28) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_28 GLIB_UNAVAILABLE_STATIC_INLINE (2, 28) +#define GMODULE_AVAILABLE_MACRO_IN_2_28 GLIB_UNAVAILABLE_MACRO (2, 28) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_28 GLIB_UNAVAILABLE_ENUMERATOR (2, 28) +#define GMODULE_AVAILABLE_TYPE_IN_2_28 GLIB_UNAVAILABLE_TYPE (2, 28) +#else +#define GMODULE_AVAILABLE_IN_2_28 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_28 +#define GMODULE_AVAILABLE_MACRO_IN_2_28 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_28 +#define GMODULE_AVAILABLE_TYPE_IN_2_28 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_30 +#define GMODULE_DEPRECATED_IN_2_30 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_30_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_30 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_30_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_30 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_30_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_30 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_30_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_30 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_30_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_30 +#define GMODULE_DEPRECATED_MACRO_IN_2_30_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_30 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_30_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_30 +#define GMODULE_DEPRECATED_TYPE_IN_2_30_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_30 +#define GMODULE_AVAILABLE_IN_2_30 GMODULE_UNAVAILABLE (2, 30) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_30 GLIB_UNAVAILABLE_STATIC_INLINE (2, 30) +#define GMODULE_AVAILABLE_MACRO_IN_2_30 GLIB_UNAVAILABLE_MACRO (2, 30) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_30 GLIB_UNAVAILABLE_ENUMERATOR (2, 30) +#define GMODULE_AVAILABLE_TYPE_IN_2_30 GLIB_UNAVAILABLE_TYPE (2, 30) +#else +#define GMODULE_AVAILABLE_IN_2_30 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_30 +#define GMODULE_AVAILABLE_MACRO_IN_2_30 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_30 +#define GMODULE_AVAILABLE_TYPE_IN_2_30 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_32 +#define GMODULE_DEPRECATED_IN_2_32 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_32_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_32 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_32_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_32 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_32 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_32_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_32 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_32_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_32 +#define GMODULE_DEPRECATED_MACRO_IN_2_32_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_32 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_32 +#define GMODULE_DEPRECATED_TYPE_IN_2_32_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_32 +#define GMODULE_AVAILABLE_IN_2_32 GMODULE_UNAVAILABLE (2, 32) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_32 GLIB_UNAVAILABLE_STATIC_INLINE (2, 32) +#define GMODULE_AVAILABLE_MACRO_IN_2_32 GLIB_UNAVAILABLE_MACRO (2, 32) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_32 GLIB_UNAVAILABLE_ENUMERATOR (2, 32) +#define GMODULE_AVAILABLE_TYPE_IN_2_32 GLIB_UNAVAILABLE_TYPE (2, 32) +#else +#define GMODULE_AVAILABLE_IN_2_32 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_32 +#define GMODULE_AVAILABLE_MACRO_IN_2_32 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_32 +#define GMODULE_AVAILABLE_TYPE_IN_2_32 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_34 +#define GMODULE_DEPRECATED_IN_2_34 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_34_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_34 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_34_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_34 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_34_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_34 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_34_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_34 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_34_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_34 +#define GMODULE_DEPRECATED_MACRO_IN_2_34_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_34 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_34_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_34 +#define GMODULE_DEPRECATED_TYPE_IN_2_34_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_34 +#define GMODULE_AVAILABLE_IN_2_34 GMODULE_UNAVAILABLE (2, 34) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_34 GLIB_UNAVAILABLE_STATIC_INLINE (2, 34) +#define GMODULE_AVAILABLE_MACRO_IN_2_34 GLIB_UNAVAILABLE_MACRO (2, 34) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_34 GLIB_UNAVAILABLE_ENUMERATOR (2, 34) +#define GMODULE_AVAILABLE_TYPE_IN_2_34 GLIB_UNAVAILABLE_TYPE (2, 34) +#else +#define GMODULE_AVAILABLE_IN_2_34 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_34 +#define GMODULE_AVAILABLE_MACRO_IN_2_34 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_34 +#define GMODULE_AVAILABLE_TYPE_IN_2_34 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_36 +#define GMODULE_DEPRECATED_IN_2_36 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_36_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_36 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_36_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_36 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_36_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_36 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_36_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_36 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_36_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_36 +#define GMODULE_DEPRECATED_MACRO_IN_2_36_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_36 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_36_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_36 +#define GMODULE_DEPRECATED_TYPE_IN_2_36_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_36 +#define GMODULE_AVAILABLE_IN_2_36 GMODULE_UNAVAILABLE (2, 36) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_36 GLIB_UNAVAILABLE_STATIC_INLINE (2, 36) +#define GMODULE_AVAILABLE_MACRO_IN_2_36 GLIB_UNAVAILABLE_MACRO (2, 36) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_36 GLIB_UNAVAILABLE_ENUMERATOR (2, 36) +#define GMODULE_AVAILABLE_TYPE_IN_2_36 GLIB_UNAVAILABLE_TYPE (2, 36) +#else +#define GMODULE_AVAILABLE_IN_2_36 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_36 +#define GMODULE_AVAILABLE_MACRO_IN_2_36 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_36 +#define GMODULE_AVAILABLE_TYPE_IN_2_36 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_38 +#define GMODULE_DEPRECATED_IN_2_38 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_38_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_38 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_38_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_38 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_38_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_38 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_38_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_38 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_38_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_38 +#define GMODULE_DEPRECATED_MACRO_IN_2_38_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_38 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_38_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_38 +#define GMODULE_DEPRECATED_TYPE_IN_2_38_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 +#define GMODULE_AVAILABLE_IN_2_38 GMODULE_UNAVAILABLE (2, 38) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_38 GLIB_UNAVAILABLE_STATIC_INLINE (2, 38) +#define GMODULE_AVAILABLE_MACRO_IN_2_38 GLIB_UNAVAILABLE_MACRO (2, 38) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_38 GLIB_UNAVAILABLE_ENUMERATOR (2, 38) +#define GMODULE_AVAILABLE_TYPE_IN_2_38 GLIB_UNAVAILABLE_TYPE (2, 38) +#else +#define GMODULE_AVAILABLE_IN_2_38 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_38 +#define GMODULE_AVAILABLE_MACRO_IN_2_38 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_38 +#define GMODULE_AVAILABLE_TYPE_IN_2_38 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_40 +#define GMODULE_DEPRECATED_IN_2_40 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_40_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_40 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_40_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_40 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_40_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_40 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_40_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_40 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_40_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_40 +#define GMODULE_DEPRECATED_MACRO_IN_2_40_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_40 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_40_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_40 +#define GMODULE_DEPRECATED_TYPE_IN_2_40_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_40 +#define GMODULE_AVAILABLE_IN_2_40 GMODULE_UNAVAILABLE (2, 40) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_40 GLIB_UNAVAILABLE_STATIC_INLINE (2, 40) +#define GMODULE_AVAILABLE_MACRO_IN_2_40 GLIB_UNAVAILABLE_MACRO (2, 40) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_40 GLIB_UNAVAILABLE_ENUMERATOR (2, 40) +#define GMODULE_AVAILABLE_TYPE_IN_2_40 GLIB_UNAVAILABLE_TYPE (2, 40) +#else +#define GMODULE_AVAILABLE_IN_2_40 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_40 +#define GMODULE_AVAILABLE_MACRO_IN_2_40 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_40 +#define GMODULE_AVAILABLE_TYPE_IN_2_40 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_42 +#define GMODULE_DEPRECATED_IN_2_42 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_42_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_42 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_42_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_42 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_42_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_42 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_42_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_42 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_42_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_42 +#define GMODULE_DEPRECATED_MACRO_IN_2_42_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_42 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_42_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_42 +#define GMODULE_DEPRECATED_TYPE_IN_2_42_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_42 +#define GMODULE_AVAILABLE_IN_2_42 GMODULE_UNAVAILABLE (2, 42) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_42 GLIB_UNAVAILABLE_STATIC_INLINE (2, 42) +#define GMODULE_AVAILABLE_MACRO_IN_2_42 GLIB_UNAVAILABLE_MACRO (2, 42) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_42 GLIB_UNAVAILABLE_ENUMERATOR (2, 42) +#define GMODULE_AVAILABLE_TYPE_IN_2_42 GLIB_UNAVAILABLE_TYPE (2, 42) +#else +#define GMODULE_AVAILABLE_IN_2_42 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_42 +#define GMODULE_AVAILABLE_MACRO_IN_2_42 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_42 +#define GMODULE_AVAILABLE_TYPE_IN_2_42 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_44 +#define GMODULE_DEPRECATED_IN_2_44 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_44_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_44 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_44_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_44 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_44_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_44 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_44_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_44 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_44_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_44 +#define GMODULE_DEPRECATED_MACRO_IN_2_44_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_44 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_44_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_44 +#define GMODULE_DEPRECATED_TYPE_IN_2_44_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_44 +#define GMODULE_AVAILABLE_IN_2_44 GMODULE_UNAVAILABLE (2, 44) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_44 GLIB_UNAVAILABLE_STATIC_INLINE (2, 44) +#define GMODULE_AVAILABLE_MACRO_IN_2_44 GLIB_UNAVAILABLE_MACRO (2, 44) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_44 GLIB_UNAVAILABLE_ENUMERATOR (2, 44) +#define GMODULE_AVAILABLE_TYPE_IN_2_44 GLIB_UNAVAILABLE_TYPE (2, 44) +#else +#define GMODULE_AVAILABLE_IN_2_44 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_44 +#define GMODULE_AVAILABLE_MACRO_IN_2_44 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_44 +#define GMODULE_AVAILABLE_TYPE_IN_2_44 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_46 +#define GMODULE_DEPRECATED_IN_2_46 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_46_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_46 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_46_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_46 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_46_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_46 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_46_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_46 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_46_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_46 +#define GMODULE_DEPRECATED_MACRO_IN_2_46_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_46 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_46_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_46 +#define GMODULE_DEPRECATED_TYPE_IN_2_46_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_46 +#define GMODULE_AVAILABLE_IN_2_46 GMODULE_UNAVAILABLE (2, 46) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_46 GLIB_UNAVAILABLE_STATIC_INLINE (2, 46) +#define GMODULE_AVAILABLE_MACRO_IN_2_46 GLIB_UNAVAILABLE_MACRO (2, 46) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_46 GLIB_UNAVAILABLE_ENUMERATOR (2, 46) +#define GMODULE_AVAILABLE_TYPE_IN_2_46 GLIB_UNAVAILABLE_TYPE (2, 46) +#else +#define GMODULE_AVAILABLE_IN_2_46 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_46 +#define GMODULE_AVAILABLE_MACRO_IN_2_46 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_46 +#define GMODULE_AVAILABLE_TYPE_IN_2_46 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_48 +#define GMODULE_DEPRECATED_IN_2_48 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_48_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_48 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_48_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_48 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_48_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_48 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_48_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_48 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_48_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_48 +#define GMODULE_DEPRECATED_MACRO_IN_2_48_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_48 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_48_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_48 +#define GMODULE_DEPRECATED_TYPE_IN_2_48_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_48 +#define GMODULE_AVAILABLE_IN_2_48 GMODULE_UNAVAILABLE (2, 48) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_48 GLIB_UNAVAILABLE_STATIC_INLINE (2, 48) +#define GMODULE_AVAILABLE_MACRO_IN_2_48 GLIB_UNAVAILABLE_MACRO (2, 48) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_48 GLIB_UNAVAILABLE_ENUMERATOR (2, 48) +#define GMODULE_AVAILABLE_TYPE_IN_2_48 GLIB_UNAVAILABLE_TYPE (2, 48) +#else +#define GMODULE_AVAILABLE_IN_2_48 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_48 +#define GMODULE_AVAILABLE_MACRO_IN_2_48 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_48 +#define GMODULE_AVAILABLE_TYPE_IN_2_48 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_50 +#define GMODULE_DEPRECATED_IN_2_50 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_50_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_50 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_50_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_50 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_50_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_50 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_50_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_50 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_50_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_50 +#define GMODULE_DEPRECATED_MACRO_IN_2_50_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_50 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_50_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_50 +#define GMODULE_DEPRECATED_TYPE_IN_2_50_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_50 +#define GMODULE_AVAILABLE_IN_2_50 GMODULE_UNAVAILABLE (2, 50) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_50 GLIB_UNAVAILABLE_STATIC_INLINE (2, 50) +#define GMODULE_AVAILABLE_MACRO_IN_2_50 GLIB_UNAVAILABLE_MACRO (2, 50) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_50 GLIB_UNAVAILABLE_ENUMERATOR (2, 50) +#define GMODULE_AVAILABLE_TYPE_IN_2_50 GLIB_UNAVAILABLE_TYPE (2, 50) +#else +#define GMODULE_AVAILABLE_IN_2_50 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_50 +#define GMODULE_AVAILABLE_MACRO_IN_2_50 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_50 +#define GMODULE_AVAILABLE_TYPE_IN_2_50 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_52 +#define GMODULE_DEPRECATED_IN_2_52 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_52_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_52 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_52_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_52 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_52_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_52 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_52_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_52 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_52_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_52 +#define GMODULE_DEPRECATED_MACRO_IN_2_52_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_52 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_52_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_52 +#define GMODULE_DEPRECATED_TYPE_IN_2_52_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_52 +#define GMODULE_AVAILABLE_IN_2_52 GMODULE_UNAVAILABLE (2, 52) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_52 GLIB_UNAVAILABLE_STATIC_INLINE (2, 52) +#define GMODULE_AVAILABLE_MACRO_IN_2_52 GLIB_UNAVAILABLE_MACRO (2, 52) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_52 GLIB_UNAVAILABLE_ENUMERATOR (2, 52) +#define GMODULE_AVAILABLE_TYPE_IN_2_52 GLIB_UNAVAILABLE_TYPE (2, 52) +#else +#define GMODULE_AVAILABLE_IN_2_52 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_52 +#define GMODULE_AVAILABLE_MACRO_IN_2_52 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_52 +#define GMODULE_AVAILABLE_TYPE_IN_2_52 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_54 +#define GMODULE_DEPRECATED_IN_2_54 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_54_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_54 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_54_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_54 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_54_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_54 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_54_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_54 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_54_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_54 +#define GMODULE_DEPRECATED_MACRO_IN_2_54_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_54 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_54_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_54 +#define GMODULE_DEPRECATED_TYPE_IN_2_54_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_54 +#define GMODULE_AVAILABLE_IN_2_54 GMODULE_UNAVAILABLE (2, 54) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_54 GLIB_UNAVAILABLE_STATIC_INLINE (2, 54) +#define GMODULE_AVAILABLE_MACRO_IN_2_54 GLIB_UNAVAILABLE_MACRO (2, 54) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_54 GLIB_UNAVAILABLE_ENUMERATOR (2, 54) +#define GMODULE_AVAILABLE_TYPE_IN_2_54 GLIB_UNAVAILABLE_TYPE (2, 54) +#else +#define GMODULE_AVAILABLE_IN_2_54 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_54 +#define GMODULE_AVAILABLE_MACRO_IN_2_54 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_54 +#define GMODULE_AVAILABLE_TYPE_IN_2_54 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_56 +#define GMODULE_DEPRECATED_IN_2_56 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_56_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_56 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_56_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_56 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_56_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_56 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_56_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_56 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_56_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_56 +#define GMODULE_DEPRECATED_MACRO_IN_2_56_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_56 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_56_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_56 +#define GMODULE_DEPRECATED_TYPE_IN_2_56_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_56 +#define GMODULE_AVAILABLE_IN_2_56 GMODULE_UNAVAILABLE (2, 56) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_56 GLIB_UNAVAILABLE_STATIC_INLINE (2, 56) +#define GMODULE_AVAILABLE_MACRO_IN_2_56 GLIB_UNAVAILABLE_MACRO (2, 56) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_56 GLIB_UNAVAILABLE_ENUMERATOR (2, 56) +#define GMODULE_AVAILABLE_TYPE_IN_2_56 GLIB_UNAVAILABLE_TYPE (2, 56) +#else +#define GMODULE_AVAILABLE_IN_2_56 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_56 +#define GMODULE_AVAILABLE_MACRO_IN_2_56 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_56 +#define GMODULE_AVAILABLE_TYPE_IN_2_56 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_58 +#define GMODULE_DEPRECATED_IN_2_58 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_58_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_58 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_58_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_58 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_58_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_58 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_58_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_58 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_58_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_58 +#define GMODULE_DEPRECATED_MACRO_IN_2_58_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_58 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_58_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_58 +#define GMODULE_DEPRECATED_TYPE_IN_2_58_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_58 +#define GMODULE_AVAILABLE_IN_2_58 GMODULE_UNAVAILABLE (2, 58) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_58 GLIB_UNAVAILABLE_STATIC_INLINE (2, 58) +#define GMODULE_AVAILABLE_MACRO_IN_2_58 GLIB_UNAVAILABLE_MACRO (2, 58) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_58 GLIB_UNAVAILABLE_ENUMERATOR (2, 58) +#define GMODULE_AVAILABLE_TYPE_IN_2_58 GLIB_UNAVAILABLE_TYPE (2, 58) +#else +#define GMODULE_AVAILABLE_IN_2_58 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_58 +#define GMODULE_AVAILABLE_MACRO_IN_2_58 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_58 +#define GMODULE_AVAILABLE_TYPE_IN_2_58 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_60 +#define GMODULE_DEPRECATED_IN_2_60 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_60_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_60 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_60_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_60 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_60_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_60 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_60_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_60 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_60_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_60 +#define GMODULE_DEPRECATED_MACRO_IN_2_60_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_60 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_60_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_60 +#define GMODULE_DEPRECATED_TYPE_IN_2_60_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_60 +#define GMODULE_AVAILABLE_IN_2_60 GMODULE_UNAVAILABLE (2, 60) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_60 GLIB_UNAVAILABLE_STATIC_INLINE (2, 60) +#define GMODULE_AVAILABLE_MACRO_IN_2_60 GLIB_UNAVAILABLE_MACRO (2, 60) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_60 GLIB_UNAVAILABLE_ENUMERATOR (2, 60) +#define GMODULE_AVAILABLE_TYPE_IN_2_60 GLIB_UNAVAILABLE_TYPE (2, 60) +#else +#define GMODULE_AVAILABLE_IN_2_60 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_60 +#define GMODULE_AVAILABLE_MACRO_IN_2_60 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_60 +#define GMODULE_AVAILABLE_TYPE_IN_2_60 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_62 +#define GMODULE_DEPRECATED_IN_2_62 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_62_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_62 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_62_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_62 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_62_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_62 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_62_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_62 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_62_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_62 +#define GMODULE_DEPRECATED_MACRO_IN_2_62_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_62 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_62_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_62 +#define GMODULE_DEPRECATED_TYPE_IN_2_62_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_62 +#define GMODULE_AVAILABLE_IN_2_62 GMODULE_UNAVAILABLE (2, 62) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_62 GLIB_UNAVAILABLE_STATIC_INLINE (2, 62) +#define GMODULE_AVAILABLE_MACRO_IN_2_62 GLIB_UNAVAILABLE_MACRO (2, 62) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_62 GLIB_UNAVAILABLE_ENUMERATOR (2, 62) +#define GMODULE_AVAILABLE_TYPE_IN_2_62 GLIB_UNAVAILABLE_TYPE (2, 62) +#else +#define GMODULE_AVAILABLE_IN_2_62 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_62 +#define GMODULE_AVAILABLE_MACRO_IN_2_62 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_62 +#define GMODULE_AVAILABLE_TYPE_IN_2_62 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_64 +#define GMODULE_DEPRECATED_IN_2_64 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_64_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_64 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_64_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_64 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_64_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_64 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_64_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_64 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_64_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_64 +#define GMODULE_DEPRECATED_MACRO_IN_2_64_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_64 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_64_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_64 +#define GMODULE_DEPRECATED_TYPE_IN_2_64_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_64 +#define GMODULE_AVAILABLE_IN_2_64 GMODULE_UNAVAILABLE (2, 64) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_64 GLIB_UNAVAILABLE_STATIC_INLINE (2, 64) +#define GMODULE_AVAILABLE_MACRO_IN_2_64 GLIB_UNAVAILABLE_MACRO (2, 64) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_64 GLIB_UNAVAILABLE_ENUMERATOR (2, 64) +#define GMODULE_AVAILABLE_TYPE_IN_2_64 GLIB_UNAVAILABLE_TYPE (2, 64) +#else +#define GMODULE_AVAILABLE_IN_2_64 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_64 +#define GMODULE_AVAILABLE_MACRO_IN_2_64 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_64 +#define GMODULE_AVAILABLE_TYPE_IN_2_64 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_66 +#define GMODULE_DEPRECATED_IN_2_66 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_66_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_66 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_66_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_66 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_66_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_66 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_66_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_66 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_66_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_66 +#define GMODULE_DEPRECATED_MACRO_IN_2_66_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_66 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_66_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_66 +#define GMODULE_DEPRECATED_TYPE_IN_2_66_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_66 +#define GMODULE_AVAILABLE_IN_2_66 GMODULE_UNAVAILABLE (2, 66) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_66 GLIB_UNAVAILABLE_STATIC_INLINE (2, 66) +#define GMODULE_AVAILABLE_MACRO_IN_2_66 GLIB_UNAVAILABLE_MACRO (2, 66) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_66 GLIB_UNAVAILABLE_ENUMERATOR (2, 66) +#define GMODULE_AVAILABLE_TYPE_IN_2_66 GLIB_UNAVAILABLE_TYPE (2, 66) +#else +#define GMODULE_AVAILABLE_IN_2_66 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_66 +#define GMODULE_AVAILABLE_MACRO_IN_2_66 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_66 +#define GMODULE_AVAILABLE_TYPE_IN_2_66 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_68 +#define GMODULE_DEPRECATED_IN_2_68 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_68_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_68 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_68_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_68 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_68_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_68 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_68_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_68 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_68_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_68 +#define GMODULE_DEPRECATED_MACRO_IN_2_68_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_68 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_68_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_68 +#define GMODULE_DEPRECATED_TYPE_IN_2_68_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_68 +#define GMODULE_AVAILABLE_IN_2_68 GMODULE_UNAVAILABLE (2, 68) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_68 GLIB_UNAVAILABLE_STATIC_INLINE (2, 68) +#define GMODULE_AVAILABLE_MACRO_IN_2_68 GLIB_UNAVAILABLE_MACRO (2, 68) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_68 GLIB_UNAVAILABLE_ENUMERATOR (2, 68) +#define GMODULE_AVAILABLE_TYPE_IN_2_68 GLIB_UNAVAILABLE_TYPE (2, 68) +#else +#define GMODULE_AVAILABLE_IN_2_68 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_68 +#define GMODULE_AVAILABLE_MACRO_IN_2_68 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_68 +#define GMODULE_AVAILABLE_TYPE_IN_2_68 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_70 +#define GMODULE_DEPRECATED_IN_2_70 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_70_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_70 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_70_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_70 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_70_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_70 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_70_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_70 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_70_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_70 +#define GMODULE_DEPRECATED_MACRO_IN_2_70_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_70 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_70_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_70 +#define GMODULE_DEPRECATED_TYPE_IN_2_70_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_70 +#define GMODULE_AVAILABLE_IN_2_70 GMODULE_UNAVAILABLE (2, 70) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_70 GLIB_UNAVAILABLE_STATIC_INLINE (2, 70) +#define GMODULE_AVAILABLE_MACRO_IN_2_70 GLIB_UNAVAILABLE_MACRO (2, 70) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_70 GLIB_UNAVAILABLE_ENUMERATOR (2, 70) +#define GMODULE_AVAILABLE_TYPE_IN_2_70 GLIB_UNAVAILABLE_TYPE (2, 70) +#else +#define GMODULE_AVAILABLE_IN_2_70 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_70 +#define GMODULE_AVAILABLE_MACRO_IN_2_70 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_70 +#define GMODULE_AVAILABLE_TYPE_IN_2_70 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_72 +#define GMODULE_DEPRECATED_IN_2_72 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_72_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_72 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_72_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_72 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_72_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_72 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_72_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_72 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_72_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_72 +#define GMODULE_DEPRECATED_MACRO_IN_2_72_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_72 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_72_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_72 +#define GMODULE_DEPRECATED_TYPE_IN_2_72_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_72 +#define GMODULE_AVAILABLE_IN_2_72 GMODULE_UNAVAILABLE (2, 72) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_72 GLIB_UNAVAILABLE_STATIC_INLINE (2, 72) +#define GMODULE_AVAILABLE_MACRO_IN_2_72 GLIB_UNAVAILABLE_MACRO (2, 72) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_72 GLIB_UNAVAILABLE_ENUMERATOR (2, 72) +#define GMODULE_AVAILABLE_TYPE_IN_2_72 GLIB_UNAVAILABLE_TYPE (2, 72) +#else +#define GMODULE_AVAILABLE_IN_2_72 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_72 +#define GMODULE_AVAILABLE_MACRO_IN_2_72 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_72 +#define GMODULE_AVAILABLE_TYPE_IN_2_72 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_74 +#define GMODULE_DEPRECATED_IN_2_74 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_74_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_74 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_74_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_74 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_74_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_74 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_74_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_74 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_74_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_74 +#define GMODULE_DEPRECATED_MACRO_IN_2_74_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_74 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_74_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_74 +#define GMODULE_DEPRECATED_TYPE_IN_2_74_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_74 +#define GMODULE_AVAILABLE_IN_2_74 GMODULE_UNAVAILABLE (2, 74) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_74 GLIB_UNAVAILABLE_STATIC_INLINE (2, 74) +#define GMODULE_AVAILABLE_MACRO_IN_2_74 GLIB_UNAVAILABLE_MACRO (2, 74) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_74 GLIB_UNAVAILABLE_ENUMERATOR (2, 74) +#define GMODULE_AVAILABLE_TYPE_IN_2_74 GLIB_UNAVAILABLE_TYPE (2, 74) +#else +#define GMODULE_AVAILABLE_IN_2_74 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_74 +#define GMODULE_AVAILABLE_MACRO_IN_2_74 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_74 +#define GMODULE_AVAILABLE_TYPE_IN_2_74 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_76 +#define GMODULE_DEPRECATED_IN_2_76 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_76_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_76 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_76_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_76 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_76_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_76 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_76_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_76 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_76_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_76 +#define GMODULE_DEPRECATED_MACRO_IN_2_76_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_76 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_76_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_76 +#define GMODULE_DEPRECATED_TYPE_IN_2_76_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_76 +#define GMODULE_AVAILABLE_IN_2_76 GMODULE_UNAVAILABLE (2, 76) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_76 GLIB_UNAVAILABLE_STATIC_INLINE (2, 76) +#define GMODULE_AVAILABLE_MACRO_IN_2_76 GLIB_UNAVAILABLE_MACRO (2, 76) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_76 GLIB_UNAVAILABLE_ENUMERATOR (2, 76) +#define GMODULE_AVAILABLE_TYPE_IN_2_76 GLIB_UNAVAILABLE_TYPE (2, 76) +#else +#define GMODULE_AVAILABLE_IN_2_76 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_76 +#define GMODULE_AVAILABLE_MACRO_IN_2_76 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_76 +#define GMODULE_AVAILABLE_TYPE_IN_2_76 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_78 +#define GMODULE_DEPRECATED_IN_2_78 GMODULE_DEPRECATED +#define GMODULE_DEPRECATED_IN_2_78_FOR(f) GMODULE_DEPRECATED_FOR (f) +#define GMODULE_DEPRECATED_MACRO_IN_2_78 GLIB_DEPRECATED_MACRO +#define GMODULE_DEPRECATED_MACRO_IN_2_78_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_78 GLIB_DEPRECATED_ENUMERATOR +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_78_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GMODULE_DEPRECATED_TYPE_IN_2_78 GLIB_DEPRECATED_TYPE +#define GMODULE_DEPRECATED_TYPE_IN_2_78_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GMODULE_DEPRECATED_IN_2_78 _GMODULE_EXTERN +#define GMODULE_DEPRECATED_IN_2_78_FOR(f) _GMODULE_EXTERN +#define GMODULE_DEPRECATED_MACRO_IN_2_78 +#define GMODULE_DEPRECATED_MACRO_IN_2_78_FOR(f) +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_78 +#define GMODULE_DEPRECATED_ENUMERATOR_IN_2_78_FOR(f) +#define GMODULE_DEPRECATED_TYPE_IN_2_78 +#define GMODULE_DEPRECATED_TYPE_IN_2_78_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_78 +#define GMODULE_AVAILABLE_IN_2_78 GMODULE_UNAVAILABLE (2, 78) +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_78 GLIB_UNAVAILABLE_STATIC_INLINE (2, 78) +#define GMODULE_AVAILABLE_MACRO_IN_2_78 GLIB_UNAVAILABLE_MACRO (2, 78) +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_78 GLIB_UNAVAILABLE_ENUMERATOR (2, 78) +#define GMODULE_AVAILABLE_TYPE_IN_2_78 GLIB_UNAVAILABLE_TYPE (2, 78) +#else +#define GMODULE_AVAILABLE_IN_2_78 _GMODULE_EXTERN +#define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_78 +#define GMODULE_AVAILABLE_MACRO_IN_2_78 +#define GMODULE_AVAILABLE_ENUMERATOR_IN_2_78 +#define GMODULE_AVAILABLE_TYPE_IN_2_78 +#endif diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gbinding.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gbinding.h new file mode 100644 index 0000000..8504de2 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gbinding.h @@ -0,0 +1,156 @@ +/* gbinding.h: Binding for object properties + * + * Copyright (C) 2010 Intel Corp. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * Author: Emmanuele Bassi + */ + +#ifndef __G_BINDING_H__ +#define __G_BINDING_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +#define G_TYPE_BINDING_FLAGS (g_binding_flags_get_type ()) + +#define G_TYPE_BINDING (g_binding_get_type ()) +#define G_BINDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_BINDING, GBinding)) +#define G_IS_BINDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_BINDING)) + +/** + * GBinding: + * + * GBinding is an opaque structure whose members + * cannot be accessed directly. + * + * Since: 2.26 + */ +typedef struct _GBinding GBinding; + +/** + * GBindingTransformFunc: + * @binding: a #GBinding + * @from_value: the #GValue containing the value to transform + * @to_value: the #GValue in which to store the transformed value + * @user_data: data passed to the transform function + * + * A function to be called to transform @from_value to @to_value. + * + * If this is the @transform_to function of a binding, then @from_value + * is the @source_property on the @source object, and @to_value is the + * @target_property on the @target object. If this is the + * @transform_from function of a %G_BINDING_BIDIRECTIONAL binding, + * then those roles are reversed. + * + * Returns: %TRUE if the transformation was successful, and %FALSE + * otherwise + * + * Since: 2.26 + */ +typedef gboolean (* GBindingTransformFunc) (GBinding *binding, + const GValue *from_value, + GValue *to_value, + gpointer user_data); + +/** + * GBindingFlags: + * @G_BINDING_DEFAULT: The default binding; if the source property + * changes, the target property is updated with its value. + * @G_BINDING_BIDIRECTIONAL: Bidirectional binding; if either the + * property of the source or the property of the target changes, + * the other is updated. + * @G_BINDING_SYNC_CREATE: Synchronize the values of the source and + * target properties when creating the binding; the direction of + * the synchronization is always from the source to the target. + * @G_BINDING_INVERT_BOOLEAN: If the two properties being bound are + * booleans, setting one to %TRUE will result in the other being + * set to %FALSE and vice versa. This flag will only work for + * boolean properties, and cannot be used when passing custom + * transformation functions to g_object_bind_property_full(). + * + * Flags to be passed to g_object_bind_property() or + * g_object_bind_property_full(). + * + * This enumeration can be extended at later date. + * + * Since: 2.26 + */ +typedef enum { /*< prefix=G_BINDING >*/ + G_BINDING_DEFAULT = 0, + + G_BINDING_BIDIRECTIONAL = 1 << 0, + G_BINDING_SYNC_CREATE = 1 << 1, + G_BINDING_INVERT_BOOLEAN = 1 << 2 +} GBindingFlags; + +GOBJECT_AVAILABLE_IN_ALL +GType g_binding_flags_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_binding_get_type (void) G_GNUC_CONST; + +GOBJECT_AVAILABLE_IN_ALL +GBindingFlags g_binding_get_flags (GBinding *binding); +GOBJECT_DEPRECATED_IN_2_68_FOR(g_binding_dup_source) +GObject * g_binding_get_source (GBinding *binding); +GOBJECT_AVAILABLE_IN_2_68 +GObject * g_binding_dup_source (GBinding *binding); +GOBJECT_DEPRECATED_IN_2_68_FOR(g_binding_dup_target) +GObject * g_binding_get_target (GBinding *binding); +GOBJECT_AVAILABLE_IN_2_68 +GObject * g_binding_dup_target (GBinding *binding); +GOBJECT_AVAILABLE_IN_ALL +const gchar * g_binding_get_source_property (GBinding *binding); +GOBJECT_AVAILABLE_IN_ALL +const gchar * g_binding_get_target_property (GBinding *binding); +GOBJECT_AVAILABLE_IN_2_38 +void g_binding_unbind (GBinding *binding); + +GOBJECT_AVAILABLE_IN_ALL +GBinding *g_object_bind_property (gpointer source, + const gchar *source_property, + gpointer target, + const gchar *target_property, + GBindingFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GBinding *g_object_bind_property_full (gpointer source, + const gchar *source_property, + gpointer target, + const gchar *target_property, + GBindingFlags flags, + GBindingTransformFunc transform_to, + GBindingTransformFunc transform_from, + gpointer user_data, + GDestroyNotify notify); +GOBJECT_AVAILABLE_IN_ALL +GBinding *g_object_bind_property_with_closures (gpointer source, + const gchar *source_property, + gpointer target, + const gchar *target_property, + GBindingFlags flags, + GClosure *transform_to, + GClosure *transform_from); + +G_END_DECLS + +#endif /* __G_BINDING_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gbindinggroup.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gbindinggroup.h new file mode 100644 index 0000000..4cbdfe4 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gbindinggroup.h @@ -0,0 +1,85 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * + * Copyright (C) 2015-2022 Christian Hergert + * Copyright (C) 2015 Garrett Regier + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef __G_BINDING_GROUP_H__ +#define __G_BINDING_GROUP_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include + +G_BEGIN_DECLS + +#define G_BINDING_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_BINDING_GROUP, GBindingGroup)) +#define G_IS_BINDING_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_BINDING_GROUP)) +#define G_TYPE_BINDING_GROUP (g_binding_group_get_type()) + +/** + * GBindingGroup: + * + * GBindingGroup is an opaque structure whose members + * cannot be accessed directly. + * + * Since: 2.72 + */ +typedef struct _GBindingGroup GBindingGroup; + +GOBJECT_AVAILABLE_IN_2_72 +GType g_binding_group_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_72 +GBindingGroup *g_binding_group_new (void); +GOBJECT_AVAILABLE_IN_2_72 +gpointer g_binding_group_dup_source (GBindingGroup *self); +GOBJECT_AVAILABLE_IN_2_72 +void g_binding_group_set_source (GBindingGroup *self, + gpointer source); +GOBJECT_AVAILABLE_IN_2_72 +void g_binding_group_bind (GBindingGroup *self, + const gchar *source_property, + gpointer target, + const gchar *target_property, + GBindingFlags flags); +GOBJECT_AVAILABLE_IN_2_72 +void g_binding_group_bind_full (GBindingGroup *self, + const gchar *source_property, + gpointer target, + const gchar *target_property, + GBindingFlags flags, + GBindingTransformFunc transform_to, + GBindingTransformFunc transform_from, + gpointer user_data, + GDestroyNotify user_data_destroy); +GOBJECT_AVAILABLE_IN_2_72 +void g_binding_group_bind_with_closures (GBindingGroup *self, + const gchar *source_property, + gpointer target, + const gchar *target_property, + GBindingFlags flags, + GClosure *transform_to, + GClosure *transform_from); + +G_END_DECLS + +#endif /* __G_BINDING_GROUP_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gboxed.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gboxed.h new file mode 100644 index 0000000..d7b3d4e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gboxed.h @@ -0,0 +1,124 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 2000-2001 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ +#ifndef __G_BOXED_H__ +#define __G_BOXED_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +#ifndef __GI_SCANNER__ +#include +#endif + +G_BEGIN_DECLS + +/* --- type macros --- */ +#define G_TYPE_IS_BOXED(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_BOXED) +/** + * G_VALUE_HOLDS_BOXED: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values derived + * from type %G_TYPE_BOXED. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_BOXED(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOXED)) + + +/* --- typedefs --- */ +/** + * GBoxedCopyFunc: + * @boxed: (not nullable): The boxed structure to be copied. + * + * This function is provided by the user and should produce a copy + * of the passed in boxed structure. + * + * Returns: (not nullable): The newly created copy of the boxed structure. + */ +typedef gpointer (*GBoxedCopyFunc) (gpointer boxed); + +/** + * GBoxedFreeFunc: + * @boxed: (not nullable): The boxed structure to be freed. + * + * This function is provided by the user and should free the boxed + * structure passed. + */ +typedef void (*GBoxedFreeFunc) (gpointer boxed); + + +/* --- prototypes --- */ +GOBJECT_AVAILABLE_IN_ALL +gpointer g_boxed_copy (GType boxed_type, + gconstpointer src_boxed); +GOBJECT_AVAILABLE_IN_ALL +void g_boxed_free (GType boxed_type, + gpointer boxed); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_boxed (GValue *value, + gconstpointer v_boxed); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_static_boxed (GValue *value, + gconstpointer v_boxed); +GOBJECT_AVAILABLE_IN_ALL +void g_value_take_boxed (GValue *value, + gconstpointer v_boxed); +GOBJECT_DEPRECATED_FOR(g_value_take_boxed) +void g_value_set_boxed_take_ownership (GValue *value, + gconstpointer v_boxed); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_value_get_boxed (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_value_dup_boxed (const GValue *value); + + +/* --- convenience --- */ +GOBJECT_AVAILABLE_IN_ALL +GType g_boxed_type_register_static (const gchar *name, + GBoxedCopyFunc boxed_copy, + GBoxedFreeFunc boxed_free); + +/* --- GObject boxed types --- */ +/** + * G_TYPE_CLOSURE: + * + * The #GType for #GClosure. + */ +#define G_TYPE_CLOSURE (g_closure_get_type ()) + +/** + * G_TYPE_VALUE: + * + * The type ID of the "GValue" type which is a boxed type, + * used to pass around pointers to GValues. + */ +#define G_TYPE_VALUE (g_value_get_type ()) + +GOBJECT_AVAILABLE_IN_ALL +GType g_closure_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_value_get_type (void) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __G_BOXED_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gclosure.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gclosure.h new file mode 100644 index 0000000..3b139b0 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gclosure.h @@ -0,0 +1,323 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 2000-2001 Red Hat, Inc. + * Copyright (C) 2005 Imendio AB + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ +#ifndef __G_CLOSURE_H__ +#define __G_CLOSURE_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/* --- defines --- */ +/** + * G_CLOSURE_NEEDS_MARSHAL: + * @closure: a #GClosure + * + * Check if the closure still needs a marshaller. See g_closure_set_marshal(). + * + * Returns: %TRUE if a #GClosureMarshal marshaller has not yet been set on + * @closure. + */ +#define G_CLOSURE_NEEDS_MARSHAL(closure) (((GClosure*) (closure))->marshal == NULL) +/** + * G_CLOSURE_N_NOTIFIERS: + * @cl: a #GClosure + * + * Get the total number of notifiers connected with the closure @cl. + * + * The count includes the meta marshaller, the finalize and invalidate notifiers + * and the marshal guards. Note that each guard counts as two notifiers. + * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(), + * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards(). + * + * Returns: number of notifiers + */ +#define G_CLOSURE_N_NOTIFIERS(cl) (((cl)->n_guards << 1L) + \ + (cl)->n_fnotifiers + (cl)->n_inotifiers) +/** + * G_CCLOSURE_SWAP_DATA: + * @cclosure: a #GCClosure + * + * Checks whether the user data of the #GCClosure should be passed as the + * first parameter to the callback. See g_cclosure_new_swap(). + * + * Returns: %TRUE if data has to be swapped. + */ +#define G_CCLOSURE_SWAP_DATA(cclosure) (((GClosure*) (cclosure))->derivative_flag) +/** + * G_CALLBACK: + * @f: a function pointer. + * + * Cast a function pointer to a #GCallback. + */ +#define G_CALLBACK(f) ((GCallback) (f)) + + +/* -- typedefs --- */ +typedef struct _GClosure GClosure; +typedef struct _GClosureNotifyData GClosureNotifyData; + +/** + * GCallback: + * + * The type used for callback functions in structure definitions and function + * signatures. + * + * This doesn't mean that all callback functions must take no parameters and + * return void. The required signature of a callback function is determined by + * the context in which is used (e.g. the signal to which it is connected). + * + * Use G_CALLBACK() to cast the callback function to a #GCallback. + */ +typedef void (*GCallback) (void); +/** + * GClosureNotify: + * @data: data specified when registering the notification callback + * @closure: the #GClosure on which the notification is emitted + * + * The type used for the various notification callbacks which can be registered + * on closures. + */ +typedef void (*GClosureNotify) (gpointer data, + GClosure *closure); +/** + * GClosureMarshal: + * @closure: the #GClosure to which the marshaller belongs + * @return_value: (nullable): a #GValue to store the return + * value. May be %NULL if the callback of @closure doesn't return a + * value. + * @n_param_values: the length of the @param_values array + * @param_values: (array length=n_param_values): an array of + * #GValues holding the arguments on which to invoke the + * callback of @closure + * @invocation_hint: (nullable): the invocation hint given as the + * last argument to g_closure_invoke() + * @marshal_data: (nullable): additional data specified when + * registering the marshaller, see g_closure_set_marshal() and + * g_closure_set_meta_marshal() + * + * The type used for marshaller functions. + */ +typedef void (*GClosureMarshal) (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + +/** + * GVaClosureMarshal: + * @closure: the #GClosure to which the marshaller belongs + * @return_value: (nullable): a #GValue to store the return + * value. May be %NULL if the callback of @closure doesn't return a + * value. + * @instance: (type GObject.TypeInstance): the instance on which the closure is + * invoked. + * @args: va_list of arguments to be passed to the closure. + * @marshal_data: (nullable): additional data specified when + * registering the marshaller, see g_closure_set_marshal() and + * g_closure_set_meta_marshal() + * @n_params: the length of the @param_types array + * @param_types: (array length=n_params): the #GType of each argument from + * @args. + * + * This is the signature of va_list marshaller functions, an optional + * marshaller that can be used in some situations to avoid + * marshalling the signal argument into GValues. + */ +typedef void (* GVaClosureMarshal) (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/** + * GCClosure: + * @closure: the #GClosure + * @callback: the callback function + * + * A #GCClosure is a specialization of #GClosure for C function callbacks. + */ +typedef struct _GCClosure GCClosure; + + +/* --- structures --- */ +struct _GClosureNotifyData +{ + gpointer data; + GClosureNotify notify; +}; +/** + * GClosure: + * @in_marshal: Indicates whether the closure is currently being invoked with + * g_closure_invoke() + * @is_invalid: Indicates whether the closure has been invalidated by + * g_closure_invalidate() + * + * A #GClosure represents a callback supplied by the programmer. + */ +struct _GClosure +{ + /*< private >*/ + guint ref_count : 15; /* (atomic) */ + /* meta_marshal is not used anymore but must be zero for historical reasons + as it was exposed in the G_CLOSURE_N_NOTIFIERS macro */ + guint meta_marshal_nouse : 1; /* (atomic) */ + guint n_guards : 1; /* (atomic) */ + guint n_fnotifiers : 2; /* finalization notifiers (atomic) */ + guint n_inotifiers : 8; /* invalidation notifiers (atomic) */ + guint in_inotify : 1; /* (atomic) */ + guint floating : 1; /* (atomic) */ + /*< protected >*/ + guint derivative_flag : 1; /* (atomic) */ + /*< public >*/ + guint in_marshal : 1; /* (atomic) */ + guint is_invalid : 1; /* (atomic) */ + + /*< private >*/ void (*marshal) (GClosure *closure, + GValue /*out*/ *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + /*< protected >*/ gpointer data; + + /*< private >*/ GClosureNotifyData *notifiers; + + /* invariants/constraints: + * - ->marshal and ->data are _invalid_ as soon as ->is_invalid==TRUE + * - invocation of all inotifiers occurs prior to fnotifiers + * - order of inotifiers is random + * inotifiers may _not_ free/invalidate parameter values (e.g. ->data) + * - order of fnotifiers is random + * - each notifier may only be removed before or during its invocation + * - reference counting may only happen prior to fnotify invocation + * (in that sense, fnotifiers are really finalization handlers) + */ +}; +/* closure for C function calls, callback() is the user function + */ +struct _GCClosure +{ + GClosure closure; + gpointer callback; +}; + + +/* --- prototypes --- */ +GOBJECT_AVAILABLE_IN_ALL +GClosure* g_cclosure_new (GCallback callback_func, + gpointer user_data, + GClosureNotify destroy_data); +GOBJECT_AVAILABLE_IN_ALL +GClosure* g_cclosure_new_swap (GCallback callback_func, + gpointer user_data, + GClosureNotify destroy_data); +GOBJECT_AVAILABLE_IN_ALL +GClosure* g_signal_type_cclosure_new (GType itype, + guint struct_offset); + + +/* --- prototypes --- */ +GOBJECT_AVAILABLE_IN_ALL +GClosure* g_closure_ref (GClosure *closure); +GOBJECT_AVAILABLE_IN_ALL +void g_closure_sink (GClosure *closure); +GOBJECT_AVAILABLE_IN_ALL +void g_closure_unref (GClosure *closure); +/* intimidating */ +GOBJECT_AVAILABLE_IN_ALL +GClosure* g_closure_new_simple (guint sizeof_closure, + gpointer data); +GOBJECT_AVAILABLE_IN_ALL +void g_closure_add_finalize_notifier (GClosure *closure, + gpointer notify_data, + GClosureNotify notify_func); +GOBJECT_AVAILABLE_IN_ALL +void g_closure_remove_finalize_notifier (GClosure *closure, + gpointer notify_data, + GClosureNotify notify_func); +GOBJECT_AVAILABLE_IN_ALL +void g_closure_add_invalidate_notifier (GClosure *closure, + gpointer notify_data, + GClosureNotify notify_func); +GOBJECT_AVAILABLE_IN_ALL +void g_closure_remove_invalidate_notifier (GClosure *closure, + gpointer notify_data, + GClosureNotify notify_func); +GOBJECT_AVAILABLE_IN_ALL +void g_closure_add_marshal_guards (GClosure *closure, + gpointer pre_marshal_data, + GClosureNotify pre_marshal_notify, + gpointer post_marshal_data, + GClosureNotify post_marshal_notify); +GOBJECT_AVAILABLE_IN_ALL +void g_closure_set_marshal (GClosure *closure, + GClosureMarshal marshal); +GOBJECT_AVAILABLE_IN_ALL +void g_closure_set_meta_marshal (GClosure *closure, + gpointer marshal_data, + GClosureMarshal meta_marshal); +GOBJECT_AVAILABLE_IN_ALL +void g_closure_invalidate (GClosure *closure); +GOBJECT_AVAILABLE_IN_ALL +void g_closure_invoke (GClosure *closure, + GValue /*out*/ *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint); + +/* FIXME: + OK: data_object::destroy -> closure_invalidate(); + MIS: closure_invalidate() -> disconnect(closure); + MIS: disconnect(closure) -> (unlink) closure_unref(); + OK: closure_finalize() -> g_free (data_string); + + random remarks: + - need marshaller repo with decent aliasing to base types + - provide marshaller collection, virtually covering anything out there +*/ + +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_generic (GClosure *closure, + GValue *return_gvalue, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_generic_va (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args_list, + gpointer marshal_data, + int n_params, + GType *param_types); + + +G_END_DECLS + +#endif /* __G_CLOSURE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/genums.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/genums.h new file mode 100644 index 0000000..d253b15 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/genums.h @@ -0,0 +1,381 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ +#ifndef __G_ENUMS_H__ +#define __G_ENUMS_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/* --- type macros --- */ +/** + * G_TYPE_IS_ENUM: + * @type: a #GType ID. + * + * Checks whether @type "is a" %G_TYPE_ENUM. + * + * Returns: %TRUE if @type "is a" %G_TYPE_ENUM. + */ +#define G_TYPE_IS_ENUM(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_ENUM) +/** + * G_ENUM_CLASS: + * @class: a valid #GEnumClass + * + * Casts a derived #GEnumClass structure into a #GEnumClass structure. + */ +#define G_ENUM_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_ENUM, GEnumClass)) +/** + * G_IS_ENUM_CLASS: + * @class: a #GEnumClass + * + * Checks whether @class "is a" valid #GEnumClass structure of type %G_TYPE_ENUM + * or derived. + */ +#define G_IS_ENUM_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_ENUM)) +/** + * G_ENUM_CLASS_TYPE: + * @class: a #GEnumClass + * + * Get the type identifier from a given #GEnumClass structure. + * + * Returns: the #GType + */ +#define G_ENUM_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class)) +/** + * G_ENUM_CLASS_TYPE_NAME: + * @class: a #GEnumClass + * + * Get the static type name from a given #GEnumClass structure. + * + * Returns: the type name. + */ +#define G_ENUM_CLASS_TYPE_NAME(class) (g_type_name (G_ENUM_CLASS_TYPE (class))) + + +/** + * G_TYPE_IS_FLAGS: + * @type: a #GType ID. + * + * Checks whether @type "is a" %G_TYPE_FLAGS. + * + * Returns: %TRUE if @type "is a" %G_TYPE_FLAGS. + */ +#define G_TYPE_IS_FLAGS(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_FLAGS) +/** + * G_FLAGS_CLASS: + * @class: a valid #GFlagsClass + * + * Casts a derived #GFlagsClass structure into a #GFlagsClass structure. + */ +#define G_FLAGS_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_FLAGS, GFlagsClass)) +/** + * G_IS_FLAGS_CLASS: + * @class: a #GFlagsClass + * + * Checks whether @class "is a" valid #GFlagsClass structure of type %G_TYPE_FLAGS + * or derived. + */ +#define G_IS_FLAGS_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_FLAGS)) +/** + * G_FLAGS_CLASS_TYPE: + * @class: a #GFlagsClass + * + * Get the type identifier from a given #GFlagsClass structure. + * + * Returns: the #GType + */ +#define G_FLAGS_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class)) +/** + * G_FLAGS_CLASS_TYPE_NAME: + * @class: a #GFlagsClass + * + * Get the static type name from a given #GFlagsClass structure. + * + * Returns: the type name. + */ +#define G_FLAGS_CLASS_TYPE_NAME(class) (g_type_name (G_FLAGS_CLASS_TYPE (class))) + + +/** + * G_VALUE_HOLDS_ENUM: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values derived from type %G_TYPE_ENUM. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_ENUM(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_ENUM)) +/** + * G_VALUE_HOLDS_FLAGS: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values derived from type %G_TYPE_FLAGS. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_FLAGS(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLAGS)) + + +/* --- enum/flag values & classes --- */ +typedef struct _GEnumClass GEnumClass; +typedef struct _GFlagsClass GFlagsClass; +typedef struct _GEnumValue GEnumValue; +typedef struct _GFlagsValue GFlagsValue; + +/** + * GEnumClass: + * @g_type_class: the parent class + * @minimum: the smallest possible value. + * @maximum: the largest possible value. + * @n_values: the number of possible values. + * @values: an array of #GEnumValue structs describing the + * individual values. + * + * The class of an enumeration type holds information about its + * possible values. + */ +struct _GEnumClass +{ + GTypeClass g_type_class; + + /*< public >*/ + gint minimum; + gint maximum; + guint n_values; + GEnumValue *values; +}; +/** + * GFlagsClass: + * @g_type_class: the parent class + * @mask: a mask covering all possible values. + * @n_values: the number of possible values. + * @values: an array of #GFlagsValue structs describing the + * individual values. + * + * The class of a flags type holds information about its + * possible values. + */ +struct _GFlagsClass +{ + GTypeClass g_type_class; + + /*< public >*/ + guint mask; + guint n_values; + GFlagsValue *values; +}; +/** + * GEnumValue: + * @value: the enum value + * @value_name: the name of the value + * @value_nick: the nickname of the value + * + * A structure which contains a single enum value, its name, and its + * nickname. + */ +struct _GEnumValue +{ + gint value; + const gchar *value_name; + const gchar *value_nick; +}; +/** + * GFlagsValue: + * @value: the flags value + * @value_name: the name of the value + * @value_nick: the nickname of the value + * + * A structure which contains a single flags value, its name, and its + * nickname. + */ +struct _GFlagsValue +{ + guint value; + const gchar *value_name; + const gchar *value_nick; +}; + + +/* --- prototypes --- */ +GOBJECT_AVAILABLE_IN_ALL +GEnumValue* g_enum_get_value (GEnumClass *enum_class, + gint value); +GOBJECT_AVAILABLE_IN_ALL +GEnumValue* g_enum_get_value_by_name (GEnumClass *enum_class, + const gchar *name); +GOBJECT_AVAILABLE_IN_ALL +GEnumValue* g_enum_get_value_by_nick (GEnumClass *enum_class, + const gchar *nick); +GOBJECT_AVAILABLE_IN_ALL +GFlagsValue* g_flags_get_first_value (GFlagsClass *flags_class, + guint value); +GOBJECT_AVAILABLE_IN_ALL +GFlagsValue* g_flags_get_value_by_name (GFlagsClass *flags_class, + const gchar *name); +GOBJECT_AVAILABLE_IN_ALL +GFlagsValue* g_flags_get_value_by_nick (GFlagsClass *flags_class, + const gchar *nick); +GOBJECT_AVAILABLE_IN_2_54 +gchar *g_enum_to_string (GType g_enum_type, + gint value); +GOBJECT_AVAILABLE_IN_2_54 +gchar *g_flags_to_string (GType flags_type, + guint value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_enum (GValue *value, + gint v_enum); +GOBJECT_AVAILABLE_IN_ALL +gint g_value_get_enum (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_flags (GValue *value, + guint v_flags); +GOBJECT_AVAILABLE_IN_ALL +guint g_value_get_flags (const GValue *value); + + + +/* --- registration functions --- */ +/* const_static_values is a NULL terminated array of enum/flags + * values that is taken over! + */ +GOBJECT_AVAILABLE_IN_ALL +GType g_enum_register_static (const gchar *name, + const GEnumValue *const_static_values); +GOBJECT_AVAILABLE_IN_ALL +GType g_flags_register_static (const gchar *name, + const GFlagsValue *const_static_values); +/* functions to complete the type information + * for enums/flags implemented by plugins + */ +GOBJECT_AVAILABLE_IN_ALL +void g_enum_complete_type_info (GType g_enum_type, + GTypeInfo *info, + const GEnumValue *const_values); +GOBJECT_AVAILABLE_IN_ALL +void g_flags_complete_type_info (GType g_flags_type, + GTypeInfo *info, + const GFlagsValue *const_values); + +/* {{{ Macros */ + +/** + * G_DEFINE_ENUM_VALUE: + * @EnumValue: an enumeration value + * @EnumNick: a short string representing the enumeration value + * + * Defines an enumeration value, and maps it to a "nickname". + * + * This macro can only be used with G_DEFINE_ENUM_TYPE() and + * G_DEFINE_FLAGS_TYPE(). + * + * Since: 2.74 + */ +#define G_DEFINE_ENUM_VALUE(EnumValue, EnumNick) \ + { EnumValue, #EnumValue, EnumNick } \ + GOBJECT_AVAILABLE_MACRO_IN_2_74 + +/** + * G_DEFINE_ENUM_TYPE: + * @TypeName: the enumeration type, in `CamelCase` + * @type_name: the enumeration type prefixed, in `snake_case` + * @...: a list of enumeration values, defined using G_DEFINE_ENUM_VALUE() + * + * A convenience macro for defining enumeration types. + * + * This macro will generate a `*_get_type()` function for the + * given @TypeName, using @type_name as the function prefix. + * + * |[ + * G_DEFINE_ENUM_TYPE (GtkOrientation, gtk_orientation, + * G_DEFINE_ENUM_VALUE (GTK_ORIENTATION_HORIZONTAL, "horizontal"), + * G_DEFINE_ENUM_VALUE (GTK_ORIENTATION_VERTICAL, "vertical")) + * ]| + * + * For projects that have multiple enumeration types, or enumeration + * types with many values, you should consider using glib-mkenums to + * generate the type function. + * + * Since: 2.74 + */ +#define G_DEFINE_ENUM_TYPE(TypeName, type_name, ...) \ +GType \ +type_name ## _get_type (void) { \ + static gsize g_define_type__static = 0; \ + if (g_once_init_enter (&g_define_type__static)) { \ + static const GEnumValue enum_values[] = { \ + __VA_ARGS__ , \ + { 0, NULL, NULL }, \ + }; \ + GType g_define_type = g_enum_register_static (g_intern_static_string (#TypeName), enum_values); \ + g_once_init_leave (&g_define_type__static, g_define_type); \ + } \ + return g_define_type__static; \ +} \ + GOBJECT_AVAILABLE_MACRO_IN_2_74 + +/** + * G_DEFINE_FLAGS_TYPE: + * @TypeName: the enumeration type, in `CamelCase` + * @type_name: the enumeration type prefixed, in `snake_case` + * @...: a list of enumeration values, defined using G_DEFINE_ENUM_VALUE() + * + * A convenience macro for defining flag types. + * + * This macro will generate a `*_get_type()` function for the + * given @TypeName, using @type_name as the function prefix. + * + * |[ + * G_DEFINE_FLAGS_TYPE (GSettingsBindFlags, g_settings_bind_flags, + * G_DEFINE_ENUM_VALUE (G_SETTINGS_BIND_DEFAULT, "default"), + * G_DEFINE_ENUM_VALUE (G_SETTINGS_BIND_GET, "get"), + * G_DEFINE_ENUM_VALUE (G_SETTINGS_BIND_SET, "set"), + * G_DEFINE_ENUM_VALUE (G_SETTINGS_BIND_NO_SENSITIVITY, "no-sensitivity"), + * G_DEFINE_ENUM_VALUE (G_SETTINGS_BIND_GET_NO_CHANGES, "get-no-changes"), + * G_DEFINE_ENUM_VALUE (G_SETTINGS_BIND_INVERT_BOOLEAN, "invert-boolean")) + * ]| + * + * For projects that have multiple enumeration types, or enumeration + * types with many values, you should consider using glib-mkenums to + * generate the type function. + * + * Since: 2.74 + */ +#define G_DEFINE_FLAGS_TYPE(TypeName, type_name, ...) \ +GType \ +type_name ## _get_type (void) { \ + static gsize g_define_type__static = 0; \ + if (g_once_init_enter (&g_define_type__static)) { \ + static const GFlagsValue flags_values[] = { \ + __VA_ARGS__ , \ + { 0, NULL, NULL }, \ + }; \ + GType g_define_type = g_flags_register_static (g_intern_static_string (#TypeName), flags_values); \ + g_once_init_leave (&g_define_type__static, g_define_type); \ + } \ + return g_define_type__static; \ +} \ + GOBJECT_AVAILABLE_MACRO_IN_2_74 + +G_END_DECLS + +#endif /* __G_ENUMS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/glib-enumtypes.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/glib-enumtypes.h new file mode 100644 index 0000000..a2c47a8 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/glib-enumtypes.h @@ -0,0 +1,25 @@ + +/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ + +#ifndef __GOBJECT_ENUM_TYPES_H__ +#define __GOBJECT_ENUM_TYPES_H__ + +#include + +G_BEGIN_DECLS + +/* enumerations from "../src/glib-2-322e03f702.clean/gobject/../glib/gunicode.h" */ +GOBJECT_AVAILABLE_IN_2_60 GType g_unicode_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_UNICODE_TYPE (g_unicode_type_get_type ()) +GOBJECT_AVAILABLE_IN_2_60 GType g_unicode_break_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_UNICODE_BREAK_TYPE (g_unicode_break_type_get_type ()) +GOBJECT_AVAILABLE_IN_2_60 GType g_unicode_script_get_type (void) G_GNUC_CONST; +#define G_TYPE_UNICODE_SCRIPT (g_unicode_script_get_type ()) +GOBJECT_AVAILABLE_IN_2_60 GType g_normalize_mode_get_type (void) G_GNUC_CONST; +#define G_TYPE_NORMALIZE_MODE (g_normalize_mode_get_type ()) +G_END_DECLS + +#endif /* __GOBJECT_ENUM_TYPES_H__ */ + +/* Generated data ends here */ + diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/glib-types.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/glib-types.h new file mode 100644 index 0000000..87065b9 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/glib-types.h @@ -0,0 +1,409 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 2000-2001 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ +#ifndef __GLIB_TYPES_H__ +#define __GLIB_TYPES_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) && !defined(GLIB_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +/* A hack necesssary to preprocess this file with g-ir-scanner */ +#ifdef __GI_SCANNER__ +typedef gsize GType; +#endif + +/* --- GLib boxed types --- */ +/** + * G_TYPE_DATE: + * + * The #GType for #GDate. + */ +#define G_TYPE_DATE (g_date_get_type ()) + +/** + * G_TYPE_STRV: + * + * The #GType for a boxed type holding a %NULL-terminated array of strings. + * + * The code fragments in the following example show the use of a property of + * type %G_TYPE_STRV with g_object_class_install_property(), g_object_set() + * and g_object_get(). + * + * |[ + * g_object_class_install_property (object_class, + * PROP_AUTHORS, + * g_param_spec_boxed ("authors", + * _("Authors"), + * _("List of authors"), + * G_TYPE_STRV, + * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + * + * gchar *authors[] = { "Owen", "Tim", NULL }; + * g_object_set (obj, "authors", authors, NULL); + * + * gchar *writers[]; + * g_object_get (obj, "authors", &writers, NULL); + * /* do something with writers */ + * g_strfreev (writers); + * ]| + * + * Since: 2.4 + */ +#define G_TYPE_STRV (g_strv_get_type ()) + +/** + * G_TYPE_GSTRING: + * + * The #GType for #GString. + */ +#define G_TYPE_GSTRING (g_gstring_get_type ()) + +/** + * G_TYPE_HASH_TABLE: + * + * The #GType for a boxed type holding a #GHashTable reference. + * + * Since: 2.10 + */ +#define G_TYPE_HASH_TABLE (g_hash_table_get_type ()) + +/** + * G_TYPE_REGEX: + * + * The #GType for a boxed type holding a #GRegex reference. + * + * Since: 2.14 + */ +#define G_TYPE_REGEX (g_regex_get_type ()) + +/** + * G_TYPE_MATCH_INFO: + * + * The #GType for a boxed type holding a #GMatchInfo reference. + * + * Since: 2.30 + */ +#define G_TYPE_MATCH_INFO (g_match_info_get_type ()) + +/** + * G_TYPE_ARRAY: + * + * The #GType for a boxed type holding a #GArray reference. + * + * Since: 2.22 + */ +#define G_TYPE_ARRAY (g_array_get_type ()) + +/** + * G_TYPE_BYTE_ARRAY: + * + * The #GType for a boxed type holding a #GByteArray reference. + * + * Since: 2.22 + */ +#define G_TYPE_BYTE_ARRAY (g_byte_array_get_type ()) + +/** + * G_TYPE_PTR_ARRAY: + * + * The #GType for a boxed type holding a #GPtrArray reference. + * + * Since: 2.22 + */ +#define G_TYPE_PTR_ARRAY (g_ptr_array_get_type ()) + +/** + * G_TYPE_BYTES: + * + * The #GType for #GBytes. + * + * Since: 2.32 + */ +#define G_TYPE_BYTES (g_bytes_get_type ()) + +/** + * G_TYPE_VARIANT_TYPE: + * + * The #GType for a boxed type holding a #GVariantType. + * + * Since: 2.24 + */ +#define G_TYPE_VARIANT_TYPE (g_variant_type_get_gtype ()) + +/** + * G_TYPE_ERROR: + * + * The #GType for a boxed type holding a #GError. + * + * Since: 2.26 + */ +#define G_TYPE_ERROR (g_error_get_type ()) + +/** + * G_TYPE_DATE_TIME: + * + * The #GType for a boxed type holding a #GDateTime. + * + * Since: 2.26 + */ +#define G_TYPE_DATE_TIME (g_date_time_get_type ()) + +/** + * G_TYPE_TIME_ZONE: + * + * The #GType for a boxed type holding a #GTimeZone. + * + * Since: 2.34 + */ +#define G_TYPE_TIME_ZONE (g_time_zone_get_type ()) + +/** + * G_TYPE_IO_CHANNEL: + * + * The #GType for #GIOChannel. + */ +#define G_TYPE_IO_CHANNEL (g_io_channel_get_type ()) + +/** + * G_TYPE_IO_CONDITION: + * + * The #GType for #GIOCondition. + */ +#define G_TYPE_IO_CONDITION (g_io_condition_get_type ()) + +/** + * G_TYPE_VARIANT_BUILDER: + * + * The #GType for a boxed type holding a #GVariantBuilder. + * + * Since: 2.30 + */ +#define G_TYPE_VARIANT_BUILDER (g_variant_builder_get_type ()) + +/** + * G_TYPE_VARIANT_DICT: + * + * The #GType for a boxed type holding a #GVariantDict. + * + * Since: 2.40 + */ +#define G_TYPE_VARIANT_DICT (g_variant_dict_get_type ()) + +/** + * G_TYPE_MAIN_LOOP: + * + * The #GType for a boxed type holding a #GMainLoop. + * + * Since: 2.30 + */ +#define G_TYPE_MAIN_LOOP (g_main_loop_get_type ()) + +/** + * G_TYPE_MAIN_CONTEXT: + * + * The #GType for a boxed type holding a #GMainContext. + * + * Since: 2.30 + */ +#define G_TYPE_MAIN_CONTEXT (g_main_context_get_type ()) + +/** + * G_TYPE_SOURCE: + * + * The #GType for a boxed type holding a #GSource. + * + * Since: 2.30 + */ +#define G_TYPE_SOURCE (g_source_get_type ()) + +/** + * G_TYPE_POLLFD: + * + * The #GType for a boxed type holding a #GPollFD. + * + * Since: 2.36 + */ +#define G_TYPE_POLLFD (g_pollfd_get_type ()) + +/** + * G_TYPE_MARKUP_PARSE_CONTEXT: + * + * The #GType for a boxed type holding a #GMarkupParseContext. + * + * Since: 2.36 + */ +#define G_TYPE_MARKUP_PARSE_CONTEXT (g_markup_parse_context_get_type ()) + +/** + * G_TYPE_KEY_FILE: + * + * The #GType for a boxed type holding a #GKeyFile. + * + * Since: 2.32 + */ +#define G_TYPE_KEY_FILE (g_key_file_get_type ()) + +/** + * G_TYPE_MAPPED_FILE: + * + * The #GType for a boxed type holding a #GMappedFile. + * + * Since: 2.40 + */ +#define G_TYPE_MAPPED_FILE (g_mapped_file_get_type ()) + +/** + * G_TYPE_THREAD: + * + * The #GType for a boxed type holding a #GThread. + * + * Since: 2.36 + */ +#define G_TYPE_THREAD (g_thread_get_type ()) + +/** + * G_TYPE_CHECKSUM: + * + * The #GType for a boxed type holding a #GChecksum. + * + * Since: 2.36 + */ +#define G_TYPE_CHECKSUM (g_checksum_get_type ()) + +/** + * G_TYPE_OPTION_GROUP: + * + * The #GType for a boxed type holding a #GOptionGroup. + * + * Since: 2.44 + */ +#define G_TYPE_OPTION_GROUP (g_option_group_get_type ()) + +/** + * G_TYPE_URI: + * + * The #GType for a boxed type holding a #GUri. + * + * Since: 2.66 + */ +#define G_TYPE_URI (g_uri_get_type ()) + +/** + * G_TYPE_TREE: + * + * The #GType for #GTree. + * + * Since: 2.68 + */ +#define G_TYPE_TREE (g_tree_get_type ()) + +/** + * G_TYPE_PATTERN_SPEC: + * + * The #GType for #GPatternSpec. + * + * Since: 2.70 + */ +#define G_TYPE_PATTERN_SPEC (g_pattern_spec_get_type ()) + +/** + * G_TYPE_BOOKMARK_FILE: + * + * The #GType for a boxed type holding a #GBookmarkFile. + * + * Since: 2.76 + */ +#define G_TYPE_BOOKMARK_FILE (g_bookmark_file_get_type ()) + +GOBJECT_AVAILABLE_IN_ALL +GType g_date_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_strv_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_gstring_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_hash_table_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_array_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_byte_array_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_ptr_array_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_bytes_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_variant_type_get_gtype (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_regex_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_30 +GType g_match_info_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_error_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_date_time_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_time_zone_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_io_channel_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_io_condition_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_variant_builder_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_40 +GType g_variant_dict_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +GType g_key_file_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_30 +GType g_main_loop_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_30 +GType g_main_context_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_30 +GType g_source_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_36 +GType g_pollfd_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_36 +GType g_thread_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_36 +GType g_checksum_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_36 +GType g_markup_parse_context_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_40 +GType g_mapped_file_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_44 +GType g_option_group_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_66 +GType g_uri_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_68 +GType g_tree_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_70 +GType g_pattern_spec_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_76 +GType g_bookmark_file_get_type (void) G_GNUC_CONST; + +GOBJECT_DEPRECATED_FOR('G_TYPE_VARIANT') +GType g_variant_get_gtype (void) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __GLIB_TYPES_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gmarshal.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gmarshal.h new file mode 100644 index 0000000..96c7c4e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gmarshal.h @@ -0,0 +1,434 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +#ifndef __G_MARSHAL_H__ +#define __G_MARSHAL_H__ + +G_BEGIN_DECLS + +/* VOID:VOID */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__VOID (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__VOIDv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:BOOLEAN */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__BOOLEAN (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__BOOLEANv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:CHAR */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__CHAR (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__CHARv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:UCHAR */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__UCHAR (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__UCHARv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:INT */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__INT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__INTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:UINT */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__UINTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:LONG */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__LONG (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__LONGv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:ULONG */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__ULONG (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__ULONGv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:ENUM */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__ENUM (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__ENUMv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:FLAGS */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__FLAGS (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__FLAGSv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:FLOAT */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__FLOAT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__FLOATv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:DOUBLE */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__DOUBLE (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__DOUBLEv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:STRING */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__STRINGv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:PARAM */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__PARAM (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__PARAMv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:BOXED */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__BOXEDv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:POINTER */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__POINTERv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:OBJECT */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__OBJECT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__OBJECTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:VARIANT */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__VARIANT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__VARIANTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:UINT,POINTER */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__UINT_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_VOID__UINT_POINTERv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* BOOL:FLAGS */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_BOOLEAN__FLAGS (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_BOOLEAN__FLAGSv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/** + * g_cclosure_marshal_BOOL__FLAGS: + * @closure: A #GClosure. + * @return_value: A #GValue to store the return value. May be %NULL + * if the callback of closure doesn't return a value. + * @n_param_values: The length of the @param_values array. + * @param_values: An array of #GValues holding the arguments + * on which to invoke the callback of closure. + * @invocation_hint: The invocation hint given as the last argument to + * g_closure_invoke(). + * @marshal_data: Additional data specified when registering the + * marshaller, see g_closure_set_marshal() and + * g_closure_set_meta_marshal() + * + * An old alias for g_cclosure_marshal_BOOLEAN__FLAGS(). + */ +#define g_cclosure_marshal_BOOL__FLAGS g_cclosure_marshal_BOOLEAN__FLAGS + +/* STRING:OBJECT,POINTER */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_STRING__OBJECT_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_STRING__OBJECT_POINTERv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* BOOL:BOXED,BOXED */ +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_BOOLEAN__BOXED_BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +GOBJECT_AVAILABLE_IN_ALL +void g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/** + * g_cclosure_marshal_BOOL__BOXED_BOXED: + * @closure: A #GClosure. + * @return_value: A #GValue to store the return value. May be %NULL + * if the callback of closure doesn't return a value. + * @n_param_values: The length of the @param_values array. + * @param_values: An array of #GValues holding the arguments + * on which to invoke the callback of closure. + * @invocation_hint: The invocation hint given as the last argument to + * g_closure_invoke(). + * @marshal_data: Additional data specified when registering the + * marshaller, see g_closure_set_marshal() and + * g_closure_set_meta_marshal() + * + * An old alias for g_cclosure_marshal_BOOLEAN__BOXED_BOXED(). + */ +#define g_cclosure_marshal_BOOL__BOXED_BOXED g_cclosure_marshal_BOOLEAN__BOXED_BOXED + +G_END_DECLS + +#endif /* __G_MARSHAL_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gobject-autocleanups.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gobject-autocleanups.h new file mode 100644 index 0000000..bddb3f2 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gobject-autocleanups.h @@ -0,0 +1,33 @@ +/* + * Copyright © 2015 Canonical Limited + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Author: Ryan Lortie + */ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GClosure, g_closure_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GEnumClass, g_type_class_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFlagsClass, g_type_class_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GObject, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitiallyUnowned, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GParamSpec, g_param_spec_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTypeClass, g_type_class_unref) +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_unset) diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gobject-visibility.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gobject-visibility.h new file mode 100644 index 0000000..08c9c54 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gobject-visibility.h @@ -0,0 +1,952 @@ +#pragma once + +#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(GOBJECT_STATIC_COMPILATION) +# define _GOBJECT_EXPORT __declspec(dllexport) +# define _GOBJECT_IMPORT __declspec(dllimport) +#elif __GNUC__ >= 4 +# define _GOBJECT_EXPORT __attribute__((visibility("default"))) +# define _GOBJECT_IMPORT +#else +# define _GOBJECT_EXPORT +# define _GOBJECT_IMPORT +#endif +#ifdef GOBJECT_COMPILATION +# define _GOBJECT_API _GOBJECT_EXPORT +#else +# define _GOBJECT_API _GOBJECT_IMPORT +#endif + +#define _GOBJECT_EXTERN _GOBJECT_API extern + +#define GOBJECT_VAR _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_IN_ALL _GOBJECT_EXTERN + +#ifdef GLIB_DISABLE_DEPRECATION_WARNINGS +#define GOBJECT_DEPRECATED _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_UNAVAILABLE(maj,min) _GOBJECT_EXTERN +#define GOBJECT_UNAVAILABLE_STATIC_INLINE(maj,min) +#else +#define GOBJECT_DEPRECATED G_DEPRECATED _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _GOBJECT_EXTERN +#define GOBJECT_UNAVAILABLE_STATIC_INLINE(maj,min) G_UNAVAILABLE(maj,min) +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_26 +#define GOBJECT_DEPRECATED_IN_2_26 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_26_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_26 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_26_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_26 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_26_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_26 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_26_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_26 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_26_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_26 +#define GOBJECT_DEPRECATED_MACRO_IN_2_26_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_26 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_26_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_26 +#define GOBJECT_DEPRECATED_TYPE_IN_2_26_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_26 +#define GOBJECT_AVAILABLE_IN_2_26 GOBJECT_UNAVAILABLE (2, 26) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_26 GLIB_UNAVAILABLE_STATIC_INLINE (2, 26) +#define GOBJECT_AVAILABLE_MACRO_IN_2_26 GLIB_UNAVAILABLE_MACRO (2, 26) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_26 GLIB_UNAVAILABLE_ENUMERATOR (2, 26) +#define GOBJECT_AVAILABLE_TYPE_IN_2_26 GLIB_UNAVAILABLE_TYPE (2, 26) +#else +#define GOBJECT_AVAILABLE_IN_2_26 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_26 +#define GOBJECT_AVAILABLE_MACRO_IN_2_26 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_26 +#define GOBJECT_AVAILABLE_TYPE_IN_2_26 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_28 +#define GOBJECT_DEPRECATED_IN_2_28 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_28_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_28 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_28_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_28 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_28_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_28 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_28_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_28 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_28_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_28 +#define GOBJECT_DEPRECATED_MACRO_IN_2_28_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_28 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_28_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_28 +#define GOBJECT_DEPRECATED_TYPE_IN_2_28_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_28 +#define GOBJECT_AVAILABLE_IN_2_28 GOBJECT_UNAVAILABLE (2, 28) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_28 GLIB_UNAVAILABLE_STATIC_INLINE (2, 28) +#define GOBJECT_AVAILABLE_MACRO_IN_2_28 GLIB_UNAVAILABLE_MACRO (2, 28) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_28 GLIB_UNAVAILABLE_ENUMERATOR (2, 28) +#define GOBJECT_AVAILABLE_TYPE_IN_2_28 GLIB_UNAVAILABLE_TYPE (2, 28) +#else +#define GOBJECT_AVAILABLE_IN_2_28 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_28 +#define GOBJECT_AVAILABLE_MACRO_IN_2_28 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_28 +#define GOBJECT_AVAILABLE_TYPE_IN_2_28 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_30 +#define GOBJECT_DEPRECATED_IN_2_30 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_30_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_30 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_30_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_30 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_30_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_30 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_30_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_30 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_30_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_30 +#define GOBJECT_DEPRECATED_MACRO_IN_2_30_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_30 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_30_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_30 +#define GOBJECT_DEPRECATED_TYPE_IN_2_30_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_30 +#define GOBJECT_AVAILABLE_IN_2_30 GOBJECT_UNAVAILABLE (2, 30) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_30 GLIB_UNAVAILABLE_STATIC_INLINE (2, 30) +#define GOBJECT_AVAILABLE_MACRO_IN_2_30 GLIB_UNAVAILABLE_MACRO (2, 30) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_30 GLIB_UNAVAILABLE_ENUMERATOR (2, 30) +#define GOBJECT_AVAILABLE_TYPE_IN_2_30 GLIB_UNAVAILABLE_TYPE (2, 30) +#else +#define GOBJECT_AVAILABLE_IN_2_30 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_30 +#define GOBJECT_AVAILABLE_MACRO_IN_2_30 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_30 +#define GOBJECT_AVAILABLE_TYPE_IN_2_30 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_32 +#define GOBJECT_DEPRECATED_IN_2_32 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_32_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_32 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_32_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_32 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_32 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_32_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_32 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_32_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_32 +#define GOBJECT_DEPRECATED_MACRO_IN_2_32_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_32 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_32 +#define GOBJECT_DEPRECATED_TYPE_IN_2_32_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_32 +#define GOBJECT_AVAILABLE_IN_2_32 GOBJECT_UNAVAILABLE (2, 32) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_32 GLIB_UNAVAILABLE_STATIC_INLINE (2, 32) +#define GOBJECT_AVAILABLE_MACRO_IN_2_32 GLIB_UNAVAILABLE_MACRO (2, 32) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_32 GLIB_UNAVAILABLE_ENUMERATOR (2, 32) +#define GOBJECT_AVAILABLE_TYPE_IN_2_32 GLIB_UNAVAILABLE_TYPE (2, 32) +#else +#define GOBJECT_AVAILABLE_IN_2_32 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_32 +#define GOBJECT_AVAILABLE_MACRO_IN_2_32 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_32 +#define GOBJECT_AVAILABLE_TYPE_IN_2_32 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_34 +#define GOBJECT_DEPRECATED_IN_2_34 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_34_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_34 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_34_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_34 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_34_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_34 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_34_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_34 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_34_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_34 +#define GOBJECT_DEPRECATED_MACRO_IN_2_34_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_34 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_34_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_34 +#define GOBJECT_DEPRECATED_TYPE_IN_2_34_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_34 +#define GOBJECT_AVAILABLE_IN_2_34 GOBJECT_UNAVAILABLE (2, 34) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_34 GLIB_UNAVAILABLE_STATIC_INLINE (2, 34) +#define GOBJECT_AVAILABLE_MACRO_IN_2_34 GLIB_UNAVAILABLE_MACRO (2, 34) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_34 GLIB_UNAVAILABLE_ENUMERATOR (2, 34) +#define GOBJECT_AVAILABLE_TYPE_IN_2_34 GLIB_UNAVAILABLE_TYPE (2, 34) +#else +#define GOBJECT_AVAILABLE_IN_2_34 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_34 +#define GOBJECT_AVAILABLE_MACRO_IN_2_34 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_34 +#define GOBJECT_AVAILABLE_TYPE_IN_2_34 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_36 +#define GOBJECT_DEPRECATED_IN_2_36 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_36_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_36 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_36_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_36 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_36_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_36 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_36_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_36 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_36_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_36 +#define GOBJECT_DEPRECATED_MACRO_IN_2_36_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_36 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_36_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_36 +#define GOBJECT_DEPRECATED_TYPE_IN_2_36_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_36 +#define GOBJECT_AVAILABLE_IN_2_36 GOBJECT_UNAVAILABLE (2, 36) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_36 GLIB_UNAVAILABLE_STATIC_INLINE (2, 36) +#define GOBJECT_AVAILABLE_MACRO_IN_2_36 GLIB_UNAVAILABLE_MACRO (2, 36) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_36 GLIB_UNAVAILABLE_ENUMERATOR (2, 36) +#define GOBJECT_AVAILABLE_TYPE_IN_2_36 GLIB_UNAVAILABLE_TYPE (2, 36) +#else +#define GOBJECT_AVAILABLE_IN_2_36 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_36 +#define GOBJECT_AVAILABLE_MACRO_IN_2_36 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_36 +#define GOBJECT_AVAILABLE_TYPE_IN_2_36 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_38 +#define GOBJECT_DEPRECATED_IN_2_38 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_38_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_38 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_38_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_38 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_38_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_38 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_38_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_38 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_38_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_38 +#define GOBJECT_DEPRECATED_MACRO_IN_2_38_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_38 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_38_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_38 +#define GOBJECT_DEPRECATED_TYPE_IN_2_38_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 +#define GOBJECT_AVAILABLE_IN_2_38 GOBJECT_UNAVAILABLE (2, 38) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_38 GLIB_UNAVAILABLE_STATIC_INLINE (2, 38) +#define GOBJECT_AVAILABLE_MACRO_IN_2_38 GLIB_UNAVAILABLE_MACRO (2, 38) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_38 GLIB_UNAVAILABLE_ENUMERATOR (2, 38) +#define GOBJECT_AVAILABLE_TYPE_IN_2_38 GLIB_UNAVAILABLE_TYPE (2, 38) +#else +#define GOBJECT_AVAILABLE_IN_2_38 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_38 +#define GOBJECT_AVAILABLE_MACRO_IN_2_38 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_38 +#define GOBJECT_AVAILABLE_TYPE_IN_2_38 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_40 +#define GOBJECT_DEPRECATED_IN_2_40 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_40_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_40 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_40_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_40 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_40_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_40 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_40_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_40 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_40_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_40 +#define GOBJECT_DEPRECATED_MACRO_IN_2_40_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_40 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_40_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_40 +#define GOBJECT_DEPRECATED_TYPE_IN_2_40_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_40 +#define GOBJECT_AVAILABLE_IN_2_40 GOBJECT_UNAVAILABLE (2, 40) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_40 GLIB_UNAVAILABLE_STATIC_INLINE (2, 40) +#define GOBJECT_AVAILABLE_MACRO_IN_2_40 GLIB_UNAVAILABLE_MACRO (2, 40) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_40 GLIB_UNAVAILABLE_ENUMERATOR (2, 40) +#define GOBJECT_AVAILABLE_TYPE_IN_2_40 GLIB_UNAVAILABLE_TYPE (2, 40) +#else +#define GOBJECT_AVAILABLE_IN_2_40 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_40 +#define GOBJECT_AVAILABLE_MACRO_IN_2_40 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_40 +#define GOBJECT_AVAILABLE_TYPE_IN_2_40 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_42 +#define GOBJECT_DEPRECATED_IN_2_42 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_42_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_42 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_42_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_42 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_42_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_42 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_42_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_42 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_42_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_42 +#define GOBJECT_DEPRECATED_MACRO_IN_2_42_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_42 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_42_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_42 +#define GOBJECT_DEPRECATED_TYPE_IN_2_42_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_42 +#define GOBJECT_AVAILABLE_IN_2_42 GOBJECT_UNAVAILABLE (2, 42) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_42 GLIB_UNAVAILABLE_STATIC_INLINE (2, 42) +#define GOBJECT_AVAILABLE_MACRO_IN_2_42 GLIB_UNAVAILABLE_MACRO (2, 42) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_42 GLIB_UNAVAILABLE_ENUMERATOR (2, 42) +#define GOBJECT_AVAILABLE_TYPE_IN_2_42 GLIB_UNAVAILABLE_TYPE (2, 42) +#else +#define GOBJECT_AVAILABLE_IN_2_42 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_42 +#define GOBJECT_AVAILABLE_MACRO_IN_2_42 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_42 +#define GOBJECT_AVAILABLE_TYPE_IN_2_42 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_44 +#define GOBJECT_DEPRECATED_IN_2_44 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_44_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_44 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_44_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_44 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_44_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_44 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_44_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_44 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_44_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_44 +#define GOBJECT_DEPRECATED_MACRO_IN_2_44_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_44 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_44_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_44 +#define GOBJECT_DEPRECATED_TYPE_IN_2_44_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_44 +#define GOBJECT_AVAILABLE_IN_2_44 GOBJECT_UNAVAILABLE (2, 44) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_44 GLIB_UNAVAILABLE_STATIC_INLINE (2, 44) +#define GOBJECT_AVAILABLE_MACRO_IN_2_44 GLIB_UNAVAILABLE_MACRO (2, 44) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_44 GLIB_UNAVAILABLE_ENUMERATOR (2, 44) +#define GOBJECT_AVAILABLE_TYPE_IN_2_44 GLIB_UNAVAILABLE_TYPE (2, 44) +#else +#define GOBJECT_AVAILABLE_IN_2_44 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_44 +#define GOBJECT_AVAILABLE_MACRO_IN_2_44 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_44 +#define GOBJECT_AVAILABLE_TYPE_IN_2_44 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_46 +#define GOBJECT_DEPRECATED_IN_2_46 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_46_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_46 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_46_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_46 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_46_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_46 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_46_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_46 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_46_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_46 +#define GOBJECT_DEPRECATED_MACRO_IN_2_46_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_46 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_46_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_46 +#define GOBJECT_DEPRECATED_TYPE_IN_2_46_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_46 +#define GOBJECT_AVAILABLE_IN_2_46 GOBJECT_UNAVAILABLE (2, 46) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_46 GLIB_UNAVAILABLE_STATIC_INLINE (2, 46) +#define GOBJECT_AVAILABLE_MACRO_IN_2_46 GLIB_UNAVAILABLE_MACRO (2, 46) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_46 GLIB_UNAVAILABLE_ENUMERATOR (2, 46) +#define GOBJECT_AVAILABLE_TYPE_IN_2_46 GLIB_UNAVAILABLE_TYPE (2, 46) +#else +#define GOBJECT_AVAILABLE_IN_2_46 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_46 +#define GOBJECT_AVAILABLE_MACRO_IN_2_46 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_46 +#define GOBJECT_AVAILABLE_TYPE_IN_2_46 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_48 +#define GOBJECT_DEPRECATED_IN_2_48 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_48_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_48 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_48_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_48 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_48_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_48 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_48_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_48 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_48_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_48 +#define GOBJECT_DEPRECATED_MACRO_IN_2_48_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_48 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_48_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_48 +#define GOBJECT_DEPRECATED_TYPE_IN_2_48_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_48 +#define GOBJECT_AVAILABLE_IN_2_48 GOBJECT_UNAVAILABLE (2, 48) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_48 GLIB_UNAVAILABLE_STATIC_INLINE (2, 48) +#define GOBJECT_AVAILABLE_MACRO_IN_2_48 GLIB_UNAVAILABLE_MACRO (2, 48) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_48 GLIB_UNAVAILABLE_ENUMERATOR (2, 48) +#define GOBJECT_AVAILABLE_TYPE_IN_2_48 GLIB_UNAVAILABLE_TYPE (2, 48) +#else +#define GOBJECT_AVAILABLE_IN_2_48 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_48 +#define GOBJECT_AVAILABLE_MACRO_IN_2_48 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_48 +#define GOBJECT_AVAILABLE_TYPE_IN_2_48 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_50 +#define GOBJECT_DEPRECATED_IN_2_50 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_50_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_50 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_50_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_50 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_50_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_50 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_50_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_50 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_50_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_50 +#define GOBJECT_DEPRECATED_MACRO_IN_2_50_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_50 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_50_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_50 +#define GOBJECT_DEPRECATED_TYPE_IN_2_50_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_50 +#define GOBJECT_AVAILABLE_IN_2_50 GOBJECT_UNAVAILABLE (2, 50) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_50 GLIB_UNAVAILABLE_STATIC_INLINE (2, 50) +#define GOBJECT_AVAILABLE_MACRO_IN_2_50 GLIB_UNAVAILABLE_MACRO (2, 50) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_50 GLIB_UNAVAILABLE_ENUMERATOR (2, 50) +#define GOBJECT_AVAILABLE_TYPE_IN_2_50 GLIB_UNAVAILABLE_TYPE (2, 50) +#else +#define GOBJECT_AVAILABLE_IN_2_50 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_50 +#define GOBJECT_AVAILABLE_MACRO_IN_2_50 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_50 +#define GOBJECT_AVAILABLE_TYPE_IN_2_50 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_52 +#define GOBJECT_DEPRECATED_IN_2_52 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_52_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_52 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_52_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_52 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_52_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_52 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_52_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_52 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_52_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_52 +#define GOBJECT_DEPRECATED_MACRO_IN_2_52_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_52 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_52_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_52 +#define GOBJECT_DEPRECATED_TYPE_IN_2_52_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_52 +#define GOBJECT_AVAILABLE_IN_2_52 GOBJECT_UNAVAILABLE (2, 52) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_52 GLIB_UNAVAILABLE_STATIC_INLINE (2, 52) +#define GOBJECT_AVAILABLE_MACRO_IN_2_52 GLIB_UNAVAILABLE_MACRO (2, 52) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_52 GLIB_UNAVAILABLE_ENUMERATOR (2, 52) +#define GOBJECT_AVAILABLE_TYPE_IN_2_52 GLIB_UNAVAILABLE_TYPE (2, 52) +#else +#define GOBJECT_AVAILABLE_IN_2_52 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_52 +#define GOBJECT_AVAILABLE_MACRO_IN_2_52 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_52 +#define GOBJECT_AVAILABLE_TYPE_IN_2_52 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_54 +#define GOBJECT_DEPRECATED_IN_2_54 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_54_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_54 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_54_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_54 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_54_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_54 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_54_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_54 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_54_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_54 +#define GOBJECT_DEPRECATED_MACRO_IN_2_54_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_54 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_54_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_54 +#define GOBJECT_DEPRECATED_TYPE_IN_2_54_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_54 +#define GOBJECT_AVAILABLE_IN_2_54 GOBJECT_UNAVAILABLE (2, 54) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_54 GLIB_UNAVAILABLE_STATIC_INLINE (2, 54) +#define GOBJECT_AVAILABLE_MACRO_IN_2_54 GLIB_UNAVAILABLE_MACRO (2, 54) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_54 GLIB_UNAVAILABLE_ENUMERATOR (2, 54) +#define GOBJECT_AVAILABLE_TYPE_IN_2_54 GLIB_UNAVAILABLE_TYPE (2, 54) +#else +#define GOBJECT_AVAILABLE_IN_2_54 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_54 +#define GOBJECT_AVAILABLE_MACRO_IN_2_54 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_54 +#define GOBJECT_AVAILABLE_TYPE_IN_2_54 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_56 +#define GOBJECT_DEPRECATED_IN_2_56 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_56_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_56 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_56_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_56 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_56_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_56 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_56_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_56 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_56_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_56 +#define GOBJECT_DEPRECATED_MACRO_IN_2_56_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_56 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_56_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_56 +#define GOBJECT_DEPRECATED_TYPE_IN_2_56_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_56 +#define GOBJECT_AVAILABLE_IN_2_56 GOBJECT_UNAVAILABLE (2, 56) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_56 GLIB_UNAVAILABLE_STATIC_INLINE (2, 56) +#define GOBJECT_AVAILABLE_MACRO_IN_2_56 GLIB_UNAVAILABLE_MACRO (2, 56) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_56 GLIB_UNAVAILABLE_ENUMERATOR (2, 56) +#define GOBJECT_AVAILABLE_TYPE_IN_2_56 GLIB_UNAVAILABLE_TYPE (2, 56) +#else +#define GOBJECT_AVAILABLE_IN_2_56 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_56 +#define GOBJECT_AVAILABLE_MACRO_IN_2_56 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_56 +#define GOBJECT_AVAILABLE_TYPE_IN_2_56 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_58 +#define GOBJECT_DEPRECATED_IN_2_58 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_58_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_58 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_58 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_58_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_58 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_58_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_58 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_58_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_58 +#define GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_58 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_58_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_58 +#define GOBJECT_DEPRECATED_TYPE_IN_2_58_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_58 +#define GOBJECT_AVAILABLE_IN_2_58 GOBJECT_UNAVAILABLE (2, 58) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_58 GLIB_UNAVAILABLE_STATIC_INLINE (2, 58) +#define GOBJECT_AVAILABLE_MACRO_IN_2_58 GLIB_UNAVAILABLE_MACRO (2, 58) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_58 GLIB_UNAVAILABLE_ENUMERATOR (2, 58) +#define GOBJECT_AVAILABLE_TYPE_IN_2_58 GLIB_UNAVAILABLE_TYPE (2, 58) +#else +#define GOBJECT_AVAILABLE_IN_2_58 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_58 +#define GOBJECT_AVAILABLE_MACRO_IN_2_58 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_58 +#define GOBJECT_AVAILABLE_TYPE_IN_2_58 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_60 +#define GOBJECT_DEPRECATED_IN_2_60 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_60_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_60 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_60_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_60 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_60_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_60 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_60_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_60 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_60_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_60 +#define GOBJECT_DEPRECATED_MACRO_IN_2_60_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_60 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_60_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_60 +#define GOBJECT_DEPRECATED_TYPE_IN_2_60_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_60 +#define GOBJECT_AVAILABLE_IN_2_60 GOBJECT_UNAVAILABLE (2, 60) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_60 GLIB_UNAVAILABLE_STATIC_INLINE (2, 60) +#define GOBJECT_AVAILABLE_MACRO_IN_2_60 GLIB_UNAVAILABLE_MACRO (2, 60) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_60 GLIB_UNAVAILABLE_ENUMERATOR (2, 60) +#define GOBJECT_AVAILABLE_TYPE_IN_2_60 GLIB_UNAVAILABLE_TYPE (2, 60) +#else +#define GOBJECT_AVAILABLE_IN_2_60 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_60 +#define GOBJECT_AVAILABLE_MACRO_IN_2_60 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_60 +#define GOBJECT_AVAILABLE_TYPE_IN_2_60 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_62 +#define GOBJECT_DEPRECATED_IN_2_62 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_62_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_62 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_62_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_62 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_62_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_62 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_62_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_62 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_62_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_62 +#define GOBJECT_DEPRECATED_MACRO_IN_2_62_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_62 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_62_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_62 +#define GOBJECT_DEPRECATED_TYPE_IN_2_62_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_62 +#define GOBJECT_AVAILABLE_IN_2_62 GOBJECT_UNAVAILABLE (2, 62) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_62 GLIB_UNAVAILABLE_STATIC_INLINE (2, 62) +#define GOBJECT_AVAILABLE_MACRO_IN_2_62 GLIB_UNAVAILABLE_MACRO (2, 62) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_62 GLIB_UNAVAILABLE_ENUMERATOR (2, 62) +#define GOBJECT_AVAILABLE_TYPE_IN_2_62 GLIB_UNAVAILABLE_TYPE (2, 62) +#else +#define GOBJECT_AVAILABLE_IN_2_62 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_62 +#define GOBJECT_AVAILABLE_MACRO_IN_2_62 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_62 +#define GOBJECT_AVAILABLE_TYPE_IN_2_62 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_64 +#define GOBJECT_DEPRECATED_IN_2_64 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_64_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_64 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_64_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_64 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_64_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_64 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_64_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_64 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_64_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_64 +#define GOBJECT_DEPRECATED_MACRO_IN_2_64_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_64 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_64_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_64 +#define GOBJECT_DEPRECATED_TYPE_IN_2_64_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_64 +#define GOBJECT_AVAILABLE_IN_2_64 GOBJECT_UNAVAILABLE (2, 64) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_64 GLIB_UNAVAILABLE_STATIC_INLINE (2, 64) +#define GOBJECT_AVAILABLE_MACRO_IN_2_64 GLIB_UNAVAILABLE_MACRO (2, 64) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_64 GLIB_UNAVAILABLE_ENUMERATOR (2, 64) +#define GOBJECT_AVAILABLE_TYPE_IN_2_64 GLIB_UNAVAILABLE_TYPE (2, 64) +#else +#define GOBJECT_AVAILABLE_IN_2_64 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_64 +#define GOBJECT_AVAILABLE_MACRO_IN_2_64 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_64 +#define GOBJECT_AVAILABLE_TYPE_IN_2_64 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_66 +#define GOBJECT_DEPRECATED_IN_2_66 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_66_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_66 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_66_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_66 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_66_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_66 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_66_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_66 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_66_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_66 +#define GOBJECT_DEPRECATED_MACRO_IN_2_66_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_66 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_66_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_66 +#define GOBJECT_DEPRECATED_TYPE_IN_2_66_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_66 +#define GOBJECT_AVAILABLE_IN_2_66 GOBJECT_UNAVAILABLE (2, 66) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_66 GLIB_UNAVAILABLE_STATIC_INLINE (2, 66) +#define GOBJECT_AVAILABLE_MACRO_IN_2_66 GLIB_UNAVAILABLE_MACRO (2, 66) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_66 GLIB_UNAVAILABLE_ENUMERATOR (2, 66) +#define GOBJECT_AVAILABLE_TYPE_IN_2_66 GLIB_UNAVAILABLE_TYPE (2, 66) +#else +#define GOBJECT_AVAILABLE_IN_2_66 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_66 +#define GOBJECT_AVAILABLE_MACRO_IN_2_66 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_66 +#define GOBJECT_AVAILABLE_TYPE_IN_2_66 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_68 +#define GOBJECT_DEPRECATED_IN_2_68 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_68_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_68 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_68_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_68 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_68_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_68 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_68_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_68 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_68_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_68 +#define GOBJECT_DEPRECATED_MACRO_IN_2_68_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_68 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_68_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_68 +#define GOBJECT_DEPRECATED_TYPE_IN_2_68_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_68 +#define GOBJECT_AVAILABLE_IN_2_68 GOBJECT_UNAVAILABLE (2, 68) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_68 GLIB_UNAVAILABLE_STATIC_INLINE (2, 68) +#define GOBJECT_AVAILABLE_MACRO_IN_2_68 GLIB_UNAVAILABLE_MACRO (2, 68) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_68 GLIB_UNAVAILABLE_ENUMERATOR (2, 68) +#define GOBJECT_AVAILABLE_TYPE_IN_2_68 GLIB_UNAVAILABLE_TYPE (2, 68) +#else +#define GOBJECT_AVAILABLE_IN_2_68 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_68 +#define GOBJECT_AVAILABLE_MACRO_IN_2_68 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_68 +#define GOBJECT_AVAILABLE_TYPE_IN_2_68 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_70 +#define GOBJECT_DEPRECATED_IN_2_70 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_70_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_70 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_70_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_70 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_70_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_70 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_70_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_70 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_70_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_70 +#define GOBJECT_DEPRECATED_MACRO_IN_2_70_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_70 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_70_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_70 +#define GOBJECT_DEPRECATED_TYPE_IN_2_70_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_70 +#define GOBJECT_AVAILABLE_IN_2_70 GOBJECT_UNAVAILABLE (2, 70) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_70 GLIB_UNAVAILABLE_STATIC_INLINE (2, 70) +#define GOBJECT_AVAILABLE_MACRO_IN_2_70 GLIB_UNAVAILABLE_MACRO (2, 70) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_70 GLIB_UNAVAILABLE_ENUMERATOR (2, 70) +#define GOBJECT_AVAILABLE_TYPE_IN_2_70 GLIB_UNAVAILABLE_TYPE (2, 70) +#else +#define GOBJECT_AVAILABLE_IN_2_70 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_70 +#define GOBJECT_AVAILABLE_MACRO_IN_2_70 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_70 +#define GOBJECT_AVAILABLE_TYPE_IN_2_70 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_72 +#define GOBJECT_DEPRECATED_IN_2_72 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_72_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_72 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_72_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_72 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_72_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_72 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_72_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_72 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_72_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_72 +#define GOBJECT_DEPRECATED_MACRO_IN_2_72_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_72 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_72_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_72 +#define GOBJECT_DEPRECATED_TYPE_IN_2_72_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_72 +#define GOBJECT_AVAILABLE_IN_2_72 GOBJECT_UNAVAILABLE (2, 72) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_72 GLIB_UNAVAILABLE_STATIC_INLINE (2, 72) +#define GOBJECT_AVAILABLE_MACRO_IN_2_72 GLIB_UNAVAILABLE_MACRO (2, 72) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_72 GLIB_UNAVAILABLE_ENUMERATOR (2, 72) +#define GOBJECT_AVAILABLE_TYPE_IN_2_72 GLIB_UNAVAILABLE_TYPE (2, 72) +#else +#define GOBJECT_AVAILABLE_IN_2_72 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_72 +#define GOBJECT_AVAILABLE_MACRO_IN_2_72 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_72 +#define GOBJECT_AVAILABLE_TYPE_IN_2_72 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_74 +#define GOBJECT_DEPRECATED_IN_2_74 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_74_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_74 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_74_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_74 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_74_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_74 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_74_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_74 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_74_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_74 +#define GOBJECT_DEPRECATED_MACRO_IN_2_74_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_74 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_74_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_74 +#define GOBJECT_DEPRECATED_TYPE_IN_2_74_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_74 +#define GOBJECT_AVAILABLE_IN_2_74 GOBJECT_UNAVAILABLE (2, 74) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_74 GLIB_UNAVAILABLE_STATIC_INLINE (2, 74) +#define GOBJECT_AVAILABLE_MACRO_IN_2_74 GLIB_UNAVAILABLE_MACRO (2, 74) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_74 GLIB_UNAVAILABLE_ENUMERATOR (2, 74) +#define GOBJECT_AVAILABLE_TYPE_IN_2_74 GLIB_UNAVAILABLE_TYPE (2, 74) +#else +#define GOBJECT_AVAILABLE_IN_2_74 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_74 +#define GOBJECT_AVAILABLE_MACRO_IN_2_74 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_74 +#define GOBJECT_AVAILABLE_TYPE_IN_2_74 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_76 +#define GOBJECT_DEPRECATED_IN_2_76 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_76_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_76 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_76_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_76 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_76_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_76 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_76_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_76 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_76_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_76 +#define GOBJECT_DEPRECATED_MACRO_IN_2_76_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_76 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_76_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_76 +#define GOBJECT_DEPRECATED_TYPE_IN_2_76_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_76 +#define GOBJECT_AVAILABLE_IN_2_76 GOBJECT_UNAVAILABLE (2, 76) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_76 GLIB_UNAVAILABLE_STATIC_INLINE (2, 76) +#define GOBJECT_AVAILABLE_MACRO_IN_2_76 GLIB_UNAVAILABLE_MACRO (2, 76) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_76 GLIB_UNAVAILABLE_ENUMERATOR (2, 76) +#define GOBJECT_AVAILABLE_TYPE_IN_2_76 GLIB_UNAVAILABLE_TYPE (2, 76) +#else +#define GOBJECT_AVAILABLE_IN_2_76 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_76 +#define GOBJECT_AVAILABLE_MACRO_IN_2_76 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_76 +#define GOBJECT_AVAILABLE_TYPE_IN_2_76 +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_78 +#define GOBJECT_DEPRECATED_IN_2_78 GOBJECT_DEPRECATED +#define GOBJECT_DEPRECATED_IN_2_78_FOR(f) GOBJECT_DEPRECATED_FOR (f) +#define GOBJECT_DEPRECATED_MACRO_IN_2_78 GLIB_DEPRECATED_MACRO +#define GOBJECT_DEPRECATED_MACRO_IN_2_78_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_78 GLIB_DEPRECATED_ENUMERATOR +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_78_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_78 GLIB_DEPRECATED_TYPE +#define GOBJECT_DEPRECATED_TYPE_IN_2_78_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) +#else +#define GOBJECT_DEPRECATED_IN_2_78 _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_IN_2_78_FOR(f) _GOBJECT_EXTERN +#define GOBJECT_DEPRECATED_MACRO_IN_2_78 +#define GOBJECT_DEPRECATED_MACRO_IN_2_78_FOR(f) +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_78 +#define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_78_FOR(f) +#define GOBJECT_DEPRECATED_TYPE_IN_2_78 +#define GOBJECT_DEPRECATED_TYPE_IN_2_78_FOR(f) +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_78 +#define GOBJECT_AVAILABLE_IN_2_78 GOBJECT_UNAVAILABLE (2, 78) +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_78 GLIB_UNAVAILABLE_STATIC_INLINE (2, 78) +#define GOBJECT_AVAILABLE_MACRO_IN_2_78 GLIB_UNAVAILABLE_MACRO (2, 78) +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_78 GLIB_UNAVAILABLE_ENUMERATOR (2, 78) +#define GOBJECT_AVAILABLE_TYPE_IN_2_78 GLIB_UNAVAILABLE_TYPE (2, 78) +#else +#define GOBJECT_AVAILABLE_IN_2_78 _GOBJECT_EXTERN +#define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_78 +#define GOBJECT_AVAILABLE_MACRO_IN_2_78 +#define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_78 +#define GOBJECT_AVAILABLE_TYPE_IN_2_78 +#endif diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gobject.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gobject.h new file mode 100644 index 0000000..ea0157c --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gobject.h @@ -0,0 +1,953 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ +#ifndef __G_OBJECT_H__ +#define __G_OBJECT_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include +#include +#include +#include + +G_BEGIN_DECLS + +/* --- type macros --- */ +/** + * G_TYPE_IS_OBJECT: + * @type: Type id to check + * + * Check if the passed in type id is a %G_TYPE_OBJECT or derived from it. + * + * Returns: %FALSE or %TRUE, indicating whether @type is a %G_TYPE_OBJECT. + */ +#define G_TYPE_IS_OBJECT(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_OBJECT) +/** + * G_OBJECT: + * @object: Object which is subject to casting. + * + * Casts a #GObject or derived pointer into a (GObject*) pointer. + * + * Depending on the current debugging level, this function may invoke + * certain runtime checks to identify invalid casts. + */ +#define G_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_OBJECT, GObject)) +/** + * G_OBJECT_CLASS: + * @class: a valid #GObjectClass + * + * Casts a derived #GObjectClass structure into a #GObjectClass structure. + */ +#define G_OBJECT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_OBJECT, GObjectClass)) +/** + * G_IS_OBJECT: + * @object: Instance to check for being a %G_TYPE_OBJECT. + * + * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT. + */ +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_42 +#define G_IS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE ((object), G_TYPE_OBJECT)) +#else +#define G_IS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_OBJECT)) +#endif +/** + * G_IS_OBJECT_CLASS: + * @class: a #GObjectClass + * + * Checks whether @class "is a" valid #GObjectClass structure of type + * %G_TYPE_OBJECT or derived. + */ +#define G_IS_OBJECT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_OBJECT)) +/** + * G_OBJECT_GET_CLASS: + * @object: a #GObject instance. + * + * Get the class structure associated to a #GObject instance. + * + * Returns: pointer to object class structure. + */ +#define G_OBJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), G_TYPE_OBJECT, GObjectClass)) +/** + * G_OBJECT_TYPE: + * @object: Object to return the type id for. + * + * Get the type id of an object. + * + * Returns: Type id of @object. + */ +#define G_OBJECT_TYPE(object) (G_TYPE_FROM_INSTANCE (object)) +/** + * G_OBJECT_TYPE_NAME: + * @object: Object to return the type name for. + * + * Get the name of an object's type. + * + * Returns: Type name of @object. The string is owned by the type system and + * should not be freed. + */ +#define G_OBJECT_TYPE_NAME(object) (g_type_name (G_OBJECT_TYPE (object))) +/** + * G_OBJECT_CLASS_TYPE: + * @class: a valid #GObjectClass + * + * Get the type id of a class structure. + * + * Returns: Type id of @class. + */ +#define G_OBJECT_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class)) +/** + * G_OBJECT_CLASS_NAME: + * @class: a valid #GObjectClass + * + * Return the name of a class structure's type. + * + * Returns: Type name of @class. The string is owned by the type system and + * should not be freed. + */ +#define G_OBJECT_CLASS_NAME(class) (g_type_name (G_OBJECT_CLASS_TYPE (class))) +/** + * G_VALUE_HOLDS_OBJECT: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values derived from type %G_TYPE_OBJECT. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_OBJECT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_OBJECT)) + +/* --- type macros --- */ +/** + * G_TYPE_INITIALLY_UNOWNED: + * + * The type for #GInitiallyUnowned. + */ +#define G_TYPE_INITIALLY_UNOWNED (g_initially_unowned_get_type()) +/** + * G_INITIALLY_UNOWNED: + * @object: Object which is subject to casting. + * + * Casts a #GInitiallyUnowned or derived pointer into a (GInitiallyUnowned*) + * pointer. + * + * Depending on the current debugging level, this function may invoke + * certain runtime checks to identify invalid casts. + */ +#define G_INITIALLY_UNOWNED(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_INITIALLY_UNOWNED, GInitiallyUnowned)) +/** + * G_INITIALLY_UNOWNED_CLASS: + * @class: a valid #GInitiallyUnownedClass + * + * Casts a derived #GInitiallyUnownedClass structure into a + * #GInitiallyUnownedClass structure. + */ +#define G_INITIALLY_UNOWNED_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_INITIALLY_UNOWNED, GInitiallyUnownedClass)) +/** + * G_IS_INITIALLY_UNOWNED: + * @object: Instance to check for being a %G_TYPE_INITIALLY_UNOWNED. + * + * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_INITIALLY_UNOWNED. + */ +#define G_IS_INITIALLY_UNOWNED(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_INITIALLY_UNOWNED)) +/** + * G_IS_INITIALLY_UNOWNED_CLASS: + * @class: a #GInitiallyUnownedClass + * + * Checks whether @class "is a" valid #GInitiallyUnownedClass structure of type + * %G_TYPE_INITIALLY_UNOWNED or derived. + */ +#define G_IS_INITIALLY_UNOWNED_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_INITIALLY_UNOWNED)) +/** + * G_INITIALLY_UNOWNED_GET_CLASS: + * @object: a #GInitiallyUnowned instance. + * + * Get the class structure associated to a #GInitiallyUnowned instance. + * + * Returns: pointer to object class structure. + */ +#define G_INITIALLY_UNOWNED_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), G_TYPE_INITIALLY_UNOWNED, GInitiallyUnownedClass)) +/* GInitiallyUnowned ia a GObject with initially floating reference count */ + + +/* --- typedefs & structures --- */ +typedef struct _GObject GObject; +typedef struct _GObjectClass GObjectClass; +typedef struct _GObject GInitiallyUnowned; +typedef struct _GObjectClass GInitiallyUnownedClass; +typedef struct _GObjectConstructParam GObjectConstructParam; +/** + * GObjectGetPropertyFunc: + * @object: a #GObject + * @property_id: the numeric id under which the property was registered with + * g_object_class_install_property(). + * @value: a #GValue to return the property value in + * @pspec: the #GParamSpec describing the property + * + * The type of the @get_property function of #GObjectClass. + */ +typedef void (*GObjectGetPropertyFunc) (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec); +/** + * GObjectSetPropertyFunc: + * @object: a #GObject + * @property_id: the numeric id under which the property was registered with + * g_object_class_install_property(). + * @value: the new value for the property + * @pspec: the #GParamSpec describing the property + * + * The type of the @set_property function of #GObjectClass. + */ +typedef void (*GObjectSetPropertyFunc) (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec); +/** + * GObjectFinalizeFunc: + * @object: the #GObject being finalized + * + * The type of the @finalize function of #GObjectClass. + */ +typedef void (*GObjectFinalizeFunc) (GObject *object); +/** + * GWeakNotify: + * @data: data that was provided when the weak reference was established + * @where_the_object_was: the object being disposed + * + * A #GWeakNotify function can be added to an object as a callback that gets + * triggered when the object is finalized. + * + * Since the object is already being disposed when the #GWeakNotify is called, + * there's not much you could do with the object, apart from e.g. using its + * address as hash-index or the like. + * + * In particular, this means it’s invalid to call g_object_ref(), + * g_weak_ref_init(), g_weak_ref_set(), g_object_add_toggle_ref(), + * g_object_weak_ref(), g_object_add_weak_pointer() or any function which calls + * them on the object from this callback. + */ +typedef void (*GWeakNotify) (gpointer data, + GObject *where_the_object_was); +/** + * GObject: + * + * The base object type. + * + * All the fields in the `GObject` structure are private to the implementation + * and should never be accessed directly. + * + * Since GLib 2.72, all #GObjects are guaranteed to be aligned to at least the + * alignment of the largest basic GLib type (typically this is #guint64 or + * #gdouble). If you need larger alignment for an element in a #GObject, you + * should allocate it on the heap (aligned), or arrange for your #GObject to be + * appropriately padded. This guarantee applies to the #GObject (or derived) + * struct, the #GObjectClass (or derived) struct, and any private data allocated + * by G_ADD_PRIVATE(). + */ +struct _GObject +{ + GTypeInstance g_type_instance; + + /*< private >*/ + guint ref_count; /* (atomic) */ + GData *qdata; +}; +/** + * GObjectClass: + * @g_type_class: the parent class + * @constructor: the @constructor function is called by g_object_new () to + * complete the object initialization after all the construction properties are + * set. The first thing a @constructor implementation must do is chain up to the + * @constructor of the parent class. Overriding @constructor should be rarely + * needed, e.g. to handle construct properties, or to implement singletons. + * @set_property: the generic setter for all properties of this type. Should be + * overridden for every type with properties. If implementations of + * @set_property don't emit property change notification explicitly, this will + * be done implicitly by the type system. However, if the notify signal is + * emitted explicitly, the type system will not emit it a second time. + * @get_property: the generic getter for all properties of this type. Should be + * overridden for every type with properties. + * @dispose: the @dispose function is supposed to drop all references to other + * objects, but keep the instance otherwise intact, so that client method + * invocations still work. It may be run multiple times (due to reference + * loops). Before returning, @dispose should chain up to the @dispose method + * of the parent class. + * @finalize: instance finalization function, should finish the finalization of + * the instance begun in @dispose and chain up to the @finalize method of the + * parent class. + * @dispatch_properties_changed: emits property change notification for a bunch + * of properties. Overriding @dispatch_properties_changed should be rarely + * needed. + * @notify: the class closure for the notify signal + * @constructed: the @constructed function is called by g_object_new() as the + * final step of the object creation process. At the point of the call, all + * construction properties have been set on the object. The purpose of this + * call is to allow for object initialisation steps that can only be performed + * after construction properties have been set. @constructed implementors + * should chain up to the @constructed call of their parent class to allow it + * to complete its initialisation. + * + * The class structure for the GObject type. + * + * |[ + * // Example of implementing a singleton using a constructor. + * static MySingleton *the_singleton = NULL; + * + * static GObject* + * my_singleton_constructor (GType type, + * guint n_construct_params, + * GObjectConstructParam *construct_params) + * { + * GObject *object; + * + * if (!the_singleton) + * { + * object = G_OBJECT_CLASS (parent_class)->constructor (type, + * n_construct_params, + * construct_params); + * the_singleton = MY_SINGLETON (object); + * } + * else + * object = g_object_ref (G_OBJECT (the_singleton)); + * + * return object; + * } + * ]| + */ +struct _GObjectClass +{ + GTypeClass g_type_class; + + /*< private >*/ + GSList *construct_properties; + + /*< public >*/ + /* seldom overridden */ + GObject* (*constructor) (GType type, + guint n_construct_properties, + GObjectConstructParam *construct_properties); + /* overridable methods */ + void (*set_property) (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec); + void (*get_property) (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec); + void (*dispose) (GObject *object); + void (*finalize) (GObject *object); + /* seldom overridden */ + void (*dispatch_properties_changed) (GObject *object, + guint n_pspecs, + GParamSpec **pspecs); + /* signals */ + void (*notify) (GObject *object, + GParamSpec *pspec); + + /* called when done constructing */ + void (*constructed) (GObject *object); + + /*< private >*/ + gsize flags; + + gsize n_construct_properties; + + gpointer pspecs; + gsize n_pspecs; + + /* padding */ + gpointer pdummy[3]; +}; + +/** + * GObjectConstructParam: + * @pspec: the #GParamSpec of the construct parameter + * @value: the value to set the parameter to + * + * The GObjectConstructParam struct is an auxiliary structure used to hand + * #GParamSpec/#GValue pairs to the @constructor of a #GObjectClass. + */ +struct _GObjectConstructParam +{ + GParamSpec *pspec; + GValue *value; +}; + +/** + * GInitiallyUnowned: + * + * A type for objects that have an initially floating reference. + * + * All the fields in the `GInitiallyUnowned` structure are private to the + * implementation and should never be accessed directly. + */ +/** + * GInitiallyUnownedClass: + * + * The class structure for the GInitiallyUnowned type. + */ + + +/* --- prototypes --- */ +GOBJECT_AVAILABLE_IN_ALL +GType g_initially_unowned_get_type (void); +GOBJECT_AVAILABLE_IN_ALL +void g_object_class_install_property (GObjectClass *oclass, + guint property_id, + GParamSpec *pspec); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_object_class_find_property (GObjectClass *oclass, + const gchar *property_name); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec**g_object_class_list_properties (GObjectClass *oclass, + guint *n_properties); +GOBJECT_AVAILABLE_IN_ALL +void g_object_class_override_property (GObjectClass *oclass, + guint property_id, + const gchar *name); +GOBJECT_AVAILABLE_IN_ALL +void g_object_class_install_properties (GObjectClass *oclass, + guint n_pspecs, + GParamSpec **pspecs); + +GOBJECT_AVAILABLE_IN_ALL +void g_object_interface_install_property (gpointer g_iface, + GParamSpec *pspec); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_object_interface_find_property (gpointer g_iface, + const gchar *property_name); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec**g_object_interface_list_properties (gpointer g_iface, + guint *n_properties_p); + +GOBJECT_AVAILABLE_IN_ALL +GType g_object_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +gpointer g_object_new (GType object_type, + const gchar *first_property_name, + ...); +GOBJECT_AVAILABLE_IN_2_54 +GObject* g_object_new_with_properties (GType object_type, + guint n_properties, + const char *names[], + const GValue values[]); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + +GOBJECT_DEPRECATED_IN_2_54_FOR(g_object_new_with_properties) +gpointer g_object_newv (GType object_type, + guint n_parameters, + GParameter *parameters); + +G_GNUC_END_IGNORE_DEPRECATIONS + +GOBJECT_AVAILABLE_IN_ALL +GObject* g_object_new_valist (GType object_type, + const gchar *first_property_name, + va_list var_args); +GOBJECT_AVAILABLE_IN_ALL +void g_object_set (gpointer object, + const gchar *first_property_name, + ...) G_GNUC_NULL_TERMINATED; +GOBJECT_AVAILABLE_IN_ALL +void g_object_get (gpointer object, + const gchar *first_property_name, + ...) G_GNUC_NULL_TERMINATED; +GOBJECT_AVAILABLE_IN_ALL +gpointer g_object_connect (gpointer object, + const gchar *signal_spec, + ...) G_GNUC_NULL_TERMINATED; +GOBJECT_AVAILABLE_IN_ALL +void g_object_disconnect (gpointer object, + const gchar *signal_spec, + ...) G_GNUC_NULL_TERMINATED; +GOBJECT_AVAILABLE_IN_2_54 +void g_object_setv (GObject *object, + guint n_properties, + const gchar *names[], + const GValue values[]); +GOBJECT_AVAILABLE_IN_ALL +void g_object_set_valist (GObject *object, + const gchar *first_property_name, + va_list var_args); +GOBJECT_AVAILABLE_IN_2_54 +void g_object_getv (GObject *object, + guint n_properties, + const gchar *names[], + GValue values[]); +GOBJECT_AVAILABLE_IN_ALL +void g_object_get_valist (GObject *object, + const gchar *first_property_name, + va_list var_args); +GOBJECT_AVAILABLE_IN_ALL +void g_object_set_property (GObject *object, + const gchar *property_name, + const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_object_get_property (GObject *object, + const gchar *property_name, + GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_object_freeze_notify (GObject *object); +GOBJECT_AVAILABLE_IN_ALL +void g_object_notify (GObject *object, + const gchar *property_name); +GOBJECT_AVAILABLE_IN_ALL +void g_object_notify_by_pspec (GObject *object, + GParamSpec *pspec); +GOBJECT_AVAILABLE_IN_ALL +void g_object_thaw_notify (GObject *object); +GOBJECT_AVAILABLE_IN_ALL +gboolean g_object_is_floating (gpointer object); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_object_ref_sink (gpointer object); +GOBJECT_AVAILABLE_IN_2_70 +gpointer g_object_take_ref (gpointer object); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_object_ref (gpointer object); +GOBJECT_AVAILABLE_IN_ALL +void g_object_unref (gpointer object); +GOBJECT_AVAILABLE_IN_ALL +void g_object_weak_ref (GObject *object, + GWeakNotify notify, + gpointer data); +GOBJECT_AVAILABLE_IN_ALL +void g_object_weak_unref (GObject *object, + GWeakNotify notify, + gpointer data); +GOBJECT_AVAILABLE_IN_ALL +void g_object_add_weak_pointer (GObject *object, + gpointer *weak_pointer_location); +GOBJECT_AVAILABLE_IN_ALL +void g_object_remove_weak_pointer (GObject *object, + gpointer *weak_pointer_location); + +#if defined(glib_typeof) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_56 +/* Make reference APIs type safe with macros */ +#define g_object_ref(Obj) ((glib_typeof (Obj)) (g_object_ref) (Obj)) +#define g_object_ref_sink(Obj) ((glib_typeof (Obj)) (g_object_ref_sink) (Obj)) +#endif + +/** + * GToggleNotify: + * @data: Callback data passed to g_object_add_toggle_ref() + * @object: The object on which g_object_add_toggle_ref() was called. + * @is_last_ref: %TRUE if the toggle reference is now the + * last reference to the object. %FALSE if the toggle + * reference was the last reference and there are now other + * references. + * + * A callback function used for notification when the state + * of a toggle reference changes. + * + * See also: g_object_add_toggle_ref() + */ +typedef void (*GToggleNotify) (gpointer data, + GObject *object, + gboolean is_last_ref); + +GOBJECT_AVAILABLE_IN_ALL +void g_object_add_toggle_ref (GObject *object, + GToggleNotify notify, + gpointer data); +GOBJECT_AVAILABLE_IN_ALL +void g_object_remove_toggle_ref (GObject *object, + GToggleNotify notify, + gpointer data); + +GOBJECT_AVAILABLE_IN_ALL +gpointer g_object_get_qdata (GObject *object, + GQuark quark); +GOBJECT_AVAILABLE_IN_ALL +void g_object_set_qdata (GObject *object, + GQuark quark, + gpointer data); +GOBJECT_AVAILABLE_IN_ALL +void g_object_set_qdata_full (GObject *object, + GQuark quark, + gpointer data, + GDestroyNotify destroy); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_object_steal_qdata (GObject *object, + GQuark quark); + +GOBJECT_AVAILABLE_IN_2_34 +gpointer g_object_dup_qdata (GObject *object, + GQuark quark, + GDuplicateFunc dup_func, + gpointer user_data); +GOBJECT_AVAILABLE_IN_2_34 +gboolean g_object_replace_qdata (GObject *object, + GQuark quark, + gpointer oldval, + gpointer newval, + GDestroyNotify destroy, + GDestroyNotify *old_destroy); + +GOBJECT_AVAILABLE_IN_ALL +gpointer g_object_get_data (GObject *object, + const gchar *key); +GOBJECT_AVAILABLE_IN_ALL +void g_object_set_data (GObject *object, + const gchar *key, + gpointer data); +GOBJECT_AVAILABLE_IN_ALL +void g_object_set_data_full (GObject *object, + const gchar *key, + gpointer data, + GDestroyNotify destroy); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_object_steal_data (GObject *object, + const gchar *key); + +GOBJECT_AVAILABLE_IN_2_34 +gpointer g_object_dup_data (GObject *object, + const gchar *key, + GDuplicateFunc dup_func, + gpointer user_data); +GOBJECT_AVAILABLE_IN_2_34 +gboolean g_object_replace_data (GObject *object, + const gchar *key, + gpointer oldval, + gpointer newval, + GDestroyNotify destroy, + GDestroyNotify *old_destroy); + + +GOBJECT_AVAILABLE_IN_ALL +void g_object_watch_closure (GObject *object, + GClosure *closure); +GOBJECT_AVAILABLE_IN_ALL +GClosure* g_cclosure_new_object (GCallback callback_func, + GObject *object); +GOBJECT_AVAILABLE_IN_ALL +GClosure* g_cclosure_new_object_swap (GCallback callback_func, + GObject *object); +GOBJECT_AVAILABLE_IN_ALL +GClosure* g_closure_new_object (guint sizeof_closure, + GObject *object); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_object (GValue *value, + gpointer v_object); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_value_get_object (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_value_dup_object (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +gulong g_signal_connect_object (gpointer instance, + const gchar *detailed_signal, + GCallback c_handler, + gpointer gobject, + GConnectFlags connect_flags); + +/*< protected >*/ +GOBJECT_AVAILABLE_IN_ALL +void g_object_force_floating (GObject *object); +GOBJECT_AVAILABLE_IN_ALL +void g_object_run_dispose (GObject *object); + + +GOBJECT_AVAILABLE_IN_ALL +void g_value_take_object (GValue *value, + gpointer v_object); +GOBJECT_DEPRECATED_FOR(g_value_take_object) +void g_value_set_object_take_ownership (GValue *value, + gpointer v_object); + +GOBJECT_DEPRECATED +gsize g_object_compat_control (gsize what, + gpointer data); + +/* --- implementation macros --- */ +#define G_OBJECT_WARN_INVALID_PSPEC(object, pname, property_id, pspec) \ +G_STMT_START { \ + GObject *_glib__object = (GObject*) (object); \ + GParamSpec *_glib__pspec = (GParamSpec*) (pspec); \ + guint _glib__property_id = (property_id); \ + g_warning ("%s:%d: invalid %s id %u for \"%s\" of type '%s' in '%s'", \ + __FILE__, __LINE__, \ + (pname), \ + _glib__property_id, \ + _glib__pspec->name, \ + g_type_name (G_PARAM_SPEC_TYPE (_glib__pspec)), \ + G_OBJECT_TYPE_NAME (_glib__object)); \ +} G_STMT_END +/** + * G_OBJECT_WARN_INVALID_PROPERTY_ID: + * @object: the #GObject on which set_property() or get_property() was called + * @property_id: the numeric id of the property + * @pspec: the #GParamSpec of the property + * + * This macro should be used to emit a standard warning about unexpected + * properties in set_property() and get_property() implementations. + */ +#define G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec) \ + G_OBJECT_WARN_INVALID_PSPEC ((object), "property", (property_id), (pspec)) + +GOBJECT_AVAILABLE_IN_ALL +void g_clear_object (GObject **object_ptr); +#define g_clear_object(object_ptr) g_clear_pointer ((object_ptr), g_object_unref) + +/** + * g_set_object: (skip) + * @object_ptr: (inout) (not optional) (nullable): a pointer to a #GObject reference + * @new_object: (nullable) (transfer none): a pointer to the new #GObject to + * assign to @object_ptr, or %NULL to clear the pointer + * + * Updates a #GObject pointer to refer to @new_object. + * + * It increments the reference count of @new_object (if non-%NULL), decrements + * the reference count of the current value of @object_ptr (if non-%NULL), and + * assigns @new_object to @object_ptr. The assignment is not atomic. + * + * @object_ptr must not be %NULL, but can point to a %NULL value. + * + * A macro is also included that allows this function to be used without + * pointer casts. The function itself is static inline, so its address may vary + * between compilation units. + * + * One convenient usage of this function is in implementing property setters: + * |[ + * void + * foo_set_bar (Foo *foo, + * Bar *new_bar) + * { + * g_return_if_fail (IS_FOO (foo)); + * g_return_if_fail (new_bar == NULL || IS_BAR (new_bar)); + * + * if (g_set_object (&foo->bar, new_bar)) + * g_object_notify (foo, "bar"); + * } + * ]| + * + * Returns: %TRUE if the value of @object_ptr changed, %FALSE otherwise + * + * Since: 2.44 + */ +static inline gboolean +(g_set_object) (GObject **object_ptr, + GObject *new_object) +{ + GObject *old_object = *object_ptr; + + /* rely on g_object_[un]ref() to check the pointers are actually GObjects; + * elide a (object_ptr != NULL) check because most of the time we will be + * operating on struct members with a constant offset, so a NULL check would + * not catch bugs + */ + + if (old_object == new_object) + return FALSE; + + if (new_object != NULL) + g_object_ref (new_object); + + *object_ptr = new_object; + + if (old_object != NULL) + g_object_unref (old_object); + + return TRUE; +} + +/* We need GCC for __extension__, which we need to sort out strict aliasing of @object_ptr */ +#if defined(__GNUC__) + +#define g_set_object(object_ptr, new_object) \ + (G_GNUC_EXTENSION ({ \ + G_STATIC_ASSERT (sizeof *(object_ptr) == sizeof (new_object)); \ + /* Only one access, please; work around type aliasing */ \ + union { char *in; GObject **out; } _object_ptr; \ + _object_ptr.in = (char *) (object_ptr); \ + /* Check types match */ \ + (void) (0 ? *(object_ptr) = (new_object), FALSE : FALSE); \ + (g_set_object) (_object_ptr.out, (GObject *) new_object); \ + })) \ + GOBJECT_AVAILABLE_MACRO_IN_2_44 + +#else /* if !defined(__GNUC__) */ + +#define g_set_object(object_ptr, new_object) \ + (/* Check types match. */ \ + 0 ? *(object_ptr) = (new_object), FALSE : \ + (g_set_object) ((GObject **) (object_ptr), (GObject *) (new_object)) \ + ) + +#endif /* !defined(__GNUC__) */ + +/** + * g_assert_finalize_object: (skip) + * @object: (transfer full) (type GObject.Object): an object + * + * Assert that @object is non-%NULL, then release one reference to it with + * g_object_unref() and assert that it has been finalized (i.e. that there + * are no more references). + * + * If assertions are disabled via `G_DISABLE_ASSERT`, + * this macro just calls g_object_unref() without any further checks. + * + * This macro should only be used in regression tests. + * + * Since: 2.62 + */ +static inline void +(g_assert_finalize_object) (GObject *object) +{ + gpointer weak_pointer = object; + + g_assert_true (G_IS_OBJECT (weak_pointer)); + g_object_add_weak_pointer (object, &weak_pointer); + g_object_unref (weak_pointer); + g_assert_null (weak_pointer); +} + +#ifdef G_DISABLE_ASSERT +#define g_assert_finalize_object(object) g_object_unref (object) +#else +#define g_assert_finalize_object(object) (g_assert_finalize_object ((GObject *) object)) +#endif + +/** + * g_clear_weak_pointer: (skip) + * @weak_pointer_location: The memory address of a pointer + * + * Clears a weak reference to a #GObject. + * + * @weak_pointer_location must not be %NULL. + * + * If the weak reference is %NULL then this function does nothing. + * Otherwise, the weak reference to the object is removed for that location + * and the pointer is set to %NULL. + * + * A macro is also included that allows this function to be used without + * pointer casts. The function itself is static inline, so its address may vary + * between compilation units. + * + * Since: 2.56 + */ +static inline void +(g_clear_weak_pointer) (gpointer *weak_pointer_location) +{ + GObject *object = (GObject *) *weak_pointer_location; + + if (object != NULL) + { + g_object_remove_weak_pointer (object, weak_pointer_location); + *weak_pointer_location = NULL; + } +} + +#define g_clear_weak_pointer(weak_pointer_location) \ + (/* Check types match. */ \ + (g_clear_weak_pointer) ((gpointer *) (weak_pointer_location)) \ + ) + +/** + * g_set_weak_pointer: (skip) + * @weak_pointer_location: the memory address of a pointer + * @new_object: (nullable) (transfer none): a pointer to the new #GObject to + * assign to it, or %NULL to clear the pointer + * + * Updates a pointer to weakly refer to @new_object. + * + * It assigns @new_object to @weak_pointer_location and ensures + * that @weak_pointer_location will automatically be set to %NULL + * if @new_object gets destroyed. The assignment is not atomic. + * The weak reference is not thread-safe, see g_object_add_weak_pointer() + * for details. + * + * The @weak_pointer_location argument must not be %NULL. + * + * A macro is also included that allows this function to be used without + * pointer casts. The function itself is static inline, so its address may vary + * between compilation units. + * + * One convenient usage of this function is in implementing property setters: + * |[ + * void + * foo_set_bar (Foo *foo, + * Bar *new_bar) + * { + * g_return_if_fail (IS_FOO (foo)); + * g_return_if_fail (new_bar == NULL || IS_BAR (new_bar)); + * + * if (g_set_weak_pointer (&foo->bar, new_bar)) + * g_object_notify (foo, "bar"); + * } + * ]| + * + * Returns: %TRUE if the value of @weak_pointer_location changed, %FALSE otherwise + * + * Since: 2.56 + */ +static inline gboolean +(g_set_weak_pointer) (gpointer *weak_pointer_location, + GObject *new_object) +{ + GObject *old_object = (GObject *) *weak_pointer_location; + + /* elide a (weak_pointer_location != NULL) check because most of the time we + * will be operating on struct members with a constant offset, so a NULL + * check would not catch bugs + */ + + if (old_object == new_object) + return FALSE; + + if (old_object != NULL) + g_object_remove_weak_pointer (old_object, weak_pointer_location); + + *weak_pointer_location = new_object; + + if (new_object != NULL) + g_object_add_weak_pointer (new_object, weak_pointer_location); + + return TRUE; +} + +#define g_set_weak_pointer(weak_pointer_location, new_object) \ + (/* Check types match. */ \ + 0 ? *(weak_pointer_location) = (new_object), FALSE : \ + (g_set_weak_pointer) ((gpointer *) (weak_pointer_location), (GObject *) (new_object)) \ + ) + +typedef struct { + /**/ + union { gpointer p; } priv; +} GWeakRef; + +GOBJECT_AVAILABLE_IN_ALL +void g_weak_ref_init (GWeakRef *weak_ref, + gpointer object); +GOBJECT_AVAILABLE_IN_ALL +void g_weak_ref_clear (GWeakRef *weak_ref); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_weak_ref_get (GWeakRef *weak_ref); +GOBJECT_AVAILABLE_IN_ALL +void g_weak_ref_set (GWeakRef *weak_ref, + gpointer object); + +G_END_DECLS + +#endif /* __G_OBJECT_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gobjectnotifyqueue.c b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gobjectnotifyqueue.c new file mode 100644 index 0000000..6ed6f51 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gobjectnotifyqueue.c @@ -0,0 +1,199 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ + +/* WARNING: + * + * This file is INSTALLED and other projects (outside of glib) + * #include its contents. + */ + +#ifndef __G_OBJECT_NOTIFY_QUEUE_H__ +#define __G_OBJECT_NOTIFY_QUEUE_H__ + +#include /* memset */ + +#include + +G_BEGIN_DECLS + + +/* --- typedefs --- */ +typedef struct _GObjectNotifyContext GObjectNotifyContext; +typedef struct _GObjectNotifyQueue GObjectNotifyQueue; +typedef void (*GObjectNotifyQueueDispatcher) (GObject *object, + guint n_pspecs, + GParamSpec **pspecs); + + +/* --- structures --- */ +struct _GObjectNotifyContext +{ + GQuark quark_notify_queue; + GObjectNotifyQueueDispatcher dispatcher; + GTrashStack *_nqueue_trash; /* unused */ +}; +struct _GObjectNotifyQueue +{ + GObjectNotifyContext *context; + GSList *pspecs; + guint16 n_pspecs; + guint16 freeze_count; +}; + +G_LOCK_DEFINE_STATIC(notify_lock); + +/* --- functions --- */ +static void +g_object_notify_queue_free (gpointer data) +{ + GObjectNotifyQueue *nqueue = data; + + g_slist_free (nqueue->pspecs); + g_slice_free (GObjectNotifyQueue, nqueue); +} + +static inline GObjectNotifyQueue* +g_object_notify_queue_freeze (GObject *object, + GObjectNotifyContext *context) +{ + GObjectNotifyQueue *nqueue; + + G_LOCK(notify_lock); + nqueue = g_datalist_id_get_data (&object->qdata, context->quark_notify_queue); + if (!nqueue) + { + nqueue = g_slice_new0 (GObjectNotifyQueue); + nqueue->context = context; + g_datalist_id_set_data_full (&object->qdata, context->quark_notify_queue, + nqueue, g_object_notify_queue_free); + } + + if (nqueue->freeze_count >= 65535) + g_critical("Free queue for %s (%p) is larger than 65535," + " called g_object_freeze_notify() too often." + " Forgot to call g_object_thaw_notify() or infinite loop", + G_OBJECT_TYPE_NAME (object), object); + else + nqueue->freeze_count++; + G_UNLOCK(notify_lock); + + return nqueue; +} + +static inline void +g_object_notify_queue_thaw (GObject *object, + GObjectNotifyQueue *nqueue) +{ + GObjectNotifyContext *context = nqueue->context; + GParamSpec *pspecs_mem[16], **pspecs, **free_me = NULL; + GSList *slist; + guint n_pspecs = 0; + + g_return_if_fail (nqueue->freeze_count > 0); + g_return_if_fail (g_atomic_int_get(&object->ref_count) > 0); + + G_LOCK(notify_lock); + + /* Just make sure we never get into some nasty race condition */ + if (G_UNLIKELY(nqueue->freeze_count == 0)) { + G_UNLOCK(notify_lock); + g_critical ("%s: property-changed notification for %s(%p) is not frozen", + G_STRFUNC, G_OBJECT_TYPE_NAME (object), object); + return; + } + + nqueue->freeze_count--; + if (nqueue->freeze_count) { + G_UNLOCK(notify_lock); + return; + } + + pspecs = nqueue->n_pspecs > 16 ? free_me = g_new (GParamSpec*, nqueue->n_pspecs) : pspecs_mem; + + for (slist = nqueue->pspecs; slist; slist = slist->next) + { + pspecs[n_pspecs++] = slist->data; + } + g_datalist_id_set_data (&object->qdata, context->quark_notify_queue, NULL); + + G_UNLOCK(notify_lock); + + if (n_pspecs) + context->dispatcher (object, n_pspecs, pspecs); + g_free (free_me); +} + +static inline void +g_object_notify_queue_clear (GObject *object, + GObjectNotifyQueue *nqueue) +{ + g_return_if_fail (nqueue->freeze_count > 0); + + G_LOCK(notify_lock); + + g_slist_free (nqueue->pspecs); + nqueue->pspecs = NULL; + nqueue->n_pspecs = 0; + + G_UNLOCK(notify_lock); +} + +static inline void +g_object_notify_queue_add (GObject *object, + GObjectNotifyQueue *nqueue, + GParamSpec *pspec) +{ + if (pspec->flags & G_PARAM_READABLE) + { + GParamSpec *redirect; + + G_LOCK(notify_lock); + + g_return_if_fail (nqueue->n_pspecs < 65535); + + redirect = g_param_spec_get_redirect_target (pspec); + if (redirect) + pspec = redirect; + + /* we do the deduping in _thaw */ + if (g_slist_find (nqueue->pspecs, pspec) == NULL) + { + nqueue->pspecs = g_slist_prepend (nqueue->pspecs, pspec); + nqueue->n_pspecs++; + } + + G_UNLOCK(notify_lock); + } +} + +/* NB: This function is not threadsafe, do not ever use it if + * you need a threadsafe notify queue. + * Use g_object_notify_queue_freeze() to acquire the queue and + * g_object_notify_queue_thaw() after you are done instead. + */ +static inline GObjectNotifyQueue* +g_object_notify_queue_from_object (GObject *object, + GObjectNotifyContext *context) +{ + return g_datalist_id_get_data (&object->qdata, context->quark_notify_queue); +} + +G_END_DECLS + +#endif /* __G_OBJECT_NOTIFY_QUEUE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gparam.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gparam.h new file mode 100644 index 0000000..6454e69 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gparam.h @@ -0,0 +1,476 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1997-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * gparam.h: GParamSpec base class implementation + */ +#ifndef __G_PARAM_H__ +#define __G_PARAM_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/* --- standard type macros --- */ +/** + * G_TYPE_IS_PARAM: + * @type: a #GType ID + * + * Checks whether @type "is a" %G_TYPE_PARAM. + */ +#define G_TYPE_IS_PARAM(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_PARAM) +/** + * G_PARAM_SPEC: + * @pspec: a valid #GParamSpec + * + * Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) into + * a #GParamSpec object. + */ +#define G_PARAM_SPEC(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM, GParamSpec)) +/** + * G_IS_PARAM_SPEC: + * @pspec: a #GParamSpec + * + * Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM + * or derived. + */ +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_42 +#define G_IS_PARAM_SPEC(pspec) (G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE ((pspec), G_TYPE_PARAM)) +#else +#define G_IS_PARAM_SPEC(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM)) +#endif +/** + * G_PARAM_SPEC_CLASS: + * @pclass: a valid #GParamSpecClass + * + * Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure. + */ +#define G_PARAM_SPEC_CLASS(pclass) (G_TYPE_CHECK_CLASS_CAST ((pclass), G_TYPE_PARAM, GParamSpecClass)) +/** + * G_IS_PARAM_SPEC_CLASS: + * @pclass: a #GParamSpecClass + * + * Checks whether @pclass "is a" valid #GParamSpecClass structure of type + * %G_TYPE_PARAM or derived. + */ +#define G_IS_PARAM_SPEC_CLASS(pclass) (G_TYPE_CHECK_CLASS_TYPE ((pclass), G_TYPE_PARAM)) +/** + * G_PARAM_SPEC_GET_CLASS: + * @pspec: a valid #GParamSpec + * + * Retrieves the #GParamSpecClass of a #GParamSpec. + */ +#define G_PARAM_SPEC_GET_CLASS(pspec) (G_TYPE_INSTANCE_GET_CLASS ((pspec), G_TYPE_PARAM, GParamSpecClass)) + + +/* --- convenience macros --- */ +/** + * G_PARAM_SPEC_TYPE: + * @pspec: a valid #GParamSpec + * + * Retrieves the #GType of this @pspec. + */ +#define G_PARAM_SPEC_TYPE(pspec) (G_TYPE_FROM_INSTANCE (pspec)) +/** + * G_PARAM_SPEC_TYPE_NAME: + * @pspec: a valid #GParamSpec + * + * Retrieves the #GType name of this @pspec. + */ +#define G_PARAM_SPEC_TYPE_NAME(pspec) (g_type_name (G_PARAM_SPEC_TYPE (pspec))) +/** + * G_PARAM_SPEC_VALUE_TYPE: + * @pspec: a valid #GParamSpec + * + * Retrieves the #GType to initialize a #GValue for this parameter. + */ +#define G_PARAM_SPEC_VALUE_TYPE(pspec) (G_PARAM_SPEC (pspec)->value_type) +/** + * G_VALUE_HOLDS_PARAM: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values derived from type %G_TYPE_PARAM. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_PARAM(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_PARAM)) + + +/* --- flags --- */ +/** + * GParamFlags: + * @G_PARAM_READABLE: the parameter is readable + * @G_PARAM_WRITABLE: the parameter is writable + * @G_PARAM_READWRITE: alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE + * @G_PARAM_CONSTRUCT: the parameter will be set upon object construction + * @G_PARAM_CONSTRUCT_ONLY: the parameter can only be set upon object construction + * @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert()) + * strict validation is not required + * @G_PARAM_STATIC_NAME: the string used as name when constructing the + * parameter is guaranteed to remain valid and + * unmodified for the lifetime of the parameter. + * Since 2.8 + * @G_PARAM_STATIC_NICK: the string used as nick when constructing the + * parameter is guaranteed to remain valid and + * unmmodified for the lifetime of the parameter. + * Since 2.8 + * @G_PARAM_STATIC_BLURB: the string used as blurb when constructing the + * parameter is guaranteed to remain valid and + * unmodified for the lifetime of the parameter. + * Since 2.8 + * @G_PARAM_EXPLICIT_NOTIFY: calls to g_object_set_property() for this + * property will not automatically result in a "notify" signal being + * emitted: the implementation must call g_object_notify() themselves + * in case the property actually changes. Since: 2.42. + * @G_PARAM_PRIVATE: internal + * @G_PARAM_DEPRECATED: the parameter is deprecated and will be removed + * in a future version. A warning will be generated if it is used + * while running with G_ENABLE_DIAGNOSTIC=1. + * Since 2.26 + * + * Through the #GParamFlags flag values, certain aspects of parameters + * can be configured. + * + * See also: %G_PARAM_STATIC_STRINGS + */ +typedef enum +{ + G_PARAM_READABLE = 1 << 0, + G_PARAM_WRITABLE = 1 << 1, + G_PARAM_READWRITE = (G_PARAM_READABLE | G_PARAM_WRITABLE), + G_PARAM_CONSTRUCT = 1 << 2, + G_PARAM_CONSTRUCT_ONLY = 1 << 3, + G_PARAM_LAX_VALIDATION = 1 << 4, + G_PARAM_STATIC_NAME = 1 << 5, + G_PARAM_PRIVATE GOBJECT_DEPRECATED_ENUMERATOR_IN_2_26 = G_PARAM_STATIC_NAME, + G_PARAM_STATIC_NICK = 1 << 6, + G_PARAM_STATIC_BLURB = 1 << 7, + /* User defined flags go here */ + G_PARAM_EXPLICIT_NOTIFY = 1 << 30, + /* Avoid warning with -Wpedantic for gcc6 */ + G_PARAM_DEPRECATED = (gint)(1u << 31) +} GParamFlags; + +/** + * G_PARAM_STATIC_STRINGS: + * + * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB. + * + * It is recommended to use this for all properties by default, as it allows for + * internal performance improvements in GObject. + * + * It is very rare that a property would have a dynamically constructed name, + * nickname or blurb. + * + * Since 2.13.0 + */ +#define G_PARAM_STATIC_STRINGS (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB) +/* bits in the range 0xffffff00 are reserved for 3rd party usage */ +/** + * G_PARAM_MASK: + * + * Mask containing the bits of #GParamSpec.flags which are reserved for GLib. + */ +#define G_PARAM_MASK (0x000000ff) +/** + * G_PARAM_USER_SHIFT: + * + * Minimum shift count to be used for user defined flags, to be stored in + * #GParamSpec.flags. The maximum allowed is 10. + */ +#define G_PARAM_USER_SHIFT (8) + +/* --- typedefs & structures --- */ +typedef struct _GParamSpec GParamSpec; +typedef struct _GParamSpecClass GParamSpecClass; +typedef struct _GParameter GParameter GOBJECT_DEPRECATED_TYPE_IN_2_54; +typedef struct _GParamSpecPool GParamSpecPool; +/** + * GParamSpec: (ref-func g_param_spec_ref_sink) (unref-func g_param_spec_unref) (set-value-func g_value_set_param) (get-value-func g_value_get_param) + * @g_type_instance: private #GTypeInstance portion + * @name: name of this parameter: always an interned string + * @flags: #GParamFlags flags for this parameter + * @value_type: the #GValue type for this parameter + * @owner_type: #GType type that uses (introduces) this parameter + * + * All other fields of the GParamSpec struct are private and + * should not be used directly. + */ +struct _GParamSpec +{ + GTypeInstance g_type_instance; + + const gchar *name; /* interned string */ + GParamFlags flags; + GType value_type; + GType owner_type; /* class or interface using this property */ + + /*< private >*/ + gchar *_nick; + gchar *_blurb; + GData *qdata; + guint ref_count; + guint param_id; /* sort-criteria */ +}; +/** + * GParamSpecClass: + * @g_type_class: the parent class + * @value_type: the #GValue type for this parameter + * @finalize: The instance finalization function (optional), should chain + * up to the finalize method of the parent class. + * @value_set_default: Resets a @value to the default value for this type + * (recommended, the default is g_value_reset()), see + * g_param_value_set_default(). + * @value_validate: Ensures that the contents of @value comply with the + * specifications set out by this type (optional), see + * g_param_value_validate(). + * @values_cmp: Compares @value1 with @value2 according to this type + * (recommended, the default is memcmp()), see g_param_values_cmp(). + * @value_is_valid: Checks if contents of @value comply with the specifications + * set out by this type, without modifying the value. This vfunc is optional. + * If it isn't set, GObject will use @value_validate. Since 2.74 + * + * The class structure for the GParamSpec type. + * Normally, GParamSpec classes are filled by + * g_param_type_register_static(). + */ +struct _GParamSpecClass +{ + GTypeClass g_type_class; + + GType value_type; + + void (*finalize) (GParamSpec *pspec); + + /* GParam methods */ + void (*value_set_default) (GParamSpec *pspec, + GValue *value); + gboolean (*value_validate) (GParamSpec *pspec, + GValue *value); + gint (*values_cmp) (GParamSpec *pspec, + const GValue *value1, + const GValue *value2); + + gboolean (*value_is_valid) (GParamSpec *pspec, + const GValue *value); + + /*< private >*/ + gpointer dummy[3]; +}; +/** + * GParameter: + * @name: the parameter name + * @value: the parameter value + * + * The GParameter struct is an auxiliary structure used + * to hand parameter name/value pairs to g_object_newv(). + * + * Deprecated: 2.54: This type is not introspectable. + */ +struct _GParameter /* auxiliary structure for _setv() variants */ +{ + const gchar *name; + GValue value; +} GOBJECT_DEPRECATED_TYPE_IN_2_54; + + +/* --- prototypes --- */ +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_ref (GParamSpec *pspec); +GOBJECT_AVAILABLE_IN_ALL +void g_param_spec_unref (GParamSpec *pspec); +GOBJECT_AVAILABLE_IN_ALL +void g_param_spec_sink (GParamSpec *pspec); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_ref_sink (GParamSpec *pspec); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_param_spec_get_qdata (GParamSpec *pspec, + GQuark quark); +GOBJECT_AVAILABLE_IN_ALL +void g_param_spec_set_qdata (GParamSpec *pspec, + GQuark quark, + gpointer data); +GOBJECT_AVAILABLE_IN_ALL +void g_param_spec_set_qdata_full (GParamSpec *pspec, + GQuark quark, + gpointer data, + GDestroyNotify destroy); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_param_spec_steal_qdata (GParamSpec *pspec, + GQuark quark); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_get_redirect_target (GParamSpec *pspec); + +GOBJECT_AVAILABLE_IN_ALL +void g_param_value_set_default (GParamSpec *pspec, + GValue *value); +GOBJECT_AVAILABLE_IN_ALL +gboolean g_param_value_defaults (GParamSpec *pspec, + const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +gboolean g_param_value_validate (GParamSpec *pspec, + GValue *value); +GOBJECT_AVAILABLE_IN_2_74 +gboolean g_param_value_is_valid (GParamSpec *pspec, + const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +gboolean g_param_value_convert (GParamSpec *pspec, + const GValue *src_value, + GValue *dest_value, + gboolean strict_validation); +GOBJECT_AVAILABLE_IN_ALL +gint g_param_values_cmp (GParamSpec *pspec, + const GValue *value1, + const GValue *value2); +GOBJECT_AVAILABLE_IN_ALL +const gchar * g_param_spec_get_name (GParamSpec *pspec); +GOBJECT_AVAILABLE_IN_ALL +const gchar * g_param_spec_get_nick (GParamSpec *pspec); +GOBJECT_AVAILABLE_IN_ALL +const gchar * g_param_spec_get_blurb (GParamSpec *pspec); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_param (GValue *value, + GParamSpec *param); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_value_get_param (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_value_dup_param (const GValue *value); + + +GOBJECT_AVAILABLE_IN_ALL +void g_value_take_param (GValue *value, + GParamSpec *param); +GOBJECT_DEPRECATED_FOR(g_value_take_param) +void g_value_set_param_take_ownership (GValue *value, + GParamSpec *param); +GOBJECT_AVAILABLE_IN_2_36 +const GValue * g_param_spec_get_default_value (GParamSpec *pspec); + +GOBJECT_AVAILABLE_IN_2_46 +GQuark g_param_spec_get_name_quark (GParamSpec *pspec); + +/* --- convenience functions --- */ +typedef struct _GParamSpecTypeInfo GParamSpecTypeInfo; +/** + * GParamSpecTypeInfo: + * @instance_size: Size of the instance (object) structure. + * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the [slice allocator][glib-Memory-Slices] now. + * @instance_init: Location of the instance initialization function (optional). + * @value_type: The #GType of values conforming to this #GParamSpec + * @finalize: The instance finalization function (optional). + * @value_set_default: Resets a @value to the default value for @pspec + * (recommended, the default is g_value_reset()), see + * g_param_value_set_default(). + * @value_validate: Ensures that the contents of @value comply with the + * specifications set out by @pspec (optional), see + * g_param_value_validate(). + * @values_cmp: Compares @value1 with @value2 according to @pspec + * (recommended, the default is memcmp()), see g_param_values_cmp(). + * + * This structure is used to provide the type system with the information + * required to initialize and destruct (finalize) a parameter's class and + * instances thereof. + * + * The initialized structure is passed to the g_param_type_register_static() + * The type system will perform a deep copy of this structure, so its memory + * does not need to be persistent across invocation of + * g_param_type_register_static(). + */ +struct _GParamSpecTypeInfo +{ + /* type system portion */ + guint16 instance_size; /* obligatory */ + guint16 n_preallocs; /* optional */ + void (*instance_init) (GParamSpec *pspec); /* optional */ + + /* class portion */ + GType value_type; /* obligatory */ + void (*finalize) (GParamSpec *pspec); /* optional */ + void (*value_set_default) (GParamSpec *pspec, /* recommended */ + GValue *value); + gboolean (*value_validate) (GParamSpec *pspec, /* optional */ + GValue *value); + gint (*values_cmp) (GParamSpec *pspec, /* recommended */ + const GValue *value1, + const GValue *value2); +}; +GOBJECT_AVAILABLE_IN_ALL +GType g_param_type_register_static (const gchar *name, + const GParamSpecTypeInfo *pspec_info); + +GOBJECT_AVAILABLE_IN_2_66 +gboolean g_param_spec_is_valid_name (const gchar *name); + +/* For registering builting types */ +GType _g_param_type_register_static_constant (const gchar *name, + const GParamSpecTypeInfo *pspec_info, + GType opt_type); + + +/* --- protected --- */ +GOBJECT_AVAILABLE_IN_ALL +gpointer g_param_spec_internal (GType param_type, + const gchar *name, + const gchar *nick, + const gchar *blurb, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpecPool* g_param_spec_pool_new (gboolean type_prefixing); +GOBJECT_AVAILABLE_IN_ALL +void g_param_spec_pool_insert (GParamSpecPool *pool, + GParamSpec *pspec, + GType owner_type); +GOBJECT_AVAILABLE_IN_ALL +void g_param_spec_pool_remove (GParamSpecPool *pool, + GParamSpec *pspec); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_pool_lookup (GParamSpecPool *pool, + const gchar *param_name, + GType owner_type, + gboolean walk_ancestors); +GOBJECT_AVAILABLE_IN_ALL +GList* g_param_spec_pool_list_owned (GParamSpecPool *pool, + GType owner_type); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec** g_param_spec_pool_list (GParamSpecPool *pool, + GType owner_type, + guint *n_pspecs_p); + + +/* contracts: + * + * gboolean value_validate (GParamSpec *pspec, + * GValue *value): + * modify value contents in the least destructive way, so + * that it complies with pspec's requirements (i.e. + * according to minimum/maximum ranges etc...). return + * whether modification was necessary. + * + * gint values_cmp (GParamSpec *pspec, + * const GValue *value1, + * const GValue *value2): + * return value1 - value2, i.e. (-1) if value1 < value2, + * (+1) if value1 > value2, and (0) otherwise (equality) + */ + +G_END_DECLS + +#endif /* __G_PARAM_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gparamspecs.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gparamspecs.h new file mode 100644 index 0000000..eaabc10 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gparamspecs.h @@ -0,0 +1,1151 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1997-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * gparamspecs.h: GLib default param specs + */ +#ifndef __G_PARAMSPECS_H__ +#define __G_PARAMSPECS_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include +#include + +G_BEGIN_DECLS + +/* --- type macros --- */ +/** + * G_TYPE_PARAM_CHAR: + * + * The #GType of #GParamSpecChar. + */ +#define G_TYPE_PARAM_CHAR (g_param_spec_types[0]) +/** + * G_IS_PARAM_SPEC_CHAR: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_CHAR)) +/** + * G_PARAM_SPEC_CHAR: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecChar. + */ +#define G_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_CHAR, GParamSpecChar)) + +/** + * G_TYPE_PARAM_UCHAR: + * + * The #GType of #GParamSpecUChar. + */ +#define G_TYPE_PARAM_UCHAR (g_param_spec_types[1]) +/** + * G_IS_PARAM_SPEC_UCHAR: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UCHAR)) +/** + * G_PARAM_SPEC_UCHAR: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecUChar. + */ +#define G_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UCHAR, GParamSpecUChar)) + +/** + * G_TYPE_PARAM_BOOLEAN: + * + * The #GType of #GParamSpecBoolean. + */ +#define G_TYPE_PARAM_BOOLEAN (g_param_spec_types[2]) +/** + * G_IS_PARAM_SPEC_BOOLEAN: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOOLEAN)) +/** + * G_PARAM_SPEC_BOOLEAN: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecBoolean. + */ +#define G_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOOLEAN, GParamSpecBoolean)) + +/** + * G_TYPE_PARAM_INT: + * + * The #GType of #GParamSpecInt. + */ +#define G_TYPE_PARAM_INT (g_param_spec_types[3]) +/** + * G_IS_PARAM_SPEC_INT: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT)) +/** + * G_PARAM_SPEC_INT: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecInt. + */ +#define G_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT, GParamSpecInt)) + +/** + * G_TYPE_PARAM_UINT: + * + * The #GType of #GParamSpecUInt. + */ +#define G_TYPE_PARAM_UINT (g_param_spec_types[4]) +/** + * G_IS_PARAM_SPEC_UINT: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT)) +/** + * G_PARAM_SPEC_UINT: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecUInt. + */ +#define G_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT, GParamSpecUInt)) + +/** + * G_TYPE_PARAM_LONG: + * + * The #GType of #GParamSpecLong. + */ +#define G_TYPE_PARAM_LONG (g_param_spec_types[5]) +/** + * G_IS_PARAM_SPEC_LONG: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_LONG)) +/** + * G_PARAM_SPEC_LONG: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecLong. + */ +#define G_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_LONG, GParamSpecLong)) + +/** + * G_TYPE_PARAM_ULONG: + * + * The #GType of #GParamSpecULong. + */ +#define G_TYPE_PARAM_ULONG (g_param_spec_types[6]) +/** + * G_IS_PARAM_SPEC_ULONG: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ULONG)) +/** + * G_PARAM_SPEC_ULONG: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecULong. + */ +#define G_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ULONG, GParamSpecULong)) + +/** + * G_TYPE_PARAM_INT64: + * + * The #GType of #GParamSpecInt64. + */ +#define G_TYPE_PARAM_INT64 (g_param_spec_types[7]) +/** + * G_IS_PARAM_SPEC_INT64: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT64)) +/** + * G_PARAM_SPEC_INT64: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecInt64. + */ +#define G_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT64, GParamSpecInt64)) + +/** + * G_TYPE_PARAM_UINT64: + * + * The #GType of #GParamSpecUInt64. + */ +#define G_TYPE_PARAM_UINT64 (g_param_spec_types[8]) +/** + * G_IS_PARAM_SPEC_UINT64: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT64)) +/** + * G_PARAM_SPEC_UINT64: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecUInt64. + */ +#define G_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT64, GParamSpecUInt64)) + +/** + * G_TYPE_PARAM_UNICHAR: + * + * The #GType of #GParamSpecUnichar. + */ +#define G_TYPE_PARAM_UNICHAR (g_param_spec_types[9]) +/** + * G_PARAM_SPEC_UNICHAR: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecUnichar. + */ +#define G_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UNICHAR, GParamSpecUnichar)) +/** + * G_IS_PARAM_SPEC_UNICHAR: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UNICHAR)) + +/** + * G_TYPE_PARAM_ENUM: + * + * The #GType of #GParamSpecEnum. + */ +#define G_TYPE_PARAM_ENUM (g_param_spec_types[10]) +/** + * G_IS_PARAM_SPEC_ENUM: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ENUM)) +/** + * G_PARAM_SPEC_ENUM: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecEnum. + */ +#define G_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ENUM, GParamSpecEnum)) + +/** + * G_TYPE_PARAM_FLAGS: + * + * The #GType of #GParamSpecFlags. + */ +#define G_TYPE_PARAM_FLAGS (g_param_spec_types[11]) +/** + * G_IS_PARAM_SPEC_FLAGS: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLAGS)) +/** + * G_PARAM_SPEC_FLAGS: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecFlags. + */ +#define G_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLAGS, GParamSpecFlags)) + +/** + * G_TYPE_PARAM_FLOAT: + * + * The #GType of #GParamSpecFloat. + */ +#define G_TYPE_PARAM_FLOAT (g_param_spec_types[12]) +/** + * G_IS_PARAM_SPEC_FLOAT: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLOAT)) +/** + * G_PARAM_SPEC_FLOAT: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecFloat. + */ +#define G_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLOAT, GParamSpecFloat)) + +/** + * G_TYPE_PARAM_DOUBLE: + * + * The #GType of #GParamSpecDouble. + */ +#define G_TYPE_PARAM_DOUBLE (g_param_spec_types[13]) +/** + * G_IS_PARAM_SPEC_DOUBLE: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_DOUBLE)) +/** + * G_PARAM_SPEC_DOUBLE: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecDouble. + */ +#define G_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_DOUBLE, GParamSpecDouble)) + +/** + * G_TYPE_PARAM_STRING: + * + * The #GType of #GParamSpecString. + */ +#define G_TYPE_PARAM_STRING (g_param_spec_types[14]) +/** + * G_IS_PARAM_SPEC_STRING: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_STRING)) +/** + * G_PARAM_SPEC_STRING: + * @pspec: a valid #GParamSpec instance + * + * Casts a #GParamSpec instance into a #GParamSpecString. + */ +#define G_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_STRING, GParamSpecString)) + +/** + * G_TYPE_PARAM_PARAM: + * + * The #GType of #GParamSpecParam. + */ +#define G_TYPE_PARAM_PARAM (g_param_spec_types[15]) +/** + * G_IS_PARAM_SPEC_PARAM: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_PARAM)) +/** + * G_PARAM_SPEC_PARAM: + * @pspec: a valid #GParamSpec instance + * + * Casts a #GParamSpec instance into a #GParamSpecParam. + */ +#define G_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_PARAM, GParamSpecParam)) + +/** + * G_TYPE_PARAM_BOXED: + * + * The #GType of #GParamSpecBoxed. + */ +#define G_TYPE_PARAM_BOXED (g_param_spec_types[16]) +/** + * G_IS_PARAM_SPEC_BOXED: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOXED)) +/** + * G_PARAM_SPEC_BOXED: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecBoxed. + */ +#define G_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOXED, GParamSpecBoxed)) + +/** + * G_TYPE_PARAM_POINTER: + * + * The #GType of #GParamSpecPointer. + */ +#define G_TYPE_PARAM_POINTER (g_param_spec_types[17]) +/** + * G_IS_PARAM_SPEC_POINTER: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_POINTER)) +/** + * G_PARAM_SPEC_POINTER: + * @pspec: a valid #GParamSpec instance + * + * Casts a #GParamSpec instance into a #GParamSpecPointer. + */ +#define G_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_POINTER, GParamSpecPointer)) + +/** + * G_TYPE_PARAM_VALUE_ARRAY: + * + * The #GType of #GParamSpecValueArray. + * + * Deprecated: 2.32: Use #GArray instead of #GValueArray + */ +#define G_TYPE_PARAM_VALUE_ARRAY (g_param_spec_types[18]) GOBJECT_DEPRECATED_MACRO_IN_2_32 +/** + * G_IS_PARAM_SPEC_VALUE_ARRAY: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY. + * + * Returns: %TRUE on success. + * + * Deprecated: 2.32: Use #GArray instead of #GValueArray + */ +#define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY)) GOBJECT_DEPRECATED_MACRO_IN_2_32 +/** + * G_PARAM_SPEC_VALUE_ARRAY: + * @pspec: a valid #GParamSpec instance + * + * Cast a #GParamSpec instance into a #GParamSpecValueArray. + * + * Deprecated: 2.32: Use #GArray instead of #GValueArray + */ +#define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray)) GOBJECT_DEPRECATED_MACRO_IN_2_32 + +/** + * G_TYPE_PARAM_OBJECT: + * + * The #GType of #GParamSpecObject. + */ +#define G_TYPE_PARAM_OBJECT (g_param_spec_types[19]) +/** + * G_IS_PARAM_SPEC_OBJECT: + * @pspec: a valid #GParamSpec instance + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT. + * + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OBJECT)) +/** + * G_PARAM_SPEC_OBJECT: + * @pspec: a valid #GParamSpec instance + * + * Casts a #GParamSpec instance into a #GParamSpecObject. + */ +#define G_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OBJECT, GParamSpecObject)) + +/** + * G_TYPE_PARAM_OVERRIDE: + * + * The #GType of #GParamSpecOverride. + * + * Since: 2.4 + */ +#define G_TYPE_PARAM_OVERRIDE (g_param_spec_types[20]) +/** + * G_IS_PARAM_SPEC_OVERRIDE: + * @pspec: a #GParamSpec + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE. + * + * Since: 2.4 + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OVERRIDE)) +/** + * G_PARAM_SPEC_OVERRIDE: + * @pspec: a #GParamSpec + * + * Casts a #GParamSpec into a #GParamSpecOverride. + * + * Since: 2.4 + */ +#define G_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OVERRIDE, GParamSpecOverride)) + +/** + * G_TYPE_PARAM_GTYPE: + * + * The #GType of #GParamSpecGType. + * + * Since: 2.10 + */ +#define G_TYPE_PARAM_GTYPE (g_param_spec_types[21]) +/** + * G_IS_PARAM_SPEC_GTYPE: + * @pspec: a #GParamSpec + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE. + * + * Since: 2.10 + * Returns: %TRUE on success. + */ +#define G_IS_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_GTYPE)) +/** + * G_PARAM_SPEC_GTYPE: + * @pspec: a #GParamSpec + * + * Casts a #GParamSpec into a #GParamSpecGType. + * + * Since: 2.10 + */ +#define G_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_GTYPE, GParamSpecGType)) + +/** + * G_TYPE_PARAM_VARIANT: + * + * The #GType of #GParamSpecVariant. + * + * Since: 2.26 + */ +#define G_TYPE_PARAM_VARIANT (g_param_spec_types[22]) +/** + * G_IS_PARAM_SPEC_VARIANT: + * @pspec: a #GParamSpec + * + * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT. + * + * Returns: %TRUE on success + * + * Since: 2.26 + */ +#define G_IS_PARAM_SPEC_VARIANT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VARIANT)) +/** + * G_PARAM_SPEC_VARIANT: + * @pspec: a #GParamSpec + * + * Casts a #GParamSpec into a #GParamSpecVariant. + * + * Since: 2.26 + */ +#define G_PARAM_SPEC_VARIANT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VARIANT, GParamSpecVariant)) + +/* --- typedefs & structures --- */ +typedef struct _GParamSpecChar GParamSpecChar; +typedef struct _GParamSpecUChar GParamSpecUChar; +typedef struct _GParamSpecBoolean GParamSpecBoolean; +typedef struct _GParamSpecInt GParamSpecInt; +typedef struct _GParamSpecUInt GParamSpecUInt; +typedef struct _GParamSpecLong GParamSpecLong; +typedef struct _GParamSpecULong GParamSpecULong; +typedef struct _GParamSpecInt64 GParamSpecInt64; +typedef struct _GParamSpecUInt64 GParamSpecUInt64; +typedef struct _GParamSpecUnichar GParamSpecUnichar; +typedef struct _GParamSpecEnum GParamSpecEnum; +typedef struct _GParamSpecFlags GParamSpecFlags; +typedef struct _GParamSpecFloat GParamSpecFloat; +typedef struct _GParamSpecDouble GParamSpecDouble; +typedef struct _GParamSpecString GParamSpecString; +typedef struct _GParamSpecParam GParamSpecParam; +typedef struct _GParamSpecBoxed GParamSpecBoxed; +typedef struct _GParamSpecPointer GParamSpecPointer; +typedef struct _GParamSpecValueArray GParamSpecValueArray; +typedef struct _GParamSpecObject GParamSpecObject; +typedef struct _GParamSpecOverride GParamSpecOverride; +typedef struct _GParamSpecGType GParamSpecGType; +typedef struct _GParamSpecVariant GParamSpecVariant; + +/** + * GParamSpecChar: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for character properties. + */ +struct _GParamSpecChar +{ + GParamSpec parent_instance; + + gint8 minimum; + gint8 maximum; + gint8 default_value; +}; +/** + * GParamSpecUChar: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for unsigned character properties. + */ +struct _GParamSpecUChar +{ + GParamSpec parent_instance; + + guint8 minimum; + guint8 maximum; + guint8 default_value; +}; +/** + * GParamSpecBoolean: + * @parent_instance: private #GParamSpec portion + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for boolean properties. + */ +struct _GParamSpecBoolean +{ + GParamSpec parent_instance; + + gboolean default_value; +}; +/** + * GParamSpecInt: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for integer properties. + */ +struct _GParamSpecInt +{ + GParamSpec parent_instance; + + gint minimum; + gint maximum; + gint default_value; +}; +/** + * GParamSpecUInt: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for unsigned integer properties. + */ +struct _GParamSpecUInt +{ + GParamSpec parent_instance; + + guint minimum; + guint maximum; + guint default_value; +}; +/** + * GParamSpecLong: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for long integer properties. + */ +struct _GParamSpecLong +{ + GParamSpec parent_instance; + + glong minimum; + glong maximum; + glong default_value; +}; +/** + * GParamSpecULong: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties. + */ +struct _GParamSpecULong +{ + GParamSpec parent_instance; + + gulong minimum; + gulong maximum; + gulong default_value; +}; +/** + * GParamSpecInt64: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for 64bit integer properties. + */ +struct _GParamSpecInt64 +{ + GParamSpec parent_instance; + + gint64 minimum; + gint64 maximum; + gint64 default_value; +}; +/** + * GParamSpecUInt64: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties. + */ +struct _GParamSpecUInt64 +{ + GParamSpec parent_instance; + + guint64 minimum; + guint64 maximum; + guint64 default_value; +}; +/** + * GParamSpecUnichar: + * @parent_instance: private #GParamSpec portion + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties. + */ +struct _GParamSpecUnichar +{ + GParamSpec parent_instance; + + gunichar default_value; +}; +/** + * GParamSpecEnum: + * @parent_instance: private #GParamSpec portion + * @enum_class: the #GEnumClass for the enum + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for enum + * properties. + */ +struct _GParamSpecEnum +{ + GParamSpec parent_instance; + + GEnumClass *enum_class; + gint default_value; +}; +/** + * GParamSpecFlags: + * @parent_instance: private #GParamSpec portion + * @flags_class: the #GFlagsClass for the flags + * @default_value: default value for the property specified + * + * A #GParamSpec derived structure that contains the meta data for flags + * properties. + */ +struct _GParamSpecFlags +{ + GParamSpec parent_instance; + + GFlagsClass *flags_class; + guint default_value; +}; +/** + * GParamSpecFloat: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * @epsilon: values closer than @epsilon will be considered identical + * by g_param_values_cmp(); the default value is 1e-30. + * + * A #GParamSpec derived structure that contains the meta data for float properties. + */ +struct _GParamSpecFloat +{ + GParamSpec parent_instance; + + gfloat minimum; + gfloat maximum; + gfloat default_value; + gfloat epsilon; +}; +/** + * GParamSpecDouble: + * @parent_instance: private #GParamSpec portion + * @minimum: minimum value for the property specified + * @maximum: maximum value for the property specified + * @default_value: default value for the property specified + * @epsilon: values closer than @epsilon will be considered identical + * by g_param_values_cmp(); the default value is 1e-90. + * + * A #GParamSpec derived structure that contains the meta data for double properties. + */ +struct _GParamSpecDouble +{ + GParamSpec parent_instance; + + gdouble minimum; + gdouble maximum; + gdouble default_value; + gdouble epsilon; +}; +/** + * GParamSpecString: + * @parent_instance: private #GParamSpec portion + * @default_value: default value for the property specified + * @cset_first: a string containing the allowed values for the first byte + * @cset_nth: a string containing the allowed values for the subsequent bytes + * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth. + * @null_fold_if_empty: replace empty string by %NULL + * @ensure_non_null: replace %NULL strings by an empty string + * + * A #GParamSpec derived structure that contains the meta data for string + * properties. + */ +struct _GParamSpecString +{ + GParamSpec parent_instance; + + gchar *default_value; + gchar *cset_first; + gchar *cset_nth; + gchar substitutor; + guint null_fold_if_empty : 1; + guint ensure_non_null : 1; +}; +/** + * GParamSpecParam: + * @parent_instance: private #GParamSpec portion + * + * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM + * properties. + */ +struct _GParamSpecParam +{ + GParamSpec parent_instance; +}; +/** + * GParamSpecBoxed: + * @parent_instance: private #GParamSpec portion + * + * A #GParamSpec derived structure that contains the meta data for boxed properties. + */ +struct _GParamSpecBoxed +{ + GParamSpec parent_instance; +}; +/** + * GParamSpecPointer: + * @parent_instance: private #GParamSpec portion + * + * A #GParamSpec derived structure that contains the meta data for pointer properties. + */ +struct _GParamSpecPointer +{ + GParamSpec parent_instance; +}; +/** + * GParamSpecValueArray: + * @parent_instance: private #GParamSpec portion + * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL + * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements + * + * A #GParamSpec derived structure that contains the meta data for #GValueArray properties. + */ +struct _GParamSpecValueArray +{ + GParamSpec parent_instance; + GParamSpec *element_spec; + guint fixed_n_elements; +}; +/** + * GParamSpecObject: + * @parent_instance: private #GParamSpec portion + * + * A #GParamSpec derived structure that contains the meta data for object properties. + */ +struct _GParamSpecObject +{ + GParamSpec parent_instance; +}; +/** + * GParamSpecOverride: + * + * A #GParamSpec derived structure that redirects operations to + * other types of #GParamSpec. + * + * All operations other than getting or setting the value are redirected, + * including accessing the nick and blurb, validating a value, and so + * forth. + * + * See g_param_spec_get_redirect_target() for retrieving the overridden + * property. #GParamSpecOverride is used in implementing + * g_object_class_override_property(), and will not be directly useful + * unless you are implementing a new base type similar to GObject. + * + * Since: 2.4 + */ +struct _GParamSpecOverride +{ + /*< private >*/ + GParamSpec parent_instance; + GParamSpec *overridden; +}; +/** + * GParamSpecGType: + * @parent_instance: private #GParamSpec portion + * @is_a_type: a #GType whose subtypes can occur as values + * + * A #GParamSpec derived structure that contains the meta data for #GType properties. + * + * Since: 2.10 + */ +struct _GParamSpecGType +{ + GParamSpec parent_instance; + GType is_a_type; +}; +/** + * GParamSpecVariant: + * @parent_instance: private #GParamSpec portion + * @type: a #GVariantType, or %NULL + * @default_value: a #GVariant, or %NULL + * + * A #GParamSpec derived structure that contains the meta data for #GVariant properties. + * + * When comparing values with g_param_values_cmp(), scalar values with the same + * type will be compared with g_variant_compare(). Other non-%NULL variants will + * be checked for equality with g_variant_equal(), and their sort order is + * otherwise undefined. %NULL is ordered before non-%NULL variants. Two %NULL + * values compare equal. + * + * Since: 2.26 + */ +struct _GParamSpecVariant +{ + GParamSpec parent_instance; + GVariantType *type; + GVariant *default_value; + + /*< private >*/ + gpointer padding[4]; +}; + +/* --- GParamSpec prototypes --- */ +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_char (const gchar *name, + const gchar *nick, + const gchar *blurb, + gint8 minimum, + gint8 maximum, + gint8 default_value, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_uchar (const gchar *name, + const gchar *nick, + const gchar *blurb, + guint8 minimum, + guint8 maximum, + guint8 default_value, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_boolean (const gchar *name, + const gchar *nick, + const gchar *blurb, + gboolean default_value, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_int (const gchar *name, + const gchar *nick, + const gchar *blurb, + gint minimum, + gint maximum, + gint default_value, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_uint (const gchar *name, + const gchar *nick, + const gchar *blurb, + guint minimum, + guint maximum, + guint default_value, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_long (const gchar *name, + const gchar *nick, + const gchar *blurb, + glong minimum, + glong maximum, + glong default_value, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_ulong (const gchar *name, + const gchar *nick, + const gchar *blurb, + gulong minimum, + gulong maximum, + gulong default_value, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_int64 (const gchar *name, + const gchar *nick, + const gchar *blurb, + gint64 minimum, + gint64 maximum, + gint64 default_value, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_uint64 (const gchar *name, + const gchar *nick, + const gchar *blurb, + guint64 minimum, + guint64 maximum, + guint64 default_value, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_unichar (const gchar *name, + const gchar *nick, + const gchar *blurb, + gunichar default_value, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_enum (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType enum_type, + gint default_value, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_flags (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType flags_type, + guint default_value, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_float (const gchar *name, + const gchar *nick, + const gchar *blurb, + gfloat minimum, + gfloat maximum, + gfloat default_value, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_double (const gchar *name, + const gchar *nick, + const gchar *blurb, + gdouble minimum, + gdouble maximum, + gdouble default_value, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_string (const gchar *name, + const gchar *nick, + const gchar *blurb, + const gchar *default_value, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_param (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType param_type, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_boxed (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType boxed_type, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_pointer (const gchar *name, + const gchar *nick, + const gchar *blurb, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_value_array (const gchar *name, + const gchar *nick, + const gchar *blurb, + GParamSpec *element_spec, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_object (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType object_type, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_override (const gchar *name, + GParamSpec *overridden); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_gtype (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType is_a_type, + GParamFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GParamSpec* g_param_spec_variant (const gchar *name, + const gchar *nick, + const gchar *blurb, + const GVariantType *type, + GVariant *default_value, + GParamFlags flags); + +GOBJECT_VAR GType *g_param_spec_types; + +G_END_DECLS + +#endif /* __G_PARAMSPECS_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gsignal.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gsignal.h new file mode 100644 index 0000000..312055b --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gsignal.h @@ -0,0 +1,647 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 2000-2001 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ +#ifndef __G_SIGNAL_H__ +#define __G_SIGNAL_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include +#include + +G_BEGIN_DECLS + +/* --- typedefs --- */ +typedef struct _GSignalQuery GSignalQuery; +typedef struct _GSignalInvocationHint GSignalInvocationHint; +/** + * GSignalCMarshaller: + * + * This is the signature of marshaller functions, required to marshall + * arrays of parameter values to signal emissions into C language callback + * invocations. + * + * It is merely an alias to #GClosureMarshal since the #GClosure mechanism + * takes over responsibility of actual function invocation for the signal + * system. + */ +typedef GClosureMarshal GSignalCMarshaller; +/** + * GSignalCVaMarshaller: + * + * This is the signature of va_list marshaller functions, an optional + * marshaller that can be used in some situations to avoid + * marshalling the signal argument into GValues. + */ +typedef GVaClosureMarshal GSignalCVaMarshaller; +/** + * GSignalEmissionHook: + * @ihint: Signal invocation hint, see #GSignalInvocationHint. + * @n_param_values: the number of parameters to the function, including + * the instance on which the signal was emitted. + * @param_values: (array length=n_param_values): the instance on which + * the signal was emitted, followed by the parameters of the emission. + * @data: user data associated with the hook. + * + * A simple function pointer to get invoked when the signal is emitted. + * + * Emission hooks allow you to tie a hook to the signal type, so that it will + * trap all emissions of that signal, from any object. + * + * You may not attach these to signals created with the %G_SIGNAL_NO_HOOKS flag. + * + * Returns: whether it wants to stay connected. If it returns %FALSE, the signal + * hook is disconnected (and destroyed). + */ +typedef gboolean (*GSignalEmissionHook) (GSignalInvocationHint *ihint, + guint n_param_values, + const GValue *param_values, + gpointer data); +/** + * GSignalAccumulator: + * @ihint: Signal invocation hint, see #GSignalInvocationHint. + * @return_accu: Accumulator to collect callback return values in, this + * is the return value of the current signal emission. + * @handler_return: A #GValue holding the return value of the signal handler. + * @data: Callback data that was specified when creating the signal. + * + * The signal accumulator is a special callback function that can be used + * to collect return values of the various callbacks that are called + * during a signal emission. + * + * The signal accumulator is specified at signal creation time, if it is + * left %NULL, no accumulation of callback return values is performed. + * The return value of signal emissions is then the value returned by the + * last callback. + * + * Returns: The accumulator function returns whether the signal emission + * should be aborted. Returning %TRUE will continue with + * the signal emission. Returning %FALSE will abort the current emission. + * Since 2.62, returning %FALSE will skip to the CLEANUP stage. In this case, + * emission will occur as normal in the CLEANUP stage and the handler's + * return value will be accumulated. + */ +typedef gboolean (*GSignalAccumulator) (GSignalInvocationHint *ihint, + GValue *return_accu, + const GValue *handler_return, + gpointer data); + + +/* --- run, match and connect types --- */ +/** + * GSignalFlags: + * @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage. + * @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage. + * @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage. + * @G_SIGNAL_NO_RECURSE: Signals being emitted for an object while currently being in + * emission for this very object will not be emitted recursively, + * but instead cause the first emission to be restarted. + * @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name + * upon handler connections and emissions. + * @G_SIGNAL_ACTION: Action signals are signals that may freely be emitted on alive + * objects from user code via g_signal_emit() and friends, without + * the need of being embedded into extra code that performs pre or + * post emission adjustments on the object. They can also be thought + * of as object methods which can be called generically by + * third-party code. + * @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal. + * @G_SIGNAL_MUST_COLLECT: Varargs signal emission will always collect the + * arguments, even if there are no signal handlers connected. Since 2.30. + * @G_SIGNAL_DEPRECATED: The signal is deprecated and will be removed + * in a future version. A warning will be generated if it is connected while + * running with G_ENABLE_DIAGNOSTIC=1. Since 2.32. + * @G_SIGNAL_ACCUMULATOR_FIRST_RUN: Only used in #GSignalAccumulator accumulator + * functions for the #GSignalInvocationHint::run_type field to mark the first + * call to the accumulator function for a signal emission. Since 2.68. + * + * The signal flags are used to specify a signal's behaviour. + */ +typedef enum +{ + G_SIGNAL_RUN_FIRST = 1 << 0, + G_SIGNAL_RUN_LAST = 1 << 1, + G_SIGNAL_RUN_CLEANUP = 1 << 2, + G_SIGNAL_NO_RECURSE = 1 << 3, + G_SIGNAL_DETAILED = 1 << 4, + G_SIGNAL_ACTION = 1 << 5, + G_SIGNAL_NO_HOOKS = 1 << 6, + G_SIGNAL_MUST_COLLECT = 1 << 7, + G_SIGNAL_DEPRECATED = 1 << 8, + /* normal signal flags until 1 << 16 */ + G_SIGNAL_ACCUMULATOR_FIRST_RUN = 1 << 17, +} GSignalFlags; +/** + * G_SIGNAL_FLAGS_MASK: + * + * A mask for all #GSignalFlags bits. + */ +#define G_SIGNAL_FLAGS_MASK 0x1ff +/** + * GConnectFlags: + * @G_CONNECT_DEFAULT: Default behaviour (no special flags). Since: 2.74 + * @G_CONNECT_AFTER: If set, the handler should be called after the + * default handler of the signal. Normally, the handler is called before + * the default handler. + * @G_CONNECT_SWAPPED: If set, the instance and data should be swapped when + * calling the handler; see g_signal_connect_swapped() for an example. + * + * The connection flags are used to specify the behaviour of a signal's + * connection. + */ +typedef enum +{ + G_CONNECT_DEFAULT GOBJECT_AVAILABLE_ENUMERATOR_IN_2_74 = 0, + G_CONNECT_AFTER = 1 << 0, + G_CONNECT_SWAPPED = 1 << 1 +} GConnectFlags; +/** + * GSignalMatchType: + * @G_SIGNAL_MATCH_ID: The signal id must be equal. + * @G_SIGNAL_MATCH_DETAIL: The signal detail must be equal. + * @G_SIGNAL_MATCH_CLOSURE: The closure must be the same. + * @G_SIGNAL_MATCH_FUNC: The C closure callback must be the same. + * @G_SIGNAL_MATCH_DATA: The closure data must be the same. + * @G_SIGNAL_MATCH_UNBLOCKED: Only unblocked signals may be matched. + * + * The match types specify what g_signal_handlers_block_matched(), + * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched() + * match signals by. + */ +typedef enum +{ + G_SIGNAL_MATCH_ID = 1 << 0, + G_SIGNAL_MATCH_DETAIL = 1 << 1, + G_SIGNAL_MATCH_CLOSURE = 1 << 2, + G_SIGNAL_MATCH_FUNC = 1 << 3, + G_SIGNAL_MATCH_DATA = 1 << 4, + G_SIGNAL_MATCH_UNBLOCKED = 1 << 5 +} GSignalMatchType; +/** + * G_SIGNAL_MATCH_MASK: + * + * A mask for all #GSignalMatchType bits. + */ +#define G_SIGNAL_MATCH_MASK 0x3f +/** + * G_SIGNAL_TYPE_STATIC_SCOPE: + * + * This macro flags signal argument types for which the signal system may + * assume that instances thereof remain persistent across all signal emissions + * they are used in. This is only useful for non ref-counted, value-copy types. + * + * To flag a signal argument in this way, add `| G_SIGNAL_TYPE_STATIC_SCOPE` + * to the corresponding argument of g_signal_new(). + * |[ + * g_signal_new ("size_request", + * G_TYPE_FROM_CLASS (gobject_class), + * G_SIGNAL_RUN_FIRST, + * G_STRUCT_OFFSET (GtkWidgetClass, size_request), + * NULL, NULL, + * _gtk_marshal_VOID__BOXED, + * G_TYPE_NONE, 1, + * GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE); + * ]| + */ +#define G_SIGNAL_TYPE_STATIC_SCOPE (G_TYPE_FLAG_RESERVED_ID_BIT) + + +/* --- signal information --- */ +/** + * GSignalInvocationHint: + * @signal_id: The signal id of the signal invoking the callback + * @detail: The detail passed on for this emission + * @run_type: The stage the signal emission is currently in, this + * field will contain one of %G_SIGNAL_RUN_FIRST, + * %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP and %G_SIGNAL_ACCUMULATOR_FIRST_RUN. + * %G_SIGNAL_ACCUMULATOR_FIRST_RUN is only set for the first run of the accumulator + * function for a signal emission. + * + * The #GSignalInvocationHint structure is used to pass on additional information + * to callbacks during a signal emission. + */ +struct _GSignalInvocationHint +{ + guint signal_id; + GQuark detail; + GSignalFlags run_type; +}; +/** + * GSignalQuery: + * @signal_id: The signal id of the signal being queried, or 0 if the + * signal to be queried was unknown. + * @signal_name: The signal name. + * @itype: The interface/instance type that this signal can be emitted for. + * @signal_flags: The signal flags as passed in to g_signal_new(). + * @return_type: The return type for user callbacks. + * @n_params: The number of parameters that user callbacks take. + * @param_types: (array length=n_params): The individual parameter types for + * user callbacks, note that the effective callback signature is: + * |[ + * @return_type callback (#gpointer data1, + * [param_types param_names,] + * gpointer data2); + * ]| + * + * A structure holding in-depth information for a specific signal. + * + * See also: g_signal_query() + */ +struct _GSignalQuery +{ + guint signal_id; + const gchar *signal_name; + GType itype; + GSignalFlags signal_flags; + GType return_type; /* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag */ + guint n_params; + const GType *param_types; /* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag */ +}; + + +/* --- signals --- */ +GOBJECT_AVAILABLE_IN_ALL +guint g_signal_newv (const gchar *signal_name, + GType itype, + GSignalFlags signal_flags, + GClosure *class_closure, + GSignalAccumulator accumulator, + gpointer accu_data, + GSignalCMarshaller c_marshaller, + GType return_type, + guint n_params, + GType *param_types); +GOBJECT_AVAILABLE_IN_ALL +guint g_signal_new_valist (const gchar *signal_name, + GType itype, + GSignalFlags signal_flags, + GClosure *class_closure, + GSignalAccumulator accumulator, + gpointer accu_data, + GSignalCMarshaller c_marshaller, + GType return_type, + guint n_params, + va_list args); +GOBJECT_AVAILABLE_IN_ALL +guint g_signal_new (const gchar *signal_name, + GType itype, + GSignalFlags signal_flags, + guint class_offset, + GSignalAccumulator accumulator, + gpointer accu_data, + GSignalCMarshaller c_marshaller, + GType return_type, + guint n_params, + ...); +GOBJECT_AVAILABLE_IN_ALL +guint g_signal_new_class_handler (const gchar *signal_name, + GType itype, + GSignalFlags signal_flags, + GCallback class_handler, + GSignalAccumulator accumulator, + gpointer accu_data, + GSignalCMarshaller c_marshaller, + GType return_type, + guint n_params, + ...); +GOBJECT_AVAILABLE_IN_ALL +void g_signal_set_va_marshaller (guint signal_id, + GType instance_type, + GSignalCVaMarshaller va_marshaller); + +GOBJECT_AVAILABLE_IN_ALL +void g_signal_emitv (const GValue *instance_and_params, + guint signal_id, + GQuark detail, + GValue *return_value); +GOBJECT_AVAILABLE_IN_ALL +void g_signal_emit_valist (gpointer instance, + guint signal_id, + GQuark detail, + va_list var_args); +GOBJECT_AVAILABLE_IN_ALL +void g_signal_emit (gpointer instance, + guint signal_id, + GQuark detail, + ...); +GOBJECT_AVAILABLE_IN_ALL +void g_signal_emit_by_name (gpointer instance, + const gchar *detailed_signal, + ...); +GOBJECT_AVAILABLE_IN_ALL +guint g_signal_lookup (const gchar *name, + GType itype); +GOBJECT_AVAILABLE_IN_ALL +const gchar * g_signal_name (guint signal_id); +GOBJECT_AVAILABLE_IN_ALL +void g_signal_query (guint signal_id, + GSignalQuery *query); +GOBJECT_AVAILABLE_IN_ALL +guint* g_signal_list_ids (GType itype, + guint *n_ids); +GOBJECT_AVAILABLE_IN_2_66 +gboolean g_signal_is_valid_name (const gchar *name); +GOBJECT_AVAILABLE_IN_ALL +gboolean g_signal_parse_name (const gchar *detailed_signal, + GType itype, + guint *signal_id_p, + GQuark *detail_p, + gboolean force_detail_quark); +GOBJECT_AVAILABLE_IN_ALL +GSignalInvocationHint* g_signal_get_invocation_hint (gpointer instance); + + +/* --- signal emissions --- */ +GOBJECT_AVAILABLE_IN_ALL +void g_signal_stop_emission (gpointer instance, + guint signal_id, + GQuark detail); +GOBJECT_AVAILABLE_IN_ALL +void g_signal_stop_emission_by_name (gpointer instance, + const gchar *detailed_signal); +GOBJECT_AVAILABLE_IN_ALL +gulong g_signal_add_emission_hook (guint signal_id, + GQuark detail, + GSignalEmissionHook hook_func, + gpointer hook_data, + GDestroyNotify data_destroy); +GOBJECT_AVAILABLE_IN_ALL +void g_signal_remove_emission_hook (guint signal_id, + gulong hook_id); + + +/* --- signal handlers --- */ +GOBJECT_AVAILABLE_IN_ALL +gboolean g_signal_has_handler_pending (gpointer instance, + guint signal_id, + GQuark detail, + gboolean may_be_blocked); +GOBJECT_AVAILABLE_IN_ALL +gulong g_signal_connect_closure_by_id (gpointer instance, + guint signal_id, + GQuark detail, + GClosure *closure, + gboolean after); +GOBJECT_AVAILABLE_IN_ALL +gulong g_signal_connect_closure (gpointer instance, + const gchar *detailed_signal, + GClosure *closure, + gboolean after); +GOBJECT_AVAILABLE_IN_ALL +gulong g_signal_connect_data (gpointer instance, + const gchar *detailed_signal, + GCallback c_handler, + gpointer data, + GClosureNotify destroy_data, + GConnectFlags connect_flags); +GOBJECT_AVAILABLE_IN_ALL +void g_signal_handler_block (gpointer instance, + gulong handler_id); +GOBJECT_AVAILABLE_IN_ALL +void g_signal_handler_unblock (gpointer instance, + gulong handler_id); +GOBJECT_AVAILABLE_IN_ALL +void g_signal_handler_disconnect (gpointer instance, + gulong handler_id); +GOBJECT_AVAILABLE_IN_ALL +gboolean g_signal_handler_is_connected (gpointer instance, + gulong handler_id); +GOBJECT_AVAILABLE_IN_ALL +gulong g_signal_handler_find (gpointer instance, + GSignalMatchType mask, + guint signal_id, + GQuark detail, + GClosure *closure, + gpointer func, + gpointer data); +GOBJECT_AVAILABLE_IN_ALL +guint g_signal_handlers_block_matched (gpointer instance, + GSignalMatchType mask, + guint signal_id, + GQuark detail, + GClosure *closure, + gpointer func, + gpointer data); +GOBJECT_AVAILABLE_IN_ALL +guint g_signal_handlers_unblock_matched (gpointer instance, + GSignalMatchType mask, + guint signal_id, + GQuark detail, + GClosure *closure, + gpointer func, + gpointer data); +GOBJECT_AVAILABLE_IN_ALL +guint g_signal_handlers_disconnect_matched (gpointer instance, + GSignalMatchType mask, + guint signal_id, + GQuark detail, + GClosure *closure, + gpointer func, + gpointer data); + +GOBJECT_AVAILABLE_IN_2_62 +void g_clear_signal_handler (gulong *handler_id_ptr, + gpointer instance); + +#define g_clear_signal_handler(handler_id_ptr, instance) \ + G_STMT_START { \ + gpointer const _instance = (instance); \ + gulong *const _handler_id_ptr = (handler_id_ptr); \ + const gulong _handler_id = *_handler_id_ptr; \ + \ + if (_handler_id > 0) \ + { \ + *_handler_id_ptr = 0; \ + g_signal_handler_disconnect (_instance, _handler_id); \ + } \ + } G_STMT_END \ + GOBJECT_AVAILABLE_MACRO_IN_2_62 + +/* --- overriding and chaining --- */ +GOBJECT_AVAILABLE_IN_ALL +void g_signal_override_class_closure (guint signal_id, + GType instance_type, + GClosure *class_closure); +GOBJECT_AVAILABLE_IN_ALL +void g_signal_override_class_handler (const gchar *signal_name, + GType instance_type, + GCallback class_handler); +GOBJECT_AVAILABLE_IN_ALL +void g_signal_chain_from_overridden (const GValue *instance_and_params, + GValue *return_value); +GOBJECT_AVAILABLE_IN_ALL +void g_signal_chain_from_overridden_handler (gpointer instance, + ...); + + +/* --- convenience --- */ +/** + * g_signal_connect: + * @instance: the instance to connect to. + * @detailed_signal: a string of the form "signal-name::detail". + * @c_handler: the #GCallback to connect. + * @data: data to pass to @c_handler calls. + * + * Connects a #GCallback function to a signal for a particular object. + * + * The handler will be called synchronously, before the default handler of the signal. g_signal_emit() will not return control until all handlers are called. + * + * See [memory management of signal handlers][signal-memory-management] for + * details on how to handle the return value and memory management of @data. + * + * Returns: the handler ID, of type #gulong (always greater than 0 for successful connections) + */ +/* Intentionally not using G_CONNECT_DEFAULT here to avoid deprecation + * warnings with older GLIB_VERSION_MAX_ALLOWED */ +#define g_signal_connect(instance, detailed_signal, c_handler, data) \ + g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, (GConnectFlags) 0) +/** + * g_signal_connect_after: + * @instance: the instance to connect to. + * @detailed_signal: a string of the form "signal-name::detail". + * @c_handler: the #GCallback to connect. + * @data: data to pass to @c_handler calls. + * + * Connects a #GCallback function to a signal for a particular object. + * + * The handler will be called synchronously, after the default handler of the signal. + * + * Returns: the handler ID, of type #gulong (always greater than 0 for successful connections) + */ +#define g_signal_connect_after(instance, detailed_signal, c_handler, data) \ + g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, G_CONNECT_AFTER) +/** + * g_signal_connect_swapped: + * @instance: the instance to connect to. + * @detailed_signal: a string of the form "signal-name::detail". + * @c_handler: the #GCallback to connect. + * @data: data to pass to @c_handler calls. + * + * Connects a #GCallback function to a signal for a particular object. + * + * The instance on which the signal is emitted and @data will be swapped when + * calling the handler. This is useful when calling pre-existing functions to + * operate purely on the @data, rather than the @instance: swapping the + * parameters avoids the need to write a wrapper function. + * + * For example, this allows the shorter code: + * |[ + * g_signal_connect_swapped (button, "clicked", + * (GCallback) gtk_widget_hide, other_widget); + * ]| + * + * Rather than the cumbersome: + * |[ + * static void + * button_clicked_cb (GtkButton *button, GtkWidget *other_widget) + * { + * gtk_widget_hide (other_widget); + * } + * + * ... + * + * g_signal_connect (button, "clicked", + * (GCallback) button_clicked_cb, other_widget); + * ]| + * + * Returns: the handler ID, of type #gulong (always greater than 0 for successful connections) + */ +#define g_signal_connect_swapped(instance, detailed_signal, c_handler, data) \ + g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, G_CONNECT_SWAPPED) +/** + * g_signal_handlers_disconnect_by_func: + * @instance: The instance to remove handlers from. + * @func: The C closure callback of the handlers (useless for non-C closures). + * @data: The closure data of the handlers' closures. + * + * Disconnects all handlers on an instance that match @func and @data. + * + * Returns: The number of handlers that matched. + */ +#define g_signal_handlers_disconnect_by_func(instance, func, data) \ + g_signal_handlers_disconnect_matched ((instance), \ + (GSignalMatchType) (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), \ + 0, 0, NULL, (func), (data)) + +/** + * g_signal_handlers_disconnect_by_data: + * @instance: The instance to remove handlers from + * @data: the closure data of the handlers' closures + * + * Disconnects all handlers on an instance that match @data. + * + * Returns: The number of handlers that matched. + * + * Since: 2.32 + */ +#define g_signal_handlers_disconnect_by_data(instance, data) \ + g_signal_handlers_disconnect_matched ((instance), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, (data)) + +/** + * g_signal_handlers_block_by_func: + * @instance: The instance to block handlers from. + * @func: The C closure callback of the handlers (useless for non-C closures). + * @data: The closure data of the handlers' closures. + * + * Blocks all handlers on an instance that match @func and @data. + * + * Returns: The number of handlers that matched. + */ +#define g_signal_handlers_block_by_func(instance, func, data) \ + g_signal_handlers_block_matched ((instance), \ + (GSignalMatchType) (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), \ + 0, 0, NULL, (func), (data)) +/** + * g_signal_handlers_unblock_by_func: + * @instance: The instance to unblock handlers from. + * @func: The C closure callback of the handlers (useless for non-C closures). + * @data: The closure data of the handlers' closures. + * + * Unblocks all handlers on an instance that match @func and @data. + * + * Returns: The number of handlers that matched. + */ +#define g_signal_handlers_unblock_by_func(instance, func, data) \ + g_signal_handlers_unblock_matched ((instance), \ + (GSignalMatchType) (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), \ + 0, 0, NULL, (func), (data)) + + +GOBJECT_AVAILABLE_IN_ALL +gboolean g_signal_accumulator_true_handled (GSignalInvocationHint *ihint, + GValue *return_accu, + const GValue *handler_return, + gpointer dummy); + +GOBJECT_AVAILABLE_IN_ALL +gboolean g_signal_accumulator_first_wins (GSignalInvocationHint *ihint, + GValue *return_accu, + const GValue *handler_return, + gpointer dummy); + +/*< private >*/ +GOBJECT_AVAILABLE_IN_ALL +void g_signal_handlers_destroy (gpointer instance); +void _g_signals_destroy (GType itype); + +G_END_DECLS + +#endif /* __G_SIGNAL_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gsignalgroup.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gsignalgroup.h new file mode 100644 index 0000000..6aa151c --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gsignalgroup.h @@ -0,0 +1,98 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * + * Copyright (C) 2015-2022 Christian Hergert + * Copyright (C) 2015 Garrett Regier + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef __G_SIGNAL_GROUP_H__ +#define __G_SIGNAL_GROUP_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include +#include + +G_BEGIN_DECLS + +#define G_SIGNAL_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_SIGNAL_GROUP, GSignalGroup)) +#define G_IS_SIGNAL_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_SIGNAL_GROUP)) +#define G_TYPE_SIGNAL_GROUP (g_signal_group_get_type()) + +/** + * GSignalGroup: + * + * #GSignalGroup is an opaque structure whose members + * cannot be accessed directly. + * + * Since: 2.72 + */ +typedef struct _GSignalGroup GSignalGroup; + +GOBJECT_AVAILABLE_IN_2_72 +GType g_signal_group_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_72 +GSignalGroup *g_signal_group_new (GType target_type); +GOBJECT_AVAILABLE_IN_2_72 +void g_signal_group_set_target (GSignalGroup *self, + gpointer target); +GOBJECT_AVAILABLE_IN_2_72 +gpointer g_signal_group_dup_target (GSignalGroup *self); +GOBJECT_AVAILABLE_IN_2_72 +void g_signal_group_block (GSignalGroup *self); +GOBJECT_AVAILABLE_IN_2_72 +void g_signal_group_unblock (GSignalGroup *self); +GOBJECT_AVAILABLE_IN_2_74 +void g_signal_group_connect_closure (GSignalGroup *self, + const gchar *detailed_signal, + GClosure *closure, + gboolean after); +GOBJECT_AVAILABLE_IN_2_72 +void g_signal_group_connect_object (GSignalGroup *self, + const gchar *detailed_signal, + GCallback c_handler, + gpointer object, + GConnectFlags flags); +GOBJECT_AVAILABLE_IN_2_72 +void g_signal_group_connect_data (GSignalGroup *self, + const gchar *detailed_signal, + GCallback c_handler, + gpointer data, + GClosureNotify notify, + GConnectFlags flags); +GOBJECT_AVAILABLE_IN_2_72 +void g_signal_group_connect (GSignalGroup *self, + const gchar *detailed_signal, + GCallback c_handler, + gpointer data); +GOBJECT_AVAILABLE_IN_2_72 +void g_signal_group_connect_after (GSignalGroup *self, + const gchar *detailed_signal, + GCallback c_handler, + gpointer data); +GOBJECT_AVAILABLE_IN_2_72 +void g_signal_group_connect_swapped (GSignalGroup *self, + const gchar *detailed_signal, + GCallback c_handler, + gpointer data); + +G_END_DECLS + +#endif /* __G_SIGNAL_GROUP_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gsourceclosure.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gsourceclosure.h new file mode 100644 index 0000000..d609165 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gsourceclosure.h @@ -0,0 +1,40 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 2001 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ +#ifndef __G_SOURCECLOSURE_H__ +#define __G_SOURCECLOSURE_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +GOBJECT_AVAILABLE_IN_ALL +void g_source_set_closure (GSource *source, + GClosure *closure); + +GOBJECT_AVAILABLE_IN_ALL +void g_source_set_dummy_callback (GSource *source); + +G_END_DECLS + +#endif /* __G_SOURCECLOSURE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gtype.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gtype.h new file mode 100644 index 0000000..b02121a --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gtype.h @@ -0,0 +1,2703 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ +#ifndef __G_TYPE_H__ +#define __G_TYPE_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +/* Basic Type Macros + */ +/** + * G_TYPE_FUNDAMENTAL: + * @type: A #GType value. + * + * The fundamental type which is the ancestor of @type. + * + * Fundamental types are types that serve as ultimate bases for the derived types, + * thus they are the roots of distinct inheritance hierarchies. + */ +#define G_TYPE_FUNDAMENTAL(type) (g_type_fundamental (type)) +/** + * G_TYPE_FUNDAMENTAL_SHIFT: + * + * Shift value used in converting numbers to type IDs. + */ +#define G_TYPE_FUNDAMENTAL_SHIFT (2) +/** + * G_TYPE_FUNDAMENTAL_MAX: (value 1020) + * + * An integer constant that represents the number of identifiers reserved + * for types that are assigned at compile-time. + */ +#define G_TYPE_FUNDAMENTAL_MAX (255 << G_TYPE_FUNDAMENTAL_SHIFT) + +/* Constant fundamental types, + */ +/** + * G_TYPE_INVALID: + * + * An invalid #GType used as error return value in some functions which return + * a #GType. + */ +#define G_TYPE_INVALID G_TYPE_MAKE_FUNDAMENTAL (0) +/** + * G_TYPE_NONE: + * + * A fundamental type which is used as a replacement for the C + * void return type. + */ +#define G_TYPE_NONE G_TYPE_MAKE_FUNDAMENTAL (1) +/** + * G_TYPE_INTERFACE: + * + * The fundamental type from which all interfaces are derived. + */ +#define G_TYPE_INTERFACE G_TYPE_MAKE_FUNDAMENTAL (2) +/** + * G_TYPE_CHAR: + * + * The fundamental type corresponding to #gchar. + * + * The type designated by %G_TYPE_CHAR is unconditionally an 8-bit signed integer. + * This may or may not be the same type a the C type "gchar". + */ +#define G_TYPE_CHAR G_TYPE_MAKE_FUNDAMENTAL (3) +/** + * G_TYPE_UCHAR: + * + * The fundamental type corresponding to #guchar. + */ +#define G_TYPE_UCHAR G_TYPE_MAKE_FUNDAMENTAL (4) +/** + * G_TYPE_BOOLEAN: + * + * The fundamental type corresponding to #gboolean. + */ +#define G_TYPE_BOOLEAN G_TYPE_MAKE_FUNDAMENTAL (5) +/** + * G_TYPE_INT: + * + * The fundamental type corresponding to #gint. + */ +#define G_TYPE_INT G_TYPE_MAKE_FUNDAMENTAL (6) +/** + * G_TYPE_UINT: + * + * The fundamental type corresponding to #guint. + */ +#define G_TYPE_UINT G_TYPE_MAKE_FUNDAMENTAL (7) +/** + * G_TYPE_LONG: + * + * The fundamental type corresponding to #glong. + */ +#define G_TYPE_LONG G_TYPE_MAKE_FUNDAMENTAL (8) +/** + * G_TYPE_ULONG: + * + * The fundamental type corresponding to #gulong. + */ +#define G_TYPE_ULONG G_TYPE_MAKE_FUNDAMENTAL (9) +/** + * G_TYPE_INT64: + * + * The fundamental type corresponding to #gint64. + */ +#define G_TYPE_INT64 G_TYPE_MAKE_FUNDAMENTAL (10) +/** + * G_TYPE_UINT64: + * + * The fundamental type corresponding to #guint64. + */ +#define G_TYPE_UINT64 G_TYPE_MAKE_FUNDAMENTAL (11) +/** + * G_TYPE_ENUM: + * + * The fundamental type from which all enumeration types are derived. + */ +#define G_TYPE_ENUM G_TYPE_MAKE_FUNDAMENTAL (12) +/** + * G_TYPE_FLAGS: + * + * The fundamental type from which all flags types are derived. + */ +#define G_TYPE_FLAGS G_TYPE_MAKE_FUNDAMENTAL (13) +/** + * G_TYPE_FLOAT: + * + * The fundamental type corresponding to #gfloat. + */ +#define G_TYPE_FLOAT G_TYPE_MAKE_FUNDAMENTAL (14) +/** + * G_TYPE_DOUBLE: + * + * The fundamental type corresponding to #gdouble. + */ +#define G_TYPE_DOUBLE G_TYPE_MAKE_FUNDAMENTAL (15) +/** + * G_TYPE_STRING: + * + * The fundamental type corresponding to nul-terminated C strings. + */ +#define G_TYPE_STRING G_TYPE_MAKE_FUNDAMENTAL (16) +/** + * G_TYPE_POINTER: + * + * The fundamental type corresponding to #gpointer. + */ +#define G_TYPE_POINTER G_TYPE_MAKE_FUNDAMENTAL (17) +/** + * G_TYPE_BOXED: + * + * The fundamental type from which all boxed types are derived. + */ +#define G_TYPE_BOXED G_TYPE_MAKE_FUNDAMENTAL (18) +/** + * G_TYPE_PARAM: + * + * The fundamental type from which all #GParamSpec types are derived. + */ +#define G_TYPE_PARAM G_TYPE_MAKE_FUNDAMENTAL (19) +/** + * G_TYPE_OBJECT: + * + * The fundamental type for #GObject. + */ +#define G_TYPE_OBJECT G_TYPE_MAKE_FUNDAMENTAL (20) +/** + * G_TYPE_VARIANT: + * + * The fundamental type corresponding to #GVariant. + * + * All floating #GVariant instances passed through the #GType system are + * consumed. + * + * Note that callbacks in closures, and signal handlers + * for signals of return type %G_TYPE_VARIANT, must never return floating + * variants. + * + * Note: GLib 2.24 did include a boxed type with this name. It was replaced + * with this fundamental type in 2.26. + * + * Since: 2.26 + */ +#define G_TYPE_VARIANT G_TYPE_MAKE_FUNDAMENTAL (21) + + +/* Reserved fundamental type numbers to create new fundamental + * type IDs with G_TYPE_MAKE_FUNDAMENTAL(). + * + * Open an issue on https://gitlab.gnome.org/GNOME/glib/issues/new for + * reservations. + */ +/** + * G_TYPE_MAKE_FUNDAMENTAL: + * @x: the fundamental type number. + * + * Get the type ID for the fundamental type number @x. + * + * Use g_type_fundamental_next() instead of this macro to create new fundamental + * types. + * + * Returns: the GType + */ +#define G_TYPE_MAKE_FUNDAMENTAL(x) ((GType) ((x) << G_TYPE_FUNDAMENTAL_SHIFT)) +/** + * G_TYPE_RESERVED_GLIB_FIRST: + * + * First fundamental type number to create a new fundamental type id with + * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib. + */ +#define G_TYPE_RESERVED_GLIB_FIRST (22) +/** + * G_TYPE_RESERVED_GLIB_LAST: + * + * Last fundamental type number reserved for GLib. + */ +#define G_TYPE_RESERVED_GLIB_LAST (31) +/** + * G_TYPE_RESERVED_BSE_FIRST: + * + * First fundamental type number to create a new fundamental type id with + * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE. + */ +#define G_TYPE_RESERVED_BSE_FIRST (32) +/** + * G_TYPE_RESERVED_BSE_LAST: + * + * Last fundamental type number reserved for BSE. + */ +#define G_TYPE_RESERVED_BSE_LAST (48) +/** + * G_TYPE_RESERVED_USER_FIRST: + * + * First available fundamental type number to create new fundamental + * type id with G_TYPE_MAKE_FUNDAMENTAL(). + */ +#define G_TYPE_RESERVED_USER_FIRST (49) + + +/* Type Checking Macros + */ +/** + * G_TYPE_IS_FUNDAMENTAL: + * @type: A #GType value + * + * Checks if @type is a fundamental type. + * + * Returns: %TRUE is @type is fundamental + */ +#define G_TYPE_IS_FUNDAMENTAL(type) ((type) <= G_TYPE_FUNDAMENTAL_MAX) +/** + * G_TYPE_IS_DERIVED: + * @type: A #GType value + * + * Checks if @type is derived (or in object-oriented terminology: + * inherited) from another type (this holds true for all non-fundamental + * types). + * + * Returns: %TRUE if @type is derived + */ +#define G_TYPE_IS_DERIVED(type) ((type) > G_TYPE_FUNDAMENTAL_MAX) +/** + * G_TYPE_IS_INTERFACE: + * @type: A #GType value + * + * Checks if @type is an interface type. + * + * An interface type provides a pure API, the implementation + * of which is provided by another type (which is then said to conform + * to the interface). GLib interfaces are somewhat analogous to Java + * interfaces and C++ classes containing only pure virtual functions, + * with the difference that GType interfaces are not derivable (but see + * g_type_interface_add_prerequisite() for an alternative). + * + * Returns: %TRUE if @type is an interface + */ +#define G_TYPE_IS_INTERFACE(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_INTERFACE) +/** + * G_TYPE_IS_CLASSED: + * @type: A #GType value + * + * Checks if @type is a classed type. + * + * A classed type has an associated #GTypeClass which can be derived to store + * class-wide virtual function pointers and data for all instances of the type. + * This allows for subclassing. All #GObjects are classed; none of the scalar + * fundamental types built into GLib are classed. + * + * Interfaces are not classed: while their #GTypeInterface struct could be + * considered similar to #GTypeClass, and classes can derive interfaces, + * #GTypeInterface doesn’t allow for subclassing. + * + * Returns: %TRUE if @type is classed + */ +#define G_TYPE_IS_CLASSED(type) (g_type_test_flags ((type), G_TYPE_FLAG_CLASSED)) +/** + * G_TYPE_IS_INSTANTIATABLE: + * @type: A #GType value + * + * Checks if @type can be instantiated. Instantiation is the + * process of creating an instance (object) of this type. + * + * Returns: %TRUE if @type is instantiatable + */ +#define G_TYPE_IS_INSTANTIATABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)) +/** + * G_TYPE_IS_DERIVABLE: + * @type: A #GType value + * + * Checks if @type is a derivable type. A derivable type can + * be used as the base class of a flat (single-level) class hierarchy. + * + * Returns: %TRUE if @type is derivable + */ +#define G_TYPE_IS_DERIVABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_DERIVABLE)) +/** + * G_TYPE_IS_DEEP_DERIVABLE: + * @type: A #GType value + * + * Checks if @type is a deep derivable type. A deep derivable type + * can be used as the base class of a deep (multi-level) class hierarchy. + * + * Returns: %TRUE if @type is deep derivable + */ +#define G_TYPE_IS_DEEP_DERIVABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_DEEP_DERIVABLE)) +/** + * G_TYPE_IS_ABSTRACT: + * @type: A #GType value + * + * Checks if @type is an abstract type. An abstract type cannot be + * instantiated and is normally used as an abstract base class for + * derived classes. + * + * Returns: %TRUE if @type is abstract + */ +#define G_TYPE_IS_ABSTRACT(type) (g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT)) +/** + * G_TYPE_IS_VALUE_ABSTRACT: + * @type: A #GType value + * + * Checks if @type is an abstract value type. An abstract value type introduces + * a value table, but can't be used for g_value_init() and is normally used as + * an abstract base type for derived value types. + * + * Returns: %TRUE if @type is an abstract value type + */ +#define G_TYPE_IS_VALUE_ABSTRACT(type) (g_type_test_flags ((type), G_TYPE_FLAG_VALUE_ABSTRACT)) +/** + * G_TYPE_IS_VALUE_TYPE: + * @type: A #GType value + * + * Checks if @type is a value type and can be used with g_value_init(). + * + * Returns: %TRUE if @type is a value type + */ +#define G_TYPE_IS_VALUE_TYPE(type) (g_type_check_is_value_type (type)) +/** + * G_TYPE_HAS_VALUE_TABLE: + * @type: A #GType value + * + * Checks if @type has a #GTypeValueTable. + * + * Returns: %TRUE if @type has a value table + */ +#define G_TYPE_HAS_VALUE_TABLE(type) (g_type_value_table_peek (type) != NULL) +/** + * G_TYPE_IS_FINAL: + * @type: a #GType value + * + * Checks if @type is a final type. A final type cannot be derived any + * further. + * + * Returns: %TRUE if @type is final + * + * Since: 2.70 + */ +#define G_TYPE_IS_FINAL(type) (g_type_test_flags ((type), G_TYPE_FLAG_FINAL)) GOBJECT_AVAILABLE_MACRO_IN_2_70 + +/** + * G_TYPE_IS_DEPRECATED: + * @type: a #GType value + * + * Checks if @type is deprecated. Instantiating a deprecated type will + * trigger a warning if running with `G_ENABLE_DIAGNOSTIC=1`. + * + * Returns: %TRUE if the type is deprecated + * + * Since: 2.76 + */ +#define G_TYPE_IS_DEPRECATED(type) (g_type_test_flags ((type), G_TYPE_FLAG_DEPRECATED)) GOBJECT_AVAILABLE_MACRO_IN_2_76 + + +/* Typedefs + */ +/** + * GType: + * + * A numerical value which represents the unique identifier of a registered + * type. + */ +#if GLIB_SIZEOF_SIZE_T != GLIB_SIZEOF_LONG || !defined (G_CXX_STD_VERSION) +typedef gsize GType; +#else /* for historic reasons, C++ links against gulong GTypes */ +typedef gulong GType; +#endif +typedef struct _GValue GValue; +typedef union _GTypeCValue GTypeCValue; +typedef struct _GTypePlugin GTypePlugin; +typedef struct _GTypeClass GTypeClass; +typedef struct _GTypeInterface GTypeInterface; +typedef struct _GTypeInstance GTypeInstance; +typedef struct _GTypeInfo GTypeInfo; +typedef struct _GTypeFundamentalInfo GTypeFundamentalInfo; +typedef struct _GInterfaceInfo GInterfaceInfo; +typedef struct _GTypeValueTable GTypeValueTable; +typedef struct _GTypeQuery GTypeQuery; + + +/* Basic Type Structures + */ +/** + * GTypeClass: + * + * An opaque structure used as the base of all classes. + */ +struct _GTypeClass +{ + /*< private >*/ + GType g_type; +}; +/** + * GTypeInstance: + * + * An opaque structure used as the base of all type instances. + */ +struct _GTypeInstance +{ + /*< private >*/ + GTypeClass *g_class; +}; +/** + * GTypeInterface: + * + * An opaque structure used as the base of all interface types. + */ +struct _GTypeInterface +{ + /*< private >*/ + GType g_type; /* iface type */ + GType g_instance_type; +}; +/** + * GTypeQuery: + * @type: the #GType value of the type + * @type_name: the name of the type + * @class_size: the size of the class structure + * @instance_size: the size of the instance structure + * + * A structure holding information for a specific type. + * + * See also: g_type_query() + */ +struct _GTypeQuery +{ + GType type; + const gchar *type_name; + guint class_size; + guint instance_size; +}; + + +/* Casts, checks and accessors for structured types + * usage of these macros is reserved to type implementations only + */ +/*< protected >*/ +/** + * G_TYPE_CHECK_INSTANCE: + * @instance: Location of a #GTypeInstance structure + * + * Checks if @instance is a valid #GTypeInstance structure, + * otherwise issues a warning and returns %FALSE. %NULL is not a valid + * #GTypeInstance. + * + * This macro should only be used in type implementations. + * + * Returns: %TRUE if @instance is valid + */ +#define G_TYPE_CHECK_INSTANCE(instance) (_G_TYPE_CHI ((GTypeInstance*) (instance))) +/** + * G_TYPE_CHECK_INSTANCE_CAST: + * @instance: (nullable): Location of a #GTypeInstance structure + * @g_type: The type to be returned + * @c_type: The corresponding C type of @g_type + * + * Checks that @instance is an instance of the type identified by @g_type + * and issues a warning if this is not the case. Returns @instance casted + * to a pointer to @c_type. + * + * No warning will be issued if @instance is %NULL, and %NULL will be returned. + * + * This macro should only be used in type implementations. + */ +#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type)) +/** + * G_TYPE_CHECK_INSTANCE_TYPE: + * @instance: (nullable): Location of a #GTypeInstance structure. + * @g_type: The type to be checked + * + * Checks if @instance is an instance of the type identified by @g_type. If + * @instance is %NULL, %FALSE will be returned. + * + * This macro should only be used in type implementations. + * + * Returns: %TRUE if @instance is an instance of @g_type + */ +#define G_TYPE_CHECK_INSTANCE_TYPE(instance, g_type) (_G_TYPE_CIT ((instance), (g_type))) +/** + * G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE: + * @instance: (nullable): Location of a #GTypeInstance structure. + * @g_type: The fundamental type to be checked + * + * Checks if @instance is an instance of the fundamental type identified by @g_type. + * If @instance is %NULL, %FALSE will be returned. + * + * This macro should only be used in type implementations. + * + * Returns: %TRUE if @instance is an instance of @g_type + */ +#define G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE(instance, g_type) (_G_TYPE_CIFT ((instance), (g_type))) +/** + * G_TYPE_INSTANCE_GET_CLASS: + * @instance: Location of the #GTypeInstance structure + * @g_type: The #GType of the class to be returned + * @c_type: The C type of the class structure + * + * Get the class structure of a given @instance, casted + * to a specified ancestor type @g_type of the instance. + * + * Note that while calling a GInstanceInitFunc(), the class pointer + * gets modified, so it might not always return the expected pointer. + * + * This macro should only be used in type implementations. + * + * Returns: a pointer to the class structure + */ +#define G_TYPE_INSTANCE_GET_CLASS(instance, g_type, c_type) (_G_TYPE_IGC ((instance), (g_type), c_type)) +/** + * G_TYPE_INSTANCE_GET_INTERFACE: + * @instance: Location of the #GTypeInstance structure + * @g_type: The #GType of the interface to be returned + * @c_type: The C type of the interface structure + * + * Get the interface structure for interface @g_type of a given @instance. + * + * This macro should only be used in type implementations. + * + * Returns: a pointer to the interface structure + */ +#define G_TYPE_INSTANCE_GET_INTERFACE(instance, g_type, c_type) (_G_TYPE_IGI ((instance), (g_type), c_type)) +/** + * G_TYPE_CHECK_CLASS_CAST: + * @g_class: Location of a #GTypeClass structure + * @g_type: The type to be returned + * @c_type: The corresponding C type of class structure of @g_type + * + * Checks that @g_class is a class structure of the type identified by @g_type + * and issues a warning if this is not the case. Returns @g_class casted + * to a pointer to @c_type. %NULL is not a valid class structure. + * + * This macro should only be used in type implementations. + */ +#define G_TYPE_CHECK_CLASS_CAST(g_class, g_type, c_type) (_G_TYPE_CCC ((g_class), (g_type), c_type)) +/** + * G_TYPE_CHECK_CLASS_TYPE: + * @g_class: (nullable): Location of a #GTypeClass structure + * @g_type: The type to be checked + * + * Checks if @g_class is a class structure of the type identified by + * @g_type. If @g_class is %NULL, %FALSE will be returned. + * + * This macro should only be used in type implementations. + * + * Returns: %TRUE if @g_class is a class structure of @g_type + */ +#define G_TYPE_CHECK_CLASS_TYPE(g_class, g_type) (_G_TYPE_CCT ((g_class), (g_type))) +/** + * G_TYPE_CHECK_VALUE: + * @value: a #GValue + * + * Checks if @value has been initialized to hold values + * of a value type. + * + * This macro should only be used in type implementations. + * + * Returns: %TRUE if @value is initialized + */ +#define G_TYPE_CHECK_VALUE(value) (_G_TYPE_CHV ((value))) +/** + * G_TYPE_CHECK_VALUE_TYPE: + * @value: a #GValue + * @g_type: The type to be checked + * + * Checks if @value has been initialized to hold values + * of type @g_type. + * + * This macro should only be used in type implementations. + * + * Returns: %TRUE if @value has been initialized to hold values of type @g_type + */ +#define G_TYPE_CHECK_VALUE_TYPE(value, g_type) (_G_TYPE_CVH ((value), (g_type))) +/** + * G_TYPE_FROM_INSTANCE: + * @instance: Location of a valid #GTypeInstance structure + * + * Get the type identifier from a given @instance structure. + * + * This macro should only be used in type implementations. + * + * Returns: the #GType + */ +#define G_TYPE_FROM_INSTANCE(instance) (G_TYPE_FROM_CLASS (((GTypeInstance*) (instance))->g_class)) +/** + * G_TYPE_FROM_CLASS: + * @g_class: Location of a valid #GTypeClass structure + * + * Get the type identifier from a given @class structure. + * + * This macro should only be used in type implementations. + * + * Returns: the #GType + */ +#define G_TYPE_FROM_CLASS(g_class) (((GTypeClass*) (g_class))->g_type) +/** + * G_TYPE_FROM_INTERFACE: + * @g_iface: Location of a valid #GTypeInterface structure + * + * Get the type identifier from a given @interface structure. + * + * This macro should only be used in type implementations. + * + * Returns: the #GType + */ +#define G_TYPE_FROM_INTERFACE(g_iface) (((GTypeInterface*) (g_iface))->g_type) + +/** + * G_TYPE_INSTANCE_GET_PRIVATE: + * @instance: the instance of a type deriving from @private_type + * @g_type: the type identifying which private data to retrieve + * @c_type: The C type for the private structure + * + * Gets the private structure for a particular type. + * + * The private structure must have been registered in the + * class_init function with g_type_class_add_private(). + * + * This macro should only be used in type implementations. + * + * Since: 2.4 + * Deprecated: 2.58: Use G_ADD_PRIVATE() and the generated + * `your_type_get_instance_private()` function instead + * Returns: (not nullable): a pointer to the private data structure + */ +#define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type) ((c_type*) g_type_instance_get_private ((GTypeInstance*) (instance), (g_type))) GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR(G_ADD_PRIVATE) + +/** + * G_TYPE_CLASS_GET_PRIVATE: + * @klass: the class of a type deriving from @private_type + * @g_type: the type identifying which private data to retrieve + * @c_type: The C type for the private structure + * + * Gets the private class structure for a particular type. + * + * The private structure must have been registered in the + * get_type() function with g_type_add_class_private(). + * + * This macro should only be used in type implementations. + * + * Since: 2.24 + * Returns: (not nullable): a pointer to the private data structure + */ +#define G_TYPE_CLASS_GET_PRIVATE(klass, g_type, c_type) ((c_type*) g_type_class_get_private ((GTypeClass*) (klass), (g_type))) + +/** + * GTypeDebugFlags: + * @G_TYPE_DEBUG_NONE: Print no messages + * @G_TYPE_DEBUG_OBJECTS: Print messages about object bookkeeping + * @G_TYPE_DEBUG_SIGNALS: Print messages about signal emissions + * @G_TYPE_DEBUG_MASK: Mask covering all debug flags + * @G_TYPE_DEBUG_INSTANCE_COUNT: Keep a count of instances of each type + * + * These flags used to be passed to g_type_init_with_debug_flags() which + * is now deprecated. + * + * If you need to enable debugging features, use the `GOBJECT_DEBUG` + * environment variable. + * + * Deprecated: 2.36: g_type_init() is now done automatically + */ +typedef enum /*< skip >*/ +{ + G_TYPE_DEBUG_NONE = 0, + G_TYPE_DEBUG_OBJECTS = 1 << 0, + G_TYPE_DEBUG_SIGNALS = 1 << 1, + G_TYPE_DEBUG_INSTANCE_COUNT = 1 << 2, + G_TYPE_DEBUG_MASK = 0x07 +} GTypeDebugFlags GOBJECT_DEPRECATED_TYPE_IN_2_36; + + +/* --- prototypes --- */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GOBJECT_DEPRECATED_IN_2_36 +void g_type_init (void); +GOBJECT_DEPRECATED_IN_2_36 +void g_type_init_with_debug_flags (GTypeDebugFlags debug_flags); +G_GNUC_END_IGNORE_DEPRECATIONS + +GOBJECT_AVAILABLE_IN_ALL +const gchar * g_type_name (GType type); +GOBJECT_AVAILABLE_IN_ALL +GQuark g_type_qname (GType type); +GOBJECT_AVAILABLE_IN_ALL +GType g_type_from_name (const gchar *name); +GOBJECT_AVAILABLE_IN_ALL +GType g_type_parent (GType type); +GOBJECT_AVAILABLE_IN_ALL +guint g_type_depth (GType type); +GOBJECT_AVAILABLE_IN_ALL +GType g_type_next_base (GType leaf_type, + GType root_type); +GOBJECT_AVAILABLE_IN_ALL +gboolean g_type_is_a (GType type, + GType is_a_type); + +/* Hoist exact GType comparisons into the caller */ +#define g_type_is_a(a,b) ((a) == (b) || (g_type_is_a) ((a), (b))) + +GOBJECT_AVAILABLE_IN_ALL +gpointer g_type_class_ref (GType type); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_type_class_peek (GType type); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_type_class_peek_static (GType type); +GOBJECT_AVAILABLE_IN_ALL +void g_type_class_unref (gpointer g_class); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_type_class_peek_parent (gpointer g_class); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_type_interface_peek (gpointer instance_class, + GType iface_type); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_type_interface_peek_parent (gpointer g_iface); + +GOBJECT_AVAILABLE_IN_ALL +gpointer g_type_default_interface_ref (GType g_type); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_type_default_interface_peek (GType g_type); +GOBJECT_AVAILABLE_IN_ALL +void g_type_default_interface_unref (gpointer g_iface); + +/* g_free() the returned arrays */ +GOBJECT_AVAILABLE_IN_ALL +GType* g_type_children (GType type, + guint *n_children); +GOBJECT_AVAILABLE_IN_ALL +GType* g_type_interfaces (GType type, + guint *n_interfaces); + +/* per-type _static_ data */ +GOBJECT_AVAILABLE_IN_ALL +void g_type_set_qdata (GType type, + GQuark quark, + gpointer data); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_type_get_qdata (GType type, + GQuark quark); +GOBJECT_AVAILABLE_IN_ALL +void g_type_query (GType type, + GTypeQuery *query); + +GOBJECT_AVAILABLE_IN_2_44 +int g_type_get_instance_count (GType type); + +/* --- type registration --- */ +/** + * GBaseInitFunc: + * @g_class: (type GObject.TypeClass): The #GTypeClass structure to initialize + * + * A callback function used by the type system to do base initialization + * of the class structures of derived types. + * + * This function is called as part of the initialization process of all derived + * classes and should reallocate or reset all dynamic class members copied over + * from the parent class. + * + * For example, class members (such as strings) that are not sufficiently + * handled by a plain memory copy of the parent class into the derived class + * have to be altered. See GClassInitFunc() for a discussion of the class + * initialization process. + */ +typedef void (*GBaseInitFunc) (gpointer g_class); +/** + * GBaseFinalizeFunc: + * @g_class: (type GObject.TypeClass): The #GTypeClass structure to finalize + * + * A callback function used by the type system to finalize those portions + * of a derived types class structure that were setup from the corresponding + * GBaseInitFunc() function. + * + * Class finalization basically works the inverse way in which class + * initialization is performed. + * + * See GClassInitFunc() for a discussion of the class initialization process. + */ +typedef void (*GBaseFinalizeFunc) (gpointer g_class); +/** + * GClassInitFunc: + * @g_class: (type GObject.TypeClass): The #GTypeClass structure to initialize. + * @class_data: The @class_data member supplied via the #GTypeInfo structure. + * + * A callback function used by the type system to initialize the class + * of a specific type. + * + * This function should initialize all static class members. + * + * The initialization process of a class involves: + * + * - Copying common members from the parent class over to the + * derived class structure. + * - Zero initialization of the remaining members not copied + * over from the parent class. + * - Invocation of the GBaseInitFunc() initializers of all parent + * types and the class' type. + * - Invocation of the class' GClassInitFunc() initializer. + * + * Since derived classes are partially initialized through a memory copy + * of the parent class, the general rule is that GBaseInitFunc() and + * GBaseFinalizeFunc() should take care of necessary reinitialization + * and release of those class members that were introduced by the type + * that specified these GBaseInitFunc()/GBaseFinalizeFunc(). + * GClassInitFunc() should only care about initializing static + * class members, while dynamic class members (such as allocated strings + * or reference counted resources) are better handled by a GBaseInitFunc() + * for this type, so proper initialization of the dynamic class members + * is performed for class initialization of derived types as well. + * + * An example may help to correspond the intend of the different class + * initializers: + * + * |[ + * typedef struct { + * GObjectClass parent_class; + * gint static_integer; + * gchar *dynamic_string; + * } TypeAClass; + * static void + * type_a_base_class_init (TypeAClass *class) + * { + * class->dynamic_string = g_strdup ("some string"); + * } + * static void + * type_a_base_class_finalize (TypeAClass *class) + * { + * g_free (class->dynamic_string); + * } + * static void + * type_a_class_init (TypeAClass *class) + * { + * class->static_integer = 42; + * } + * + * typedef struct { + * TypeAClass parent_class; + * gfloat static_float; + * GString *dynamic_gstring; + * } TypeBClass; + * static void + * type_b_base_class_init (TypeBClass *class) + * { + * class->dynamic_gstring = g_string_new ("some other string"); + * } + * static void + * type_b_base_class_finalize (TypeBClass *class) + * { + * g_string_free (class->dynamic_gstring); + * } + * static void + * type_b_class_init (TypeBClass *class) + * { + * class->static_float = 3.14159265358979323846; + * } + * ]| + * + * Initialization of TypeBClass will first cause initialization of + * TypeAClass (derived classes reference their parent classes, see + * g_type_class_ref() on this). + * + * Initialization of TypeAClass roughly involves zero-initializing its fields, + * then calling its GBaseInitFunc() type_a_base_class_init() to allocate + * its dynamic members (dynamic_string), and finally calling its GClassInitFunc() + * type_a_class_init() to initialize its static members (static_integer). + * The first step in the initialization process of TypeBClass is then + * a plain memory copy of the contents of TypeAClass into TypeBClass and + * zero-initialization of the remaining fields in TypeBClass. + * The dynamic members of TypeAClass within TypeBClass now need + * reinitialization which is performed by calling type_a_base_class_init() + * with an argument of TypeBClass. + * + * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init() + * is called to allocate the dynamic members of TypeBClass (dynamic_gstring), + * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(), + * is called to complete the initialization process with the static members + * (static_float). + * + * Corresponding finalization counter parts to the GBaseInitFunc() functions + * have to be provided to release allocated resources at class finalization + * time. + */ +typedef void (*GClassInitFunc) (gpointer g_class, + gpointer class_data); +/** + * GClassFinalizeFunc: + * @g_class: (type GObject.TypeClass): The #GTypeClass structure to finalize + * @class_data: The @class_data member supplied via the #GTypeInfo structure + * + * A callback function used by the type system to finalize a class. + * + * This function is rarely needed, as dynamically allocated class resources + * should be handled by GBaseInitFunc() and GBaseFinalizeFunc(). + * + * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo + * structure of a static type is invalid, because classes of static types + * will never be finalized (they are artificially kept alive when their + * reference count drops to zero). + */ +typedef void (*GClassFinalizeFunc) (gpointer g_class, + gpointer class_data); +/** + * GInstanceInitFunc: + * @instance: The instance to initialize + * @g_class: (type GObject.TypeClass): The class of the type the instance is + * created for + * + * A callback function used by the type system to initialize a new + * instance of a type. + * + * This function initializes all instance members and allocates any resources + * required by it. + * + * Initialization of a derived instance involves calling all its parent + * types instance initializers, so the class member of the instance + * is altered during its initialization to always point to the class that + * belongs to the type the current initializer was introduced for. + * + * The extended members of @instance are guaranteed to have been filled with + * zeros before this function is called. + */ +typedef void (*GInstanceInitFunc) (GTypeInstance *instance, + gpointer g_class); +/** + * GInterfaceInitFunc: + * @g_iface: (type GObject.TypeInterface): The interface structure to initialize + * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure + * + * A callback function used by the type system to initialize a new + * interface. + * + * This function should initialize all internal data and* allocate any + * resources required by the interface. + * + * The members of @iface_data are guaranteed to have been filled with + * zeros before this function is called. + */ +typedef void (*GInterfaceInitFunc) (gpointer g_iface, + gpointer iface_data); +/** + * GInterfaceFinalizeFunc: + * @g_iface: (type GObject.TypeInterface): The interface structure to finalize + * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure + * + * A callback function used by the type system to finalize an interface. + * + * This function should destroy any internal data and release any resources + * allocated by the corresponding GInterfaceInitFunc() function. + */ +typedef void (*GInterfaceFinalizeFunc) (gpointer g_iface, + gpointer iface_data); +/** + * GTypeClassCacheFunc: + * @cache_data: data that was given to the g_type_add_class_cache_func() call + * @g_class: (type GObject.TypeClass): The #GTypeClass structure which is + * unreferenced + * + * A callback function which is called when the reference count of a class + * drops to zero. + * + * It may use g_type_class_ref() to prevent the class from being freed. You + * should not call g_type_class_unref() from a #GTypeClassCacheFunc function + * to prevent infinite recursion, use g_type_class_unref_uncached() instead. + * + * The functions have to check the class id passed in to figure + * whether they actually want to cache the class of this type, since all + * classes are routed through the same #GTypeClassCacheFunc chain. + * + * Returns: %TRUE to stop further #GTypeClassCacheFuncs from being + * called, %FALSE to continue + */ +typedef gboolean (*GTypeClassCacheFunc) (gpointer cache_data, + GTypeClass *g_class); +/** + * GTypeInterfaceCheckFunc: + * @check_data: data passed to g_type_add_interface_check() + * @g_iface: (type GObject.TypeInterface): the interface that has been + * initialized + * + * A callback called after an interface vtable is initialized. + * + * See g_type_add_interface_check(). + * + * Since: 2.4 + */ +typedef void (*GTypeInterfaceCheckFunc) (gpointer check_data, + gpointer g_iface); +/** + * GTypeFundamentalFlags: + * @G_TYPE_FLAG_CLASSED: Indicates a classed type + * @G_TYPE_FLAG_INSTANTIATABLE: Indicates an instantiatable type (implies classed) + * @G_TYPE_FLAG_DERIVABLE: Indicates a flat derivable type + * @G_TYPE_FLAG_DEEP_DERIVABLE: Indicates a deep derivable type (implies derivable) + * + * Bit masks used to check or determine specific characteristics of a + * fundamental type. + */ +typedef enum /*< skip >*/ +{ + /* There is no G_TYPE_FUNDAMENTAL_FLAGS_NONE: this is implemented to use + * the same bits as GTypeFlags */ + G_TYPE_FLAG_CLASSED = (1 << 0), + G_TYPE_FLAG_INSTANTIATABLE = (1 << 1), + G_TYPE_FLAG_DERIVABLE = (1 << 2), + G_TYPE_FLAG_DEEP_DERIVABLE = (1 << 3) +} GTypeFundamentalFlags; +/** + * GTypeFlags: + * @G_TYPE_FLAG_NONE: No special flags. Since: 2.74 + * @G_TYPE_FLAG_ABSTRACT: Indicates an abstract type. No instances can be + * created for an abstract type + * @G_TYPE_FLAG_VALUE_ABSTRACT: Indicates an abstract value type, i.e. a type + * that introduces a value table, but can't be used for + * g_value_init() + * @G_TYPE_FLAG_FINAL: Indicates a final type. A final type is a non-derivable + * leaf node in a deep derivable type hierarchy tree. Since: 2.70 + * @G_TYPE_FLAG_DEPRECATED: The type is deprecated and may be removed in a + * future version. A warning will be emitted if it is instantiated while + * running with `G_ENABLE_DIAGNOSTIC=1`. Since 2.76 + * + * Bit masks used to check or determine characteristics of a type. + */ +typedef enum /*< skip >*/ +{ + G_TYPE_FLAG_NONE GOBJECT_AVAILABLE_ENUMERATOR_IN_2_74 = 0, + G_TYPE_FLAG_ABSTRACT = (1 << 4), + G_TYPE_FLAG_VALUE_ABSTRACT = (1 << 5), + G_TYPE_FLAG_FINAL GOBJECT_AVAILABLE_ENUMERATOR_IN_2_70 = (1 << 6), + G_TYPE_FLAG_DEPRECATED GOBJECT_AVAILABLE_ENUMERATOR_IN_2_76 = (1 << 7) +} GTypeFlags; +/** + * GTypeInfo: + * @class_size: Size of the class structure (required for interface, classed and instantiatable types) + * @base_init: Location of the base initialization function (optional) + * @base_finalize: Location of the base finalization function (optional) + * @class_init: Location of the class initialization function for + * classed and instantiatable types. Location of the default vtable + * inititalization function for interface types. (optional) This function + * is used both to fill in virtual functions in the class or default vtable, + * and to do type-specific setup such as registering signals and object + * properties. + * @class_finalize: Location of the class finalization function for + * classed and instantiatable types. Location of the default vtable + * finalization function for interface types. (optional) + * @class_data: User-supplied data passed to the class init/finalize functions + * @instance_size: Size of the instance (object) structure (required for instantiatable types only) + * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10 this field is ignored. + * @instance_init: Location of the instance initialization function (optional, for instantiatable types only) + * @value_table: A #GTypeValueTable function table for generic handling of GValues + * of this type (usually only useful for fundamental types) + * + * This structure is used to provide the type system with the information + * required to initialize and destruct (finalize) a type's class and + * its instances. + * + * The initialized structure is passed to the g_type_register_static() function + * (or is copied into the provided #GTypeInfo structure in the + * g_type_plugin_complete_type_info()). The type system will perform a deep + * copy of this structure, so its memory does not need to be persistent + * across invocation of g_type_register_static(). + */ +struct _GTypeInfo +{ + /* interface types, classed types, instantiated types */ + guint16 class_size; + + GBaseInitFunc base_init; + GBaseFinalizeFunc base_finalize; + + /* interface types, classed types, instantiated types */ + GClassInitFunc class_init; + GClassFinalizeFunc class_finalize; + gconstpointer class_data; + + /* instantiated types */ + guint16 instance_size; + guint16 n_preallocs; + GInstanceInitFunc instance_init; + + /* value handling */ + const GTypeValueTable *value_table; +}; +/** + * GTypeFundamentalInfo: + * @type_flags: #GTypeFundamentalFlags describing the characteristics of the fundamental type + * + * A structure that provides information to the type system which is + * used specifically for managing fundamental types. + */ +struct _GTypeFundamentalInfo +{ + GTypeFundamentalFlags type_flags; +}; +/** + * GInterfaceInfo: + * @interface_init: location of the interface initialization function + * @interface_finalize: location of the interface finalization function + * @interface_data: user-supplied data passed to the interface init/finalize functions + * + * A structure that provides information to the type system which is + * used specifically for managing interface types. + */ +struct _GInterfaceInfo +{ + GInterfaceInitFunc interface_init; + GInterfaceFinalizeFunc interface_finalize; + gpointer interface_data; +}; + +/** + * GTypeValueInitFunc: + * @value: the value to initialize + * + * Initializes the value contents by setting the fields of the `value->data` + * array. + * + * The data array of the #GValue passed into this function was zero-filled + * with `memset()`, so no care has to be taken to free any old contents. + * For example, in the case of a string value that may never be %NULL, the + * implementation might look like: + * + * |[ + * value->data[0].v_pointer = g_strdup (""); + * ]| + * + * Since: 2.78 + */ +GOBJECT_AVAILABLE_TYPE_IN_2_78 +typedef void (* GTypeValueInitFunc) (GValue *value); + +/** + * GTypeValueFreeFunc: + * @value: the value to free + * + * Frees any old contents that might be left in the `value->data` array of + * the given value. + * + * No resources may remain allocated through the #GValue contents after this + * function returns. E.g. for our above string type: + * + * |[ + * // only free strings without a specific flag for static storage + * if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS)) + * g_free (value->data[0].v_pointer); + * ]| + * + * Since: 2.78 + */ +GOBJECT_AVAILABLE_TYPE_IN_2_78 +typedef void (* GTypeValueFreeFunc) (GValue *value); + +/** + * GTypeValueCopyFunc: + * @src_value: the value to copy + * @dest_value: (out): the location of the copy + * + * Copies the content of a #GValue into another. + * + * The @dest_value is a #GValue with zero-filled data section and @src_value + * is a properly initialized #GValue of same type, or derived type. + * + * The purpose of this function is to copy the contents of @src_value + * into @dest_value in a way, that even after @src_value has been freed, the + * contents of @dest_value remain valid. String type example: + * + * |[ + * dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer); + * ]| + * + * Since: 2.78 + */ +GOBJECT_AVAILABLE_TYPE_IN_2_78 +typedef void (* GTypeValueCopyFunc) (const GValue *src_value, + GValue *dest_value); + +/** + * GTypeValuePeekPointerFunc: + * @value: the value to peek + * + * If the value contents fit into a pointer, such as objects or strings, + * return this pointer, so the caller can peek at the current contents. + * + * To extend on our above string example: + * + * |[ + * return value->data[0].v_pointer; + * ]| + * + * Returns: (transfer none): a pointer to the value contents + * + * Since: 2.78 + */ +GOBJECT_AVAILABLE_TYPE_IN_2_78 +typedef gpointer (* GTypeValuePeekPointerFunc) (const GValue *value); + +/** + * GTypeValueCollectFunc: + * @value: the value to initialize + * @n_collect_values: the number of collected values + * @collect_values: (array length=n_collect_values): the collected values + * @collect_flags: optional flags + * + * This function is responsible for converting the values collected from + * a variadic argument list into contents suitable for storage in a #GValue. + * + * This function should setup @value similar to #GTypeValueInitFunc; e.g. + * for a string value that does not allow `NULL` pointers, it needs to either + * emit an error, or do an implicit conversion by storing an empty string. + * + * The @value passed in to this function has a zero-filled data array, so + * just like for #GTypeValueInitFunc it is guaranteed to not contain any old + * contents that might need freeing. + * + * The @n_collect_values argument is the string length of the `collect_format` + * field of #GTypeValueTable, and `collect_values` is an array of #GTypeCValue + * with length of @n_collect_values, containing the collected values according + * to `collect_format`. + * + * The @collect_flags argument provided as a hint by the caller. It may + * contain the flag %G_VALUE_NOCOPY_CONTENTS indicating that the collected + * value contents may be considered ‘static’ for the duration of the @value + * lifetime. Thus an extra copy of the contents stored in @collect_values is + * not required for assignment to @value. + * + * For our above string example, we continue with: + * + * |[ + * if (!collect_values[0].v_pointer) + * value->data[0].v_pointer = g_strdup (""); + * else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) + * { + * value->data[0].v_pointer = collect_values[0].v_pointer; + * // keep a flag for the value_free() implementation to not free this string + * value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS; + * } + * else + * value->data[0].v_pointer = g_strdup (collect_values[0].v_pointer); + * return NULL; + * ]| + * + * It should be noted, that it is generally a bad idea to follow the + * %G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to + * reentrancy requirements and reference count assertions performed + * by the signal emission code, reference counts should always be + * incremented for reference counted contents stored in the `value->data` + * array. To deviate from our string example for a moment, and taking + * a look at an exemplary implementation for `GTypeValueTable.collect_value()` + * of `GObject`: + * + * |[ + * GObject *object = G_OBJECT (collect_values[0].v_pointer); + * g_return_val_if_fail (object != NULL, + * g_strdup_printf ("Object %p passed as invalid NULL pointer", object)); + * // never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types + * value->data[0].v_pointer = g_object_ref (object); + * return NULL; + * ]| + * + * The reference count for valid objects is always incremented, regardless + * of `collect_flags`. For invalid objects, the example returns a newly + * allocated string without altering `value`. + * + * Upon success, `collect_value()` needs to return `NULL`. If, however, + * an error condition occurred, `collect_value()` should return a newly + * allocated string containing an error diagnostic. + * + * The calling code makes no assumptions about the `value` contents being + * valid upon error returns, `value` is simply thrown away without further + * freeing. As such, it is a good idea to not allocate `GValue` contents + * prior to returning an error; however, `collect_values()` is not obliged + * to return a correctly setup @value for error returns, simply because + * any non-`NULL` return is considered a fatal programming error, and + * further program behaviour is undefined. + * + * Returns: (transfer full) (nullable): `NULL` on success, otherwise a + * newly allocated error string on failure + * + * Since: 2.78 + */ +GOBJECT_AVAILABLE_TYPE_IN_2_78 +typedef gchar * (* GTypeValueCollectFunc) (GValue *value, + guint n_collect_values, + GTypeCValue *collect_values, + guint collect_flags); + +/** + * GTypeValueLCopyFunc: + * @value: the value to lcopy + * @n_collect_values: the number of collected values + * @collect_values: (array length=n_collect_values): the collected + * locations for storage + * @collect_flags: optional flags + * + * This function is responsible for storing the `value` + * contents into arguments passed through a variadic argument list which + * got collected into `collect_values` according to `lcopy_format`. + * + * The `n_collect_values` argument equals the string length of + * `lcopy_format`, and `collect_flags` may contain %G_VALUE_NOCOPY_CONTENTS. + * + * In contrast to #GTypeValueCollectFunc, this function is obliged to always + * properly support %G_VALUE_NOCOPY_CONTENTS. + * + * Similar to #GTypeValueCollectFunc the function may prematurely abort by + * returning a newly allocated string describing an error condition. To + * complete the string example: + * + * |[ + * gchar **string_p = collect_values[0].v_pointer; + * g_return_val_if_fail (string_p != NULL, + * g_strdup ("string location passed as NULL")); + * + * if (collect_flags & G_VALUE_NOCOPY_CONTENTS) + * *string_p = value->data[0].v_pointer; + * else + * *string_p = g_strdup (value->data[0].v_pointer); + * ]| + * + * And an illustrative version of this function for reference-counted + * types: + * + * |[ + * GObject **object_p = collect_values[0].v_pointer; + * g_return_val_if_fail (object_p != NULL, + * g_strdup ("object location passed as NULL")); + * + * if (value->data[0].v_pointer == NULL) + * *object_p = NULL; + * else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) // always honour + * *object_p = value->data[0].v_pointer; + * else + * *object_p = g_object_ref (value->data[0].v_pointer); + * + * return NULL; + * ]| + * + * Returns: (transfer full) (nullable): `NULL` on success, otherwise + * a newly allocated error string on failure + * + * Since: 2.78 + */ +GOBJECT_AVAILABLE_TYPE_IN_2_78 +typedef gchar * (* GTypeValueLCopyFunc) (const GValue *value, + guint n_collect_values, + GTypeCValue *collect_values, + guint collect_flags); + +/** + * GTypeValueTable: + * @value_init: Function to initialize a GValue + * @value_free: Function to free a GValue + * @value_copy: Function to copy a GValue + * @value_peek_pointer: Function to peek the contents of a GValue if they fit + * into a pointer + * @collect_format: A string format describing how to collect the contents of + * this value bit-by-bit. Each character in the format represents + * an argument to be collected, and the characters themselves indicate + * the type of the argument. Currently supported arguments are: + * - `'i'`: Integers, passed as `collect_values[].v_int` + * - `'l'`: Longs, passed as `collect_values[].v_long` + * - `'d'`: Doubles, passed as `collect_values[].v_double` + * - `'p'`: Pointers, passed as `collect_values[].v_pointer` + * It should be noted that for variable argument list construction, + * ANSI C promotes every type smaller than an integer to an int, and + * floats to doubles. So for collection of short int or char, `'i'` + * needs to be used, and for collection of floats `'d'`. + * @collect_value: Function to initialize a GValue from the values + * collected from variadic arguments + * @lcopy_format: Format description of the arguments to collect for @lcopy_value, + * analogous to @collect_format. Usually, @lcopy_format string consists + * only of `'p'`s to provide lcopy_value() with pointers to storage locations. + * @lcopy_value: Function to store the contents of a value into the + * locations collected from variadic arguments + * + * The #GTypeValueTable provides the functions required by the #GValue + * implementation, to serve as a container for values of a type. + */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +struct _GTypeValueTable +{ + GTypeValueInitFunc value_init; + GTypeValueFreeFunc value_free; + GTypeValueCopyFunc value_copy; + GTypeValuePeekPointerFunc value_peek_pointer; + + const gchar *collect_format; + GTypeValueCollectFunc collect_value; + + const gchar *lcopy_format; + GTypeValueLCopyFunc lcopy_value; +}; +G_GNUC_END_IGNORE_DEPRECATIONS + +GOBJECT_AVAILABLE_IN_ALL +GType g_type_register_static (GType parent_type, + const gchar *type_name, + const GTypeInfo *info, + GTypeFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GType g_type_register_static_simple (GType parent_type, + const gchar *type_name, + guint class_size, + GClassInitFunc class_init, + guint instance_size, + GInstanceInitFunc instance_init, + GTypeFlags flags); + +GOBJECT_AVAILABLE_IN_ALL +GType g_type_register_dynamic (GType parent_type, + const gchar *type_name, + GTypePlugin *plugin, + GTypeFlags flags); +GOBJECT_AVAILABLE_IN_ALL +GType g_type_register_fundamental (GType type_id, + const gchar *type_name, + const GTypeInfo *info, + const GTypeFundamentalInfo *finfo, + GTypeFlags flags); +GOBJECT_AVAILABLE_IN_ALL +void g_type_add_interface_static (GType instance_type, + GType interface_type, + const GInterfaceInfo *info); +GOBJECT_AVAILABLE_IN_ALL +void g_type_add_interface_dynamic (GType instance_type, + GType interface_type, + GTypePlugin *plugin); +GOBJECT_AVAILABLE_IN_ALL +void g_type_interface_add_prerequisite (GType interface_type, + GType prerequisite_type); +GOBJECT_AVAILABLE_IN_ALL +GType*g_type_interface_prerequisites (GType interface_type, + guint *n_prerequisites); +GOBJECT_AVAILABLE_IN_2_68 +GType g_type_interface_instantiatable_prerequisite + (GType interface_type); +GOBJECT_DEPRECATED_IN_2_58 +void g_type_class_add_private (gpointer g_class, + gsize private_size); +GOBJECT_AVAILABLE_IN_2_38 +gint g_type_add_instance_private (GType class_type, + gsize private_size); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_type_instance_get_private (GTypeInstance *instance, + GType private_type); +GOBJECT_AVAILABLE_IN_2_38 +void g_type_class_adjust_private_offset (gpointer g_class, + gint *private_size_or_offset); + +GOBJECT_AVAILABLE_IN_ALL +void g_type_add_class_private (GType class_type, + gsize private_size); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_type_class_get_private (GTypeClass *klass, + GType private_type); +GOBJECT_AVAILABLE_IN_2_38 +gint g_type_class_get_instance_private_offset (gpointer g_class); + +GOBJECT_AVAILABLE_IN_2_34 +void g_type_ensure (GType type); +GOBJECT_AVAILABLE_IN_2_36 +guint g_type_get_type_registration_serial (void); + + +/* --- GType boilerplate --- */ +/** + * G_DECLARE_FINAL_TYPE: + * @ModuleObjName: The name of the new type, in camel case (like `GtkWidget`) + * @module_obj_name: The name of the new type in lowercase, with words + * separated by `_` (like `gtk_widget`) + * @MODULE: The name of the module, in all caps (like `GTK`) + * @OBJ_NAME: The bare name of the type, in all caps (like `WIDGET`) + * @ParentName: the name of the parent type, in camel case (like `GtkWidget`) + * + * A convenience macro for emitting the usual declarations in the header file + * for a type which is not (at the present time) intended to be subclassed. + * + * You might use it in a header as follows: + * + * |[ + * #ifndef _myapp_window_h_ + * #define _myapp_window_h_ + * + * #include + * + * #define MY_APP_TYPE_WINDOW my_app_window_get_type () + * G_DECLARE_FINAL_TYPE (MyAppWindow, my_app_window, MY_APP, WINDOW, GtkWindow) + * + * MyAppWindow * my_app_window_new (void); + * + * ... + * + * #endif + * ]| + * + * And use it as follow in your C file: + * + * |[ + * struct _MyAppWindow + * { + * GtkWindow parent; + * ... + * }; + * G_DEFINE_TYPE (MyAppWindow, my_app_window, GTK_TYPE_WINDOW) + * ]| + * + * This results in the following things happening: + * + * - the usual `my_app_window_get_type()` function is declared with a return type of #GType + * + * - the `MyAppWindow` type is defined as a `typedef` of `struct _MyAppWindow`. The struct itself is not + * defined and should be defined from the .c file before G_DEFINE_TYPE() is used. + * + * - the `MY_APP_WINDOW()` cast is emitted as `static inline` function along with the `MY_APP_IS_WINDOW()` type + * checking function + * + * - the `MyAppWindowClass` type is defined as a struct containing `GtkWindowClass`. This is done for the + * convenience of the person defining the type and should not be considered to be part of the ABI. In + * particular, without a firm declaration of the instance structure, it is not possible to subclass the type + * and therefore the fact that the size of the class structure is exposed is not a concern and it can be + * freely changed at any point in the future. + * + * - g_autoptr() support being added for your type, based on the type of your parent class + * + * You can only use this function if your parent type also supports g_autoptr(). + * + * Because the type macro (`MY_APP_TYPE_WINDOW` in the above example) is not a callable, you must continue to + * manually define this as a macro for yourself. + * + * The declaration of the `_get_type()` function is the first thing emitted by the macro. This allows this macro + * to be used in the usual way with export control and API versioning macros. + * + * If you want to declare your own class structure, use G_DECLARE_DERIVABLE_TYPE(). + * + * If you are writing a library, it is important to note that it is possible to convert a type from using + * G_DECLARE_FINAL_TYPE() to G_DECLARE_DERIVABLE_TYPE() without breaking API or ABI. As a precaution, you + * should therefore use G_DECLARE_FINAL_TYPE() until you are sure that it makes sense for your class to be + * subclassed. Once a class structure has been exposed it is not possible to change its size or remove or + * reorder items without breaking the API and/or ABI. + * + * Since: 2.44 + **/ +#define G_DECLARE_FINAL_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) \ + GType module_obj_name##_get_type (void); \ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + typedef struct _##ModuleObjName ModuleObjName; \ + typedef struct { ParentName##Class parent_class; } ModuleObjName##Class; \ + \ + _GLIB_DEFINE_AUTOPTR_CHAINUP (ModuleObjName, ParentName) \ + G_DEFINE_AUTOPTR_CLEANUP_FUNC (ModuleObjName##Class, g_type_class_unref) \ + \ + G_GNUC_UNUSED static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) { \ + return G_TYPE_CHECK_INSTANCE_CAST (ptr, module_obj_name##_get_type (), ModuleObjName); } \ + G_GNUC_UNUSED static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) { \ + return G_TYPE_CHECK_INSTANCE_TYPE (ptr, module_obj_name##_get_type ()); } \ + G_GNUC_END_IGNORE_DEPRECATIONS + +/** + * G_DECLARE_DERIVABLE_TYPE: + * @ModuleObjName: The name of the new type, in camel case (like `GtkWidget`) + * @module_obj_name: The name of the new type in lowercase, with words + * separated by `_` (like `gtk_widget`) + * @MODULE: The name of the module, in all caps (like `GTK`) + * @OBJ_NAME: The bare name of the type, in all caps (like `WIDGET`) + * @ParentName: the name of the parent type, in camel case (like `GtkWidget`) + * + * A convenience macro for emitting the usual declarations in the + * header file for a type which is intended to be subclassed. + * + * You might use it in a header as follows: + * + * |[ + * #ifndef _gtk_frobber_h_ + * #define _gtk_frobber_h_ + * + * #define GTK_TYPE_FROBBER gtk_frobber_get_type () + * GDK_AVAILABLE_IN_3_12 + * G_DECLARE_DERIVABLE_TYPE (GtkFrobber, gtk_frobber, GTK, FROBBER, GtkWidget) + * + * struct _GtkFrobberClass + * { + * GtkWidgetClass parent_class; + * + * void (* handle_frob) (GtkFrobber *frobber, + * guint n_frobs); + * + * gpointer padding[12]; + * }; + * + * GtkWidget * gtk_frobber_new (void); + * + * ... + * + * #endif + * ]| + * + * Since the instance structure is public it is often needed to declare a + * private struct as follow in your C file: + * + * |[ + * typedef struct _GtkFrobberPrivate GtkFrobberPrivate; + * struct _GtkFrobberPrivate + * { + * ... + * }; + * G_DEFINE_TYPE_WITH_PRIVATE (GtkFrobber, gtk_frobber, GTK_TYPE_WIDGET) + * ]| + * + * This results in the following things happening: + * + * - the usual `gtk_frobber_get_type()` function is declared with a return type of #GType + * + * - the `GtkFrobber` struct is created with `GtkWidget` as the first and only item. You are expected to use + * a private structure from your .c file to store your instance variables. + * + * - the `GtkFrobberClass` type is defined as a typedef to `struct _GtkFrobberClass`, which is left undefined. + * You should do this from the header file directly after you use the macro. + * + * - the `GTK_FROBBER()` and `GTK_FROBBER_CLASS()` casts are emitted as `static inline` functions along with + * the `GTK_IS_FROBBER()` and `GTK_IS_FROBBER_CLASS()` type checking functions and `GTK_FROBBER_GET_CLASS()` + * function. + * + * - g_autoptr() support being added for your type, based on the type of your parent class + * + * You can only use this function if your parent type also supports g_autoptr(). + * + * Because the type macro (`GTK_TYPE_FROBBER` in the above example) is not a callable, you must continue to + * manually define this as a macro for yourself. + * + * The declaration of the `_get_type()` function is the first thing emitted by the macro. This allows this macro + * to be used in the usual way with export control and API versioning macros. + * + * If you are writing a library, it is important to note that it is possible to convert a type from using + * G_DECLARE_FINAL_TYPE() to G_DECLARE_DERIVABLE_TYPE() without breaking API or ABI. As a precaution, you + * should therefore use G_DECLARE_FINAL_TYPE() until you are sure that it makes sense for your class to be + * subclassed. Once a class structure has been exposed it is not possible to change its size or remove or + * reorder items without breaking the API and/or ABI. If you want to declare your own class structure, use + * G_DECLARE_DERIVABLE_TYPE(). If you want to declare a class without exposing the class or instance + * structures, use G_DECLARE_FINAL_TYPE(). + * + * If you must use G_DECLARE_DERIVABLE_TYPE() you should be sure to include some padding at the bottom of your + * class structure to leave space for the addition of future virtual functions. + * + * Since: 2.44 + **/ +#define G_DECLARE_DERIVABLE_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) \ + GType module_obj_name##_get_type (void); \ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + typedef struct _##ModuleObjName ModuleObjName; \ + typedef struct _##ModuleObjName##Class ModuleObjName##Class; \ + struct _##ModuleObjName { ParentName parent_instance; }; \ + \ + _GLIB_DEFINE_AUTOPTR_CHAINUP (ModuleObjName, ParentName) \ + G_DEFINE_AUTOPTR_CLEANUP_FUNC (ModuleObjName##Class, g_type_class_unref) \ + \ + G_GNUC_UNUSED static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) { \ + return G_TYPE_CHECK_INSTANCE_CAST (ptr, module_obj_name##_get_type (), ModuleObjName); } \ + G_GNUC_UNUSED static inline ModuleObjName##Class * MODULE##_##OBJ_NAME##_CLASS (gpointer ptr) { \ + return G_TYPE_CHECK_CLASS_CAST (ptr, module_obj_name##_get_type (), ModuleObjName##Class); } \ + G_GNUC_UNUSED static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) { \ + return G_TYPE_CHECK_INSTANCE_TYPE (ptr, module_obj_name##_get_type ()); } \ + G_GNUC_UNUSED static inline gboolean MODULE##_IS_##OBJ_NAME##_CLASS (gpointer ptr) { \ + return G_TYPE_CHECK_CLASS_TYPE (ptr, module_obj_name##_get_type ()); } \ + G_GNUC_UNUSED static inline ModuleObjName##Class * MODULE##_##OBJ_NAME##_GET_CLASS (gpointer ptr) { \ + return G_TYPE_INSTANCE_GET_CLASS (ptr, module_obj_name##_get_type (), ModuleObjName##Class); } \ + G_GNUC_END_IGNORE_DEPRECATIONS + +/** + * G_DECLARE_INTERFACE: + * @ModuleObjName: The name of the new type, in camel case (like `GtkWidget`) + * @module_obj_name: The name of the new type in lowercase, with words + * separated by `_` (like `gtk_widget`) + * @MODULE: The name of the module, in all caps (like `GTK`) + * @OBJ_NAME: The bare name of the type, in all caps (like `WIDGET`) + * @PrerequisiteName: the name of the prerequisite type, in camel case (like `GtkWidget`) + * + * A convenience macro for emitting the usual declarations in the header file for a #GInterface type. + * + * You might use it in a header as follows: + * + * |[ + * #ifndef _my_model_h_ + * #define _my_model_h_ + * + * #define MY_TYPE_MODEL my_model_get_type () + * GDK_AVAILABLE_IN_3_12 + * G_DECLARE_INTERFACE (MyModel, my_model, MY, MODEL, GObject) + * + * struct _MyModelInterface + * { + * GTypeInterface g_iface; + * + * gpointer (* get_item) (MyModel *model); + * }; + * + * gpointer my_model_get_item (MyModel *model); + * + * ... + * + * #endif + * ]| + * + * And use it as follow in your C file: + * + * |[ + * G_DEFINE_INTERFACE (MyModel, my_model, G_TYPE_OBJECT); + * + * static void + * my_model_default_init (MyModelInterface *iface) + * { + * ... + * } + * ]| + * + * This results in the following things happening: + * + * - the usual `my_model_get_type()` function is declared with a return type of #GType + * + * - the `MyModelInterface` type is defined as a typedef to `struct _MyModelInterface`, + * which is left undefined. You should do this from the header file directly after + * you use the macro. + * + * - the `MY_MODEL()` cast is emitted as `static inline` functions along with + * the `MY_IS_MODEL()` type checking function and `MY_MODEL_GET_IFACE()` function. + * + * - g_autoptr() support being added for your type, based on your prerequisite type. + * + * You can only use this function if your prerequisite type also supports g_autoptr(). + * + * Because the type macro (`MY_TYPE_MODEL` in the above example) is not a callable, you must continue to + * manually define this as a macro for yourself. + * + * The declaration of the `_get_type()` function is the first thing emitted by the macro. This allows this macro + * to be used in the usual way with export control and API versioning macros. + * + * Since: 2.44 + **/ +#define G_DECLARE_INTERFACE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, PrerequisiteName) \ + GType module_obj_name##_get_type (void); \ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + typedef struct _##ModuleObjName ModuleObjName; \ + typedef struct _##ModuleObjName##Interface ModuleObjName##Interface; \ + \ + _GLIB_DEFINE_AUTOPTR_CHAINUP (ModuleObjName, PrerequisiteName) \ + \ + G_GNUC_UNUSED static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) { \ + return G_TYPE_CHECK_INSTANCE_CAST (ptr, module_obj_name##_get_type (), ModuleObjName); } \ + G_GNUC_UNUSED static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) { \ + return G_TYPE_CHECK_INSTANCE_TYPE (ptr, module_obj_name##_get_type ()); } \ + G_GNUC_UNUSED static inline ModuleObjName##Interface * MODULE##_##OBJ_NAME##_GET_IFACE (gpointer ptr) { \ + return G_TYPE_INSTANCE_GET_INTERFACE (ptr, module_obj_name##_get_type (), ModuleObjName##Interface); } \ + G_GNUC_END_IGNORE_DEPRECATIONS + +/** + * G_DEFINE_TYPE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words + * separated by `_`. + * @T_P: The #GType of the parent type. + * + * A convenience macro for type implementations, which declares a class + * initialization function, an instance initialization function (see #GTypeInfo + * for information about these) and a static variable named `t_n_parent_class` + * pointing to the parent class. Furthermore, it defines a `*_get_type()` function. + * See G_DEFINE_TYPE_EXTENDED() for an example. + * + * Since: 2.4 + */ +#define G_DEFINE_TYPE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {}) +/** + * G_DEFINE_TYPE_WITH_CODE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type in lowercase, with words separated by `_`. + * @T_P: The #GType of the parent type. + * @_C_: Custom code that gets inserted in the `*_get_type()` function. + * + * A convenience macro for type implementations. + * + * Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the + * `*_get_type()` function, e.g. interface implementations via G_IMPLEMENT_INTERFACE(). + * See G_DEFINE_TYPE_EXTENDED() for an example. + * + * Since: 2.4 + */ +#define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() +/** + * G_DEFINE_TYPE_WITH_PRIVATE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words + * separated by `_`. + * @T_P: The #GType of the parent type. + * + * A convenience macro for type implementations, which declares a class + * initialization function, an instance initialization function (see #GTypeInfo + * for information about these), a static variable named `t_n_parent_class` + * pointing to the parent class, and adds private instance data to the type. + * + * Furthermore, it defines a `*_get_type()` function. See G_DEFINE_TYPE_EXTENDED() + * for an example. + * + * Note that private structs added with this macros must have a struct + * name of the form `TN ## Private`. + * + * The private instance data can be retrieved using the automatically generated + * getter function `t_n_get_instance_private()`. + * + * See also: G_ADD_PRIVATE() + * + * Since: 2.38 + */ +#define G_DEFINE_TYPE_WITH_PRIVATE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, G_ADD_PRIVATE (TN)) +/** + * G_DEFINE_ABSTRACT_TYPE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words + * separated by `_`. + * @T_P: The #GType of the parent type. + * + * A convenience macro for type implementations. + * + * Similar to G_DEFINE_TYPE(), but defines an abstract type. + * See G_DEFINE_TYPE_EXTENDED() for an example. + * + * Since: 2.4 + */ +#define G_DEFINE_ABSTRACT_TYPE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, {}) +/** + * G_DEFINE_ABSTRACT_TYPE_WITH_CODE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words + * separated by `_`. + * @T_P: The #GType of the parent type. + * @_C_: Custom code that gets inserted in the `type_name_get_type()` function. + * + * A convenience macro for type implementations. + * + * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and + * allows you to insert custom code into the `*_get_type()` function, e.g. + * interface implementations via G_IMPLEMENT_INTERFACE(). + * + * See G_DEFINE_TYPE_EXTENDED() for an example. + * + * Since: 2.4 + */ +#define G_DEFINE_ABSTRACT_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() +/** + * G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words + * separated by `_`. + * @T_P: The #GType of the parent type. + * + * Similar to G_DEFINE_TYPE_WITH_PRIVATE(), but defines an abstract type. + * + * See G_DEFINE_TYPE_EXTENDED() for an example. + * + * Since: 2.38 + */ +#define G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, G_ADD_PRIVATE (TN)) +/** + * G_DEFINE_FINAL_TYPE: + * @TN: the name of the new type, in Camel case + * @t_n: the name of the new type, in lower case, with words + * separated by `_` (snake case) + * @T_P: the #GType of the parent type + * + * A convenience macro for type implementations. + * + * Similar to G_DEFINE_TYPE(), but defines a final type. + * + * See G_DEFINE_TYPE_EXTENDED() for an example. + * + * Since: 2.70 + */ +#define G_DEFINE_FINAL_TYPE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_FINAL, {}) GOBJECT_AVAILABLE_MACRO_IN_2_70 +/** + * G_DEFINE_FINAL_TYPE_WITH_CODE: + * @TN: the name of the new type, in Camel case + * @t_n: the name of the new type, in lower case, with words + * separated by `_` (snake case) + * @T_P: the #GType of the parent type + * @_C_: Custom code that gets inserted in the `type_name_get_type()` function. + * + * A convenience macro for type implementations. + * + * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines a final type and + * allows you to insert custom code into the `*_get_type()` function, e.g. + * interface implementations via G_IMPLEMENT_INTERFACE(). + * + * See G_DEFINE_TYPE_EXTENDED() for an example. + * + * Since: 2.70 + */ +#define G_DEFINE_FINAL_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, G_TYPE_FLAG_FINAL) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() GOBJECT_AVAILABLE_MACRO_IN_2_70 +/** + * G_DEFINE_FINAL_TYPE_WITH_PRIVATE: + * @TN: the name of the new type, in Camel case + * @t_n: the name of the new type, in lower case, with words + * separated by `_` (snake case) + * @T_P: the #GType of the parent type + * + * A convenience macro for type implementations. + * + * Similar to G_DEFINE_TYPE_WITH_PRIVATE(), but defines a final type. + * + * See G_DEFINE_TYPE_EXTENDED() for an example. + * + * Since: 2.70 + */ +#define G_DEFINE_FINAL_TYPE_WITH_PRIVATE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_FINAL, G_ADD_PRIVATE (TN)) GOBJECT_AVAILABLE_MACRO_IN_2_70 +/** + * G_DEFINE_TYPE_EXTENDED: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words + * separated by `_`. + * @T_P: The #GType of the parent type. + * @_f_: #GTypeFlags to pass to g_type_register_static() + * @_C_: Custom code that gets inserted in the `*_get_type()` function. + * + * The most general convenience macro for type implementations, on which + * G_DEFINE_TYPE(), etc are based. + * + * |[ + * G_DEFINE_TYPE_EXTENDED (GtkGadget, + * gtk_gadget, + * GTK_TYPE_WIDGET, + * 0, + * G_ADD_PRIVATE (GtkGadget) + * G_IMPLEMENT_INTERFACE (TYPE_GIZMO, + * gtk_gadget_gizmo_init)); + * ]| + * + * expands to + * + * |[ + * static void gtk_gadget_init (GtkGadget *self); + * static void gtk_gadget_class_init (GtkGadgetClass *klass); + * static gpointer gtk_gadget_parent_class = NULL; + * static gint GtkGadget_private_offset; + * static void gtk_gadget_class_intern_init (gpointer klass) + * { + * gtk_gadget_parent_class = g_type_class_peek_parent (klass); + * if (GtkGadget_private_offset != 0) + * g_type_class_adjust_private_offset (klass, &GtkGadget_private_offset); + * gtk_gadget_class_init ((GtkGadgetClass*) klass); + * } + * static inline gpointer gtk_gadget_get_instance_private (GtkGadget *self) + * { + * return (G_STRUCT_MEMBER_P (self, GtkGadget_private_offset)); + * } + * + * GType + * gtk_gadget_get_type (void) + * { + * static gsize static_g_define_type_id = 0; + * if (g_once_init_enter (&static_g_define_type_id)) + * { + * GType g_define_type_id = + * g_type_register_static_simple (GTK_TYPE_WIDGET, + * g_intern_static_string ("GtkGadget"), + * sizeof (GtkGadgetClass), + * (GClassInitFunc) gtk_gadget_class_intern_init, + * sizeof (GtkGadget), + * (GInstanceInitFunc) gtk_gadget_init, + * 0); + * { + * GtkGadget_private_offset = + * g_type_add_instance_private (g_define_type_id, sizeof (GtkGadgetPrivate)); + * } + * { + * const GInterfaceInfo g_implement_interface_info = { + * (GInterfaceInitFunc) gtk_gadget_gizmo_init + * }; + * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info); + * } + * g_once_init_leave (&static_g_define_type_id, g_define_type_id); + * } + * return static_g_define_type_id; + * } + * ]| + * + * The only pieces which have to be manually provided are the definitions of + * the instance and class structure and the definitions of the instance and + * class init functions. + * + * Since: 2.4 + */ +#define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() + +/** + * G_DEFINE_INTERFACE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words separated by `_`. + * @T_P: The #GType of the prerequisite type for the interface, or %G_TYPE_INVALID + * for no prerequisite type. + * + * A convenience macro for #GTypeInterface definitions, which declares + * a default vtable initialization function and defines a `*_get_type()` + * function. + * + * The macro expects the interface initialization function to have the + * name `t_n ## _default_init`, and the interface structure to have the + * name `TN ## Interface`. + * + * The initialization function has signature + * `static void t_n ## _default_init (TypeName##Interface *klass);`, rather than + * the full #GInterfaceInitFunc signature, for brevity and convenience. If you + * need to use an initialization function with an `iface_data` argument, you + * must write the #GTypeInterface definitions manually. + * + * Since: 2.24 + */ +#define G_DEFINE_INTERFACE(TN, t_n, T_P) G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, ;) + +/** + * G_DEFINE_INTERFACE_WITH_CODE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words separated by `_`. + * @T_P: The #GType of the prerequisite type for the interface, or %G_TYPE_INVALID + * for no prerequisite type. + * @_C_: Custom code that gets inserted in the `*_get_type()` function. + * + * A convenience macro for #GTypeInterface definitions. + * + * Similar to G_DEFINE_INTERFACE(), but allows you to insert custom code + * into the `*_get_type()` function, e.g. additional interface implementations + * via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. + * + * See G_DEFINE_TYPE_EXTENDED() for a similar example using + * G_DEFINE_TYPE_WITH_CODE(). + * + * Since: 2.24 + */ +#define G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_INTERFACE_EXTENDED_BEGIN(TN, t_n, T_P) {_C_;} _G_DEFINE_INTERFACE_EXTENDED_END() + +/** + * G_IMPLEMENT_INTERFACE: + * @TYPE_IFACE: The #GType of the interface to add + * @iface_init: (type GInterfaceInitFunc): The interface init function, of type #GInterfaceInitFunc + * + * A convenience macro to ease interface addition in the `_C_` section + * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE(). + * See G_DEFINE_TYPE_EXTENDED() for an example. + * + * Note that this macro can only be used together with the `G_DEFINE_TYPE_*` + * macros, since it depends on variable names from those macros. + * + * Since: 2.4 + */ +#define G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init) { \ + const GInterfaceInfo g_implement_interface_info = { \ + (GInterfaceInitFunc)(void (*)(void)) iface_init, NULL, NULL \ + }; \ + g_type_add_interface_static (g_define_type_id, TYPE_IFACE, &g_implement_interface_info); \ +} + +/** + * G_ADD_PRIVATE: + * @TypeName: the name of the type in CamelCase + * + * A convenience macro to ease adding private data to instances of a new type + * in the @_C_ section of G_DEFINE_TYPE_WITH_CODE() or + * G_DEFINE_ABSTRACT_TYPE_WITH_CODE(). + * + * For instance: + * + * |[ + * typedef struct _MyObject MyObject; + * typedef struct _MyObjectClass MyObjectClass; + * + * typedef struct { + * gint foo; + * gint bar; + * } MyObjectPrivate; + * + * G_DEFINE_TYPE_WITH_CODE (MyObject, my_object, G_TYPE_OBJECT, + * G_ADD_PRIVATE (MyObject)) + * ]| + * + * Will add `MyObjectPrivate` as the private data to any instance of the + * `MyObject` type. + * + * `G_DEFINE_TYPE_*` macros will automatically create a private function + * based on the arguments to this macro, which can be used to safely + * retrieve the private data from an instance of the type; for instance: + * + * |[ + * gint + * my_object_get_foo (MyObject *obj) + * { + * MyObjectPrivate *priv = my_object_get_instance_private (obj); + * + * g_return_val_if_fail (MY_IS_OBJECT (obj), 0); + * + * return priv->foo; + * } + * + * void + * my_object_set_bar (MyObject *obj, + * gint bar) + * { + * MyObjectPrivate *priv = my_object_get_instance_private (obj); + * + * g_return_if_fail (MY_IS_OBJECT (obj)); + * + * if (priv->bar != bar) + * priv->bar = bar; + * } + * ]| + * + * Since GLib 2.72, the returned `MyObjectPrivate` pointer is guaranteed to be + * aligned to at least the alignment of the largest basic GLib type (typically + * this is #guint64 or #gdouble). If you need larger alignment for an element in + * the struct, you should allocate it on the heap (aligned), or arrange for your + * `MyObjectPrivate` struct to be appropriately padded. + * + * Note that this macro can only be used together with the `G_DEFINE_TYPE_*` + * macros, since it depends on variable names from those macros. + * + * Also note that private structs added with these macros must have a struct + * name of the form `TypeNamePrivate`. + * + * It is safe to call the `_get_instance_private` function on %NULL or invalid + * objects since it's only adding an offset to the instance pointer. In that + * case the returned pointer must not be dereferenced. + * + * Since: 2.38 + */ +#define G_ADD_PRIVATE(TypeName) { \ + TypeName##_private_offset = \ + g_type_add_instance_private (g_define_type_id, sizeof (TypeName##Private)); \ +} + +/** + * G_PRIVATE_OFFSET: + * @TypeName: the name of the type in CamelCase + * @field: the name of the field in the private data structure + * + * Evaluates to the offset of the @field inside the instance private data + * structure for @TypeName. + * + * Note that this macro can only be used together with the `G_DEFINE_TYPE_*` + * and G_ADD_PRIVATE() macros, since it depends on variable names from + * those macros. + * + * Since: 2.38 + */ +#define G_PRIVATE_OFFSET(TypeName, field) \ + (TypeName##_private_offset + (G_STRUCT_OFFSET (TypeName##Private, field))) + +/** + * G_PRIVATE_FIELD_P: + * @TypeName: the name of the type in CamelCase + * @inst: the instance of @TypeName you wish to access + * @field_name: the name of the field in the private data structure + * + * Evaluates to a pointer to the @field_name inside the @inst private data + * structure for @TypeName. + * + * Note that this macro can only be used together with the `G_DEFINE_TYPE_*` + * and G_ADD_PRIVATE() macros, since it depends on variable names from + * those macros. + * + * Since: 2.38 + */ +#define G_PRIVATE_FIELD_P(TypeName, inst, field_name) \ + G_STRUCT_MEMBER_P (inst, G_PRIVATE_OFFSET (TypeName, field_name)) + +/** + * G_PRIVATE_FIELD: + * @TypeName: the name of the type in CamelCase + * @inst: the instance of @TypeName you wish to access + * @field_type: the type of the field in the private data structure + * @field_name: the name of the field in the private data structure + * + * Evaluates to the @field_name inside the @inst private data + * structure for @TypeName. + * + * Note that this macro can only be used together with the `G_DEFINE_TYPE_*` + * and G_ADD_PRIVATE() macros, since it depends on variable names from + * those macros. + * + * Since: 2.38 + */ +#define G_PRIVATE_FIELD(TypeName, inst, field_type, field_name) \ + G_STRUCT_MEMBER (field_type, inst, G_PRIVATE_OFFSET (TypeName, field_name)) + +/* we need to have this macro under conditional expansion, as it references + * a function that has been added in 2.38. see bug: + * https://bugzilla.gnome.org/show_bug.cgi?id=703191 + */ +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 +#define _G_DEFINE_TYPE_EXTENDED_CLASS_INIT(TypeName, type_name) \ +static void type_name##_class_intern_init (gpointer klass) \ +{ \ + type_name##_parent_class = g_type_class_peek_parent (klass); \ + if (TypeName##_private_offset != 0) \ + g_type_class_adjust_private_offset (klass, &TypeName##_private_offset); \ + type_name##_class_init ((TypeName##Class*) klass); \ +} + +#else +#define _G_DEFINE_TYPE_EXTENDED_CLASS_INIT(TypeName, type_name) \ +static void type_name##_class_intern_init (gpointer klass) \ +{ \ + type_name##_parent_class = g_type_class_peek_parent (klass); \ + type_name##_class_init ((TypeName##Class*) klass); \ +} +#endif /* GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 */ + +/* Added for _G_DEFINE_TYPE_EXTENDED_WITH_PRELUDE */ +#define _G_DEFINE_TYPE_EXTENDED_BEGIN_PRE(TypeName, type_name, TYPE_PARENT) \ +\ +static void type_name##_init (TypeName *self); \ +static void type_name##_class_init (TypeName##Class *klass); \ +static GType type_name##_get_type_once (void); \ +static gpointer type_name##_parent_class = NULL; \ +static gint TypeName##_private_offset; \ +\ +_G_DEFINE_TYPE_EXTENDED_CLASS_INIT(TypeName, type_name) \ +\ +G_GNUC_UNUSED \ +static inline gpointer \ +type_name##_get_instance_private (TypeName *self) \ +{ \ + return (G_STRUCT_MEMBER_P (self, TypeName##_private_offset)); \ +} \ +\ +GType \ +type_name##_get_type (void) \ +{ \ + static gsize static_g_define_type_id = 0; + /* Prelude goes here */ + +/* Added for _G_DEFINE_TYPE_EXTENDED_WITH_PRELUDE */ +#define _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER(TypeName, type_name, TYPE_PARENT, flags) \ + if (g_once_init_enter (&static_g_define_type_id)) \ + { \ + GType g_define_type_id = type_name##_get_type_once (); \ + g_once_init_leave (&static_g_define_type_id, g_define_type_id); \ + } \ + return static_g_define_type_id; \ +} /* closes type_name##_get_type() */ \ +\ +G_NO_INLINE \ +static GType \ +type_name##_get_type_once (void) \ +{ \ + GType g_define_type_id = \ + g_type_register_static_simple (TYPE_PARENT, \ + g_intern_static_string (#TypeName), \ + sizeof (TypeName##Class), \ + (GClassInitFunc)(void (*)(void)) type_name##_class_intern_init, \ + sizeof (TypeName), \ + (GInstanceInitFunc)(void (*)(void)) type_name##_init, \ + (GTypeFlags) flags); \ + { /* custom code follows */ +#define _G_DEFINE_TYPE_EXTENDED_END() \ + /* following custom code */ \ + } \ + return g_define_type_id; \ +} /* closes type_name##_get_type_once() */ + +/* This was defined before we had G_DEFINE_TYPE_WITH_CODE_AND_PRELUDE, it's simplest + * to keep it. + */ +#define _G_DEFINE_TYPE_EXTENDED_BEGIN(TypeName, type_name, TYPE_PARENT, flags) \ + _G_DEFINE_TYPE_EXTENDED_BEGIN_PRE(TypeName, type_name, TYPE_PARENT) \ + _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER(TypeName, type_name, TYPE_PARENT, flags) \ + +/* Intentionally using (GTypeFlags) 0 instead of G_TYPE_FLAG_NONE here, + * to avoid deprecation warnings with older GLIB_VERSION_MAX_ALLOWED */ +#define _G_DEFINE_INTERFACE_EXTENDED_BEGIN(TypeName, type_name, TYPE_PREREQ) \ +\ +static void type_name##_default_init (TypeName##Interface *klass); \ +\ +GType \ +type_name##_get_type (void) \ +{ \ + static gsize static_g_define_type_id = 0; \ + if (g_once_init_enter (&static_g_define_type_id)) \ + { \ + GType g_define_type_id = \ + g_type_register_static_simple (G_TYPE_INTERFACE, \ + g_intern_static_string (#TypeName), \ + sizeof (TypeName##Interface), \ + (GClassInitFunc)(void (*)(void)) type_name##_default_init, \ + 0, \ + (GInstanceInitFunc)NULL, \ + (GTypeFlags) 0); \ + if (TYPE_PREREQ != G_TYPE_INVALID) \ + g_type_interface_add_prerequisite (g_define_type_id, TYPE_PREREQ); \ + { /* custom code follows */ +#define _G_DEFINE_INTERFACE_EXTENDED_END() \ + /* following custom code */ \ + } \ + g_once_init_leave (&static_g_define_type_id, g_define_type_id); \ + } \ + return static_g_define_type_id; \ +} /* closes type_name##_get_type() */ + +/** + * G_DEFINE_BOXED_TYPE: + * @TypeName: The name of the new type, in Camel case + * @type_name: The name of the new type, in lowercase, with words + * separated by `_` + * @copy_func: the #GBoxedCopyFunc for the new type + * @free_func: the #GBoxedFreeFunc for the new type + * + * A convenience macro for defining a new custom boxed type. + * + * Using this macro is the recommended way of defining new custom boxed + * types, over calling g_boxed_type_register_static() directly. It defines + * a `type_name_get_type()` function which will return the newly defined + * #GType, enabling lazy instantiation. + * + * You might start by putting declarations in a header as follows: + * + * |[ + * #define MY_TYPE_STRUCT my_struct_get_type () + * GType my_struct_get_type (void) G_GNUC_CONST; + * + * MyStruct * my_struct_new (void); + * void my_struct_free (MyStruct *self); + * MyStruct * my_struct_copy (MyStruct *self); + * ]| + * + * And then use this macro and define your implementation in the source file as + * follows: + * + * |[ + * MyStruct * + * my_struct_new (void) + * { + * // ... your code to allocate a new MyStruct ... + * } + * + * void + * my_struct_free (MyStruct *self) + * { + * // ... your code to free a MyStruct ... + * } + * + * MyStruct * + * my_struct_copy (MyStruct *self) + * { + * // ... your code return a newly allocated copy of a MyStruct ... + * } + * + * G_DEFINE_BOXED_TYPE (MyStruct, my_struct, my_struct_copy, my_struct_free) + * + * void + * foo () + * { + * MyStruct *ms; + * + * ms = my_struct_new (); + * // ... your code ... + * my_struct_free (ms); + * } + * ]| + * + * Since: 2.26 + */ +#define G_DEFINE_BOXED_TYPE(TypeName, type_name, copy_func, free_func) G_DEFINE_BOXED_TYPE_WITH_CODE (TypeName, type_name, copy_func, free_func, {}) +/** + * G_DEFINE_BOXED_TYPE_WITH_CODE: + * @TypeName: The name of the new type, in Camel case + * @type_name: The name of the new type, in lowercase, with words + * separated by `_` + * @copy_func: the #GBoxedCopyFunc for the new type + * @free_func: the #GBoxedFreeFunc for the new type + * @_C_: Custom code that gets inserted in the `*_get_type()` function + * + * A convenience macro for boxed type implementations. + * + * Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the + * `type_name_get_type()` function, e.g. to register value transformations with + * g_value_register_transform_func(), for instance: + * + * |[ + * G_DEFINE_BOXED_TYPE_WITH_CODE (GdkRectangle, gdk_rectangle, + * gdk_rectangle_copy, + * gdk_rectangle_free, + * register_rectangle_transform_funcs (g_define_type_id)) + * ]| + * + * Similarly to the `G_DEFINE_TYPE_*` family of macros, the #GType of the newly + * defined boxed type is exposed in the `g_define_type_id` variable. + * + * Since: 2.26 + */ +#define G_DEFINE_BOXED_TYPE_WITH_CODE(TypeName, type_name, copy_func, free_func, _C_) _G_DEFINE_BOXED_TYPE_BEGIN (TypeName, type_name, copy_func, free_func) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() + +/* Only use this in non-C++ on GCC >= 2.7, except for Darwin/ppc64. + * See https://bugzilla.gnome.org/show_bug.cgi?id=647145 + */ +#if !defined (G_CXX_STD_VERSION) && (G_GNUC_CHECK_VERSION(2, 7)) && \ + !(defined (__APPLE__) && defined (__ppc64__)) +#define _G_DEFINE_BOXED_TYPE_BEGIN(TypeName, type_name, copy_func, free_func) \ +static GType type_name##_get_type_once (void); \ +\ +GType \ +type_name##_get_type (void) \ +{ \ + static gsize static_g_define_type_id = 0; \ + if (g_once_init_enter (&static_g_define_type_id)) \ + { \ + GType g_define_type_id = type_name##_get_type_once (); \ + g_once_init_leave (&static_g_define_type_id, g_define_type_id); \ + } \ + return static_g_define_type_id; \ +} \ +\ +G_NO_INLINE \ +static GType \ +type_name##_get_type_once (void) \ +{ \ + GType (* _g_register_boxed) \ + (const gchar *, \ + union \ + { \ + TypeName * (*do_copy_type) (TypeName *); \ + TypeName * (*do_const_copy_type) (const TypeName *); \ + GBoxedCopyFunc do_copy_boxed; \ + } __attribute__((__transparent_union__)), \ + union \ + { \ + void (* do_free_type) (TypeName *); \ + GBoxedFreeFunc do_free_boxed; \ + } __attribute__((__transparent_union__)) \ + ) = g_boxed_type_register_static; \ + GType g_define_type_id = \ + _g_register_boxed (g_intern_static_string (#TypeName), copy_func, free_func); \ + { /* custom code follows */ +#else +#define _G_DEFINE_BOXED_TYPE_BEGIN(TypeName, type_name, copy_func, free_func) \ +static GType type_name##_get_type_once (void); \ +\ +GType \ +type_name##_get_type (void) \ +{ \ + static gsize static_g_define_type_id = 0; \ + if (g_once_init_enter (&static_g_define_type_id)) \ + { \ + GType g_define_type_id = type_name##_get_type_once (); \ + g_once_init_leave (&static_g_define_type_id, g_define_type_id); \ + } \ + return static_g_define_type_id; \ +} \ +\ +G_NO_INLINE \ +static GType \ +type_name##_get_type_once (void) \ +{ \ + GType g_define_type_id = \ + g_boxed_type_register_static (g_intern_static_string (#TypeName), \ + (GBoxedCopyFunc) copy_func, \ + (GBoxedFreeFunc) free_func); \ + { /* custom code follows */ +#endif /* __GNUC__ */ + +/** + * G_DEFINE_POINTER_TYPE: + * @TypeName: The name of the new type, in Camel case + * @type_name: The name of the new type, in lowercase, with words + * separated by `_` + * + * A convenience macro for pointer type implementations, which defines a + * `type_name_get_type()` function registering the pointer type. + * + * Since: 2.26 + */ +#define G_DEFINE_POINTER_TYPE(TypeName, type_name) G_DEFINE_POINTER_TYPE_WITH_CODE (TypeName, type_name, {}) +/** + * G_DEFINE_POINTER_TYPE_WITH_CODE: + * @TypeName: The name of the new type, in Camel case + * @type_name: The name of the new type, in lowercase, with words + * separated by `_` + * @_C_: Custom code that gets inserted in the `*_get_type()` function + * + * A convenience macro for pointer type implementations. + * Similar to G_DEFINE_POINTER_TYPE(), but allows to insert + * custom code into the `type_name_get_type()` function. + * + * Since: 2.26 + */ +#define G_DEFINE_POINTER_TYPE_WITH_CODE(TypeName, type_name, _C_) _G_DEFINE_POINTER_TYPE_BEGIN (TypeName, type_name) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() + +#define _G_DEFINE_POINTER_TYPE_BEGIN(TypeName, type_name) \ +static GType type_name##_get_type_once (void); \ +\ +GType \ +type_name##_get_type (void) \ +{ \ + static gsize static_g_define_type_id = 0; \ + if (g_once_init_enter (&static_g_define_type_id)) \ + { \ + GType g_define_type_id = type_name##_get_type_once (); \ + g_once_init_leave (&static_g_define_type_id, g_define_type_id); \ + } \ + return static_g_define_type_id; \ +} \ +\ +G_NO_INLINE \ +static GType \ +type_name##_get_type_once (void) \ +{ \ + GType g_define_type_id = \ + g_pointer_type_register_static (g_intern_static_string (#TypeName)); \ + { /* custom code follows */ + +/* --- protected (for fundamental type implementations) --- */ +GOBJECT_AVAILABLE_IN_ALL +GTypePlugin* g_type_get_plugin (GType type); +GOBJECT_AVAILABLE_IN_ALL +GTypePlugin* g_type_interface_get_plugin (GType instance_type, + GType interface_type); +GOBJECT_AVAILABLE_IN_ALL +GType g_type_fundamental_next (void); +GOBJECT_AVAILABLE_IN_ALL +GType g_type_fundamental (GType type_id); +GOBJECT_AVAILABLE_IN_ALL +GTypeInstance* g_type_create_instance (GType type); +GOBJECT_AVAILABLE_IN_ALL +void g_type_free_instance (GTypeInstance *instance); + +GOBJECT_AVAILABLE_IN_ALL +void g_type_add_class_cache_func (gpointer cache_data, + GTypeClassCacheFunc cache_func); +GOBJECT_AVAILABLE_IN_ALL +void g_type_remove_class_cache_func (gpointer cache_data, + GTypeClassCacheFunc cache_func); +GOBJECT_AVAILABLE_IN_ALL +void g_type_class_unref_uncached (gpointer g_class); + +GOBJECT_AVAILABLE_IN_ALL +void g_type_add_interface_check (gpointer check_data, + GTypeInterfaceCheckFunc check_func); +GOBJECT_AVAILABLE_IN_ALL +void g_type_remove_interface_check (gpointer check_data, + GTypeInterfaceCheckFunc check_func); + +GOBJECT_AVAILABLE_IN_ALL +GTypeValueTable* g_type_value_table_peek (GType type); + + +/*< private >*/ +GOBJECT_AVAILABLE_IN_ALL +gboolean g_type_check_instance (GTypeInstance *instance) G_GNUC_PURE; +GOBJECT_AVAILABLE_IN_ALL +GTypeInstance* g_type_check_instance_cast (GTypeInstance *instance, + GType iface_type); +GOBJECT_AVAILABLE_IN_ALL +gboolean g_type_check_instance_is_a (GTypeInstance *instance, + GType iface_type) G_GNUC_PURE; +GOBJECT_AVAILABLE_IN_2_42 +gboolean g_type_check_instance_is_fundamentally_a (GTypeInstance *instance, + GType fundamental_type) G_GNUC_PURE; +GOBJECT_AVAILABLE_IN_ALL +GTypeClass* g_type_check_class_cast (GTypeClass *g_class, + GType is_a_type); +GOBJECT_AVAILABLE_IN_ALL +gboolean g_type_check_class_is_a (GTypeClass *g_class, + GType is_a_type) G_GNUC_PURE; +GOBJECT_AVAILABLE_IN_ALL +gboolean g_type_check_is_value_type (GType type) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +gboolean g_type_check_value (const GValue *value) G_GNUC_PURE; +GOBJECT_AVAILABLE_IN_ALL +gboolean g_type_check_value_holds (const GValue *value, + GType type) G_GNUC_PURE; +GOBJECT_AVAILABLE_IN_ALL +gboolean g_type_test_flags (GType type, + guint flags) G_GNUC_CONST; + + +/* --- debugging functions --- */ +GOBJECT_AVAILABLE_IN_ALL +const gchar * g_type_name_from_instance (GTypeInstance *instance); +GOBJECT_AVAILABLE_IN_ALL +const gchar * g_type_name_from_class (GTypeClass *g_class); + + +/* --- implementation bits --- */ +#if defined(G_DISABLE_CAST_CHECKS) || defined(__OPTIMIZE__) +# define _G_TYPE_CIC(ip, gt, ct) ((ct*) (void *) ip) +# define _G_TYPE_CCC(cp, gt, ct) ((ct*) (void *) cp) +#else +# define _G_TYPE_CIC(ip, gt, ct) \ + ((ct*) (void *) g_type_check_instance_cast ((GTypeInstance*) ip, gt)) +# define _G_TYPE_CCC(cp, gt, ct) \ + ((ct*) (void *) g_type_check_class_cast ((GTypeClass*) cp, gt)) +#endif + +#define _G_TYPE_CHI(ip) (g_type_check_instance ((GTypeInstance*) ip)) +#define _G_TYPE_CHV(vl) (g_type_check_value ((GValue*) vl)) +#define _G_TYPE_IGC(ip, gt, ct) ((ct*) (((GTypeInstance*) ip)->g_class)) +#define _G_TYPE_IGI(ip, gt, ct) ((ct*) g_type_interface_peek (((GTypeInstance*) ip)->g_class, gt)) +#define _G_TYPE_CIFT(ip, ft) (g_type_check_instance_is_fundamentally_a ((GTypeInstance*) ip, ft)) +#ifdef __GNUC__ +# define _G_TYPE_CIT(ip, gt) (G_GNUC_EXTENSION ({ \ + GTypeInstance *__inst = (GTypeInstance*) ip; GType __t = gt; gboolean __r; \ + if (!__inst) \ + __r = FALSE; \ + else if (__inst->g_class && __inst->g_class->g_type == __t) \ + __r = TRUE; \ + else \ + __r = g_type_check_instance_is_a (__inst, __t); \ + __r; \ +})) +# define _G_TYPE_CCT(cp, gt) (G_GNUC_EXTENSION ({ \ + GTypeClass *__class = (GTypeClass*) cp; GType __t = gt; gboolean __r; \ + if (!__class) \ + __r = FALSE; \ + else if (__class->g_type == __t) \ + __r = TRUE; \ + else \ + __r = g_type_check_class_is_a (__class, __t); \ + __r; \ +})) +# define _G_TYPE_CVH(vl, gt) (G_GNUC_EXTENSION ({ \ + const GValue *__val = (const GValue*) vl; GType __t = gt; gboolean __r; \ + if (!__val) \ + __r = FALSE; \ + else if (__val->g_type == __t) \ + __r = TRUE; \ + else \ + __r = g_type_check_value_holds (__val, __t); \ + __r; \ +})) +#else /* !__GNUC__ */ +# define _G_TYPE_CIT(ip, gt) (g_type_check_instance_is_a ((GTypeInstance*) ip, gt)) +# define _G_TYPE_CCT(cp, gt) (g_type_check_class_is_a ((GTypeClass*) cp, gt)) +# define _G_TYPE_CVH(vl, gt) (g_type_check_value_holds ((const GValue*) vl, gt)) +#endif /* !__GNUC__ */ +/** + * G_TYPE_FLAG_RESERVED_ID_BIT: + * + * A bit in the type number that's supposed to be left untouched. + */ +#define G_TYPE_FLAG_RESERVED_ID_BIT ((GType) (1 << 0)) + +G_END_DECLS + +#endif /* __G_TYPE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gtypemodule.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gtypemodule.h new file mode 100644 index 0000000..e386b50 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gtypemodule.h @@ -0,0 +1,302 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 2000 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ +#ifndef __G_TYPE_MODULE_H__ +#define __G_TYPE_MODULE_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +G_BEGIN_DECLS + +typedef struct _GTypeModule GTypeModule; +typedef struct _GTypeModuleClass GTypeModuleClass; + +#define G_TYPE_TYPE_MODULE (g_type_module_get_type ()) +#define G_TYPE_MODULE(module) (G_TYPE_CHECK_INSTANCE_CAST ((module), G_TYPE_TYPE_MODULE, GTypeModule)) +#define G_TYPE_MODULE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_TYPE_MODULE, GTypeModuleClass)) +#define G_IS_TYPE_MODULE(module) (G_TYPE_CHECK_INSTANCE_TYPE ((module), G_TYPE_TYPE_MODULE)) +#define G_IS_TYPE_MODULE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_TYPE_MODULE)) +#define G_TYPE_MODULE_GET_CLASS(module) (G_TYPE_INSTANCE_GET_CLASS ((module), G_TYPE_TYPE_MODULE, GTypeModuleClass)) + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTypeModule, g_object_unref) + +/** + * GTypeModule: + * @name: the name of the module + * + * The members of the GTypeModule structure should not + * be accessed directly, except for the @name field. + */ +struct _GTypeModule +{ + GObject parent_instance; + + guint use_count; + GSList *type_infos; + GSList *interface_infos; + + /*< public >*/ + gchar *name; +}; + +/** + * GTypeModuleClass: + * @parent_class: the parent class + * @load: loads the module and registers one or more types using + * g_type_module_register_type(). + * @unload: unloads the module + * + * In order to implement dynamic loading of types based on #GTypeModule, + * the @load and @unload functions in #GTypeModuleClass must be implemented. + */ +struct _GTypeModuleClass +{ + GObjectClass parent_class; + + /*< public >*/ + gboolean (* load) (GTypeModule *module); + void (* unload) (GTypeModule *module); + + /*< private >*/ + /* Padding for future expansion */ + void (*reserved1) (void); + void (*reserved2) (void); + void (*reserved3) (void); + void (*reserved4) (void); +}; + +/** + * G_DEFINE_DYNAMIC_TYPE: + * @TN: The name of the new type, in Camel case. + * @t_n: The name of the new type, in lowercase, with words + * separated by '_'. + * @T_P: The #GType of the parent type. + * + * A convenience macro for dynamic type implementations, which declares a + * class initialization function, an instance initialization function (see + * #GTypeInfo for information about these) and a static variable named + * `t_n`_parent_class pointing to the parent class. + * + * Furthermore, it defines a `*_get_type()` and a static `*_register_type()` + * functions for use in your `module_init()`. + * + * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example. + * + * Since: 2.14 + */ +#define G_DEFINE_DYNAMIC_TYPE(TN, t_n, T_P) G_DEFINE_DYNAMIC_TYPE_EXTENDED (TN, t_n, T_P, 0, {}) +/** + * G_DEFINE_DYNAMIC_TYPE_EXTENDED: + * @TypeName: The name of the new type, in Camel case. + * @type_name: The name of the new type, in lowercase, with words + * separated by '_'. + * @TYPE_PARENT: The #GType of the parent type. + * @flags: #GTypeFlags to pass to g_type_module_register_type() + * @CODE: Custom code that gets inserted in the *_get_type() function. + * + * A more general version of G_DEFINE_DYNAMIC_TYPE() which + * allows to specify #GTypeFlags and custom code. + * + * |[ + * G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget, + * gtk_gadget, + * GTK_TYPE_THING, + * 0, + * G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO, + * gtk_gadget_gizmo_init)); + * ]| + * + * expands to + * + * |[ + * static void gtk_gadget_init (GtkGadget *self); + * static void gtk_gadget_class_init (GtkGadgetClass *klass); + * static void gtk_gadget_class_finalize (GtkGadgetClass *klass); + * + * static gpointer gtk_gadget_parent_class = NULL; + * static GType gtk_gadget_type_id = 0; + * + * static void gtk_gadget_class_intern_init (gpointer klass) + * { + * gtk_gadget_parent_class = g_type_class_peek_parent (klass); + * gtk_gadget_class_init ((GtkGadgetClass*) klass); + * } + * + * GType + * gtk_gadget_get_type (void) + * { + * return gtk_gadget_type_id; + * } + * + * static void + * gtk_gadget_register_type (GTypeModule *type_module) + * { + * const GTypeInfo g_define_type_info = { + * sizeof (GtkGadgetClass), + * (GBaseInitFunc) NULL, + * (GBaseFinalizeFunc) NULL, + * (GClassInitFunc) gtk_gadget_class_intern_init, + * (GClassFinalizeFunc) gtk_gadget_class_finalize, + * NULL, // class_data + * sizeof (GtkGadget), + * 0, // n_preallocs + * (GInstanceInitFunc) gtk_gadget_init, + * NULL // value_table + * }; + * gtk_gadget_type_id = g_type_module_register_type (type_module, + * GTK_TYPE_THING, + * "GtkGadget", + * &g_define_type_info, + * (GTypeFlags) flags); + * { + * const GInterfaceInfo g_implement_interface_info = { + * (GInterfaceInitFunc) gtk_gadget_gizmo_init + * }; + * g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info); + * } + * } + * ]| + * + * Since: 2.14 + */ +#define G_DEFINE_DYNAMIC_TYPE_EXTENDED(TypeName, type_name, TYPE_PARENT, flags, CODE) \ +static void type_name##_init (TypeName *self); \ +static void type_name##_class_init (TypeName##Class *klass); \ +static void type_name##_class_finalize (TypeName##Class *klass); \ +static gpointer type_name##_parent_class = NULL; \ +static GType type_name##_type_id = 0; \ +static gint TypeName##_private_offset; \ +\ +_G_DEFINE_TYPE_EXTENDED_CLASS_INIT(TypeName, type_name) \ +\ +G_GNUC_UNUSED \ +static inline gpointer \ +type_name##_get_instance_private (TypeName *self) \ +{ \ + return (G_STRUCT_MEMBER_P (self, TypeName##_private_offset)); \ +} \ +\ +GType \ +type_name##_get_type (void) \ +{ \ + return type_name##_type_id; \ +} \ +static void \ +type_name##_register_type (GTypeModule *type_module) \ +{ \ + GType g_define_type_id G_GNUC_UNUSED; \ + const GTypeInfo g_define_type_info = { \ + sizeof (TypeName##Class), \ + (GBaseInitFunc) NULL, \ + (GBaseFinalizeFunc) NULL, \ + (GClassInitFunc)(void (*)(void)) type_name##_class_intern_init, \ + (GClassFinalizeFunc)(void (*)(void)) type_name##_class_finalize, \ + NULL, /* class_data */ \ + sizeof (TypeName), \ + 0, /* n_preallocs */ \ + (GInstanceInitFunc)(void (*)(void)) type_name##_init, \ + NULL /* value_table */ \ + }; \ + type_name##_type_id = g_type_module_register_type (type_module, \ + TYPE_PARENT, \ + #TypeName, \ + &g_define_type_info, \ + (GTypeFlags) flags); \ + g_define_type_id = type_name##_type_id; \ + { CODE ; } \ +} + +/** + * G_IMPLEMENT_INTERFACE_DYNAMIC: + * @TYPE_IFACE: The #GType of the interface to add + * @iface_init: The interface init function + * + * A convenience macro to ease interface addition in the @_C_ section + * of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). + * + * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example. + * + * Note that this macro can only be used together with the + * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable + * names from that macro. + * + * Since: 2.24 + */ +#define G_IMPLEMENT_INTERFACE_DYNAMIC(TYPE_IFACE, iface_init) { \ + const GInterfaceInfo g_implement_interface_info = { \ + (GInterfaceInitFunc)(void (*)(void)) iface_init, NULL, NULL \ + }; \ + g_type_module_add_interface (type_module, g_define_type_id, TYPE_IFACE, &g_implement_interface_info); \ +} + +/** + * G_ADD_PRIVATE_DYNAMIC: + * @TypeName: the name of the type in CamelCase + * + * A convenience macro to ease adding private data to instances of a new dynamic + * type in the @_C_ section of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). + * + * See G_ADD_PRIVATE() for details, it is similar but for static types. + * + * Note that this macro can only be used together with the + * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable + * names from that macro. + * + * Since: 2.38 + */ +#define G_ADD_PRIVATE_DYNAMIC(TypeName) { \ + TypeName##_private_offset = sizeof (TypeName##Private); \ +} + +GOBJECT_AVAILABLE_IN_ALL +GType g_type_module_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +gboolean g_type_module_use (GTypeModule *module); +GOBJECT_AVAILABLE_IN_ALL +void g_type_module_unuse (GTypeModule *module); +GOBJECT_AVAILABLE_IN_ALL +void g_type_module_set_name (GTypeModule *module, + const gchar *name); +GOBJECT_AVAILABLE_IN_ALL +GType g_type_module_register_type (GTypeModule *module, + GType parent_type, + const gchar *type_name, + const GTypeInfo *type_info, + GTypeFlags flags); +GOBJECT_AVAILABLE_IN_ALL +void g_type_module_add_interface (GTypeModule *module, + GType instance_type, + GType interface_type, + const GInterfaceInfo *interface_info); +GOBJECT_AVAILABLE_IN_ALL +GType g_type_module_register_enum (GTypeModule *module, + const gchar *name, + const GEnumValue *const_static_values); +GOBJECT_AVAILABLE_IN_ALL +GType g_type_module_register_flags (GTypeModule *module, + const gchar *name, + const GFlagsValue *const_static_values); + +G_END_DECLS + +#endif /* __G_TYPE_MODULE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gtypeplugin.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gtypeplugin.h new file mode 100644 index 0000000..3711932 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gtypeplugin.h @@ -0,0 +1,136 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 2000 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + */ +#ifndef __G_TYPE_PLUGIN_H__ +#define __G_TYPE_PLUGIN_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/* --- type macros --- */ +#define G_TYPE_TYPE_PLUGIN (g_type_plugin_get_type ()) +#define G_TYPE_PLUGIN(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TYPE_PLUGIN, GTypePlugin)) +#define G_TYPE_PLUGIN_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), G_TYPE_TYPE_PLUGIN, GTypePluginClass)) +#define G_IS_TYPE_PLUGIN(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TYPE_PLUGIN)) +#define G_IS_TYPE_PLUGIN_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), G_TYPE_TYPE_PLUGIN)) +#define G_TYPE_PLUGIN_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_TYPE_PLUGIN, GTypePluginClass)) + + +/* --- typedefs & structures --- */ +typedef struct _GTypePluginClass GTypePluginClass; +/** + * GTypePluginUse: + * @plugin: the #GTypePlugin whose use count should be increased + * + * The type of the @use_plugin function of #GTypePluginClass, which gets called + * to increase the use count of @plugin. + */ +typedef void (*GTypePluginUse) (GTypePlugin *plugin); +/** + * GTypePluginUnuse: + * @plugin: the #GTypePlugin whose use count should be decreased + * + * The type of the @unuse_plugin function of #GTypePluginClass. + */ +typedef void (*GTypePluginUnuse) (GTypePlugin *plugin); +/** + * GTypePluginCompleteTypeInfo: + * @plugin: the #GTypePlugin + * @g_type: the #GType whose info is completed + * @info: the #GTypeInfo struct to fill in + * @value_table: the #GTypeValueTable to fill in + * + * The type of the @complete_type_info function of #GTypePluginClass. + */ +typedef void (*GTypePluginCompleteTypeInfo) (GTypePlugin *plugin, + GType g_type, + GTypeInfo *info, + GTypeValueTable *value_table); +/** + * GTypePluginCompleteInterfaceInfo: + * @plugin: the #GTypePlugin + * @instance_type: the #GType of an instantiatable type to which the interface + * is added + * @interface_type: the #GType of the interface whose info is completed + * @info: the #GInterfaceInfo to fill in + * + * The type of the @complete_interface_info function of #GTypePluginClass. + */ +typedef void (*GTypePluginCompleteInterfaceInfo) (GTypePlugin *plugin, + GType instance_type, + GType interface_type, + GInterfaceInfo *info); +/** + * GTypePlugin: + * + * The GTypePlugin typedef is used as a placeholder + * for objects that implement the GTypePlugin interface. + */ +/** + * GTypePluginClass: + * @use_plugin: Increases the use count of the plugin. + * @unuse_plugin: Decreases the use count of the plugin. + * @complete_type_info: Fills in the #GTypeInfo and + * #GTypeValueTable structs for the type. The structs are initialized + * with `memset(s, 0, sizeof (s))` before calling this function. + * @complete_interface_info: Fills in missing parts of the #GInterfaceInfo + * for the interface. The structs is initialized with + * `memset(s, 0, sizeof (s))` before calling this function. + * + * The #GTypePlugin interface is used by the type system in order to handle + * the lifecycle of dynamically loaded types. + */ +struct _GTypePluginClass +{ + /*< private >*/ + GTypeInterface base_iface; + + /*< public >*/ + GTypePluginUse use_plugin; + GTypePluginUnuse unuse_plugin; + GTypePluginCompleteTypeInfo complete_type_info; + GTypePluginCompleteInterfaceInfo complete_interface_info; +}; + + +/* --- prototypes --- */ +GOBJECT_AVAILABLE_IN_ALL +GType g_type_plugin_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_ALL +void g_type_plugin_use (GTypePlugin *plugin); +GOBJECT_AVAILABLE_IN_ALL +void g_type_plugin_unuse (GTypePlugin *plugin); +GOBJECT_AVAILABLE_IN_ALL +void g_type_plugin_complete_type_info (GTypePlugin *plugin, + GType g_type, + GTypeInfo *info, + GTypeValueTable *value_table); +GOBJECT_AVAILABLE_IN_ALL +void g_type_plugin_complete_interface_info (GTypePlugin *plugin, + GType instance_type, + GType interface_type, + GInterfaceInfo *info); + +G_END_DECLS + +#endif /* __G_TYPE_PLUGIN_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gvalue.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gvalue.h new file mode 100644 index 0000000..2ac5ca1 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gvalue.h @@ -0,0 +1,212 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1997-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * gvalue.h: generic GValue functions + */ +#ifndef __G_VALUE_H__ +#define __G_VALUE_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/* --- type macros --- */ +/** + * G_TYPE_IS_VALUE: + * @type: A #GType value. + * + * Checks whether the passed in type ID can be used for g_value_init(). + * + * That is, this macro checks whether this type provides an implementation + * of the #GTypeValueTable functions required for a type to create a #GValue of. + * + * Returns: Whether @type is suitable as a #GValue type. + */ +#define G_TYPE_IS_VALUE(type) (g_type_check_is_value_type (type)) +/** + * G_IS_VALUE: + * @value: A #GValue structure. + * + * Checks if @value is a valid and initialized #GValue structure. + * + * Returns: %TRUE on success. + */ +#define G_IS_VALUE(value) (G_TYPE_CHECK_VALUE (value)) +/** + * G_VALUE_TYPE: + * @value: A #GValue structure. + * + * Get the type identifier of @value. + * + * Returns: the #GType. + */ +#define G_VALUE_TYPE(value) (((GValue*) (value))->g_type) +/** + * G_VALUE_TYPE_NAME: + * @value: A #GValue structure. + * + * Gets the type name of @value. + * + * Returns: the type name. + */ +#define G_VALUE_TYPE_NAME(value) (g_type_name (G_VALUE_TYPE (value))) +/** + * G_VALUE_HOLDS: + * @value: A #GValue structure. + * @type: A #GType value. + * + * Checks if @value holds (or contains) a value of @type. + * This macro will also check for @value != %NULL and issue a + * warning if the check fails. + * + * Returns: %TRUE if @value holds the @type. + */ +#define G_VALUE_HOLDS(value,type) (G_TYPE_CHECK_VALUE_TYPE ((value), (type))) + + +/* --- typedefs & structures --- */ +/** + * GValueTransform: + * @src_value: Source value. + * @dest_value: Target value. + * + * The type of value transformation functions which can be registered with + * g_value_register_transform_func(). + * + * @dest_value will be initialized to the correct destination type. + */ +typedef void (*GValueTransform) (const GValue *src_value, + GValue *dest_value); +/** + * GValue: + * + * An opaque structure used to hold different types of values. + * + * The data within the structure has protected scope: it is accessible only + * to functions within a #GTypeValueTable structure, or implementations of + * the g_value_*() API. That is, code portions which implement new fundamental + * types. + * + * #GValue users cannot make any assumptions about how data is stored + * within the 2 element @data union, and the @g_type member should + * only be accessed through the G_VALUE_TYPE() macro. + */ +struct _GValue +{ + /*< private >*/ + GType g_type; + + /* public for GTypeValueTable methods */ + union { + gint v_int; + guint v_uint; + glong v_long; + gulong v_ulong; + gint64 v_int64; + guint64 v_uint64; + gfloat v_float; + gdouble v_double; + gpointer v_pointer; + } data[2]; +}; + + +/* --- prototypes --- */ +GOBJECT_AVAILABLE_IN_ALL +GValue* g_value_init (GValue *value, + GType g_type); +GOBJECT_AVAILABLE_IN_ALL +void g_value_copy (const GValue *src_value, + GValue *dest_value); +GOBJECT_AVAILABLE_IN_ALL +GValue* g_value_reset (GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_unset (GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_instance (GValue *value, + gpointer instance); +GOBJECT_AVAILABLE_IN_2_42 +void g_value_init_from_instance (GValue *value, + gpointer instance); + + +/* --- private --- */ +GOBJECT_AVAILABLE_IN_ALL +gboolean g_value_fits_pointer (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_value_peek_pointer (const GValue *value); + + +/* --- implementation details --- */ +GOBJECT_AVAILABLE_IN_ALL +gboolean g_value_type_compatible (GType src_type, + GType dest_type); +GOBJECT_AVAILABLE_IN_ALL +gboolean g_value_type_transformable (GType src_type, + GType dest_type); +GOBJECT_AVAILABLE_IN_ALL +gboolean g_value_transform (const GValue *src_value, + GValue *dest_value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_register_transform_func (GType src_type, + GType dest_type, + GValueTransform transform_func); + +/** + * G_VALUE_NOCOPY_CONTENTS: + * + * If passed to G_VALUE_COLLECT(), allocated data won't be copied + * but used verbatim. This does not affect ref-counted types like + * objects. This does not affect usage of g_value_copy(), the data will + * be copied if it is not ref-counted. + */ +#define G_VALUE_NOCOPY_CONTENTS (1 << 27) + +/** + * G_VALUE_INTERNED_STRING: + * + * For string values, indicates that the string contained is canonical and will + * exist for the duration of the process. See g_value_set_interned_string(). + * + * Since: 2.66 + */ +#define G_VALUE_INTERNED_STRING (1 << 28) GOBJECT_AVAILABLE_MACRO_IN_2_66 + +/** + * G_VALUE_INIT: + * + * A #GValue must be initialized before it can be used. This macro can + * be used as initializer instead of an explicit `{ 0 }` when declaring + * a variable, but it cannot be assigned to a variable. + * + * |[ + * GValue value = G_VALUE_INIT; + * ]| + * + * Since: 2.30 + */ +#define G_VALUE_INIT { 0, { { 0 } } } + + +G_END_DECLS + +#endif /* __G_VALUE_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gvaluearray.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gvaluearray.h new file mode 100644 index 0000000..72aa91b --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gvaluearray.h @@ -0,0 +1,106 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 2001 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * gvaluearray.h: GLib array type holding GValues + */ +#ifndef __G_VALUE_ARRAY_H__ +#define __G_VALUE_ARRAY_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/** + * G_TYPE_VALUE_ARRAY: + * + * The type ID of the "GValueArray" type which is a boxed type, + * used to pass around pointers to GValueArrays. + * + * Deprecated: 2.32: Use #GArray instead of #GValueArray + */ +#define G_TYPE_VALUE_ARRAY (g_value_array_get_type ()) GOBJECT_DEPRECATED_MACRO_IN_2_32_FOR(G_TYPE_ARRAY) + +/* --- typedefs & structs --- */ +typedef struct _GValueArray GValueArray; +/** + * GValueArray: + * @n_values: number of values contained in the array + * @values: array of values + * + * A #GValueArray contains an array of #GValue elements. + */ +struct _GValueArray +{ + guint n_values; + GValue *values; + + /*< private >*/ + guint n_prealloced; +}; + +/* --- prototypes --- */ +GOBJECT_DEPRECATED_IN_2_32_FOR(GArray) +GType g_value_array_get_type (void) G_GNUC_CONST; + +GOBJECT_DEPRECATED_IN_2_32_FOR(GArray) +GValue* g_value_array_get_nth (GValueArray *value_array, + guint index_); + +GOBJECT_DEPRECATED_IN_2_32_FOR(GArray) +GValueArray* g_value_array_new (guint n_prealloced); + +GOBJECT_DEPRECATED_IN_2_32_FOR(GArray) +void g_value_array_free (GValueArray *value_array); + +GOBJECT_DEPRECATED_IN_2_32_FOR(GArray) +GValueArray* g_value_array_copy (const GValueArray *value_array); + +GOBJECT_DEPRECATED_IN_2_32_FOR(GArray) +GValueArray* g_value_array_prepend (GValueArray *value_array, + const GValue *value); + +GOBJECT_DEPRECATED_IN_2_32_FOR(GArray) +GValueArray* g_value_array_append (GValueArray *value_array, + const GValue *value); + +GOBJECT_DEPRECATED_IN_2_32_FOR(GArray) +GValueArray* g_value_array_insert (GValueArray *value_array, + guint index_, + const GValue *value); + +GOBJECT_DEPRECATED_IN_2_32_FOR(GArray) +GValueArray* g_value_array_remove (GValueArray *value_array, + guint index_); + +GOBJECT_DEPRECATED_IN_2_32_FOR(GArray) +GValueArray* g_value_array_sort (GValueArray *value_array, + GCompareFunc compare_func); + +GOBJECT_DEPRECATED_IN_2_32_FOR(GArray) +GValueArray* g_value_array_sort_with_data (GValueArray *value_array, + GCompareDataFunc compare_func, + gpointer user_data); + + +G_END_DECLS + +#endif /* __G_VALUE_ARRAY_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gvaluecollector.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gvaluecollector.h new file mode 100644 index 0000000..7e7ae02 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gvaluecollector.h @@ -0,0 +1,290 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * gvaluecollector.h: GValue varargs stubs + */ +/** + * SECTION:value_collection + * @Short_description: Converting varargs to generic values + * @Title: Varargs Value Collection + * + * The macros in this section provide the varargs parsing support needed + * in variadic GObject functions such as g_object_new() or g_object_set(). + * + * They currently support the collection of integral types, floating point + * types and pointers. + */ +#ifndef __G_VALUE_COLLECTOR_H__ +#define __G_VALUE_COLLECTOR_H__ + +#include + +G_BEGIN_DECLS + +/* we may want to add aggregate types here some day, if requested + * by users. the basic C types are covered already, everything + * smaller than an int is promoted to an integer and floats are + * always promoted to doubles for varargs call constructions. + */ +enum /*< skip >*/ +{ + G_VALUE_COLLECT_INT = 'i', + G_VALUE_COLLECT_LONG = 'l', + G_VALUE_COLLECT_INT64 = 'q', + G_VALUE_COLLECT_DOUBLE = 'd', + G_VALUE_COLLECT_POINTER = 'p' +}; + + +/* vararg union holding actual values collected + */ +/** + * GTypeCValue: + * @v_int: the field for holding integer values + * @v_long: the field for holding long integer values + * @v_int64: the field for holding 64 bit integer values + * @v_double: the field for holding floating point values + * @v_pointer: the field for holding pointers + * + * A union holding one collected value. + */ +union _GTypeCValue +{ + gint v_int; + glong v_long; + gint64 v_int64; + gdouble v_double; + gpointer v_pointer; +}; + +/** + * G_VALUE_COLLECT_INIT: + * @value: a #GValue return location. @value must contain only 0 bytes. + * @_value_type: the #GType to use for @value. + * @var_args: the va_list variable; it may be evaluated multiple times + * @flags: flags which are passed on to the collect_value() function of + * the #GTypeValueTable of @value. + * @__error: a #gchar** variable that will be modified to hold a g_new() + * allocated error messages if something fails + * + * Collects a variable argument value from a `va_list`. + * + * We have to implement the varargs collection as a macro, because on some + * systems `va_list` variables cannot be passed by reference. + * + * Since: 2.24 + */ +#define G_VALUE_COLLECT_INIT(value, _value_type, var_args, flags, __error) \ + G_STMT_START { \ + GTypeValueTable *g_vci_vtab; \ + G_VALUE_COLLECT_INIT2(value, g_vci_vtab, _value_type, var_args, flags, __error); \ +} G_STMT_END + +/** + * G_VALUE_COLLECT_INIT2: + * @value: a #GValue return location. @value must contain only 0 bytes. + * @g_vci_vtab: a #GTypeValueTable pointer that will be set to the value table + * for @_value_type + * @_value_type: the #GType to use for @value. + * @var_args: the va_list variable; it may be evaluated multiple times + * @flags: flags which are passed on to the collect_value() function of + * the #GTypeValueTable of @value. + * @__error: a #gchar** variable that will be modified to hold a g_new() + * allocated error messages if something fails + * + * A variant of G_VALUE_COLLECT_INIT() that provides the #GTypeValueTable + * to the caller. + * + * Since: 2.74 + */ +#define G_VALUE_COLLECT_INIT2(value, g_vci_vtab, _value_type, var_args, flags, __error) \ +G_STMT_START { \ + GValue *g_vci_val = (value); \ + guint g_vci_flags = (flags); \ + const gchar *g_vci_collect_format; \ + GTypeCValue g_vci_cvalues[G_VALUE_COLLECT_FORMAT_MAX_LENGTH] = { { 0, }, }; \ + guint g_vci_n_values = 0; \ + g_vci_vtab = g_type_value_table_peek (_value_type); \ + g_vci_collect_format = g_vci_vtab->collect_format; \ + g_vci_val->g_type = _value_type; /* value_meminit() from gvalue.c */ \ + while (*g_vci_collect_format) \ + { \ + GTypeCValue *g_vci_cvalue = g_vci_cvalues + g_vci_n_values++; \ + \ + switch (*g_vci_collect_format++) \ + { \ + case G_VALUE_COLLECT_INT: \ + g_vci_cvalue->v_int = va_arg ((var_args), gint); \ + break; \ + case G_VALUE_COLLECT_LONG: \ + g_vci_cvalue->v_long = va_arg ((var_args), glong); \ + break; \ + case G_VALUE_COLLECT_INT64: \ + g_vci_cvalue->v_int64 = va_arg ((var_args), gint64); \ + break; \ + case G_VALUE_COLLECT_DOUBLE: \ + g_vci_cvalue->v_double = va_arg ((var_args), gdouble); \ + break; \ + case G_VALUE_COLLECT_POINTER: \ + g_vci_cvalue->v_pointer = va_arg ((var_args), gpointer); \ + break; \ + default: \ + g_assert_not_reached (); \ + } \ + } \ + *(__error) = g_vci_vtab->collect_value (g_vci_val, \ + g_vci_n_values, \ + g_vci_cvalues, \ + g_vci_flags); \ +} G_STMT_END + +/** + * G_VALUE_COLLECT: + * @value: a #GValue return location. @value is supposed to be initialized + * according to the value type to be collected + * @var_args: the va_list variable; it may be evaluated multiple times + * @flags: flags which are passed on to the collect_value() function of + * the #GTypeValueTable of @value. + * @__error: a #gchar** variable that will be modified to hold a g_new() + * allocated error messages if something fails + * + * Collects a variable argument value from a `va_list`. + * + * We have to implement the varargs collection as a macro, because on some systems + * `va_list` variables cannot be passed by reference. + * + * Note: If you are creating the @value argument just before calling this macro, + * you should use the G_VALUE_COLLECT_INIT() variant and pass the uninitialized + * #GValue. That variant is faster than G_VALUE_COLLECT(). + */ +#define G_VALUE_COLLECT(value, var_args, flags, __error) G_STMT_START { \ + GValue *g_vc_value = (value); \ + GType g_vc_value_type = G_VALUE_TYPE (g_vc_value); \ + GTypeValueTable *g_vc_vtable = g_type_value_table_peek (g_vc_value_type); \ + \ + if (g_vc_vtable->value_free) \ + g_vc_vtable->value_free (g_vc_value); \ + memset (g_vc_value->data, 0, sizeof (g_vc_value->data)); \ + \ + G_VALUE_COLLECT_INIT(value, g_vc_value_type, var_args, flags, __error); \ +} G_STMT_END + +/** + * G_VALUE_COLLECT_SKIP: + * @_value_type: the #GType of the value to skip + * @var_args: the va_list variable; it may be evaluated multiple times + * + * Skip an argument of type @_value_type from @var_args. + */ +#define G_VALUE_COLLECT_SKIP(_value_type, var_args) \ +G_STMT_START { \ + GTypeValueTable *g_vcs_vtable = g_type_value_table_peek (_value_type); \ + const gchar *g_vcs_collect_format = g_vcs_vtable->collect_format; \ + \ + while (*g_vcs_collect_format) \ + { \ + switch (*g_vcs_collect_format++) \ + { \ + case G_VALUE_COLLECT_INT: \ + va_arg ((var_args), gint); \ + break; \ + case G_VALUE_COLLECT_LONG: \ + va_arg ((var_args), glong); \ + break; \ + case G_VALUE_COLLECT_INT64: \ + va_arg ((var_args), gint64); \ + break; \ + case G_VALUE_COLLECT_DOUBLE: \ + va_arg ((var_args), gdouble); \ + break; \ + case G_VALUE_COLLECT_POINTER: \ + va_arg ((var_args), gpointer); \ + break; \ + default: \ + g_assert_not_reached (); \ + } \ + } \ +} G_STMT_END + +/** + * G_VALUE_LCOPY: + * @value: a #GValue to store into the @var_args; this must be initialized + * and set + * @var_args: the va_list variable; it may be evaluated multiple times + * @flags: flags which are passed on to the lcopy_value() function of + * the #GTypeValueTable of @value. + * @__error: a #gchar** variable that will be modified to hold a g_new() + * allocated error message if something fails + * + * Stores a value’s value into one or more argument locations from a `va_list`. + * + * This is the inverse of G_VALUE_COLLECT(). + */ +#define G_VALUE_LCOPY(value, var_args, flags, __error) \ +G_STMT_START { \ + const GValue *g_vl_value = (value); \ + guint g_vl_flags = (flags); \ + GType g_vl_value_type = G_VALUE_TYPE (g_vl_value); \ + GTypeValueTable *g_vl_vtable = g_type_value_table_peek (g_vl_value_type); \ + const gchar *g_vl_lcopy_format = g_vl_vtable->lcopy_format; \ + GTypeCValue g_vl_cvalues[G_VALUE_COLLECT_FORMAT_MAX_LENGTH] = { { 0, }, }; \ + guint g_vl_n_values = 0; \ + \ + while (*g_vl_lcopy_format) \ + { \ + GTypeCValue *g_vl_cvalue = g_vl_cvalues + g_vl_n_values++; \ + \ + switch (*g_vl_lcopy_format++) \ + { \ + case G_VALUE_COLLECT_INT: \ + g_vl_cvalue->v_int = va_arg ((var_args), gint); \ + break; \ + case G_VALUE_COLLECT_LONG: \ + g_vl_cvalue->v_long = va_arg ((var_args), glong); \ + break; \ + case G_VALUE_COLLECT_INT64: \ + g_vl_cvalue->v_int64 = va_arg ((var_args), gint64); \ + break; \ + case G_VALUE_COLLECT_DOUBLE: \ + g_vl_cvalue->v_double = va_arg ((var_args), gdouble); \ + break; \ + case G_VALUE_COLLECT_POINTER: \ + g_vl_cvalue->v_pointer = va_arg ((var_args), gpointer); \ + break; \ + default: \ + g_assert_not_reached (); \ + } \ + } \ + *(__error) = g_vl_vtable->lcopy_value (g_vl_value, \ + g_vl_n_values, \ + g_vl_cvalues, \ + g_vl_flags); \ +} G_STMT_END + + +/** + * G_VALUE_COLLECT_FORMAT_MAX_LENGTH: + * + * The maximal number of #GTypeCValues which can be collected for a + * single #GValue. + */ +#define G_VALUE_COLLECT_FORMAT_MAX_LENGTH (8) + +G_END_DECLS + +#endif /* __G_VALUE_COLLECTOR_H__ */ diff --git a/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gvaluetypes.h b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gvaluetypes.h new file mode 100644 index 0000000..0c8d0f6 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/glib-2.0/gobject/gvaluetypes.h @@ -0,0 +1,318 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * Copyright (C) 1997-1999, 2000-2001 Tim Janik and Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see . + * + * gvaluetypes.h: GLib default values + */ +#ifndef __G_VALUETYPES_H__ +#define __G_VALUETYPES_H__ + +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +/* --- type macros --- */ +/** + * G_VALUE_HOLDS_CHAR: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_CHAR. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_CHAR(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_CHAR)) +/** + * G_VALUE_HOLDS_UCHAR: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_UCHAR. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_UCHAR(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UCHAR)) +/** + * G_VALUE_HOLDS_BOOLEAN: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_BOOLEAN. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_BOOLEAN(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOOLEAN)) +/** + * G_VALUE_HOLDS_INT: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_INT. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_INT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT)) +/** + * G_VALUE_HOLDS_UINT: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_UINT. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_UINT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT)) +/** + * G_VALUE_HOLDS_LONG: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_LONG. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_LONG(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_LONG)) +/** + * G_VALUE_HOLDS_ULONG: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_ULONG. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_ULONG(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_ULONG)) +/** + * G_VALUE_HOLDS_INT64: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_INT64. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_INT64(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT64)) +/** + * G_VALUE_HOLDS_UINT64: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_UINT64. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_UINT64(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT64)) +/** + * G_VALUE_HOLDS_FLOAT: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_FLOAT. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_FLOAT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLOAT)) +/** + * G_VALUE_HOLDS_DOUBLE: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_DOUBLE. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_DOUBLE(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_DOUBLE)) +/** + * G_VALUE_HOLDS_STRING: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_STRING. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_STRING(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_STRING)) +/** + * G_VALUE_IS_INTERNED_STRING: + * @value: a valid #GValue structure + * + * Checks whether @value contains a string which is canonical. + * + * Returns: %TRUE if the value contains a string in its canonical + * representation, as returned by g_intern_string(). See also + * g_value_set_interned_string(). + * + * Since: 2.66 + */ +#define G_VALUE_IS_INTERNED_STRING(value) (G_VALUE_HOLDS_STRING (value) && ((value)->data[1].v_uint & G_VALUE_INTERNED_STRING)) GOBJECT_AVAILABLE_MACRO_IN_2_66 +/** + * G_VALUE_HOLDS_POINTER: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_POINTER. + * + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_POINTER(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_POINTER)) +/** + * G_TYPE_GTYPE: + * + * The type for #GType. + */ +#define G_TYPE_GTYPE (g_gtype_get_type()) +/** + * G_VALUE_HOLDS_GTYPE: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_GTYPE. + * + * Since: 2.12 + * Returns: %TRUE on success. + */ +#define G_VALUE_HOLDS_GTYPE(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_GTYPE)) +/** + * G_VALUE_HOLDS_VARIANT: + * @value: a valid #GValue structure + * + * Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT. + * + * Returns: %TRUE on success. + * + * Since: 2.26 + */ +#define G_VALUE_HOLDS_VARIANT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_VARIANT)) + + +/* --- prototypes --- */ +GOBJECT_DEPRECATED_IN_2_32_FOR(g_value_set_schar) +void g_value_set_char (GValue *value, + gchar v_char); +GOBJECT_DEPRECATED_IN_2_32_FOR(g_value_get_schar) +gchar g_value_get_char (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_schar (GValue *value, + gint8 v_char); +GOBJECT_AVAILABLE_IN_ALL +gint8 g_value_get_schar (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_uchar (GValue *value, + guchar v_uchar); +GOBJECT_AVAILABLE_IN_ALL +guchar g_value_get_uchar (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_boolean (GValue *value, + gboolean v_boolean); +GOBJECT_AVAILABLE_IN_ALL +gboolean g_value_get_boolean (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_int (GValue *value, + gint v_int); +GOBJECT_AVAILABLE_IN_ALL +gint g_value_get_int (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_uint (GValue *value, + guint v_uint); +GOBJECT_AVAILABLE_IN_ALL +guint g_value_get_uint (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_long (GValue *value, + glong v_long); +GOBJECT_AVAILABLE_IN_ALL +glong g_value_get_long (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_ulong (GValue *value, + gulong v_ulong); +GOBJECT_AVAILABLE_IN_ALL +gulong g_value_get_ulong (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_int64 (GValue *value, + gint64 v_int64); +GOBJECT_AVAILABLE_IN_ALL +gint64 g_value_get_int64 (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_uint64 (GValue *value, + guint64 v_uint64); +GOBJECT_AVAILABLE_IN_ALL +guint64 g_value_get_uint64 (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_float (GValue *value, + gfloat v_float); +GOBJECT_AVAILABLE_IN_ALL +gfloat g_value_get_float (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_double (GValue *value, + gdouble v_double); +GOBJECT_AVAILABLE_IN_ALL +gdouble g_value_get_double (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_string (GValue *value, + const gchar *v_string); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_static_string (GValue *value, + const gchar *v_string); +GOBJECT_AVAILABLE_IN_2_66 +void g_value_set_interned_string (GValue *value, + const gchar *v_string); +GOBJECT_AVAILABLE_IN_ALL +const gchar * g_value_get_string (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +gchar* g_value_dup_string (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_pointer (GValue *value, + gpointer v_pointer); +GOBJECT_AVAILABLE_IN_ALL +gpointer g_value_get_pointer (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +GType g_gtype_get_type (void); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_gtype (GValue *value, + GType v_gtype); +GOBJECT_AVAILABLE_IN_ALL +GType g_value_get_gtype (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +void g_value_set_variant (GValue *value, + GVariant *variant); +GOBJECT_AVAILABLE_IN_ALL +void g_value_take_variant (GValue *value, + GVariant *variant); +GOBJECT_AVAILABLE_IN_ALL +GVariant* g_value_get_variant (const GValue *value); +GOBJECT_AVAILABLE_IN_ALL +GVariant* g_value_dup_variant (const GValue *value); + + +/* Convenience for registering new pointer types */ +GOBJECT_AVAILABLE_IN_ALL +GType g_pointer_type_register_static (const gchar *name); + +/* debugging aid, describe value contents as string */ +GOBJECT_AVAILABLE_IN_ALL +gchar* g_strdup_value_contents (const GValue *value); + + +GOBJECT_AVAILABLE_IN_ALL +void g_value_take_string (GValue *value, + gchar *v_string); +GOBJECT_DEPRECATED_FOR(g_value_take_string) +void g_value_set_string_take_ownership (GValue *value, + gchar *v_string); + + +/* humpf, need a C representable type name for G_TYPE_STRING */ +/** + * gchararray: + * + * A C representable type name for %G_TYPE_STRING. + */ +typedef gchar* gchararray; + + +G_END_DECLS + +#endif /* __G_VALUETYPES_H__ */ diff --git a/vcpkg/installed/x64-osx/include/jconfig.h b/vcpkg/installed/x64-osx/include/jconfig.h new file mode 100644 index 0000000..bf91a47 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/jconfig.h @@ -0,0 +1,60 @@ +/* Version ID for the JPEG library. + * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60". + */ +#define JPEG_LIB_VERSION 62 + +/* libjpeg-turbo version */ +#define LIBJPEG_TURBO_VERSION 3.0.3 + +/* libjpeg-turbo version in integer form */ +#define LIBJPEG_TURBO_VERSION_NUMBER 3000003 + +/* Support arithmetic encoding when using 8-bit samples */ +#define C_ARITH_CODING_SUPPORTED 1 + +/* Support arithmetic decoding when using 8-bit samples */ +#define D_ARITH_CODING_SUPPORTED 1 + +/* Support in-memory source/destination managers */ +#define MEM_SRCDST_SUPPORTED 1 + +/* Use accelerated SIMD routines when using 8-bit samples */ +#define WITH_SIMD 1 + +/* This version of libjpeg-turbo supports run-time selection of data precision, + * so BITS_IN_JSAMPLE is no longer used to specify the data precision at build + * time. However, some downstream software expects the macro to be defined. + * Since 12-bit data precision is an opt-in feature that requires explicitly + * calling 12-bit-specific libjpeg API functions and using 12-bit-specific data + * types, the unmodified portion of the libjpeg API still behaves as if it were + * built for 8-bit precision, and JSAMPLE is still literally an 8-bit data + * type. Thus, it is correct to define BITS_IN_JSAMPLE to 8 here. + */ +#ifndef BITS_IN_JSAMPLE +#define BITS_IN_JSAMPLE 8 +#endif + +#ifdef _WIN32 + +#undef RIGHT_SHIFT_IS_UNSIGNED + +/* Define "boolean" as unsigned char, not int, per Windows custom */ +#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ +typedef unsigned char boolean; +#endif +#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ + +/* Define "INT32" as int, not long, per Windows custom */ +#if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */ +typedef short INT16; +typedef signed int INT32; +#endif +#define XMD_H /* prevent jmorecfg.h from redefining it */ + +#else + +/* Define if your (broken) compiler shifts signed values as if they were + unsigned. */ +/* #undef RIGHT_SHIFT_IS_UNSIGNED */ + +#endif diff --git a/vcpkg/installed/x64-osx/include/jerror.h b/vcpkg/installed/x64-osx/include/jerror.h new file mode 100644 index 0000000..71ba03e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/jerror.h @@ -0,0 +1,336 @@ +/* + * jerror.h + * + * This file was part of the Independent JPEG Group's software: + * Copyright (C) 1994-1997, Thomas G. Lane. + * Modified 1997-2009 by Guido Vollbeding. + * Lossless JPEG Modifications: + * Copyright (C) 1999, Ken Murchison. + * libjpeg-turbo Modifications: + * Copyright (C) 2014, 2017, 2021-2023, D. R. Commander. + * For conditions of distribution and use, see the accompanying README.ijg + * file. + * + * This file defines the error and message codes for the JPEG library. + * Edit this file to add new codes, or to translate the message strings to + * some other language. + * A set of error-reporting macros are defined too. Some applications using + * the JPEG library may wish to include this file to get the error codes + * and/or the macros. + */ + +/* + * To define the enum list of message codes, include this file without + * defining macro JMESSAGE. To create a message string table, include it + * again with a suitable JMESSAGE definition (see jerror.c for an example). + */ +#ifndef JMESSAGE +#ifndef JERROR_H +/* First time through, define the enum list */ +#define JMAKE_ENUM_LIST +#else +/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ +#define JMESSAGE(code, string) +#endif /* JERROR_H */ +#endif /* JMESSAGE */ + +#ifdef JMAKE_ENUM_LIST + +typedef enum { + +#define JMESSAGE(code, string) code, + +#endif /* JMAKE_ENUM_LIST */ + +JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ + +/* For maintenance convenience, list is alphabetical by message code name */ +#if JPEG_LIB_VERSION < 70 +JMESSAGE(JERR_ARITH_NOTIMPL, "Sorry, arithmetic coding is not implemented") +#endif +JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") +JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") +JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") +JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") +#if JPEG_LIB_VERSION >= 70 +JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") +#endif +JMESSAGE(JERR_BAD_DCT_COEF, + "DCT coefficient (lossy) or spatial difference (lossless) out of range") +JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported") +#if JPEG_LIB_VERSION >= 70 +JMESSAGE(JERR_BAD_DROP_SAMPLING, + "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c") +#endif +JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") +JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") +JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") +JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") +JMESSAGE(JERR_BAD_LIB_VERSION, + "Wrong JPEG library version: library is %d, caller expects %d") +JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") +JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") +JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") +JMESSAGE(JERR_BAD_PROGRESSION, + "Invalid progressive/lossless parameters Ss=%d Se=%d Ah=%d Al=%d") +JMESSAGE(JERR_BAD_PROG_SCRIPT, + "Invalid progressive/lossless parameters at scan script entry %d") +JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") +JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") +JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") +JMESSAGE(JERR_BAD_STRUCT_SIZE, + "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u") +JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") +JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") +JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") +JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") +JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") +JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") +JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") +JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") +JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") +JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") +JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") +JMESSAGE(JERR_EMS_READ, "Read from EMS failed") +JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") +JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") +JMESSAGE(JERR_FILE_READ, "Input file read error") +JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") +JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") +JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow") +JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") +JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") +JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") +JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") +JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, + "Cannot transcode due to multiple use of quantization table %d") +JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") +JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") +JMESSAGE(JERR_NOTIMPL, "Requested features are incompatible") +JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") +#if JPEG_LIB_VERSION >= 70 +JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") +#endif +JMESSAGE(JERR_NO_BACKING_STORE, "Memory limit exceeded") +JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") +JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") +JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") +JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") +JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") +JMESSAGE(JERR_QUANT_COMPONENTS, + "Cannot quantize more than %d color components") +JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") +JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") +JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") +JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") +JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") +JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") +JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF") +JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") +JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") +JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") +JMESSAGE(JERR_TFILE_WRITE, + "Write failed on temporary file --- out of disk space?") +JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") +JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") +JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") +JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") +JMESSAGE(JERR_XMS_READ, "Read from XMS failed") +JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") +JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT_SHORT) +JMESSAGE(JMSG_VERSION, JVERSION) +JMESSAGE(JTRC_16BIT_TABLES, + "Caution: quantization tables are too coarse for baseline JPEG") +JMESSAGE(JTRC_ADOBE, + "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") +JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") +JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") +JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") +JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") +JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") +JMESSAGE(JTRC_DRI, "Define Restart Interval %u") +JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") +JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") +JMESSAGE(JTRC_EOI, "End Of Image") +JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") +JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") +JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, + "Warning: thumbnail image size does not match data length %u") +JMESSAGE(JTRC_JFIF_EXTENSION, "JFIF extension marker: type 0x%02x, length %u") +JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") +JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") +JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") +JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") +JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") +JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") +JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") +JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") +JMESSAGE(JTRC_RST, "RST%d") +JMESSAGE(JTRC_SMOOTH_NOTIMPL, + "Smoothing not supported with nonstandard sampling ratios") +JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") +JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") +JMESSAGE(JTRC_SOI, "Start of Image") +JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") +JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") +JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") +JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") +JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") +JMESSAGE(JTRC_THUMB_JPEG, + "JFIF extension marker: JPEG-compressed thumbnail image, length %u") +JMESSAGE(JTRC_THUMB_PALETTE, + "JFIF extension marker: palette thumbnail image, length %u") +JMESSAGE(JTRC_THUMB_RGB, + "JFIF extension marker: RGB thumbnail image, length %u") +JMESSAGE(JTRC_UNKNOWN_IDS, + "Unrecognized component IDs %d %d %d, assuming YCbCr (lossy) or RGB (lossless)") +JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") +JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") +JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") +#if JPEG_LIB_VERSION >= 70 +JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") +#endif +JMESSAGE(JWRN_BOGUS_PROGRESSION, + "Inconsistent progression sequence for component %d coefficient %d") +JMESSAGE(JWRN_EXTRANEOUS_DATA, + "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") +JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") +JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") +JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") +JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") +JMESSAGE(JWRN_MUST_RESYNC, + "Corrupt JPEG data: found marker 0x%02x instead of RST%d") +JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") +JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") +#if JPEG_LIB_VERSION < 70 +JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") +#if defined(C_ARITH_CODING_SUPPORTED) || defined(D_ARITH_CODING_SUPPORTED) +JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") +JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") +#endif +#endif +JMESSAGE(JWRN_BOGUS_ICC, "Corrupt JPEG data: bad ICC marker") +#if JPEG_LIB_VERSION < 70 +JMESSAGE(JERR_BAD_DROP_SAMPLING, + "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c") +#endif +JMESSAGE(JERR_BAD_RESTART, + "Invalid restart interval %d; must be an integer multiple of the number of MCUs in an MCU row (%d)") + +#ifdef JMAKE_ENUM_LIST + + JMSG_LASTMSGCODE +} J_MESSAGE_CODE; + +#undef JMAKE_ENUM_LIST +#endif /* JMAKE_ENUM_LIST */ + +/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ +#undef JMESSAGE + + +#ifndef JERROR_H +#define JERROR_H + +/* Macros to simplify using the error and trace message stuff */ +/* The first parameter is either type of cinfo pointer */ + +/* Fatal errors (print message and exit) */ +#define ERREXIT(cinfo, code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) +#define ERREXIT1(cinfo, code, p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) +#define ERREXIT2(cinfo, code, p1, p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) +#define ERREXIT3(cinfo, code, p1, p2, p3) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) +#define ERREXIT4(cinfo, code, p1, p2, p3, p4) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (cinfo)->err->msg_parm.i[3] = (p4), \ + (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) +#define ERREXIT6(cinfo, code, p1, p2, p3, p4, p5, p6) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (cinfo)->err->msg_parm.i[3] = (p4), \ + (cinfo)->err->msg_parm.i[4] = (p5), \ + (cinfo)->err->msg_parm.i[5] = (p6), \ + (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) +#define ERREXITS(cinfo, code, str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (cinfo)->err->msg_parm.s[JMSG_STR_PARM_MAX - 1] = '\0', \ + (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) + +#define MAKESTMT(stuff) do { stuff } while (0) + +/* Nonfatal errors (we can keep going, but the data is probably corrupt) */ +#define WARNMS(cinfo, code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), -1)) +#define WARNMS1(cinfo, code, p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), -1)) +#define WARNMS2(cinfo, code, p1, p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), -1)) + +/* Informational/debugging messages */ +#define TRACEMS(cinfo, lvl, code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl))) +#define TRACEMS1(cinfo, lvl, code, p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl))) +#define TRACEMS2(cinfo, lvl, code, p1, p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl))) +#define TRACEMS3(cinfo, lvl, code, p1, p2, p3) \ + MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); ) +#define TRACEMS4(cinfo, lvl, code, p1, p2, p3, p4) \ + MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); ) +#define TRACEMS5(cinfo, lvl, code, p1, p2, p3, p4, p5) \ + MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); ) +#define TRACEMS8(cinfo, lvl, code, p1, p2, p3, p4, p5, p6, p7, p8) \ + MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); ) +#define TRACEMSS(cinfo, lvl, code, str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (cinfo)->err->msg_parm.s[JMSG_STR_PARM_MAX - 1] = '\0', \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl))) + +#endif /* JERROR_H */ diff --git a/vcpkg/installed/x64-osx/include/jmorecfg.h b/vcpkg/installed/x64-osx/include/jmorecfg.h new file mode 100644 index 0000000..89c7842 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/jmorecfg.h @@ -0,0 +1,385 @@ +/* + * jmorecfg.h + * + * This file was part of the Independent JPEG Group's software: + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 1997-2009 by Guido Vollbeding. + * Lossless JPEG Modifications: + * Copyright (C) 1999, Ken Murchison. + * libjpeg-turbo Modifications: + * Copyright (C) 2009, 2011, 2014-2015, 2018, 2020, 2022, D. R. Commander. + * For conditions of distribution and use, see the accompanying README.ijg + * file. + * + * This file contains additional configuration options that customize the + * JPEG software for special applications or support machine-dependent + * optimizations. Most users will not need to touch this file. + */ + + +/* + * Maximum number of components (color channels) allowed in JPEG image. + * To meet the letter of Rec. ITU-T T.81 | ISO/IEC 10918-1, set this to 255. + * However, darn few applications need more than 4 channels (maybe 5 for CMYK + + * alpha mask). We recommend 10 as a reasonable compromise; use 4 if you are + * really short on memory. (Each allowed component costs a hundred or so + * bytes of storage, whether actually used in an image or not.) + */ + +#define MAX_COMPONENTS 10 /* maximum number of image components */ + + +/* + * Basic data types. + * You may need to change these if you have a machine with unusual data + * type sizes; for example, "char" not 8 bits, "short" not 16 bits, + * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, + * but it had better be at least 16. + */ + +/* Representation of a single sample (pixel element value). + * We frequently allocate large arrays of these, so it's important to keep + * them small. But if you have memory to burn and access to char or short + * arrays is very slow on your hardware, you might want to change these. + */ + +/* JSAMPLE should be the smallest type that will hold the values 0..255. */ + +typedef unsigned char JSAMPLE; +#define GETJSAMPLE(value) ((int)(value)) + +#define MAXJSAMPLE 255 +#define CENTERJSAMPLE 128 + + +/* J12SAMPLE should be the smallest type that will hold the values 0..4095. */ + +typedef short J12SAMPLE; + +#define MAXJ12SAMPLE 4095 +#define CENTERJ12SAMPLE 2048 + + +/* J16SAMPLE should be the smallest type that will hold the values 0..65535. */ + +typedef unsigned short J16SAMPLE; + +#define MAXJ16SAMPLE 65535 +#define CENTERJ16SAMPLE 32768 + + +/* Representation of a DCT frequency coefficient. + * This should be a signed value of at least 16 bits; "short" is usually OK. + * Again, we allocate large arrays of these, but you can change to int + * if you have memory to burn and "short" is really slow. + */ + +typedef short JCOEF; + + +/* Compressed datastreams are represented as arrays of JOCTET. + * These must be EXACTLY 8 bits wide, at least once they are written to + * external storage. Note that when using the stdio data source/destination + * managers, this is also the data type passed to fread/fwrite. + */ + +typedef unsigned char JOCTET; +#define GETJOCTET(value) (value) + + +/* These typedefs are used for various table entries and so forth. + * They must be at least as wide as specified; but making them too big + * won't cost a huge amount of memory, so we don't provide special + * extraction code like we did for JSAMPLE. (In other words, these + * typedefs live at a different point on the speed/space tradeoff curve.) + */ + +/* UINT8 must hold at least the values 0..255. */ + +typedef unsigned char UINT8; + +/* UINT16 must hold at least the values 0..65535. */ + +typedef unsigned short UINT16; + +/* INT16 must hold at least the values -32768..32767. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ +typedef short INT16; +#endif + +/* INT32 must hold at least signed 32-bit values. + * + * NOTE: The INT32 typedef dates back to libjpeg v5 (1994.) Integers were + * sometimes 16-bit back then (MS-DOS), which is why INT32 is typedef'd to + * long. It also wasn't common (or at least as common) in 1994 for INT32 to be + * defined by platform headers. Since then, however, INT32 is defined in + * several other common places: + * + * Xmd.h (X11 header) typedefs INT32 to int on 64-bit platforms and long on + * 32-bit platforms (i.e always a 32-bit signed type.) + * + * basetsd.h (Win32 header) typedefs INT32 to int (always a 32-bit signed type + * on modern platforms.) + * + * qglobal.h (Qt header) typedefs INT32 to int (always a 32-bit signed type on + * modern platforms.) + * + * This is a recipe for conflict, since "long" and "int" aren't always + * compatible types. Since the definition of INT32 has technically been part + * of the libjpeg API for more than 20 years, we can't remove it, but we do not + * use it internally any longer. We instead define a separate type (JLONG) + * for internal use, which ensures that internal behavior will always be the + * same regardless of any external headers that may be included. + */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ +#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ +#ifndef _BASETSD_H /* MinGW is slightly different */ +#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ +typedef long INT32; +#endif +#endif +#endif +#endif + +/* Datatype used for image dimensions. The JPEG standard only supports + * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore + * "unsigned int" is sufficient on all machines. However, if you need to + * handle larger images and you don't mind deviating from the spec, you + * can change this datatype. (Note that changing this datatype will + * potentially require modifying the SIMD code. The x86-64 SIMD extensions, + * in particular, assume a 32-bit JDIMENSION.) + */ + +typedef unsigned int JDIMENSION; + +#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ + + +/* These macros are used in all function definitions and extern declarations. + * You could modify them if you need to change function linkage conventions; + * in particular, you'll need to do that to make the library a Windows DLL. + * Another application is to make all functions global for use with debuggers + * or code profilers that require it. + */ + +/* a function called through method pointers: */ +#define METHODDEF(type) static type +/* a function used only in its module: */ +#define LOCAL(type) static type +/* a function referenced thru EXTERNs: */ +#define GLOBAL(type) type +/* a reference to a GLOBAL function: */ +#define EXTERN(type) extern type + + +/* Originally, this macro was used as a way of defining function prototypes + * for both modern compilers as well as older compilers that did not support + * prototype parameters. libjpeg-turbo has never supported these older, + * non-ANSI compilers, but the macro is still included because there is some + * software out there that uses it. + */ + +#define JMETHOD(type, methodname, arglist) type (*methodname) arglist + + +/* libjpeg-turbo no longer supports platforms that have far symbols (MS-DOS), + * but again, some software relies on this macro. + */ + +#undef FAR +#define FAR + + +/* + * On a few systems, type boolean and/or its values FALSE, TRUE may appear + * in standard header files. Or you may have conflicts with application- + * specific header files that you want to include together with these files. + * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. + */ + +#ifndef HAVE_BOOLEAN +typedef int boolean; +#endif +#ifndef FALSE /* in case these macros already exist */ +#define FALSE 0 /* values of boolean */ +#endif +#ifndef TRUE +#define TRUE 1 +#endif + + +/* + * The remaining options affect code selection within the JPEG library, + * but they don't need to be visible to most applications using the library. + * To minimize application namespace pollution, the symbols won't be + * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. + */ + +#ifdef JPEG_INTERNALS +#define JPEG_INTERNAL_OPTIONS +#endif + +#ifdef JPEG_INTERNAL_OPTIONS + + +/* + * These defines indicate whether to include various optional functions. + * Undefining some of these symbols will produce a smaller but less capable + * library. Note that you can leave certain source files out of the + * compilation/linking process if you've #undef'd the corresponding symbols. + * (You may HAVE to do that if your compiler doesn't like null source files.) + */ + +/* Capability options common to encoder and decoder: */ + +#define DCT_ISLOW_SUPPORTED /* accurate integer method */ +#define DCT_IFAST_SUPPORTED /* less accurate int method [legacy feature] */ +#define DCT_FLOAT_SUPPORTED /* floating-point method [legacy feature] */ + +/* Encoder capability options: */ + +#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define C_LOSSLESS_SUPPORTED /* Lossless JPEG? */ +#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ +/* Note: if you selected 12-bit data precision, it is dangerous to turn off + * ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit + * precision, so jchuff.c normally uses entropy optimization to compute + * usable tables for higher precision. If you don't want to do optimization, + * you'll have to supply different default Huffman tables. + * The exact same statements apply for progressive and lossless JPEG: + * the default tables don't work for progressive mode or lossless mode. + * (This may get fixed, however.) + */ +#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ + +/* Decoder capability options: */ + +#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define D_LOSSLESS_SUPPORTED /* Lossless JPEG? */ +#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ +#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ +#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */ +#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ +#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ +#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ +#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ + +/* more capability options later, no doubt */ + + +/* + * The RGB_RED, RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE macros are a vestigial + * feature of libjpeg. The idea was that, if an application developer needed + * to compress from/decompress to a BGR/BGRX/RGBX/XBGR/XRGB buffer, they could + * change these macros, rebuild libjpeg, and link their application statically + * with it. In reality, few people ever did this, because there were some + * severe restrictions involved (cjpeg and djpeg no longer worked properly, + * compressing/decompressing RGB JPEGs no longer worked properly, and the color + * quantizer wouldn't work with pixel sizes other than 3.) Furthermore, since + * all of the O/S-supplied versions of libjpeg were built with the default + * values of RGB_RED, RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE, many applications + * have come to regard these values as immutable. + * + * The libjpeg-turbo colorspace extensions provide a much cleaner way of + * compressing from/decompressing to buffers with arbitrary component orders + * and pixel sizes. Thus, we do not support changing the values of RGB_RED, + * RGB_GREEN, RGB_BLUE, or RGB_PIXELSIZE. In addition to the restrictions + * listed above, changing these values will also break the SIMD extensions and + * the regression tests. + */ + +#define RGB_RED 0 /* Offset of Red in an RGB scanline element */ +#define RGB_GREEN 1 /* Offset of Green */ +#define RGB_BLUE 2 /* Offset of Blue */ +#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ + +#define JPEG_NUMCS 17 + +#define EXT_RGB_RED 0 +#define EXT_RGB_GREEN 1 +#define EXT_RGB_BLUE 2 +#define EXT_RGB_PIXELSIZE 3 + +#define EXT_RGBX_RED 0 +#define EXT_RGBX_GREEN 1 +#define EXT_RGBX_BLUE 2 +#define EXT_RGBX_PIXELSIZE 4 + +#define EXT_BGR_RED 2 +#define EXT_BGR_GREEN 1 +#define EXT_BGR_BLUE 0 +#define EXT_BGR_PIXELSIZE 3 + +#define EXT_BGRX_RED 2 +#define EXT_BGRX_GREEN 1 +#define EXT_BGRX_BLUE 0 +#define EXT_BGRX_PIXELSIZE 4 + +#define EXT_XBGR_RED 3 +#define EXT_XBGR_GREEN 2 +#define EXT_XBGR_BLUE 1 +#define EXT_XBGR_PIXELSIZE 4 + +#define EXT_XRGB_RED 1 +#define EXT_XRGB_GREEN 2 +#define EXT_XRGB_BLUE 3 +#define EXT_XRGB_PIXELSIZE 4 + +static const int rgb_red[JPEG_NUMCS] = { + -1, -1, RGB_RED, -1, -1, -1, EXT_RGB_RED, EXT_RGBX_RED, + EXT_BGR_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED, + EXT_RGBX_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED, + -1 +}; + +static const int rgb_green[JPEG_NUMCS] = { + -1, -1, RGB_GREEN, -1, -1, -1, EXT_RGB_GREEN, EXT_RGBX_GREEN, + EXT_BGR_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN, + EXT_RGBX_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN, + -1 +}; + +static const int rgb_blue[JPEG_NUMCS] = { + -1, -1, RGB_BLUE, -1, -1, -1, EXT_RGB_BLUE, EXT_RGBX_BLUE, + EXT_BGR_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE, + EXT_RGBX_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE, + -1 +}; + +static const int rgb_pixelsize[JPEG_NUMCS] = { + -1, -1, RGB_PIXELSIZE, -1, -1, -1, EXT_RGB_PIXELSIZE, EXT_RGBX_PIXELSIZE, + EXT_BGR_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE, + EXT_RGBX_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE, + -1 +}; + +/* Definitions for speed-related optimizations. */ + +/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying + * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER + * as short on such a machine. MULTIPLIER must be at least 16 bits wide. + */ + +#ifndef MULTIPLIER +#ifndef WITH_SIMD +#define MULTIPLIER int /* type for fastest integer multiply */ +#else +#define MULTIPLIER short /* prefer 16-bit with SIMD for parellelism */ +#endif +#endif + + +/* FAST_FLOAT should be either float or double, whichever is done faster + * by your compiler. (Note that this type is only used in the floating point + * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) + */ + +#ifndef FAST_FLOAT +#define FAST_FLOAT float +#endif + +#endif /* JPEG_INTERNAL_OPTIONS */ diff --git a/vcpkg/installed/x64-osx/include/jpeglib.h b/vcpkg/installed/x64-osx/include/jpeglib.h new file mode 100644 index 0000000..a59e98c --- /dev/null +++ b/vcpkg/installed/x64-osx/include/jpeglib.h @@ -0,0 +1,1209 @@ +/* + * jpeglib.h + * + * This file was part of the Independent JPEG Group's software: + * Copyright (C) 1991-1998, Thomas G. Lane. + * Modified 2002-2009 by Guido Vollbeding. + * Lossless JPEG Modifications: + * Copyright (C) 1999, Ken Murchison. + * libjpeg-turbo Modifications: + * Copyright (C) 2009-2011, 2013-2014, 2016-2017, 2020, 2022-2023, + D. R. Commander. + * Copyright (C) 2015, Google, Inc. + * For conditions of distribution and use, see the accompanying README.ijg + * file. + * + * This file defines the application interface for the JPEG library. + * Most applications using the library need only include this file, + * and perhaps jerror.h if they want to know the exact error codes. + */ + +#ifndef JPEGLIB_H +#define JPEGLIB_H + +/* + * First we include the configuration files that record how this + * installation of the JPEG library is set up. jconfig.h can be + * generated automatically for many systems. jmorecfg.h contains + * manual configuration options that most people need not worry about. + */ + +#ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */ +#include "jconfig.h" /* widely used configuration options */ +#endif +#include "jmorecfg.h" /* seldom changed options */ + + +#ifdef __cplusplus +#ifndef DONT_USE_EXTERN_C +extern "C" { +#endif +#endif + + +/* Various constants determining the sizes of things. + * All of these are specified by the JPEG standard, so don't change them + * if you want to be compatible. + */ + +/* NOTE: In lossless mode, an MCU contains one or more samples rather than one + * or more 8x8 DCT blocks, so the term "data unit" is used to generically + * describe a sample in lossless mode or an 8x8 DCT block in lossy mode. To + * preserve backward API/ABI compatibility, the field and macro names retain + * the "block" terminology. + */ + +#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ +#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ +#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ +#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */ +#define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */ +#define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */ +#define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */ +/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; + * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. + * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU + * to handle it. We even let you do this from the jconfig.h file. However, + * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe + * sometimes emits noncompliant files doesn't mean you should too. + */ +#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on data units/MCU */ +#ifndef D_MAX_BLOCKS_IN_MCU +#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on data units/MCU */ +#endif + + +/* Data structures for images (arrays of samples and of DCT coefficients). + */ + +typedef JSAMPLE *JSAMPROW; /* ptr to one image row of pixel samples. */ +typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */ +typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */ + +typedef J12SAMPLE *J12SAMPROW; /* ptr to one image row of 12-bit pixel + samples. */ +typedef J12SAMPROW *J12SAMPARRAY; /* ptr to some 12-bit sample rows (a 2-D + 12-bit sample array) */ +typedef J12SAMPARRAY *J12SAMPIMAGE; /* a 3-D 12-bit sample array: top index is + color */ + +typedef J16SAMPLE *J16SAMPROW; /* ptr to one image row of 16-bit pixel + samples. */ +typedef J16SAMPROW *J16SAMPARRAY; /* ptr to some 16-bit sample rows (a 2-D + 16-bit sample array) */ +typedef J16SAMPARRAY *J16SAMPIMAGE; /* a 3-D 16-bit sample array: top index is + color */ + +typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ +typedef JBLOCK *JBLOCKROW; /* pointer to one row of coefficient blocks */ +typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */ +typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */ + +typedef JCOEF *JCOEFPTR; /* useful in a couple of places */ + + +/* Types for JPEG compression parameters and working tables. */ + + +/* DCT coefficient quantization tables. */ + +typedef struct { + /* This array gives the coefficient quantizers in natural array order + * (not the zigzag order in which they are stored in a JPEG DQT marker). + * CAUTION: IJG versions prior to v6a kept this array in zigzag order. + */ + UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JQUANT_TBL; + + +/* Huffman coding tables. */ + +typedef struct { + /* These two fields directly represent the contents of a JPEG DHT marker */ + UINT8 bits[17]; /* bits[k] = # of symbols with codes of */ + /* length k bits; bits[0] is unused */ + UINT8 huffval[256]; /* The symbols, in order of incr code length */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JHUFF_TBL; + + +/* Basic info about one component (color channel). */ + +typedef struct { + /* These values are fixed over the whole image. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOF marker. */ + int component_id; /* identifier for this component (0..255) */ + int component_index; /* its index in SOF or cinfo->comp_info[] */ + int h_samp_factor; /* horizontal sampling factor (1..4) */ + int v_samp_factor; /* vertical sampling factor (1..4) */ + int quant_tbl_no; /* quantization table selector (0..3) */ + /* These values may vary between scans. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOS marker. */ + /* The decompressor output side may not use these variables. */ + int dc_tbl_no; /* DC entropy table selector (0..3) */ + int ac_tbl_no; /* AC entropy table selector (0..3) */ + + /* Remaining fields should be treated as private by applications. */ + + /* These values are computed during compression or decompression startup: */ + /* Component's size in data units. + * In lossy mode, any dummy blocks added to complete an MCU are not counted; + * therefore these values do not depend on whether a scan is interleaved or + * not. In lossless mode, these are always equal to the image width and + * height. + */ + JDIMENSION width_in_blocks; + JDIMENSION height_in_blocks; + /* Size of a data unit in samples. Always DCTSIZE for lossy compression. + * For lossy decompression this is the size of the output from one DCT block, + * reflecting any scaling we choose to apply during the IDCT step. + * Values from 1 to 16 are supported. Note that different components may + * receive different IDCT scalings. In lossless mode, this is always equal + * to 1. + */ +#if JPEG_LIB_VERSION >= 70 + int DCT_h_scaled_size; + int DCT_v_scaled_size; +#else + int DCT_scaled_size; +#endif + /* The downsampled dimensions are the component's actual, unpadded number + * of samples at the main buffer (preprocessing/compression interface), thus + * downsampled_width = ceil(image_width * Hi/Hmax) + * and similarly for height. For lossy decompression, IDCT scaling is + * included, so + * downsampled_width = ceil(image_width * Hi/Hmax * DCT_[h_]scaled_size/DCTSIZE) + * In lossless mode, these are always equal to the image width and height. + */ + JDIMENSION downsampled_width; /* actual width in samples */ + JDIMENSION downsampled_height; /* actual height in samples */ + /* This flag is used only for decompression. In cases where some of the + * components will be ignored (eg grayscale output from YCbCr image), + * we can skip most computations for the unused components. + */ + boolean component_needed; /* do we need the value of this component? */ + + /* These values are computed before starting a scan of the component. */ + /* The decompressor output side may not use these variables. */ + int MCU_width; /* number of data units per MCU, horizontally */ + int MCU_height; /* number of data units per MCU, vertically */ + int MCU_blocks; /* MCU_width * MCU_height */ + int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_[h_]scaled_size */ + int last_col_width; /* # of non-dummy data units across in last MCU */ + int last_row_height; /* # of non-dummy data units down in last MCU */ + + /* Saved quantization table for component; NULL if none yet saved. + * See jdinput.c comments about the need for this information. + * This field is currently used only for decompression. + */ + JQUANT_TBL *quant_table; + + /* Private per-component storage for DCT or IDCT subsystem. */ + void *dct_table; +} jpeg_component_info; + + +/* The script for encoding a multiple-scan file is an array of these: */ + +typedef struct { + int comps_in_scan; /* number of components encoded in this scan */ + int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ + int Ss, Se; /* progressive JPEG spectral selection parms + (Ss is the predictor selection value in + lossless mode) */ + int Ah, Al; /* progressive JPEG successive approx. parms + (Al is the point transform value in lossless + mode) */ +} jpeg_scan_info; + +/* The decompressor can save APPn and COM markers in a list of these: */ + +typedef struct jpeg_marker_struct *jpeg_saved_marker_ptr; + +struct jpeg_marker_struct { + jpeg_saved_marker_ptr next; /* next in list, or NULL */ + UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ + unsigned int original_length; /* # bytes of data in the file */ + unsigned int data_length; /* # bytes of data saved at data[] */ + JOCTET *data; /* the data contained in the marker */ + /* the marker length word is not counted in data_length or original_length */ +}; + +/* Known color spaces. */ + +#define JCS_EXTENSIONS 1 +#define JCS_ALPHA_EXTENSIONS 1 + +typedef enum { + JCS_UNKNOWN, /* error/unspecified */ + JCS_GRAYSCALE, /* monochrome */ + JCS_RGB, /* red/green/blue as specified by the RGB_RED, + RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE macros */ + JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */ + JCS_CMYK, /* C/M/Y/K */ + JCS_YCCK, /* Y/Cb/Cr/K */ + JCS_EXT_RGB, /* red/green/blue */ + JCS_EXT_RGBX, /* red/green/blue/x */ + JCS_EXT_BGR, /* blue/green/red */ + JCS_EXT_BGRX, /* blue/green/red/x */ + JCS_EXT_XBGR, /* x/blue/green/red */ + JCS_EXT_XRGB, /* x/red/green/blue */ + /* When out_color_space it set to JCS_EXT_RGBX, JCS_EXT_BGRX, JCS_EXT_XBGR, + or JCS_EXT_XRGB during decompression, the X byte is undefined, and in + order to ensure the best performance, libjpeg-turbo can set that byte to + whatever value it wishes. Use the following colorspace constants to + ensure that the X byte is set to 0xFF, so that it can be interpreted as an + opaque alpha channel. */ + JCS_EXT_RGBA, /* red/green/blue/alpha */ + JCS_EXT_BGRA, /* blue/green/red/alpha */ + JCS_EXT_ABGR, /* alpha/blue/green/red */ + JCS_EXT_ARGB, /* alpha/red/green/blue */ + JCS_RGB565 /* 5-bit red/6-bit green/5-bit blue + [decompression only] */ +} J_COLOR_SPACE; + +/* DCT/IDCT algorithm options. */ + +typedef enum { + JDCT_ISLOW, /* accurate integer method */ + JDCT_IFAST, /* less accurate integer method [legacy feature] */ + JDCT_FLOAT /* floating-point method [legacy feature] */ +} J_DCT_METHOD; + +#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */ +#define JDCT_DEFAULT JDCT_ISLOW +#endif +#ifndef JDCT_FASTEST /* may be overridden in jconfig.h */ +#define JDCT_FASTEST JDCT_IFAST +#endif + +/* Dithering options for decompression. */ + +typedef enum { + JDITHER_NONE, /* no dithering */ + JDITHER_ORDERED, /* simple ordered dither */ + JDITHER_FS /* Floyd-Steinberg error diffusion dither */ +} J_DITHER_MODE; + + +/* Common fields between JPEG compression and decompression master structs. */ + +#define jpeg_common_fields \ + struct jpeg_error_mgr *err; /* Error handler module */ \ + struct jpeg_memory_mgr *mem; /* Memory manager module */ \ + struct jpeg_progress_mgr *progress; /* Progress monitor, or NULL if none */ \ + void *client_data; /* Available for use by application */ \ + boolean is_decompressor; /* So common code can tell which is which */ \ + int global_state /* For checking call sequence validity */ + +/* Routines that are to be used by both halves of the library are declared + * to receive a pointer to this structure. There are no actual instances of + * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. + */ +struct jpeg_common_struct { + jpeg_common_fields; /* Fields common to both master struct types */ + /* Additional fields follow in an actual jpeg_compress_struct or + * jpeg_decompress_struct. All three structs must agree on these + * initial fields! (This would be a lot cleaner in C++.) + */ +}; + +typedef struct jpeg_common_struct *j_common_ptr; +typedef struct jpeg_compress_struct *j_compress_ptr; +typedef struct jpeg_decompress_struct *j_decompress_ptr; + + +/* Master record for a compression instance */ + +struct jpeg_compress_struct { + jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */ + + /* Destination for compressed data */ + struct jpeg_destination_mgr *dest; + + /* Description of source image --- these fields must be filled in by + * outer application before starting compression. in_color_space must + * be correct before you can even call jpeg_set_defaults(). + */ + + JDIMENSION image_width; /* input image width */ + JDIMENSION image_height; /* input image height */ + int input_components; /* # of color components in input image */ + J_COLOR_SPACE in_color_space; /* colorspace of input image */ + + double input_gamma; /* image gamma of input image */ + + /* Compression parameters --- these fields must be set before calling + * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to + * initialize everything to reasonable defaults, then changing anything + * the application specifically wants to change. That way you won't get + * burnt when new parameters are added. Also note that there are several + * helper routines to simplify changing parameters. + */ + +#if JPEG_LIB_VERSION >= 70 + unsigned int scale_num, scale_denom; /* fraction by which to scale image */ + + JDIMENSION jpeg_width; /* scaled JPEG image width */ + JDIMENSION jpeg_height; /* scaled JPEG image height */ + /* Dimensions of actual JPEG image that will be written to file, + * derived from input dimensions by scaling factors above. + * These fields are computed by jpeg_start_compress(). + * You can also use jpeg_calc_jpeg_dimensions() to determine these values + * in advance of calling jpeg_start_compress(). + */ +#endif + + int data_precision; /* bits of precision in image data */ + + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + jpeg_component_info *comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + JQUANT_TBL *quant_tbl_ptrs[NUM_QUANT_TBLS]; +#if JPEG_LIB_VERSION >= 70 + int q_scale_factor[NUM_QUANT_TBLS]; +#endif + /* ptrs to coefficient quantization tables, or NULL if not defined, + * and corresponding scale factors (percentage, initialized 100). + */ + + JHUFF_TBL *dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL *ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + int num_scans; /* # of entries in scan_info array */ + const jpeg_scan_info *scan_info; /* script for multi-scan file, or NULL */ + /* The default value of scan_info is NULL, which causes a single-scan + * sequential JPEG file to be emitted. To create a multi-scan file, + * set num_scans and scan_info to point to an array of scan definitions. + */ + + boolean raw_data_in; /* TRUE=caller supplies downsampled data */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ +#if JPEG_LIB_VERSION >= 70 + boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */ +#endif + int smoothing_factor; /* 1..100, or 0 for no input smoothing */ + J_DCT_METHOD dct_method; /* DCT algorithm selector */ + + /* The restart interval can be specified in absolute MCUs by setting + * restart_interval, or in MCU rows by setting restart_in_rows + * (in which case the correct restart_interval will be figured + * for each scan). + */ + unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */ + int restart_in_rows; /* if > 0, MCU rows per restart interval */ + + /* Parameters controlling emission of special markers. */ + + boolean write_JFIF_header; /* should a JFIF marker be written? */ + UINT8 JFIF_major_version; /* What to write for the JFIF version number */ + UINT8 JFIF_minor_version; + /* These three values are not used by the JPEG code, merely copied */ + /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */ + /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */ + /* ratio is defined by X_density/Y_density even when density_unit=0. */ + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean write_Adobe_marker; /* should an Adobe marker be written? */ + + /* State variable: index of next scanline to be written to + * jpeg_write_scanlines(). Application may use this to control its + * processing loop, e.g., "while (next_scanline < image_height)". + */ + + JDIMENSION next_scanline; /* 0 .. image_height-1 */ + + /* Remaining fields are known throughout compressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during compression startup + */ + boolean progressive_mode; /* TRUE if scan script uses progressive mode */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + +#if JPEG_LIB_VERSION >= 70 + int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ + int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ +#endif + + JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coefficient or + difference controller */ + /* The coefficient or difference controller receives data in units of MCU + * rows as defined for fully interleaved scans (whether the JPEG file is + * interleaved or not). In lossy mode, there are v_samp_factor * DCTSIZE + * sample rows of each component in an "iMCU" (interleaved MCU) row. In + * lossless mode, total_iMCU_rows is always equal to the image height. + */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info *cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of data units per MCU */ + int MCU_membership[C_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th data unit in an MCU */ + + int Ss, Se, Ah, Al; /* progressive/lossless JPEG parameters for + scan */ + +#if JPEG_LIB_VERSION >= 80 + int block_size; /* the basic DCT block size: 1..16 */ + const int *natural_order; /* natural-order position array */ + int lim_Se; /* min( Se, DCTSIZE2-1 ) */ +#endif + + /* + * Links to compression subobjects (methods and private variables of modules) + */ + struct jpeg_comp_master *master; + struct jpeg_c_main_controller *main; + struct jpeg_c_prep_controller *prep; + struct jpeg_c_coef_controller *coef; + struct jpeg_marker_writer *marker; + struct jpeg_color_converter *cconvert; + struct jpeg_downsampler *downsample; + struct jpeg_forward_dct *fdct; + struct jpeg_entropy_encoder *entropy; + jpeg_scan_info *script_space; /* workspace for jpeg_simple_progression */ + int script_space_size; +}; + + +/* Master record for a decompression instance */ + +struct jpeg_decompress_struct { + jpeg_common_fields; /* Fields shared with jpeg_compress_struct */ + + /* Source of compressed data */ + struct jpeg_source_mgr *src; + + /* Basic description of image --- filled in by jpeg_read_header(). */ + /* Application may inspect these values to decide how to process image. */ + + JDIMENSION image_width; /* nominal image width (from SOF marker) */ + JDIMENSION image_height; /* nominal image height */ + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + /* Decompression processing parameters --- these fields must be set before + * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes + * them to default values. + */ + + J_COLOR_SPACE out_color_space; /* colorspace for output */ + + unsigned int scale_num, scale_denom; /* fraction by which to scale image */ + + double output_gamma; /* image gamma wanted in output */ + + boolean buffered_image; /* TRUE=multiple output passes */ + boolean raw_data_out; /* TRUE=downsampled data wanted */ + + J_DCT_METHOD dct_method; /* IDCT algorithm selector */ + boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */ + boolean do_block_smoothing; /* TRUE=apply interblock smoothing */ + + boolean quantize_colors; /* TRUE=colormapped output wanted */ + /* the following are ignored if not quantize_colors: */ + J_DITHER_MODE dither_mode; /* type of color dithering to use */ + boolean two_pass_quantize; /* TRUE=use two-pass color quantization */ + int desired_number_of_colors; /* max # colors to use in created colormap */ + /* these are significant only in buffered-image mode: */ + boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */ + boolean enable_external_quant;/* enable future use of external colormap */ + boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */ + + /* Description of actual output image that will be returned to application. + * These fields are computed by jpeg_start_decompress(). + * You can also use jpeg_calc_output_dimensions() to determine these values + * in advance of calling jpeg_start_decompress(). + */ + + JDIMENSION output_width; /* scaled image width */ + JDIMENSION output_height; /* scaled image height */ + int out_color_components; /* # of color components in out_color_space */ + int output_components; /* # of color components returned */ + /* output_components is 1 (a colormap index) when quantizing colors; + * otherwise it equals out_color_components. + */ + int rec_outbuf_height; /* min recommended height of scanline buffer */ + /* If the buffer passed to jpeg_read_scanlines() is less than this many rows + * high, space and time will be wasted due to unnecessary data copying. + * Usually rec_outbuf_height will be 1 or 2, at most 4. + */ + + /* When quantizing colors, the output colormap is described by these fields. + * The application can supply a colormap by setting colormap non-NULL before + * calling jpeg_start_decompress; otherwise a colormap is created during + * jpeg_start_decompress or jpeg_start_output. + * The map has out_color_components rows and actual_number_of_colors columns. + */ + int actual_number_of_colors; /* number of entries in use */ + JSAMPARRAY colormap; /* The color map as a 2-D pixel array + If data_precision is 12 or 16, then this is + actually a J12SAMPARRAY or a J16SAMPARRAY, + so callers must type-cast it in order to + read/write 12-bit or 16-bit samples from/to + the array. */ + + /* State variables: these variables indicate the progress of decompression. + * The application may examine these but must not modify them. + */ + + /* Row index of next scanline to be read from jpeg_read_scanlines(). + * Application may use this to control its processing loop, e.g., + * "while (output_scanline < output_height)". + */ + JDIMENSION output_scanline; /* 0 .. output_height-1 */ + + /* Current input scan number and number of iMCU rows completed in scan. + * These indicate the progress of the decompressor input side. + */ + int input_scan_number; /* Number of SOS markers seen so far */ + JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */ + + /* The "output scan number" is the notional scan being displayed by the + * output side. The decompressor will not allow output scan/row number + * to get ahead of input scan/row, but it can fall arbitrarily far behind. + */ + int output_scan_number; /* Nominal scan number being displayed */ + JDIMENSION output_iMCU_row; /* Number of iMCU rows read */ + + /* Current progression status. coef_bits[c][i] indicates the precision + * with which component c's DCT coefficient i (in zigzag order) is known. + * It is -1 when no data has yet been received, otherwise it is the point + * transform (shift) value for the most recent scan of the coefficient + * (thus, 0 at completion of the progression). + * This pointer is NULL when reading a non-progressive file. + */ + int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */ + + /* Internal JPEG parameters --- the application usually need not look at + * these fields. Note that the decompressor output side may not use + * any parameters that can change between scans. + */ + + /* Quantization and Huffman tables are carried forward across input + * datastreams when processing abbreviated JPEG datastreams. + */ + + JQUANT_TBL *quant_tbl_ptrs[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined */ + + JHUFF_TBL *dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL *ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + /* These parameters are never carried across datastreams, since they + * are given in SOF/SOS markers or defined to be reset by SOI. + */ + + int data_precision; /* bits of precision in image data */ + + jpeg_component_info *comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + +#if JPEG_LIB_VERSION >= 80 + boolean is_baseline; /* TRUE if Baseline SOF0 encountered */ +#endif + boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */ + + /* These fields record data obtained from optional markers recognized by + * the JPEG library. + */ + boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */ + /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */ + UINT8 JFIF_major_version; /* JFIF version number */ + UINT8 JFIF_minor_version; + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */ + UINT8 Adobe_transform; /* Color transform code from Adobe marker */ + + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + + /* Aside from the specific data retained from APPn markers known to the + * library, the uninterpreted contents of any or all APPn and COM markers + * can be saved in a list for examination by the application. + */ + jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */ + + /* Remaining fields are known throughout decompressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during decompression startup + */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + +#if JPEG_LIB_VERSION >= 70 + int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ + int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ +#else + int min_DCT_scaled_size; /* smallest DCT_scaled_size of any component */ +#endif + + JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ + /* The coefficient or difference controller's input and output progress is + * measured in units of "iMCU" (interleaved MCU) rows. These are the same as + * MCU rows in fully interleaved JPEG scans, but are used whether the scan is + * interleaved or not. In lossy mode, we define an iMCU row as v_samp_factor + * DCT block rows of each component. Therefore, the IDCT output contains + * v_samp_factor*DCT_[v_]scaled_size sample rows of a component per iMCU row. + * In lossless mode, total_iMCU_rows is always equal to the image height. + */ + + JSAMPLE *sample_range_limit; /* table for fast range-limiting + If data_precision is 12 or 16, then this is + actually a J12SAMPLE pointer or a J16SAMPLE + pointer, so callers must type-cast it in + order to read 12-bit or 16-bit samples from + the array. */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + * Note that the decompressor output side must not use these fields. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info *cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of data units per MCU */ + int MCU_membership[D_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th data unit in an MCU */ + + int Ss, Se, Ah, Al; /* progressive/lossless JPEG parameters for + scan */ + +#if JPEG_LIB_VERSION >= 80 + /* These fields are derived from Se of first SOS marker. + */ + int block_size; /* the basic DCT block size: 1..16 */ + const int *natural_order; /* natural-order position array for entropy decode */ + int lim_Se; /* min( Se, DCTSIZE2-1 ) for entropy decode */ +#endif + + /* This field is shared between entropy decoder and marker parser. + * It is either zero or the code of a JPEG marker that has been + * read from the data source, but has not yet been processed. + */ + int unread_marker; + + /* + * Links to decompression subobjects (methods, private variables of modules) + */ + struct jpeg_decomp_master *master; + struct jpeg_d_main_controller *main; + struct jpeg_d_coef_controller *coef; + struct jpeg_d_post_controller *post; + struct jpeg_input_controller *inputctl; + struct jpeg_marker_reader *marker; + struct jpeg_entropy_decoder *entropy; + struct jpeg_inverse_dct *idct; + struct jpeg_upsampler *upsample; + struct jpeg_color_deconverter *cconvert; + struct jpeg_color_quantizer *cquantize; +}; + + +/* "Object" declarations for JPEG modules that may be supplied or called + * directly by the surrounding application. + * As with all objects in the JPEG library, these structs only define the + * publicly visible methods and state variables of a module. Additional + * private fields may exist after the public ones. + */ + + +/* Error handler object */ + +struct jpeg_error_mgr { + /* Error exit handler: does not return to caller */ + void (*error_exit) (j_common_ptr cinfo); + /* Conditionally emit a trace or warning message */ + void (*emit_message) (j_common_ptr cinfo, int msg_level); + /* Routine that actually outputs a trace or error message */ + void (*output_message) (j_common_ptr cinfo); + /* Format a message string for the most recent JPEG error or message */ + void (*format_message) (j_common_ptr cinfo, char *buffer); +#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */ + /* Reset error state variables at start of a new image */ + void (*reset_error_mgr) (j_common_ptr cinfo); + + /* The message ID code and any parameters are saved here. + * A message can have one string parameter or up to 8 int parameters. + */ + int msg_code; +#define JMSG_STR_PARM_MAX 80 + union { + int i[8]; + char s[JMSG_STR_PARM_MAX]; + } msg_parm; + + /* Standard state variables for error facility */ + + int trace_level; /* max msg_level that will be displayed */ + + /* For recoverable corrupt-data errors, we emit a warning message, + * but keep going unless emit_message chooses to abort. emit_message + * should count warnings in num_warnings. The surrounding application + * can check for bad data by seeing if num_warnings is nonzero at the + * end of processing. + */ + long num_warnings; /* number of corrupt-data warnings */ + + /* These fields point to the table(s) of error message strings. + * An application can change the table pointer to switch to a different + * message list (typically, to change the language in which errors are + * reported). Some applications may wish to add additional error codes + * that will be handled by the JPEG library error mechanism; the second + * table pointer is used for this purpose. + * + * First table includes all errors generated by JPEG library itself. + * Error code 0 is reserved for a "no such error string" message. + */ + const char * const *jpeg_message_table; /* Library errors */ + int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */ + /* Second table can be added by application (see cjpeg/djpeg for example). + * It contains strings numbered first_addon_message..last_addon_message. + */ + const char * const *addon_message_table; /* Non-library errors */ + int first_addon_message; /* code for first string in addon table */ + int last_addon_message; /* code for last string in addon table */ +}; + + +/* Progress monitor object */ + +struct jpeg_progress_mgr { + void (*progress_monitor) (j_common_ptr cinfo); + + long pass_counter; /* work units completed in this pass */ + long pass_limit; /* total number of work units in this pass */ + int completed_passes; /* passes completed so far */ + int total_passes; /* total number of passes expected */ +}; + + +/* Data destination object for compression */ + +struct jpeg_destination_mgr { + JOCTET *next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + + void (*init_destination) (j_compress_ptr cinfo); + boolean (*empty_output_buffer) (j_compress_ptr cinfo); + void (*term_destination) (j_compress_ptr cinfo); +}; + + +/* Data source object for decompression */ + +struct jpeg_source_mgr { + const JOCTET *next_input_byte; /* => next byte to read from buffer */ + size_t bytes_in_buffer; /* # of bytes remaining in buffer */ + + void (*init_source) (j_decompress_ptr cinfo); + boolean (*fill_input_buffer) (j_decompress_ptr cinfo); + void (*skip_input_data) (j_decompress_ptr cinfo, long num_bytes); + boolean (*resync_to_restart) (j_decompress_ptr cinfo, int desired); + void (*term_source) (j_decompress_ptr cinfo); +}; + + +/* Memory manager object. + * Allocates "small" objects (a few K total), "large" objects (tens of K), + * and "really big" objects (virtual arrays with backing store if needed). + * The memory manager does not allow individual objects to be freed; rather, + * each created object is assigned to a pool, and whole pools can be freed + * at once. This is faster and more convenient than remembering exactly what + * to free, especially where malloc()/free() are not too speedy. + * NB: alloc routines never return NULL. They exit to error_exit if not + * successful. + */ + +#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ +#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ +#define JPOOL_NUMPOOLS 2 + +typedef struct jvirt_sarray_control *jvirt_sarray_ptr; +typedef struct jvirt_barray_control *jvirt_barray_ptr; + + +struct jpeg_memory_mgr { + /* Method pointers */ + void *(*alloc_small) (j_common_ptr cinfo, int pool_id, size_t sizeofobject); + void *(*alloc_large) (j_common_ptr cinfo, int pool_id, + size_t sizeofobject); + /* If cinfo->data_precision is 12 or 16, then this method and the + * access_virt_sarray method actually return a J12SAMPARRAY or a + * J16SAMPARRAY, so callers must type-cast the return value in order to + * read/write 12-bit or 16-bit samples from/to the array. + */ + JSAMPARRAY (*alloc_sarray) (j_common_ptr cinfo, int pool_id, + JDIMENSION samplesperrow, JDIMENSION numrows); + JBLOCKARRAY (*alloc_barray) (j_common_ptr cinfo, int pool_id, + JDIMENSION blocksperrow, JDIMENSION numrows); + jvirt_sarray_ptr (*request_virt_sarray) (j_common_ptr cinfo, int pool_id, + boolean pre_zero, + JDIMENSION samplesperrow, + JDIMENSION numrows, + JDIMENSION maxaccess); + jvirt_barray_ptr (*request_virt_barray) (j_common_ptr cinfo, int pool_id, + boolean pre_zero, + JDIMENSION blocksperrow, + JDIMENSION numrows, + JDIMENSION maxaccess); + void (*realize_virt_arrays) (j_common_ptr cinfo); + JSAMPARRAY (*access_virt_sarray) (j_common_ptr cinfo, jvirt_sarray_ptr ptr, + JDIMENSION start_row, JDIMENSION num_rows, + boolean writable); + JBLOCKARRAY (*access_virt_barray) (j_common_ptr cinfo, jvirt_barray_ptr ptr, + JDIMENSION start_row, JDIMENSION num_rows, + boolean writable); + void (*free_pool) (j_common_ptr cinfo, int pool_id); + void (*self_destruct) (j_common_ptr cinfo); + + /* Limit on memory allocation for this JPEG object. (Note that this is + * merely advisory, not a guaranteed maximum; it only affects the space + * used for virtual-array buffers.) May be changed by outer application + * after creating the JPEG object. + */ + long max_memory_to_use; + + /* Maximum allocation request accepted by alloc_large. */ + long max_alloc_chunk; +}; + + +/* Routine signature for application-supplied marker processing methods. + * Need not pass marker code since it is stored in cinfo->unread_marker. + */ +typedef boolean (*jpeg_marker_parser_method) (j_decompress_ptr cinfo); + + +/* Originally, this macro was used as a way of defining function prototypes + * for both modern compilers as well as older compilers that did not support + * prototype parameters. libjpeg-turbo has never supported these older, + * non-ANSI compilers, but the macro is still included because there is some + * software out there that uses it. + */ + +#define JPP(arglist) arglist + + +/* Default error-management setup */ +EXTERN(struct jpeg_error_mgr *) jpeg_std_error(struct jpeg_error_mgr *err); + +/* Initialization of JPEG compression objects. + * jpeg_create_compress() and jpeg_create_decompress() are the exported + * names that applications should call. These expand to calls on + * jpeg_CreateCompress and jpeg_CreateDecompress with additional information + * passed for version mismatch checking. + * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. + */ +#define jpeg_create_compress(cinfo) \ + jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ + (size_t)sizeof(struct jpeg_compress_struct)) +#define jpeg_create_decompress(cinfo) \ + jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ + (size_t)sizeof(struct jpeg_decompress_struct)) +EXTERN(void) jpeg_CreateCompress(j_compress_ptr cinfo, int version, + size_t structsize); +EXTERN(void) jpeg_CreateDecompress(j_decompress_ptr cinfo, int version, + size_t structsize); +/* Destruction of JPEG compression objects */ +EXTERN(void) jpeg_destroy_compress(j_compress_ptr cinfo); +EXTERN(void) jpeg_destroy_decompress(j_decompress_ptr cinfo); + +/* Standard data source and destination managers: stdio streams. */ +/* Caller is responsible for opening the file before and closing after. */ +EXTERN(void) jpeg_stdio_dest(j_compress_ptr cinfo, FILE *outfile); +EXTERN(void) jpeg_stdio_src(j_decompress_ptr cinfo, FILE *infile); + +/* Data source and destination managers: memory buffers. */ +EXTERN(void) jpeg_mem_dest(j_compress_ptr cinfo, unsigned char **outbuffer, + unsigned long *outsize); +EXTERN(void) jpeg_mem_src(j_decompress_ptr cinfo, + const unsigned char *inbuffer, unsigned long insize); + +/* Default parameter setup for compression */ +EXTERN(void) jpeg_set_defaults(j_compress_ptr cinfo); +/* Compression parameter setup aids */ +EXTERN(void) jpeg_set_colorspace(j_compress_ptr cinfo, + J_COLOR_SPACE colorspace); +EXTERN(void) jpeg_default_colorspace(j_compress_ptr cinfo); +EXTERN(void) jpeg_set_quality(j_compress_ptr cinfo, int quality, + boolean force_baseline); +EXTERN(void) jpeg_set_linear_quality(j_compress_ptr cinfo, int scale_factor, + boolean force_baseline); +#if JPEG_LIB_VERSION >= 70 +EXTERN(void) jpeg_default_qtables(j_compress_ptr cinfo, + boolean force_baseline); +#endif +EXTERN(void) jpeg_add_quant_table(j_compress_ptr cinfo, int which_tbl, + const unsigned int *basic_table, + int scale_factor, boolean force_baseline); +EXTERN(int) jpeg_quality_scaling(int quality); +EXTERN(void) jpeg_enable_lossless(j_compress_ptr cinfo, + int predictor_selection_value, + int point_transform); +EXTERN(void) jpeg_simple_progression(j_compress_ptr cinfo); +EXTERN(void) jpeg_suppress_tables(j_compress_ptr cinfo, boolean suppress); +EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table(j_common_ptr cinfo); +EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table(j_common_ptr cinfo); + +/* Main entry points for compression */ +EXTERN(void) jpeg_start_compress(j_compress_ptr cinfo, + boolean write_all_tables); +EXTERN(JDIMENSION) jpeg_write_scanlines(j_compress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION num_lines); +EXTERN(JDIMENSION) jpeg12_write_scanlines(j_compress_ptr cinfo, + J12SAMPARRAY scanlines, + JDIMENSION num_lines); +EXTERN(JDIMENSION) jpeg16_write_scanlines(j_compress_ptr cinfo, + J16SAMPARRAY scanlines, + JDIMENSION num_lines); +EXTERN(void) jpeg_finish_compress(j_compress_ptr cinfo); + +#if JPEG_LIB_VERSION >= 70 +/* Precalculate JPEG dimensions for current compression parameters. */ +EXTERN(void) jpeg_calc_jpeg_dimensions(j_compress_ptr cinfo); +#endif + +/* Replaces jpeg_write_scanlines when writing raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_write_raw_data(j_compress_ptr cinfo, JSAMPIMAGE data, + JDIMENSION num_lines); +EXTERN(JDIMENSION) jpeg12_write_raw_data(j_compress_ptr cinfo, + J12SAMPIMAGE data, + JDIMENSION num_lines); + +/* Write a special marker. See libjpeg.txt concerning safe usage. */ +EXTERN(void) jpeg_write_marker(j_compress_ptr cinfo, int marker, + const JOCTET *dataptr, unsigned int datalen); +/* Same, but piecemeal. */ +EXTERN(void) jpeg_write_m_header(j_compress_ptr cinfo, int marker, + unsigned int datalen); +EXTERN(void) jpeg_write_m_byte(j_compress_ptr cinfo, int val); + +/* Alternate compression function: just write an abbreviated table file */ +EXTERN(void) jpeg_write_tables(j_compress_ptr cinfo); + +/* Write ICC profile. See libjpeg.txt for usage information. */ +EXTERN(void) jpeg_write_icc_profile(j_compress_ptr cinfo, + const JOCTET *icc_data_ptr, + unsigned int icc_data_len); + + +/* Decompression startup: read start of JPEG datastream to see what's there */ +EXTERN(int) jpeg_read_header(j_decompress_ptr cinfo, boolean require_image); +/* Return value is one of: */ +#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */ +#define JPEG_HEADER_OK 1 /* Found valid image datastream */ +#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */ +/* If you pass require_image = TRUE (normal case), you need not check for + * a TABLES_ONLY return code; an abbreviated file will cause an error exit. + * JPEG_SUSPENDED is only possible if you use a data source module that can + * give a suspension return (the stdio source module doesn't). + */ + +/* Main entry points for decompression */ +EXTERN(boolean) jpeg_start_decompress(j_decompress_ptr cinfo); +EXTERN(JDIMENSION) jpeg_read_scanlines(j_decompress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION max_lines); +EXTERN(JDIMENSION) jpeg12_read_scanlines(j_decompress_ptr cinfo, + J12SAMPARRAY scanlines, + JDIMENSION max_lines); +EXTERN(JDIMENSION) jpeg16_read_scanlines(j_decompress_ptr cinfo, + J16SAMPARRAY scanlines, + JDIMENSION max_lines); +EXTERN(JDIMENSION) jpeg_skip_scanlines(j_decompress_ptr cinfo, + JDIMENSION num_lines); +EXTERN(JDIMENSION) jpeg12_skip_scanlines(j_decompress_ptr cinfo, + JDIMENSION num_lines); +EXTERN(void) jpeg_crop_scanline(j_decompress_ptr cinfo, JDIMENSION *xoffset, + JDIMENSION *width); +EXTERN(void) jpeg12_crop_scanline(j_decompress_ptr cinfo, JDIMENSION *xoffset, + JDIMENSION *width); +EXTERN(boolean) jpeg_finish_decompress(j_decompress_ptr cinfo); + +/* Replaces jpeg_read_scanlines when reading raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_read_raw_data(j_decompress_ptr cinfo, JSAMPIMAGE data, + JDIMENSION max_lines); +EXTERN(JDIMENSION) jpeg12_read_raw_data(j_decompress_ptr cinfo, + J12SAMPIMAGE data, + JDIMENSION max_lines); + +/* Additional entry points for buffered-image mode. */ +EXTERN(boolean) jpeg_has_multiple_scans(j_decompress_ptr cinfo); +EXTERN(boolean) jpeg_start_output(j_decompress_ptr cinfo, int scan_number); +EXTERN(boolean) jpeg_finish_output(j_decompress_ptr cinfo); +EXTERN(boolean) jpeg_input_complete(j_decompress_ptr cinfo); +EXTERN(void) jpeg_new_colormap(j_decompress_ptr cinfo); +EXTERN(int) jpeg_consume_input(j_decompress_ptr cinfo); +/* Return value is one of: */ +/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */ +#define JPEG_REACHED_SOS 1 /* Reached start of new scan */ +#define JPEG_REACHED_EOI 2 /* Reached end of image */ +#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */ +#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ + +/* Precalculate output dimensions for current decompression parameters. */ +#if JPEG_LIB_VERSION >= 80 +EXTERN(void) jpeg_core_output_dimensions(j_decompress_ptr cinfo); +#endif +EXTERN(void) jpeg_calc_output_dimensions(j_decompress_ptr cinfo); + +/* Control saving of COM and APPn markers into marker_list. */ +EXTERN(void) jpeg_save_markers(j_decompress_ptr cinfo, int marker_code, + unsigned int length_limit); + +/* Install a special processing method for COM or APPn markers. */ +EXTERN(void) jpeg_set_marker_processor(j_decompress_ptr cinfo, + int marker_code, + jpeg_marker_parser_method routine); + +/* Read or write raw DCT coefficients --- useful for lossless transcoding. */ +EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients(j_decompress_ptr cinfo); +EXTERN(void) jpeg_write_coefficients(j_compress_ptr cinfo, + jvirt_barray_ptr *coef_arrays); +EXTERN(void) jpeg_copy_critical_parameters(j_decompress_ptr srcinfo, + j_compress_ptr dstinfo); + +/* If you choose to abort compression or decompression before completing + * jpeg_finish_(de)compress, then you need to clean up to release memory, + * temporary files, etc. You can just call jpeg_destroy_(de)compress + * if you're done with the JPEG object, but if you want to clean it up and + * reuse it, call this: + */ +EXTERN(void) jpeg_abort_compress(j_compress_ptr cinfo); +EXTERN(void) jpeg_abort_decompress(j_decompress_ptr cinfo); + +/* Generic versions of jpeg_abort and jpeg_destroy that work on either + * flavor of JPEG object. These may be more convenient in some places. + */ +EXTERN(void) jpeg_abort(j_common_ptr cinfo); +EXTERN(void) jpeg_destroy(j_common_ptr cinfo); + +/* Default restart-marker-resync procedure for use by data source modules */ +EXTERN(boolean) jpeg_resync_to_restart(j_decompress_ptr cinfo, int desired); + +/* Read ICC profile. See libjpeg.txt for usage information. */ +EXTERN(boolean) jpeg_read_icc_profile(j_decompress_ptr cinfo, + JOCTET **icc_data_ptr, + unsigned int *icc_data_len); + + +/* These marker codes are exported since applications and data source modules + * are likely to want to use them. + */ + +#define JPEG_RST0 0xD0 /* RST0 marker code */ +#define JPEG_EOI 0xD9 /* EOI marker code */ +#define JPEG_APP0 0xE0 /* APP0 marker code */ +#define JPEG_COM 0xFE /* COM marker code */ + + +/* If we have a brain-damaged compiler that emits warnings (or worse, errors) + * for structure definitions that are never filled in, keep it quiet by + * supplying dummy definitions for the various substructures. + */ + +#ifdef INCOMPLETE_TYPES_BROKEN +#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */ +struct jvirt_sarray_control { long dummy; }; +struct jvirt_barray_control { long dummy; }; +struct jpeg_comp_master { long dummy; }; +struct jpeg_c_main_controller { long dummy; }; +struct jpeg_c_prep_controller { long dummy; }; +struct jpeg_c_coef_controller { long dummy; }; +struct jpeg_marker_writer { long dummy; }; +struct jpeg_color_converter { long dummy; }; +struct jpeg_downsampler { long dummy; }; +struct jpeg_forward_dct { long dummy; }; +struct jpeg_entropy_encoder { long dummy; }; +struct jpeg_decomp_master { long dummy; }; +struct jpeg_d_main_controller { long dummy; }; +struct jpeg_d_coef_controller { long dummy; }; +struct jpeg_d_post_controller { long dummy; }; +struct jpeg_input_controller { long dummy; }; +struct jpeg_marker_reader { long dummy; }; +struct jpeg_entropy_decoder { long dummy; }; +struct jpeg_inverse_dct { long dummy; }; +struct jpeg_upsampler { long dummy; }; +struct jpeg_color_deconverter { long dummy; }; +struct jpeg_color_quantizer { long dummy; }; +#endif /* JPEG_INTERNALS */ +#endif /* INCOMPLETE_TYPES_BROKEN */ + + +/* + * The JPEG library modules define JPEG_INTERNALS before including this file. + * The internal structure declarations are read only when that is true. + * Applications using the library should not include jpegint.h, but may wish + * to include jerror.h. + */ + +#ifdef JPEG_INTERNALS +#include "jpegint.h" /* fetch private declarations */ +#include "jerror.h" /* fetch error codes too */ +#endif + +#ifdef __cplusplus +#ifndef DONT_USE_EXTERN_C +} +#endif +#endif + +#endif /* JPEGLIB_H */ diff --git a/vcpkg/installed/x64-osx/include/libde265/de265-version.h b/vcpkg/installed/x64-osx/include/libde265/de265-version.h new file mode 100644 index 0000000..cde205f --- /dev/null +++ b/vcpkg/installed/x64-osx/include/libde265/de265-version.h @@ -0,0 +1,36 @@ +/* + * H.265 video codec. + * Copyright (c) 2013-2014 struktur AG, Dirk Farin + * + * This file is part of libde265. + * + * libde265 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * libde265 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libde265. If not, see . + */ + +/* de265-version.h + * + * This file was generated by autoconf when libde265 was built. + * + * DO NOT EDIT THIS FILE. + */ +#ifndef LIBDE265_VERSION_H +#define LIBDE265_VERSION_H + +/* Numeric representation of the version */ +#define LIBDE265_NUMERIC_VERSION 0x01001500 + +/* Version string */ +#define LIBDE265_VERSION "1.0.15" + +#endif diff --git a/vcpkg/installed/x64-osx/include/libde265/de265.h b/vcpkg/installed/x64-osx/include/libde265/de265.h new file mode 100644 index 0000000..38ffc93 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/libde265/de265.h @@ -0,0 +1,453 @@ +/* + * H.265 video codec. + * Copyright (c) 2013-2014 struktur AG, Dirk Farin + * + * This file is part of libde265. + * + * libde265 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * libde265 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libde265. If not, see . +*/ + + +#ifndef DE265_H +#define DE265_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +//#define inline static __inline + + +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif +#include + +#if defined(_MSC_VER) && 0 + #ifdef LIBDE265_EXPORTS + #define LIBDE265_API __declspec(dllexport) + #else + #define LIBDE265_API __declspec(dllimport) + #endif +#elif HAVE_VISIBILITY + #ifdef LIBDE265_EXPORTS + #define LIBDE265_API __attribute__((__visibility__("default"))) + #else + #define LIBDE265_API + #endif +#else + #define LIBDE265_API +#endif + +#if __GNUC__ +#define LIBDE265_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) +#define LIBDE265_DEPRECATED __declspec(deprecated) +#else +#define LIBDE265_DEPRECATED +#endif + +#if defined(_MSC_VER) +#define LIBDE265_INLINE __inline +#else +#define LIBDE265_INLINE inline +#endif + +/* === version numbers === */ + +// version of linked libde265 library +LIBDE265_API const char *de265_get_version(void); + +// returns the version number as a BCD number. +// 0xAABBCCDD is interpreted as version AA.BB.CC. +// For example: 0x02143000 is version 2.14.30 +LIBDE265_API uint32_t de265_get_version_number(void); + +LIBDE265_API int de265_get_version_number_major(void); +LIBDE265_API int de265_get_version_number_minor(void); +LIBDE265_API int de265_get_version_number_maintenance(void); + + +/* === error codes === */ + +typedef enum { + DE265_OK = 0, + DE265_ERROR_NO_SUCH_FILE=1, + //DE265_ERROR_NO_STARTCODE=2, obsolet + //DE265_ERROR_EOF=3, + DE265_ERROR_COEFFICIENT_OUT_OF_IMAGE_BOUNDS=4, + DE265_ERROR_CHECKSUM_MISMATCH=5, + DE265_ERROR_CTB_OUTSIDE_IMAGE_AREA=6, + DE265_ERROR_OUT_OF_MEMORY=7, + DE265_ERROR_CODED_PARAMETER_OUT_OF_RANGE=8, + DE265_ERROR_IMAGE_BUFFER_FULL=9, + DE265_ERROR_CANNOT_START_THREADPOOL=10, + DE265_ERROR_LIBRARY_INITIALIZATION_FAILED=11, + DE265_ERROR_LIBRARY_NOT_INITIALIZED=12, + DE265_ERROR_WAITING_FOR_INPUT_DATA=13, + DE265_ERROR_CANNOT_PROCESS_SEI=14, + DE265_ERROR_PARAMETER_PARSING=15, + DE265_ERROR_NO_INITIAL_SLICE_HEADER=16, + DE265_ERROR_PREMATURE_END_OF_SLICE=17, + DE265_ERROR_UNSPECIFIED_DECODING_ERROR=18, + + // --- errors that should become obsolete in later libde265 versions --- + + //DE265_ERROR_MAX_THREAD_CONTEXTS_EXCEEDED = 500, obsolet + //DE265_ERROR_MAX_NUMBER_OF_SLICES_EXCEEDED = 501, obsolet + DE265_ERROR_NOT_IMPLEMENTED_YET = 502, + //DE265_ERROR_SCALING_LIST_NOT_IMPLEMENTED = 502, obsolet + + // --- warnings --- + + DE265_WARNING_NO_WPP_CANNOT_USE_MULTITHREADING = 1000, + DE265_WARNING_WARNING_BUFFER_FULL=1001, + DE265_WARNING_PREMATURE_END_OF_SLICE_SEGMENT=1002, + DE265_WARNING_INCORRECT_ENTRY_POINT_OFFSET=1003, + DE265_WARNING_CTB_OUTSIDE_IMAGE_AREA=1004, + DE265_WARNING_SPS_HEADER_INVALID=1005, + DE265_WARNING_PPS_HEADER_INVALID=1006, + DE265_WARNING_SLICEHEADER_INVALID=1007, + DE265_WARNING_INCORRECT_MOTION_VECTOR_SCALING=1008, + DE265_WARNING_NONEXISTING_PPS_REFERENCED=1009, + DE265_WARNING_NONEXISTING_SPS_REFERENCED=1010, + DE265_WARNING_BOTH_PREDFLAGS_ZERO=1011, + DE265_WARNING_NONEXISTING_REFERENCE_PICTURE_ACCESSED=1012, + DE265_WARNING_NUMMVP_NOT_EQUAL_TO_NUMMVQ=1013, + DE265_WARNING_NUMBER_OF_SHORT_TERM_REF_PIC_SETS_OUT_OF_RANGE=1014, + DE265_WARNING_SHORT_TERM_REF_PIC_SET_OUT_OF_RANGE=1015, + DE265_WARNING_FAULTY_REFERENCE_PICTURE_LIST=1016, + DE265_WARNING_EOSS_BIT_NOT_SET=1017, + DE265_WARNING_MAX_NUM_REF_PICS_EXCEEDED=1018, + DE265_WARNING_INVALID_CHROMA_FORMAT=1019, + DE265_WARNING_SLICE_SEGMENT_ADDRESS_INVALID=1020, + DE265_WARNING_DEPENDENT_SLICE_WITH_ADDRESS_ZERO=1021, + DE265_WARNING_NUMBER_OF_THREADS_LIMITED_TO_MAXIMUM=1022, + DE265_NON_EXISTING_LT_REFERENCE_CANDIDATE_IN_SLICE_HEADER=1023, + DE265_WARNING_CANNOT_APPLY_SAO_OUT_OF_MEMORY=1024, + DE265_WARNING_SPS_MISSING_CANNOT_DECODE_SEI=1025, + DE265_WARNING_COLLOCATED_MOTION_VECTOR_OUTSIDE_IMAGE_AREA=1026, + DE265_WARNING_PCM_BITDEPTH_TOO_LARGE=1027, + DE265_WARNING_REFERENCE_IMAGE_BIT_DEPTH_DOES_NOT_MATCH=1028, + DE265_WARNING_REFERENCE_IMAGE_SIZE_DOES_NOT_MATCH_SPS=1029, + DE265_WARNING_CHROMA_OF_CURRENT_IMAGE_DOES_NOT_MATCH_SPS=1030, + DE265_WARNING_BIT_DEPTH_OF_CURRENT_IMAGE_DOES_NOT_MATCH_SPS=1031, + DE265_WARNING_REFERENCE_IMAGE_CHROMA_FORMAT_DOES_NOT_MATCH=1032, + DE265_WARNING_INVALID_SLICE_HEADER_INDEX_ACCESS=1033 +} de265_error; + +LIBDE265_API const char* de265_get_error_text(de265_error err); + +/* Returns true, if 'err' is DE265_OK or a warning. + */ +LIBDE265_API int de265_isOK(de265_error err); + +LIBDE265_API void de265_disable_logging(); // DEPRECATED +LIBDE265_API void de265_set_verbosity(int level); + + +/* === image === */ + +/* The image is currently always 3-channel YCbCr, with 4:2:0 chroma. + But you may want to check the chroma format anyway for future compatibility. + */ + +struct de265_image; + +enum de265_chroma { + de265_chroma_mono=0, + de265_chroma_420=1, + de265_chroma_422=2, + de265_chroma_444=3 +}; + +typedef int64_t de265_PTS; + + +LIBDE265_API int de265_get_image_width(const struct de265_image*,int channel); +LIBDE265_API int de265_get_image_height(const struct de265_image*,int channel); +LIBDE265_API enum de265_chroma de265_get_chroma_format(const struct de265_image*); +LIBDE265_API int de265_get_bits_per_pixel(const struct de265_image*,int channel); +/* The |out_stride| is returned as "bytes per line" if a non-NULL parameter is given. */ +LIBDE265_API const uint8_t* de265_get_image_plane(const struct de265_image*, int channel, int* out_stride); +LIBDE265_API void* de265_get_image_plane_user_data(const struct de265_image*, int channel); +LIBDE265_API de265_PTS de265_get_image_PTS(const struct de265_image*); +LIBDE265_API void* de265_get_image_user_data(const struct de265_image*); +LIBDE265_API void de265_set_image_user_data(struct de265_image*, void *user_data); + +/* Get NAL-header information of this frame. You can pass in NULL pointers if you + do not need this piece of information. + */ +LIBDE265_API void de265_get_image_NAL_header(const struct de265_image*, + int* nal_unit_type, + const char** nal_unit_name, // textual description of 'nal_unit_type' + int* nuh_layer_id, + int* nuh_temporal_id); + +LIBDE265_API int de265_get_image_full_range_flag(const struct de265_image*); +LIBDE265_API int de265_get_image_colour_primaries(const struct de265_image*); +LIBDE265_API int de265_get_image_transfer_characteristics(const struct de265_image*); +LIBDE265_API int de265_get_image_matrix_coefficients(const struct de265_image*); + + +/* === decoder === */ + +typedef void de265_decoder_context; // private structure + + + +/* Get a new decoder context. Must be freed with de265_free_decoder(). */ +LIBDE265_API de265_decoder_context* de265_new_decoder(void); + +/* Initialize background decoding threads. If this function is not called, + all decoding is done in the main thread (no multi-threading). */ +LIBDE265_API de265_error de265_start_worker_threads(de265_decoder_context*, int number_of_threads); + +/* Free decoder context. May only be called once on a context. */ +LIBDE265_API de265_error de265_free_decoder(de265_decoder_context*); + +#ifndef LIBDE265_DISABLE_DEPRECATED +/* Push more data into the decoder, must be raw h265. + All complete images in the data will be decoded, hence, do not push + too much data at once to prevent image buffer overflows. + The end of a picture can only be detected when the succeeding start-code + is read from the data. + If you want to flush the data and force decoding of the data so far + (e.g. at the end of a file), call de265_decode_data() with 'length' zero. + + NOTE: This method is deprecated and will be removed in a future version. + You should use "de265_push_data" or "de265_push_NAL" and "de265_decode" + instead. +*/ +LIBDE265_API LIBDE265_DEPRECATED de265_error de265_decode_data(de265_decoder_context*, const void* data, int length); +#endif + +/* Push more data into the decoder, must be a raw h265 bytestream with startcodes. + The PTS is assigned to all NALs whose start-code 0x000001 is contained in the data. + The bytestream must contain all stuffing-bytes. + This function only pushes data into the decoder, nothing will be decoded. +*/ +LIBDE265_API de265_error de265_push_data(de265_decoder_context*, const void* data, int length, + de265_PTS pts, void* user_data); + +/* Indicate that de265_push_data has just received data until the end of a NAL. + The remaining pending input data is put into a NAL package and forwarded to the decoder. +*/ +LIBDE265_API void de265_push_end_of_NAL(de265_decoder_context*); + +/* Indicate that de265_push_data has just received data until the end of a frame. + All data pending at the decoder input will be pushed into the decoder and + the decoded picture is pushed to the output queue. +*/ +LIBDE265_API void de265_push_end_of_frame(de265_decoder_context*); + +/* Push a complete NAL unit without startcode into the decoder. The data must still + contain all stuffing-bytes. + This function only pushes data into the decoder, nothing will be decoded. +*/ +LIBDE265_API de265_error de265_push_NAL(de265_decoder_context*, const void* data, int length, + de265_PTS pts, void* user_data); + +/* Indicate the end-of-stream. All data pending at the decoder input will be + pushed into the decoder and the decoded picture queue will be completely emptied. + */ +LIBDE265_API de265_error de265_flush_data(de265_decoder_context*); + +/* Return number of bytes pending at the decoder input. + Can be used to avoid overflowing the decoder with too much data. + */ +LIBDE265_API int de265_get_number_of_input_bytes_pending(de265_decoder_context*); + +/* Return number of NAL units pending at the decoder input. + Can be used to avoid overflowing the decoder with too much data. + */ +LIBDE265_API int de265_get_number_of_NAL_units_pending(de265_decoder_context*); + +/* Do some decoding. Returns status whether it did perform some decoding or + why it could not do so. If 'more' is non-null, indicates whether de265_decode() + should be called again (possibly after resolving the indicated problem). + DE265_OK - decoding ok + DE265_ERROR_IMAGE_BUFFER_FULL - DPB full, extract some images before continuing + DE265_ERROR_WAITING_FOR_INPUT_DATA - insert more data before continuing + + You have to consider these cases: + - decoding successful -> err = DE265_OK, more=true + - decoding stalled -> err != DE265_OK, more=true + - decoding finished -> err = DE265_OK, more=false + - unresolvable error -> err != DE265_OK, more=false + */ +LIBDE265_API de265_error de265_decode(de265_decoder_context*, int* more); + +/* Clear decoder state. Call this when skipping in the stream. + */ +LIBDE265_API void de265_reset(de265_decoder_context*); + +/* Return next decoded picture, if there is any. If no complete picture has been + decoded yet, NULL is returned. You should call de265_release_next_picture() to + advance to the next picture. */ +LIBDE265_API const struct de265_image* de265_peek_next_picture(de265_decoder_context*); // may return NULL + +/* Get next decoded picture and remove this picture from the decoder output queue. + Returns NULL is there is no decoded picture ready. + You can use the picture only until you call any other de265_* function. */ +LIBDE265_API const struct de265_image* de265_get_next_picture(de265_decoder_context*); // may return NULL + +/* Release the current decoded picture for reuse in the decoder. You should not + use the data anymore after calling this function. */ +LIBDE265_API void de265_release_next_picture(de265_decoder_context*); + + +LIBDE265_API de265_error de265_get_warning(de265_decoder_context*); + + +enum de265_image_format { + de265_image_format_mono8 = 1, + de265_image_format_YUV420P8 = 2, + de265_image_format_YUV422P8 = 3, + de265_image_format_YUV444P8 = 4 +}; + +struct de265_image_spec +{ + enum de265_image_format format; + int width; + int height; + int alignment; + + // conformance window + + int crop_left; + int crop_right; + int crop_top; + int crop_bottom; + + int visible_width; // convenience, width - crop_left - crop_right + int visible_height; // convenience, height - crop_top - crop_bottom +}; + +struct de265_image_allocation +{ + int (*get_buffer)(de265_decoder_context* ctx, // first parameter deprecated + struct de265_image_spec* spec, + struct de265_image* img, + void* userdata); + void (*release_buffer)(de265_decoder_context* ctx, // first parameter deprecated + struct de265_image* img, + void* userdata); +}; + +/* The user data pointer will be given to the get_buffer() and release_buffer() functions + in de265_image_allocation. */ +LIBDE265_API void de265_set_image_allocation_functions(de265_decoder_context*, + struct de265_image_allocation*, + void* userdata); +LIBDE265_API const struct de265_image_allocation *de265_get_default_image_allocation_functions(void); + +LIBDE265_API void de265_set_image_plane(struct de265_image* img, int cIdx, void* mem, int stride, void *userdata); + + +/* --- frame dropping API --- + + To limit decoding to a maximum temporal layer (TID), use de265_set_limit_TID(). + The maximum layer ID in the stream can be queried with de265_get_highest_TID(). + Note that the maximum layer ID can change throughout the stream. + + For a fine-grained selection of the frame-rate, use de265_set_framerate_ratio(). + A percentage of 100% will decode all frames in all temporal layers. A lower percentage + will drop approximately as many frames. Note that this only accurate if the frames + are distributed evenly among the layers. Otherwise, the mapping is non-linear. + + The limit_TID has a higher precedence than framerate_ratio. Hence, setting a higher + framerate-ratio will decode at limit_TID without dropping. + + With change_framerate(), the output frame-rate can be increased/decreased to some + discrete preferable values. Currently, these are non-dropped decoding at various + TID layers. +*/ + +LIBDE265_API int de265_get_highest_TID(de265_decoder_context*); // highest temporal substream to decode +LIBDE265_API int de265_get_current_TID(de265_decoder_context*); // currently decoded temporal substream + +LIBDE265_API void de265_set_limit_TID(de265_decoder_context*,int max_tid); // highest temporal substream to decode +LIBDE265_API void de265_set_framerate_ratio(de265_decoder_context*,int percent); // percentage of frames to decode (approx) +LIBDE265_API int de265_change_framerate(de265_decoder_context*,int more_vs_less); // 1: more, -1: less, returns corresponding framerate_ratio + + +/* --- decoding parameters --- */ + +enum de265_param { + DE265_DECODER_PARAM_BOOL_SEI_CHECK_HASH=0, // (bool) Perform SEI hash check on decoded pictures. + DE265_DECODER_PARAM_DUMP_SPS_HEADERS=1, // (int) Dump headers to specified file-descriptor. + DE265_DECODER_PARAM_DUMP_VPS_HEADERS=2, + DE265_DECODER_PARAM_DUMP_PPS_HEADERS=3, + DE265_DECODER_PARAM_DUMP_SLICE_HEADERS=4, + DE265_DECODER_PARAM_ACCELERATION_CODE=5, // (int) enum de265_acceleration, default: AUTO + DE265_DECODER_PARAM_SUPPRESS_FAULTY_PICTURES=6, // (bool) do not output frames with decoding errors, default: no (output all images) + + DE265_DECODER_PARAM_DISABLE_DEBLOCKING=7, // (bool) disable deblocking + DE265_DECODER_PARAM_DISABLE_SAO=8 // (bool) disable SAO filter + //DE265_DECODER_PARAM_DISABLE_MC_RESIDUAL_IDCT=9, // (bool) disable decoding of IDCT residuals in MC blocks + //DE265_DECODER_PARAM_DISABLE_INTRA_RESIDUAL_IDCT=10 // (bool) disable decoding of IDCT residuals in MC blocks +}; + +// sorted such that a large ID includes all optimizations from lower IDs +enum de265_acceleration { + de265_acceleration_SCALAR = 0, // only fallback implementation + de265_acceleration_MMX = 10, + de265_acceleration_SSE = 20, + de265_acceleration_SSE2 = 30, + de265_acceleration_SSE4 = 40, + de265_acceleration_AVX = 50, // not implemented yet + de265_acceleration_AVX2 = 60, // not implemented yet + de265_acceleration_ARM = 70, + de265_acceleration_NEON = 80, + de265_acceleration_AUTO = 10000 +}; + + +/* Set decoding parameters. */ +LIBDE265_API void de265_set_parameter_bool(de265_decoder_context*, enum de265_param param, int value); + +LIBDE265_API void de265_set_parameter_int(de265_decoder_context*, enum de265_param param, int value); + +/* Get decoding parameters. */ +LIBDE265_API int de265_get_parameter_bool(de265_decoder_context*, enum de265_param param); + + + +/* --- optional library initialization --- */ + +/* Static library initialization. Must be paired with de265_free(). + Initialization is optional, since it will be done implicitly in de265_new_decoder(). + Return value is false if initialization failed. + Only call de265_free() when initialization was successful. + Multiple calls to 'init' are allowed, but must be matched with an equal number of 'free' calls. +*/ +LIBDE265_API de265_error de265_init(void); + +/* Free global library data. + An implicit free call is made in de265_free_decoder(). + Returns false if library was not initialized before, or if 'free' was called + more often than 'init'. + */ +LIBDE265_API de265_error de265_free(void); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/vcpkg/installed/x64-osx/include/libde265/en265.h b/vcpkg/installed/x64-osx/include/libde265/en265.h new file mode 100644 index 0000000..a22e5d1 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/libde265/en265.h @@ -0,0 +1,218 @@ +/* + * H.265 video codec. + * Copyright (c) 2013-2014 struktur AG, Dirk Farin + * + * Authors: Dirk Farin + * + * This file is part of libde265. + * + * libde265 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * libde265 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libde265. If not, see . + */ + +#ifndef EN265_H +#define EN265_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + + +// ========== encoder context ========== + +struct en265_encoder_context; // private structure + +/* Get a new encoder context. Must be freed with en265_free_encoder(). */ +LIBDE265_API en265_encoder_context* en265_new_encoder(void); + +/* Free encoder context. May only be called once on a context. */ +LIBDE265_API de265_error en265_free_encoder(en265_encoder_context*); + +/* The alloc_userdata pointer will be given to the release_func(). */ +/* +LIBDE265_API void en265_set_image_release_function(en265_encoder_context*, + void (*release_func)(en265_encoder_context*, + struct de265_image*, + void* userdata), + void* alloc_userdata); +*/ + +// ========== encoder parameters ========== + +LIBDE265_API de265_error en265_set_parameter_bool(en265_encoder_context*, + const char* parametername,int value); +LIBDE265_API de265_error en265_set_parameter_int(en265_encoder_context*, + const char* parametername,int value); +LIBDE265_API de265_error en265_set_parameter_string(en265_encoder_context*, + const char* parametername,const char* value); +LIBDE265_API de265_error en265_set_parameter_choice(en265_encoder_context*, + const char* parametername,const char* value); + + +LIBDE265_API const char** en265_list_parameters(en265_encoder_context*); + +enum en265_parameter_type { + en265_parameter_bool, + en265_parameter_int, + en265_parameter_string, + en265_parameter_choice +}; + +LIBDE265_API enum en265_parameter_type en265_get_parameter_type(en265_encoder_context*, + const char* parametername); + +LIBDE265_API const char** en265_list_parameter_choices(en265_encoder_context*, + const char* parametername); + + +// --- convenience functions for command-line parameters --- + +LIBDE265_API de265_error en265_parse_command_line_parameters(en265_encoder_context*, + int* argc, char** argv); +LIBDE265_API void en265_show_parameters(en265_encoder_context*); + + + +// ========== encoding loop ========== + +LIBDE265_API de265_error en265_start_encoder(en265_encoder_context*, int number_of_threads); + +// If we have provided our own memory release function, no image memory will be allocated. +LIBDE265_API struct de265_image* en265_allocate_image(en265_encoder_context*, + int width, int height, + enum de265_chroma chroma, + de265_PTS pts, void* image_userdata); + +LIBDE265_API void* de265_alloc_image_plane(struct de265_image* img, int cIdx, + void* inputdata, int inputstride, void *userdata); +LIBDE265_API void de265_free_image_plane(struct de265_image* img, int cIdx); + + +// Request a specification of the image memory layout for an image of the specified dimensions. +LIBDE265_API void en265_get_image_spec(en265_encoder_context*, + int width, int height, enum de265_chroma chroma, + struct de265_image_spec* out_spec); + +// Image memory layout specification for an image returned by en265_allocate_image(). +/* TODO: do we need this? +LIBDE265_API void de265_get_image_spec_from_image(de265_image* img, struct de265_image_spec* spec); +*/ + + +LIBDE265_API de265_error en265_push_image(en265_encoder_context*, + struct de265_image*); // non-blocking + +LIBDE265_API de265_error en265_push_eof(en265_encoder_context*); + +// block when there are more than max_input_images in the input queue +LIBDE265_API de265_error en265_block_on_input_queue_length(en265_encoder_context*, + int max_pending_images, + int timeout_ms); + +LIBDE265_API de265_error en265_trim_input_queue(en265_encoder_context*, int max_pending_images); + +LIBDE265_API int en265_current_input_queue_length(en265_encoder_context*); + +// Run encoder in main thread. Only use this when not using background threads. +LIBDE265_API de265_error en265_encode(en265_encoder_context*); + +enum en265_encoder_state +{ + EN265_STATE_IDLE, + EN265_STATE_WAITING_FOR_INPUT, + EN265_STATE_WORKING, + EN265_STATE_OUTPUT_QUEUE_FULL, + EN265_STATE_EOS +}; + + +LIBDE265_API enum en265_encoder_state en265_get_encoder_state(en265_encoder_context*); + + +enum en265_packet_content_type { + EN265_PACKET_VPS, + EN265_PACKET_SPS, + EN265_PACKET_PPS, + EN265_PACKET_SEI, + EN265_PACKET_SLICE, + EN265_PACKET_SKIPPED_IMAGE +}; + + +enum en265_nal_unit_type { + EN265_NUT_TRAIL_N = 0, + EN265_NUT_TRAIL_R = 1, + EN265_NUT_TSA_N = 2, + EN265_NUT_TSA_R = 3, + EN265_NUT_STSA_N = 4, + EN265_NUT_STSA_R = 5, + EN265_NUT_RADL_N = 6, + EN265_NUT_RADL_R = 7, + EN265_NUT_RASL_N = 8, + EN265_NUT_RASL_R = 9, + EN265_NUT_BLA_W_LP = 16, + EN265_NUT_BLA_W_RADL= 17, + EN265_NUT_BLA_N_LP = 18, + EN265_NUT_IDR_W_RADL= 19, + EN265_NUT_IDR_N_LP = 20, + EN265_NUT_CRA = 21, + EN265_NUT_VPS = 32, + EN265_NUT_SPS = 33, + EN265_NUT_PPS = 34, + EN265_NUT_AUD = 35, + EN265_NUT_EOS = 36, + EN265_NUT_EOB = 37, + EN265_NUT_FD = 38, + EN265_NUT_PREFIX_SEI = 39, + EN265_NUT_SUFFIX_SEI = 40 +}; + + +struct en265_packet +{ + int version; // currently: 1 + + const uint8_t* data; + int length; + + int frame_number; + + enum en265_packet_content_type content_type; + char complete_picture : 1; + char final_slice : 1; + char dependent_slice : 1; + + enum en265_nal_unit_type nal_unit_type; + unsigned char nuh_layer_id; + unsigned char nuh_temporal_id; + + en265_encoder_context* encoder_context; + + const struct de265_image* input_image; + const struct de265_image* reconstruction; +}; + +// timeout_ms - timeout in milliseconds. 0 - no timeout, -1 - block forever +LIBDE265_API struct en265_packet* en265_get_packet(en265_encoder_context*, int timeout_ms); +LIBDE265_API void en265_free_packet(en265_encoder_context*, struct en265_packet*); + +LIBDE265_API int en265_number_of_queued_packets(en265_encoder_context*); + +#ifdef __cplusplus +} +#endif + + +#endif diff --git a/vcpkg/installed/x64-osx/include/libheif/heif.h b/vcpkg/installed/x64-osx/include/libheif/heif.h new file mode 100644 index 0000000..b1095ba --- /dev/null +++ b/vcpkg/installed/x64-osx/include/libheif/heif.h @@ -0,0 +1,2169 @@ +/* + * HEIF codec. + * Copyright (c) 2017-2023 Dirk Farin + * + * This file is part of libheif. + * + * libheif is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * libheif is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libheif. If not, see . + */ + +#ifndef LIBHEIF_HEIF_H +#define LIBHEIF_HEIF_H + +#ifdef __cplusplus +extern "C" { +#endif + +/*! \file heif.h + * + * Public API for libheif. +*/ + +#include +#include + +#include + + +// API versions table +// +// release dec.options enc.options heif_reader heif_writer depth.rep col.profile +// ------------------------------------------------------------------------------------------ +// 1.0 1 N/A N/A N/A 1 N/A +// 1.1 1 N/A N/A 1 1 N/A +// 1.3 1 1 1 1 1 N/A +// 1.4 1 1 1 1 1 1 +// 1.7 2 1 1 1 1 1 +// 1.9.2 2 2 1 1 1 1 +// 1.10 2 3 1 1 1 1 +// 1.11 2 4 1 1 1 1 +// 1.13 3 4 1 1 1 1 +// 1.14 3 5 1 1 1 1 +// 1.15 4 5 1 1 1 1 +// 1.16 5 6 1 1 1 1 + +#if 0 +#if 0 +#define LIBHEIF_API __declspec(dllexport) +#else +#define LIBHEIF_API __declspec(dllimport) +#endif +#elif defined(HAVE_VISIBILITY) && HAVE_VISIBILITY +#if 0 +#define LIBHEIF_API __attribute__((__visibility__("default"))) +#else +#define LIBHEIF_API +#endif +#else +#define LIBHEIF_API +#endif + +#define heif_fourcc(a, b, c, d) ((uint32_t)((a<<24) | (b<<16) | (c<<8) | d)) + + +/* === version numbers === */ + +// Version string of linked libheif library. +LIBHEIF_API const char* heif_get_version(void); + +// Numeric version of linked libheif library, encoded as 0xHHMMLL00 = hh.mm.ll, where hh, mm, ll is the decimal representation of HH, MM, LL. +// For example: 0x02150300 is version 2.21.3 +LIBHEIF_API uint32_t heif_get_version_number(void); + +// Numeric part "HH" from above. Returned as a decimal number. +LIBHEIF_API int heif_get_version_number_major(void); +// Numeric part "MM" from above. Returned as a decimal number. +LIBHEIF_API int heif_get_version_number_minor(void); +// Numeric part "LL" from above. Returned as a decimal number. +LIBHEIF_API int heif_get_version_number_maintenance(void); + +// Helper macros to check for given versions of libheif at compile time. +#define LIBHEIF_MAKE_VERSION(h, m, l) ((h) << 24 | (m) << 16 | (l) << 8) +#define LIBHEIF_HAVE_VERSION(h, m, l) (LIBHEIF_NUMERIC_VERSION >= LIBHEIF_MAKE_VERSION(h, m, l)) + +struct heif_context; +struct heif_image_handle; +struct heif_image; + + +enum heif_error_code +{ + // Everything ok, no error occurred. + heif_error_Ok = 0, + + // Input file does not exist. + heif_error_Input_does_not_exist = 1, + + // Error in input file. Corrupted or invalid content. + heif_error_Invalid_input = 2, + + // Input file type is not supported. + heif_error_Unsupported_filetype = 3, + + // Image requires an unsupported decoder feature. + heif_error_Unsupported_feature = 4, + + // Library API has been used in an invalid way. + heif_error_Usage_error = 5, + + // Could not allocate enough memory. + heif_error_Memory_allocation_error = 6, + + // The decoder plugin generated an error + heif_error_Decoder_plugin_error = 7, + + // The encoder plugin generated an error + heif_error_Encoder_plugin_error = 8, + + // Error during encoding or when writing to the output + heif_error_Encoding_error = 9, + + // Application has asked for a color profile type that does not exist + heif_error_Color_profile_does_not_exist = 10, + + // Error loading a dynamic plugin + heif_error_Plugin_loading_error = 11 +}; + + +enum heif_suberror_code +{ + // no further information available + heif_suberror_Unspecified = 0, + + // --- Invalid_input --- + + // End of data reached unexpectedly. + heif_suberror_End_of_data = 100, + + // Size of box (defined in header) is wrong + heif_suberror_Invalid_box_size = 101, + + // Mandatory 'ftyp' box is missing + heif_suberror_No_ftyp_box = 102, + + heif_suberror_No_idat_box = 103, + + heif_suberror_No_meta_box = 104, + + heif_suberror_No_hdlr_box = 105, + + heif_suberror_No_hvcC_box = 106, + + heif_suberror_No_pitm_box = 107, + + heif_suberror_No_ipco_box = 108, + + heif_suberror_No_ipma_box = 109, + + heif_suberror_No_iloc_box = 110, + + heif_suberror_No_iinf_box = 111, + + heif_suberror_No_iprp_box = 112, + + heif_suberror_No_iref_box = 113, + + heif_suberror_No_pict_handler = 114, + + // An item property referenced in the 'ipma' box is not existing in the 'ipco' container. + heif_suberror_Ipma_box_references_nonexisting_property = 115, + + // No properties have been assigned to an item. + heif_suberror_No_properties_assigned_to_item = 116, + + // Image has no (compressed) data + heif_suberror_No_item_data = 117, + + // Invalid specification of image grid (tiled image) + heif_suberror_Invalid_grid_data = 118, + + // Tile-images in a grid image are missing + heif_suberror_Missing_grid_images = 119, + + heif_suberror_Invalid_clean_aperture = 120, + + // Invalid specification of overlay image + heif_suberror_Invalid_overlay_data = 121, + + // Overlay image completely outside of visible canvas area + heif_suberror_Overlay_image_outside_of_canvas = 122, + + heif_suberror_Auxiliary_image_type_unspecified = 123, + + heif_suberror_No_or_invalid_primary_item = 124, + + heif_suberror_No_infe_box = 125, + + heif_suberror_Unknown_color_profile_type = 126, + + heif_suberror_Wrong_tile_image_chroma_format = 127, + + heif_suberror_Invalid_fractional_number = 128, + + heif_suberror_Invalid_image_size = 129, + + heif_suberror_Invalid_pixi_box = 130, + + heif_suberror_No_av1C_box = 131, + + heif_suberror_Wrong_tile_image_pixel_depth = 132, + + heif_suberror_Unknown_NCLX_color_primaries = 133, + + heif_suberror_Unknown_NCLX_transfer_characteristics = 134, + + heif_suberror_Unknown_NCLX_matrix_coefficients = 135, + + // Invalid specification of region item + heif_suberror_Invalid_region_data = 136, + + + // --- Memory_allocation_error --- + + // A security limit preventing unreasonable memory allocations was exceeded by the input file. + // Please check whether the file is valid. If it is, contact us so that we could increase the + // security limits further. + heif_suberror_Security_limit_exceeded = 1000, + + + // --- Usage_error --- + + // An item ID was used that is not present in the file. + heif_suberror_Nonexisting_item_referenced = 2000, // also used for Invalid_input + + // An API argument was given a NULL pointer, which is not allowed for that function. + heif_suberror_Null_pointer_argument = 2001, + + // Image channel referenced that does not exist in the image + heif_suberror_Nonexisting_image_channel_referenced = 2002, + + // The version of the passed plugin is not supported. + heif_suberror_Unsupported_plugin_version = 2003, + + // The version of the passed writer is not supported. + heif_suberror_Unsupported_writer_version = 2004, + + // The given (encoder) parameter name does not exist. + heif_suberror_Unsupported_parameter = 2005, + + // The value for the given parameter is not in the valid range. + heif_suberror_Invalid_parameter_value = 2006, + + // Error in property specification + heif_suberror_Invalid_property = 2007, + + // Image reference cycle found in iref + heif_suberror_Item_reference_cycle = 2008, + + + // --- Unsupported_feature --- + + // Image was coded with an unsupported compression method. + heif_suberror_Unsupported_codec = 3000, + + // Image is specified in an unknown way, e.g. as tiled grid image (which is supported) + heif_suberror_Unsupported_image_type = 3001, + + heif_suberror_Unsupported_data_version = 3002, + + // The conversion of the source image to the requested chroma / colorspace is not supported. + heif_suberror_Unsupported_color_conversion = 3003, + + heif_suberror_Unsupported_item_construction_method = 3004, + + heif_suberror_Unsupported_header_compression_method = 3005, + + + // --- Encoder_plugin_error --- + + heif_suberror_Unsupported_bit_depth = 4000, + + + // --- Encoding_error --- + + heif_suberror_Cannot_write_output_data = 5000, + + heif_suberror_Encoder_initialization = 5001, + heif_suberror_Encoder_encoding = 5002, + heif_suberror_Encoder_cleanup = 5003, + + heif_suberror_Too_many_regions = 5004, + + + // --- Plugin loading error --- + + heif_suberror_Plugin_loading_error = 6000, // a specific plugin file cannot be loaded + heif_suberror_Plugin_is_not_loaded = 6001, // trying to remove a plugin that is not loaded + heif_suberror_Cannot_read_plugin_directory = 6002 // error while scanning the directory for plugins +}; + + +struct heif_error +{ + // main error category + enum heif_error_code code; + + // more detailed error code + enum heif_suberror_code subcode; + + // textual error message (is always defined, you do not have to check for NULL) + const char* message; +}; + +// Default success return value. Intended for use in user-supplied callback functions. +LIBHEIF_API extern const struct heif_error heif_error_success; + + +typedef uint32_t heif_item_id; +typedef uint32_t heif_property_id; + + + +// ========================= enum types ====================== + +/** + * libheif known compression formats. + */ +enum heif_compression_format +{ + /** + * Unspecified / undefined compression format. + * + * This is used to mean "no match" or "any decoder" for some parts of the + * API. It does not indicate a specific compression format. + */ + heif_compression_undefined = 0, + /** + * HEVC compression, used for HEIC images. + * + * This is equivalent to H.265. + */ + heif_compression_HEVC = 1, + /** + * AVC compression. (Currently unused in libheif.) + * + * The compression is defined in ISO/IEC 14496-10. This is equivalent to H.264. + * + * The encapsulation is defined in ISO/IEC 23008-12:2022 Annex E. + */ + heif_compression_AVC = 2, + /** + * JPEG compression. + * + * The compression format is defined in ISO/IEC 10918-1. The encapsulation + * of JPEG is specified in ISO/IEC 23008-12:2022 Annex H. + */ + heif_compression_JPEG = 3, + /** + * AV1 compression, used for AVIF images. + * + * The compression format is provided at https://aomediacodec.github.io/av1-spec/ + * + * The encapsulation is defined in https://aomediacodec.github.io/av1-avif/ + */ + heif_compression_AV1 = 4, + /** + * VVC compression. (Currently unused in libheif.) + * + * The compression format is defined in ISO/IEC 23090-3. This is equivalent to H.266. + * + * The encapsulation is defined in ISO/IEC 23008-12:2022 Annex L. + */ + heif_compression_VVC = 5, + /** + * EVC compression. (Currently unused in libheif.) + * + * The compression format is defined in ISO/IEC 23094-1. This is equivalent to H.266. + * + * The encapsulation is defined in ISO/IEC 23008-12:2022 Annex M. + */ + heif_compression_EVC = 6, + /** + * JPEG 2000 compression. + * + * The encapsulation of JPEG 2000 is specified in ISO/IEC 15444-16:2021. + * The core encoding is defined in ISO/IEC 15444-1, or ITU-T T.800. + */ + heif_compression_JPEG2000 = 7, + /** + * Uncompressed encoding. + * + * This is defined in ISO/IEC 23001-17:2023 (Final Draft International Standard). + */ + heif_compression_uncompressed = 8, + /** + * Mask image encoding. + * + * See ISO/IEC 23008-12:2022 Section 6.10.2 + */ + heif_compression_mask = 9 +}; + +enum heif_chroma +{ + heif_chroma_undefined = 99, + heif_chroma_monochrome = 0, + heif_chroma_420 = 1, + heif_chroma_422 = 2, + heif_chroma_444 = 3, + heif_chroma_interleaved_RGB = 10, + heif_chroma_interleaved_RGBA = 11, + heif_chroma_interleaved_RRGGBB_BE = 12, // HDR, big endian. + heif_chroma_interleaved_RRGGBBAA_BE = 13, // HDR, big endian. + heif_chroma_interleaved_RRGGBB_LE = 14, // HDR, little endian. + heif_chroma_interleaved_RRGGBBAA_LE = 15 // HDR, little endian. +}; + +// DEPRECATED ENUM NAMES +#define heif_chroma_interleaved_24bit heif_chroma_interleaved_RGB +#define heif_chroma_interleaved_32bit heif_chroma_interleaved_RGBA + + +enum heif_colorspace +{ + heif_colorspace_undefined = 99, + + // heif_colorspace_YCbCr should be used with one of these heif_chroma values: + // * heif_chroma_444 + // * heif_chroma_422 + // * heif_chroma_420 + heif_colorspace_YCbCr = 0, + + // heif_colorspace_RGB should be used with one of these heif_chroma values: + // * heif_chroma_444 (for planar RGB) + // * heif_chroma_interleaved_RGB + // * heif_chroma_interleaved_RGBA + // * heif_chroma_interleaved_RRGGBB_BE + // * heif_chroma_interleaved_RRGGBBAA_BE + // * heif_chroma_interleaved_RRGGBB_LE + // * heif_chroma_interleaved_RRGGBBAA_LE + heif_colorspace_RGB = 1, + + // heif_colorspace_monochrome should only be used with heif_chroma = heif_chroma_monochrome + heif_colorspace_monochrome = 2 +}; + +enum heif_channel +{ + heif_channel_Y = 0, + heif_channel_Cb = 1, + heif_channel_Cr = 2, + heif_channel_R = 3, + heif_channel_G = 4, + heif_channel_B = 5, + heif_channel_Alpha = 6, + heif_channel_interleaved = 10 +}; + + +// ========================= library initialization ====================== + +struct heif_init_params +{ + int version; + + // currently no parameters +}; + + +/** + * Initialise library. + * + * You should call heif_init() when you start using libheif and heif_deinit() when you are finished. + * These calls are reference counted. Each call to heif_init() should be matched by one call to heif_deinit(). + * + * For backwards compatibility, it is not really necessary to call heif_init(), but some library memory objects + * will never be freed if you do not call heif_init()/heif_deinit(). + * + * heif_init() will load the external modules installed in the default plugin path. Thus, you need it when you + * want to load external plugins from the default path. + * Codec plugins that are compiled into the library directly (selected by the compile-time parameters of libheif) + * will be available even without heif_init(). + * + * Make sure that you do not have one part of your program use heif_init()/heif_deinit() and another part that does + * not use it as the latter may try to use an uninitialized library. If in doubt, enclose everything with init/deinit. + * + * You may pass nullptr to get default parameters. Currently, no parameters are supported. + */ +LIBHEIF_API +struct heif_error heif_init(struct heif_init_params*); + +/** + * Deinitialise and clean up library. + * + * You should call heif_init() when you start using libheif and heif_deinit() when you are finished. + * These calls are reference counted. Each call to heif_init() should be matched by one call to heif_deinit(). + * + * \sa heif_init() + */ +LIBHEIF_API +void heif_deinit(void); + + +// --- Plugins are currently only supported on Unix platforms. + +enum heif_plugin_type +{ + heif_plugin_type_encoder, + heif_plugin_type_decoder +}; + +struct heif_plugin_info +{ + int version; // version of this info struct + enum heif_plugin_type type; + const void* plugin; + void* internal_handle; // for internal use only +}; + +LIBHEIF_API +struct heif_error heif_load_plugin(const char* filename, struct heif_plugin_info const** out_plugin); + +LIBHEIF_API +struct heif_error heif_load_plugins(const char* directory, + const struct heif_plugin_info** out_plugins, + int* out_nPluginsLoaded, + int output_array_size); + +LIBHEIF_API +struct heif_error heif_unload_plugin(const struct heif_plugin_info* plugin); + +// Get a NULL terminated array of the plugin directories that are searched by libheif. +// This includes the paths specified in the environment variable LIBHEIF_PLUGIN_PATHS and the built-in path +// (if not overridden by the environment variable). +LIBHEIF_API +const char*const* heif_get_plugin_directories(void); + +LIBHEIF_API +void heif_free_plugin_directories(const char*const*); + + +// ========================= file type check ====================== + +enum heif_filetype_result +{ + heif_filetype_no, + heif_filetype_yes_supported, // it is heif and can be read by libheif + heif_filetype_yes_unsupported, // it is heif, but cannot be read by libheif + heif_filetype_maybe // not sure whether it is an heif, try detection with more input data +}; + +// input data should be at least 12 bytes +LIBHEIF_API +enum heif_filetype_result heif_check_filetype(const uint8_t* data, int len); + +LIBHEIF_API +int heif_check_jpeg_filetype(const uint8_t* data, int len); + + +// DEPRECATED, use heif_brand2 and the heif_brand2_* constants below instead +enum heif_brand +{ + heif_unknown_brand, + heif_heic, // HEIF image with h265 + heif_heix, // 10bit images, or anything that uses h265 with range extension + heif_hevc, heif_hevx, // brands for image sequences + heif_heim, // multiview + heif_heis, // scalable + heif_hevm, // multiview sequence + heif_hevs, // scalable sequence + heif_mif1, // image, any coding algorithm + heif_msf1, // sequence, any coding algorithm + heif_avif, // HEIF image with AV1 + heif_avis, + heif_vvic, // VVC image + heif_vvis, // VVC sequence + heif_evbi, // EVC image + heif_evbs, // EVC sequence + heif_j2ki, // JPEG2000 image + heif_j2is, // JPEG2000 image sequence +}; + +// input data should be at least 12 bytes +// DEPRECATED, use heif_read_main_brand() instead +LIBHEIF_API +enum heif_brand heif_main_brand(const uint8_t* data, int len); + + +typedef uint32_t heif_brand2; + +/** + * HEVC image (`heic`) brand. + * + * Image conforms to HEVC (H.265) Main or Main Still profile. + * + * See ISO/IEC 23008-12:2022 Section B.4.1. + */ +#define heif_brand2_heic heif_fourcc('h','e','i','c') + +/** + * HEVC image (`heix`) brand. + * + * Image conforms to HEVC (H.265) Main 10 profile. + * + * See ISO/IEC 23008-12:2022 Section B.4.1. + */ +#define heif_brand2_heix heif_fourcc('h','e','i','x') + +/** + * HEVC image sequence (`hevc`) brand. + * + * Image sequence conforms to HEVC (H.265) Main profile. + * + * See ISO/IEC 23008-12:2022 Section B.4.2. + */ +#define heif_brand2_hevc heif_fourcc('h','e','v','c') + +/** + * HEVC image sequence (`hevx`) brand. + * + * Image sequence conforms to HEVC (H.265) Main 10 profile. + * + * See ISO/IEC 23008-12:2022 Section B.4.2. + */ +#define heif_brand2_hevx heif_fourcc('h','e','v','x') + +/** + * HEVC layered image (`heim`) brand. + * + * Image layers conform to HEVC (H.265) Main or Multiview Main profile. + * + * See ISO/IEC 23008-12:2022 Section B.4.3. + */ +#define heif_brand2_heim heif_fourcc('h','e','i','m') + +/** + * HEVC layered image (`heis`) brand. + * + * Image layers conform to HEVC (H.265) Main, Main 10, Scalable Main + * or Scalable Main 10 profile. + * + * See ISO/IEC 23008-12:2022 Section B.4.3. + */ +#define heif_brand2_heis heif_fourcc('h','e','i','s') + +/** + * HEVC layered image sequence (`hevm`) brand. + * + * Image sequence layers conform to HEVC (H.265) Main or Multiview Main profile. + * + * See ISO/IEC 23008-12:2022 Section B.4.4. + */ +#define heif_brand2_hevm heif_fourcc('h','e','v','m') + +/** + * HEVC layered image sequence (`hevs`) brand. + * + * Image sequence layers conform to HEVC (H.265) Main, Main 10, Scalable Main + * or Scalable Main 10 profile. + * + * See ISO/IEC 23008-12:2022 Section B.4.4. + */ +#define heif_brand2_hevs heif_fourcc('h','e','v','s') + +/** + * AV1 image (`avif`) brand. + * + * See https://aomediacodec.github.io/av1-avif/#image-and-image-collection-brand + */ +#define heif_brand2_avif heif_fourcc('a','v','i','f') + +/** + * AV1 image sequence (`avis`) brand. + * + * See https://aomediacodec.github.io/av1-avif/#image-sequence-brand + */ +#define heif_brand2_avis heif_fourcc('a','v','i','s') // AVIF sequence + +/** + * HEIF image structural brand (`mif1`). + * + * This does not imply a specific coding algorithm. + * + * See ISO/IEC 23008-12:2022 Section 10.2.2. + */ +#define heif_brand2_mif1 heif_fourcc('m','i','f','1') + +/** + * HEIF image structural brand (`mif2`). + * + * This does not imply a specific coding algorithm. `mif2` extends + * the requirements of `mif1` to include the `rref` and `iscl` item + * properties. + * + * See ISO/IEC 23008-12:2022 Section 10.2.3. + */ +#define heif_brand2_mif2 heif_fourcc('m','i','f','2') + +/** + * HEIF image sequence structural brand (`msf1`). + * + * This does not imply a specific coding algorithm. + * + * See ISO/IEC 23008-12:2022 Section 10.3.1. + */ +#define heif_brand2_msf1 heif_fourcc('m','s','f','1') + +/** + * VVC image (`vvic`) brand. + * + * See ISO/IEC 23008-12:2022 Section L.4.1. + */ +#define heif_brand2_vvic heif_fourcc('v','v','i','c') + +/** + * VVC image sequence (`vvis`) brand. + * + * See ISO/IEC 23008-12:2022 Section L.4.2. + */ +#define heif_brand2_vvis heif_fourcc('v','v','i','s') + +/** + * EVC baseline image (`evbi`) brand. + * + * See ISO/IEC 23008-12:2022 Section M.4.1. + */ +#define heif_brand2_evbi heif_fourcc('e','v','b','i') + +/** + * EVC main profile image (`evmi`) brand. + * + * See ISO/IEC 23008-12:2022 Section M.4.2. + */ +#define heif_brand2_evmi heif_fourcc('e','v','m','i') + +/** + * EVC baseline image sequence (`evbs`) brand. + * + * See ISO/IEC 23008-12:2022 Section M.4.3. + */ +#define heif_brand2_evbs heif_fourcc('e','v','b','s') + +/** + * EVC main profile image sequence (`evms`) brand. + * + * See ISO/IEC 23008-12:2022 Section M.4.4. + */ +#define heif_brand2_evms heif_fourcc('e','v','m','s') + +/** + * JPEG image (`jpeg`) brand. + * + * See ISO/IEC 23008-12:2022 Annex H.4 + */ +#define heif_brand2_jpeg heif_fourcc('j','p','e','g') + +/** + * JPEG image sequence (`jpgs`) brand. + * + * See ISO/IEC 23008-12:2022 Annex H.5 + */ +#define heif_brand2_jpgs heif_fourcc('j','p','g','s') + +/** + * JPEG 2000 image (`j2ki`) brand. + * + * See ISO/IEC 15444-16:2021 Section 6.5 + */ +#define heif_brand2_j2ki heif_fourcc('j','2','k','i') + +/** + * JPEG 2000 image sequence (`j2is`) brand. + * + * See ISO/IEC 15444-16:2021 Section 7.6 + */ +#define heif_brand2_j2is heif_fourcc('j','2','i','s') + +/** + * Multi-image application format (MIAF) brand. + * + * This is HEIF with additional constraints for interoperability. + * + * See ISO/IEC 23000-22. + */ +#define heif_brand2_miaf heif_fourcc('m','i','a','f') + +/** + * Single picture file brand. + * + * This is a compatible brand indicating the file contains a single intra-coded picture. + * + * See ISO/IEC 23008-12:2022 Section 10.2.5. +*/ +#define heif_brand2_1pic heif_fourcc('1','p','i','c') + +// input data should be at least 12 bytes +LIBHEIF_API +heif_brand2 heif_read_main_brand(const uint8_t* data, int len); + +// 'brand_fourcc' must be 4 character long, but need not be 0-terminated +LIBHEIF_API +heif_brand2 heif_fourcc_to_brand(const char* brand_fourcc); + +// the output buffer must be at least 4 bytes long +LIBHEIF_API +void heif_brand_to_fourcc(heif_brand2 brand, char* out_fourcc); + +// 'brand_fourcc' must be 4 character long, but need not be 0-terminated +// returns 1 if file includes the brand, and 0 if it does not +// returns -1 if the provided data is not sufficient +// (you should input at least as many bytes as indicated in the first 4 bytes of the file, usually ~50 bytes will do) +// returns -2 on other errors +LIBHEIF_API +int heif_has_compatible_brand(const uint8_t* data, int len, const char* brand_fourcc); + +// Returns an array of compatible brands. The array is allocated by this function and has to be freed with 'heif_free_list_of_compatible_brands()'. +// The number of entries is returned in out_size. +LIBHEIF_API +struct heif_error heif_list_compatible_brands(const uint8_t* data, int len, heif_brand2** out_brands, int* out_size); + +LIBHEIF_API +void heif_free_list_of_compatible_brands(heif_brand2* brands_list); + + +// Returns one of these MIME types: +// - image/heic HEIF file using h265 compression +// - image/heif HEIF file using any other compression +// - image/heic-sequence HEIF image sequence using h265 compression +// - image/heif-sequence HEIF image sequence using any other compression +// - image/avif AVIF image +// - image/avif-sequence AVIF sequence +// - image/jpeg JPEG image +// - image/png PNG image +// If the format could not be detected, an empty string is returned. +// +// Provide at least 12 bytes of input. With less input, its format might not +// be detected. You may also provide more input to increase detection accuracy. +// +// Note that JPEG and PNG images cannot be decoded by libheif even though the +// formats are detected by this function. +LIBHEIF_API +const char* heif_get_file_mime_type(const uint8_t* data, int len); + + + +// ========================= heif_context ========================= +// A heif_context represents a HEIF file that has been read. +// In the future, you will also be able to add pictures to a heif_context +// and write it into a file again. + + +// Allocate a new context for reading HEIF files. +// Has to be freed again with heif_context_free(). +LIBHEIF_API +struct heif_context* heif_context_alloc(void); + +// Free a previously allocated HEIF context. You should not free a context twice. +LIBHEIF_API +void heif_context_free(struct heif_context*); + + +struct heif_reading_options; + +enum heif_reader_grow_status +{ + heif_reader_grow_status_size_reached, // requested size has been reached, we can read until this point + heif_reader_grow_status_timeout, // size has not been reached yet, but it may still grow further + heif_reader_grow_status_size_beyond_eof // size has not been reached and never will. The file has grown to its full size +}; + +struct heif_reader +{ + // API version supported by this reader + int reader_api_version; + + // --- version 1 functions --- + int64_t (* get_position)(void* userdata); + + // The functions read(), and seek() return heif_error_ok on success. + // Generally, libheif will make sure that we do not read past the file size. + int (* read)(void* data, + size_t size, + void* userdata); + + int (* seek)(int64_t position, + void* userdata); + + // When calling this function, libheif wants to make sure that it can read the file + // up to 'target_size'. This is useful when the file is currently downloaded and may + // grow with time. You may, for example, extract the image sizes even before the actual + // compressed image data has been completely downloaded. + // + // Even if your input files will not grow, you will have to implement at least + // detection whether the target_size is above the (fixed) file length + // (in this case, return 'size_beyond_eof'). + enum heif_reader_grow_status (* wait_for_file_size)(int64_t target_size, void* userdata); +}; + + +// Read a HEIF file from a named disk file. +// The heif_reading_options should currently be set to NULL. +LIBHEIF_API +struct heif_error heif_context_read_from_file(struct heif_context*, const char* filename, + const struct heif_reading_options*); + +// Read a HEIF file stored completely in memory. +// The heif_reading_options should currently be set to NULL. +// DEPRECATED: use heif_context_read_from_memory_without_copy() instead. +LIBHEIF_API +struct heif_error heif_context_read_from_memory(struct heif_context*, + const void* mem, size_t size, + const struct heif_reading_options*); + +// Same as heif_context_read_from_memory() except that the provided memory is not copied. +// That means, you will have to keep the memory area alive as long as you use the heif_context. +LIBHEIF_API +struct heif_error heif_context_read_from_memory_without_copy(struct heif_context*, + const void* mem, size_t size, + const struct heif_reading_options*); + +LIBHEIF_API +struct heif_error heif_context_read_from_reader(struct heif_context*, + const struct heif_reader* reader, + void* userdata, + const struct heif_reading_options*); + +// Number of top-level images in the HEIF file. This does not include the thumbnails or the +// tile images that are composed to an image grid. You can get access to the thumbnails via +// the main image handle. +LIBHEIF_API +int heif_context_get_number_of_top_level_images(struct heif_context* ctx); + +LIBHEIF_API +int heif_context_is_top_level_image_ID(struct heif_context* ctx, heif_item_id id); + +// Fills in image IDs into the user-supplied int-array 'ID_array', preallocated with 'count' entries. +// Function returns the total number of IDs filled into the array. +LIBHEIF_API +int heif_context_get_list_of_top_level_image_IDs(struct heif_context* ctx, + heif_item_id* ID_array, + int count); + +LIBHEIF_API +struct heif_error heif_context_get_primary_image_ID(struct heif_context* ctx, heif_item_id* id); + +// Get a handle to the primary image of the HEIF file. +// This is the image that should be displayed primarily when there are several images in the file. +LIBHEIF_API +struct heif_error heif_context_get_primary_image_handle(struct heif_context* ctx, + struct heif_image_handle**); + +// Get the image handle for a known image ID. +LIBHEIF_API +struct heif_error heif_context_get_image_handle(struct heif_context* ctx, + heif_item_id id, + struct heif_image_handle**); + +// Print information about the boxes of a HEIF file to file descriptor. +// This is for debugging and informational purposes only. You should not rely on +// the output having a specific format. At best, you should not use this at all. +LIBHEIF_API +void heif_context_debug_dump_boxes_to_file(struct heif_context* ctx, int fd); + + +LIBHEIF_API +void heif_context_set_maximum_image_size_limit(struct heif_context* ctx, int maximum_width); + +// If the maximum threads number is set to 0, the image tiles are decoded in the main thread. +// This is different from setting it to 1, which will generate a single background thread to decode the tiles. +// Note that this setting only affects libheif itself. The codecs itself may still use multi-threaded decoding. +// You can use it, for example, in cases where you are decoding several images in parallel anyway you thus want +// to minimize parallelism in each decoder. +LIBHEIF_API +void heif_context_set_max_decoding_threads(struct heif_context* ctx, int max_threads); + + +// ========================= heif_image_handle ========================= + +// An heif_image_handle is a handle to a logical image in the HEIF file. +// To get the actual pixel data, you have to decode the handle to an heif_image. +// An heif_image_handle also gives you access to the thumbnails and Exif data +// associated with an image. + +// Once you obtained an heif_image_handle, you can already release the heif_context, +// since it is internally ref-counted. + +// Release image handle. +LIBHEIF_API +void heif_image_handle_release(const struct heif_image_handle*); + +// Check whether the given image_handle is the primary image of the file. +LIBHEIF_API +int heif_image_handle_is_primary_image(const struct heif_image_handle* handle); + +LIBHEIF_API +heif_item_id heif_image_handle_get_item_id(const struct heif_image_handle* handle); + +// Get the resolution of an image. +LIBHEIF_API +int heif_image_handle_get_width(const struct heif_image_handle* handle); + +LIBHEIF_API +int heif_image_handle_get_height(const struct heif_image_handle* handle); + +LIBHEIF_API +int heif_image_handle_has_alpha_channel(const struct heif_image_handle*); + +LIBHEIF_API +int heif_image_handle_is_premultiplied_alpha(const struct heif_image_handle*); + +// Returns -1 on error, e.g. if this information is not present in the image. +LIBHEIF_API +int heif_image_handle_get_luma_bits_per_pixel(const struct heif_image_handle*); + +// Returns -1 on error, e.g. if this information is not present in the image. +LIBHEIF_API +int heif_image_handle_get_chroma_bits_per_pixel(const struct heif_image_handle*); + +// Return the colorspace that libheif proposes to use for decoding. +// Usually, these will be either YCbCr or Monochrome, but it may also propose RGB for images +// encoded with matrix_coefficients=0. +// It may also return *_undefined if the file misses relevant information to determine this without decoding. +LIBHEIF_API +struct heif_error heif_image_handle_get_preferred_decoding_colorspace(const struct heif_image_handle* image_handle, + enum heif_colorspace* out_colorspace, + enum heif_chroma* out_chroma); + +// Get the image width from the 'ispe' box. This is the original image size without +// any transformations applied to it. Do not use this unless you know exactly what +// you are doing. +LIBHEIF_API +int heif_image_handle_get_ispe_width(const struct heif_image_handle* handle); + +LIBHEIF_API +int heif_image_handle_get_ispe_height(const struct heif_image_handle* handle); + +// This gets the context associated with the image handle. +// Note that you have to release the returned context with heif_context_free() in any case. +// +// This means: when you have several image-handles that originate from the same file and you get the +// context of each of them, the returned pointer may be different even though it refers to the same +// logical context. You have to call heif_context_free() on all those context pointers. +// After you freed a context pointer, you can still use the context through a different pointer that you +// might have acquired from elsewhere. +LIBHEIF_API +struct heif_context* heif_image_handle_get_context(const struct heif_image_handle* handle); + + +// ------------------------- depth images ------------------------- + +LIBHEIF_API +int heif_image_handle_has_depth_image(const struct heif_image_handle*); + +LIBHEIF_API +int heif_image_handle_get_number_of_depth_images(const struct heif_image_handle* handle); + +LIBHEIF_API +int heif_image_handle_get_list_of_depth_image_IDs(const struct heif_image_handle* handle, + heif_item_id* ids, int count); + +LIBHEIF_API +struct heif_error heif_image_handle_get_depth_image_handle(const struct heif_image_handle* handle, + heif_item_id depth_image_id, + struct heif_image_handle** out_depth_handle); + + +enum heif_depth_representation_type +{ + heif_depth_representation_type_uniform_inverse_Z = 0, + heif_depth_representation_type_uniform_disparity = 1, + heif_depth_representation_type_uniform_Z = 2, + heif_depth_representation_type_nonuniform_disparity = 3 +}; + +struct heif_depth_representation_info +{ + uint8_t version; + + // version 1 fields + + uint8_t has_z_near; + uint8_t has_z_far; + uint8_t has_d_min; + uint8_t has_d_max; + + double z_near; + double z_far; + double d_min; + double d_max; + + enum heif_depth_representation_type depth_representation_type; + uint32_t disparity_reference_view; + + uint32_t depth_nonlinear_representation_model_size; + uint8_t* depth_nonlinear_representation_model; + + // version 2 fields below +}; + + +LIBHEIF_API +void heif_depth_representation_info_free(const struct heif_depth_representation_info* info); + +// Returns true when there is depth_representation_info available +// Note 1: depth_image_id is currently unused because we support only one depth channel per image, but +// you should still provide the correct ID for future compatibility. +// Note 2: Because of an API bug before v1.11.0, the function also works when 'handle' is the handle of the depth image. +// However, you should pass the handle of the main image. Please adapt your code if needed. +LIBHEIF_API +int heif_image_handle_get_depth_image_representation_info(const struct heif_image_handle* handle, + heif_item_id depth_image_id, + const struct heif_depth_representation_info** out); + + + +// ------------------------- thumbnails ------------------------- + +// List the number of thumbnails assigned to this image handle. Usually 0 or 1. +LIBHEIF_API +int heif_image_handle_get_number_of_thumbnails(const struct heif_image_handle* handle); + +LIBHEIF_API +int heif_image_handle_get_list_of_thumbnail_IDs(const struct heif_image_handle* handle, + heif_item_id* ids, int count); + +// Get the image handle of a thumbnail image. +LIBHEIF_API +struct heif_error heif_image_handle_get_thumbnail(const struct heif_image_handle* main_image_handle, + heif_item_id thumbnail_id, + struct heif_image_handle** out_thumbnail_handle); + + +// ------------------------- auxiliary images ------------------------- + +#define LIBHEIF_AUX_IMAGE_FILTER_OMIT_ALPHA (1UL<<1) +#define LIBHEIF_AUX_IMAGE_FILTER_OMIT_DEPTH (2UL<<1) + +// List the number of auxiliary images assigned to this image handle. +LIBHEIF_API +int heif_image_handle_get_number_of_auxiliary_images(const struct heif_image_handle* handle, + int aux_filter); + +LIBHEIF_API +int heif_image_handle_get_list_of_auxiliary_image_IDs(const struct heif_image_handle* handle, + int aux_filter, + heif_item_id* ids, int count); + +// You are responsible to deallocate the returned buffer with heif_image_handle_release_auxiliary_type(). +LIBHEIF_API +struct heif_error heif_image_handle_get_auxiliary_type(const struct heif_image_handle* handle, + const char** out_type); + +LIBHEIF_API +void heif_image_handle_release_auxiliary_type(const struct heif_image_handle* handle, + const char** out_type); + +// DEPRECATED (because typo in function name). Use heif_image_handle_release_auxiliary_type() instead. +LIBHEIF_API +void heif_image_handle_free_auxiliary_types(const struct heif_image_handle* handle, + const char** out_type); + +// Get the image handle of an auxiliary image. +LIBHEIF_API +struct heif_error heif_image_handle_get_auxiliary_image_handle(const struct heif_image_handle* main_image_handle, + heif_item_id auxiliary_id, + struct heif_image_handle** out_auxiliary_handle); + + +// ------------------------- metadata (Exif / XMP) ------------------------- + +// How many metadata blocks are attached to an image. If you only want to get EXIF data, +// set the type_filter to "Exif". Otherwise, set the type_filter to NULL. +LIBHEIF_API +int heif_image_handle_get_number_of_metadata_blocks(const struct heif_image_handle* handle, + const char* type_filter); + +// 'type_filter' can be used to get only metadata of specific types, like "Exif". +// If 'type_filter' is NULL, it will return all types of metadata IDs. +LIBHEIF_API +int heif_image_handle_get_list_of_metadata_block_IDs(const struct heif_image_handle* handle, + const char* type_filter, + heif_item_id* ids, int count); + +// Return a string indicating the type of the metadata, as specified in the HEIF file. +// Exif data will have the type string "Exif". +// This string will be valid until the next call to a libheif function. +// You do not have to free this string. +LIBHEIF_API +const char* heif_image_handle_get_metadata_type(const struct heif_image_handle* handle, + heif_item_id metadata_id); + +// For EXIF, the content type is empty. +// For XMP, the content type is "application/rdf+xml". +LIBHEIF_API +const char* heif_image_handle_get_metadata_content_type(const struct heif_image_handle* handle, + heif_item_id metadata_id); + +// Get the size of the raw metadata, as stored in the HEIF file. +LIBHEIF_API +size_t heif_image_handle_get_metadata_size(const struct heif_image_handle* handle, + heif_item_id metadata_id); + +// 'out_data' must point to a memory area of the size reported by heif_image_handle_get_metadata_size(). +// The data is returned exactly as stored in the HEIF file. +// For Exif data, you probably have to skip the first four bytes of the data, since they +// indicate the offset to the start of the TIFF header of the Exif data. +LIBHEIF_API +struct heif_error heif_image_handle_get_metadata(const struct heif_image_handle* handle, + heif_item_id metadata_id, + void* out_data); + +// Only valid for item type == "uri ", an absolute URI +LIBHEIF_API +const char* heif_image_handle_get_metadata_item_uri_type(const struct heif_image_handle* handle, + heif_item_id metadata_id); + +// ------------------------- color profiles ------------------------- + +enum heif_color_profile_type +{ + heif_color_profile_type_not_present = 0, + heif_color_profile_type_nclx = heif_fourcc('n', 'c', 'l', 'x'), + heif_color_profile_type_rICC = heif_fourcc('r', 'I', 'C', 'C'), + heif_color_profile_type_prof = heif_fourcc('p', 'r', 'o', 'f') +}; + + +// Returns 'heif_color_profile_type_not_present' if there is no color profile. +// If there is an ICC profile and an NCLX profile, the ICC profile is returned. +// TODO: we need a new API for this function as images can contain both NCLX and ICC at the same time. +// However, you can still use heif_image_handle_get_raw_color_profile() and +// heif_image_handle_get_nclx_color_profile() to access both profiles. +LIBHEIF_API +enum heif_color_profile_type heif_image_handle_get_color_profile_type(const struct heif_image_handle* handle); + +LIBHEIF_API +size_t heif_image_handle_get_raw_color_profile_size(const struct heif_image_handle* handle); + +// Returns 'heif_error_Color_profile_does_not_exist' when there is no ICC profile. +LIBHEIF_API +struct heif_error heif_image_handle_get_raw_color_profile(const struct heif_image_handle* handle, + void* out_data); + + +enum heif_color_primaries +{ + heif_color_primaries_ITU_R_BT_709_5 = 1, // g=0.3;0.6, b=0.15;0.06, r=0.64;0.33, w=0.3127,0.3290 + heif_color_primaries_unspecified = 2, + heif_color_primaries_ITU_R_BT_470_6_System_M = 4, + heif_color_primaries_ITU_R_BT_470_6_System_B_G = 5, + heif_color_primaries_ITU_R_BT_601_6 = 6, + heif_color_primaries_SMPTE_240M = 7, + heif_color_primaries_generic_film = 8, + heif_color_primaries_ITU_R_BT_2020_2_and_2100_0 = 9, + heif_color_primaries_SMPTE_ST_428_1 = 10, + heif_color_primaries_SMPTE_RP_431_2 = 11, + heif_color_primaries_SMPTE_EG_432_1 = 12, + heif_color_primaries_EBU_Tech_3213_E = 22 +}; + +enum heif_transfer_characteristics +{ + heif_transfer_characteristic_ITU_R_BT_709_5 = 1, + heif_transfer_characteristic_unspecified = 2, + heif_transfer_characteristic_ITU_R_BT_470_6_System_M = 4, + heif_transfer_characteristic_ITU_R_BT_470_6_System_B_G = 5, + heif_transfer_characteristic_ITU_R_BT_601_6 = 6, + heif_transfer_characteristic_SMPTE_240M = 7, + heif_transfer_characteristic_linear = 8, + heif_transfer_characteristic_logarithmic_100 = 9, + heif_transfer_characteristic_logarithmic_100_sqrt10 = 10, + heif_transfer_characteristic_IEC_61966_2_4 = 11, + heif_transfer_characteristic_ITU_R_BT_1361 = 12, + heif_transfer_characteristic_IEC_61966_2_1 = 13, + heif_transfer_characteristic_ITU_R_BT_2020_2_10bit = 14, + heif_transfer_characteristic_ITU_R_BT_2020_2_12bit = 15, + heif_transfer_characteristic_ITU_R_BT_2100_0_PQ = 16, + heif_transfer_characteristic_SMPTE_ST_428_1 = 17, + heif_transfer_characteristic_ITU_R_BT_2100_0_HLG = 18 +}; + +enum heif_matrix_coefficients +{ + heif_matrix_coefficients_RGB_GBR = 0, + heif_matrix_coefficients_ITU_R_BT_709_5 = 1, // TODO: or 709-6 according to h.273 + heif_matrix_coefficients_unspecified = 2, + heif_matrix_coefficients_US_FCC_T47 = 4, + heif_matrix_coefficients_ITU_R_BT_470_6_System_B_G = 5, + heif_matrix_coefficients_ITU_R_BT_601_6 = 6, // TODO: or 601-7 according to h.273 + heif_matrix_coefficients_SMPTE_240M = 7, + heif_matrix_coefficients_YCgCo = 8, + heif_matrix_coefficients_ITU_R_BT_2020_2_non_constant_luminance = 9, + heif_matrix_coefficients_ITU_R_BT_2020_2_constant_luminance = 10, + heif_matrix_coefficients_SMPTE_ST_2085 = 11, + heif_matrix_coefficients_chromaticity_derived_non_constant_luminance = 12, + heif_matrix_coefficients_chromaticity_derived_constant_luminance = 13, + heif_matrix_coefficients_ICtCp = 14 +}; + +struct heif_color_profile_nclx +{ + // === version 1 fields + + uint8_t version; + + enum heif_color_primaries color_primaries; + enum heif_transfer_characteristics transfer_characteristics; + enum heif_matrix_coefficients matrix_coefficients; + uint8_t full_range_flag; + + // --- decoded values (not used when saving nclx) + + float color_primary_red_x, color_primary_red_y; + float color_primary_green_x, color_primary_green_y; + float color_primary_blue_x, color_primary_blue_y; + float color_primary_white_x, color_primary_white_y; +}; + +LIBHEIF_API +struct heif_error heif_nclx_color_profile_set_color_primaries(struct heif_color_profile_nclx* nclx, uint16_t cp); + +LIBHEIF_API +struct heif_error heif_nclx_color_profile_set_transfer_characteristics(struct heif_color_profile_nclx* nclx, uint16_t transfer_characteristics); + +LIBHEIF_API +struct heif_error heif_nclx_color_profile_set_matrix_coefficients(struct heif_color_profile_nclx* nclx, uint16_t matrix_coefficients); + +// Returns 'heif_error_Color_profile_does_not_exist' when there is no NCLX profile. +// TODO: This function does currently not return an NCLX profile if it is stored in the image bitstream. +// Only NCLX profiles stored as colr boxes are returned. This may change in the future. +LIBHEIF_API +struct heif_error heif_image_handle_get_nclx_color_profile(const struct heif_image_handle* handle, + struct heif_color_profile_nclx** out_data); + +// Returned color profile has 'version' field set to the maximum allowed. +// Do not fill values for higher versions as these might be outside the allocated structure size. +// May return NULL. +LIBHEIF_API +struct heif_color_profile_nclx* heif_nclx_color_profile_alloc(void); + +LIBHEIF_API +void heif_nclx_color_profile_free(struct heif_color_profile_nclx* nclx_profile); + + +LIBHEIF_API +enum heif_color_profile_type heif_image_get_color_profile_type(const struct heif_image* image); + +LIBHEIF_API +size_t heif_image_get_raw_color_profile_size(const struct heif_image* image); + +LIBHEIF_API +struct heif_error heif_image_get_raw_color_profile(const struct heif_image* image, + void* out_data); + +LIBHEIF_API +struct heif_error heif_image_get_nclx_color_profile(const struct heif_image* image, + struct heif_color_profile_nclx** out_data); + + +// ========================= heif_image ========================= + +// An heif_image contains a decoded pixel image in various colorspaces, chroma formats, +// and bit depths. + +// Note: when converting images to an interleaved chroma format, the resulting +// image contains only a single channel of type channel_interleaved with, e.g., 3 bytes per pixel, +// containing the interleaved R,G,B values. + +// Planar RGB images are specified as heif_colorspace_RGB / heif_chroma_444. + +enum heif_progress_step +{ + heif_progress_step_total = 0, + heif_progress_step_load_tile = 1 +}; + + +enum heif_chroma_downsampling_algorithm +{ + heif_chroma_downsampling_nearest_neighbor = 1, + heif_chroma_downsampling_average = 2, + + // Combine with 'heif_chroma_upsampling_bilinear' for best quality. + // Makes edges look sharper when using YUV 420 with bilinear chroma upsampling. + heif_chroma_downsampling_sharp_yuv = 3 +}; + +enum heif_chroma_upsampling_algorithm +{ + heif_chroma_upsampling_nearest_neighbor = 1, + heif_chroma_upsampling_bilinear = 2 +}; + +struct heif_color_conversion_options +{ + uint8_t version; + + // --- version 1 options + + enum heif_chroma_downsampling_algorithm preferred_chroma_downsampling_algorithm; + enum heif_chroma_upsampling_algorithm preferred_chroma_upsampling_algorithm; + + // When set to 'false' libheif may also use a different algorithm if the preferred one is not available + // or using a different algorithm is computationally less complex. Note that currently (v1.17.0) this + // means that for RGB input it will usually choose nearest-neighbor sampling because this is computationally + // the simplest. + // Set this field to 'true' if you want to make sure that the specified algorithm is used even + // at the cost of slightly higher computation times. + uint8_t only_use_preferred_chroma_algorithm; +}; + + +struct heif_decoding_options +{ + uint8_t version; + + // version 1 options + + // Ignore geometric transformations like cropping, rotation, mirroring. + // Default: false (do not ignore). + uint8_t ignore_transformations; + + void (* start_progress)(enum heif_progress_step step, int max_progress, void* progress_user_data); + + void (* on_progress)(enum heif_progress_step step, int progress, void* progress_user_data); + + void (* end_progress)(enum heif_progress_step step, void* progress_user_data); + + void* progress_user_data; + + // version 2 options + + uint8_t convert_hdr_to_8bit; + + // version 3 options + + // When enabled, an error is returned for invalid input. Otherwise, it will try its best and + // add decoding warnings to the decoded heif_image. Default is non-strict. + uint8_t strict_decoding; + + // version 4 options + + // name_id of the decoder to use for the decoding. + // If set to NULL (default), the highest priority decoder is chosen. + // The priority is defined in the plugin. + const char* decoder_id; + + + // version 5 options + + struct heif_color_conversion_options color_conversion_options; +}; + + +// Allocate decoding options and fill with default values. +// Note: you should always get the decoding options through this function since the +// option structure may grow in size in future versions. +LIBHEIF_API +struct heif_decoding_options* heif_decoding_options_alloc(void); + +LIBHEIF_API +void heif_decoding_options_free(struct heif_decoding_options*); + +// Decode an heif_image_handle into the actual pixel image and also carry out +// all geometric transformations specified in the HEIF file (rotation, cropping, mirroring). +// +// If colorspace or chroma is set to heif_colorspace_undefined or heif_chroma_undefined, +// respectively, the original colorspace is taken. +// Decoding options may be NULL. If you want to supply options, always use +// heif_decoding_options_alloc() to get the structure. +LIBHEIF_API +struct heif_error heif_decode_image(const struct heif_image_handle* in_handle, + struct heif_image** out_img, + enum heif_colorspace colorspace, + enum heif_chroma chroma, + const struct heif_decoding_options* options); + +// Get the colorspace format of the image. +LIBHEIF_API +enum heif_colorspace heif_image_get_colorspace(const struct heif_image*); + +// Get the chroma format of the image. +LIBHEIF_API +enum heif_chroma heif_image_get_chroma_format(const struct heif_image*); + +/** + * Get the width of a specified image channel. + * + * @param img the image to get the width for + * @param channel the channel to select + * @return the width of the channel in pixels, or -1 the channel does not exist in the image + */ +LIBHEIF_API +int heif_image_get_width(const struct heif_image* img, enum heif_channel channel); + +/** + * Get the height of a specified image channel. + * + * @param img the image to get the height for + * @param channel the channel to select + * @return the height of the channel in pixels, or -1 the channel does not exist in the image + */ +LIBHEIF_API +int heif_image_get_height(const struct heif_image* img, enum heif_channel channel); + +/** + * Get the width of the main channel. + * + * This is the Y channel in YCbCr or mono, or any in RGB. + * + * @param img the image to get the primary width for + * @return the width in pixels + */ +LIBHEIF_API +int heif_image_get_primary_width(const struct heif_image* img); + +/** + * Get the height of the main channel. + * + * This is the Y channel in YCbCr or mono, or any in RGB. + * + * @param img the image to get the primary height for + * @return the height in pixels + */ +LIBHEIF_API +int heif_image_get_primary_height(const struct heif_image* img); + +LIBHEIF_API +struct heif_error heif_image_crop(struct heif_image* img, + int left, int right, int top, int bottom); + +// Get the number of bits per pixel in the given image channel. Returns -1 if +// a non-existing channel was given. +// Note that the number of bits per pixel may be different for each color channel. +// This function returns the number of bits used for storage of each pixel. +// Especially for HDR images, this is probably not what you want. Have a look at +// heif_image_get_bits_per_pixel_range() instead. +LIBHEIF_API +int heif_image_get_bits_per_pixel(const struct heif_image*, enum heif_channel channel); + + +// Get the number of bits per pixel in the given image channel. This function returns +// the number of bits used for representing the pixel value, which might be smaller +// than the number of bits used in memory. +// For example, in 12bit HDR images, this function returns '12', while still 16 bits +// are reserved for storage. For interleaved RGBA with 12 bit, this function also returns +// '12', not '48' or '64' (heif_image_get_bits_per_pixel returns 64 in this case). +LIBHEIF_API +int heif_image_get_bits_per_pixel_range(const struct heif_image*, enum heif_channel channel); + +LIBHEIF_API +int heif_image_has_channel(const struct heif_image*, enum heif_channel channel); + +// Get a pointer to the actual pixel data. +// The 'out_stride' is returned as "bytes per line". +// When out_stride is NULL, no value will be written. +// Returns NULL if a non-existing channel was given. +LIBHEIF_API +const uint8_t* heif_image_get_plane_readonly(const struct heif_image*, + enum heif_channel channel, + int* out_stride); + +LIBHEIF_API +uint8_t* heif_image_get_plane(struct heif_image*, + enum heif_channel channel, + int* out_stride); + + +struct heif_scaling_options; + +// Currently, heif_scaling_options is not defined yet. Pass a NULL pointer. +LIBHEIF_API +struct heif_error heif_image_scale_image(const struct heif_image* input, + struct heif_image** output, + int width, int height, + const struct heif_scaling_options* options); + +// The color profile is not attached to the image handle because we might need it +// for color space transform and encoding. +LIBHEIF_API +struct heif_error heif_image_set_raw_color_profile(struct heif_image* image, + const char* profile_type_fourcc_string, + const void* profile_data, + const size_t profile_size); + +LIBHEIF_API +struct heif_error heif_image_set_nclx_color_profile(struct heif_image* image, + const struct heif_color_profile_nclx* color_profile); + + +// TODO: this function does not make any sense yet, since we currently cannot modify existing HEIF files. +//LIBHEIF_API +//void heif_image_remove_color_profile(struct heif_image* image); + +// Fills the image decoding warnings into the provided 'out_warnings' array. +// The size of the array has to be provided in max_output_buffer_entries. +// If max_output_buffer_entries==0, the number of decoder warnings is returned. +// The function fills the warnings into the provided buffer, starting with 'first_warning_idx'. +// It returns the number of warnings filled into the buffer. +// Note: you can iterate through all warnings by using 'max_output_buffer_entries=1' and iterate 'first_warning_idx'. +LIBHEIF_API +int heif_image_get_decoding_warnings(struct heif_image* image, + int first_warning_idx, + struct heif_error* out_warnings, + int max_output_buffer_entries); + +// This function is only for decoder plugin implementors. +LIBHEIF_API +void heif_image_add_decoding_warning(struct heif_image* image, + struct heif_error err); + +// Release heif_image. +LIBHEIF_API +void heif_image_release(const struct heif_image*); + + +// Note: a value of 0 for any of these values indicates that the value is undefined. +// The unit of these values is Candelas per square meter. +struct heif_content_light_level +{ + uint16_t max_content_light_level; + uint16_t max_pic_average_light_level; +}; + +LIBHEIF_API +int heif_image_has_content_light_level(const struct heif_image*); + +LIBHEIF_API +void heif_image_get_content_light_level(const struct heif_image*, struct heif_content_light_level* out); + +LIBHEIF_API +void heif_image_set_content_light_level(const struct heif_image*, const struct heif_content_light_level* in); + + +// Note: color coordinates are defined according to the CIE 1931 definition of x as specified in ISO 11664-1 (see also ISO 11664-3 and CIE 15). +struct heif_mastering_display_colour_volume +{ + uint16_t display_primaries_x[3]; + uint16_t display_primaries_y[3]; + uint16_t white_point_x; + uint16_t white_point_y; + uint32_t max_display_mastering_luminance; + uint32_t min_display_mastering_luminance; +}; + +// The units for max_display_mastering_luminance and min_display_mastering_luminance is Candelas per square meter. +struct heif_decoded_mastering_display_colour_volume +{ + float display_primaries_x[3]; + float display_primaries_y[3]; + float white_point_x; + float white_point_y; + double max_display_mastering_luminance; + double min_display_mastering_luminance; +}; + +LIBHEIF_API +int heif_image_has_mastering_display_colour_volume(const struct heif_image*); + +LIBHEIF_API +void heif_image_get_mastering_display_colour_volume(const struct heif_image*, struct heif_mastering_display_colour_volume* out); + +LIBHEIF_API +void heif_image_set_mastering_display_colour_volume(const struct heif_image*, const struct heif_mastering_display_colour_volume* in); + +// Converts the internal numeric representation of heif_mastering_display_colour_volume to the +// normalized values, collected in heif_decoded_mastering_display_colour_volume. +// Values that are out-of-range are decoded to 0, indicating an undefined value (as specified in ISO/IEC 23008-2). +LIBHEIF_API +struct heif_error heif_mastering_display_colour_volume_decode(const struct heif_mastering_display_colour_volume* in, + struct heif_decoded_mastering_display_colour_volume* out); + +LIBHEIF_API +void heif_image_get_pixel_aspect_ratio(const struct heif_image*, uint32_t* aspect_h, uint32_t* aspect_v); + +LIBHEIF_API +void heif_image_set_pixel_aspect_ratio(struct heif_image*, uint32_t aspect_h, uint32_t aspect_v); + +// ==================================================================================================== +// Encoding API + +LIBHEIF_API +struct heif_error heif_context_write_to_file(struct heif_context*, + const char* filename); + +struct heif_writer +{ + // API version supported by this writer + int writer_api_version; + + // --- version 1 functions --- + struct heif_error (* write)(struct heif_context* ctx, // TODO: why do we need this parameter? + const void* data, + size_t size, + void* userdata); +}; + +LIBHEIF_API +struct heif_error heif_context_write(struct heif_context*, + struct heif_writer* writer, + void* userdata); + + +// ----- encoder ----- + +// The encoder used for actually encoding an image. +struct heif_encoder; + +// A description of the encoder's capabilities and name. +struct heif_encoder_descriptor; + +// A configuration parameter of the encoder. Each encoder implementation may have a different +// set of parameters. For the most common settings (e.q. quality), special functions to set +// the parameters are provided. +struct heif_encoder_parameter; + +struct heif_decoder_descriptor; + +// Get a list of available decoders. You can filter the encoders by compression format. +// Use format_filter==heif_compression_undefined to get all available decoders. +// The returned list of decoders is sorted by their priority (which is a plugin property). +// The number of decoders is returned, which are not more than 'count' if (out_decoders != nullptr). +// By setting out_decoders==nullptr, you can query the number of decoders, 'count' is ignored. +LIBHEIF_API +int heif_get_decoder_descriptors(enum heif_compression_format format_filter, + const struct heif_decoder_descriptor** out_decoders, + int count); + +// Return a long, descriptive name of the decoder (including version information). +LIBHEIF_API +const char* heif_decoder_descriptor_get_name(const struct heif_decoder_descriptor*); + +// Return a short, symbolic name for identifying the decoder. +// This name should stay constant over different decoder versions. +// Note: the returned ID may be NULL for old plugins that don't support this yet. +LIBHEIF_API +const char* heif_decoder_descriptor_get_id_name(const struct heif_decoder_descriptor*); + +// DEPRECATED: use heif_get_encoder_descriptors() instead. +// Get a list of available encoders. You can filter the encoders by compression format and name. +// Use format_filter==heif_compression_undefined and name_filter==NULL as wildcards. +// The returned list of encoders is sorted by their priority (which is a plugin property). +// The number of encoders is returned, which are not more than 'count' if (out_encoders != nullptr). +// By setting out_encoders==nullptr, you can query the number of encoders, 'count' is ignored. +// Note: to get the actual encoder from the descriptors returned here, use heif_context_get_encoder(). +LIBHEIF_API +int heif_context_get_encoder_descriptors(struct heif_context*, // TODO: why do we need this parameter? + enum heif_compression_format format_filter, + const char* name_filter, + const struct heif_encoder_descriptor** out_encoders, + int count); + +// Get a list of available encoders. You can filter the encoders by compression format and name. +// Use format_filter==heif_compression_undefined and name_filter==NULL as wildcards. +// The returned list of encoders is sorted by their priority (which is a plugin property). +// The number of encoders is returned, which are not more than 'count' if (out_encoders != nullptr). +// By setting out_encoders==nullptr, you can query the number of encoders, 'count' is ignored. +// Note: to get the actual encoder from the descriptors returned here, use heif_context_get_encoder(). +LIBHEIF_API +int heif_get_encoder_descriptors(enum heif_compression_format format_filter, + const char* name_filter, + const struct heif_encoder_descriptor** out_encoders, + int count); + +// Return a long, descriptive name of the encoder (including version information). +LIBHEIF_API +const char* heif_encoder_descriptor_get_name(const struct heif_encoder_descriptor*); + +// Return a short, symbolic name for identifying the encoder. +// This name should stay constant over different encoder versions. +LIBHEIF_API +const char* heif_encoder_descriptor_get_id_name(const struct heif_encoder_descriptor*); + +LIBHEIF_API +enum heif_compression_format +heif_encoder_descriptor_get_compression_format(const struct heif_encoder_descriptor*); + +LIBHEIF_API +int heif_encoder_descriptor_supports_lossy_compression(const struct heif_encoder_descriptor*); + +LIBHEIF_API +int heif_encoder_descriptor_supports_lossless_compression(const struct heif_encoder_descriptor*); + + +// Get an encoder instance that can be used to actually encode images from a descriptor. +LIBHEIF_API +struct heif_error heif_context_get_encoder(struct heif_context* context, + const struct heif_encoder_descriptor*, + struct heif_encoder** out_encoder); + +// Quick check whether there is a decoder available for the given format. +// Note that the decoder still may not be able to decode all variants of that format. +// You will have to query that further (todo) or just try to decode and check the returned error. +LIBHEIF_API +int heif_have_decoder_for_format(enum heif_compression_format format); + +// Quick check whether there is an enoder available for the given format. +// Note that the encoder may be limited to a certain subset of features (e.g. only 8 bit, only lossy). +// You will have to query the specific capabilities further. +LIBHEIF_API +int heif_have_encoder_for_format(enum heif_compression_format format); + +// Get an encoder for the given compression format. If there are several encoder plugins +// for this format, the encoder with the highest plugin priority will be returned. +LIBHEIF_API +struct heif_error heif_context_get_encoder_for_format(struct heif_context* context, + enum heif_compression_format format, + struct heif_encoder**); + +// You have to release the encoder after use. +LIBHEIF_API +void heif_encoder_release(struct heif_encoder*); + +// Get the encoder name from the encoder itself. +LIBHEIF_API +const char* heif_encoder_get_name(const struct heif_encoder*); + + +// --- Encoder Parameters --- + +// Libheif supports settings parameters through specialized functions and through +// generic functions by parameter name. Sometimes, the same parameter can be set +// in both ways. +// We consider it best practice to use the generic parameter functions only in +// dynamically generated user interfaces, as no guarantees are made that some specific +// parameter names are supported by all plugins. + + +// Set a 'quality' factor (0-100). How this is mapped to actual encoding parameters is +// encoder dependent. +LIBHEIF_API +struct heif_error heif_encoder_set_lossy_quality(struct heif_encoder*, int quality); + +LIBHEIF_API +struct heif_error heif_encoder_set_lossless(struct heif_encoder*, int enable); + +// level should be between 0 (= none) to 4 (= full) +LIBHEIF_API +struct heif_error heif_encoder_set_logging_level(struct heif_encoder*, int level); + +// Get a generic list of encoder parameters. +// Each encoder may define its own, additional set of parameters. +// You do not have to free the returned list. +LIBHEIF_API +const struct heif_encoder_parameter* const* heif_encoder_list_parameters(struct heif_encoder*); + +// Return the parameter name. +LIBHEIF_API +const char* heif_encoder_parameter_get_name(const struct heif_encoder_parameter*); + + +enum heif_encoder_parameter_type +{ + heif_encoder_parameter_type_integer = 1, + heif_encoder_parameter_type_boolean = 2, + heif_encoder_parameter_type_string = 3 +}; + +// Return the parameter type. +LIBHEIF_API +enum heif_encoder_parameter_type heif_encoder_parameter_get_type(const struct heif_encoder_parameter*); + +// DEPRECATED. Use heif_encoder_parameter_get_valid_integer_values() instead. +LIBHEIF_API +struct heif_error heif_encoder_parameter_get_valid_integer_range(const struct heif_encoder_parameter*, + int* have_minimum_maximum, + int* minimum, int* maximum); + +// If integer is limited by a range, have_minimum and/or have_maximum will be != 0 and *minimum, *maximum is set. +// If integer is limited by a fixed set of values, *num_valid_values will be >0 and *out_integer_array is set. +LIBHEIF_API +struct heif_error heif_encoder_parameter_get_valid_integer_values(const struct heif_encoder_parameter*, + int* have_minimum, int* have_maximum, + int* minimum, int* maximum, + int* num_valid_values, + const int** out_integer_array); + +LIBHEIF_API +struct heif_error heif_encoder_parameter_get_valid_string_values(const struct heif_encoder_parameter*, + const char* const** out_stringarray); + + +LIBHEIF_API +struct heif_error heif_encoder_set_parameter_integer(struct heif_encoder*, + const char* parameter_name, + int value); + +LIBHEIF_API +struct heif_error heif_encoder_get_parameter_integer(struct heif_encoder*, + const char* parameter_name, + int* value); + +// TODO: name should be changed to heif_encoder_get_valid_integer_parameter_range +LIBHEIF_API // DEPRECATED. +struct heif_error heif_encoder_parameter_integer_valid_range(struct heif_encoder*, + const char* parameter_name, + int* have_minimum_maximum, + int* minimum, int* maximum); + +LIBHEIF_API +struct heif_error heif_encoder_set_parameter_boolean(struct heif_encoder*, + const char* parameter_name, + int value); + +LIBHEIF_API +struct heif_error heif_encoder_get_parameter_boolean(struct heif_encoder*, + const char* parameter_name, + int* value); + +LIBHEIF_API +struct heif_error heif_encoder_set_parameter_string(struct heif_encoder*, + const char* parameter_name, + const char* value); + +LIBHEIF_API +struct heif_error heif_encoder_get_parameter_string(struct heif_encoder*, + const char* parameter_name, + char* value, int value_size); + +// returns a NULL-terminated list of valid strings or NULL if all values are allowed +LIBHEIF_API +struct heif_error heif_encoder_parameter_string_valid_values(struct heif_encoder*, + const char* parameter_name, + const char* const** out_stringarray); + +LIBHEIF_API +struct heif_error heif_encoder_parameter_integer_valid_values(struct heif_encoder*, + const char* parameter_name, + int* have_minimum, int* have_maximum, + int* minimum, int* maximum, + int* num_valid_values, + const int** out_integer_array); + +// Set a parameter of any type to the string value. +// Integer values are parsed from the string. +// Boolean values can be "true"/"false"/"1"/"0" +// +// x265 encoder specific note: +// When using the x265 encoder, you may pass any of its parameters by +// prefixing the parameter name with 'x265:'. Hence, to set the 'ctu' parameter, +// you will have to set 'x265:ctu' in libheif. +// Note that there is no checking for valid parameters when using the prefix. +LIBHEIF_API +struct heif_error heif_encoder_set_parameter(struct heif_encoder*, + const char* parameter_name, + const char* value); + +// Get the current value of a parameter of any type as a human readable string. +// The returned string is compatible with heif_encoder_set_parameter(). +LIBHEIF_API +struct heif_error heif_encoder_get_parameter(struct heif_encoder*, + const char* parameter_name, + char* value_ptr, int value_size); + +// Query whether a specific parameter has a default value. +LIBHEIF_API +int heif_encoder_has_default(struct heif_encoder*, + const char* parameter_name); + + +// The orientation values are defined equal to the EXIF Orientation tag. +enum heif_orientation +{ + heif_orientation_normal = 1, + heif_orientation_flip_horizontally = 2, + heif_orientation_rotate_180 = 3, + heif_orientation_flip_vertically = 4, + heif_orientation_rotate_90_cw_then_flip_horizontally = 5, + heif_orientation_rotate_90_cw = 6, + heif_orientation_rotate_90_cw_then_flip_vertically = 7, + heif_orientation_rotate_270_cw = 8 +}; + + +struct heif_encoding_options +{ + uint8_t version; + + // version 1 options + + uint8_t save_alpha_channel; // default: true + + // version 2 options + + // DEPRECATED. This option is not required anymore. Its value will be ignored. + uint8_t macOS_compatibility_workaround; + + // version 3 options + + uint8_t save_two_colr_boxes_when_ICC_and_nclx_available; // default: false + + // version 4 options + + // Set this to the NCLX parameters to be used in the output image or set to NULL + // when the same parameters as in the input image should be used. + struct heif_color_profile_nclx* output_nclx_profile; + + uint8_t macOS_compatibility_workaround_no_nclx_profile; + + // version 5 options + + // libheif will generate irot/imir boxes to match these orientations + enum heif_orientation image_orientation; + + // version 6 options + + struct heif_color_conversion_options color_conversion_options; +}; + +LIBHEIF_API +struct heif_encoding_options* heif_encoding_options_alloc(void); + +LIBHEIF_API +void heif_encoding_options_free(struct heif_encoding_options*); + + +// Compress the input image. +// Returns a handle to the coded image in 'out_image_handle' unless out_image_handle = NULL. +// 'options' should be NULL for now. +// The first image added to the context is also automatically set the primary image, but +// you can change the primary image later with heif_context_set_primary_image(). +LIBHEIF_API +struct heif_error heif_context_encode_image(struct heif_context*, + const struct heif_image* image, + struct heif_encoder* encoder, + const struct heif_encoding_options* options, + struct heif_image_handle** out_image_handle); + +LIBHEIF_API +struct heif_error heif_context_set_primary_image(struct heif_context*, + struct heif_image_handle* image_handle); + +// Encode the 'image' as a scaled down thumbnail image. +// The image is scaled down to fit into a square area of width 'bbox_size'. +// If the input image is already so small that it fits into this bounding box, no thumbnail +// image is encoded and NULL is returned in 'out_thumb_image_handle'. +// No error is returned in this case. +// The encoded thumbnail is automatically assigned to the 'master_image_handle'. Hence, you +// do not have to call heif_context_assign_thumbnail(). +LIBHEIF_API +struct heif_error heif_context_encode_thumbnail(struct heif_context*, + const struct heif_image* image, + const struct heif_image_handle* master_image_handle, + struct heif_encoder* encoder, + const struct heif_encoding_options* options, + int bbox_size, + struct heif_image_handle** out_thumb_image_handle); + +enum heif_metadata_compression +{ + heif_metadata_compression_off, + heif_metadata_compression_auto, + heif_metadata_compression_deflate +}; + +// Assign 'thumbnail_image' as the thumbnail image of 'master_image'. +LIBHEIF_API +struct heif_error heif_context_assign_thumbnail(struct heif_context*, + const struct heif_image_handle* master_image, + const struct heif_image_handle* thumbnail_image); + +// Add EXIF metadata to an image. +LIBHEIF_API +struct heif_error heif_context_add_exif_metadata(struct heif_context*, + const struct heif_image_handle* image_handle, + const void* data, int size); + +// Add XMP metadata to an image. +LIBHEIF_API +struct heif_error heif_context_add_XMP_metadata(struct heif_context*, + const struct heif_image_handle* image_handle, + const void* data, int size); + +// New version of heif_context_add_XMP_metadata() with data compression (experimental). +LIBHEIF_API +struct heif_error heif_context_add_XMP_metadata2(struct heif_context*, + const struct heif_image_handle* image_handle, + const void* data, int size, + enum heif_metadata_compression compression); + +// Add generic, proprietary metadata to an image. You have to specify an 'item_type' that will +// identify your metadata. 'content_type' can be an additional type, or it can be NULL. +// For example, this function can be used to add IPTC metadata (IIM stream, not XMP) to an image. +// Although not standard, we propose to store IPTC data with item type="iptc", content_type=NULL. +LIBHEIF_API +struct heif_error heif_context_add_generic_metadata(struct heif_context* ctx, + const struct heif_image_handle* image_handle, + const void* data, int size, + const char* item_type, const char* content_type); + +// --- heif_image allocation + +// Create a new image of the specified resolution and colorspace. +// Note: no memory for the actual image data is reserved yet. You have to use +// heif_image_add_plane() to add the image planes required by your colorspace/chroma. +LIBHEIF_API +struct heif_error heif_image_create(int width, int height, + enum heif_colorspace colorspace, + enum heif_chroma chroma, + struct heif_image** out_image); + +// The indicated bit_depth corresponds to the bit depth per channel. +// I.e. for interleaved formats like RRGGBB, the bit_depth would be, e.g., 10 bit instead +// of 30 bits or 3*16=48 bits. +// For backward compatibility, one can also specify 24bits for RGB and 32bits for RGBA, +// instead of the preferred 8 bits. +LIBHEIF_API +struct heif_error heif_image_add_plane(struct heif_image* image, + enum heif_channel channel, + int width, int height, int bit_depth); + +// Signal that the image is premultiplied by the alpha pixel values. +LIBHEIF_API +void heif_image_set_premultiplied_alpha(struct heif_image* image, + int is_premultiplied_alpha); + +LIBHEIF_API +int heif_image_is_premultiplied_alpha(struct heif_image* image); + +// This function extends the padding of the image so that it has at least the given physical size. +// The padding border is filled with the pixels along the right/bottom border. +// This function may be useful if you want to process the image, but have some external padding requirements. +// The image size will not be modified if it is already larger/equal than the given physical size. +// I.e. you cannot assume that after calling this function, the stride will be equal to min_physical_width. +LIBHEIF_API +struct heif_error heif_image_extend_padding_to_size(struct heif_image* image, int min_physical_width, int min_physical_height); + + + +// --- register plugins + +struct heif_decoder_plugin; +struct heif_encoder_plugin; + +// DEPRECATED. Use heif_register_decoder_plugin(const struct heif_decoder_plugin*) instead. +LIBHEIF_API +struct heif_error heif_register_decoder(struct heif_context* heif, const struct heif_decoder_plugin*); + +LIBHEIF_API +struct heif_error heif_register_decoder_plugin(const struct heif_decoder_plugin*); + +LIBHEIF_API +struct heif_error heif_register_encoder_plugin(const struct heif_encoder_plugin*); + +// DEPRECATED, typo in function name +LIBHEIF_API +int heif_encoder_descriptor_supportes_lossy_compression(const struct heif_encoder_descriptor*); + +// DEPRECATED, typo in function name +LIBHEIF_API +int heif_encoder_descriptor_supportes_lossless_compression(const struct heif_encoder_descriptor*); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/vcpkg/installed/x64-osx/include/libheif/heif_cxx.h b/vcpkg/installed/x64-osx/include/libheif/heif_cxx.h new file mode 100644 index 0000000..311ed54 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/libheif/heif_cxx.h @@ -0,0 +1,1362 @@ +/* + * C++ interface to libheif + * Copyright (c) 2018 Dirk Farin + * + * This file is part of libheif. + * + * libheif is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * libheif is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libheif. If not, see . + */ + +#ifndef LIBHEIF_HEIF_CXX_H +#define LIBHEIF_HEIF_CXX_H + +#include +#include +#include +#include + +extern "C" { +#include +} + + +namespace heif { + + class Error + { + public: + Error() + { + m_code = heif_error_Ok; + m_subcode = heif_suberror_Unspecified; + m_message = "Ok"; + } + + Error(const heif_error& err) + { + assert(err.message); + + m_code = err.code; + m_subcode = err.subcode; + m_message = err.message; + } + + Error(heif_error_code code, heif_suberror_code subcode, const std::string& msg) + { + m_code = code; + m_subcode = subcode; + m_message = msg; + } + + const std::string& get_message() const + { return m_message; } + + heif_error_code get_code() const + { return m_code; } + + heif_suberror_code get_subcode() const + { return m_subcode; } + + operator bool() const + { return m_code != heif_error_Ok; } + + private: + heif_error_code m_code; + heif_suberror_code m_subcode; + std::string m_message; + }; + + + class ImageHandle; + + class Image; + + class Encoder; + + class EncoderParameter; + + class EncoderDescriptor; + + + class Context + { + public: + Context(); + + class ReadingOptions + { + }; + + // throws Error + void read_from_file(const std::string& filename, const ReadingOptions& opts = ReadingOptions()); + + // DEPRECATED. Use read_from_memory_without_copy() instead. + // throws Error + void read_from_memory(const void* mem, size_t size, const ReadingOptions& opts = ReadingOptions()); + + // throws Error + void read_from_memory_without_copy(const void* mem, size_t size, const ReadingOptions& opts = ReadingOptions()); + + class Reader + { + public: + virtual ~Reader() = default; + + virtual int64_t get_position() const = 0; + + virtual int read(void* data, size_t size) = 0; + + virtual int seek(int64_t position) = 0; + + virtual heif_reader_grow_status wait_for_file_size(int64_t target_size) = 0; + }; + + // throws Error + void read_from_reader(Reader&, const ReadingOptions& opts = ReadingOptions()); + + int get_number_of_top_level_images() const noexcept; + + bool is_top_level_image_ID(heif_item_id id) const noexcept; + + std::vector get_list_of_top_level_image_IDs() const noexcept; + + // throws Error + heif_item_id get_primary_image_ID() const; + + // throws Error + ImageHandle get_primary_image_handle() const; + + ImageHandle get_image_handle(heif_item_id id) const; + + + class EncodingOptions : public heif_encoding_options + { + public: + EncodingOptions(); + }; + + // throws Error + ImageHandle encode_image(const Image& img, Encoder& encoder, + const EncodingOptions& options = EncodingOptions()); + + // throws Error + void set_primary_image(ImageHandle& new_primary_image_handle); + + // throws Error + ImageHandle encode_thumbnail(const Image& image, + const ImageHandle& master_image, + Encoder& encoder, + const EncodingOptions&, + int bbox_size); + + // throws Error + void assign_thumbnail(const ImageHandle& thumbnail_image, + const ImageHandle& master_image); + + // throws Error + void add_exif_metadata(const ImageHandle& master_image, + const void* data, int size); + + // throws Error + void add_XMP_metadata(const ImageHandle& master_image, + const void* data, int size); + + class Writer + { + public: + virtual ~Writer() = default; + + virtual heif_error write(const void* data, size_t size) = 0; + }; + + // throws Error + void write(Writer&); + + // throws Error + void write_to_file(const std::string& filename) const; + + private: + std::shared_ptr m_context; + + friend struct ::heif_error heif_writer_trampoline_write(struct heif_context* ctx, + const void* data, + size_t size, + void* userdata); + + //static Context wrap_without_releasing(heif_context*); // internal use in friend function only + }; + + + class ImageHandle + { + public: + ImageHandle() = default; + + ImageHandle(heif_image_handle* handle); + + bool empty() const noexcept + { return !m_image_handle; } + + bool is_primary_image() const noexcept; + + int get_width() const noexcept; + + int get_height() const noexcept; + + bool has_alpha_channel() const noexcept; + + bool is_premultiplied_alpha() const noexcept; + + int get_luma_bits_per_pixel() const noexcept; + + int get_chroma_bits_per_pixel() const noexcept; + + int get_ispe_width() const noexcept; + + int get_ispe_height() const noexcept; + + // ------------------------- depth images ------------------------- + + // TODO + + // ------------------------- thumbnails ------------------------- + + int get_number_of_thumbnails() const noexcept; + + std::vector get_list_of_thumbnail_IDs() const noexcept; + + // throws Error + ImageHandle get_thumbnail(heif_item_id id); + + // ------------------------- metadata (Exif / XMP) ------------------------- + + // Can optionally be filtered by type ("Exif" / "XMP") + std::vector get_list_of_metadata_block_IDs(const char* type_filter = nullptr) const noexcept; + + std::string get_metadata_type(heif_item_id metadata_id) const noexcept; + + std::string get_metadata_content_type(heif_item_id metadata_id) const noexcept; + + // throws error + std::vector get_metadata(heif_item_id) const; + + + class DecodingOptions + { + }; + + // throws Error + Image decode_image(heif_colorspace colorspace, heif_chroma chroma, + const DecodingOptions& options = DecodingOptions()); + + + heif_image_handle* get_raw_image_handle() noexcept + { return m_image_handle.get(); } + + const heif_image_handle* get_raw_image_handle() const noexcept + { return m_image_handle.get(); } + + private: + std::shared_ptr m_image_handle; + }; + + + class ColorProfile_nclx + { + public: + ColorProfile_nclx(); + + ~ColorProfile_nclx(); + + heif_color_primaries get_color_primaries() const; + + heif_transfer_characteristics get_transfer_characteristics() const; + + heif_matrix_coefficients get_matrix_coefficients() const; + + bool is_full_range() const; + + void set_color_primaries(heif_color_primaries cp); + + // DEPRECATED: typo in function name. Use set_color_primaries() instead. + void set_color_primaties(heif_color_primaries cp); + + void set_transfer_characteristics(heif_transfer_characteristics tc); + + void set_matrix_coefficients(heif_matrix_coefficients mc); + + void set_full_range_flag(bool is_full_range); + + private: + ColorProfile_nclx(heif_color_profile_nclx* nclx) + { mProfile = nclx; } + + heif_color_profile_nclx* mProfile; + + friend class Image; + }; + + + class Image + { + public: + Image() = default; + + Image(heif_image* image); + + + // throws Error + void create(int width, int height, + enum heif_colorspace colorspace, + enum heif_chroma chroma); + + // throws Error + void add_plane(enum heif_channel channel, + int width, int height, int bit_depth); + + heif_colorspace get_colorspace() const noexcept; + + heif_chroma get_chroma_format() const noexcept; + + int get_width(enum heif_channel channel) const noexcept; + + int get_height(enum heif_channel channel) const noexcept; + + int get_bits_per_pixel(enum heif_channel channel) const noexcept; + + int get_bits_per_pixel_range(enum heif_channel channel) const noexcept; + + bool has_channel(enum heif_channel channel) const noexcept; + + const uint8_t* get_plane(enum heif_channel channel, int* out_stride) const noexcept; + + uint8_t* get_plane(enum heif_channel channel, int* out_stride) noexcept; + + // throws Error + void set_nclx_color_profile(const ColorProfile_nclx&); + + // throws Error + ColorProfile_nclx get_nclx_color_profile() const; + + heif_color_profile_type get_color_profile_type() const; + + // throws Error + std::vector get_raw_color_profile() const; + + void set_raw_color_profile(heif_color_profile_type type, + const std::vector& data); + + bool is_premultiplied_alpha() const noexcept; + + void set_premultiplied_alpha(bool is_premultiplied_alpha) noexcept; + + class ScalingOptions + { + }; + + // throws Error + Image scale_image(int width, int height, + const ScalingOptions& options = ScalingOptions()) const; + + private: + std::shared_ptr m_image; + + friend class Context; + }; + + + class EncoderDescriptor + { + public: + static std::vector + get_encoder_descriptors(enum heif_compression_format format_filter, + const char* name_filter) noexcept; + + std::string get_name() const noexcept; + + std::string get_id_name() const noexcept; + + enum heif_compression_format get_compression_format() const noexcept; + + // DEPRECATED: typo in function name + bool supportes_lossy_compression() const noexcept; + + // DEPRECATED: typo in function name + bool supportes_lossless_compression() const noexcept; + + + // throws Error + Encoder get_encoder() const; + + bool supports_lossy_compression() const noexcept; + + bool supports_lossless_compression() const noexcept; + + private: + EncoderDescriptor(const struct heif_encoder_descriptor* descr) : m_descriptor(descr) + {} + + const struct heif_encoder_descriptor* m_descriptor = nullptr; + }; + + + class EncoderParameter + { + public: + std::string get_name() const noexcept; + + enum heif_encoder_parameter_type get_type() const noexcept; + + bool is_integer() const noexcept; + + // Returns 'true' if the integer range is limited. + bool get_valid_integer_range(int& out_minimum, int& out_maximum); + + bool is_boolean() const noexcept; + + bool is_string() const noexcept; + + std::vector get_valid_string_values() const; + + private: + EncoderParameter(const heif_encoder_parameter*); + + const struct heif_encoder_parameter* m_parameter; + + friend class Encoder; + }; + + + class Encoder + { + public: + // throws Error + Encoder(enum heif_compression_format format); + + // throws Error + void set_lossy_quality(int quality); + + // throws Error + void set_lossless(bool enable_lossless); + + std::vector list_parameters() const noexcept; + + void set_integer_parameter(const std::string& parameter_name, int value); + + int get_integer_parameter(const std::string& parameter_name) const; + + void set_boolean_parameter(const std::string& parameter_name, bool value); + + bool get_boolean_parameter(const std::string& parameter_name) const; + + void set_string_parameter(const std::string& parameter_name, const std::string& value); + + std::string get_string_parameter(const std::string& parameter_name) const; + + void set_parameter(const std::string& parameter_name, const std::string& parameter_value); + + std::string get_parameter(const std::string& parameter_name) const; + + private: + Encoder(struct heif_encoder*) noexcept; + + std::shared_ptr m_encoder; + + friend class EncoderDescriptor; + + friend class Context; + }; + + + // ========================================================================================== + // IMPLEMENTATION + // ========================================================================================== + + inline Context::Context() + { + heif_context* ctx = heif_context_alloc(); + m_context = std::shared_ptr(ctx, + [](heif_context* c) { heif_context_free(c); }); + } + + inline void Context::read_from_file(const std::string& filename, const ReadingOptions& /*opts*/) + { + Error err = Error(heif_context_read_from_file(m_context.get(), filename.c_str(), NULL)); + if (err) { + throw err; + } + } + + inline void Context::read_from_memory(const void* mem, size_t size, const ReadingOptions& /*opts*/) + { + Error err = Error(heif_context_read_from_memory(m_context.get(), mem, size, NULL)); + if (err) { + throw err; + } + } + + inline void Context::read_from_memory_without_copy(const void* mem, size_t size, const ReadingOptions& /*opts*/) + { + Error err = Error(heif_context_read_from_memory_without_copy(m_context.get(), mem, size, NULL)); + if (err) { + throw err; + } + } + + + inline int64_t heif_reader_trampoline_get_position(void* userdata) + { + Context::Reader* reader = (Context::Reader*) userdata; + return reader->get_position(); + } + + inline int heif_reader_trampoline_read(void* data, size_t size, void* userdata) + { + Context::Reader* reader = (Context::Reader*) userdata; + return reader->read(data, size); + } + + inline int heif_reader_trampoline_seek(int64_t position, void* userdata) + { + Context::Reader* reader = (Context::Reader*) userdata; + return reader->seek(position); + } + + inline heif_reader_grow_status heif_reader_trampoline_wait_for_file_size(int64_t target_size, void* userdata) + { + Context::Reader* reader = (Context::Reader*) userdata; + return reader->wait_for_file_size(target_size); + } + + + static struct heif_reader heif_reader_trampoline = + { + 1, + heif_reader_trampoline_get_position, + heif_reader_trampoline_read, + heif_reader_trampoline_seek, + heif_reader_trampoline_wait_for_file_size + }; + + inline void Context::read_from_reader(Reader& reader, const ReadingOptions& /*opts*/) + { + Error err = Error(heif_context_read_from_reader(m_context.get(), &heif_reader_trampoline, + &reader, NULL)); + if (err) { + throw err; + } + } + + + inline int Context::get_number_of_top_level_images() const noexcept + { + return heif_context_get_number_of_top_level_images(m_context.get()); + } + + inline bool Context::is_top_level_image_ID(heif_item_id id) const noexcept + { + return heif_context_is_top_level_image_ID(m_context.get(), id); + } + + inline std::vector Context::get_list_of_top_level_image_IDs() const noexcept + { + int num = get_number_of_top_level_images(); + std::vector IDs(num); + heif_context_get_list_of_top_level_image_IDs(m_context.get(), IDs.data(), num); + return IDs; + } + + inline heif_item_id Context::get_primary_image_ID() const + { + heif_item_id id; + Error err = Error(heif_context_get_primary_image_ID(m_context.get(), &id)); + if (err) { + throw err; + } + return id; + } + + inline ImageHandle Context::get_primary_image_handle() const + { + heif_image_handle* handle; + Error err = Error(heif_context_get_primary_image_handle(m_context.get(), &handle)); + if (err) { + throw err; + } + + return ImageHandle(handle); + } + + inline ImageHandle Context::get_image_handle(heif_item_id id) const + { + struct heif_image_handle* handle; + Error err = Error(heif_context_get_image_handle(m_context.get(), id, &handle)); + if (err) { + throw err; + } + return ImageHandle(handle); + } + +#if 0 + inline Context Context::wrap_without_releasing(heif_context* ctx) { + Context context; + context.m_context = std::shared_ptr(ctx, + [] (heif_context*) { /* NOP */ }); + return context; + } +#endif + + inline struct ::heif_error heif_writer_trampoline_write(struct heif_context* ctx, + const void* data, + size_t size, + void* userdata) + { + Context::Writer* writer = (Context::Writer*) userdata; + + (void) ctx; + + //Context context = Context::wrap_without_releasing(ctx); + //return writer->write(context, data, size); + return writer->write(data, size); + } + + static struct heif_writer heif_writer_trampoline = + { + 1, + &heif_writer_trampoline_write + }; + + inline void Context::write(Writer& writer) + { + Error err = Error(heif_context_write(m_context.get(), &heif_writer_trampoline, &writer)); + if (err) { + throw err; + } + } + + inline void Context::write_to_file(const std::string& filename) const + { + Error err = Error(heif_context_write_to_file(m_context.get(), filename.c_str())); + if (err) { + throw err; + } + } + + + inline ImageHandle::ImageHandle(heif_image_handle* handle) + { + if (handle != nullptr) { + m_image_handle = std::shared_ptr(handle, + [](heif_image_handle* h) { heif_image_handle_release(h); }); + } + } + + inline bool ImageHandle::is_primary_image() const noexcept + { + return heif_image_handle_is_primary_image(m_image_handle.get()) != 0; + } + + inline int ImageHandle::get_width() const noexcept + { + return heif_image_handle_get_width(m_image_handle.get()); + } + + inline int ImageHandle::get_height() const noexcept + { + return heif_image_handle_get_height(m_image_handle.get()); + } + + inline bool ImageHandle::has_alpha_channel() const noexcept + { + return heif_image_handle_has_alpha_channel(m_image_handle.get()) != 0; + } + + inline bool ImageHandle::is_premultiplied_alpha() const noexcept + { + return heif_image_handle_is_premultiplied_alpha(m_image_handle.get()) != 0; + } + + inline int ImageHandle::get_luma_bits_per_pixel() const noexcept + { + return heif_image_handle_get_luma_bits_per_pixel(m_image_handle.get()); + } + + inline int ImageHandle::get_chroma_bits_per_pixel() const noexcept + { + return heif_image_handle_get_chroma_bits_per_pixel(m_image_handle.get()); + } + + inline int ImageHandle::get_ispe_width() const noexcept + { + return heif_image_handle_get_ispe_width(m_image_handle.get()); + } + + inline int ImageHandle::get_ispe_height() const noexcept + { + return heif_image_handle_get_ispe_height(m_image_handle.get()); + } + + // ------------------------- depth images ------------------------- + + // TODO + + // ------------------------- thumbnails ------------------------- + + inline int ImageHandle::get_number_of_thumbnails() const noexcept + { + return heif_image_handle_get_number_of_thumbnails(m_image_handle.get()); + } + + inline std::vector ImageHandle::get_list_of_thumbnail_IDs() const noexcept + { + int num = get_number_of_thumbnails(); + std::vector IDs(num); + heif_image_handle_get_list_of_thumbnail_IDs(m_image_handle.get(), IDs.data(), num); + return IDs; + } + + inline ImageHandle ImageHandle::get_thumbnail(heif_item_id id) + { + heif_image_handle* handle; + Error err = Error(heif_image_handle_get_thumbnail(m_image_handle.get(), id, &handle)); + if (err) { + throw err; + } + + return ImageHandle(handle); + } + + inline Image ImageHandle::decode_image(heif_colorspace colorspace, heif_chroma chroma, + const DecodingOptions& /*options*/) + { + heif_image* out_img; + Error err = Error(heif_decode_image(m_image_handle.get(), + &out_img, + colorspace, + chroma, + nullptr)); //const struct heif_decoding_options* options); + if (err) { + throw err; + } + + return Image(out_img); + } + + + inline std::vector ImageHandle::get_list_of_metadata_block_IDs(const char* type_filter) const noexcept + { + int nBlocks = heif_image_handle_get_number_of_metadata_blocks(m_image_handle.get(), + type_filter); + std::vector ids(nBlocks); + int n = heif_image_handle_get_list_of_metadata_block_IDs(m_image_handle.get(), + type_filter, + ids.data(), nBlocks); + (void) n; + //assert(n==nBlocks); + return ids; + } + + inline std::string ImageHandle::get_metadata_type(heif_item_id metadata_id) const noexcept + { + return heif_image_handle_get_metadata_type(m_image_handle.get(), metadata_id); + } + + inline std::string ImageHandle::get_metadata_content_type(heif_item_id metadata_id) const noexcept + { + return heif_image_handle_get_metadata_content_type(m_image_handle.get(), metadata_id); + } + + inline std::vector ImageHandle::get_metadata(heif_item_id metadata_id) const + { + size_t data_size = heif_image_handle_get_metadata_size(m_image_handle.get(), + metadata_id); + + std::vector data(data_size); + + Error err = Error(heif_image_handle_get_metadata(m_image_handle.get(), + metadata_id, + data.data())); + if (err) { + throw err; + } + + return data; + } + + + inline ColorProfile_nclx::ColorProfile_nclx() + { + mProfile = heif_nclx_color_profile_alloc(); + } + + inline ColorProfile_nclx::~ColorProfile_nclx() + { + heif_nclx_color_profile_free(mProfile); + } + + inline heif_color_primaries ColorProfile_nclx::get_color_primaries() const + { return mProfile->color_primaries; } + + inline heif_transfer_characteristics ColorProfile_nclx::get_transfer_characteristics() const + { return mProfile->transfer_characteristics; } + + inline heif_matrix_coefficients ColorProfile_nclx::get_matrix_coefficients() const + { return mProfile->matrix_coefficients; } + + inline bool ColorProfile_nclx::is_full_range() const + { return mProfile->full_range_flag; } + + inline void ColorProfile_nclx::set_color_primaries(heif_color_primaries cp) + { mProfile->color_primaries = cp; } + + inline void ColorProfile_nclx::set_color_primaties(heif_color_primaries cp) + { set_color_primaries(cp); } + + inline void ColorProfile_nclx::set_transfer_characteristics(heif_transfer_characteristics tc) + { mProfile->transfer_characteristics = tc; } + + inline void ColorProfile_nclx::set_matrix_coefficients(heif_matrix_coefficients mc) + { mProfile->matrix_coefficients = mc; } + + inline void ColorProfile_nclx::set_full_range_flag(bool is_full_range) + { mProfile->full_range_flag = is_full_range; } + + + inline Image::Image(heif_image* image) + { + m_image = std::shared_ptr(image, + [](heif_image* h) { heif_image_release(h); }); + } + + + inline void Image::create(int width, int height, + enum heif_colorspace colorspace, + enum heif_chroma chroma) + { + heif_image* image; + Error err = Error(heif_image_create(width, height, colorspace, chroma, &image)); + if (err) { + m_image.reset(); + throw err; + } + else { + m_image = std::shared_ptr(image, + [](heif_image* h) { heif_image_release(h); }); + } + } + + inline void Image::add_plane(enum heif_channel channel, + int width, int height, int bit_depth) + { + Error err = Error(heif_image_add_plane(m_image.get(), channel, width, height, bit_depth)); + if (err) { + throw err; + } + } + + inline heif_colorspace Image::get_colorspace() const noexcept + { + return heif_image_get_colorspace(m_image.get()); + } + + inline heif_chroma Image::get_chroma_format() const noexcept + { + return heif_image_get_chroma_format(m_image.get()); + } + + inline int Image::get_width(enum heif_channel channel) const noexcept + { + return heif_image_get_width(m_image.get(), channel); + } + + inline int Image::get_height(enum heif_channel channel) const noexcept + { + return heif_image_get_height(m_image.get(), channel); + } + + inline int Image::get_bits_per_pixel(enum heif_channel channel) const noexcept + { + return heif_image_get_bits_per_pixel(m_image.get(), channel); + } + + inline int Image::get_bits_per_pixel_range(enum heif_channel channel) const noexcept + { + return heif_image_get_bits_per_pixel_range(m_image.get(), channel); + } + + inline bool Image::has_channel(enum heif_channel channel) const noexcept + { + return heif_image_has_channel(m_image.get(), channel); + } + + inline const uint8_t* Image::get_plane(enum heif_channel channel, int* out_stride) const noexcept + { + return heif_image_get_plane_readonly(m_image.get(), channel, out_stride); + } + + inline uint8_t* Image::get_plane(enum heif_channel channel, int* out_stride) noexcept + { + return heif_image_get_plane(m_image.get(), channel, out_stride); + } + + inline void Image::set_nclx_color_profile(const ColorProfile_nclx& nclx) + { + Error err = Error(heif_image_set_nclx_color_profile(m_image.get(), nclx.mProfile)); + if (err) { + throw err; + } + } + + // throws Error + inline ColorProfile_nclx Image::get_nclx_color_profile() const + { + heif_color_profile_nclx* nclx = nullptr; + Error err = Error(heif_image_get_nclx_color_profile(m_image.get(), &nclx)); + if (err) { + throw err; + } + + return ColorProfile_nclx(nclx); + } + + + inline heif_color_profile_type Image::get_color_profile_type() const + { + return heif_image_get_color_profile_type(m_image.get()); + } + + // throws Error + inline std::vector Image::get_raw_color_profile() const + { + auto size = heif_image_get_raw_color_profile_size(m_image.get()); + std::vector profile(size); + heif_image_get_raw_color_profile(m_image.get(), profile.data()); + return profile; + } + + inline void Image::set_raw_color_profile(heif_color_profile_type type, + const std::vector& data) + { + const char* profile_type = nullptr; + switch (type) { + case heif_color_profile_type_prof: + profile_type = "prof"; + break; + case heif_color_profile_type_rICC: + profile_type = "rICC"; + break; + default: + throw Error(heif_error_code::heif_error_Usage_error, + heif_suberror_Unspecified, + "invalid raw color profile type"); + break; + } + + Error err = Error(heif_image_set_raw_color_profile(m_image.get(), profile_type, + data.data(), data.size())); + if (err) { + throw err; + } + } + + inline bool Image::is_premultiplied_alpha() const noexcept + { + return heif_image_is_premultiplied_alpha(m_image.get()) != 0; + } + + inline void Image::set_premultiplied_alpha(bool is_premultiplied_alpha) noexcept + { + heif_image_set_premultiplied_alpha(m_image.get(), is_premultiplied_alpha); + } + + inline Image Image::scale_image(int width, int height, + const ScalingOptions&) const + { + heif_image* img; + Error err = Error(heif_image_scale_image(m_image.get(), &img, width, height, + nullptr)); // TODO: scaling options not defined yet + if (err) { + throw err; + } + + return Image(img); + } + + + inline std::vector + EncoderDescriptor::get_encoder_descriptors(enum heif_compression_format format_filter, + const char* name_filter) noexcept + { + int maxDescriptors = 10; + int nDescriptors; + for (;;) { + const struct heif_encoder_descriptor** descriptors; + descriptors = new const heif_encoder_descriptor* [maxDescriptors]; + + nDescriptors = heif_context_get_encoder_descriptors(nullptr, + format_filter, + name_filter, + descriptors, + maxDescriptors); + if (nDescriptors < maxDescriptors) { + std::vector outDescriptors; + outDescriptors.reserve(nDescriptors); + for (int i = 0; i < nDescriptors; i++) { + outDescriptors.push_back(EncoderDescriptor(descriptors[i])); + } + + delete[] descriptors; + + return outDescriptors; + } + else { + delete[] descriptors; + maxDescriptors *= 2; + } + } + } + + + inline std::string EncoderDescriptor::get_name() const noexcept + { + return heif_encoder_descriptor_get_name(m_descriptor); + } + + inline std::string EncoderDescriptor::get_id_name() const noexcept + { + return heif_encoder_descriptor_get_id_name(m_descriptor); + } + + inline enum heif_compression_format EncoderDescriptor::get_compression_format() const noexcept + { + return heif_encoder_descriptor_get_compression_format(m_descriptor); + } + + inline bool EncoderDescriptor::supportes_lossy_compression() const noexcept + { + return heif_encoder_descriptor_supports_lossy_compression(m_descriptor); + } + + inline bool EncoderDescriptor::supports_lossy_compression() const noexcept + { + return heif_encoder_descriptor_supports_lossy_compression(m_descriptor); + } + + inline bool EncoderDescriptor::supportes_lossless_compression() const noexcept + { + return heif_encoder_descriptor_supports_lossless_compression(m_descriptor); + } + + inline bool EncoderDescriptor::supports_lossless_compression() const noexcept + { + return heif_encoder_descriptor_supports_lossless_compression(m_descriptor); + } + + inline Encoder EncoderDescriptor::get_encoder() const + { + heif_encoder* encoder; + Error err = Error(heif_context_get_encoder(nullptr, m_descriptor, &encoder)); + if (err) { + throw err; + } + + return Encoder(encoder); + } + + + inline Encoder::Encoder(enum heif_compression_format format) + { + heif_encoder* encoder; + Error err = Error(heif_context_get_encoder_for_format(nullptr, format, &encoder)); + if (err) { + throw err; + } + + m_encoder = std::shared_ptr(encoder, + [](heif_encoder* e) { heif_encoder_release(e); }); + } + + inline Encoder::Encoder(struct heif_encoder* encoder) noexcept + { + m_encoder = std::shared_ptr(encoder, + [](heif_encoder* e) { heif_encoder_release(e); }); + } + + + inline EncoderParameter::EncoderParameter(const heif_encoder_parameter* param) + : m_parameter(param) + { + } + + inline std::string EncoderParameter::get_name() const noexcept + { + return heif_encoder_parameter_get_name(m_parameter); + } + + inline enum heif_encoder_parameter_type EncoderParameter::get_type() const noexcept + { + return heif_encoder_parameter_get_type(m_parameter); + } + + inline bool EncoderParameter::is_integer() const noexcept + { + return get_type() == heif_encoder_parameter_type_integer; + } + + inline bool EncoderParameter::get_valid_integer_range(int& out_minimum, int& out_maximum) + { + int have_minimum_maximum; + Error err = Error(heif_encoder_parameter_get_valid_integer_range(m_parameter, + &have_minimum_maximum, + &out_minimum, &out_maximum)); + if (err) { + throw err; + } + + return have_minimum_maximum; + } + + inline bool EncoderParameter::is_boolean() const noexcept + { + return get_type() == heif_encoder_parameter_type_boolean; + } + + inline bool EncoderParameter::is_string() const noexcept + { + return get_type() == heif_encoder_parameter_type_string; + } + + inline std::vector EncoderParameter::get_valid_string_values() const + { + const char* const* stringarray; + Error err = Error(heif_encoder_parameter_get_valid_string_values(m_parameter, + &stringarray)); + if (err) { + throw err; + } + + std::vector values; + for (int i = 0; stringarray[i]; i++) { + values.push_back(stringarray[i]); + } + + return values; + } + + inline std::vector Encoder::list_parameters() const noexcept + { + std::vector parameters; + + for (const struct heif_encoder_parameter* const* params = heif_encoder_list_parameters(m_encoder.get()); + *params; + params++) { + parameters.push_back(EncoderParameter(*params)); + } + + return parameters; + } + + + inline void Encoder::set_lossy_quality(int quality) + { + Error err = Error(heif_encoder_set_lossy_quality(m_encoder.get(), quality)); + if (err) { + throw err; + } + } + + inline void Encoder::set_lossless(bool enable_lossless) + { + Error err = Error(heif_encoder_set_lossless(m_encoder.get(), enable_lossless)); + if (err) { + throw err; + } + } + + inline void Encoder::set_integer_parameter(const std::string& parameter_name, int value) + { + Error err = Error(heif_encoder_set_parameter_integer(m_encoder.get(), parameter_name.c_str(), value)); + if (err) { + throw err; + } + } + + inline int Encoder::get_integer_parameter(const std::string& parameter_name) const + { + int value; + Error err = Error(heif_encoder_get_parameter_integer(m_encoder.get(), parameter_name.c_str(), &value)); + if (err) { + throw err; + } + return value; + } + + inline void Encoder::set_boolean_parameter(const std::string& parameter_name, bool value) + { + Error err = Error(heif_encoder_set_parameter_boolean(m_encoder.get(), parameter_name.c_str(), value)); + if (err) { + throw err; + } + } + + inline bool Encoder::get_boolean_parameter(const std::string& parameter_name) const + { + int value; + Error err = Error(heif_encoder_get_parameter_boolean(m_encoder.get(), parameter_name.c_str(), &value)); + if (err) { + throw err; + } + return value; + } + + inline void Encoder::set_string_parameter(const std::string& parameter_name, const std::string& value) + { + Error err = Error(heif_encoder_set_parameter_string(m_encoder.get(), parameter_name.c_str(), value.c_str())); + if (err) { + throw err; + } + } + + inline std::string Encoder::get_string_parameter(const std::string& parameter_name) const + { + const int max_size = 250; + char value[max_size]; + Error err = Error(heif_encoder_get_parameter_string(m_encoder.get(), parameter_name.c_str(), + value, max_size)); + if (err) { + throw err; + } + return value; + } + + inline void Encoder::set_parameter(const std::string& parameter_name, const std::string& parameter_value) + { + Error err = Error(heif_encoder_set_parameter(m_encoder.get(), parameter_name.c_str(), + parameter_value.c_str())); + if (err) { + throw err; + } + } + + inline std::string Encoder::get_parameter(const std::string& parameter_name) const + { + const int max_size = 250; + char value[max_size]; + Error err = Error(heif_encoder_get_parameter(m_encoder.get(), parameter_name.c_str(), + value, max_size)); + if (err) { + throw err; + } + return value; + } + + inline void Context::set_primary_image(ImageHandle& new_primary_image_handle) + { + Error err = Error(heif_context_set_primary_image(m_context.get(), + new_primary_image_handle.get_raw_image_handle())); + if (err) { + throw err; + } + } + + + inline Context::EncodingOptions::EncodingOptions() + { + // TODO: this is a bit hacky. It would be better to have an API function to set + // the options to default values. But I do not see any reason for that apart from + // this use-case. + + struct heif_encoding_options* default_options = heif_encoding_options_alloc(); + *static_cast(this) = *default_options; // copy over all options + heif_encoding_options_free(default_options); + } + + + inline ImageHandle Context::encode_image(const Image& img, Encoder& encoder, + const EncodingOptions& options) + { + struct heif_image_handle* image_handle; + + Error err = Error(heif_context_encode_image(m_context.get(), + img.m_image.get(), + encoder.m_encoder.get(), + &options, + &image_handle)); + if (err) { + throw err; + } + + return ImageHandle(image_handle); + } + + + inline ImageHandle Context::encode_thumbnail(const Image& image, + const ImageHandle& master_image_handle, + Encoder& encoder, + const EncodingOptions& options, + int bbox_size) + { + struct heif_image_handle* thumb_image_handle; + + Error err = Error(heif_context_encode_thumbnail(m_context.get(), + image.m_image.get(), + master_image_handle.get_raw_image_handle(), + encoder.m_encoder.get(), + &options, + bbox_size, + &thumb_image_handle)); + if (err) { + throw err; + } + + return ImageHandle(thumb_image_handle); + } + + + inline void Context::assign_thumbnail(const ImageHandle& thumbnail_image, + const ImageHandle& master_image) + { + Error err = Error(heif_context_assign_thumbnail(m_context.get(), + thumbnail_image.get_raw_image_handle(), + master_image.get_raw_image_handle())); + if (err) { + throw err; + } + } + + inline void Context::add_exif_metadata(const ImageHandle& master_image, + const void* data, int size) + { + Error err = Error(heif_context_add_exif_metadata(m_context.get(), + master_image.get_raw_image_handle(), + data, size)); + if (err) { + throw err; + } + } + + inline void Context::add_XMP_metadata(const ImageHandle& master_image, + const void* data, int size) + { + Error err = Error(heif_context_add_XMP_metadata(m_context.get(), + master_image.get_raw_image_handle(), + data, size)); + if (err) { + throw err; + } + } +} + + +#endif diff --git a/vcpkg/installed/x64-osx/include/libheif/heif_plugin.h b/vcpkg/installed/x64-osx/include/libheif/heif_plugin.h new file mode 100644 index 0000000..3a438bf --- /dev/null +++ b/vcpkg/installed/x64-osx/include/libheif/heif_plugin.h @@ -0,0 +1,306 @@ +/* + * HEIF codec. + * Copyright (c) 2017 Dirk Farin + * + * This file is part of libheif. + * + * libheif is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * libheif is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libheif. If not, see . + */ + +#ifndef LIBHEIF_HEIF_PLUGIN_H +#define LIBHEIF_HEIF_PLUGIN_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + + +// ==================================================================================================== +// This file is for codec plugin developers only. +// ==================================================================================================== + +// API versions table +// +// release decoder encoder enc.params +// ----------------------------------------- +// 1.0 1 N/A N/A +// 1.1 1 1 1 +// 1.4 1 1 2 +// 1.8 1 2 2 +// 1.13 2 3 2 +// 1.15 3 3 2 + + +// ==================================================================================================== +// Decoder plugin API +// In order to decode images in other formats than HEVC, additional compression codecs can be +// added as plugins. A plugin has to implement the functions specified in heif_decoder_plugin +// and the plugin has to be registered to the libheif library using heif_register_decoder(). + +struct heif_decoder_plugin +{ + // API version supported by this plugin (see table above for supported versions) + int plugin_api_version; + + + // --- version 1 functions --- + + // Human-readable name of the plugin + const char* (* get_plugin_name)(); + + // Global plugin initialization (may be NULL) + void (* init_plugin)(); + + // Global plugin deinitialization (may be NULL) + void (* deinit_plugin)(); + + // Query whether the plugin supports decoding of the given format + // Result is a priority value. The plugin with the largest value wins. + // Default priority is 100. Returning 0 indicates that the plugin cannot decode this format. + int (* does_support_format)(enum heif_compression_format format); + + // Create a new decoder context for decoding an image + struct heif_error (* new_decoder)(void** decoder); + + // Free the decoder context (heif_image can still be used after destruction) + void (* free_decoder)(void* decoder); + + // Push more data into the decoder. This can be called multiple times. + // This may not be called after any decode_*() function has been called. + struct heif_error (* push_data)(void* decoder, const void* data, size_t size); + + + // --- After pushing the data into the decoder, the decode functions may be called only once. + + struct heif_error (* decode_image)(void* decoder, struct heif_image** out_img); + + + // --- version 2 functions will follow below ... --- + + void (*set_strict_decoding)(void* decoder, int flag); + + // If not NULL, this can provide a specialized function to convert YCbCr to sRGB, because + // only the codec itself knows how to interpret the chroma samples and their locations. + /* + struct heif_error (*convert_YCbCr_to_sRGB)(void* decoder, + struct heif_image* in_YCbCr_img, + struct heif_image** out_sRGB_img); + + */ + + // Reset decoder, such that we can feed in new data for another image. + // void (*reset_image)(void* decoder); + + // --- version 3 functions will follow below ... --- + + const char* id_name; + + // --- version 4 functions will follow below ... --- +}; + + +enum heif_encoded_data_type +{ + heif_encoded_data_type_HEVC_header = 1, + heif_encoded_data_type_HEVC_image = 2, + heif_encoded_data_type_HEVC_depth_SEI = 3 +}; + + +// Specifies the class of the input image content. +// The encoder may want to encode different classes with different parameters +// (e.g. always encode alpha lossless) +enum heif_image_input_class +{ + heif_image_input_class_normal = 1, + heif_image_input_class_alpha = 2, + heif_image_input_class_depth = 3, + heif_image_input_class_thumbnail = 4 +}; + + +struct heif_encoder_plugin +{ + // API version supported by this plugin (see table above for supported versions) + int plugin_api_version; + + + // --- version 1 functions --- + + // The compression format generated by this plugin. + enum heif_compression_format compression_format; + + // Short name of the encoder that can be used as command line parameter when selecting an encoder. + // Hence, it should stay stable and not contain any version numbers that will change. + const char* id_name; + + // Default priority is 100. + int priority; + + + // Feature support + int supports_lossy_compression; + int supports_lossless_compression; + + + // Human-readable name of the plugin + const char* (* get_plugin_name)(); + + // Global plugin initialization (may be NULL) + void (* init_plugin)(); + + // Global plugin cleanup (may be NULL). + // Free data that was allocated in init_plugin() + void (* cleanup_plugin)(); + + // Create a new decoder context for decoding an image + struct heif_error (* new_encoder)(void** encoder); + + // Free the decoder context (heif_image can still be used after destruction) + void (* free_encoder)(void* encoder); + + struct heif_error (* set_parameter_quality)(void* encoder, int quality); + + struct heif_error (* get_parameter_quality)(void* encoder, int* quality); + + struct heif_error (* set_parameter_lossless)(void* encoder, int lossless); + + struct heif_error (* get_parameter_lossless)(void* encoder, int* lossless); + + struct heif_error (* set_parameter_logging_level)(void* encoder, int logging); + + struct heif_error (* get_parameter_logging_level)(void* encoder, int* logging); + + const struct heif_encoder_parameter** (* list_parameters)(void* encoder); + + struct heif_error (* set_parameter_integer)(void* encoder, const char* name, int value); + + struct heif_error (* get_parameter_integer)(void* encoder, const char* name, int* value); + + struct heif_error (* set_parameter_boolean)(void* encoder, const char* name, int value); + + struct heif_error (* get_parameter_boolean)(void* encoder, const char* name, int* value); + + struct heif_error (* set_parameter_string)(void* encoder, const char* name, const char* value); + + struct heif_error (* get_parameter_string)(void* encoder, const char* name, char* value, int value_size); + + // Replace the input colorspace/chroma with the one that is supported by the encoder and that + // comes as close to the input colorspace/chroma as possible. + void (* query_input_colorspace)(enum heif_colorspace* inout_colorspace, + enum heif_chroma* inout_chroma); + + // Encode an image. + // After pushing an image into the encoder, you should call get_compressed_data() to + // get compressed data until it returns a NULL data pointer. + struct heif_error (* encode_image)(void* encoder, const struct heif_image* image, + enum heif_image_input_class image_class); + + // Get a packet of decoded data. The data format depends on the codec. + // For HEVC, each packet shall contain exactly one NAL, starting with the NAL header without startcode. + struct heif_error (* get_compressed_data)(void* encoder, uint8_t** data, int* size, + enum heif_encoded_data_type* type); + + + // --- version 2 --- + + void (* query_input_colorspace2)(void* encoder, + enum heif_colorspace* inout_colorspace, + enum heif_chroma* inout_chroma); + + // --- version 3 --- + + // The encoded image size may be different from the input frame size, e.g. because + // of required rounding, or a required minimum size. Use this function to return + // the encoded size for a given input image size. + // You may set this to NULL if no padding is required for any image size. + void (* query_encoded_size)(void* encoder, uint32_t input_width, uint32_t input_height, + uint32_t* encoded_width, uint32_t* encoded_height); + + // --- version 4 functions will follow below ... --- +}; + + +// Names for standard parameters. These should only be used by the encoder plugins. +#define heif_encoder_parameter_name_quality "quality" +#define heif_encoder_parameter_name_lossless "lossless" + +// For use only by the encoder plugins. +// Application programs should use the access functions. +// NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding) +struct heif_encoder_parameter +{ + int version; // current version: 2 + + // --- version 1 fields --- + + const char* name; + enum heif_encoder_parameter_type type; + + union + { + struct + { + int default_value; + + uint8_t have_minimum_maximum; // bool + int minimum; + int maximum; + + int* valid_values; + int num_valid_values; + } integer; + + struct + { + const char* default_value; + + const char* const* valid_values; + } string; // NOLINT + + struct + { + int default_value; + } boolean; + }; + + // --- version 2 fields + + int has_default; +}; + + +extern struct heif_error heif_error_ok; +extern struct heif_error heif_error_unsupported_parameter; +extern struct heif_error heif_error_invalid_parameter_value; + +#define HEIF_WARN_OR_FAIL(strict, image, cmd, cleanupBlock) \ +{ struct heif_error e = cmd; \ + if (e.code != heif_error_Ok) { \ + if (strict) { \ + cleanupBlock \ + return e; \ + } \ + else { \ + heif_image_add_decoding_warning(image, e); \ + } \ + } \ +} +#ifdef __cplusplus +} +#endif + +#endif diff --git a/vcpkg/installed/x64-osx/include/libheif/heif_properties.h b/vcpkg/installed/x64-osx/include/libheif/heif_properties.h new file mode 100644 index 0000000..4ed15c8 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/libheif/heif_properties.h @@ -0,0 +1,138 @@ +/* + * HEIF codec. + * Copyright (c) 2017-2023 Dirk Farin + * + * This file is part of libheif. + * + * libheif is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * libheif is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libheif. If not, see . + */ + +#ifndef LIBHEIF_HEIF_PROPERTIES_H +#define LIBHEIF_HEIF_PROPERTIES_H + +#include "libheif/heif.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// ------------------------- item properties ------------------------- + +enum heif_item_property_type +{ +// heif_item_property_unknown = -1, + heif_item_property_type_invalid = 0, + heif_item_property_type_user_description = heif_fourcc('u', 'd', 'e', 's'), + heif_item_property_type_transform_mirror = heif_fourcc('i', 'm', 'i', 'r'), + heif_item_property_type_transform_rotation = heif_fourcc('i', 'r', 'o', 't'), + heif_item_property_type_transform_crop = heif_fourcc('c', 'l', 'a', 'p'), + heif_item_property_type_image_size = heif_fourcc('i', 's', 'p', 'e') +}; + +// Get the heif_property_id for a heif_item_id. +// You may specify which property 'type' you want to receive. +// If you specify 'heif_item_property_type_invalid', all properties associated to that item are returned. +// The number of properties is returned, which are not more than 'count' if (out_list != nullptr). +// By setting out_list==nullptr, you can query the number of properties, 'count' is ignored. +LIBHEIF_API +int heif_item_get_properties_of_type(const struct heif_context* context, + heif_item_id id, + enum heif_item_property_type type, + heif_property_id* out_list, + int count); + +// Returns all transformative properties in the correct order. +// This includes "irot", "imir", "clap". +// The number of properties is returned, which are not more than 'count' if (out_list != nullptr). +// By setting out_list==nullptr, you can query the number of properties, 'count' is ignored. +LIBHEIF_API +int heif_item_get_transformation_properties(const struct heif_context* context, + heif_item_id id, + heif_property_id* out_list, + int count); + +LIBHEIF_API +enum heif_item_property_type heif_item_get_property_type(const struct heif_context* context, + heif_item_id id, + heif_property_id property_id); + +// The strings are managed by libheif. They will be deleted in heif_property_user_description_release(). +struct heif_property_user_description +{ + int version; + + // version 1 + + const char* lang; + const char* name; + const char* description; + const char* tags; +}; + +// Get the "udes" user description property content. +// Undefined strings are returned as empty strings. +LIBHEIF_API +struct heif_error heif_item_get_property_user_description(const struct heif_context* context, + heif_item_id itemId, + heif_property_id propertyId, + struct heif_property_user_description** out); + +// Add a "udes" user description property to the item. +// If any string pointers are NULL, an empty string will be used instead. +LIBHEIF_API +struct heif_error heif_item_add_property_user_description(const struct heif_context* context, + heif_item_id itemId, + const struct heif_property_user_description* description, + heif_property_id* out_propertyId); + +// Release all strings and the object itself. +// Only call for objects that you received from heif_item_get_property_user_description(). +LIBHEIF_API +void heif_property_user_description_release(struct heif_property_user_description*); + +enum heif_transform_mirror_direction +{ + heif_transform_mirror_direction_invalid = -1, + heif_transform_mirror_direction_vertical = 0, // flip image vertically + heif_transform_mirror_direction_horizontal = 1 // flip image horizontally +}; + +// Will return 'heif_transform_mirror_direction_invalid' in case of error. +LIBHEIF_API +enum heif_transform_mirror_direction heif_item_get_property_transform_mirror(const struct heif_context* context, + heif_item_id itemId, + heif_property_id propertyId); + +// Returns only 0, 90, 180, or 270 angle values. +// Returns -1 in case of error (but it will only return an error in case of wrong usage). +LIBHEIF_API +int heif_item_get_property_transform_rotation_ccw(const struct heif_context* context, + heif_item_id itemId, + heif_property_id propertyId); + +// Returns the number of pixels that should be removed from the four edges. +// Because of the way this data is stored, you have to pass the image size at the moment of the crop operation +// to compute the cropped border sizes. +LIBHEIF_API +void heif_item_get_property_transform_crop_borders(const struct heif_context* context, + heif_item_id itemId, + heif_property_id propertyId, + int image_width, int image_height, + int* left, int* top, int* right, int* bottom); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/vcpkg/installed/x64-osx/include/libheif/heif_regions.h b/vcpkg/installed/x64-osx/include/libheif/heif_regions.h new file mode 100644 index 0000000..63083fb --- /dev/null +++ b/vcpkg/installed/x64-osx/include/libheif/heif_regions.h @@ -0,0 +1,866 @@ +/* + * HEIF codec. + * Copyright (c) 2023 Dirk Farin + * Copyright (c) 2023 Brad Hards + * + * This file is part of libheif. + * + * libheif is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * libheif is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libheif. If not, see . + */ + +#ifndef LIBHEIF_HEIF_REGIONS_H +#define LIBHEIF_HEIF_REGIONS_H + +#include "libheif/heif.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// --- region items and annotations + +// See ISO/IEC 23008-12:2022 Section 6.10 "Region items and region annotations" + +struct heif_region_item; + +/** + * Region type. + * + * Each region item will contain zero or more regions, which may have different geometry or + * mask representations. +*/ +enum heif_region_type +{ + /** + * Point gemetry. + * + * The region is represented by a single point. + */ + heif_region_type_point = 0, + + /** + * Rectangle geometry. + * + * The region is represented by a top left position, and a size defined + * by a width and height. All of the interior points and the edge are + * part of the region. + */ + heif_region_type_rectangle = 1, + + /** + * Ellipse geometry. + * + * The region is represented by a centre point, and radii in the X and + * Y directions. All of the interior points and the edge are part of the + * region. + */ + heif_region_type_ellipse = 2, + + /** + * Polygon geometry. + * + * The region is represented by a sequence of points, which is considered + * implicitly closed. All of the interior points and the edge are part + * of the region. + */ + heif_region_type_polygon = 3, + + /** + * Reference mask. + * + * The region geometry is described by the pixels in another image item, + * which has a item reference of type `mask` from the region item to the + * image item containing the mask. + * + * The image item containing the mask is one of: + * + * - a mask item (see ISO/IEC 23008-12:2022 Section 6.10.2), or a derived + * image from a mask item + * + * - an image item in monochrome format (4:0:0 chroma) + * + * - an image item in colour format with luma and chroma planes (e.g. 4:2:0) + * + * If the pixel value is equal to the minimum sample value (e.g. 0 for unsigned + * integer), the pixel is not part of the region. If the pixel value is equal + * to the maximum sample value (e.g. 255 for 8 bit unsigned integer), the pixel + * is part of the region. If the pixel value is between the minimum sample value + * and maximum sample value, the pixel value represents an (application defined) + * probability that the pixel is part of the region, where higher pixel values + * correspond to higher probability values. + */ + heif_region_type_referenced_mask = 4, + + /** + * Inline mask. + * + * The region geometry is described by a sequence of bits stored in inline + * in the region, one bit per pixel. If the bit value is `1`, the pixel is + * part of the region. If the bit value is `0`, the pixel is not part of the + * region. + */ + heif_region_type_inline_mask = 5, + + /** + * Polyline geometry. + * + * The region is represented by a sequence of points, which are not + * considered to form a closed surface. Only the edge is part of the region. + */ + heif_region_type_polyline = 6 +}; + +struct heif_region; + +/** + * Get the number of region items that are attached to an image. + * + * @param image_handle the image handle for the image to query. + * @return the number of region items, which can be zero. + */ +LIBHEIF_API +int heif_image_handle_get_number_of_region_items(const struct heif_image_handle* image_handle); + +/** + * Get the region item identifiers for the region items attached to an image. + * + * Possible usage (in C++): + * @code + * int numRegionItems = heif_image_handle_get_number_of_region_items(handle); + * if (numRegionItems > 0) { + * std::vector region_item_ids(numRegionItems); + * heif_image_handle_get_list_of_region_item_ids(handle, region_item_ids.data(), numRegionItems); + * // use region item ids + * } + * @endcode + * + * @param image_handle the image handle for the parent image to query + * @param region_item_ids_array array to put the item identifiers into + * @param max_count the maximum number of region identifiers + * @return the number of region item identifiers that were returned. + */ +LIBHEIF_API +int heif_image_handle_get_list_of_region_item_ids(const struct heif_image_handle* image_handle, + heif_item_id* region_item_ids_array, + int max_count); + +/** + * Get the region item. + * + * Caller is responsible for release of the output heif_region_item with heif_region_item_release(). + * + * @param context the context to get the region item from, usually from a file operation + * @param region_item_id the identifier for the region item + * @param out pointer to pointer to the resulting region item + * @return heif_error_ok on success, or an error value indicating the problem + */ +LIBHEIF_API +struct heif_error heif_context_get_region_item(const struct heif_context* context, + heif_item_id region_item_id, + struct heif_region_item** out); + +/** + * Get the item identifier for a region item. + * + * @param region_item the region item to query + * @return the region item identifier (or -1 if the region_item is null) + */ +LIBHEIF_API +heif_item_id heif_region_item_get_id(struct heif_region_item* region_item); + +/** + * Release a region item. + * + * This should be called on items from heif_context_get_region_item(). + * + * @param region_item the item to release. + */ +LIBHEIF_API +void heif_region_item_release(struct heif_region_item* region_item); + +/** + * Get the reference size for a region item. + * + * The reference size specifies the coordinate space used for the region items. + * When the reference size does not match the image size, the regions need to be + * scaled to correspond. + * + * @param out_width the return value for the reference width (before any transformation) + * @param out_height the return value for the reference height (before any transformation) + */ +LIBHEIF_API +void heif_region_item_get_reference_size(struct heif_region_item*, uint32_t* out_width, uint32_t* out_height); + +/** + * Get the number of regions within a region item. + * + * @param region_item the region item to query. + * @return the number of regions +*/ +LIBHEIF_API +int heif_region_item_get_number_of_regions(const struct heif_region_item* region_item); + +/** + * Get the regions that are part of a region item. + * + * Caller is responsible for releasing the returned `heif_region` objects, using heif_region_release() + * on each region, or heif_region_release_many() on the returned array. + * + * Possible usage (in C++): + * @code + * int num_regions = heif_image_handle_get_number_of_regions(region_item); + * if (num_regions > 0) { + * std::vector regions(num_regions); + * int n = heif_region_item_get_list_of_regions(region_item, regions.data(), (int)regions.size()); + * // use regions + * heif_region_release_many(regions.data(), n); + * } + * @endcode + * + * @param region_item the region_item to query + * @param out_regions_array array to put the region pointers into + * @param max_count the maximum number of regions, which needs to correspond to the size of the out_regions_array + * @return the number of regions that were returned. + */ +LIBHEIF_API +int heif_region_item_get_list_of_regions(const struct heif_region_item* region_item, + struct heif_region** out_regions_array, + int max_count); + +/** + * Release a region. + * + * This should be called on regions from heif_region_item_get_list_of_regions(). + * + * @param region the region to release. + * + * \sa heif_region_release_many() to release the whole list + */ +LIBHEIF_API +void heif_region_release(const struct heif_region* region); + +/** + * Release a list of regions. + * + * This should be called on the list of regions from heif_region_item_get_list_of_regions(). + * + * @param regions_array the regions to release. + * @param num_items the number of items in the array + * + * \sa heif_region_release() to release a single region + */ +LIBHEIF_API +void heif_region_release_many(const struct heif_region* const* regions_array, int num_items); + +/** + * Get the region type for a specified region. + * + * @param region the region to query + * @return the corresponding region type as an enumeration value + */ +LIBHEIF_API +enum heif_region_type heif_region_get_type(const struct heif_region* region); + +// When querying the region geometry, there is a version without and a version with "_transformed" suffix. +// The version without returns the coordinates in the reference coordinate space. +// The version with "_transformed" suffix give the coordinates in pixels after all transformative properties have been applied. + +/** + * Get the values for a point region. + * + * This returns the coordinates in the reference coordinate space (from the parent region item). + * + * @param region the region to query, which must be of type #heif_region_type_point. + * @param out_x the X coordinate, where 0 is the left-most column. + * @param out_y the Y coordinate, where 0 is the top-most row. + * @return heif_error_ok on success, or an error value indicating the problem on failure + * + * \sa heif_region_get_point_transformed() for a version in pixels after all transformative properties have been applied. + */ +LIBHEIF_API +struct heif_error heif_region_get_point(const struct heif_region* region, int32_t* out_x, int32_t* out_y); + +/** + * Get the transformed values for a point region. + * + * This returns the coordinates in pixels after all transformative properties have been applied. + * + * @param region the region to query, which must be of type #heif_region_type_point. + * @param image_id the identifier for the image to transform / scale the region to + * @param out_x the X coordinate, where 0 is the left-most column. + * @param out_y the Y coordinate, where 0 is the top-most row. + * @return heif_error_ok on success, or an error value indicating the problem on failure + * + * \sa heif_region_get_point() for a version that returns the values in the reference coordinate space. + */ +LIBHEIF_API +struct heif_error heif_region_get_point_transformed(const struct heif_region* region, heif_item_id image_id, double* out_x, double* out_y); + +/** + * Get the values for a rectangle region. + * + * This returns the values in the reference coordinate space (from the parent region item). + * The rectangle is represented by a top left corner position, and a size defined + * by a width and height. All of the interior points and the edge are + * part of the region. + * + * @param region the region to query, which must be of type #heif_region_type_rectangle. + * @param out_x the X coordinate for the top left corner, where 0 is the left-most column. + * @param out_y the Y coordinate for the top left corner, where 0 is the top-most row. + * @param out_width the width of the rectangle + * @param out_height the height of the rectangle + * @return heif_error_ok on success, or an error value indicating the problem on failure + * + * \sa heif_region_get_rectangle_transformed() for a version in pixels after all transformative properties have been applied. + */ +LIBHEIF_API +struct heif_error heif_region_get_rectangle(const struct heif_region* region, + int32_t* out_x, int32_t* out_y, + uint32_t* out_width, uint32_t* out_height); + +/** + * Get the transformed values for a rectangle region. + * + * This returns the coordinates in pixels after all transformative properties have been applied. + * The rectangle is represented by a top left corner position, and a size defined + * by a width and height. All of the interior points and the edge are + * part of the region. + * + * @param region the region to query, which must be of type #heif_region_type_rectangle. + * @param image_id the identifier for the image to transform / scale the region to + * @param out_x the X coordinate for the top left corner, where 0 is the left-most column. + * @param out_y the Y coordinate for the top left corner, where 0 is the top-most row. + * @param out_width the width of the rectangle + * @param out_height the height of the rectangle + * @return heif_error_ok on success, or an error value indicating the problem on failure + * + * \sa heif_region_get_rectangle() for a version that returns the values in the reference coordinate space. + */ +LIBHEIF_API +struct heif_error heif_region_get_rectangle_transformed(const struct heif_region* region, + heif_item_id image_id, + double* out_x, double* out_y, + double* out_width, double* out_height); + +/** + * Get the values for an ellipse region. + * + * This returns the values in the reference coordinate space (from the parent region item). + * The ellipse is represented by a centre position, and a size defined + * by radii in the X and Y directions. All of the interior points and the edge are + * part of the region. + * + * @param region the region to query, which must be of type #heif_region_type_ellipse. + * @param out_x the X coordinate for the centre point, where 0 is the left-most column. + * @param out_y the Y coordinate for the centre point, where 0 is the top-most row. + * @param out_radius_x the radius value in the X direction. + * @param out_radius_y the radius value in the Y direction + * @return heif_error_ok on success, or an error value indicating the problem on failure + * + * \sa heif_region_get_ellipse_transformed() for a version in pixels after all transformative properties have been applied. + */ +LIBHEIF_API +struct heif_error heif_region_get_ellipse(const struct heif_region* region, + int32_t* out_x, int32_t* out_y, + uint32_t* out_radius_x, uint32_t* out_radius_y); + + +/** + * Get the transformed values for an ellipse region. + * + * This returns the coordinates in pixels after all transformative properties have been applied. + * The ellipse is represented by a centre position, and a size defined + * by radii in the X and Y directions. All of the interior points and the edge are + * part of the region. + * + * @param region the region to query, which must be of type #heif_region_type_ellipse. + * @param image_id the identifier for the image to transform / scale the region to + * @param out_x the X coordinate for the centre point, where 0 is the left-most column. + * @param out_y the Y coordinate for the centre point, where 0 is the top-most row. + * @param out_radius_x the radius value in the X direction. + * @param out_radius_y the radius value in the Y direction + * @return heif_error_ok on success, or an error value indicating the problem on failure + * + * \sa heif_region_get_ellipse() for a version that returns the values in the reference coordinate space. + */ +LIBHEIF_API +struct heif_error heif_region_get_ellipse_transformed(const struct heif_region* region, + heif_item_id image_id, + double* out_x, double* out_y, + double* out_radius_x, double* out_radius_y); + +/** + * Get the number of points in a polygon. + * + * @param region the region to query, which must be of type #heif_region_type_polygon + * @return the number of points, or -1 on error. + */ +LIBHEIF_API +int heif_region_get_polygon_num_points(const struct heif_region* region); + +/** + * Get the points in a polygon region. + * + * This returns the values in the reference coordinate space (from the parent region item). + * + * A polygon is a sequence of points that form a closed shape. The first point does + * not need to be repeated as the last point. All of the interior points and the edge are + * part of the region. + * The points are returned as pairs of X,Y coordinates, in the order X1, + * Y1, X2, Y2, ..., Xn, Yn. + * + * @param region the region to equery, which must be of type #heif_region_type_polygon + * @param out_pts_array the array to return the points in, which must have twice as many entries as there are points + * in the polygon. + * @return heif_error_ok on success, or an error value indicating the problem on failure + * + * \sa heif_region_get_polygon_points_transformed() for a version in pixels after all transformative properties have been applied. + */ +LIBHEIF_API +struct heif_error heif_region_get_polygon_points(const struct heif_region* region, + int32_t* out_pts_array); + +/** + * Get the transformed points in a polygon region. + * + * This returns the coordinates in pixels after all transformative properties have been applied. + * + * A polygon is a sequence of points that form a closed shape. The first point does + * not need to be repeated as the last point. All of the interior points and the edge are + * part of the region. + * The points are returned as pairs of X,Y coordinates, in the order X1, + * Y1, X2, Y2, ..., Xn, Yn. + * + * @param region the region to equery, which must be of type #heif_region_type_polygon + * @param image_id the identifier for the image to transform / scale the region to + * @param out_pts_array the array to return the points in, which must have twice as many entries as there are points + * in the polygon. + * @return heif_error_ok on success, or an error value indicating the problem on failure + * + * \sa heif_region_get_polygon_points() for a version that returns the values in the reference coordinate space. + */ +LIBHEIF_API +struct heif_error heif_region_get_polygon_points_transformed(const struct heif_region* region, + heif_item_id image_id, + double* out_pts_array); +/** + * Get the number of points in a polyline. + * + * @param region the region to query, which must be of type #heif_region_type_polyline + * @return the number of points, or -1 on error. + */ +LIBHEIF_API +int heif_region_get_polyline_num_points(const struct heif_region* region); + +/** + * Get the points in a polyline region. + * + * This returns the values in the reference coordinate space (from the parent region item). + * + * A polyline is a sequence of points that does not form a closed shape. Even if the + * polyline is closed, the only points that are part of the region are those that + * intersect (even minimally) a one-pixel line drawn along the polyline. + * The points are provided as pairs of X,Y coordinates, in the order X1, + * Y1, X2, Y2, ..., Xn, Yn. + * + * Possible usage (in C++): + * @code + * int num_polyline_points = heif_region_get_polyline_num_points(region); + * if (num_polyline_points > 0) { + * std::vector polyline(num_polyline_points * 2); + * heif_region_get_polyline_points(region, polyline.data()); + * // do something with points ... + * } + * @endcode + * + * @param region the region to equery, which must be of type #heif_region_type_polyline + * @param out_pts_array the array to return the points in, which must have twice as many entries as there are points + * in the polyline. + * @return heif_error_ok on success, or an error value indicating the problem on failure + * + * \sa heif_region_get_polyline_points_transformed() for a version in pixels after all transformative properties have been applied. + */ +LIBHEIF_API +struct heif_error heif_region_get_polyline_points(const struct heif_region* region, + int32_t* out_pts_array); + +/** + * Get the transformed points in a polyline region. + * + * This returns the coordinates in pixels after all transformative properties have been applied. + * + * A polyline is a sequence of points that does not form a closed shape. Even if the + * polyline is closed, the only points that are part of the region are those that + * intersect (even minimally) a one-pixel line drawn along the polyline. + * The points are provided as pairs of X,Y coordinates, in the order X1, + * Y1, X2, Y2, ..., Xn, Yn. + * + * @param region the region to query, which must be of type #heif_region_type_polyline + * @param image_id the identifier for the image to transform / scale the region to + * @param out_pts_array the array to return the points in, which must have twice as many entries as there are points + * in the polyline. + * @return heif_error_ok on success, or an error value indicating the problem on failure + * + * \sa heif_region_get_polyline_points() for a version that returns the values in the reference coordinate space. + */ +LIBHEIF_API +struct heif_error heif_region_get_polyline_points_transformed(const struct heif_region* region, + heif_item_id image_id, + double* out_pts_array); + +/** + * Get a referenced item mask region. + * + * This returns the values in the reference coordinate space (from the parent region item). + * The mask location is represented by a top left corner position, and a size defined + * by a width and height. The value of each sample in that mask identifies whether the + * corresponding pixel is part of the region. + * + * The mask is provided as an image in another item. The image item containing the mask + * is one of: + * + * - a mask item (see ISO/IEC 23008-12:2022 Section 6.10.2), or a derived + * image from a mask item + * + * - an image item in monochrome format (4:0:0 chroma) + * + * - an image item in colour format with luma and chroma planes (e.g. 4:2:0) + * + * If the pixel value is equal to the minimum sample value (e.g. 0 for unsigned + * integer), the pixel is not part of the region. If the pixel value is equal + * to the maximum sample value (e.g. 255 for 8 bit unsigned integer), the pixel + * is part of the region. If the pixel value is between the minimum sample value + * and maximum sample value, the pixel value represents an (application defined) + * probability that the pixel is part of the region, where higher pixel values + * correspond to higher probability values. + * + * @param region the region to query, which must be of type #heif_region_type_referenced_mask. + * @param out_x the X coordinate for the top left corner, where 0 is the left-most column. + * @param out_y the Y coordinate for the top left corner, where 0 is the top-most row. + * @param out_width the width of the mask region + * @param out_height the height of the mask region + * @param out_mask_item_id the item identifier for the image that provides the mask. + * @return heif_error_ok on success, or an error value indicating the problem on failure + */ +LIBHEIF_API +struct heif_error heif_region_get_referenced_mask_ID(const struct heif_region* region, + int32_t* out_x, int32_t* out_y, + uint32_t* out_width, uint32_t* out_height, + heif_item_id *out_mask_item_id); + +/** + * Get the length of the data in an inline mask region. + * + * @param region the region to query, which must be of type #heif_region_type_inline_mask. + * @return the number of bytes in the mask data, or 0 on error. + */ +LIBHEIF_API +size_t heif_region_get_inline_mask_data_len(const struct heif_region* region); + + +/** + * Get data for an inline mask region. + * + * This returns the values in the reference coordinate space (from the parent region item). + * The mask location is represented by a top left corner position, and a size defined + * by a width and height. + * + * The mask is held as inline data on the region, one bit per pixel, most significant + * bit first pixel, no padding. If the bit value is `1`, the corresponding pixel is + * part of the region. If the bit value is `0`, the corresponding pixel is not part of the + * region. + * + * Possible usage (in C++): + * @code + * long unsigned int data_len = heif_region_get_inline_mask_data_len(region); + * int32_t x, y; + * uint32_t width, height; + * std::vector mask_data(data_len); + * err = heif_region_get_inline_mask(region, &x, &y, &width, &height, mask_data.data()); + * @endcode + * + * @param region the region to query, which must be of type #heif_region_type_inline_mask. + * @param out_x the X coordinate for the top left corner, where 0 is the left-most column. + * @param out_y the Y coordinate for the top left corner, where 0 is the top-most row. + * @param out_width the width of the mask region + * @param out_height the height of the mask region + * @param out_mask_data the location to return the mask data + * @return heif_error_ok on success, or an error value indicating the problem on failure + */ +LIBHEIF_API +struct heif_error heif_region_get_inline_mask_data(const struct heif_region* region, + int32_t* out_x, int32_t* out_y, + uint32_t* out_width, uint32_t* out_height, + uint8_t* out_mask_data); + +/** + * Get a mask region image. + * + * This returns the values in the reference coordinate space (from the parent region item). + * The mask location is represented by a top left corner position, and a size defined + * by a width and height. + * + * This function works when the passed region is either a heif_region_type_referenced_mask or + * a heif_region_type_inline_mask. + * The returned image is a monochrome image where each pixel represents the (scaled) probability + * of the pixel being part of the mask. + * + * If the region type is an inline mask, which always holds a binary mask, this function + * converts the binary inline mask to an 8-bit monochrome image with the values '0' and '255'. + * The pixel value is set to `255` where the pixel is part of the region, and `0` where the + * pixel is not part of the region. + * + * @param region the region to query, which must be of type #heif_region_type_inline_mask. + * @param out_x the X coordinate for the top left corner, where 0 is the left-most column. + * @param out_y the Y coordinate for the top left corner, where 0 is the top-most row. + * @param out_width the width of the mask region + * @param out_height the height of the mask region + * @param out_mask_image the returned mask image + * @return heif_error_ok on success, or an error value indicating the problem on failure + * + * \note the caller is responsible for releasing the mask image + */ +LIBHEIF_API +struct heif_error heif_region_get_mask_image(const struct heif_region* region, + int32_t* out_x, int32_t* out_y, + uint32_t* out_width, uint32_t* out_height, + struct heif_image** out_mask_image); + +// --- adding region items + +/** + * Add a region item to an image. + * + * The region item is a collection of regions (point, polyline, polygon, rectangle, ellipse or mask) + * along with a reference size (width and height) that forms the coordinate basis for the regions. + * + * The concept is to add the region item, then add one or more regions to the region item. + * + * @param image_handle the image to attach the region item to. + * @param reference_width the width of the reference size. + * @param reference_height the height of the reference size. + * @param out_region_item the resulting region item + * @return heif_error_ok on success, or an error indicating the problem on failure +*/ +LIBHEIF_API +struct heif_error heif_image_handle_add_region_item(struct heif_image_handle* image_handle, + uint32_t reference_width, uint32_t reference_height, + struct heif_region_item** out_region_item); + +/** + * Add a point region to the region item. + * + * @param region_item the region item that holds this point region + * @param x the x value for the point location + * @param y the y value for the point location + * @param out_region pointer to pointer to the returned region (optional, see below) + * @return heif_error_ok on success, or an error indicating the problem on failure + * + * @note The `out_region` parameter is optional, and can be set to `NULL` if not needed. + */ +LIBHEIF_API +struct heif_error heif_region_item_add_region_point(struct heif_region_item* region_item, + int32_t x, int32_t y, + struct heif_region** out_region); + +/** + * Add a rectangle region to the region item. + * + * @param region_item the region item that holds this rectangle region + * @param x the x value for the top-left corner of this rectangle region + * @param y the y value for the top-left corner of this rectangle region + * @param width the width of this rectangle region + * @param height the height of this rectangle region + * @param out_region pointer to pointer to the returned region (optional, see below) + * @return heif_error_ok on success, or an error indicating the problem on failure + * + * @note The `out_region` parameter is optional, and can be set to `NULL` if not needed. + */ +LIBHEIF_API +struct heif_error heif_region_item_add_region_rectangle(struct heif_region_item* region_item, + int32_t x, int32_t y, + uint32_t width, uint32_t height, + struct heif_region** out_region); + +/** + * Add a ellipse region to the region item. + * + * @param region_item the region item that holds this ellipse region + * @param x the x value for the centre of this ellipse region + * @param y the y value for the centre of this ellipse region + * @param radius_x the radius of the ellipse in the X (horizontal) direction + * @param radius_y the radius of the ellipse in the Y (vertical) direction + * @param out_region pointer to pointer to the returned region (optional, see below) + * @return heif_error_ok on success, or an error indicating the problem on failure + * + * @note The `out_region` parameter is optional, and can be set to `NULL` if not needed. + */ +LIBHEIF_API +struct heif_error heif_region_item_add_region_ellipse(struct heif_region_item* region_item, + int32_t x, int32_t y, + uint32_t radius_x, uint32_t radius_y, + struct heif_region** out_region); + +/** + * Add a polygon region to the region item. + * + * A polygon is a sequence of points that form a closed shape. The first point does + * not need to be repeated as the last point. + * The points are provided as pairs of X,Y coordinates, in the order X1, + * Y1, X2, Y2, ..., Xn, Yn. + * + * @param region_item the region item that holds this polygon region + * @param pts_array the array of points in X,Y order (see above) + * @param nPoints the number of points + * @param out_region pointer to pointer to the returned region (optional, see below) + * @return heif_error_ok on success, or an error indicating the problem on failure + * + * @note `nPoints` is the number of points, not the number of elements in the array + * @note The `out_region` parameter is optional, and can be set to `NULL` if not needed. + */ +LIBHEIF_API +struct heif_error heif_region_item_add_region_polygon(struct heif_region_item* region_item, + const int32_t* pts_array, int nPoints, + struct heif_region** out_region); + +/** + * Add a polyline region to the region item. + * + * A polyline is a sequence of points that does not form a closed shape. Even if the + * polyline is closed, the only points that are part of the region are those that + * intersect (even minimally) a one-pixel line drawn along the polyline. + * The points are provided as pairs of X,Y coordinates, in the order X1, + * Y1, X2, Y2, ..., Xn, Yn. + * + * @param region_item the region item that holds this polyline region + * @param pts_array the array of points in X,Y order (see above) + * @param nPoints the number of points + * @param out_region pointer to pointer to the returned region (optional, see below) + * @return heif_error_ok on success, or an error indicating the problem on failure + * + * @note `nPoints` is the number of points, not the number of elements in the array + * @note The `out_region` parameter is optional, and can be set to `NULL` if not needed. + */ +LIBHEIF_API +struct heif_error heif_region_item_add_region_polyline(struct heif_region_item* region_item, + const int32_t* pts_array, int nPoints, + struct heif_region** out_region); + + +/** + * Add a referenced mask region to the region item. + * + * The region geometry is described by the pixels in another image item, + * which has a item reference of type `mask` from the region item to the + * image item containing the mask. + * + * The image item containing the mask is one of: + * + * - a mask item (see ISO/IEC 23008-12:2022 Section 6.10.2), or a derived + * image from a mask item + * + * - an image item in monochrome format (4:0:0 chroma) + * + * - an image item in colour format with luma and chroma planes (e.g. 4:2:0) + * + * If the pixel value is equal to the minimum sample value (e.g. 0 for unsigned + * integer), the pixel is not part of the region. If the pixel value is equal + * to the maximum sample value (e.g. 255 for 8 bit unsigned integer), the pixel + * is part of the region. If the pixel value is between the minimum sample value + * and maximum sample value, the pixel value represents an (application defined) + * probability that the pixel is part of the region, where higher pixel values + * correspond to higher probability values. + * + * @param region_item the region item that holds this mask region + * @param x the x value for the top-left corner of this mask region + * @param y the y value for the top-left corner of this mask region + * @param width the width of this mask region + * @param height the height of this mask region + * @param mask_item_id the item identifier for the mask that is referenced + * @param out_region pointer to pointer to the returned region (optional, see below) + * @return heif_error_ok on success, or an error indicating the problem on failure + * + * @note The `out_region` parameter is optional, and can be set to `NULL` if not needed. + */ +LIBHEIF_API +struct heif_error heif_region_item_add_region_referenced_mask(struct heif_region_item* region_item, + int32_t x, int32_t y, + uint32_t width, uint32_t height, + heif_item_id mask_item_id, + struct heif_region** out_region); + + +/** + * Add an inline mask region to the region item. + * + * The region geometry is described by a top left corner position, and a size defined + * by a width and height. + * + * The mask is held as inline data on the region, one bit per pixel, most significant + * bit first pixel, no padding. If the bit value is `1`, the corresponding pixel is + * part of the region. If the bit value is `0`, the corresponding pixel is not part of the + * region. + * + * @param region_item the region item that holds this mask region + * @param x the x value for the top-left corner of this mask region + * @param y the y value for the top-left corner of this mask region + * @param width the width of this mask region + * @param height the height of this mask region + * @param mask_data the location to return the mask data + * @param mask_data_len the length of the mask data, in bytes + * @param out_region pointer to pointer to the returned region (optional, see below) + * @return heif_error_ok on success, or an error value indicating the problem on failure + */ + LIBHEIF_API +struct heif_error heif_region_item_add_region_inline_mask_data(struct heif_region_item* region_item, + int32_t x, int32_t y, + uint32_t width, uint32_t height, + const uint8_t* mask_data, + size_t mask_data_len, + struct heif_region** out_region); + +/** + * Add an inline mask region image to the region item. + * + * The region geometry is described by a top left corner position, and a size defined + * by a width and height. + * + * The mask data is held as inline data on the region, one bit per pixel. The provided + * image is converted to inline data, where any pixel with a value >= 0x80 becomes part of the + * mask region. If the image width is less that the specified width, it is expanded + * to match the width of the region (zero fill on the right). If the image height is + * less than the specified height, it is expanded to match the height of the region + * (zero fill on the bottom). If the image width or height is greater than the + * width or height (correspondingly) of the region, the image is cropped. + * + * @param region_item the region item that holds this mask region + * @param x the x value for the top-left corner of this mask region + * @param y the y value for the top-left corner of this mask region + * @param width the width of this mask region + * @param height the height of this mask region + * @param image the image to convert to an inline mask + * @param out_region pointer to pointer to the returned region (optional, see below) + * @return heif_error_ok on success, or an error value indicating the problem on failure + */ + LIBHEIF_API +struct heif_error heif_region_item_add_region_inline_mask(struct heif_region_item* region_item, + int32_t x, int32_t y, + uint32_t width, uint32_t height, + struct heif_image* image, + struct heif_region** out_region); +#ifdef __cplusplus +} +#endif + +#endif diff --git a/vcpkg/installed/x64-osx/include/libheif/heif_version.h b/vcpkg/installed/x64-osx/include/libheif/heif_version.h new file mode 100644 index 0000000..2b2f3fe --- /dev/null +++ b/vcpkg/installed/x64-osx/include/libheif/heif_version.h @@ -0,0 +1,38 @@ +/* + * HEIF codec. + * Copyright (c) 2017 Dirk Farin + * + * This file is part of libheif. + * + * libheif is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * libheif is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libheif. If not, see . + */ + +/* heif_version.h + * + * This file was automatically generated when libheif was built. + * + * DO NOT EDIT THIS FILE. + */ +#ifndef LIBHEIF_HEIF_VERSION_H +#define LIBHEIF_HEIF_VERSION_H + +/* Numeric representation of the version */ +#define LIBHEIF_NUMERIC_VERSION ((1<<24) | (17<<16) | (6<<8) | 0) + +/* Version string */ +#define LIBHEIF_VERSION "1.17.6" + + + +#endif // LIBHEIF_HEIF_VERSION_H diff --git a/vcpkg/installed/x64-osx/include/libintl.h b/vcpkg/installed/x64-osx/include/libintl.h new file mode 100644 index 0000000..56d9860 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/libintl.h @@ -0,0 +1,642 @@ +/* Message catalogs for internationalization. + Copyright (C) 1995-1997, 2000-2016, 2018-2024 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _LIBINTL_H +#define _LIBINTL_H 1 + +#include +#if (defined __APPLE__ && defined __MACH__) && 1 +# include +#endif + +/* The LC_MESSAGES locale category is the category used by the functions + gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. + On systems that don't define it, use an arbitrary value instead. + On Solaris, defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) + then includes (i.e. this file!) and then only defines + LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES + in this case. */ +#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) +# define LC_MESSAGES 1729 +#endif + +/* We define an additional symbol to signal that we use the GNU + implementation of gettext. */ +#define __USE_GNU_GETTEXT 1 + +/* Provide information about the supported file formats. Returns the + maximum minor revision number supported for a given major revision. */ +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ + ((major) == 0 || (major) == 1 ? 1 : -1) + +/* Resolve a platform specific conflict on DJGPP. GNU gettext takes + precedence over _conio_gettext. */ +#ifdef __DJGPP__ +# undef gettext +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Version number: (major<<16) + (minor<<8) + subminor */ +#define LIBINTL_VERSION 0x001605 +extern int libintl_version; + + +/* We redirect the functions to those prefixed with "libintl_". This is + necessary, because some systems define gettext/textdomain/... in the C + library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). + If we used the unprefixed names, there would be cases where the + definition in the C library would override the one in the libintl.so + shared library. Recall that on ELF systems, the symbols are looked + up in the following order: + 1. in the executable, + 2. in the shared libraries specified on the link command line, in order, + 3. in the dependencies of the shared libraries specified on the link + command line, + 4. in the dlopen()ed shared libraries, in the order in which they were + dlopen()ed. + The definition in the C library would override the one in libintl.so if + either + * -lc is given on the link command line and -lintl isn't, or + * -lc is given on the link command line before -lintl, or + * libintl.so is a dependency of a dlopen()ed shared library but not + linked to the executable at link time. + Since Solaris gettext() behaves differently than GNU gettext(), this + would be unacceptable. + + The redirection happens by default through macros in C, so that &gettext + is independent of the compilation unit, but through inline functions in + C++, in order not to interfere with the name mangling of class fields or + class methods called 'gettext'. */ + +/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. + If he doesn't, we choose the method. A third possible method is + _INTL_REDIRECT_ASM, supported only by GCC. */ +#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) +# if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus) +# define _INTL_REDIRECT_ASM +# else +# ifdef __cplusplus +# define _INTL_REDIRECT_INLINE +# else +# define _INTL_REDIRECT_MACROS +# endif +# endif +#endif +/* Auxiliary macros. */ +#ifdef _INTL_REDIRECT_ASM +# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) +# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring +# define _INTL_STRINGIFY(prefix) #prefix +#else +# define _INTL_ASM(cname) +#endif + +/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return + its n-th argument literally. This enables GCC to warn for example about + printf (gettext ("foo %y")). */ +#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && !(defined __clang__ && __clang__ && __clang_major__ >= 3) && defined __cplusplus) +# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) +#else +# define _INTL_MAY_RETURN_STRING_ARG(n) +#endif + +/* _INTL_ATTRIBUTE_FORMAT ((ARCHETYPE, STRING-INDEX, FIRST-TO-CHECK)) + declares that the STRING-INDEXth function argument is a format string of + style ARCHETYPE, which is one of: + printf, gnu_printf + scanf, gnu_scanf, + strftime, gnu_strftime, + strfmon, + or the same thing prefixed and suffixed with '__'. + If FIRST-TO-CHECK is not 0, arguments starting at FIRST-TO_CHECK + are suitable for the format string. */ +/* Applies to: functions. */ +#if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 7) > 2) || defined __clang__ +# define _INTL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) +#else +# define _INTL_ATTRIBUTE_FORMAT(spec) +#endif + +/* _INTL_ATTRIBUTE_SPEC_PRINTF_STANDARD + An __attribute__ __format__ specifier for a function that takes a format + string and arguments, where the format string directives are the ones + standardized by ISO C99 and POSIX. */ +/* __gnu_printf__ is supported in GCC >= 4.4. */ +#if defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 4) > 4 +# define _INTL_ATTRIBUTE_SPEC_PRINTF_STANDARD __gnu_printf__ +#else +# define _INTL_ATTRIBUTE_SPEC_PRINTF_STANDARD __printf__ +#endif + +/* _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD + indicates to GCC that the function takes a format string and arguments, + where the format string directives are the ones standardized by ISO C99 + and POSIX. */ +#define _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(formatstring_parameter, first_argument) \ + _INTL_ATTRIBUTE_FORMAT ((_INTL_ATTRIBUTE_SPEC_PRINTF_STANDARD, formatstring_parameter, first_argument)) + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_gettext (const char *__msgid) + _INTL_MAY_RETURN_STRING_ARG (1); +static inline +_INTL_MAY_RETURN_STRING_ARG (1) +char *gettext (const char *__msgid) +{ + return libintl_gettext (__msgid); +} +#else +# ifdef _INTL_REDIRECT_MACROS +# define gettext libintl_gettext +# endif +extern char *gettext (const char *__msgid) + _INTL_ASM (libintl_gettext) + _INTL_MAY_RETURN_STRING_ARG (1); +#endif + +/* Look up MSGID in the DOMAINNAME message catalog for the current + LC_MESSAGES locale. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dgettext (const char *__domainname, const char *__msgid) + _INTL_MAY_RETURN_STRING_ARG (2); +static inline +_INTL_MAY_RETURN_STRING_ARG (2) +char *dgettext (const char *__domainname, const char *__msgid) +{ + return libintl_dgettext (__domainname, __msgid); +} +#else +# ifdef _INTL_REDIRECT_MACROS +# define dgettext libintl_dgettext +# endif +extern char *dgettext (const char *__domainname, const char *__msgid) + _INTL_ASM (libintl_dgettext) + _INTL_MAY_RETURN_STRING_ARG (2); +#endif + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, + int __category) + _INTL_MAY_RETURN_STRING_ARG (2); +static inline +_INTL_MAY_RETURN_STRING_ARG (2) +char *dcgettext (const char *__domainname, const char *__msgid, int __category) +{ + return libintl_dcgettext (__domainname, __msgid, __category); +} +#else +# ifdef _INTL_REDIRECT_MACROS +# define dcgettext libintl_dcgettext +# endif +extern char *dcgettext (const char *__domainname, const char *__msgid, + int __category) + _INTL_ASM (libintl_dcgettext) + _INTL_MAY_RETURN_STRING_ARG (2); +#endif + + +/* Similar to 'gettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n) + _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); +static inline +_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2) +char *ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n) +{ + return libintl_ngettext (__msgid1, __msgid2, __n); +} +#else +# ifdef _INTL_REDIRECT_MACROS +# define ngettext libintl_ngettext +# endif +extern char *ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n) + _INTL_ASM (libintl_ngettext) + _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); +#endif + +/* Similar to 'dgettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dngettext (const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n) + _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); +static inline +_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3) +char *dngettext (const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n) +{ + return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); +} +#else +# ifdef _INTL_REDIRECT_MACROS +# define dngettext libintl_dngettext +# endif +extern char *dngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n) + _INTL_ASM (libintl_dngettext) + _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); +#endif + +/* Similar to 'dcgettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) + _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); +static inline +_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3) +char *dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) +{ + return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); +} +#else +# ifdef _INTL_REDIRECT_MACROS +# define dcngettext libintl_dcngettext +# endif +extern char *dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) + _INTL_ASM (libintl_dcngettext) + _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); +#endif + + + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +# ifdef _INTL_REDIRECT_INLINE +extern char *libintl_textdomain (const char *__domainname); +static inline char *textdomain (const char *__domainname) +{ + return libintl_textdomain (__domainname); +} +# else +# ifdef _INTL_REDIRECT_MACROS +# define textdomain libintl_textdomain +# endif +extern char *textdomain (const char *__domainname) + _INTL_ASM (libintl_textdomain); +# endif + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +# ifdef _INTL_REDIRECT_INLINE +extern char *libintl_bindtextdomain (const char *__domainname, + const char *__dirname); +static inline char *bindtextdomain (const char *__domainname, + const char *__dirname) +{ + return libintl_bindtextdomain (__domainname, __dirname); +} +# else +# ifdef _INTL_REDIRECT_MACROS +# define bindtextdomain libintl_bindtextdomain +# endif +extern char *bindtextdomain (const char *__domainname, const char *__dirname) + _INTL_ASM (libintl_bindtextdomain); +# endif + +# if defined _WIN32 && !defined __CYGWIN__ +/* Specify that the DOMAINNAME message catalog will be found + in WDIRNAME rather than in the system locale data base. */ +# ifdef _INTL_REDIRECT_INLINE +extern wchar_t *libintl_wbindtextdomain (const char *__domainname, + const wchar_t *__wdirname); +static inline wchar_t *wbindtextdomain (const char *__domainname, + const wchar_t *__wdirname) +{ + return libintl_wbindtextdomain (__domainname, __wdirname); +} +# else +# ifdef _INTL_REDIRECT_MACROS +# define wbindtextdomain libintl_wbindtextdomain +# endif +extern wchar_t *wbindtextdomain (const char *__domainname, + const wchar_t *__wdirname) + _INTL_ASM (libintl_wbindtextdomain); +# endif +# endif + +/* Specify the character encoding in which the messages from the + DOMAINNAME message catalog will be returned. */ +# ifdef _INTL_REDIRECT_INLINE +extern char *libintl_bind_textdomain_codeset (const char *__domainname, + const char *__codeset); +static inline char *bind_textdomain_codeset (const char *__domainname, + const char *__codeset) +{ + return libintl_bind_textdomain_codeset (__domainname, __codeset); +} +# else +# ifdef _INTL_REDIRECT_MACROS +# define bind_textdomain_codeset libintl_bind_textdomain_codeset +# endif +extern char *bind_textdomain_codeset (const char *__domainname, + const char *__codeset) + _INTL_ASM (libintl_bind_textdomain_codeset); +# endif + + + +/* Support for format strings with positions in *printf(), following the + POSIX/XSI specification. + Note: These replacements for the *printf() functions are visible only + in source files that #include or #include "gettext.h". + Packages that use *printf() in source files that don't refer to _() + or gettext() but for which the format string could be the return value + of _() or gettext() need to add this #include. Oh well. */ + +/* Note: In C++ mode, it is not sufficient to redefine a symbol at the + preprocessor macro level, such as + #define sprintf libintl_sprintf + Some programs may reference std::sprintf after including . + Therefore we must make sure that std::libintl_sprintf is defined and + identical to ::libintl_sprintf. + The user can define _INTL_CXX_NO_CLOBBER_STD_NAMESPACE to avoid this. + In such cases, they will not benefit from the overrides when using + the 'std' namespace, and they will need to do the references to the + 'std' namespace *before* including or "gettext.h". */ + +#if !1 + +# include +# include + +/* Get va_list. */ +# if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER +# include +# else +# include +# endif + +# if !((defined fprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_fprintf) /* don't override gnulib */ +# undef fprintf +# define fprintf libintl_fprintf +extern int fprintf (FILE *, const char *, ...) + _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_fprintf; } +# endif +# endif +# if !((defined vfprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vfprintf) /* don't override gnulib */ +# undef vfprintf +# define vfprintf libintl_vfprintf +extern int vfprintf (FILE *, const char *, va_list) + _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vfprintf; } +# endif +# endif + +# if !((defined printf && defined _GL_STDIO_H) || defined GNULIB_overrides_printf) /* don't override gnulib */ +# undef printf +# if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ +/* Don't break __attribute__((format(printf,M,N))). + This redefinition is only possible because the libc in NetBSD, Cygwin, + mingw does not have a function __printf__. + Alternatively, we could have done this redirection only when compiling with + __GNUC__, together with a symbol redirection: + extern int printf (const char *, ...) + __asm__ (#__USER_LABEL_PREFIX__ "libintl_printf"); + But doing it now would introduce a binary incompatibility with already + distributed versions of libintl on these systems. */ +# define libintl_printf __printf__ +# endif +# define printf libintl_printf +extern int printf (const char *, ...) + _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_printf; } +# endif +# endif +# if !((defined vprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vprintf) /* don't override gnulib */ +# undef vprintf +# define vprintf libintl_vprintf +extern int vprintf (const char *, va_list) + _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 0); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vprintf; } +# endif +# endif + +# if !((defined sprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_sprintf) /* don't override gnulib */ +# undef sprintf +# define sprintf libintl_sprintf +extern int sprintf (char *, const char *, ...) + _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_sprintf; } +# endif +# endif +# if !((defined vsprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vsprintf) /* don't override gnulib */ +# undef vsprintf +# define vsprintf libintl_vsprintf +extern int vsprintf (char *, const char *, va_list) + _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vsprintf; } +# endif +# endif + +# if 1 + +# if !((defined snprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_snprintf) /* don't override gnulib */ +# undef snprintf +# define snprintf libintl_snprintf +extern int snprintf (char *, size_t, const char *, ...) + _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_snprintf; } +# endif +# endif +# if !((defined vsnprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vsnprintf) /* don't override gnulib */ +# undef vsnprintf +# define vsnprintf libintl_vsnprintf +extern int vsnprintf (char *, size_t, const char *, va_list) + _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vsnprintf; } +# endif +# endif + +# endif + +# if 1 + +# if !((defined asprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_asprintf) /* don't override gnulib */ +# undef asprintf +# define asprintf libintl_asprintf +extern int asprintf (char **, const char *, ...) + _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_asprintf; } +# endif +# endif +# if !((defined vasprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vasprintf) /* don't override gnulib */ +# undef vasprintf +# define vasprintf libintl_vasprintf +extern int vasprintf (char **, const char *, va_list) + _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vasprintf; } +# endif +# endif + +# endif + +# if 1 + +# undef fwprintf +# define fwprintf libintl_fwprintf +extern int fwprintf (FILE *, const wchar_t *, ...); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_fwprintf; } +# endif +# undef vfwprintf +# define vfwprintf libintl_vfwprintf +extern int vfwprintf (FILE *, const wchar_t *, va_list); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vfwprintf; } +# endif + +# undef wprintf +# define wprintf libintl_wprintf +extern int wprintf (const wchar_t *, ...); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_wprintf; } +# endif +# undef vwprintf +# define vwprintf libintl_vwprintf +extern int vwprintf (const wchar_t *, va_list); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vwprintf; } +# endif + +# undef swprintf +# define swprintf libintl_swprintf +extern int swprintf (wchar_t *, size_t, const wchar_t *, ...); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_swprintf; } +# endif +# undef vswprintf +# define vswprintf libintl_vswprintf +extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vswprintf; } +# endif + +# endif + +#endif + + +/* Support for retrieving the name of a locale_t object. */ +#if 0 + +# ifndef GNULIB_defined_newlocale /* don't override gnulib */ +# undef newlocale +# define newlocale libintl_newlocale +extern locale_t newlocale (int, const char *, locale_t); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_newlocale; } +# endif +# endif + +# ifndef GNULIB_defined_duplocale /* don't override gnulib */ +# undef duplocale +# define duplocale libintl_duplocale +extern locale_t duplocale (locale_t); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_duplocale; } +# endif +# endif + +# ifndef GNULIB_defined_freelocale /* don't override gnulib */ +# undef freelocale +# define freelocale libintl_freelocale +extern void freelocale (locale_t); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_freelocale; } +# endif +# endif + +#endif + + +/* Support for the locale chosen by the user. */ +#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__ + +# ifndef GNULIB_defined_setlocale /* don't override gnulib */ +# undef setlocale +# define setlocale libintl_setlocale +extern char *setlocale (int, const char *); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_setlocale; } +# endif +# endif + +# if 1 + +# undef newlocale +# define newlocale libintl_newlocale +/* Declare newlocale() only if the system headers define the 'locale_t' type. */ +# if !(defined __CYGWIN__ && !defined LC_ALL_MASK) +extern locale_t newlocale (int, const char *, locale_t); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_newlocale; } +# endif +# endif + +# endif + +#endif + + +/* Support for relocatable packages. */ + +/* Sets the original and the current installation prefix of the package. + Relocation simply replaces a pathname starting with the original prefix + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ +#define libintl_set_relocation_prefix libintl_set_relocation_prefix +extern void + libintl_set_relocation_prefix (const char *orig_prefix, + const char *curr_prefix); + + +#ifdef __cplusplus +} +#endif + +#endif /* libintl.h */ diff --git a/vcpkg/installed/x64-osx/include/libpng16/png.h b/vcpkg/installed/x64-osx/include/libpng16/png.h new file mode 100644 index 0000000..83d3903 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/libpng16/png.h @@ -0,0 +1,3250 @@ + +/* png.h - header file for PNG reference library + * + * libpng version 1.6.43 + * + * Copyright (c) 2018-2024 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. (See LICENSE, below.) + * + * Authors and maintainers: + * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat + * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger + * libpng versions 0.97, January 1998, through 1.6.35, July 2018: + * Glenn Randers-Pehrson + * libpng versions 1.6.36, December 2018, through 1.6.43, February 2024: + * Cosmin Truta + * See also "Contributing Authors", below. + */ + +/* + * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE + * ========================================= + * + * PNG Reference Library License version 2 + * --------------------------------------- + * + * * Copyright (c) 1995-2024 The PNG Reference Library Authors. + * * Copyright (c) 2018-2024 Cosmin Truta. + * * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. + * * Copyright (c) 1996-1997 Andreas Dilger. + * * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * The software is supplied "as is", without warranty of any kind, + * express or implied, including, without limitation, the warranties + * of merchantability, fitness for a particular purpose, title, and + * non-infringement. In no event shall the Copyright owners, or + * anyone distributing the software, be liable for any damages or + * other liability, whether in contract, tort or otherwise, arising + * from, out of, or in connection with the software, or the use or + * other dealings in the software, even if advised of the possibility + * of such damage. + * + * Permission is hereby granted to use, copy, modify, and distribute + * this software, or portions hereof, for any purpose, without fee, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you + * must not claim that you wrote the original software. If you + * use this software in a product, an acknowledgment in the product + * documentation would be appreciated, but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must + * not be misrepresented as being the original software. + * + * 3. This Copyright notice may not be removed or altered from any + * source or altered source distribution. + * + * + * PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35) + * ----------------------------------------------------------------------- + * + * libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are + * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are + * derived from libpng-1.0.6, and are distributed according to the same + * disclaimer and license as libpng-1.0.6 with the following individuals + * added to the list of Contributing Authors: + * + * Simon-Pierre Cadieux + * Eric S. Raymond + * Mans Rullgard + * Cosmin Truta + * Gilles Vollant + * James Yu + * Mandar Sahastrabuddhe + * Google Inc. + * Vadim Barkov + * + * and with the following additions to the disclaimer: + * + * There is no warranty against interference with your enjoyment of + * the library or against infringement. There is no warranty that our + * efforts or the library will fulfill any of your particular purposes + * or needs. This library is provided with all faults, and the entire + * risk of satisfactory quality, performance, accuracy, and effort is + * with the user. + * + * Some files in the "contrib" directory and some configure-generated + * files that are distributed with libpng have other copyright owners, and + * are released under other open source licenses. + * + * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are + * Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from + * libpng-0.96, and are distributed according to the same disclaimer and + * license as libpng-0.96, with the following individuals added to the + * list of Contributing Authors: + * + * Tom Lane + * Glenn Randers-Pehrson + * Willem van Schaik + * + * libpng versions 0.89, June 1996, through 0.96, May 1997, are + * Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, + * and are distributed according to the same disclaimer and license as + * libpng-0.88, with the following individuals added to the list of + * Contributing Authors: + * + * John Bowler + * Kevin Bracey + * Sam Bushell + * Magnus Holmgren + * Greg Roelofs + * Tom Tanner + * + * Some files in the "scripts" directory have other copyright owners, + * but are released under this license. + * + * libpng versions 0.5, May 1995, through 0.88, January 1996, are + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * For the purposes of this copyright and license, "Contributing Authors" + * is defined as the following set of individuals: + * + * Andreas Dilger + * Dave Martindale + * Guy Eric Schalnat + * Paul Schmidt + * Tim Wegner + * + * The PNG Reference Library is supplied "AS IS". The Contributing + * Authors and Group 42, Inc. disclaim all warranties, expressed or + * implied, including, without limitation, the warranties of + * merchantability and of fitness for any purpose. The Contributing + * Authors and Group 42, Inc. assume no liability for direct, indirect, + * incidental, special, exemplary, or consequential damages, which may + * result from the use of the PNG Reference Library, even if advised of + * the possibility of such damage. + * + * Permission is hereby granted to use, copy, modify, and distribute this + * source code, or portions hereof, for any purpose, without fee, subject + * to the following restrictions: + * + * 1. The origin of this source code must not be misrepresented. + * + * 2. Altered versions must be plainly marked as such and must not + * be misrepresented as being the original source. + * + * 3. This Copyright notice may not be removed or altered from any + * source or altered source distribution. + * + * The Contributing Authors and Group 42, Inc. specifically permit, + * without fee, and encourage the use of this source code as a component + * to supporting the PNG file format in commercial products. If you use + * this source code in a product, acknowledgment is not required but would + * be appreciated. + * + * END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE. + * + * TRADEMARK + * ========= + * + * The name "libpng" has not been registered by the Copyright owners + * as a trademark in any jurisdiction. However, because libpng has + * been distributed and maintained world-wide, continually since 1995, + * the Copyright owners claim "common-law trademark protection" in any + * jurisdiction where common-law trademark is recognized. + */ + +/* + * A "png_get_copyright" function is available, for convenient use in "about" + * boxes and the like: + * + * printf("%s", png_get_copyright(NULL)); + * + * Also, the PNG logo (in PNG format, of course) is supplied in the + * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + */ + +/* + * The contributing authors would like to thank all those who helped + * with testing, bug fixes, and patience. This wouldn't have been + * possible without all of you. + * + * Thanks to Frank J. T. Wojcik for helping with the documentation. + */ + +/* Note about libpng version numbers: + * + * Due to various miscommunications, unforeseen code incompatibilities + * and occasional factors outside the authors' control, version numbering + * on the library has not always been consistent and straightforward. + * The following table summarizes matters since version 0.89c, which was + * the first widely used release: + * + * source png.h png.h shared-lib + * version string int version + * ------- ------ ----- ---------- + * 0.89c "1.0 beta 3" 0.89 89 1.0.89 + * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90] + * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95] + * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96] + * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97] + * 0.97c 0.97 97 2.0.97 + * 0.98 0.98 98 2.0.98 + * 0.99 0.99 98 2.0.99 + * 0.99a-m 0.99 99 2.0.99 + * 1.00 1.00 100 2.1.0 [100 should be 10000] + * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000] + * 1.0.1 png.h string is 10001 2.1.0 + * 1.0.1a-e identical to the 10002 from here on, the shared library + * 1.0.2 source version) 10002 is 2.V where V is the source code + * 1.0.2a-b 10003 version, except as noted. + * 1.0.3 10003 + * 1.0.3a-d 10004 + * 1.0.4 10004 + * 1.0.4a-f 10005 + * 1.0.5 (+ 2 patches) 10005 + * 1.0.5a-d 10006 + * 1.0.5e-r 10100 (not source compatible) + * 1.0.5s-v 10006 (not binary compatible) + * 1.0.6 (+ 3 patches) 10006 (still binary incompatible) + * 1.0.6d-f 10007 (still binary incompatible) + * 1.0.6g 10007 + * 1.0.6h 10007 10.6h (testing xy.z so-numbering) + * 1.0.6i 10007 10.6i + * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0) + * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible) + * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible) + * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible) + * 1.0.7 1 10007 (still compatible) + * ... + * 1.0.69 10 10069 10.so.0.69[.0] + * ... + * 1.2.59 13 10259 12.so.0.59[.0] + * ... + * 1.4.20 14 10420 14.so.0.20[.0] + * ... + * 1.5.30 15 10530 15.so.15.30[.0] + * ... + * 1.6.43 16 10643 16.so.16.43[.0] + * + * Henceforth the source version will match the shared-library major and + * minor numbers; the shared-library major version number will be used for + * changes in backward compatibility, as it is intended. + * The PNG_LIBPNG_VER macro, which is not used within libpng but is + * available for applications, is an unsigned integer of the form XYYZZ + * corresponding to the source version X.Y.Z (leading zeros in Y and Z). + * Beta versions were given the previous public release number plus a + * letter, until version 1.0.6j; from then on they were given the upcoming + * public release number plus "betaNN" or "rcNN". + * + * Binary incompatibility exists only when applications make direct access + * to the info_ptr or png_ptr members through png.h, and the compiled + * application is loaded with a different version of the library. + * + * See libpng.txt or libpng.3 for more information. The PNG specification + * is available as a W3C Recommendation and as an ISO/IEC Standard; see + * + */ + +#ifndef PNG_H +#define PNG_H + +/* This is not the place to learn how to use libpng. The file libpng-manual.txt + * describes how to use libpng, and the file example.c summarizes it + * with some code on which to build. This file is useful for looking + * at the actual function definitions and structure components. If that + * file has been stripped from your copy of libpng, you can find it at + * + * + * If you just need to read a PNG file and don't want to read the documentation + * skip to the end of this file and read the section entitled 'simplified API'. + */ + +/* Version information for png.h - this should match the version in png.c */ +#define PNG_LIBPNG_VER_STRING "1.6.43" +#define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n" + +/* The versions of shared library builds should stay in sync, going forward */ +#define PNG_LIBPNG_VER_SHAREDLIB 16 +#define PNG_LIBPNG_VER_SONUM PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */ +#define PNG_LIBPNG_VER_DLLNUM PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */ + +/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ +#define PNG_LIBPNG_VER_MAJOR 1 +#define PNG_LIBPNG_VER_MINOR 6 +#define PNG_LIBPNG_VER_RELEASE 43 + +/* This should be zero for a public release, or non-zero for a + * development version. + */ +#define PNG_LIBPNG_VER_BUILD 0 + +/* Release Status */ +#define PNG_LIBPNG_BUILD_ALPHA 1 +#define PNG_LIBPNG_BUILD_BETA 2 +#define PNG_LIBPNG_BUILD_RC 3 +#define PNG_LIBPNG_BUILD_STABLE 4 +#define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7 + +/* Release-Specific Flags */ +#define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with + PNG_LIBPNG_BUILD_STABLE only */ +#define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with + PNG_LIBPNG_BUILD_SPECIAL */ +#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with + PNG_LIBPNG_BUILD_PRIVATE */ + +#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE + +/* Careful here. At one time, Guy wanted to use 082, but that + * would be octal. We must not include leading zeros. + * Versions 0.7 through 1.0.0 were in the range 0 to 100 here + * (only version 1.0.0 was mis-numbered 100 instead of 10000). + * From version 1.0.1 it is: + * XXYYZZ, where XX=major, YY=minor, ZZ=release + */ +#define PNG_LIBPNG_VER 10643 /* 1.6.43 */ + +/* Library configuration: these options cannot be changed after + * the library has been built. + */ +#ifndef PNGLCONF_H +/* If pnglibconf.h is missing, you can + * copy scripts/pnglibconf.h.prebuilt to pnglibconf.h + */ +# include "pnglibconf.h" +#endif + +#ifndef PNG_VERSION_INFO_ONLY +/* Machine specific configuration. */ +# include "pngconf.h" +#endif + +/* + * Added at libpng-1.2.8 + * + * Ref MSDN: Private as priority over Special + * VS_FF_PRIVATEBUILD File *was not* built using standard release + * procedures. If this value is given, the StringFileInfo block must + * contain a PrivateBuild string. + * + * VS_FF_SPECIALBUILD File *was* built by the original company using + * standard release procedures but is a variation of the standard + * file of the same version number. If this value is given, the + * StringFileInfo block must contain a SpecialBuild string. + */ + +#ifdef PNG_USER_PRIVATEBUILD /* From pnglibconf.h */ +# define PNG_LIBPNG_BUILD_TYPE \ + (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE) +#else +# ifdef PNG_LIBPNG_SPECIALBUILD +# define PNG_LIBPNG_BUILD_TYPE \ + (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL) +# else +# define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE) +# endif +#endif + +#ifndef PNG_VERSION_INFO_ONLY + +/* Inhibit C++ name-mangling for libpng functions but not for system calls. */ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* Version information for C files, stored in png.c. This had better match + * the version above. + */ +#define png_libpng_ver png_get_header_ver(NULL) + +/* This file is arranged in several sections: + * + * 1. [omitted] + * 2. Any configuration options that can be specified by for the application + * code when it is built. (Build time configuration is in pnglibconf.h) + * 3. Type definitions (base types are defined in pngconf.h), structure + * definitions. + * 4. Exported library functions. + * 5. Simplified API. + * 6. Implementation options. + * + * The library source code has additional files (principally pngpriv.h) that + * allow configuration of the library. + */ + +/* Section 1: [omitted] */ + +/* Section 2: run time configuration + * See pnglibconf.h for build time configuration + * + * Run time configuration allows the application to choose between + * implementations of certain arithmetic APIs. The default is set + * at build time and recorded in pnglibconf.h, but it is safe to + * override these (and only these) settings. Note that this won't + * change what the library does, only application code, and the + * settings can (and probably should) be made on a per-file basis + * by setting the #defines before including png.h + * + * Use macros to read integers from PNG data or use the exported + * functions? + * PNG_USE_READ_MACROS: use the macros (see below) Note that + * the macros evaluate their argument multiple times. + * PNG_NO_USE_READ_MACROS: call the relevant library function. + * + * Use the alternative algorithm for compositing alpha samples that + * does not use division? + * PNG_READ_COMPOSITE_NODIV_SUPPORTED: use the 'no division' + * algorithm. + * PNG_NO_READ_COMPOSITE_NODIV: use the 'division' algorithm. + * + * How to handle benign errors if PNG_ALLOW_BENIGN_ERRORS is + * false? + * PNG_ALLOW_BENIGN_ERRORS: map calls to the benign error + * APIs to png_warning. + * Otherwise the calls are mapped to png_error. + */ + +/* Section 3: type definitions, including structures and compile time + * constants. + * See pngconf.h for base types that vary by machine/system + */ + +/* This triggers a compiler error in png.c, if png.c and png.h + * do not agree upon the version number. + */ +typedef char* png_libpng_version_1_6_43; + +/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. + * + * png_struct is the cache of information used while reading or writing a single + * PNG file. One of these is always required, although the simplified API + * (below) hides the creation and destruction of it. + */ +typedef struct png_struct_def png_struct; +typedef const png_struct * png_const_structp; +typedef png_struct * png_structp; +typedef png_struct * * png_structpp; + +/* png_info contains information read from or to be written to a PNG file. One + * or more of these must exist while reading or creating a PNG file. The + * information is not used by libpng during read but is used to control what + * gets written when a PNG file is created. "png_get_" function calls read + * information during read and "png_set_" functions calls write information + * when creating a PNG. + * been moved into a separate header file that is not accessible to + * applications. Read libpng-manual.txt or libpng.3 for more info. + */ +typedef struct png_info_def png_info; +typedef png_info * png_infop; +typedef const png_info * png_const_infop; +typedef png_info * * png_infopp; + +/* Types with names ending 'p' are pointer types. The corresponding types with + * names ending 'rp' are identical pointer types except that the pointer is + * marked 'restrict', which means that it is the only pointer to the object + * passed to the function. Applications should not use the 'restrict' types; + * it is always valid to pass 'p' to a pointer with a function argument of the + * corresponding 'rp' type. Different compilers have different rules with + * regard to type matching in the presence of 'restrict'. For backward + * compatibility libpng callbacks never have 'restrict' in their parameters and, + * consequentially, writing portable application code is extremely difficult if + * an attempt is made to use 'restrict'. + */ +typedef png_struct * PNG_RESTRICT png_structrp; +typedef const png_struct * PNG_RESTRICT png_const_structrp; +typedef png_info * PNG_RESTRICT png_inforp; +typedef const png_info * PNG_RESTRICT png_const_inforp; + +/* Three color definitions. The order of the red, green, and blue, (and the + * exact size) is not important, although the size of the fields need to + * be png_byte or png_uint_16 (as defined below). + */ +typedef struct png_color_struct +{ + png_byte red; + png_byte green; + png_byte blue; +} png_color; +typedef png_color * png_colorp; +typedef const png_color * png_const_colorp; +typedef png_color * * png_colorpp; + +typedef struct png_color_16_struct +{ + png_byte index; /* used for palette files */ + png_uint_16 red; /* for use in red green blue files */ + png_uint_16 green; + png_uint_16 blue; + png_uint_16 gray; /* for use in grayscale files */ +} png_color_16; +typedef png_color_16 * png_color_16p; +typedef const png_color_16 * png_const_color_16p; +typedef png_color_16 * * png_color_16pp; + +typedef struct png_color_8_struct +{ + png_byte red; /* for use in red green blue files */ + png_byte green; + png_byte blue; + png_byte gray; /* for use in grayscale files */ + png_byte alpha; /* for alpha channel files */ +} png_color_8; +typedef png_color_8 * png_color_8p; +typedef const png_color_8 * png_const_color_8p; +typedef png_color_8 * * png_color_8pp; + +/* + * The following two structures are used for the in-core representation + * of sPLT chunks. + */ +typedef struct png_sPLT_entry_struct +{ + png_uint_16 red; + png_uint_16 green; + png_uint_16 blue; + png_uint_16 alpha; + png_uint_16 frequency; +} png_sPLT_entry; +typedef png_sPLT_entry * png_sPLT_entryp; +typedef const png_sPLT_entry * png_const_sPLT_entryp; +typedef png_sPLT_entry * * png_sPLT_entrypp; + +/* When the depth of the sPLT palette is 8 bits, the color and alpha samples + * occupy the LSB of their respective members, and the MSB of each member + * is zero-filled. The frequency member always occupies the full 16 bits. + */ + +typedef struct png_sPLT_struct +{ + png_charp name; /* palette name */ + png_byte depth; /* depth of palette samples */ + png_sPLT_entryp entries; /* palette entries */ + png_int_32 nentries; /* number of palette entries */ +} png_sPLT_t; +typedef png_sPLT_t * png_sPLT_tp; +typedef const png_sPLT_t * png_const_sPLT_tp; +typedef png_sPLT_t * * png_sPLT_tpp; + +#ifdef PNG_TEXT_SUPPORTED +/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file, + * and whether that contents is compressed or not. The "key" field + * points to a regular zero-terminated C string. The "text" fields can be a + * regular C string, an empty string, or a NULL pointer. + * However, the structure returned by png_get_text() will always contain + * the "text" field as a regular zero-terminated C string (possibly + * empty), never a NULL pointer, so it can be safely used in printf() and + * other string-handling functions. Note that the "itxt_length", "lang", and + * "lang_key" members of the structure only exist when the library is built + * with iTXt chunk support. Prior to libpng-1.4.0 the library was built by + * default without iTXt support. Also note that when iTXt *is* supported, + * the "lang" and "lang_key" fields contain NULL pointers when the + * "compression" field contains * PNG_TEXT_COMPRESSION_NONE or + * PNG_TEXT_COMPRESSION_zTXt. Note that the "compression value" is not the + * same as what appears in the PNG tEXt/zTXt/iTXt chunk's "compression flag" + * which is always 0 or 1, or its "compression method" which is always 0. + */ +typedef struct png_text_struct +{ + int compression; /* compression value: + -1: tEXt, none + 0: zTXt, deflate + 1: iTXt, none + 2: iTXt, deflate */ + png_charp key; /* keyword, 1-79 character description of "text" */ + png_charp text; /* comment, may be an empty string (ie "") + or a NULL pointer */ + size_t text_length; /* length of the text string */ + size_t itxt_length; /* length of the itxt string */ + png_charp lang; /* language code, 0-79 characters + or a NULL pointer */ + png_charp lang_key; /* keyword translated UTF-8 string, 0 or more + chars or a NULL pointer */ +} png_text; +typedef png_text * png_textp; +typedef const png_text * png_const_textp; +typedef png_text * * png_textpp; +#endif + +/* Supported compression types for text in PNG files (tEXt, and zTXt). + * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. */ +#define PNG_TEXT_COMPRESSION_NONE_WR -3 +#define PNG_TEXT_COMPRESSION_zTXt_WR -2 +#define PNG_TEXT_COMPRESSION_NONE -1 +#define PNG_TEXT_COMPRESSION_zTXt 0 +#define PNG_ITXT_COMPRESSION_NONE 1 +#define PNG_ITXT_COMPRESSION_zTXt 2 +#define PNG_TEXT_COMPRESSION_LAST 3 /* Not a valid value */ + +/* png_time is a way to hold the time in an machine independent way. + * Two conversions are provided, both from time_t and struct tm. There + * is no portable way to convert to either of these structures, as far + * as I know. If you know of a portable way, send it to me. As a side + * note - PNG has always been Year 2000 compliant! + */ +typedef struct png_time_struct +{ + png_uint_16 year; /* full year, as in, 1995 */ + png_byte month; /* month of year, 1 - 12 */ + png_byte day; /* day of month, 1 - 31 */ + png_byte hour; /* hour of day, 0 - 23 */ + png_byte minute; /* minute of hour, 0 - 59 */ + png_byte second; /* second of minute, 0 - 60 (for leap seconds) */ +} png_time; +typedef png_time * png_timep; +typedef const png_time * png_const_timep; +typedef png_time * * png_timepp; + +#if defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED) ||\ + defined(PNG_USER_CHUNKS_SUPPORTED) +/* png_unknown_chunk is a structure to hold queued chunks for which there is + * no specific support. The idea is that we can use this to queue + * up private chunks for output even though the library doesn't actually + * know about their semantics. + * + * The data in the structure is set by libpng on read and used on write. + */ +typedef struct png_unknown_chunk_t +{ + png_byte name[5]; /* Textual chunk name with '\0' terminator */ + png_byte *data; /* Data, should not be modified on read! */ + size_t size; + + /* On write 'location' must be set using the flag values listed below. + * Notice that on read it is set by libpng however the values stored have + * more bits set than are listed below. Always treat the value as a + * bitmask. On write set only one bit - setting multiple bits may cause the + * chunk to be written in multiple places. + */ + png_byte location; /* mode of operation at read time */ +} +png_unknown_chunk; + +typedef png_unknown_chunk * png_unknown_chunkp; +typedef const png_unknown_chunk * png_const_unknown_chunkp; +typedef png_unknown_chunk * * png_unknown_chunkpp; +#endif + +/* Flag values for the unknown chunk location byte. */ +#define PNG_HAVE_IHDR 0x01 +#define PNG_HAVE_PLTE 0x02 +#define PNG_AFTER_IDAT 0x08 + +/* Maximum positive integer used in PNG is (2^31)-1 */ +#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL) +#define PNG_UINT_32_MAX ((png_uint_32)(-1)) +#define PNG_SIZE_MAX ((size_t)(-1)) + +/* These are constants for fixed point values encoded in the + * PNG specification manner (x100000) + */ +#define PNG_FP_1 100000 +#define PNG_FP_HALF 50000 +#define PNG_FP_MAX ((png_fixed_point)0x7fffffffL) +#define PNG_FP_MIN (-PNG_FP_MAX) + +/* These describe the color_type field in png_info. */ +/* color type masks */ +#define PNG_COLOR_MASK_PALETTE 1 +#define PNG_COLOR_MASK_COLOR 2 +#define PNG_COLOR_MASK_ALPHA 4 + +/* color types. Note that not all combinations are legal */ +#define PNG_COLOR_TYPE_GRAY 0 +#define PNG_COLOR_TYPE_PALETTE (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE) +#define PNG_COLOR_TYPE_RGB (PNG_COLOR_MASK_COLOR) +#define PNG_COLOR_TYPE_RGB_ALPHA (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA) +#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA) +/* aliases */ +#define PNG_COLOR_TYPE_RGBA PNG_COLOR_TYPE_RGB_ALPHA +#define PNG_COLOR_TYPE_GA PNG_COLOR_TYPE_GRAY_ALPHA + +/* This is for compression type. PNG 1.0-1.2 only define the single type. */ +#define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */ +#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE + +/* This is for filter type. PNG 1.0-1.2 only define the single type. */ +#define PNG_FILTER_TYPE_BASE 0 /* Single row per-byte filtering */ +#define PNG_INTRAPIXEL_DIFFERENCING 64 /* Used only in MNG datastreams */ +#define PNG_FILTER_TYPE_DEFAULT PNG_FILTER_TYPE_BASE + +/* These are for the interlacing type. These values should NOT be changed. */ +#define PNG_INTERLACE_NONE 0 /* Non-interlaced image */ +#define PNG_INTERLACE_ADAM7 1 /* Adam7 interlacing */ +#define PNG_INTERLACE_LAST 2 /* Not a valid value */ + +/* These are for the oFFs chunk. These values should NOT be changed. */ +#define PNG_OFFSET_PIXEL 0 /* Offset in pixels */ +#define PNG_OFFSET_MICROMETER 1 /* Offset in micrometers (1/10^6 meter) */ +#define PNG_OFFSET_LAST 2 /* Not a valid value */ + +/* These are for the pCAL chunk. These values should NOT be changed. */ +#define PNG_EQUATION_LINEAR 0 /* Linear transformation */ +#define PNG_EQUATION_BASE_E 1 /* Exponential base e transform */ +#define PNG_EQUATION_ARBITRARY 2 /* Arbitrary base exponential transform */ +#define PNG_EQUATION_HYPERBOLIC 3 /* Hyperbolic sine transformation */ +#define PNG_EQUATION_LAST 4 /* Not a valid value */ + +/* These are for the sCAL chunk. These values should NOT be changed. */ +#define PNG_SCALE_UNKNOWN 0 /* unknown unit (image scale) */ +#define PNG_SCALE_METER 1 /* meters per pixel */ +#define PNG_SCALE_RADIAN 2 /* radians per pixel */ +#define PNG_SCALE_LAST 3 /* Not a valid value */ + +/* These are for the pHYs chunk. These values should NOT be changed. */ +#define PNG_RESOLUTION_UNKNOWN 0 /* pixels/unknown unit (aspect ratio) */ +#define PNG_RESOLUTION_METER 1 /* pixels/meter */ +#define PNG_RESOLUTION_LAST 2 /* Not a valid value */ + +/* These are for the sRGB chunk. These values should NOT be changed. */ +#define PNG_sRGB_INTENT_PERCEPTUAL 0 +#define PNG_sRGB_INTENT_RELATIVE 1 +#define PNG_sRGB_INTENT_SATURATION 2 +#define PNG_sRGB_INTENT_ABSOLUTE 3 +#define PNG_sRGB_INTENT_LAST 4 /* Not a valid value */ + +/* This is for text chunks */ +#define PNG_KEYWORD_MAX_LENGTH 79 + +/* Maximum number of entries in PLTE/sPLT/tRNS arrays */ +#define PNG_MAX_PALETTE_LENGTH 256 + +/* These determine if an ancillary chunk's data has been successfully read + * from the PNG header, or if the application has filled in the corresponding + * data in the info_struct to be written into the output file. The values + * of the PNG_INFO_ defines should NOT be changed. + */ +#define PNG_INFO_gAMA 0x0001U +#define PNG_INFO_sBIT 0x0002U +#define PNG_INFO_cHRM 0x0004U +#define PNG_INFO_PLTE 0x0008U +#define PNG_INFO_tRNS 0x0010U +#define PNG_INFO_bKGD 0x0020U +#define PNG_INFO_hIST 0x0040U +#define PNG_INFO_pHYs 0x0080U +#define PNG_INFO_oFFs 0x0100U +#define PNG_INFO_tIME 0x0200U +#define PNG_INFO_pCAL 0x0400U +#define PNG_INFO_sRGB 0x0800U /* GR-P, 0.96a */ +#define PNG_INFO_iCCP 0x1000U /* ESR, 1.0.6 */ +#define PNG_INFO_sPLT 0x2000U /* ESR, 1.0.6 */ +#define PNG_INFO_sCAL 0x4000U /* ESR, 1.0.6 */ +#define PNG_INFO_IDAT 0x8000U /* ESR, 1.0.6 */ +#define PNG_INFO_eXIf 0x10000U /* GR-P, 1.6.31 */ + +/* This is used for the transformation routines, as some of them + * change these values for the row. It also should enable using + * the routines for other purposes. + */ +typedef struct png_row_info_struct +{ + png_uint_32 width; /* width of row */ + size_t rowbytes; /* number of bytes in row */ + png_byte color_type; /* color type of row */ + png_byte bit_depth; /* bit depth of row */ + png_byte channels; /* number of channels (1, 2, 3, or 4) */ + png_byte pixel_depth; /* bits per pixel (depth * channels) */ +} png_row_info; + +typedef png_row_info * png_row_infop; +typedef png_row_info * * png_row_infopp; + +/* These are the function types for the I/O functions and for the functions + * that allow the user to override the default I/O functions with his or her + * own. The png_error_ptr type should match that of user-supplied warning + * and error functions, while the png_rw_ptr type should match that of the + * user read/write data functions. Note that the 'write' function must not + * modify the buffer it is passed. The 'read' function, on the other hand, is + * expected to return the read data in the buffer. + */ +typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp)); +typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, size_t)); +typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp)); +typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32, + int)); +typedef PNG_CALLBACK(void, *png_write_status_ptr, (png_structp, png_uint_32, + int)); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop)); +typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop)); + +/* The following callback receives png_uint_32 row_number, int pass for the + * png_bytep data of the row. When transforming an interlaced image the + * row number is the row number within the sub-image of the interlace pass, so + * the value will increase to the height of the sub-image (not the full image) + * then reset to 0 for the next pass. + * + * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to + * find the output pixel (x,y) given an interlaced sub-image pixel + * (row,col,pass). (See below for these macros.) + */ +typedef PNG_CALLBACK(void, *png_progressive_row_ptr, (png_structp, png_bytep, + png_uint_32, int)); +#endif + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +typedef PNG_CALLBACK(void, *png_user_transform_ptr, (png_structp, png_row_infop, + png_bytep)); +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp, + png_unknown_chunkp)); +#endif +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED +/* not used anywhere */ +/* typedef PNG_CALLBACK(void, *png_unknown_chunk_ptr, (png_structp)); */ +#endif + +#ifdef PNG_SETJMP_SUPPORTED +/* This must match the function definition in , and the application + * must include this before png.h to obtain the definition of jmp_buf. The + * function is required to be PNG_NORETURN, but this is not checked. If the + * function does return the application will crash via an abort() or similar + * system level call. + * + * If you get a warning here while building the library you may need to make + * changes to ensure that pnglibconf.h records the calling convention used by + * your compiler. This may be very difficult - try using a different compiler + * to build the library! + */ +PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef); +#endif + +/* Transform masks for the high-level interface */ +#define PNG_TRANSFORM_IDENTITY 0x0000 /* read and write */ +#define PNG_TRANSFORM_STRIP_16 0x0001 /* read only */ +#define PNG_TRANSFORM_STRIP_ALPHA 0x0002 /* read only */ +#define PNG_TRANSFORM_PACKING 0x0004 /* read and write */ +#define PNG_TRANSFORM_PACKSWAP 0x0008 /* read and write */ +#define PNG_TRANSFORM_EXPAND 0x0010 /* read only */ +#define PNG_TRANSFORM_INVERT_MONO 0x0020 /* read and write */ +#define PNG_TRANSFORM_SHIFT 0x0040 /* read and write */ +#define PNG_TRANSFORM_BGR 0x0080 /* read and write */ +#define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */ +#define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */ +#define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */ +#define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* write only */ +/* Added to libpng-1.2.34 */ +#define PNG_TRANSFORM_STRIP_FILLER_BEFORE PNG_TRANSFORM_STRIP_FILLER +#define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */ +/* Added to libpng-1.4.0 */ +#define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */ +/* Added to libpng-1.5.4 */ +#define PNG_TRANSFORM_EXPAND_16 0x4000 /* read only */ +#if ~0U > 0xffffU /* or else this might break on a 16-bit machine */ +#define PNG_TRANSFORM_SCALE_16 0x8000 /* read only */ +#endif + +/* Flags for MNG supported features */ +#define PNG_FLAG_MNG_EMPTY_PLTE 0x01 +#define PNG_FLAG_MNG_FILTER_64 0x04 +#define PNG_ALL_MNG_FEATURES 0x05 + +/* NOTE: prior to 1.5 these functions had no 'API' style declaration, + * this allowed the zlib default functions to be used on Windows + * platforms. In 1.5 the zlib default malloc (which just calls malloc and + * ignores the first argument) should be completely compatible with the + * following. + */ +typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp, + png_alloc_size_t)); +typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp)); + +/* Section 4: exported functions + * Here are the function definitions most commonly used. This is not + * the place to find out how to use libpng. See libpng-manual.txt for the + * full explanation, see example.c for the summary. This just provides + * a simple one line description of the use of each function. + * + * The PNG_EXPORT() and PNG_EXPORTA() macros used below are defined in + * pngconf.h and in the *.dfn files in the scripts directory. + * + * PNG_EXPORT(ordinal, type, name, (args)); + * + * ordinal: ordinal that is used while building + * *.def files. The ordinal value is only + * relevant when preprocessing png.h with + * the *.dfn files for building symbol table + * entries, and are removed by pngconf.h. + * type: return type of the function + * name: function name + * args: function arguments, with types + * + * When we wish to append attributes to a function prototype we use + * the PNG_EXPORTA() macro instead. + * + * PNG_EXPORTA(ordinal, type, name, (args), attributes); + * + * ordinal, type, name, and args: same as in PNG_EXPORT(). + * attributes: function attributes + */ + +/* Returns the version number of the library */ +PNG_EXPORT(1, png_uint_32, png_access_version_number, (void)); + +/* Tell lib we have already handled the first magic bytes. + * Handling more than 8 bytes from the beginning of the file is an error. + */ +PNG_EXPORT(2, void, png_set_sig_bytes, (png_structrp png_ptr, int num_bytes)); + +/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a + * PNG file. Returns zero if the supplied bytes match the 8-byte PNG + * signature, and non-zero otherwise. Having num_to_check == 0 or + * start > 7 will always fail (i.e. return non-zero). + */ +PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, size_t start, + size_t num_to_check)); + +/* Simple signature checking function. This is the same as calling + * png_check_sig(sig, n) := (png_sig_cmp(sig, 0, n) == 0). + */ +#define png_check_sig(sig, n) (png_sig_cmp((sig), 0, (n)) == 0) /* DEPRECATED */ + +/* Allocate and initialize png_ptr struct for reading, and any other memory. */ +PNG_EXPORTA(4, png_structp, png_create_read_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn), + PNG_ALLOCATED); + +/* Allocate and initialize png_ptr struct for writing, and any other memory */ +PNG_EXPORTA(5, png_structp, png_create_write_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn), + PNG_ALLOCATED); + +PNG_EXPORT(6, size_t, png_get_compression_buffer_size, + (png_const_structrp png_ptr)); + +PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structrp png_ptr, + size_t size)); + +/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp + * match up. + */ +#ifdef PNG_SETJMP_SUPPORTED +/* This function returns the jmp_buf built in to *png_ptr. It must be + * supplied with an appropriate 'longjmp' function to use on that jmp_buf + * unless the default error function is overridden in which case NULL is + * acceptable. The size of the jmp_buf is checked against the actual size + * allocated by the library - the call will return NULL on a mismatch + * indicating an ABI mismatch. + */ +PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structrp png_ptr, + png_longjmp_ptr longjmp_fn, size_t jmp_buf_size)); +# define png_jmpbuf(png_ptr) \ + (*png_set_longjmp_fn((png_ptr), longjmp, (sizeof (jmp_buf)))) +#else +# define png_jmpbuf(png_ptr) \ + (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP) +#endif +/* This function should be used by libpng applications in place of + * longjmp(png_ptr->jmpbuf, val). If longjmp_fn() has been set, it + * will use it; otherwise it will call PNG_ABORT(). This function was + * added in libpng-1.5.0. + */ +PNG_EXPORTA(9, void, png_longjmp, (png_const_structrp png_ptr, int val), + PNG_NORETURN); + +#ifdef PNG_READ_SUPPORTED +/* Reset the compression stream */ +PNG_EXPORTA(10, int, png_reset_zstream, (png_structrp png_ptr), PNG_DEPRECATED); +#endif + +/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */ +#ifdef PNG_USER_MEM_SUPPORTED +PNG_EXPORTA(11, png_structp, png_create_read_struct_2, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + PNG_ALLOCATED); +PNG_EXPORTA(12, png_structp, png_create_write_struct_2, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + PNG_ALLOCATED); +#endif + +/* Write the PNG file signature. */ +PNG_EXPORT(13, void, png_write_sig, (png_structrp png_ptr)); + +/* Write a PNG chunk - size, type, (optional) data, CRC. */ +PNG_EXPORT(14, void, png_write_chunk, (png_structrp png_ptr, png_const_bytep + chunk_name, png_const_bytep data, size_t length)); + +/* Write the start of a PNG chunk - length and chunk name. */ +PNG_EXPORT(15, void, png_write_chunk_start, (png_structrp png_ptr, + png_const_bytep chunk_name, png_uint_32 length)); + +/* Write the data of a PNG chunk started with png_write_chunk_start(). */ +PNG_EXPORT(16, void, png_write_chunk_data, (png_structrp png_ptr, + png_const_bytep data, size_t length)); + +/* Finish a chunk started with png_write_chunk_start() (includes CRC). */ +PNG_EXPORT(17, void, png_write_chunk_end, (png_structrp png_ptr)); + +/* Allocate and initialize the info structure */ +PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_const_structrp png_ptr), + PNG_ALLOCATED); + +/* DEPRECATED: this function allowed init structures to be created using the + * default allocation method (typically malloc). Use is deprecated in 1.6.0 and + * the API will be removed in the future. + */ +PNG_EXPORTA(19, void, png_info_init_3, (png_infopp info_ptr, + size_t png_info_struct_size), PNG_DEPRECATED); + +/* Writes all the PNG information before the image. */ +PNG_EXPORT(20, void, png_write_info_before_PLTE, + (png_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(21, void, png_write_info, + (png_structrp png_ptr, png_const_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the information before the actual image data. */ +PNG_EXPORT(22, void, png_read_info, + (png_structrp png_ptr, png_inforp info_ptr)); +#endif + +#ifdef PNG_TIME_RFC1123_SUPPORTED + /* Convert to a US string format: there is no localization support in this + * routine. The original implementation used a 29 character buffer in + * png_struct, this will be removed in future versions. + */ +#if PNG_LIBPNG_VER < 10700 +/* To do: remove this from libpng17 (and from libpng17/png.c and pngstruct.h) */ +PNG_EXPORTA(23, png_const_charp, png_convert_to_rfc1123, (png_structrp png_ptr, + png_const_timep ptime),PNG_DEPRECATED); +#endif +PNG_EXPORT(241, int, png_convert_to_rfc1123_buffer, (char out[29], + png_const_timep ptime)); +#endif + +#ifdef PNG_CONVERT_tIME_SUPPORTED +/* Convert from a struct tm to png_time */ +PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime, + const struct tm * ttime)); + +/* Convert from time_t to png_time. Uses gmtime() */ +PNG_EXPORT(25, void, png_convert_from_time_t, (png_timep ptime, time_t ttime)); +#endif /* CONVERT_tIME */ + +#ifdef PNG_READ_EXPAND_SUPPORTED +/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ +PNG_EXPORT(26, void, png_set_expand, (png_structrp png_ptr)); +PNG_EXPORT(27, void, png_set_expand_gray_1_2_4_to_8, (png_structrp png_ptr)); +PNG_EXPORT(28, void, png_set_palette_to_rgb, (png_structrp png_ptr)); +PNG_EXPORT(29, void, png_set_tRNS_to_alpha, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* Expand to 16-bit channels, forces conversion of palette to RGB and expansion + * of a tRNS chunk if present. + */ +PNG_EXPORT(221, void, png_set_expand_16, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +/* Use blue, green, red order for pixels. */ +PNG_EXPORT(30, void, png_set_bgr, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED +/* Expand the grayscale to 24-bit RGB if necessary. */ +PNG_EXPORT(31, void, png_set_gray_to_rgb, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +/* Reduce RGB to grayscale. */ +#define PNG_ERROR_ACTION_NONE 1 +#define PNG_ERROR_ACTION_WARN 2 +#define PNG_ERROR_ACTION_ERROR 3 +#define PNG_RGB_TO_GRAY_DEFAULT (-1)/*for red/green coefficients*/ + +PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structrp png_ptr, + int error_action, double red, double green)) +PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structrp png_ptr, + int error_action, png_fixed_point red, png_fixed_point green)) + +PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status, (png_const_structrp + png_ptr)); +#endif + +#ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED +PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth, + png_colorp palette)); +#endif + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED +/* How the alpha channel is interpreted - this affects how the color channels + * of a PNG file are returned to the calling application when an alpha channel, + * or a tRNS chunk in a palette file, is present. + * + * This has no effect on the way pixels are written into a PNG output + * datastream. The color samples in a PNG datastream are never premultiplied + * with the alpha samples. + * + * The default is to return data according to the PNG specification: the alpha + * channel is a linear measure of the contribution of the pixel to the + * corresponding composited pixel, and the color channels are unassociated + * (not premultiplied). The gamma encoded color channels must be scaled + * according to the contribution and to do this it is necessary to undo + * the encoding, scale the color values, perform the composition and re-encode + * the values. This is the 'PNG' mode. + * + * The alternative is to 'associate' the alpha with the color information by + * storing color channel values that have been scaled by the alpha. + * image. These are the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' modes + * (the latter being the two common names for associated alpha color channels). + * + * For the 'OPTIMIZED' mode, a pixel is treated as opaque only if the alpha + * value is equal to the maximum value. + * + * The final choice is to gamma encode the alpha channel as well. This is + * broken because, in practice, no implementation that uses this choice + * correctly undoes the encoding before handling alpha composition. Use this + * choice only if other serious errors in the software or hardware you use + * mandate it; the typical serious error is for dark halos to appear around + * opaque areas of the composited PNG image because of arithmetic overflow. + * + * The API function png_set_alpha_mode specifies which of these choices to use + * with an enumerated 'mode' value and the gamma of the required output: + */ +#define PNG_ALPHA_PNG 0 /* according to the PNG standard */ +#define PNG_ALPHA_STANDARD 1 /* according to Porter/Duff */ +#define PNG_ALPHA_ASSOCIATED 1 /* as above; this is the normal practice */ +#define PNG_ALPHA_PREMULTIPLIED 1 /* as above */ +#define PNG_ALPHA_OPTIMIZED 2 /* 'PNG' for opaque pixels, else 'STANDARD' */ +#define PNG_ALPHA_BROKEN 3 /* the alpha channel is gamma encoded */ + +PNG_FP_EXPORT(227, void, png_set_alpha_mode, (png_structrp png_ptr, int mode, + double output_gamma)) +PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr, + int mode, png_fixed_point output_gamma)) +#endif + +#if defined(PNG_GAMMA_SUPPORTED) || defined(PNG_READ_ALPHA_MODE_SUPPORTED) +/* The output_gamma value is a screen gamma in libpng terminology: it expresses + * how to decode the output values, not how they are encoded. + */ +#define PNG_DEFAULT_sRGB -1 /* sRGB gamma and color space */ +#define PNG_GAMMA_MAC_18 -2 /* Old Mac '1.8' gamma and color space */ +#define PNG_GAMMA_sRGB 220000 /* Television standards--matches sRGB gamma */ +#define PNG_GAMMA_LINEAR PNG_FP_1 /* Linear */ +#endif + +/* The following are examples of calls to png_set_alpha_mode to achieve the + * required overall gamma correction and, where necessary, alpha + * premultiplication. + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB); + * This is the default libpng handling of the alpha channel - it is not + * pre-multiplied into the color components. In addition the call states + * that the output is for a sRGB system and causes all PNG files without gAMA + * chunks to be assumed to be encoded using sRGB. + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC); + * In this case the output is assumed to be something like an sRGB conformant + * display preceded by a power-law lookup table of power 1.45. This is how + * early Mac systems behaved. + * + * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_GAMMA_LINEAR); + * This is the classic Jim Blinn approach and will work in academic + * environments where everything is done by the book. It has the shortcoming + * of assuming that input PNG data with no gamma information is linear - this + * is unlikely to be correct unless the PNG files where generated locally. + * Most of the time the output precision will be so low as to show + * significant banding in dark areas of the image. + * + * png_set_expand_16(pp); + * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_DEFAULT_sRGB); + * This is a somewhat more realistic Jim Blinn inspired approach. PNG files + * are assumed to have the sRGB encoding if not marked with a gamma value and + * the output is always 16 bits per component. This permits accurate scaling + * and processing of the data. If you know that your input PNG files were + * generated locally you might need to replace PNG_DEFAULT_sRGB with the + * correct value for your system. + * + * png_set_alpha_mode(pp, PNG_ALPHA_OPTIMIZED, PNG_DEFAULT_sRGB); + * If you just need to composite the PNG image onto an existing background + * and if you control the code that does this you can use the optimization + * setting. In this case you just copy completely opaque pixels to the + * output. For pixels that are not completely transparent (you just skip + * those) you do the composition math using png_composite or png_composite_16 + * below then encode the resultant 8-bit or 16-bit values to match the output + * encoding. + * + * Other cases + * If neither the PNG nor the standard linear encoding work for you because + * of the software or hardware you use then you have a big problem. The PNG + * case will probably result in halos around the image. The linear encoding + * will probably result in a washed out, too bright, image (it's actually too + * contrasty.) Try the ALPHA_OPTIMIZED mode above - this will probably + * substantially reduce the halos. Alternatively try: + * + * png_set_alpha_mode(pp, PNG_ALPHA_BROKEN, PNG_DEFAULT_sRGB); + * This option will also reduce the halos, but there will be slight dark + * halos round the opaque parts of the image where the background is light. + * In the OPTIMIZED mode the halos will be light halos where the background + * is dark. Take your pick - the halos are unavoidable unless you can get + * your hardware/software fixed! (The OPTIMIZED approach is slightly + * faster.) + * + * When the default gamma of PNG files doesn't match the output gamma. + * If you have PNG files with no gamma information png_set_alpha_mode allows + * you to provide a default gamma, but it also sets the output gamma to the + * matching value. If you know your PNG files have a gamma that doesn't + * match the output you can take advantage of the fact that + * png_set_alpha_mode always sets the output gamma but only sets the PNG + * default if it is not already set: + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB); + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC); + * The first call sets both the default and the output gamma values, the + * second call overrides the output gamma without changing the default. This + * is easier than achieving the same effect with png_set_gamma. You must use + * PNG_ALPHA_PNG for the first call - internal checking in png_set_alpha will + * fire if more than one call to png_set_alpha_mode and png_set_background is + * made in the same read operation, however multiple calls with PNG_ALPHA_PNG + * are ignored. + */ + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED +PNG_EXPORT(36, void, png_set_strip_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) +PNG_EXPORT(37, void, png_set_swap_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) +PNG_EXPORT(38, void, png_set_invert_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) +/* Add a filler byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */ +PNG_EXPORT(39, void, png_set_filler, (png_structrp png_ptr, png_uint_32 filler, + int flags)); +/* The values of the PNG_FILLER_ defines should NOT be changed */ +# define PNG_FILLER_BEFORE 0 +# define PNG_FILLER_AFTER 1 +/* Add an alpha byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */ +PNG_EXPORT(40, void, png_set_add_alpha, (png_structrp png_ptr, + png_uint_32 filler, int flags)); +#endif /* READ_FILLER || WRITE_FILLER */ + +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +/* Swap bytes in 16-bit depth files. */ +PNG_EXPORT(41, void, png_set_swap, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) +/* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */ +PNG_EXPORT(42, void, png_set_packing, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ + defined(PNG_WRITE_PACKSWAP_SUPPORTED) +/* Swap packing order of pixels in bytes. */ +PNG_EXPORT(43, void, png_set_packswap, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) +/* Converts files to legal bit depths. */ +PNG_EXPORT(44, void, png_set_shift, (png_structrp png_ptr, png_const_color_8p + true_bits)); +#endif + +#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ + defined(PNG_WRITE_INTERLACING_SUPPORTED) +/* Have the code handle the interlacing. Returns the number of passes. + * MUST be called before png_read_update_info or png_start_read_image, + * otherwise it will not have the desired effect. Note that it is still + * necessary to call png_read_row or png_read_rows png_get_image_height + * times for each pass. +*/ +PNG_EXPORT(45, int, png_set_interlace_handling, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) +/* Invert monochrome files */ +PNG_EXPORT(46, void, png_set_invert_mono, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_BACKGROUND_SUPPORTED +/* Handle alpha and tRNS by replacing with a background color. Prior to + * libpng-1.5.4 this API must not be called before the PNG file header has been + * read. Doing so will result in unexpected behavior and possible warnings or + * errors if the PNG file contains a bKGD chunk. + */ +PNG_FP_EXPORT(47, void, png_set_background, (png_structrp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, double background_gamma)) +PNG_FIXED_EXPORT(215, void, png_set_background_fixed, (png_structrp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, png_fixed_point background_gamma)) +#endif +#ifdef PNG_READ_BACKGROUND_SUPPORTED +# define PNG_BACKGROUND_GAMMA_UNKNOWN 0 +# define PNG_BACKGROUND_GAMMA_SCREEN 1 +# define PNG_BACKGROUND_GAMMA_FILE 2 +# define PNG_BACKGROUND_GAMMA_UNIQUE 3 +#endif + +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED +/* Scale a 16-bit depth file down to 8-bit, accurately. */ +PNG_EXPORT(229, void, png_set_scale_16, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED +#define PNG_READ_16_TO_8_SUPPORTED /* Name prior to 1.5.4 */ +/* Strip the second byte of information from a 16-bit depth file. */ +PNG_EXPORT(48, void, png_set_strip_16, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* Turn on quantizing, and reduce the palette to the number of colors + * available. + */ +PNG_EXPORT(49, void, png_set_quantize, (png_structrp png_ptr, + png_colorp palette, int num_palette, int maximum_colors, + png_const_uint_16p histogram, int full_quantize)); +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* The threshold on gamma processing is configurable but hard-wired into the + * library. The following is the floating point variant. + */ +#define PNG_GAMMA_THRESHOLD (PNG_GAMMA_THRESHOLD_FIXED*.00001) + +/* Handle gamma correction. Screen_gamma=(display_exponent). + * NOTE: this API simply sets the screen and file gamma values. It will + * therefore override the value for gamma in a PNG file if it is called after + * the file header has been read - use with care - call before reading the PNG + * file for best results! + * + * These routines accept the same gamma values as png_set_alpha_mode (described + * above). The PNG_GAMMA_ defines and PNG_DEFAULT_sRGB can be passed to either + * API (floating point or fixed.) Notice, however, that the 'file_gamma' value + * is the inverse of a 'screen gamma' value. + */ +PNG_FP_EXPORT(50, void, png_set_gamma, (png_structrp png_ptr, + double screen_gamma, double override_file_gamma)) +PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed, (png_structrp png_ptr, + png_fixed_point screen_gamma, png_fixed_point override_file_gamma)) +#endif + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +/* Set how many lines between output flushes - 0 for no flushing */ +PNG_EXPORT(51, void, png_set_flush, (png_structrp png_ptr, int nrows)); +/* Flush the current PNG output buffer */ +PNG_EXPORT(52, void, png_write_flush, (png_structrp png_ptr)); +#endif + +/* Optional update palette with requested transformations */ +PNG_EXPORT(53, void, png_start_read_image, (png_structrp png_ptr)); + +/* Optional call to update the users info structure */ +PNG_EXPORT(54, void, png_read_update_info, (png_structrp png_ptr, + png_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read one or more rows of image data. */ +PNG_EXPORT(55, void, png_read_rows, (png_structrp png_ptr, png_bytepp row, + png_bytepp display_row, png_uint_32 num_rows)); +#endif + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read a row of data. */ +PNG_EXPORT(56, void, png_read_row, (png_structrp png_ptr, png_bytep row, + png_bytep display_row)); +#endif + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the whole image into memory at once. */ +PNG_EXPORT(57, void, png_read_image, (png_structrp png_ptr, png_bytepp image)); +#endif + +/* Write a row of image data */ +PNG_EXPORT(58, void, png_write_row, (png_structrp png_ptr, + png_const_bytep row)); + +/* Write a few rows of image data: (*row) is not written; however, the type + * is declared as writeable to maintain compatibility with previous versions + * of libpng and to allow the 'display_row' array from read_rows to be passed + * unchanged to write_rows. + */ +PNG_EXPORT(59, void, png_write_rows, (png_structrp png_ptr, png_bytepp row, + png_uint_32 num_rows)); + +/* Write the image data */ +PNG_EXPORT(60, void, png_write_image, (png_structrp png_ptr, png_bytepp image)); + +/* Write the end of the PNG file. */ +PNG_EXPORT(61, void, png_write_end, (png_structrp png_ptr, + png_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the end of the PNG file. */ +PNG_EXPORT(62, void, png_read_end, (png_structrp png_ptr, png_inforp info_ptr)); +#endif + +/* Free any memory associated with the png_info_struct */ +PNG_EXPORT(63, void, png_destroy_info_struct, (png_const_structrp png_ptr, + png_infopp info_ptr_ptr)); + +/* Free any memory associated with the png_struct and the png_info_structs */ +PNG_EXPORT(64, void, png_destroy_read_struct, (png_structpp png_ptr_ptr, + png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); + +/* Free any memory associated with the png_struct and the png_info_structs */ +PNG_EXPORT(65, void, png_destroy_write_struct, (png_structpp png_ptr_ptr, + png_infopp info_ptr_ptr)); + +/* Set the libpng method of handling chunk CRC errors */ +PNG_EXPORT(66, void, png_set_crc_action, (png_structrp png_ptr, int crit_action, + int ancil_action)); + +/* Values for png_set_crc_action() say how to handle CRC errors in + * ancillary and critical chunks, and whether to use the data contained + * therein. Note that it is impossible to "discard" data in a critical + * chunk. For versions prior to 0.90, the action was always error/quit, + * whereas in version 0.90 and later, the action for CRC errors in ancillary + * chunks is warn/discard. These values should NOT be changed. + * + * value action:critical action:ancillary + */ +#define PNG_CRC_DEFAULT 0 /* error/quit warn/discard data */ +#define PNG_CRC_ERROR_QUIT 1 /* error/quit error/quit */ +#define PNG_CRC_WARN_DISCARD 2 /* (INVALID) warn/discard data */ +#define PNG_CRC_WARN_USE 3 /* warn/use data warn/use data */ +#define PNG_CRC_QUIET_USE 4 /* quiet/use data quiet/use data */ +#define PNG_CRC_NO_CHANGE 5 /* use current value use current value */ + +#ifdef PNG_WRITE_SUPPORTED +/* These functions give the user control over the scan-line filtering in + * libpng and the compression methods used by zlib. These functions are + * mainly useful for testing, as the defaults should work with most users. + * Those users who are tight on memory or want faster performance at the + * expense of compression can modify them. See the compression library + * header file (zlib.h) for an explanation of the compression functions. + */ + +/* Set the filtering method(s) used by libpng. Currently, the only valid + * value for "method" is 0. + */ +PNG_EXPORT(67, void, png_set_filter, (png_structrp png_ptr, int method, + int filters)); +#endif /* WRITE */ + +/* Flags for png_set_filter() to say which filters to use. The flags + * are chosen so that they don't conflict with real filter types + * below, in case they are supplied instead of the #defined constants. + * These values should NOT be changed. + */ +#define PNG_NO_FILTERS 0x00 +#define PNG_FILTER_NONE 0x08 +#define PNG_FILTER_SUB 0x10 +#define PNG_FILTER_UP 0x20 +#define PNG_FILTER_AVG 0x40 +#define PNG_FILTER_PAETH 0x80 +#define PNG_FAST_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP) +#define PNG_ALL_FILTERS (PNG_FAST_FILTERS | PNG_FILTER_AVG | PNG_FILTER_PAETH) + +/* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now. + * These defines should NOT be changed. + */ +#define PNG_FILTER_VALUE_NONE 0 +#define PNG_FILTER_VALUE_SUB 1 +#define PNG_FILTER_VALUE_UP 2 +#define PNG_FILTER_VALUE_AVG 3 +#define PNG_FILTER_VALUE_PAETH 4 +#define PNG_FILTER_VALUE_LAST 5 + +#ifdef PNG_WRITE_SUPPORTED +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* DEPRECATED */ +PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structrp png_ptr, + int heuristic_method, int num_weights, png_const_doublep filter_weights, + png_const_doublep filter_costs)) +PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed, + (png_structrp png_ptr, int heuristic_method, int num_weights, + png_const_fixed_point_p filter_weights, + png_const_fixed_point_p filter_costs)) +#endif /* WRITE_WEIGHTED_FILTER */ + +/* The following are no longer used and will be removed from libpng-1.7: */ +#define PNG_FILTER_HEURISTIC_DEFAULT 0 /* Currently "UNWEIGHTED" */ +#define PNG_FILTER_HEURISTIC_UNWEIGHTED 1 /* Used by libpng < 0.95 */ +#define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */ +#define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */ + +/* Set the library compression level. Currently, valid values range from + * 0 - 9, corresponding directly to the zlib compression levels 0 - 9 + * (0 - no compression, 9 - "maximal" compression). Note that tests have + * shown that zlib compression levels 3-6 usually perform as well as level 9 + * for PNG images, and do considerably fewer calculations. In the future, + * these values may not correspond directly to the zlib compression levels. + */ +#ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED +PNG_EXPORT(69, void, png_set_compression_level, (png_structrp png_ptr, + int level)); + +PNG_EXPORT(70, void, png_set_compression_mem_level, (png_structrp png_ptr, + int mem_level)); + +PNG_EXPORT(71, void, png_set_compression_strategy, (png_structrp png_ptr, + int strategy)); + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +PNG_EXPORT(72, void, png_set_compression_window_bits, (png_structrp png_ptr, + int window_bits)); + +PNG_EXPORT(73, void, png_set_compression_method, (png_structrp png_ptr, + int method)); +#endif /* WRITE_CUSTOMIZE_COMPRESSION */ + +#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +/* Also set zlib parameters for compressing non-IDAT chunks */ +PNG_EXPORT(222, void, png_set_text_compression_level, (png_structrp png_ptr, + int level)); + +PNG_EXPORT(223, void, png_set_text_compression_mem_level, (png_structrp png_ptr, + int mem_level)); + +PNG_EXPORT(224, void, png_set_text_compression_strategy, (png_structrp png_ptr, + int strategy)); + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +PNG_EXPORT(225, void, png_set_text_compression_window_bits, + (png_structrp png_ptr, int window_bits)); + +PNG_EXPORT(226, void, png_set_text_compression_method, (png_structrp png_ptr, + int method)); +#endif /* WRITE_CUSTOMIZE_ZTXT_COMPRESSION */ +#endif /* WRITE */ + +/* These next functions are called for input/output, memory, and error + * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c, + * and call standard C I/O routines such as fread(), fwrite(), and + * fprintf(). These functions can be made to use other I/O routines + * at run time for those applications that need to handle I/O in a + * different manner by calling png_set_???_fn(). See libpng-manual.txt for + * more information. + */ + +#ifdef PNG_STDIO_SUPPORTED +/* Initialize the input/output for the PNG file to the default functions. */ +PNG_EXPORT(74, void, png_init_io, (png_structrp png_ptr, png_FILE_p fp)); +#endif + +/* Replace the (error and abort), and warning functions with user + * supplied functions. If no messages are to be printed you must still + * write and use replacement functions. The replacement error_fn should + * still do a longjmp to the last setjmp location if you are using this + * method of error handling. If error_fn or warning_fn is NULL, the + * default function will be used. + */ + +PNG_EXPORT(75, void, png_set_error_fn, (png_structrp png_ptr, + png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); + +/* Return the user pointer associated with the error functions */ +PNG_EXPORT(76, png_voidp, png_get_error_ptr, (png_const_structrp png_ptr)); + +/* Replace the default data output functions with a user supplied one(s). + * If buffered output is not used, then output_flush_fn can be set to NULL. + * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time + * output_flush_fn will be ignored (and thus can be NULL). + * It is probably a mistake to use NULL for output_flush_fn if + * write_data_fn is not also NULL unless you have built libpng with + * PNG_WRITE_FLUSH_SUPPORTED undefined, because in this case libpng's + * default flush function, which uses the standard *FILE structure, will + * be used. + */ +PNG_EXPORT(77, void, png_set_write_fn, (png_structrp png_ptr, png_voidp io_ptr, + png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); + +/* Replace the default data input function with a user supplied one. */ +PNG_EXPORT(78, void, png_set_read_fn, (png_structrp png_ptr, png_voidp io_ptr, + png_rw_ptr read_data_fn)); + +/* Return the user pointer associated with the I/O functions */ +PNG_EXPORT(79, png_voidp, png_get_io_ptr, (png_const_structrp png_ptr)); + +PNG_EXPORT(80, void, png_set_read_status_fn, (png_structrp png_ptr, + png_read_status_ptr read_row_fn)); + +PNG_EXPORT(81, void, png_set_write_status_fn, (png_structrp png_ptr, + png_write_status_ptr write_row_fn)); + +#ifdef PNG_USER_MEM_SUPPORTED +/* Replace the default memory allocation functions with user supplied one(s). */ +PNG_EXPORT(82, void, png_set_mem_fn, (png_structrp png_ptr, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn)); +/* Return the user pointer associated with the memory functions */ +PNG_EXPORT(83, png_voidp, png_get_mem_ptr, (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED +PNG_EXPORT(84, void, png_set_read_user_transform_fn, (png_structrp png_ptr, + png_user_transform_ptr read_user_transform_fn)); +#endif + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED +PNG_EXPORT(85, void, png_set_write_user_transform_fn, (png_structrp png_ptr, + png_user_transform_ptr write_user_transform_fn)); +#endif + +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +PNG_EXPORT(86, void, png_set_user_transform_info, (png_structrp png_ptr, + png_voidp user_transform_ptr, int user_transform_depth, + int user_transform_channels)); +/* Return the user pointer associated with the user transform functions */ +PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr, + (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED +/* Return information about the row currently being processed. Note that these + * APIs do not fail but will return unexpected results if called outside a user + * transform callback. Also note that when transforming an interlaced image the + * row number is the row number within the sub-image of the interlace pass, so + * the value will increase to the height of the sub-image (not the full image) + * then reset to 0 for the next pass. + * + * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to + * find the output pixel (x,y) given an interlaced sub-image pixel + * (row,col,pass). (See below for these macros.) + */ +PNG_EXPORT(217, png_uint_32, png_get_current_row_number, (png_const_structrp)); +PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structrp)); +#endif + +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED +/* This callback is called only for *unknown* chunks. If + * PNG_HANDLE_AS_UNKNOWN_SUPPORTED is set then it is possible to set known + * chunks to be treated as unknown, however in this case the callback must do + * any processing required by the chunk (e.g. by calling the appropriate + * png_set_ APIs.) + * + * There is no write support - on write, by default, all the chunks in the + * 'unknown' list are written in the specified position. + * + * The integer return from the callback function is interpreted thus: + * + * negative: An error occurred; png_chunk_error will be called. + * zero: The chunk was not handled, the chunk will be saved. A critical + * chunk will cause an error at this point unless it is to be saved. + * positive: The chunk was handled, libpng will ignore/discard it. + * + * See "INTERACTION WITH USER CHUNK CALLBACKS" below for important notes about + * how this behavior will change in libpng 1.7 + */ +PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structrp png_ptr, + png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +/* Sets the function callbacks for the push reader, and a pointer to a + * user-defined structure available to the callback functions. + */ +PNG_EXPORT(90, void, png_set_progressive_read_fn, (png_structrp png_ptr, + png_voidp progressive_ptr, png_progressive_info_ptr info_fn, + png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn)); + +/* Returns the user pointer associated with the push read functions */ +PNG_EXPORT(91, png_voidp, png_get_progressive_ptr, + (png_const_structrp png_ptr)); + +/* Function to be called when data becomes available */ +PNG_EXPORT(92, void, png_process_data, (png_structrp png_ptr, + png_inforp info_ptr, png_bytep buffer, size_t buffer_size)); + +/* A function which may be called *only* within png_process_data to stop the + * processing of any more data. The function returns the number of bytes + * remaining, excluding any that libpng has cached internally. A subsequent + * call to png_process_data must supply these bytes again. If the argument + * 'save' is set to true the routine will first save all the pending data and + * will always return 0. + */ +PNG_EXPORT(219, size_t, png_process_data_pause, (png_structrp, int save)); + +/* A function which may be called *only* outside (after) a call to + * png_process_data. It returns the number of bytes of data to skip in the + * input. Normally it will return 0, but if it returns a non-zero value the + * application must skip than number of bytes of input data and pass the + * following data to the next call to png_process_data. + */ +PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structrp)); + +/* Function that combines rows. 'new_row' is a flag that should come from + * the callback and be non-NULL if anything needs to be done; the library + * stores its own version of the new data internally and ignores the passed + * in value. + */ +PNG_EXPORT(93, void, png_progressive_combine_row, (png_const_structrp png_ptr, + png_bytep old_row, png_const_bytep new_row)); +#endif /* PROGRESSIVE_READ */ + +PNG_EXPORTA(94, png_voidp, png_malloc, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); +/* Added at libpng version 1.4.0 */ +PNG_EXPORTA(95, png_voidp, png_calloc, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); + +/* Added at libpng version 1.2.4 */ +PNG_EXPORTA(96, png_voidp, png_malloc_warn, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); + +/* Frees a pointer allocated by png_malloc() */ +PNG_EXPORT(97, void, png_free, (png_const_structrp png_ptr, png_voidp ptr)); + +/* Free data that was allocated internally */ +PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 free_me, int num)); + +/* Reassign the responsibility for freeing existing data, whether allocated + * by libpng or by the application; this works on the png_info structure passed + * in, without changing the state for other png_info structures. + */ +PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr, + png_inforp info_ptr, int freer, png_uint_32 mask)); + +/* Assignments for png_data_freer */ +#define PNG_DESTROY_WILL_FREE_DATA 1 +#define PNG_SET_WILL_FREE_DATA 1 +#define PNG_USER_WILL_FREE_DATA 2 +/* Flags for png_ptr->free_me and info_ptr->free_me */ +#define PNG_FREE_HIST 0x0008U +#define PNG_FREE_ICCP 0x0010U +#define PNG_FREE_SPLT 0x0020U +#define PNG_FREE_ROWS 0x0040U +#define PNG_FREE_PCAL 0x0080U +#define PNG_FREE_SCAL 0x0100U +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +# define PNG_FREE_UNKN 0x0200U +#endif +/* PNG_FREE_LIST 0x0400U removed in 1.6.0 because it is ignored */ +#define PNG_FREE_PLTE 0x1000U +#define PNG_FREE_TRNS 0x2000U +#define PNG_FREE_TEXT 0x4000U +#define PNG_FREE_EXIF 0x8000U /* Added at libpng-1.6.31 */ +#define PNG_FREE_ALL 0xffffU +#define PNG_FREE_MUL 0x4220U /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ + +#ifdef PNG_USER_MEM_SUPPORTED +PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED PNG_DEPRECATED); +PNG_EXPORTA(101, void, png_free_default, (png_const_structrp png_ptr, + png_voidp ptr), PNG_DEPRECATED); +#endif + +#ifdef PNG_ERROR_TEXT_SUPPORTED +/* Fatal error in PNG image of libpng - can't continue */ +PNG_EXPORTA(102, void, png_error, (png_const_structrp png_ptr, + png_const_charp error_message), PNG_NORETURN); + +/* The same, but the chunk name is prepended to the error string. */ +PNG_EXPORTA(103, void, png_chunk_error, (png_const_structrp png_ptr, + png_const_charp error_message), PNG_NORETURN); + +#else +/* Fatal error in PNG image of libpng - can't continue */ +PNG_EXPORTA(104, void, png_err, (png_const_structrp png_ptr), PNG_NORETURN); +# define png_error(s1,s2) png_err(s1) +# define png_chunk_error(s1,s2) png_err(s1) +#endif + +#ifdef PNG_WARNINGS_SUPPORTED +/* Non-fatal error in libpng. Can continue, but may have a problem. */ +PNG_EXPORT(105, void, png_warning, (png_const_structrp png_ptr, + png_const_charp warning_message)); + +/* Non-fatal error in libpng, chunk name is prepended to message. */ +PNG_EXPORT(106, void, png_chunk_warning, (png_const_structrp png_ptr, + png_const_charp warning_message)); +#else +# define png_warning(s1,s2) ((void)(s1)) +# define png_chunk_warning(s1,s2) ((void)(s1)) +#endif + +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +/* Benign error in libpng. Can continue, but may have a problem. + * User can choose whether to handle as a fatal error or as a warning. */ +PNG_EXPORT(107, void, png_benign_error, (png_const_structrp png_ptr, + png_const_charp warning_message)); + +#ifdef PNG_READ_SUPPORTED +/* Same, chunk name is prepended to message (only during read) */ +PNG_EXPORT(108, void, png_chunk_benign_error, (png_const_structrp png_ptr, + png_const_charp warning_message)); +#endif + +PNG_EXPORT(109, void, png_set_benign_errors, + (png_structrp png_ptr, int allowed)); +#else +# ifdef PNG_ALLOW_BENIGN_ERRORS +# define png_benign_error png_warning +# define png_chunk_benign_error png_chunk_warning +# else +# define png_benign_error png_error +# define png_chunk_benign_error png_chunk_error +# endif +#endif + +/* The png_set_ functions are for storing values in the png_info_struct. + * Similarly, the png_get_ calls are used to read values from the + * png_info_struct, either storing the parameters in the passed variables, or + * setting pointers into the png_info_struct where the data is stored. The + * png_get_ functions return a non-zero value if the data was available + * in info_ptr, or return zero and do not change any of the parameters if the + * data was not available. + * + * These functions should be used instead of directly accessing png_info + * to avoid problems with future changes in the size and internal layout of + * png_info_struct. + */ +/* Returns "flag" if chunk data is valid in info_ptr. */ +PNG_EXPORT(110, png_uint_32, png_get_valid, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 flag)); + +/* Returns number of bytes needed to hold a transformed row. */ +PNG_EXPORT(111, size_t, png_get_rowbytes, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +#ifdef PNG_INFO_IMAGE_SUPPORTED +/* Returns row_pointers, which is an array of pointers to scanlines that was + * returned from png_read_png(). + */ +PNG_EXPORT(112, png_bytepp, png_get_rows, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Set row_pointers, which is an array of pointers to scanlines for use + * by png_write_png(). + */ +PNG_EXPORT(113, void, png_set_rows, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytepp row_pointers)); +#endif + +/* Returns number of color channels in image. */ +PNG_EXPORT(114, png_byte, png_get_channels, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +#ifdef PNG_EASY_ACCESS_SUPPORTED +/* Returns image width in pixels. */ +PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image height in pixels. */ +PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image bit_depth. */ +PNG_EXPORT(117, png_byte, png_get_bit_depth, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image color_type. */ +PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image filter_type. */ +PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image interlace_type. */ +PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image compression_type. */ +PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image resolution in pixels per meter, from pHYs chunk data. */ +PNG_EXPORT(122, png_uint_32, png_get_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(123, png_uint_32, png_get_x_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(124, png_uint_32, png_get_y_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +/* Returns pixel aspect ratio, computed from pHYs chunk data. */ +PNG_FP_EXPORT(125, float, png_get_pixel_aspect_ratio, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) + +/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */ +PNG_EXPORT(126, png_int_32, png_get_x_offset_pixels, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(127, png_int_32, png_get_y_offset_pixels, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(128, png_int_32, png_get_x_offset_microns, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(129, png_int_32, png_get_y_offset_microns, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +#endif /* EASY_ACCESS */ + +#ifdef PNG_READ_SUPPORTED +/* Returns pointer to signature string read from PNG header */ +PNG_EXPORT(130, png_const_bytep, png_get_signature, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); +#endif + +#ifdef PNG_bKGD_SUPPORTED +PNG_EXPORT(131, png_uint_32, png_get_bKGD, (png_const_structrp png_ptr, + png_inforp info_ptr, png_color_16p *background)); +#endif + +#ifdef PNG_bKGD_SUPPORTED +PNG_EXPORT(132, void, png_set_bKGD, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_color_16p background)); +#endif + +#ifdef PNG_cHRM_SUPPORTED +PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *white_x, double *white_y, double *red_x, + double *red_y, double *green_x, double *green_y, double *blue_x, + double *blue_y)) +PNG_FP_EXPORT(230, png_uint_32, png_get_cHRM_XYZ, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *red_X, double *red_Y, double *red_Z, + double *green_X, double *green_Y, double *green_Z, double *blue_X, + double *blue_Y, double *blue_Z)) +PNG_FIXED_EXPORT(134, png_uint_32, png_get_cHRM_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_white_x, png_fixed_point *int_white_y, + png_fixed_point *int_red_x, png_fixed_point *int_red_y, + png_fixed_point *int_green_x, png_fixed_point *int_green_y, + png_fixed_point *int_blue_x, png_fixed_point *int_blue_y)) +PNG_FIXED_EXPORT(231, png_uint_32, png_get_cHRM_XYZ_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_red_X, png_fixed_point *int_red_Y, + png_fixed_point *int_red_Z, png_fixed_point *int_green_X, + png_fixed_point *int_green_Y, png_fixed_point *int_green_Z, + png_fixed_point *int_blue_X, png_fixed_point *int_blue_Y, + png_fixed_point *int_blue_Z)) +#endif + +#ifdef PNG_cHRM_SUPPORTED +PNG_FP_EXPORT(135, void, png_set_cHRM, (png_const_structrp png_ptr, + png_inforp info_ptr, + double white_x, double white_y, double red_x, double red_y, double green_x, + double green_y, double blue_x, double blue_y)) +PNG_FP_EXPORT(232, void, png_set_cHRM_XYZ, (png_const_structrp png_ptr, + png_inforp info_ptr, double red_X, double red_Y, double red_Z, + double green_X, double green_Y, double green_Z, double blue_X, + double blue_Y, double blue_Z)) +PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_white_x, + png_fixed_point int_white_y, png_fixed_point int_red_x, + png_fixed_point int_red_y, png_fixed_point int_green_x, + png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)) +PNG_FIXED_EXPORT(233, void, png_set_cHRM_XYZ_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_red_X, png_fixed_point int_red_Y, + png_fixed_point int_red_Z, png_fixed_point int_green_X, + png_fixed_point int_green_Y, png_fixed_point int_green_Z, + png_fixed_point int_blue_X, png_fixed_point int_blue_Y, + png_fixed_point int_blue_Z)) +#endif + +#ifdef PNG_eXIf_SUPPORTED +PNG_EXPORT(246, png_uint_32, png_get_eXIf, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytep *exif)); +PNG_EXPORT(247, void, png_set_eXIf, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytep exif)); + +PNG_EXPORT(248, png_uint_32, png_get_eXIf_1, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *num_exif, png_bytep *exif)); +PNG_EXPORT(249, void, png_set_eXIf_1, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 num_exif, png_bytep exif)); +#endif + +#ifdef PNG_gAMA_SUPPORTED +PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *file_gamma)) +PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_file_gamma)) +#endif + +#ifdef PNG_gAMA_SUPPORTED +PNG_FP_EXPORT(139, void, png_set_gAMA, (png_const_structrp png_ptr, + png_inforp info_ptr, double file_gamma)) +PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_file_gamma)) +#endif + +#ifdef PNG_hIST_SUPPORTED +PNG_EXPORT(141, png_uint_32, png_get_hIST, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_16p *hist)); +PNG_EXPORT(142, void, png_set_hIST, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_uint_16p hist)); +#endif + +PNG_EXPORT(143, png_uint_32, png_get_IHDR, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *width, png_uint_32 *height, + int *bit_depth, int *color_type, int *interlace_method, + int *compression_method, int *filter_method)); + +PNG_EXPORT(144, void, png_set_IHDR, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_method, int compression_method, + int filter_method)); + +#ifdef PNG_oFFs_SUPPORTED +PNG_EXPORT(145, png_uint_32, png_get_oFFs, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, + int *unit_type)); +#endif + +#ifdef PNG_oFFs_SUPPORTED +PNG_EXPORT(146, void, png_set_oFFs, (png_const_structrp png_ptr, + png_inforp info_ptr, png_int_32 offset_x, png_int_32 offset_y, + int unit_type)); +#endif + +#ifdef PNG_pCAL_SUPPORTED +PNG_EXPORT(147, png_uint_32, png_get_pCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, png_charp *purpose, png_int_32 *X0, + png_int_32 *X1, int *type, int *nparams, png_charp *units, + png_charpp *params)); +#endif + +#ifdef PNG_pCAL_SUPPORTED +PNG_EXPORT(148, void, png_set_pCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_charp purpose, png_int_32 X0, png_int_32 X1, + int type, int nparams, png_const_charp units, png_charpp params)); +#endif + +#ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(149, png_uint_32, png_get_pHYs, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, + int *unit_type)); +#endif + +#ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(150, void, png_set_pHYs, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); +#endif + +PNG_EXPORT(151, png_uint_32, png_get_PLTE, (png_const_structrp png_ptr, + png_inforp info_ptr, png_colorp *palette, int *num_palette)); + +PNG_EXPORT(152, void, png_set_PLTE, (png_structrp png_ptr, + png_inforp info_ptr, png_const_colorp palette, int num_palette)); + +#ifdef PNG_sBIT_SUPPORTED +PNG_EXPORT(153, png_uint_32, png_get_sBIT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_color_8p *sig_bit)); +#endif + +#ifdef PNG_sBIT_SUPPORTED +PNG_EXPORT(154, void, png_set_sBIT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_color_8p sig_bit)); +#endif + +#ifdef PNG_sRGB_SUPPORTED +PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structrp png_ptr, + png_const_inforp info_ptr, int *file_srgb_intent)); +#endif + +#ifdef PNG_sRGB_SUPPORTED +PNG_EXPORT(156, void, png_set_sRGB, (png_const_structrp png_ptr, + png_inforp info_ptr, int srgb_intent)); +PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_const_structrp png_ptr, + png_inforp info_ptr, int srgb_intent)); +#endif + +#ifdef PNG_iCCP_SUPPORTED +PNG_EXPORT(158, png_uint_32, png_get_iCCP, (png_const_structrp png_ptr, + png_inforp info_ptr, png_charpp name, int *compression_type, + png_bytepp profile, png_uint_32 *proflen)); +#endif + +#ifdef PNG_iCCP_SUPPORTED +PNG_EXPORT(159, void, png_set_iCCP, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_charp name, int compression_type, + png_const_bytep profile, png_uint_32 proflen)); +#endif + +#ifdef PNG_sPLT_SUPPORTED +PNG_EXPORT(160, int, png_get_sPLT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_sPLT_tpp entries)); +#endif + +#ifdef PNG_sPLT_SUPPORTED +PNG_EXPORT(161, void, png_set_sPLT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_sPLT_tp entries, int nentries)); +#endif + +#ifdef PNG_TEXT_SUPPORTED +/* png_get_text also returns the number of text chunks in *num_text */ +PNG_EXPORT(162, int, png_get_text, (png_const_structrp png_ptr, + png_inforp info_ptr, png_textp *text_ptr, int *num_text)); +#endif + +/* Note while png_set_text() will accept a structure whose text, + * language, and translated keywords are NULL pointers, the structure + * returned by png_get_text will always contain regular + * zero-terminated C strings. They might be empty strings but + * they will never be NULL pointers. + */ + +#ifdef PNG_TEXT_SUPPORTED +PNG_EXPORT(163, void, png_set_text, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_textp text_ptr, int num_text)); +#endif + +#ifdef PNG_tIME_SUPPORTED +PNG_EXPORT(164, png_uint_32, png_get_tIME, (png_const_structrp png_ptr, + png_inforp info_ptr, png_timep *mod_time)); +#endif + +#ifdef PNG_tIME_SUPPORTED +PNG_EXPORT(165, void, png_set_tIME, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_timep mod_time)); +#endif + +#ifdef PNG_tRNS_SUPPORTED +PNG_EXPORT(166, png_uint_32, png_get_tRNS, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytep *trans_alpha, int *num_trans, + png_color_16p *trans_color)); +#endif + +#ifdef PNG_tRNS_SUPPORTED +PNG_EXPORT(167, void, png_set_tRNS, (png_structrp png_ptr, + png_inforp info_ptr, png_const_bytep trans_alpha, int num_trans, + png_const_color_16p trans_color)); +#endif + +#ifdef PNG_sCAL_SUPPORTED +PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL, (png_const_structrp png_ptr, + png_const_inforp info_ptr, int *unit, double *width, double *height)) +#if defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) || \ + defined(PNG_FLOATING_POINT_SUPPORTED) +/* NOTE: this API is currently implemented using floating point arithmetic, + * consequently it can only be used on systems with floating point support. + * In any case the range of values supported by png_fixed_point is small and it + * is highly recommended that png_get_sCAL_s be used instead. + */ +PNG_FIXED_EXPORT(214, png_uint_32, png_get_sCAL_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit, + png_fixed_point *width, png_fixed_point *height)) +#endif +PNG_EXPORT(169, png_uint_32, png_get_sCAL_s, + (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit, + png_charpp swidth, png_charpp sheight)); + +PNG_FP_EXPORT(170, void, png_set_sCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, double width, double height)) +PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, png_fixed_point width, + png_fixed_point height)) +PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, + png_const_charp swidth, png_const_charp sheight)); +#endif /* sCAL */ + +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED +/* Provide the default handling for all unknown chunks or, optionally, for + * specific unknown chunks. + * + * NOTE: prior to 1.6.0 the handling specified for particular chunks on read was + * ignored and the default was used, the per-chunk setting only had an effect on + * write. If you wish to have chunk-specific handling on read in code that must + * work on earlier versions you must use a user chunk callback to specify the + * desired handling (keep or discard.) + * + * The 'keep' parameter is a PNG_HANDLE_CHUNK_ value as listed below. The + * parameter is interpreted as follows: + * + * READ: + * PNG_HANDLE_CHUNK_AS_DEFAULT: + * Known chunks: do normal libpng processing, do not keep the chunk (but + * see the comments below about PNG_HANDLE_AS_UNKNOWN_SUPPORTED) + * Unknown chunks: for a specific chunk use the global default, when used + * as the default discard the chunk data. + * PNG_HANDLE_CHUNK_NEVER: + * Discard the chunk data. + * PNG_HANDLE_CHUNK_IF_SAFE: + * Keep the chunk data if the chunk is not critical else raise a chunk + * error. + * PNG_HANDLE_CHUNK_ALWAYS: + * Keep the chunk data. + * + * If the chunk data is saved it can be retrieved using png_get_unknown_chunks, + * below. Notice that specifying "AS_DEFAULT" as a global default is equivalent + * to specifying "NEVER", however when "AS_DEFAULT" is used for specific chunks + * it simply resets the behavior to the libpng default. + * + * INTERACTION WITH USER CHUNK CALLBACKS: + * The per-chunk handling is always used when there is a png_user_chunk_ptr + * callback and the callback returns 0; the chunk is then always stored *unless* + * it is critical and the per-chunk setting is other than ALWAYS. Notice that + * the global default is *not* used in this case. (In effect the per-chunk + * value is incremented to at least IF_SAFE.) + * + * IMPORTANT NOTE: this behavior will change in libpng 1.7 - the global and + * per-chunk defaults will be honored. If you want to preserve the current + * behavior when your callback returns 0 you must set PNG_HANDLE_CHUNK_IF_SAFE + * as the default - if you don't do this libpng 1.6 will issue a warning. + * + * If you want unhandled unknown chunks to be discarded in libpng 1.6 and + * earlier simply return '1' (handled). + * + * PNG_HANDLE_AS_UNKNOWN_SUPPORTED: + * If this is *not* set known chunks will always be handled by libpng and + * will never be stored in the unknown chunk list. Known chunks listed to + * png_set_keep_unknown_chunks will have no effect. If it is set then known + * chunks listed with a keep other than AS_DEFAULT will *never* be processed + * by libpng, in addition critical chunks must either be processed by the + * callback or saved. + * + * The IHDR and IEND chunks must not be listed. Because this turns off the + * default handling for chunks that would otherwise be recognized the + * behavior of libpng transformations may well become incorrect! + * + * WRITE: + * When writing chunks the options only apply to the chunks specified by + * png_set_unknown_chunks (below), libpng will *always* write known chunks + * required by png_set_ calls and will always write the core critical chunks + * (as required for PLTE). + * + * Each chunk in the png_set_unknown_chunks list is looked up in the + * png_set_keep_unknown_chunks list to find the keep setting, this is then + * interpreted as follows: + * + * PNG_HANDLE_CHUNK_AS_DEFAULT: + * Write safe-to-copy chunks and write other chunks if the global + * default is set to _ALWAYS, otherwise don't write this chunk. + * PNG_HANDLE_CHUNK_NEVER: + * Do not write the chunk. + * PNG_HANDLE_CHUNK_IF_SAFE: + * Write the chunk if it is safe-to-copy, otherwise do not write it. + * PNG_HANDLE_CHUNK_ALWAYS: + * Write the chunk. + * + * Note that the default behavior is effectively the opposite of the read case - + * in read unknown chunks are not stored by default, in write they are written + * by default. Also the behavior of PNG_HANDLE_CHUNK_IF_SAFE is very different + * - on write the safe-to-copy bit is checked, on read the critical bit is + * checked and on read if the chunk is critical an error will be raised. + * + * num_chunks: + * =========== + * If num_chunks is positive, then the "keep" parameter specifies the manner + * for handling only those chunks appearing in the chunk_list array, + * otherwise the chunk list array is ignored. + * + * If num_chunks is 0 the "keep" parameter specifies the default behavior for + * unknown chunks, as described above. + * + * If num_chunks is negative, then the "keep" parameter specifies the manner + * for handling all unknown chunks plus all chunks recognized by libpng + * except for the IHDR, PLTE, tRNS, IDAT, and IEND chunks (which continue to + * be processed by libpng. + */ +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED +PNG_EXPORT(172, void, png_set_keep_unknown_chunks, (png_structrp png_ptr, + int keep, png_const_bytep chunk_list, int num_chunks)); +#endif /* HANDLE_AS_UNKNOWN */ + +/* The "keep" PNG_HANDLE_CHUNK_ parameter for the specified chunk is returned; + * the result is therefore true (non-zero) if special handling is required, + * false for the default handling. + */ +PNG_EXPORT(173, int, png_handle_as_unknown, (png_const_structrp png_ptr, + png_const_bytep chunk_name)); +#endif /* SET_UNKNOWN_CHUNKS */ + +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +PNG_EXPORT(174, void, png_set_unknown_chunks, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_unknown_chunkp unknowns, + int num_unknowns)); + /* NOTE: prior to 1.6.0 this routine set the 'location' field of the added + * unknowns to the location currently stored in the png_struct. This is + * invariably the wrong value on write. To fix this call the following API + * for each chunk in the list with the correct location. If you know your + * code won't be compiled on earlier versions you can rely on + * png_set_unknown_chunks(write-ptr, png_get_unknown_chunks(read-ptr)) doing + * the correct thing. + */ + +PNG_EXPORT(175, void, png_set_unknown_chunk_location, + (png_const_structrp png_ptr, png_inforp info_ptr, int chunk, int location)); + +PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structrp png_ptr, + png_inforp info_ptr, png_unknown_chunkpp entries)); +#endif + +/* Png_free_data() will turn off the "valid" flag for anything it frees. + * If you need to turn it off for a chunk that your application has freed, + * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); + */ +PNG_EXPORT(177, void, png_set_invalid, (png_const_structrp png_ptr, + png_inforp info_ptr, int mask)); + +#ifdef PNG_INFO_IMAGE_SUPPORTED +/* The "params" pointer is currently not used and is for future expansion. */ +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +PNG_EXPORT(178, void, png_read_png, (png_structrp png_ptr, png_inforp info_ptr, + int transforms, png_voidp params)); +#endif +#ifdef PNG_WRITE_SUPPORTED +PNG_EXPORT(179, void, png_write_png, (png_structrp png_ptr, png_inforp info_ptr, + int transforms, png_voidp params)); +#endif +#endif + +PNG_EXPORT(180, png_const_charp, png_get_copyright, + (png_const_structrp png_ptr)); +PNG_EXPORT(181, png_const_charp, png_get_header_ver, + (png_const_structrp png_ptr)); +PNG_EXPORT(182, png_const_charp, png_get_header_version, + (png_const_structrp png_ptr)); +PNG_EXPORT(183, png_const_charp, png_get_libpng_ver, + (png_const_structrp png_ptr)); + +#ifdef PNG_MNG_FEATURES_SUPPORTED +PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structrp png_ptr, + png_uint_32 mng_features_permitted)); +#endif + +/* For use in png_set_keep_unknown, added to version 1.2.6 */ +#define PNG_HANDLE_CHUNK_AS_DEFAULT 0 +#define PNG_HANDLE_CHUNK_NEVER 1 +#define PNG_HANDLE_CHUNK_IF_SAFE 2 +#define PNG_HANDLE_CHUNK_ALWAYS 3 +#define PNG_HANDLE_CHUNK_LAST 4 + +/* Strip the prepended error numbers ("#nnn ") from error and warning + * messages before passing them to the error or warning handler. + */ +#ifdef PNG_ERROR_NUMBERS_SUPPORTED +PNG_EXPORT(185, void, png_set_strip_error_numbers, (png_structrp png_ptr, + png_uint_32 strip_mode)); +#endif + +/* Added in libpng-1.2.6 */ +#ifdef PNG_SET_USER_LIMITS_SUPPORTED +PNG_EXPORT(186, void, png_set_user_limits, (png_structrp png_ptr, + png_uint_32 user_width_max, png_uint_32 user_height_max)); +PNG_EXPORT(187, png_uint_32, png_get_user_width_max, + (png_const_structrp png_ptr)); +PNG_EXPORT(188, png_uint_32, png_get_user_height_max, + (png_const_structrp png_ptr)); +/* Added in libpng-1.4.0 */ +PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structrp png_ptr, + png_uint_32 user_chunk_cache_max)); +PNG_EXPORT(190, png_uint_32, png_get_chunk_cache_max, + (png_const_structrp png_ptr)); +/* Added in libpng-1.4.1 */ +PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structrp png_ptr, + png_alloc_size_t user_chunk_cache_max)); +PNG_EXPORT(192, png_alloc_size_t, png_get_chunk_malloc_max, + (png_const_structrp png_ptr)); +#endif + +#if defined(PNG_INCH_CONVERSIONS_SUPPORTED) +PNG_EXPORT(193, png_uint_32, png_get_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_EXPORT(194, png_uint_32, png_get_x_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_EXPORT(195, png_uint_32, png_get_y_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_FP_EXPORT(196, float, png_get_x_offset_inches, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ +PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#endif + +PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structrp png_ptr, + png_const_inforp info_ptr)) +#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ +PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#endif + +# ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, + int *unit_type)); +# endif /* pHYs */ +#endif /* INCH_CONVERSIONS */ + +/* Added in libpng-1.4.0 */ +#ifdef PNG_IO_STATE_SUPPORTED +PNG_EXPORT(199, png_uint_32, png_get_io_state, (png_const_structrp png_ptr)); + +/* Removed from libpng 1.6; use png_get_io_chunk_type. */ +PNG_REMOVED(200, png_const_bytep, png_get_io_chunk_name, (png_structrp png_ptr), + PNG_DEPRECATED) + +PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type, + (png_const_structrp png_ptr)); + +/* The flags returned by png_get_io_state() are the following: */ +# define PNG_IO_NONE 0x0000 /* no I/O at this moment */ +# define PNG_IO_READING 0x0001 /* currently reading */ +# define PNG_IO_WRITING 0x0002 /* currently writing */ +# define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */ +# define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */ +# define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */ +# define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */ +# define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */ +# define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */ +#endif /* IO_STATE */ + +/* Interlace support. The following macros are always defined so that if + * libpng interlace handling is turned off the macros may be used to handle + * interlaced images within the application. + */ +#define PNG_INTERLACE_ADAM7_PASSES 7 + +/* Two macros to return the first row and first column of the original, + * full, image which appears in a given pass. 'pass' is in the range 0 + * to 6 and the result is in the range 0 to 7. + */ +#define PNG_PASS_START_ROW(pass) (((1&~(pass))<<(3-((pass)>>1)))&7) +#define PNG_PASS_START_COL(pass) (((1& (pass))<<(3-(((pass)+1)>>1)))&7) + +/* A macro to return the offset between pixels in the output row for a pair of + * pixels in the input - effectively the inverse of the 'COL_SHIFT' macro that + * follows. Note that ROW_OFFSET is the offset from one row to the next whereas + * COL_OFFSET is from one column to the next, within a row. + */ +#define PNG_PASS_ROW_OFFSET(pass) ((pass)>2?(8>>(((pass)-1)>>1)):8) +#define PNG_PASS_COL_OFFSET(pass) (1<<((7-(pass))>>1)) + +/* Two macros to help evaluate the number of rows or columns in each + * pass. This is expressed as a shift - effectively log2 of the number or + * rows or columns in each 8x8 tile of the original image. + */ +#define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3) +#define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3) + +/* Hence two macros to determine the number of rows or columns in a given + * pass of an image given its height or width. In fact these macros may + * return non-zero even though the sub-image is empty, because the other + * dimension may be empty for a small image. + */ +#define PNG_PASS_ROWS(height, pass) (((height)+(((1<>PNG_PASS_ROW_SHIFT(pass)) +#define PNG_PASS_COLS(width, pass) (((width)+(((1<>PNG_PASS_COL_SHIFT(pass)) + +/* For the reader row callbacks (both progressive and sequential) it is + * necessary to find the row in the output image given a row in an interlaced + * image, so two more macros: + */ +#define PNG_ROW_FROM_PASS_ROW(y_in, pass) \ + (((y_in)<>(((7-(off))-(pass))<<2)) & 0xF) | \ + ((0x01145AF0>>(((7-(off))-(pass))<<2)) & 0xF0)) + +#define PNG_ROW_IN_INTERLACE_PASS(y, pass) \ + ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1) +#define PNG_COL_IN_INTERLACE_PASS(x, pass) \ + ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1) + +#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED +/* With these routines we avoid an integer divide, which will be slower on + * most machines. However, it does take more operations than the corresponding + * divide method, so it may be slower on a few RISC systems. There are two + * shifts (by 8 or 16 bits) and an addition, versus a single integer divide. + * + * Note that the rounding factors are NOT supposed to be the same! 128 and + * 32768 are correct for the NODIV code; 127 and 32767 are correct for the + * standard method. + * + * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ] + */ + + /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ + +# define png_composite(composite, fg, alpha, bg) \ + { \ + png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \ + * (png_uint_16)(alpha) \ + + (png_uint_16)(bg)*(png_uint_16)(255 \ + - (png_uint_16)(alpha)) + 128); \ + (composite) = (png_byte)(((temp + (temp >> 8)) >> 8) & 0xff); \ + } + +# define png_composite_16(composite, fg, alpha, bg) \ + { \ + png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \ + * (png_uint_32)(alpha) \ + + (png_uint_32)(bg)*(65535 \ + - (png_uint_32)(alpha)) + 32768); \ + (composite) = (png_uint_16)(0xffff & ((temp + (temp >> 16)) >> 16)); \ + } + +#else /* Standard method using integer division */ + +# define png_composite(composite, fg, alpha, bg) \ + (composite) = \ + (png_byte)(0xff & (((png_uint_16)(fg) * (png_uint_16)(alpha) + \ + (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \ + 127) / 255)) + +# define png_composite_16(composite, fg, alpha, bg) \ + (composite) = \ + (png_uint_16)(0xffff & (((png_uint_32)(fg) * (png_uint_32)(alpha) + \ + (png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) + \ + 32767) / 65535)) +#endif /* READ_COMPOSITE_NODIV */ + +#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(201, png_uint_32, png_get_uint_32, (png_const_bytep buf)); +PNG_EXPORT(202, png_uint_16, png_get_uint_16, (png_const_bytep buf)); +PNG_EXPORT(203, png_int_32, png_get_int_32, (png_const_bytep buf)); +#endif + +PNG_EXPORT(204, png_uint_32, png_get_uint_31, (png_const_structrp png_ptr, + png_const_bytep buf)); +/* No png_get_int_16 -- may be added if there's a real need for it. */ + +/* Place a 32-bit number into a buffer in PNG byte order (big-endian). */ +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(205, void, png_save_uint_32, (png_bytep buf, png_uint_32 i)); +#endif +#ifdef PNG_SAVE_INT_32_SUPPORTED +PNG_EXPORT(206, void, png_save_int_32, (png_bytep buf, png_int_32 i)); +#endif + +/* Place a 16-bit number into a buffer in PNG byte order. + * The parameter is declared unsigned int, not png_uint_16, + * just to avoid potential problems on pre-ANSI C compilers. + */ +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i)); +/* No png_save_int_16 -- may be added if there's a real need for it. */ +#endif + +#ifdef PNG_USE_READ_MACROS +/* Inline macros to do direct reads of bytes from the input buffer. + * The png_get_int_32() routine assumes we are using two's complement + * format for negative values, which is almost certainly true. + */ +# define PNG_get_uint_32(buf) \ + (((png_uint_32)(*(buf)) << 24) + \ + ((png_uint_32)(*((buf) + 1)) << 16) + \ + ((png_uint_32)(*((buf) + 2)) << 8) + \ + ((png_uint_32)(*((buf) + 3)))) + + /* From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the + * function) incorrectly returned a value of type png_uint_32. + */ +# define PNG_get_uint_16(buf) \ + ((png_uint_16) \ + (((unsigned int)(*(buf)) << 8) + \ + ((unsigned int)(*((buf) + 1))))) + +# define PNG_get_int_32(buf) \ + ((png_int_32)((*(buf) & 0x80) \ + ? -((png_int_32)(((png_get_uint_32(buf)^0xffffffffU)+1U)&0x7fffffffU)) \ + : (png_int_32)png_get_uint_32(buf))) + +/* If PNG_PREFIX is defined the same thing as below happens in pnglibconf.h, + * but defining a macro name prefixed with PNG_PREFIX. + */ +# ifndef PNG_PREFIX +# define png_get_uint_32(buf) PNG_get_uint_32(buf) +# define png_get_uint_16(buf) PNG_get_uint_16(buf) +# define png_get_int_32(buf) PNG_get_int_32(buf) +# endif +#else +# ifdef PNG_PREFIX + /* No macros; revert to the (redefined) function */ +# define PNG_get_uint_32 (png_get_uint_32) +# define PNG_get_uint_16 (png_get_uint_16) +# define PNG_get_int_32 (png_get_int_32) +# endif +#endif + +#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED +PNG_EXPORT(242, void, png_set_check_for_invalid_index, + (png_structrp png_ptr, int allowed)); +# ifdef PNG_GET_PALETTE_MAX_SUPPORTED +PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr, + png_const_infop info_ptr)); +# endif +#endif /* CHECK_FOR_INVALID_INDEX */ + +/******************************************************************************* + * Section 5: SIMPLIFIED API + ******************************************************************************* + * + * Please read the documentation in libpng-manual.txt (TODO: write said + * documentation) if you don't understand what follows. + * + * The simplified API hides the details of both libpng and the PNG file format + * itself. It allows PNG files to be read into a very limited number of + * in-memory bitmap formats or to be written from the same formats. If these + * formats do not accommodate your needs then you can, and should, use the more + * sophisticated APIs above - these support a wide variety of in-memory formats + * and a wide variety of sophisticated transformations to those formats as well + * as a wide variety of APIs to manipulate ancillary information. + * + * To read a PNG file using the simplified API: + * + * 1) Declare a 'png_image' structure (see below) on the stack, set the + * version field to PNG_IMAGE_VERSION and the 'opaque' pointer to NULL + * (this is REQUIRED, your program may crash if you don't do it.) + * 2) Call the appropriate png_image_begin_read... function. + * 3) Set the png_image 'format' member to the required sample format. + * 4) Allocate a buffer for the image and, if required, the color-map. + * 5) Call png_image_finish_read to read the image and, if required, the + * color-map into your buffers. + * + * There are no restrictions on the format of the PNG input itself; all valid + * color types, bit depths, and interlace methods are acceptable, and the + * input image is transformed as necessary to the requested in-memory format + * during the png_image_finish_read() step. The only caveat is that if you + * request a color-mapped image from a PNG that is full-color or makes + * complex use of an alpha channel the transformation is extremely lossy and the + * result may look terrible. + * + * To write a PNG file using the simplified API: + * + * 1) Declare a 'png_image' structure on the stack and memset() it to all zero. + * 2) Initialize the members of the structure that describe the image, setting + * the 'format' member to the format of the image samples. + * 3) Call the appropriate png_image_write... function with a pointer to the + * image and, if necessary, the color-map to write the PNG data. + * + * png_image is a structure that describes the in-memory format of an image + * when it is being read or defines the in-memory format of an image that you + * need to write: + */ +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) || \ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) + +#define PNG_IMAGE_VERSION 1 + +typedef struct png_control *png_controlp; +typedef struct +{ + png_controlp opaque; /* Initialize to NULL, free with png_image_free */ + png_uint_32 version; /* Set to PNG_IMAGE_VERSION */ + png_uint_32 width; /* Image width in pixels (columns) */ + png_uint_32 height; /* Image height in pixels (rows) */ + png_uint_32 format; /* Image format as defined below */ + png_uint_32 flags; /* A bit mask containing informational flags */ + png_uint_32 colormap_entries; + /* Number of entries in the color-map */ + + /* In the event of an error or warning the following field will be set to a + * non-zero value and the 'message' field will contain a '\0' terminated + * string with the libpng error or warning message. If both warnings and + * an error were encountered, only the error is recorded. If there + * are multiple warnings, only the first one is recorded. + * + * The upper 30 bits of this value are reserved, the low two bits contain + * a value as follows: + */ +# define PNG_IMAGE_WARNING 1 +# define PNG_IMAGE_ERROR 2 + /* + * The result is a two-bit code such that a value more than 1 indicates + * a failure in the API just called: + * + * 0 - no warning or error + * 1 - warning + * 2 - error + * 3 - error preceded by warning + */ +# define PNG_IMAGE_FAILED(png_cntrl) ((((png_cntrl).warning_or_error)&0x03)>1) + + png_uint_32 warning_or_error; + + char message[64]; +} png_image, *png_imagep; + +/* The samples of the image have one to four channels whose components have + * original values in the range 0 to 1.0: + * + * 1: A single gray or luminance channel (G). + * 2: A gray/luminance channel and an alpha channel (GA). + * 3: Three red, green, blue color channels (RGB). + * 4: Three color channels and an alpha channel (RGBA). + * + * The components are encoded in one of two ways: + * + * a) As a small integer, value 0..255, contained in a single byte. For the + * alpha channel the original value is simply value/255. For the color or + * luminance channels the value is encoded according to the sRGB specification + * and matches the 8-bit format expected by typical display devices. + * + * The color/gray channels are not scaled (pre-multiplied) by the alpha + * channel and are suitable for passing to color management software. + * + * b) As a value in the range 0..65535, contained in a 2-byte integer. All + * channels can be converted to the original value by dividing by 65535; all + * channels are linear. Color channels use the RGB encoding (RGB end-points) of + * the sRGB specification. This encoding is identified by the + * PNG_FORMAT_FLAG_LINEAR flag below. + * + * When the simplified API needs to convert between sRGB and linear colorspaces, + * the actual sRGB transfer curve defined in the sRGB specification (see the + * article at ) is used, not the gamma=1/2.2 + * approximation used elsewhere in libpng. + * + * When an alpha channel is present it is expected to denote pixel coverage + * of the color or luminance channels and is returned as an associated alpha + * channel: the color/gray channels are scaled (pre-multiplied) by the alpha + * value. + * + * The samples are either contained directly in the image data, between 1 and 8 + * bytes per pixel according to the encoding, or are held in a color-map indexed + * by bytes in the image data. In the case of a color-map the color-map entries + * are individual samples, encoded as above, and the image data has one byte per + * pixel to select the relevant sample from the color-map. + */ + +/* PNG_FORMAT_* + * + * #defines to be used in png_image::format. Each #define identifies a + * particular layout of sample data and, if present, alpha values. There are + * separate defines for each of the two component encodings. + * + * A format is built up using single bit flag values. All combinations are + * valid. Formats can be built up from the flag values or you can use one of + * the predefined values below. When testing formats always use the FORMAT_FLAG + * macros to test for individual features - future versions of the library may + * add new flags. + * + * When reading or writing color-mapped images the format should be set to the + * format of the entries in the color-map then png_image_{read,write}_colormap + * called to read or write the color-map and set the format correctly for the + * image data. Do not set the PNG_FORMAT_FLAG_COLORMAP bit directly! + * + * NOTE: libpng can be built with particular features disabled. If you see + * compiler errors because the definition of one of the following flags has been + * compiled out it is because libpng does not have the required support. It is + * possible, however, for the libpng configuration to enable the format on just + * read or just write; in that case you may see an error at run time. You can + * guard against this by checking for the definition of the appropriate + * "_SUPPORTED" macro, one of: + * + * PNG_SIMPLIFIED_{READ,WRITE}_{BGR,AFIRST}_SUPPORTED + */ +#define PNG_FORMAT_FLAG_ALPHA 0x01U /* format with an alpha channel */ +#define PNG_FORMAT_FLAG_COLOR 0x02U /* color format: otherwise grayscale */ +#define PNG_FORMAT_FLAG_LINEAR 0x04U /* 2-byte channels else 1-byte */ +#define PNG_FORMAT_FLAG_COLORMAP 0x08U /* image data is color-mapped */ + +#ifdef PNG_FORMAT_BGR_SUPPORTED +# define PNG_FORMAT_FLAG_BGR 0x10U /* BGR colors, else order is RGB */ +#endif + +#ifdef PNG_FORMAT_AFIRST_SUPPORTED +# define PNG_FORMAT_FLAG_AFIRST 0x20U /* alpha channel comes first */ +#endif + +#define PNG_FORMAT_FLAG_ASSOCIATED_ALPHA 0x40U /* alpha channel is associated */ + +/* Commonly used formats have predefined macros. + * + * First the single byte (sRGB) formats: + */ +#define PNG_FORMAT_GRAY 0 +#define PNG_FORMAT_GA PNG_FORMAT_FLAG_ALPHA +#define PNG_FORMAT_AG (PNG_FORMAT_GA|PNG_FORMAT_FLAG_AFIRST) +#define PNG_FORMAT_RGB PNG_FORMAT_FLAG_COLOR +#define PNG_FORMAT_BGR (PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_BGR) +#define PNG_FORMAT_RGBA (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_ARGB (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_AFIRST) +#define PNG_FORMAT_BGRA (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_ABGR (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_AFIRST) + +/* Then the linear 2-byte formats. When naming these "Y" is used to + * indicate a luminance (gray) channel. + */ +#define PNG_FORMAT_LINEAR_Y PNG_FORMAT_FLAG_LINEAR +#define PNG_FORMAT_LINEAR_Y_ALPHA (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_LINEAR_RGB (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR) +#define PNG_FORMAT_LINEAR_RGB_ALPHA \ + (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA) + +/* With color-mapped formats the image data is one byte for each pixel, the byte + * is an index into the color-map which is formatted as above. To obtain a + * color-mapped format it is sufficient just to add the PNG_FOMAT_FLAG_COLORMAP + * to one of the above definitions, or you can use one of the definitions below. + */ +#define PNG_FORMAT_RGB_COLORMAP (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_BGR_COLORMAP (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_RGBA_COLORMAP (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_ARGB_COLORMAP (PNG_FORMAT_ARGB|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_BGRA_COLORMAP (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_ABGR_COLORMAP (PNG_FORMAT_ABGR|PNG_FORMAT_FLAG_COLORMAP) + +/* PNG_IMAGE macros + * + * These are convenience macros to derive information from a png_image + * structure. The PNG_IMAGE_SAMPLE_ macros return values appropriate to the + * actual image sample values - either the entries in the color-map or the + * pixels in the image. The PNG_IMAGE_PIXEL_ macros return corresponding values + * for the pixels and will always return 1 for color-mapped formats. The + * remaining macros return information about the rows in the image and the + * complete image. + * + * NOTE: All the macros that take a png_image::format parameter are compile time + * constants if the format parameter is, itself, a constant. Therefore these + * macros can be used in array declarations and case labels where required. + * Similarly the macros are also pre-processor constants (sizeof is not used) so + * they can be used in #if tests. + * + * First the information about the samples. + */ +#define PNG_IMAGE_SAMPLE_CHANNELS(fmt)\ + (((fmt)&(PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA))+1) + /* Return the total number of channels in a given format: 1..4 */ + +#define PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt)\ + ((((fmt) & PNG_FORMAT_FLAG_LINEAR) >> 2)+1) + /* Return the size in bytes of a single component of a pixel or color-map + * entry (as appropriate) in the image: 1 or 2. + */ + +#define PNG_IMAGE_SAMPLE_SIZE(fmt)\ + (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt)) + /* This is the size of the sample data for one sample. If the image is + * color-mapped it is the size of one color-map entry (and image pixels are + * one byte in size), otherwise it is the size of one image pixel. + */ + +#define PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt)\ + (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * 256) + /* The maximum size of the color-map required by the format expressed in a + * count of components. This can be used to compile-time allocate a + * color-map: + * + * png_uint_16 colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(linear_fmt)]; + * + * png_byte colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(sRGB_fmt)]; + * + * Alternatively use the PNG_IMAGE_COLORMAP_SIZE macro below to use the + * information from one of the png_image_begin_read_ APIs and dynamically + * allocate the required memory. + */ + +/* Corresponding information about the pixels */ +#define PNG_IMAGE_PIXEL_(test,fmt)\ + (((fmt)&PNG_FORMAT_FLAG_COLORMAP)?1:test(fmt)) + +#define PNG_IMAGE_PIXEL_CHANNELS(fmt)\ + PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_CHANNELS,fmt) + /* The number of separate channels (components) in a pixel; 1 for a + * color-mapped image. + */ + +#define PNG_IMAGE_PIXEL_COMPONENT_SIZE(fmt)\ + PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_COMPONENT_SIZE,fmt) + /* The size, in bytes, of each component in a pixel; 1 for a color-mapped + * image. + */ + +#define PNG_IMAGE_PIXEL_SIZE(fmt) PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_SIZE,fmt) + /* The size, in bytes, of a complete pixel; 1 for a color-mapped image. */ + +/* Information about the whole row, or whole image */ +#define PNG_IMAGE_ROW_STRIDE(image)\ + (PNG_IMAGE_PIXEL_CHANNELS((image).format) * (image).width) + /* Return the total number of components in a single row of the image; this + * is the minimum 'row stride', the minimum count of components between each + * row. For a color-mapped image this is the minimum number of bytes in a + * row. + * + * WARNING: this macro overflows for some images with more than one component + * and very large image widths. libpng will refuse to process an image where + * this macro would overflow. + */ + +#define PNG_IMAGE_BUFFER_SIZE(image, row_stride)\ + (PNG_IMAGE_PIXEL_COMPONENT_SIZE((image).format)*(image).height*(row_stride)) + /* Return the size, in bytes, of an image buffer given a png_image and a row + * stride - the number of components to leave space for in each row. + * + * WARNING: this macro overflows a 32-bit integer for some large PNG images, + * libpng will refuse to process an image where such an overflow would occur. + */ + +#define PNG_IMAGE_SIZE(image)\ + PNG_IMAGE_BUFFER_SIZE(image, PNG_IMAGE_ROW_STRIDE(image)) + /* Return the size, in bytes, of the image in memory given just a png_image; + * the row stride is the minimum stride required for the image. + */ + +#define PNG_IMAGE_COLORMAP_SIZE(image)\ + (PNG_IMAGE_SAMPLE_SIZE((image).format) * (image).colormap_entries) + /* Return the size, in bytes, of the color-map of this image. If the image + * format is not a color-map format this will return a size sufficient for + * 256 entries in the given format; check PNG_FORMAT_FLAG_COLORMAP if + * you don't want to allocate a color-map in this case. + */ + +/* PNG_IMAGE_FLAG_* + * + * Flags containing additional information about the image are held in the + * 'flags' field of png_image. + */ +#define PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB 0x01 + /* This indicates that the RGB values of the in-memory bitmap do not + * correspond to the red, green and blue end-points defined by sRGB. + */ + +#define PNG_IMAGE_FLAG_FAST 0x02 + /* On write emphasise speed over compression; the resultant PNG file will be + * larger but will be produced significantly faster, particular for large + * images. Do not use this option for images which will be distributed, only + * used it when producing intermediate files that will be read back in + * repeatedly. For a typical 24-bit image the option will double the read + * speed at the cost of increasing the image size by 25%, however for many + * more compressible images the PNG file can be 10 times larger with only a + * slight speed gain. + */ + +#define PNG_IMAGE_FLAG_16BIT_sRGB 0x04 + /* On read if the image is a 16-bit per component image and there is no gAMA + * or sRGB chunk assume that the components are sRGB encoded. Notice that + * images output by the simplified API always have gamma information; setting + * this flag only affects the interpretation of 16-bit images from an + * external source. It is recommended that the application expose this flag + * to the user; the user can normally easily recognize the difference between + * linear and sRGB encoding. This flag has no effect on write - the data + * passed to the write APIs must have the correct encoding (as defined + * above.) + * + * If the flag is not set (the default) input 16-bit per component data is + * assumed to be linear. + * + * NOTE: the flag can only be set after the png_image_begin_read_ call, + * because that call initializes the 'flags' field. + */ + +#ifdef PNG_SIMPLIFIED_READ_SUPPORTED +/* READ APIs + * --------- + * + * The png_image passed to the read APIs must have been initialized by setting + * the png_controlp field 'opaque' to NULL (or, safer, memset the whole thing.) + */ +#ifdef PNG_STDIO_SUPPORTED +PNG_EXPORT(234, int, png_image_begin_read_from_file, (png_imagep image, + const char *file_name)); + /* The named file is opened for read and the image header is filled in + * from the PNG header in the file. + */ + +PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image, + FILE* file)); + /* The PNG header is read from the stdio FILE object. */ +#endif /* STDIO */ + +PNG_EXPORT(236, int, png_image_begin_read_from_memory, (png_imagep image, + png_const_voidp memory, size_t size)); + /* The PNG header is read from the given memory buffer. */ + +PNG_EXPORT(237, int, png_image_finish_read, (png_imagep image, + png_const_colorp background, void *buffer, png_int_32 row_stride, + void *colormap)); + /* Finish reading the image into the supplied buffer and clean up the + * png_image structure. + * + * row_stride is the step, in byte or 2-byte units as appropriate, + * between adjacent rows. A positive stride indicates that the top-most row + * is first in the buffer - the normal top-down arrangement. A negative + * stride indicates that the bottom-most row is first in the buffer. + * + * background need only be supplied if an alpha channel must be removed from + * a png_byte format and the removal is to be done by compositing on a solid + * color; otherwise it may be NULL and any composition will be done directly + * onto the buffer. The value is an sRGB color to use for the background, + * for grayscale output the green channel is used. + * + * background must be supplied when an alpha channel must be removed from a + * single byte color-mapped output format, in other words if: + * + * 1) The original format from png_image_begin_read_from_* had + * PNG_FORMAT_FLAG_ALPHA set. + * 2) The format set by the application does not. + * 3) The format set by the application has PNG_FORMAT_FLAG_COLORMAP set and + * PNG_FORMAT_FLAG_LINEAR *not* set. + * + * For linear output removing the alpha channel is always done by compositing + * on black and background is ignored. + * + * colormap must be supplied when PNG_FORMAT_FLAG_COLORMAP is set. It must + * be at least the size (in bytes) returned by PNG_IMAGE_COLORMAP_SIZE. + * image->colormap_entries will be updated to the actual number of entries + * written to the colormap; this may be less than the original value. + */ + +PNG_EXPORT(238, void, png_image_free, (png_imagep image)); + /* Free any data allocated by libpng in image->opaque, setting the pointer to + * NULL. May be called at any time after the structure is initialized. + */ +#endif /* SIMPLIFIED_READ */ + +#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED +/* WRITE APIS + * ---------- + * For write you must initialize a png_image structure to describe the image to + * be written. To do this use memset to set the whole structure to 0 then + * initialize fields describing your image. + * + * version: must be set to PNG_IMAGE_VERSION + * opaque: must be initialized to NULL + * width: image width in pixels + * height: image height in rows + * format: the format of the data (image and color-map) you wish to write + * flags: set to 0 unless one of the defined flags applies; set + * PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB for color format images where the RGB + * values do not correspond to the colors in sRGB. + * colormap_entries: set to the number of entries in the color-map (0 to 256) + */ +#ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED +PNG_EXPORT(239, int, png_image_write_to_file, (png_imagep image, + const char *file, int convert_to_8bit, const void *buffer, + png_int_32 row_stride, const void *colormap)); + /* Write the image to the named file. */ + +PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file, + int convert_to_8_bit, const void *buffer, png_int_32 row_stride, + const void *colormap)); + /* Write the image to the given (FILE*). */ +#endif /* SIMPLIFIED_WRITE_STDIO */ + +/* With all write APIs if image is in one of the linear formats with 16-bit + * data then setting convert_to_8_bit will cause the output to be an 8-bit PNG + * gamma encoded according to the sRGB specification, otherwise a 16-bit linear + * encoded PNG file is written. + * + * With color-mapped data formats the colormap parameter point to a color-map + * with at least image->colormap_entries encoded in the specified format. If + * the format is linear the written PNG color-map will be converted to sRGB + * regardless of the convert_to_8_bit flag. + * + * With all APIs row_stride is handled as in the read APIs - it is the spacing + * from one row to the next in component sized units (1 or 2 bytes) and if + * negative indicates a bottom-up row layout in the buffer. If row_stride is + * zero, libpng will calculate it for you from the image width and number of + * channels. + * + * Note that the write API does not support interlacing, sub-8-bit pixels or + * most ancillary chunks. If you need to write text chunks (e.g. for copyright + * notices) you need to use one of the other APIs. + */ + +PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory, + png_alloc_size_t * PNG_RESTRICT memory_bytes, int convert_to_8_bit, + const void *buffer, png_int_32 row_stride, const void *colormap)); + /* Write the image to the given memory buffer. The function both writes the + * whole PNG data stream to *memory and updates *memory_bytes with the count + * of bytes written. + * + * 'memory' may be NULL. In this case *memory_bytes is not read however on + * success the number of bytes which would have been written will still be + * stored in *memory_bytes. On failure *memory_bytes will contain 0. + * + * If 'memory' is not NULL it must point to memory[*memory_bytes] of + * writeable memory. + * + * If the function returns success memory[*memory_bytes] (if 'memory' is not + * NULL) contains the written PNG data. *memory_bytes will always be less + * than or equal to the original value. + * + * If the function returns false and *memory_bytes was not changed an error + * occurred during write. If *memory_bytes was changed, or is not 0 if + * 'memory' was NULL, the write would have succeeded but for the memory + * buffer being too small. *memory_bytes contains the required number of + * bytes and will be bigger that the original value. + */ + +#define png_image_write_get_memory_size(image, size, convert_to_8_bit, buffer,\ + row_stride, colormap)\ + png_image_write_to_memory(&(image), 0, &(size), convert_to_8_bit, buffer,\ + row_stride, colormap) + /* Return the amount of memory in 'size' required to compress this image. + * The png_image structure 'image' must be filled in as in the above + * function and must not be changed before the actual write call, the buffer + * and all other parameters must also be identical to that in the final + * write call. The 'size' variable need not be initialized. + * + * NOTE: the macro returns true/false, if false is returned 'size' will be + * set to zero and the write failed and probably will fail if tried again. + */ + +/* You can pre-allocate the buffer by making sure it is of sufficient size + * regardless of the amount of compression achieved. The buffer size will + * always be bigger than the original image and it will never be filled. The + * following macros are provided to assist in allocating the buffer. + */ +#define PNG_IMAGE_DATA_SIZE(image) (PNG_IMAGE_SIZE(image)+(image).height) + /* The number of uncompressed bytes in the PNG byte encoding of the image; + * uncompressing the PNG IDAT data will give this number of bytes. + * + * NOTE: while PNG_IMAGE_SIZE cannot overflow for an image in memory this + * macro can because of the extra bytes used in the PNG byte encoding. You + * need to avoid this macro if your image size approaches 2^30 in width or + * height. The same goes for the remainder of these macros; they all produce + * bigger numbers than the actual in-memory image size. + */ +#ifndef PNG_ZLIB_MAX_SIZE +# define PNG_ZLIB_MAX_SIZE(b) ((b)+(((b)+7U)>>3)+(((b)+63U)>>6)+11U) + /* An upper bound on the number of compressed bytes given 'b' uncompressed + * bytes. This is based on deflateBounds() in zlib; different + * implementations of zlib compression may conceivably produce more data so + * if your zlib implementation is not zlib itself redefine this macro + * appropriately. + */ +#endif + +#define PNG_IMAGE_COMPRESSED_SIZE_MAX(image)\ + PNG_ZLIB_MAX_SIZE((png_alloc_size_t)PNG_IMAGE_DATA_SIZE(image)) + /* An upper bound on the size of the data in the PNG IDAT chunks. */ + +#define PNG_IMAGE_PNG_SIZE_MAX_(image, image_size)\ + ((8U/*sig*/+25U/*IHDR*/+16U/*gAMA*/+44U/*cHRM*/+12U/*IEND*/+\ + (((image).format&PNG_FORMAT_FLAG_COLORMAP)?/*colormap: PLTE, tRNS*/\ + 12U+3U*(image).colormap_entries/*PLTE data*/+\ + (((image).format&PNG_FORMAT_FLAG_ALPHA)?\ + 12U/*tRNS*/+(image).colormap_entries:0U):0U)+\ + 12U)+(12U*((image_size)/PNG_ZBUF_SIZE))/*IDAT*/+(image_size)) + /* A helper for the following macro; if your compiler cannot handle the + * following macro use this one with the result of + * PNG_IMAGE_COMPRESSED_SIZE_MAX(image) as the second argument (most + * compilers should handle this just fine.) + */ + +#define PNG_IMAGE_PNG_SIZE_MAX(image)\ + PNG_IMAGE_PNG_SIZE_MAX_(image, PNG_IMAGE_COMPRESSED_SIZE_MAX(image)) + /* An upper bound on the total length of the PNG data stream for 'image'. + * The result is of type png_alloc_size_t, on 32-bit systems this may + * overflow even though PNG_IMAGE_DATA_SIZE does not overflow; the write will + * run out of buffer space but return a corrected size which should work. + */ +#endif /* SIMPLIFIED_WRITE */ +/******************************************************************************* + * END OF SIMPLIFIED API + ******************************************************************************/ +#endif /* SIMPLIFIED_{READ|WRITE} */ + +/******************************************************************************* + * Section 6: IMPLEMENTATION OPTIONS + ******************************************************************************* + * + * Support for arbitrary implementation-specific optimizations. The API allows + * particular options to be turned on or off. 'Option' is the number of the + * option and 'onoff' is 0 (off) or non-0 (on). The value returned is given + * by the PNG_OPTION_ defines below. + * + * HARDWARE: normally hardware capabilities, such as the Intel SSE instructions, + * are detected at run time, however sometimes it may be impossible + * to do this in user mode, in which case it is necessary to discover + * the capabilities in an OS specific way. Such capabilities are + * listed here when libpng has support for them and must be turned + * ON by the application if present. + * + * SOFTWARE: sometimes software optimizations actually result in performance + * decrease on some architectures or systems, or with some sets of + * PNG images. 'Software' options allow such optimizations to be + * selected at run time. + */ +#ifdef PNG_SET_OPTION_SUPPORTED +#ifdef PNG_ARM_NEON_API_SUPPORTED +# define PNG_ARM_NEON 0 /* HARDWARE: ARM Neon SIMD instructions supported */ +#endif +#define PNG_MAXIMUM_INFLATE_WINDOW 2 /* SOFTWARE: force maximum window */ +#define PNG_SKIP_sRGB_CHECK_PROFILE 4 /* SOFTWARE: Check ICC profile for sRGB */ +#ifdef PNG_MIPS_MSA_API_SUPPORTED +# define PNG_MIPS_MSA 6 /* HARDWARE: MIPS Msa SIMD instructions supported */ +#endif +#ifdef PNG_DISABLE_ADLER32_CHECK_SUPPORTED +# define PNG_IGNORE_ADLER32 8 /* SOFTWARE: disable Adler32 check on IDAT */ +#endif +#ifdef PNG_POWERPC_VSX_API_SUPPORTED +# define PNG_POWERPC_VSX 10 /* HARDWARE: PowerPC VSX SIMD instructions + * supported */ +#endif +#ifdef PNG_MIPS_MMI_API_SUPPORTED +# define PNG_MIPS_MMI 12 /* HARDWARE: MIPS MMI SIMD instructions supported */ +#endif + +#define PNG_OPTION_NEXT 14 /* Next option - numbers must be even */ + +/* Return values: NOTE: there are four values and 'off' is *not* zero */ +#define PNG_OPTION_UNSET 0 /* Unset - defaults to off */ +#define PNG_OPTION_INVALID 1 /* Option number out of range */ +#define PNG_OPTION_OFF 2 +#define PNG_OPTION_ON 3 + +PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option, + int onoff)); +#endif /* SET_OPTION */ + +/******************************************************************************* + * END OF HARDWARE AND SOFTWARE OPTIONS + ******************************************************************************/ + +/* Maintainer: Put new public prototypes here ^, in libpng.3, in project + * defs, and in scripts/symbols.def. + */ + +/* The last ordinal number (this is the *last* one already used; the next + * one to use is one more than this.) + */ +#ifdef PNG_EXPORT_LAST_ORDINAL + PNG_EXPORT_LAST_ORDINAL(249); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* PNG_VERSION_INFO_ONLY */ +/* Do not put anything past this line */ +#endif /* PNG_H */ diff --git a/vcpkg/installed/x64-osx/include/libpng16/pngconf.h b/vcpkg/installed/x64-osx/include/libpng16/pngconf.h new file mode 100644 index 0000000..000d7b1 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/libpng16/pngconf.h @@ -0,0 +1,623 @@ + +/* pngconf.h - machine-configurable file for libpng + * + * libpng version 1.6.43 + * + * Copyright (c) 2018-2024 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * Any machine specific code is near the front of this file, so if you + * are configuring libpng for a machine, you may want to read the section + * starting here down to where it starts to typedef png_color, png_text, + * and png_info. + */ + +#ifndef PNGCONF_H +#define PNGCONF_H + +#ifndef PNG_BUILDING_SYMBOL_TABLE /* else includes may cause problems */ + +/* From libpng 1.6.0 libpng requires an ANSI X3.159-1989 ("ISOC90") compliant C + * compiler for correct compilation. The following header files are required by + * the standard. If your compiler doesn't provide these header files, or they + * do not match the standard, you will need to provide/improve them. + */ +#include +#include + +/* Library header files. These header files are all defined by ISOC90; libpng + * expects conformant implementations, however, an ISOC90 conformant system need + * not provide these header files if the functionality cannot be implemented. + * In this case it will be necessary to disable the relevant parts of libpng in + * the build of pnglibconf.h. + * + * Prior to 1.6.0 string.h was included here; the API changes in 1.6.0 to not + * include this unnecessary header file. + */ + +#ifdef PNG_STDIO_SUPPORTED + /* Required for the definition of FILE: */ +# include +#endif + +#ifdef PNG_SETJMP_SUPPORTED + /* Required for the definition of jmp_buf and the declaration of longjmp: */ +# include +#endif + +#ifdef PNG_CONVERT_tIME_SUPPORTED + /* Required for struct tm: */ +# include +#endif + +#endif /* PNG_BUILDING_SYMBOL_TABLE */ + +/* Prior to 1.6.0, it was possible to turn off 'const' in declarations, + * using PNG_NO_CONST. This is no longer supported. + */ +#define PNG_CONST const /* backward compatibility only */ + +/* This controls optimization of the reading of 16-bit and 32-bit + * values from PNG files. It can be set on a per-app-file basis: it + * just changes whether a macro is used when the function is called. + * The library builder sets the default; if read functions are not + * built into the library the macro implementation is forced on. + */ +#ifndef PNG_READ_INT_FUNCTIONS_SUPPORTED +# define PNG_USE_READ_MACROS +#endif +#if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS) +# if PNG_DEFAULT_READ_MACROS +# define PNG_USE_READ_MACROS +# endif +#endif + +/* COMPILER SPECIFIC OPTIONS. + * + * These options are provided so that a variety of difficult compilers + * can be used. Some are fixed at build time (e.g. PNG_API_RULE + * below) but still have compiler specific implementations, others + * may be changed on a per-file basis when compiling against libpng. + */ + +/* The PNGARG macro was used in versions of libpng prior to 1.6.0 to protect + * against legacy (pre ISOC90) compilers that did not understand function + * prototypes. It is not required for modern C compilers. + */ +#ifndef PNGARG +# define PNGARG(arglist) arglist +#endif + +/* Function calling conventions. + * ============================= + * Normally it is not necessary to specify to the compiler how to call + * a function - it just does it - however on x86 systems derived from + * Microsoft and Borland C compilers ('IBM PC', 'DOS', 'Windows' systems + * and some others) there are multiple ways to call a function and the + * default can be changed on the compiler command line. For this reason + * libpng specifies the calling convention of every exported function and + * every function called via a user supplied function pointer. This is + * done in this file by defining the following macros: + * + * PNGAPI Calling convention for exported functions. + * PNGCBAPI Calling convention for user provided (callback) functions. + * PNGCAPI Calling convention used by the ANSI-C library (required + * for longjmp callbacks and sometimes used internally to + * specify the calling convention for zlib). + * + * These macros should never be overridden. If it is necessary to + * change calling convention in a private build this can be done + * by setting PNG_API_RULE (which defaults to 0) to one of the values + * below to select the correct 'API' variants. + * + * PNG_API_RULE=0 Use PNGCAPI - the 'C' calling convention - throughout. + * This is correct in every known environment. + * PNG_API_RULE=1 Use the operating system convention for PNGAPI and + * the 'C' calling convention (from PNGCAPI) for + * callbacks (PNGCBAPI). This is no longer required + * in any known environment - if it has to be used + * please post an explanation of the problem to the + * libpng mailing list. + * + * These cases only differ if the operating system does not use the C + * calling convention, at present this just means the above cases + * (x86 DOS/Windows systems) and, even then, this does not apply to + * Cygwin running on those systems. + * + * Note that the value must be defined in pnglibconf.h so that what + * the application uses to call the library matches the conventions + * set when building the library. + */ + +/* Symbol export + * ============= + * When building a shared library it is almost always necessary to tell + * the compiler which symbols to export. The png.h macro 'PNG_EXPORT' + * is used to mark the symbols. On some systems these symbols can be + * extracted at link time and need no special processing by the compiler, + * on other systems the symbols are flagged by the compiler and just + * the declaration requires a special tag applied (unfortunately) in a + * compiler dependent way. Some systems can do either. + * + * A small number of older systems also require a symbol from a DLL to + * be flagged to the program that calls it. This is a problem because + * we do not know in the header file included by application code that + * the symbol will come from a shared library, as opposed to a statically + * linked one. For this reason the application must tell us by setting + * the magic flag PNG_USE_DLL to turn on the special processing before + * it includes png.h. + * + * Four additional macros are used to make this happen: + * + * PNG_IMPEXP The magic (if any) to cause a symbol to be exported from + * the build or imported if PNG_USE_DLL is set - compiler + * and system specific. + * + * PNG_EXPORT_TYPE(type) A macro that pre or appends PNG_IMPEXP to + * 'type', compiler specific. + * + * PNG_DLL_EXPORT Set to the magic to use during a libpng build to + * make a symbol exported from the DLL. Not used in the + * public header files; see pngpriv.h for how it is used + * in the libpng build. + * + * PNG_DLL_IMPORT Set to the magic to force the libpng symbols to come + * from a DLL - used to define PNG_IMPEXP when + * PNG_USE_DLL is set. + */ + +/* System specific discovery. + * ========================== + * This code is used at build time to find PNG_IMPEXP, the API settings + * and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL + * import processing is possible. On Windows systems it also sets + * compiler-specific macros to the values required to change the calling + * conventions of the various functions. + */ +#if defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || \ + defined(__CYGWIN__) + /* Windows system (DOS doesn't support DLLs). Includes builds under Cygwin or + * MinGW on any architecture currently supported by Windows. Also includes + * Watcom builds but these need special treatment because they are not + * compatible with GCC or Visual C because of different calling conventions. + */ +# if PNG_API_RULE == 2 + /* If this line results in an error, either because __watcall is not + * understood or because of a redefine just below you cannot use *this* + * build of the library with the compiler you are using. *This* build was + * build using Watcom and applications must also be built using Watcom! + */ +# define PNGCAPI __watcall +# endif + +# if defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 800)) +# define PNGCAPI __cdecl +# if PNG_API_RULE == 1 + /* If this line results in an error __stdcall is not understood and + * PNG_API_RULE should not have been set to '1'. + */ +# define PNGAPI __stdcall +# endif +# else + /* An older compiler, or one not detected (erroneously) above, + * if necessary override on the command line to get the correct + * variants for the compiler. + */ +# ifndef PNGCAPI +# define PNGCAPI _cdecl +# endif +# if PNG_API_RULE == 1 && !defined(PNGAPI) +# define PNGAPI _stdcall +# endif +# endif /* compiler/api */ + + /* NOTE: PNGCBAPI always defaults to PNGCAPI. */ + +# if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD) +# error "PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed" +# endif + +# if (defined(_MSC_VER) && _MSC_VER < 800) ||\ + (defined(__BORLANDC__) && __BORLANDC__ < 0x500) + /* older Borland and MSC + * compilers used '__export' and required this to be after + * the type. + */ +# ifndef PNG_EXPORT_TYPE +# define PNG_EXPORT_TYPE(type) type PNG_IMPEXP +# endif +# define PNG_DLL_EXPORT __export +# else /* newer compiler */ +# define PNG_DLL_EXPORT __declspec(dllexport) +# ifndef PNG_DLL_IMPORT +# define PNG_DLL_IMPORT __declspec(dllimport) +# endif +# endif /* compiler */ + +#else /* !Windows */ +# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__) +# define PNGAPI _System +# else /* !Windows/x86 && !OS/2 */ + /* Use the defaults, or define PNG*API on the command line (but + * this will have to be done for every compile!) + */ +# endif /* other system, !OS/2 */ +#endif /* !Windows/x86 */ + +/* Now do all the defaulting . */ +#ifndef PNGCAPI +# define PNGCAPI +#endif +#ifndef PNGCBAPI +# define PNGCBAPI PNGCAPI +#endif +#ifndef PNGAPI +# define PNGAPI PNGCAPI +#endif + +/* PNG_IMPEXP may be set on the compilation system command line or (if not set) + * then in an internal header file when building the library, otherwise (when + * using the library) it is set here. + */ +#ifndef PNG_IMPEXP +# if defined(PNG_USE_DLL) && defined(PNG_DLL_IMPORT) + /* This forces use of a DLL, disallowing static linking */ +# define PNG_IMPEXP PNG_DLL_IMPORT +# endif + +# ifndef PNG_IMPEXP +# define PNG_IMPEXP +# endif +#endif + +/* In 1.5.2 the definition of PNG_FUNCTION has been changed to always treat + * 'attributes' as a storage class - the attributes go at the start of the + * function definition, and attributes are always appended regardless of the + * compiler. This considerably simplifies these macros but may cause problems + * if any compilers both need function attributes and fail to handle them as + * a storage class (this is unlikely.) + */ +#ifndef PNG_FUNCTION +# define PNG_FUNCTION(type, name, args, attributes) attributes type name args +#endif + +#ifndef PNG_EXPORT_TYPE +# define PNG_EXPORT_TYPE(type) PNG_IMPEXP type +#endif + + /* The ordinal value is only relevant when preprocessing png.h for symbol + * table entries, so we discard it here. See the .dfn files in the + * scripts directory. + */ + +#ifndef PNG_EXPORTA +# define PNG_EXPORTA(ordinal, type, name, args, attributes) \ + PNG_FUNCTION(PNG_EXPORT_TYPE(type), (PNGAPI name), PNGARG(args), \ + PNG_LINKAGE_API attributes) +#endif + +/* ANSI-C (C90) does not permit a macro to be invoked with an empty argument, + * so make something non-empty to satisfy the requirement: + */ +#define PNG_EMPTY /*empty list*/ + +#define PNG_EXPORT(ordinal, type, name, args) \ + PNG_EXPORTA(ordinal, type, name, args, PNG_EMPTY) + +/* Use PNG_REMOVED to comment out a removed interface. */ +#ifndef PNG_REMOVED +# define PNG_REMOVED(ordinal, type, name, args, attributes) +#endif + +#ifndef PNG_CALLBACK +# define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) PNGARG(args) +#endif + +/* Support for compiler specific function attributes. These are used + * so that where compiler support is available incorrect use of API + * functions in png.h will generate compiler warnings. + * + * Added at libpng-1.2.41. + */ + +#ifndef PNG_NO_PEDANTIC_WARNINGS +# ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED +# define PNG_PEDANTIC_WARNINGS_SUPPORTED +# endif +#endif + +#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED + /* Support for compiler specific function attributes. These are used + * so that where compiler support is available, incorrect use of API + * functions in png.h will generate compiler warnings. Added at libpng + * version 1.2.41. Disabling these removes the warnings but may also produce + * less efficient code. + */ +# if defined(__clang__) && defined(__has_attribute) + /* Clang defines both __clang__ and __GNUC__. Check __clang__ first. */ +# if !defined(PNG_USE_RESULT) && __has_attribute(__warn_unused_result__) +# define PNG_USE_RESULT __attribute__((__warn_unused_result__)) +# endif +# if !defined(PNG_NORETURN) && __has_attribute(__noreturn__) +# define PNG_NORETURN __attribute__((__noreturn__)) +# endif +# if !defined(PNG_ALLOCATED) && __has_attribute(__malloc__) +# define PNG_ALLOCATED __attribute__((__malloc__)) +# endif +# if !defined(PNG_DEPRECATED) && __has_attribute(__deprecated__) +# define PNG_DEPRECATED __attribute__((__deprecated__)) +# endif +# if !defined(PNG_PRIVATE) +# ifdef __has_extension +# if __has_extension(attribute_unavailable_with_message) +# define PNG_PRIVATE __attribute__((__unavailable__(\ + "This function is not exported by libpng."))) +# endif +# endif +# endif +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif + +# elif defined(__GNUC__) +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT __attribute__((__warn_unused_result__)) +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __attribute__((__noreturn__)) +# endif +# if __GNUC__ >= 3 +# ifndef PNG_ALLOCATED +# define PNG_ALLOCATED __attribute__((__malloc__)) +# endif +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __attribute__((__deprecated__)) +# endif +# ifndef PNG_PRIVATE +# if 0 /* Doesn't work so we use deprecated instead*/ +# define PNG_PRIVATE \ + __attribute__((warning("This function is not exported by libpng."))) +# else +# define PNG_PRIVATE \ + __attribute__((__deprecated__)) +# endif +# endif +# if ((__GNUC__ > 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1)) +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif +# endif /* __GNUC__.__GNUC_MINOR__ > 3.0 */ +# endif /* __GNUC__ >= 3 */ + +# elif defined(_MSC_VER) && (_MSC_VER >= 1300) +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /* not supported */ +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __declspec(noreturn) +# endif +# ifndef PNG_ALLOCATED +# if (_MSC_VER >= 1400) +# define PNG_ALLOCATED __declspec(restrict) +# endif +# endif +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __declspec(deprecated) +# endif +# ifndef PNG_PRIVATE +# define PNG_PRIVATE __declspec(deprecated) +# endif +# ifndef PNG_RESTRICT +# if (_MSC_VER >= 1400) +# define PNG_RESTRICT __restrict +# endif +# endif + +# elif defined(__WATCOMC__) +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif +# endif +#endif /* PNG_PEDANTIC_WARNINGS */ + +#ifndef PNG_DEPRECATED +# define PNG_DEPRECATED /* Use of this function is deprecated */ +#endif +#ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /* The result of this function must be checked */ +#endif +#ifndef PNG_NORETURN +# define PNG_NORETURN /* This function does not return */ +#endif +#ifndef PNG_ALLOCATED +# define PNG_ALLOCATED /* The result of the function is new memory */ +#endif +#ifndef PNG_PRIVATE +# define PNG_PRIVATE /* This is a private libpng function */ +#endif +#ifndef PNG_RESTRICT +# define PNG_RESTRICT /* The C99 "restrict" feature */ +#endif + +#ifndef PNG_FP_EXPORT /* A floating point API. */ +# ifdef PNG_FLOATING_POINT_SUPPORTED +# define PNG_FP_EXPORT(ordinal, type, name, args)\ + PNG_EXPORT(ordinal, type, name, args); +# else /* No floating point APIs */ +# define PNG_FP_EXPORT(ordinal, type, name, args) +# endif +#endif +#ifndef PNG_FIXED_EXPORT /* A fixed point API. */ +# ifdef PNG_FIXED_POINT_SUPPORTED +# define PNG_FIXED_EXPORT(ordinal, type, name, args)\ + PNG_EXPORT(ordinal, type, name, args); +# else /* No fixed point APIs */ +# define PNG_FIXED_EXPORT(ordinal, type, name, args) +# endif +#endif + +#ifndef PNG_BUILDING_SYMBOL_TABLE +/* Some typedefs to get us started. These should be safe on most of the common + * platforms. + * + * png_uint_32 and png_int_32 may, currently, be larger than required to hold a + * 32-bit value however this is not normally advisable. + * + * png_uint_16 and png_int_16 should always be two bytes in size - this is + * verified at library build time. + * + * png_byte must always be one byte in size. + * + * The checks below use constants from limits.h, as defined by the ISOC90 + * standard. + */ +#if CHAR_BIT == 8 && UCHAR_MAX == 255 + typedef unsigned char png_byte; +#else +# error "libpng requires 8-bit bytes" +#endif + +#if INT_MIN == -32768 && INT_MAX == 32767 + typedef int png_int_16; +#elif SHRT_MIN == -32768 && SHRT_MAX == 32767 + typedef short png_int_16; +#else +# error "libpng requires a signed 16-bit type" +#endif + +#if UINT_MAX == 65535 + typedef unsigned int png_uint_16; +#elif USHRT_MAX == 65535 + typedef unsigned short png_uint_16; +#else +# error "libpng requires an unsigned 16-bit type" +#endif + +#if INT_MIN < -2147483646 && INT_MAX > 2147483646 + typedef int png_int_32; +#elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646 + typedef long int png_int_32; +#else +# error "libpng requires a signed 32-bit (or more) type" +#endif + +#if UINT_MAX > 4294967294U + typedef unsigned int png_uint_32; +#elif ULONG_MAX > 4294967294U + typedef unsigned long int png_uint_32; +#else +# error "libpng requires an unsigned 32-bit (or more) type" +#endif + +/* Prior to 1.6.0, it was possible to disable the use of size_t and ptrdiff_t. + * From 1.6.0 onwards, an ISO C90 compiler, as well as a standard-compliant + * behavior of sizeof and ptrdiff_t are required. + * The legacy typedefs are provided here for backwards compatibility. + */ +typedef size_t png_size_t; +typedef ptrdiff_t png_ptrdiff_t; + +/* libpng needs to know the maximum value of 'size_t' and this controls the + * definition of png_alloc_size_t, below. This maximum value of size_t limits + * but does not control the maximum allocations the library makes - there is + * direct application control of this through png_set_user_limits(). + */ +#ifndef PNG_SMALL_SIZE_T + /* Compiler specific tests for systems where size_t is known to be less than + * 32 bits (some of these systems may no longer work because of the lack of + * 'far' support; see above.) + */ +# if (defined(__TURBOC__) && !defined(__FLAT__)) ||\ + (defined(_MSC_VER) && defined(MAXSEG_64K)) +# define PNG_SMALL_SIZE_T +# endif +#endif + +/* png_alloc_size_t is guaranteed to be no smaller than size_t, and no smaller + * than png_uint_32. Casts from size_t or png_uint_32 to png_alloc_size_t are + * not necessary; in fact, it is recommended not to use them at all, so that + * the compiler can complain when something turns out to be problematic. + * + * Casts in the other direction (from png_alloc_size_t to size_t or + * png_uint_32) should be explicitly applied; however, we do not expect to + * encounter practical situations that require such conversions. + * + * PNG_SMALL_SIZE_T must be defined if the maximum value of size_t is less than + * 4294967295 - i.e. less than the maximum value of png_uint_32. + */ +#ifdef PNG_SMALL_SIZE_T + typedef png_uint_32 png_alloc_size_t; +#else + typedef size_t png_alloc_size_t; +#endif + +/* Prior to 1.6.0 libpng offered limited support for Microsoft C compiler + * implementations of Intel CPU specific support of user-mode segmented address + * spaces, where 16-bit pointers address more than 65536 bytes of memory using + * separate 'segment' registers. The implementation requires two different + * types of pointer (only one of which includes the segment value.) + * + * If required this support is available in version 1.2 of libpng and may be + * available in versions through 1.5, although the correctness of the code has + * not been verified recently. + */ + +/* Typedef for floating-point numbers that are converted to fixed-point with a + * multiple of 100,000, e.g., gamma + */ +typedef png_int_32 png_fixed_point; + +/* Add typedefs for pointers */ +typedef void * png_voidp; +typedef const void * png_const_voidp; +typedef png_byte * png_bytep; +typedef const png_byte * png_const_bytep; +typedef png_uint_32 * png_uint_32p; +typedef const png_uint_32 * png_const_uint_32p; +typedef png_int_32 * png_int_32p; +typedef const png_int_32 * png_const_int_32p; +typedef png_uint_16 * png_uint_16p; +typedef const png_uint_16 * png_const_uint_16p; +typedef png_int_16 * png_int_16p; +typedef const png_int_16 * png_const_int_16p; +typedef char * png_charp; +typedef const char * png_const_charp; +typedef png_fixed_point * png_fixed_point_p; +typedef const png_fixed_point * png_const_fixed_point_p; +typedef size_t * png_size_tp; +typedef const size_t * png_const_size_tp; + +#ifdef PNG_STDIO_SUPPORTED +typedef FILE * png_FILE_p; +#endif + +#ifdef PNG_FLOATING_POINT_SUPPORTED +typedef double * png_doublep; +typedef const double * png_const_doublep; +#endif + +/* Pointers to pointers; i.e. arrays */ +typedef png_byte * * png_bytepp; +typedef png_uint_32 * * png_uint_32pp; +typedef png_int_32 * * png_int_32pp; +typedef png_uint_16 * * png_uint_16pp; +typedef png_int_16 * * png_int_16pp; +typedef const char * * png_const_charpp; +typedef char * * png_charpp; +typedef png_fixed_point * * png_fixed_point_pp; +#ifdef PNG_FLOATING_POINT_SUPPORTED +typedef double * * png_doublepp; +#endif + +/* Pointers to pointers to pointers; i.e., pointer to array */ +typedef char * * * png_charppp; + +#endif /* PNG_BUILDING_SYMBOL_TABLE */ + +#endif /* PNGCONF_H */ diff --git a/vcpkg/installed/x64-osx/include/libpng16/pnglibconf.h b/vcpkg/installed/x64-osx/include/libpng16/pnglibconf.h new file mode 100644 index 0000000..c62c497 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/libpng16/pnglibconf.h @@ -0,0 +1,224 @@ +/* pnglibconf.h - library build configuration */ + +/* libpng version 1.6.43 */ + +/* Copyright (c) 2018-2024 Cosmin Truta */ +/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */ + +/* This code is released under the libpng license. */ +/* For conditions of distribution and use, see the disclaimer */ +/* and license in png.h */ + +/* pnglibconf.h */ +/* Machine generated file: DO NOT EDIT */ +/* Derived from: scripts/pnglibconf.dfa */ +#ifndef PNGLCONF_H +#define PNGLCONF_H +/* options */ +#define PNG_16BIT_SUPPORTED +#define PNG_ALIGNED_MEMORY_SUPPORTED +/*#undef PNG_ARM_NEON_API_SUPPORTED*/ +/*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/ +#define PNG_BENIGN_ERRORS_SUPPORTED +#define PNG_BENIGN_READ_ERRORS_SUPPORTED +/*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/ +#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED +#define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_COLORSPACE_SUPPORTED +#define PNG_CONSOLE_IO_SUPPORTED +#define PNG_CONVERT_tIME_SUPPORTED +/*#undef PNG_DISABLE_ADLER32_CHECK_SUPPORTED*/ +#define PNG_EASY_ACCESS_SUPPORTED +/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/ +#define PNG_ERROR_TEXT_SUPPORTED +#define PNG_FIXED_POINT_SUPPORTED +#define PNG_FLOATING_ARITHMETIC_SUPPORTED +#define PNG_FLOATING_POINT_SUPPORTED +#define PNG_FORMAT_AFIRST_SUPPORTED +#define PNG_FORMAT_BGR_SUPPORTED +#define PNG_GAMMA_SUPPORTED +#define PNG_GET_PALETTE_MAX_SUPPORTED +#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED +#define PNG_INCH_CONVERSIONS_SUPPORTED +#define PNG_INFO_IMAGE_SUPPORTED +#define PNG_IO_STATE_SUPPORTED +/*#undef PNG_MIPS_MMI_API_SUPPORTED*/ +/*#undef PNG_MIPS_MMI_CHECK_SUPPORTED*/ +/*#undef PNG_MIPS_MSA_API_SUPPORTED*/ +/*#undef PNG_MIPS_MSA_CHECK_SUPPORTED*/ +#define PNG_MNG_FEATURES_SUPPORTED +#define PNG_POINTER_INDEXING_SUPPORTED +/*#undef PNG_POWERPC_VSX_API_SUPPORTED*/ +/*#undef PNG_POWERPC_VSX_CHECK_SUPPORTED*/ +#define PNG_PROGRESSIVE_READ_SUPPORTED +#define PNG_READ_16BIT_SUPPORTED +#define PNG_READ_ALPHA_MODE_SUPPORTED +#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_READ_BACKGROUND_SUPPORTED +#define PNG_READ_BGR_SUPPORTED +#define PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_READ_COMPOSITE_NODIV_SUPPORTED +#define PNG_READ_COMPRESSED_TEXT_SUPPORTED +#define PNG_READ_EXPAND_16_SUPPORTED +#define PNG_READ_EXPAND_SUPPORTED +#define PNG_READ_FILLER_SUPPORTED +#define PNG_READ_GAMMA_SUPPORTED +#define PNG_READ_GET_PALETTE_MAX_SUPPORTED +#define PNG_READ_GRAY_TO_RGB_SUPPORTED +#define PNG_READ_INTERLACING_SUPPORTED +#define PNG_READ_INT_FUNCTIONS_SUPPORTED +#define PNG_READ_INVERT_ALPHA_SUPPORTED +#define PNG_READ_INVERT_SUPPORTED +#define PNG_READ_OPT_PLTE_SUPPORTED +#define PNG_READ_PACKSWAP_SUPPORTED +#define PNG_READ_PACK_SUPPORTED +#define PNG_READ_QUANTIZE_SUPPORTED +#define PNG_READ_RGB_TO_GRAY_SUPPORTED +#define PNG_READ_SCALE_16_TO_8_SUPPORTED +#define PNG_READ_SHIFT_SUPPORTED +#define PNG_READ_STRIP_16_TO_8_SUPPORTED +#define PNG_READ_STRIP_ALPHA_SUPPORTED +#define PNG_READ_SUPPORTED +#define PNG_READ_SWAP_ALPHA_SUPPORTED +#define PNG_READ_SWAP_SUPPORTED +#define PNG_READ_TEXT_SUPPORTED +#define PNG_READ_TRANSFORMS_SUPPORTED +#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_READ_USER_CHUNKS_SUPPORTED +#define PNG_READ_USER_TRANSFORM_SUPPORTED +#define PNG_READ_bKGD_SUPPORTED +#define PNG_READ_cHRM_SUPPORTED +#define PNG_READ_eXIf_SUPPORTED +#define PNG_READ_gAMA_SUPPORTED +#define PNG_READ_hIST_SUPPORTED +#define PNG_READ_iCCP_SUPPORTED +#define PNG_READ_iTXt_SUPPORTED +#define PNG_READ_oFFs_SUPPORTED +#define PNG_READ_pCAL_SUPPORTED +#define PNG_READ_pHYs_SUPPORTED +#define PNG_READ_sBIT_SUPPORTED +#define PNG_READ_sCAL_SUPPORTED +#define PNG_READ_sPLT_SUPPORTED +#define PNG_READ_sRGB_SUPPORTED +#define PNG_READ_tEXt_SUPPORTED +#define PNG_READ_tIME_SUPPORTED +#define PNG_READ_tRNS_SUPPORTED +#define PNG_READ_zTXt_SUPPORTED +#define PNG_SAVE_INT_32_SUPPORTED +#define PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_SEQUENTIAL_READ_SUPPORTED +#define PNG_SETJMP_SUPPORTED +#define PNG_SET_OPTION_SUPPORTED +#define PNG_SET_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_SET_USER_LIMITS_SUPPORTED +#define PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED +#define PNG_SIMPLIFIED_READ_BGR_SUPPORTED +#define PNG_SIMPLIFIED_READ_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_SUPPORTED +#define PNG_STDIO_SUPPORTED +#define PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_TEXT_SUPPORTED +#define PNG_TIME_RFC1123_SUPPORTED +#define PNG_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_USER_CHUNKS_SUPPORTED +#define PNG_USER_LIMITS_SUPPORTED +#define PNG_USER_MEM_SUPPORTED +#define PNG_USER_TRANSFORM_INFO_SUPPORTED +#define PNG_USER_TRANSFORM_PTR_SUPPORTED +#define PNG_WARNINGS_SUPPORTED +#define PNG_WRITE_16BIT_SUPPORTED +#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_WRITE_BGR_SUPPORTED +#define PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED +#define PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED +#define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +#define PNG_WRITE_FILLER_SUPPORTED +#define PNG_WRITE_FILTER_SUPPORTED +#define PNG_WRITE_FLUSH_SUPPORTED +#define PNG_WRITE_GET_PALETTE_MAX_SUPPORTED +#define PNG_WRITE_INTERLACING_SUPPORTED +#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED +#define PNG_WRITE_INVERT_ALPHA_SUPPORTED +#define PNG_WRITE_INVERT_SUPPORTED +#define PNG_WRITE_OPTIMIZE_CMF_SUPPORTED +#define PNG_WRITE_PACKSWAP_SUPPORTED +#define PNG_WRITE_PACK_SUPPORTED +#define PNG_WRITE_SHIFT_SUPPORTED +#define PNG_WRITE_SUPPORTED +#define PNG_WRITE_SWAP_ALPHA_SUPPORTED +#define PNG_WRITE_SWAP_SUPPORTED +#define PNG_WRITE_TEXT_SUPPORTED +#define PNG_WRITE_TRANSFORMS_SUPPORTED +#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_WRITE_USER_TRANSFORM_SUPPORTED +#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED +#define PNG_WRITE_bKGD_SUPPORTED +#define PNG_WRITE_cHRM_SUPPORTED +#define PNG_WRITE_eXIf_SUPPORTED +#define PNG_WRITE_gAMA_SUPPORTED +#define PNG_WRITE_hIST_SUPPORTED +#define PNG_WRITE_iCCP_SUPPORTED +#define PNG_WRITE_iTXt_SUPPORTED +#define PNG_WRITE_oFFs_SUPPORTED +#define PNG_WRITE_pCAL_SUPPORTED +#define PNG_WRITE_pHYs_SUPPORTED +#define PNG_WRITE_sBIT_SUPPORTED +#define PNG_WRITE_sCAL_SUPPORTED +#define PNG_WRITE_sPLT_SUPPORTED +#define PNG_WRITE_sRGB_SUPPORTED +#define PNG_WRITE_tEXt_SUPPORTED +#define PNG_WRITE_tIME_SUPPORTED +#define PNG_WRITE_tRNS_SUPPORTED +#define PNG_WRITE_zTXt_SUPPORTED +#define PNG_bKGD_SUPPORTED +#define PNG_cHRM_SUPPORTED +#define PNG_eXIf_SUPPORTED +#define PNG_gAMA_SUPPORTED +#define PNG_hIST_SUPPORTED +#define PNG_iCCP_SUPPORTED +#define PNG_iTXt_SUPPORTED +#define PNG_oFFs_SUPPORTED +#define PNG_pCAL_SUPPORTED +#define PNG_pHYs_SUPPORTED +#define PNG_sBIT_SUPPORTED +#define PNG_sCAL_SUPPORTED +#define PNG_sPLT_SUPPORTED +#define PNG_sRGB_SUPPORTED +#define PNG_tEXt_SUPPORTED +#define PNG_tIME_SUPPORTED +#define PNG_tRNS_SUPPORTED +#define PNG_zTXt_SUPPORTED +/* end of options */ +/* settings */ +#define PNG_API_RULE 0 +#define PNG_DEFAULT_READ_MACROS 1 +#define PNG_GAMMA_THRESHOLD_FIXED 5000 +#define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE +#define PNG_INFLATE_BUF_SIZE 1024 +#define PNG_LINKAGE_API extern +#define PNG_LINKAGE_CALLBACK extern +#define PNG_LINKAGE_DATA extern +#define PNG_LINKAGE_FUNCTION extern +#define PNG_MAX_GAMMA_8 11 +#define PNG_QUANTIZE_BLUE_BITS 5 +#define PNG_QUANTIZE_GREEN_BITS 5 +#define PNG_QUANTIZE_RED_BITS 5 +#define PNG_TEXT_Z_DEFAULT_COMPRESSION (-1) +#define PNG_TEXT_Z_DEFAULT_STRATEGY 0 +#define PNG_USER_CHUNK_CACHE_MAX 1000 +#define PNG_USER_CHUNK_MALLOC_MAX 8000000 +#define PNG_USER_HEIGHT_MAX 1000000 +#define PNG_USER_WIDTH_MAX 1000000 +#define PNG_ZBUF_SIZE 8192 +#define PNG_ZLIB_VERNUM 0x1310 +#define PNG_Z_DEFAULT_COMPRESSION (-1) +#define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0 +#define PNG_Z_DEFAULT_STRATEGY 1 +#define PNG_sCAL_PRECISION 5 +#define PNG_sRGB_PROFILE_CHECKS 2 +/* end of settings */ +#endif /* PNGLCONF_H */ diff --git a/vcpkg/installed/x64-osx/include/lzma.h b/vcpkg/installed/x64-osx/include/lzma.h new file mode 100644 index 0000000..3774b12 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/lzma.h @@ -0,0 +1,327 @@ +/* SPDX-License-Identifier: 0BSD */ + +/** + * \file api/lzma.h + * \brief The public API of liblzma data compression library + * \mainpage + * + * liblzma is a general-purpose data compression library with a zlib-like API. + * The native file format is .xz, but also the old .lzma format and raw (no + * headers) streams are supported. Multiple compression algorithms (filters) + * are supported. Currently LZMA2 is the primary filter. + * + * liblzma is part of XZ Utils . XZ Utils + * includes a gzip-like command line tool named xz and some other tools. + * XZ Utils is developed and maintained by Lasse Collin. + * + * Major parts of liblzma are based on code written by Igor Pavlov, + * specifically the LZMA SDK . + * + * The SHA-256 implementation in liblzma is based on code written by + * Wei Dai in Crypto++ Library . + * + * liblzma is distributed under the BSD Zero Clause License (0BSD). + */ + +/* + * Author: Lasse Collin + */ + +#ifndef LZMA_H +#define LZMA_H + +/***************************** + * Required standard headers * + *****************************/ + +/* + * liblzma API headers need some standard types and macros. To allow + * including lzma.h without requiring the application to include other + * headers first, lzma.h includes the required standard headers unless + * they already seem to be included already or if LZMA_MANUAL_HEADERS + * has been defined. + * + * Here's what types and macros are needed and from which headers: + * - stddef.h: size_t, NULL + * - stdint.h: uint8_t, uint32_t, uint64_t, UINT32_C(n), uint64_C(n), + * UINT32_MAX, UINT64_MAX + * + * However, inttypes.h is a little more portable than stdint.h, although + * inttypes.h declares some unneeded things compared to plain stdint.h. + * + * The hacks below aren't perfect, specifically they assume that inttypes.h + * exists and that it typedefs at least uint8_t, uint32_t, and uint64_t, + * and that, in case of incomplete inttypes.h, unsigned int is 32-bit. + * If the application already takes care of setting up all the types and + * macros properly (for example by using gnulib's stdint.h or inttypes.h), + * we try to detect that the macros are already defined and don't include + * inttypes.h here again. However, you may define LZMA_MANUAL_HEADERS to + * force this file to never include any system headers. + * + * Some could argue that liblzma API should provide all the required types, + * for example lzma_uint64, LZMA_UINT64_C(n), and LZMA_UINT64_MAX. This was + * seen as an unnecessary mess, since most systems already provide all the + * necessary types and macros in the standard headers. + * + * Note that liblzma API still has lzma_bool, because using stdbool.h would + * break C89 and C++ programs on many systems. sizeof(bool) in C99 isn't + * necessarily the same as sizeof(bool) in C++. + */ + +#ifndef LZMA_MANUAL_HEADERS + /* + * I suppose this works portably also in C++. Note that in C++, + * we need to get size_t into the global namespace. + */ +# include + + /* + * Skip inttypes.h if we already have all the required macros. If we + * have the macros, we assume that we have the matching typedefs too. + */ +# if !defined(UINT32_C) || !defined(UINT64_C) \ + || !defined(UINT32_MAX) || !defined(UINT64_MAX) + /* + * MSVC versions older than 2013 have no C99 support, and + * thus they cannot be used to compile liblzma. Using an + * existing liblzma.dll with old MSVC can work though(*), + * but we need to define the required standard integer + * types here in a MSVC-specific way. + * + * (*) If you do this, the existing liblzma.dll probably uses + * a different runtime library than your MSVC-built + * application. Mixing runtimes is generally bad, but + * in this case it should work as long as you avoid + * the few rarely-needed liblzma functions that allocate + * memory and expect the caller to free it using free(). + */ +# if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1800 + typedef unsigned __int8 uint8_t; + typedef unsigned __int32 uint32_t; + typedef unsigned __int64 uint64_t; +# else + /* Use the standard inttypes.h. */ +# ifdef __cplusplus + /* + * C99 sections 7.18.2 and 7.18.4 specify + * that C++ implementations define the limit + * and constant macros only if specifically + * requested. Note that if you want the + * format macros (PRIu64 etc.) too, you need + * to define __STDC_FORMAT_MACROS before + * including lzma.h, since re-including + * inttypes.h with __STDC_FORMAT_MACROS + * defined doesn't necessarily work. + */ +# ifndef __STDC_LIMIT_MACROS +# define __STDC_LIMIT_MACROS 1 +# endif +# ifndef __STDC_CONSTANT_MACROS +# define __STDC_CONSTANT_MACROS 1 +# endif +# endif + +# include +# endif + + /* + * Some old systems have only the typedefs in inttypes.h, and + * lack all the macros. For those systems, we need a few more + * hacks. We assume that unsigned int is 32-bit and unsigned + * long is either 32-bit or 64-bit. If these hacks aren't + * enough, the application has to setup the types manually + * before including lzma.h. + */ +# ifndef UINT32_C +# if defined(_WIN32) && defined(_MSC_VER) +# define UINT32_C(n) n ## UI32 +# else +# define UINT32_C(n) n ## U +# endif +# endif + +# ifndef UINT64_C +# if defined(_WIN32) && defined(_MSC_VER) +# define UINT64_C(n) n ## UI64 +# else + /* Get ULONG_MAX. */ +# include +# if ULONG_MAX == 4294967295UL +# define UINT64_C(n) n ## ULL +# else +# define UINT64_C(n) n ## UL +# endif +# endif +# endif + +# ifndef UINT32_MAX +# define UINT32_MAX (UINT32_C(4294967295)) +# endif + +# ifndef UINT64_MAX +# define UINT64_MAX (UINT64_C(18446744073709551615)) +# endif +# endif +#endif /* ifdef LZMA_MANUAL_HEADERS */ + + +/****************** + * LZMA_API macro * + ******************/ + +/* + * Some systems require that the functions and function pointers are + * declared specially in the headers. LZMA_API_IMPORT is for importing + * symbols and LZMA_API_CALL is to specify the calling convention. + * + * By default it is assumed that the application will link dynamically + * against liblzma. #define LZMA_API_STATIC in your application if you + * want to link against static liblzma. If you don't care about portability + * to operating systems like Windows, or at least don't care about linking + * against static liblzma on them, don't worry about LZMA_API_STATIC. That + * is, most developers will never need to use LZMA_API_STATIC. + * + * The GCC variants are a special case on Windows (Cygwin and MinGW-w64). + * We rely on GCC doing the right thing with its auto-import feature, + * and thus don't use __declspec(dllimport). This way developers don't + * need to worry about LZMA_API_STATIC. Also the calling convention is + * omitted on Cygwin but not on MinGW-w64. + */ +#ifndef LZMA_API_IMPORT +# if !1 && defined(_WIN32) && !defined(__GNUC__) +# define LZMA_API_IMPORT __declspec(dllimport) +# else +# define LZMA_API_IMPORT +# endif +#endif + +#ifndef LZMA_API_CALL +# if defined(_WIN32) && !defined(__CYGWIN__) +# define LZMA_API_CALL __cdecl +# else +# define LZMA_API_CALL +# endif +#endif + +#ifndef LZMA_API +# define LZMA_API(type) LZMA_API_IMPORT type LZMA_API_CALL +#endif + + +/*********** + * nothrow * + ***********/ + +/* + * None of the functions in liblzma may throw an exception. Even + * the functions that use callback functions won't throw exceptions, + * because liblzma would break if a callback function threw an exception. + */ +#ifndef lzma_nothrow +# if defined(__cplusplus) +# if __cplusplus >= 201103L || (defined(_MSVC_LANG) \ + && _MSVC_LANG >= 201103L) +# define lzma_nothrow noexcept +# else +# define lzma_nothrow throw() +# endif +# elif defined(__GNUC__) && (__GNUC__ > 3 \ + || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) +# define lzma_nothrow __attribute__((__nothrow__)) +# else +# define lzma_nothrow +# endif +#endif + + +/******************** + * GNU C extensions * + ********************/ + +/* + * GNU C extensions are used conditionally in the public API. It doesn't + * break anything if these are sometimes enabled and sometimes not, only + * affects warnings and optimizations. + */ +#if defined(__GNUC__) && __GNUC__ >= 3 +# ifndef lzma_attribute +# define lzma_attribute(attr) __attribute__(attr) +# endif + + /* warn_unused_result was added in GCC 3.4. */ +# ifndef lzma_attr_warn_unused_result +# if __GNUC__ == 3 && __GNUC_MINOR__ < 4 +# define lzma_attr_warn_unused_result +# endif +# endif + +#else +# ifndef lzma_attribute +# define lzma_attribute(attr) +# endif +#endif + + +#ifndef lzma_attr_pure +# define lzma_attr_pure lzma_attribute((__pure__)) +#endif + +#ifndef lzma_attr_const +# define lzma_attr_const lzma_attribute((__const__)) +#endif + +#ifndef lzma_attr_warn_unused_result +# define lzma_attr_warn_unused_result \ + lzma_attribute((__warn_unused_result__)) +#endif + + +/************** + * Subheaders * + **************/ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Subheaders check that this is defined. It is to prevent including + * them directly from applications. + */ +#define LZMA_H_INTERNAL 1 + +/* Basic features */ +#include "lzma/version.h" +#include "lzma/base.h" +#include "lzma/vli.h" +#include "lzma/check.h" + +/* Filters */ +#include "lzma/filter.h" +#include "lzma/bcj.h" +#include "lzma/delta.h" +#include "lzma/lzma12.h" + +/* Container formats */ +#include "lzma/container.h" + +/* Advanced features */ +#include "lzma/stream_flags.h" +#include "lzma/block.h" +#include "lzma/index.h" +#include "lzma/index_hash.h" + +/* Hardware information */ +#include "lzma/hardware.h" + +/* + * All subheaders included. Undefine LZMA_H_INTERNAL to prevent applications + * re-including the subheaders. + */ +#undef LZMA_H_INTERNAL + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef LZMA_H */ diff --git a/vcpkg/installed/x64-osx/include/lzma/base.h b/vcpkg/installed/x64-osx/include/lzma/base.h new file mode 100644 index 0000000..590e1d2 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/lzma/base.h @@ -0,0 +1,747 @@ +/* SPDX-License-Identifier: 0BSD */ + +/** + * \file lzma/base.h + * \brief Data types and functions used in many places in liblzma API + * \note Never include this file directly. Use instead. + */ + +/* + * Author: Lasse Collin + */ + +#ifndef LZMA_H_INTERNAL +# error Never include this file directly. Use instead. +#endif + + +/** + * \brief Boolean + * + * This is here because C89 doesn't have stdbool.h. To set a value for + * variables having type lzma_bool, you can use + * - C99's 'true' and 'false' from stdbool.h; + * - C++'s internal 'true' and 'false'; or + * - integers one (true) and zero (false). + */ +typedef unsigned char lzma_bool; + + +/** + * \brief Type of reserved enumeration variable in structures + * + * To avoid breaking library ABI when new features are added, several + * structures contain extra variables that may be used in future. Since + * sizeof(enum) can be different than sizeof(int), and sizeof(enum) may + * even vary depending on the range of enumeration constants, we specify + * a separate type to be used for reserved enumeration variables. All + * enumeration constants in liblzma API will be non-negative and less + * than 128, which should guarantee that the ABI won't break even when + * new constants are added to existing enumerations. + */ +typedef enum { + LZMA_RESERVED_ENUM = 0 +} lzma_reserved_enum; + + +/** + * \brief Return values used by several functions in liblzma + * + * Check the descriptions of specific functions to find out which return + * values they can return. With some functions the return values may have + * more specific meanings than described here; those differences are + * described per-function basis. + */ +typedef enum { + LZMA_OK = 0, + /**< + * \brief Operation completed successfully + */ + + LZMA_STREAM_END = 1, + /**< + * \brief End of stream was reached + * + * In encoder, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or + * LZMA_FINISH was finished. In decoder, this indicates + * that all the data was successfully decoded. + * + * In all cases, when LZMA_STREAM_END is returned, the last + * output bytes should be picked from strm->next_out. + */ + + LZMA_NO_CHECK = 2, + /**< + * \brief Input stream has no integrity check + * + * This return value can be returned only if the + * LZMA_TELL_NO_CHECK flag was used when initializing + * the decoder. LZMA_NO_CHECK is just a warning, and + * the decoding can be continued normally. + * + * It is possible to call lzma_get_check() immediately after + * lzma_code has returned LZMA_NO_CHECK. The result will + * naturally be LZMA_CHECK_NONE, but the possibility to call + * lzma_get_check() may be convenient in some applications. + */ + + LZMA_UNSUPPORTED_CHECK = 3, + /**< + * \brief Cannot calculate the integrity check + * + * The usage of this return value is different in encoders + * and decoders. + * + * Encoders can return this value only from the initialization + * function. If initialization fails with this value, the + * encoding cannot be done, because there's no way to produce + * output with the correct integrity check. + * + * Decoders can return this value only from lzma_code() and + * only if the LZMA_TELL_UNSUPPORTED_CHECK flag was used when + * initializing the decoder. The decoding can still be + * continued normally even if the check type is unsupported, + * but naturally the check will not be validated, and possible + * errors may go undetected. + * + * With decoder, it is possible to call lzma_get_check() + * immediately after lzma_code() has returned + * LZMA_UNSUPPORTED_CHECK. This way it is possible to find + * out what the unsupported Check ID was. + */ + + LZMA_GET_CHECK = 4, + /**< + * \brief Integrity check type is now available + * + * This value can be returned only by the lzma_code() function + * and only if the decoder was initialized with the + * LZMA_TELL_ANY_CHECK flag. LZMA_GET_CHECK tells the + * application that it may now call lzma_get_check() to find + * out the Check ID. This can be used, for example, to + * implement a decoder that accepts only files that have + * strong enough integrity check. + */ + + LZMA_MEM_ERROR = 5, + /**< + * \brief Cannot allocate memory + * + * Memory allocation failed, or the size of the allocation + * would be greater than SIZE_MAX. + * + * Due to internal implementation reasons, the coding cannot + * be continued even if more memory were made available after + * LZMA_MEM_ERROR. + */ + + LZMA_MEMLIMIT_ERROR = 6, + /**< + * \brief Memory usage limit was reached + * + * Decoder would need more memory than allowed by the + * specified memory usage limit. To continue decoding, + * the memory usage limit has to be increased with + * lzma_memlimit_set(). + * + * liblzma 5.2.6 and earlier had a bug in single-threaded .xz + * decoder (lzma_stream_decoder()) which made it impossible + * to continue decoding after LZMA_MEMLIMIT_ERROR even if + * the limit was increased using lzma_memlimit_set(). + * Other decoders worked correctly. + */ + + LZMA_FORMAT_ERROR = 7, + /**< + * \brief File format not recognized + * + * The decoder did not recognize the input as supported file + * format. This error can occur, for example, when trying to + * decode .lzma format file with lzma_stream_decoder, + * because lzma_stream_decoder accepts only the .xz format. + */ + + LZMA_OPTIONS_ERROR = 8, + /**< + * \brief Invalid or unsupported options + * + * Invalid or unsupported options, for example + * - unsupported filter(s) or filter options; or + * - reserved bits set in headers (decoder only). + * + * Rebuilding liblzma with more features enabled, or + * upgrading to a newer version of liblzma may help. + */ + + LZMA_DATA_ERROR = 9, + /**< + * \brief Data is corrupt + * + * The usage of this return value is different in encoders + * and decoders. In both encoder and decoder, the coding + * cannot continue after this error. + * + * Encoders return this if size limits of the target file + * format would be exceeded. These limits are huge, thus + * getting this error from an encoder is mostly theoretical. + * For example, the maximum compressed and uncompressed + * size of a .xz Stream is roughly 8 EiB (2^63 bytes). + * + * Decoders return this error if the input data is corrupt. + * This can mean, for example, invalid CRC32 in headers + * or invalid check of uncompressed data. + */ + + LZMA_BUF_ERROR = 10, + /**< + * \brief No progress is possible + * + * This error code is returned when the coder cannot consume + * any new input and produce any new output. The most common + * reason for this error is that the input stream being + * decoded is truncated or corrupt. + * + * This error is not fatal. Coding can be continued normally + * by providing more input and/or more output space, if + * possible. + * + * Typically the first call to lzma_code() that can do no + * progress returns LZMA_OK instead of LZMA_BUF_ERROR. Only + * the second consecutive call doing no progress will return + * LZMA_BUF_ERROR. This is intentional. + * + * With zlib, Z_BUF_ERROR may be returned even if the + * application is doing nothing wrong, so apps will need + * to handle Z_BUF_ERROR specially. The above hack + * guarantees that liblzma never returns LZMA_BUF_ERROR + * to properly written applications unless the input file + * is truncated or corrupt. This should simplify the + * applications a little. + */ + + LZMA_PROG_ERROR = 11, + /**< + * \brief Programming error + * + * This indicates that the arguments given to the function are + * invalid or the internal state of the decoder is corrupt. + * - Function arguments are invalid or the structures + * pointed by the argument pointers are invalid + * e.g. if strm->next_out has been set to NULL and + * strm->avail_out > 0 when calling lzma_code(). + * - lzma_* functions have been called in wrong order + * e.g. lzma_code() was called right after lzma_end(). + * - If errors occur randomly, the reason might be flaky + * hardware. + * + * If you think that your code is correct, this error code + * can be a sign of a bug in liblzma. See the documentation + * how to report bugs. + */ + + LZMA_SEEK_NEEDED = 12, + /**< + * \brief Request to change the input file position + * + * Some coders can do random access in the input file. The + * initialization functions of these coders take the file size + * as an argument. No other coders can return LZMA_SEEK_NEEDED. + * + * When this value is returned, the application must seek to + * the file position given in lzma_stream.seek_pos. This value + * is guaranteed to never exceed the file size that was + * specified at the coder initialization. + * + * After seeking the application should read new input and + * pass it normally via lzma_stream.next_in and .avail_in. + */ + + /* + * These enumerations may be used internally by liblzma + * but they will never be returned to applications. + */ + LZMA_RET_INTERNAL1 = 101, + LZMA_RET_INTERNAL2 = 102, + LZMA_RET_INTERNAL3 = 103, + LZMA_RET_INTERNAL4 = 104, + LZMA_RET_INTERNAL5 = 105, + LZMA_RET_INTERNAL6 = 106, + LZMA_RET_INTERNAL7 = 107, + LZMA_RET_INTERNAL8 = 108 +} lzma_ret; + + +/** + * \brief The 'action' argument for lzma_code() + * + * After the first use of LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, LZMA_FULL_BARRIER, + * or LZMA_FINISH, the same 'action' must be used until lzma_code() returns + * LZMA_STREAM_END. Also, the amount of input (that is, strm->avail_in) must + * not be modified by the application until lzma_code() returns + * LZMA_STREAM_END. Changing the 'action' or modifying the amount of input + * will make lzma_code() return LZMA_PROG_ERROR. + */ +typedef enum { + LZMA_RUN = 0, + /**< + * \brief Continue coding + * + * Encoder: Encode as much input as possible. Some internal + * buffering will probably be done (depends on the filter + * chain in use), which causes latency: the input used won't + * usually be decodeable from the output of the same + * lzma_code() call. + * + * Decoder: Decode as much input as possible and produce as + * much output as possible. + */ + + LZMA_SYNC_FLUSH = 1, + /**< + * \brief Make all the input available at output + * + * Normally the encoder introduces some latency. + * LZMA_SYNC_FLUSH forces all the buffered data to be + * available at output without resetting the internal + * state of the encoder. This way it is possible to use + * compressed stream for example for communication over + * network. + * + * Only some filters support LZMA_SYNC_FLUSH. Trying to use + * LZMA_SYNC_FLUSH with filters that don't support it will + * make lzma_code() return LZMA_OPTIONS_ERROR. For example, + * LZMA1 doesn't support LZMA_SYNC_FLUSH but LZMA2 does. + * + * Using LZMA_SYNC_FLUSH very often can dramatically reduce + * the compression ratio. With some filters (for example, + * LZMA2), fine-tuning the compression options may help + * mitigate this problem significantly (for example, + * match finder with LZMA2). + * + * Decoders don't support LZMA_SYNC_FLUSH. + */ + + LZMA_FULL_FLUSH = 2, + /**< + * \brief Finish encoding of the current Block + * + * All the input data going to the current Block must have + * been given to the encoder (the last bytes can still be + * pending in *next_in). Call lzma_code() with LZMA_FULL_FLUSH + * until it returns LZMA_STREAM_END. Then continue normally + * with LZMA_RUN or finish the Stream with LZMA_FINISH. + * + * This action is currently supported only by Stream encoder + * and easy encoder (which uses Stream encoder). If there is + * no unfinished Block, no empty Block is created. + */ + + LZMA_FULL_BARRIER = 4, + /**< + * \brief Finish encoding of the current Block + * + * This is like LZMA_FULL_FLUSH except that this doesn't + * necessarily wait until all the input has been made + * available via the output buffer. That is, lzma_code() + * might return LZMA_STREAM_END as soon as all the input + * has been consumed (avail_in == 0). + * + * LZMA_FULL_BARRIER is useful with a threaded encoder if + * one wants to split the .xz Stream into Blocks at specific + * offsets but doesn't care if the output isn't flushed + * immediately. Using LZMA_FULL_BARRIER allows keeping + * the threads busy while LZMA_FULL_FLUSH would make + * lzma_code() wait until all the threads have finished + * until more data could be passed to the encoder. + * + * With a lzma_stream initialized with the single-threaded + * lzma_stream_encoder() or lzma_easy_encoder(), + * LZMA_FULL_BARRIER is an alias for LZMA_FULL_FLUSH. + */ + + LZMA_FINISH = 3 + /**< + * \brief Finish the coding operation + * + * All the input data must have been given to the encoder + * (the last bytes can still be pending in next_in). + * Call lzma_code() with LZMA_FINISH until it returns + * LZMA_STREAM_END. Once LZMA_FINISH has been used, + * the amount of input must no longer be changed by + * the application. + * + * When decoding, using LZMA_FINISH is optional unless the + * LZMA_CONCATENATED flag was used when the decoder was + * initialized. When LZMA_CONCATENATED was not used, the only + * effect of LZMA_FINISH is that the amount of input must not + * be changed just like in the encoder. + */ +} lzma_action; + + +/** + * \brief Custom functions for memory handling + * + * A pointer to lzma_allocator may be passed via lzma_stream structure + * to liblzma, and some advanced functions take a pointer to lzma_allocator + * as a separate function argument. The library will use the functions + * specified in lzma_allocator for memory handling instead of the default + * malloc() and free(). C++ users should note that the custom memory + * handling functions must not throw exceptions. + * + * Single-threaded mode only: liblzma doesn't make an internal copy of + * lzma_allocator. Thus, it is OK to change these function pointers in + * the middle of the coding process, but obviously it must be done + * carefully to make sure that the replacement 'free' can deallocate + * memory allocated by the earlier 'alloc' function(s). + * + * Multithreaded mode: liblzma might internally store pointers to the + * lzma_allocator given via the lzma_stream structure. The application + * must not change the allocator pointer in lzma_stream or the contents + * of the pointed lzma_allocator structure until lzma_end() has been used + * to free the memory associated with that lzma_stream. The allocation + * functions might be called simultaneously from multiple threads, and + * thus they must be thread safe. + */ +typedef struct { + /** + * \brief Pointer to a custom memory allocation function + * + * If you don't want a custom allocator, but still want + * custom free(), set this to NULL and liblzma will use + * the standard malloc(). + * + * \param opaque lzma_allocator.opaque (see below) + * \param nmemb Number of elements like in calloc(). liblzma + * will always set nmemb to 1, so it is safe to + * ignore nmemb in a custom allocator if you like. + * The nmemb argument exists only for + * compatibility with zlib and libbzip2. + * \param size Size of an element in bytes. + * liblzma never sets this to zero. + * + * \return Pointer to the beginning of a memory block of + * 'size' bytes, or NULL if allocation fails + * for some reason. When allocation fails, functions + * of liblzma return LZMA_MEM_ERROR. + * + * The allocator should not waste time zeroing the allocated buffers. + * This is not only about speed, but also memory usage, since the + * operating system kernel doesn't necessarily allocate the requested + * memory in physical memory until it is actually used. With small + * input files, liblzma may actually need only a fraction of the + * memory that it requested for allocation. + * + * \note LZMA_MEM_ERROR is also used when the size of the + * allocation would be greater than SIZE_MAX. Thus, + * don't assume that the custom allocator must have + * returned NULL if some function from liblzma + * returns LZMA_MEM_ERROR. + */ + void *(LZMA_API_CALL *alloc)(void *opaque, size_t nmemb, size_t size); + + /** + * \brief Pointer to a custom memory freeing function + * + * If you don't want a custom freeing function, but still + * want a custom allocator, set this to NULL and liblzma + * will use the standard free(). + * + * \param opaque lzma_allocator.opaque (see below) + * \param ptr Pointer returned by lzma_allocator.alloc(), + * or when it is set to NULL, a pointer returned + * by the standard malloc(). + */ + void (LZMA_API_CALL *free)(void *opaque, void *ptr); + + /** + * \brief Pointer passed to .alloc() and .free() + * + * opaque is passed as the first argument to lzma_allocator.alloc() + * and lzma_allocator.free(). This intended to ease implementing + * custom memory allocation functions for use with liblzma. + * + * If you don't need this, you should set this to NULL. + */ + void *opaque; + +} lzma_allocator; + + +/** + * \brief Internal data structure + * + * The contents of this structure is not visible outside the library. + */ +typedef struct lzma_internal_s lzma_internal; + + +/** + * \brief Passing data to and from liblzma + * + * The lzma_stream structure is used for + * - passing pointers to input and output buffers to liblzma; + * - defining custom memory handler functions; and + * - holding a pointer to coder-specific internal data structures. + * + * Typical usage: + * + * - After allocating lzma_stream (on stack or with malloc()), it must be + * initialized to LZMA_STREAM_INIT (see LZMA_STREAM_INIT for details). + * + * - Initialize a coder to the lzma_stream, for example by using + * lzma_easy_encoder() or lzma_auto_decoder(). Some notes: + * - In contrast to zlib, strm->next_in and strm->next_out are + * ignored by all initialization functions, thus it is safe + * to not initialize them yet. + * - The initialization functions always set strm->total_in and + * strm->total_out to zero. + * - If the initialization function fails, no memory is left allocated + * that would require freeing with lzma_end() even if some memory was + * associated with the lzma_stream structure when the initialization + * function was called. + * + * - Use lzma_code() to do the actual work. + * + * - Once the coding has been finished, the existing lzma_stream can be + * reused. It is OK to reuse lzma_stream with different initialization + * function without calling lzma_end() first. Old allocations are + * automatically freed. + * + * - Finally, use lzma_end() to free the allocated memory. lzma_end() never + * frees the lzma_stream structure itself. + * + * Application may modify the values of total_in and total_out as it wants. + * They are updated by liblzma to match the amount of data read and + * written but aren't used for anything else except as a possible return + * values from lzma_get_progress(). + */ +typedef struct { + const uint8_t *next_in; /**< Pointer to the next input byte. */ + size_t avail_in; /**< Number of available input bytes in next_in. */ + uint64_t total_in; /**< Total number of bytes read by liblzma. */ + + uint8_t *next_out; /**< Pointer to the next output position. */ + size_t avail_out; /**< Amount of free space in next_out. */ + uint64_t total_out; /**< Total number of bytes written by liblzma. */ + + /** + * \brief Custom memory allocation functions + * + * In most cases this is NULL which makes liblzma use + * the standard malloc() and free(). + * + * \note In 5.0.x this is not a const pointer. + */ + const lzma_allocator *allocator; + + /** Internal state is not visible to applications. */ + lzma_internal *internal; + + /* + * Reserved space to allow possible future extensions without + * breaking the ABI. Excluding the initialization of this structure, + * you should not touch these, because the names of these variables + * may change. + */ + + /** \private Reserved member. */ + void *reserved_ptr1; + + /** \private Reserved member. */ + void *reserved_ptr2; + + /** \private Reserved member. */ + void *reserved_ptr3; + + /** \private Reserved member. */ + void *reserved_ptr4; + + /** + * \brief New seek input position for LZMA_SEEK_NEEDED + * + * When lzma_code() returns LZMA_SEEK_NEEDED, the new input position + * needed by liblzma will be available seek_pos. The value is + * guaranteed to not exceed the file size that was specified when + * this lzma_stream was initialized. + * + * In all other situations the value of this variable is undefined. + */ + uint64_t seek_pos; + + /** \private Reserved member. */ + uint64_t reserved_int2; + + /** \private Reserved member. */ + size_t reserved_int3; + + /** \private Reserved member. */ + size_t reserved_int4; + + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum1; + + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum2; + +} lzma_stream; + + +/** + * \brief Initialization for lzma_stream + * + * When you declare an instance of lzma_stream, you can immediately + * initialize it so that initialization functions know that no memory + * has been allocated yet: + * + * lzma_stream strm = LZMA_STREAM_INIT; + * + * If you need to initialize a dynamically allocated lzma_stream, you can use + * memset(strm_pointer, 0, sizeof(lzma_stream)). Strictly speaking, this + * violates the C standard since NULL may have different internal + * representation than zero, but it should be portable enough in practice. + * Anyway, for maximum portability, you can use something like this: + * + * lzma_stream tmp = LZMA_STREAM_INIT; + * *strm = tmp; + */ +#define LZMA_STREAM_INIT \ + { NULL, 0, 0, NULL, 0, 0, NULL, NULL, \ + NULL, NULL, NULL, NULL, 0, 0, 0, 0, \ + LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM } + + +/** + * \brief Encode or decode data + * + * Once the lzma_stream has been successfully initialized (e.g. with + * lzma_stream_encoder()), the actual encoding or decoding is done + * using this function. The application has to update strm->next_in, + * strm->avail_in, strm->next_out, and strm->avail_out to pass input + * to and get output from liblzma. + * + * See the description of the coder-specific initialization function to find + * out what 'action' values are supported by the coder. + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + * \param action Action for this function to take. Must be a valid + * lzma_action enum value. + * + * \return Any valid lzma_ret. See the lzma_ret enum description for more + * information. + */ +extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Free memory allocated for the coder data structures + * + * After lzma_end(strm), strm->internal is guaranteed to be NULL. No other + * members of the lzma_stream structure are touched. + * + * \note zlib indicates an error if application end()s unfinished + * stream structure. liblzma doesn't do this, and assumes that + * application knows what it is doing. + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + */ +extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow; + + +/** + * \brief Get progress information + * + * In single-threaded mode, applications can get progress information from + * strm->total_in and strm->total_out. In multi-threaded mode this is less + * useful because a significant amount of both input and output data gets + * buffered internally by liblzma. This makes total_in and total_out give + * misleading information and also makes the progress indicator updates + * non-smooth. + * + * This function gives realistic progress information also in multi-threaded + * mode by taking into account the progress made by each thread. In + * single-threaded mode *progress_in and *progress_out are set to + * strm->total_in and strm->total_out, respectively. + * + * \param strm Pointer to lzma_stream that is at least + * initialized with LZMA_STREAM_INIT. + * \param[out] progress_in Pointer to the number of input bytes processed. + * \param[out] progress_out Pointer to the number of output bytes processed. + */ +extern LZMA_API(void) lzma_get_progress(lzma_stream *strm, + uint64_t *progress_in, uint64_t *progress_out) lzma_nothrow; + + +/** + * \brief Get the memory usage of decoder filter chain + * + * This function is currently supported only when *strm has been initialized + * with a function that takes a memlimit argument. With other functions, you + * should use e.g. lzma_raw_encoder_memusage() or lzma_raw_decoder_memusage() + * to estimate the memory requirements. + * + * This function is useful e.g. after LZMA_MEMLIMIT_ERROR to find out how big + * the memory usage limit should have been to decode the input. Note that + * this may give misleading information if decoding .xz Streams that have + * multiple Blocks, because each Block can have different memory requirements. + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + * + * \return How much memory is currently allocated for the filter + * decoders. If no filter chain is currently allocated, + * some non-zero value is still returned, which is less than + * or equal to what any filter chain would indicate as its + * memory requirement. + * + * If this function isn't supported by *strm or some other error + * occurs, zero is returned. + */ +extern LZMA_API(uint64_t) lzma_memusage(const lzma_stream *strm) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Get the current memory usage limit + * + * This function is supported only when *strm has been initialized with + * a function that takes a memlimit argument. + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + * + * \return On success, the current memory usage limit is returned + * (always non-zero). On error, zero is returned. + */ +extern LZMA_API(uint64_t) lzma_memlimit_get(const lzma_stream *strm) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Set the memory usage limit + * + * This function is supported only when *strm has been initialized with + * a function that takes a memlimit argument. + * + * liblzma 5.2.3 and earlier has a bug where memlimit value of 0 causes + * this function to do nothing (leaving the limit unchanged) and still + * return LZMA_OK. Later versions treat 0 as if 1 had been specified (so + * lzma_memlimit_get() will return 1 even if you specify 0 here). + * + * liblzma 5.2.6 and earlier had a bug in single-threaded .xz decoder + * (lzma_stream_decoder()) which made it impossible to continue decoding + * after LZMA_MEMLIMIT_ERROR even if the limit was increased using + * lzma_memlimit_set(). Other decoders worked correctly. + * + * \return Possible lzma_ret values: + * - LZMA_OK: New memory usage limit successfully set. + * - LZMA_MEMLIMIT_ERROR: The new limit is too small. + * The limit was not changed. + * - LZMA_PROG_ERROR: Invalid arguments, e.g. *strm doesn't + * support memory usage limit. + */ +extern LZMA_API(lzma_ret) lzma_memlimit_set( + lzma_stream *strm, uint64_t memlimit) lzma_nothrow; diff --git a/vcpkg/installed/x64-osx/include/lzma/bcj.h b/vcpkg/installed/x64-osx/include/lzma/bcj.h new file mode 100644 index 0000000..7f6611f --- /dev/null +++ b/vcpkg/installed/x64-osx/include/lzma/bcj.h @@ -0,0 +1,98 @@ +/* SPDX-License-Identifier: 0BSD */ + +/** + * \file lzma/bcj.h + * \brief Branch/Call/Jump conversion filters + * \note Never include this file directly. Use instead. + */ + +/* + * Author: Lasse Collin + */ + +#ifndef LZMA_H_INTERNAL +# error Never include this file directly. Use instead. +#endif + + +/* Filter IDs for lzma_filter.id */ + +/** + * \brief Filter for x86 binaries + */ +#define LZMA_FILTER_X86 LZMA_VLI_C(0x04) + +/** + * \brief Filter for Big endian PowerPC binaries + */ +#define LZMA_FILTER_POWERPC LZMA_VLI_C(0x05) + +/** + * \brief Filter for IA-64 (Itanium) binaries + */ +#define LZMA_FILTER_IA64 LZMA_VLI_C(0x06) + +/** + * \brief Filter for ARM binaries + */ +#define LZMA_FILTER_ARM LZMA_VLI_C(0x07) + +/** + * \brief Filter for ARM-Thumb binaries + */ +#define LZMA_FILTER_ARMTHUMB LZMA_VLI_C(0x08) + +/** + * \brief Filter for SPARC binaries + */ +#define LZMA_FILTER_SPARC LZMA_VLI_C(0x09) + +/** + * \brief Filter for ARM64 binaries + */ +#define LZMA_FILTER_ARM64 LZMA_VLI_C(0x0A) + +/** + * \brief Filter for RISC-V binaries + */ +#define LZMA_FILTER_RISCV LZMA_VLI_C(0x0B) + + +/** + * \brief Options for BCJ filters + * + * The BCJ filters never change the size of the data. Specifying options + * for them is optional: if pointer to options is NULL, default value is + * used. You probably never need to specify options to BCJ filters, so just + * set the options pointer to NULL and be happy. + * + * If options with non-default values have been specified when encoding, + * the same options must also be specified when decoding. + * + * \note At the moment, none of the BCJ filters support + * LZMA_SYNC_FLUSH. If LZMA_SYNC_FLUSH is specified, + * LZMA_OPTIONS_ERROR will be returned. If there is need, + * partial support for LZMA_SYNC_FLUSH can be added in future. + * Partial means that flushing would be possible only at + * offsets that are multiple of 2, 4, or 16 depending on + * the filter, except x86 which cannot be made to support + * LZMA_SYNC_FLUSH predictably. + */ +typedef struct { + /** + * \brief Start offset for conversions + * + * This setting is useful only when the same filter is used + * _separately_ for multiple sections of the same executable file, + * and the sections contain cross-section branch/call/jump + * instructions. In that case it is beneficial to set the start + * offset of the non-first sections so that the relative addresses + * of the cross-section branch/call/jump instructions will use the + * same absolute addresses as in the first section. + * + * When the pointer to options is NULL, the default value (zero) + * is used. + */ + uint32_t start_offset; + +} lzma_options_bcj; diff --git a/vcpkg/installed/x64-osx/include/lzma/block.h b/vcpkg/installed/x64-osx/include/lzma/block.h new file mode 100644 index 0000000..05b77e5 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/lzma/block.h @@ -0,0 +1,694 @@ +/* SPDX-License-Identifier: 0BSD */ + +/** + * \file lzma/block.h + * \brief .xz Block handling + * \note Never include this file directly. Use instead. + */ + +/* + * Author: Lasse Collin + */ + +#ifndef LZMA_H_INTERNAL +# error Never include this file directly. Use instead. +#endif + + +/** + * \brief Options for the Block and Block Header encoders and decoders + * + * Different Block handling functions use different parts of this structure. + * Some read some members, other functions write, and some do both. Only the + * members listed for reading need to be initialized when the specified + * functions are called. The members marked for writing will be assigned + * new values at some point either by calling the given function or by + * later calls to lzma_code(). + */ +typedef struct { + /** + * \brief Block format version + * + * To prevent API and ABI breakages when new features are needed, + * a version number is used to indicate which members in this + * structure are in use: + * - liblzma >= 5.0.0: version = 0 is supported. + * - liblzma >= 5.1.4beta: Support for version = 1 was added, + * which adds the ignore_check member. + * + * If version is greater than one, most Block related functions + * will return LZMA_OPTIONS_ERROR (lzma_block_header_decode() works + * with any version value). + * + * Read by: + * - lzma_block_header_size() + * - lzma_block_header_encode() + * - lzma_block_header_decode() + * - lzma_block_compressed_size() + * - lzma_block_unpadded_size() + * - lzma_block_total_size() + * - lzma_block_encoder() + * - lzma_block_decoder() + * - lzma_block_buffer_encode() + * - lzma_block_uncomp_encode() + * - lzma_block_buffer_decode() + * + * Written by: + * - lzma_block_header_decode() + */ + uint32_t version; + + /** + * \brief Size of the Block Header field in bytes + * + * This is always a multiple of four. + * + * Read by: + * - lzma_block_header_encode() + * - lzma_block_header_decode() + * - lzma_block_compressed_size() + * - lzma_block_unpadded_size() + * - lzma_block_total_size() + * - lzma_block_decoder() + * - lzma_block_buffer_decode() + * + * Written by: + * - lzma_block_header_size() + * - lzma_block_buffer_encode() + * - lzma_block_uncomp_encode() + */ + uint32_t header_size; +# define LZMA_BLOCK_HEADER_SIZE_MIN 8 +# define LZMA_BLOCK_HEADER_SIZE_MAX 1024 + + /** + * \brief Type of integrity Check + * + * The Check ID is not stored into the Block Header, thus its value + * must be provided also when decoding. + * + * Read by: + * - lzma_block_header_encode() + * - lzma_block_header_decode() + * - lzma_block_compressed_size() + * - lzma_block_unpadded_size() + * - lzma_block_total_size() + * - lzma_block_encoder() + * - lzma_block_decoder() + * - lzma_block_buffer_encode() + * - lzma_block_buffer_decode() + */ + lzma_check check; + + /** + * \brief Size of the Compressed Data in bytes + * + * Encoding: If this is not LZMA_VLI_UNKNOWN, Block Header encoder + * will store this value to the Block Header. Block encoder doesn't + * care about this value, but will set it once the encoding has been + * finished. + * + * Decoding: If this is not LZMA_VLI_UNKNOWN, Block decoder will + * verify that the size of the Compressed Data field matches + * compressed_size. + * + * Usually you don't know this value when encoding in streamed mode, + * and thus cannot write this field into the Block Header. + * + * In non-streamed mode you can reserve space for this field before + * encoding the actual Block. After encoding the data, finish the + * Block by encoding the Block Header. Steps in detail: + * + * - Set compressed_size to some big enough value. If you don't know + * better, use LZMA_VLI_MAX, but remember that bigger values take + * more space in Block Header. + * + * - Call lzma_block_header_size() to see how much space you need to + * reserve for the Block Header. + * + * - Encode the Block using lzma_block_encoder() and lzma_code(). + * It sets compressed_size to the correct value. + * + * - Use lzma_block_header_encode() to encode the Block Header. + * Because space was reserved in the first step, you don't need + * to call lzma_block_header_size() anymore, because due to + * reserving, header_size has to be big enough. If it is "too big", + * lzma_block_header_encode() will add enough Header Padding to + * make Block Header to match the size specified by header_size. + * + * Read by: + * - lzma_block_header_size() + * - lzma_block_header_encode() + * - lzma_block_compressed_size() + * - lzma_block_unpadded_size() + * - lzma_block_total_size() + * - lzma_block_decoder() + * - lzma_block_buffer_decode() + * + * Written by: + * - lzma_block_header_decode() + * - lzma_block_compressed_size() + * - lzma_block_encoder() + * - lzma_block_decoder() + * - lzma_block_buffer_encode() + * - lzma_block_uncomp_encode() + * - lzma_block_buffer_decode() + */ + lzma_vli compressed_size; + + /** + * \brief Uncompressed Size in bytes + * + * This is handled very similarly to compressed_size above. + * + * uncompressed_size is needed by fewer functions than + * compressed_size. This is because uncompressed_size isn't + * needed to validate that Block stays within proper limits. + * + * Read by: + * - lzma_block_header_size() + * - lzma_block_header_encode() + * - lzma_block_decoder() + * - lzma_block_buffer_decode() + * + * Written by: + * - lzma_block_header_decode() + * - lzma_block_encoder() + * - lzma_block_decoder() + * - lzma_block_buffer_encode() + * - lzma_block_uncomp_encode() + * - lzma_block_buffer_decode() + */ + lzma_vli uncompressed_size; + + /** + * \brief Array of filters + * + * There can be 1-4 filters. The end of the array is marked with + * .id = LZMA_VLI_UNKNOWN. + * + * Read by: + * - lzma_block_header_size() + * - lzma_block_header_encode() + * - lzma_block_encoder() + * - lzma_block_decoder() + * - lzma_block_buffer_encode() + * - lzma_block_buffer_decode() + * + * Written by: + * - lzma_block_header_decode(): Note that this does NOT free() + * the old filter options structures. All unused filters[] will + * have .id == LZMA_VLI_UNKNOWN and .options == NULL. If + * decoding fails, all filters[] are guaranteed to be + * LZMA_VLI_UNKNOWN and NULL. + * + * \note Because of the array is terminated with + * .id = LZMA_VLI_UNKNOWN, the actual array must + * have LZMA_FILTERS_MAX + 1 members or the Block + * Header decoder will overflow the buffer. + */ + lzma_filter *filters; + + /** + * \brief Raw value stored in the Check field + * + * After successful coding, the first lzma_check_size(check) bytes + * of this array contain the raw value stored in the Check field. + * + * Note that CRC32 and CRC64 are stored in little endian byte order. + * Take it into account if you display the Check values to the user. + * + * Written by: + * - lzma_block_encoder() + * - lzma_block_decoder() + * - lzma_block_buffer_encode() + * - lzma_block_uncomp_encode() + * - lzma_block_buffer_decode() + */ + uint8_t raw_check[LZMA_CHECK_SIZE_MAX]; + + /* + * Reserved space to allow possible future extensions without + * breaking the ABI. You should not touch these, because the names + * of these variables may change. These are and will never be used + * with the currently supported options, so it is safe to leave these + * uninitialized. + */ + + /** \private Reserved member. */ + void *reserved_ptr1; + + /** \private Reserved member. */ + void *reserved_ptr2; + + /** \private Reserved member. */ + void *reserved_ptr3; + + /** \private Reserved member. */ + uint32_t reserved_int1; + + /** \private Reserved member. */ + uint32_t reserved_int2; + + /** \private Reserved member. */ + lzma_vli reserved_int3; + + /** \private Reserved member. */ + lzma_vli reserved_int4; + + /** \private Reserved member. */ + lzma_vli reserved_int5; + + /** \private Reserved member. */ + lzma_vli reserved_int6; + + /** \private Reserved member. */ + lzma_vli reserved_int7; + + /** \private Reserved member. */ + lzma_vli reserved_int8; + + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum1; + + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum2; + + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum3; + + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum4; + + /** + * \brief A flag to Block decoder to not verify the Check field + * + * This member is supported by liblzma >= 5.1.4beta if .version >= 1. + * + * If this is set to true, the integrity check won't be calculated + * and verified. Unless you know what you are doing, you should + * leave this to false. (A reason to set this to true is when the + * file integrity is verified externally anyway and you want to + * speed up the decompression, which matters mostly when using + * SHA-256 as the integrity check.) + * + * If .version >= 1, read by: + * - lzma_block_decoder() + * - lzma_block_buffer_decode() + * + * Written by (.version is ignored): + * - lzma_block_header_decode() always sets this to false + */ + lzma_bool ignore_check; + + /** \private Reserved member. */ + lzma_bool reserved_bool2; + + /** \private Reserved member. */ + lzma_bool reserved_bool3; + + /** \private Reserved member. */ + lzma_bool reserved_bool4; + + /** \private Reserved member. */ + lzma_bool reserved_bool5; + + /** \private Reserved member. */ + lzma_bool reserved_bool6; + + /** \private Reserved member. */ + lzma_bool reserved_bool7; + + /** \private Reserved member. */ + lzma_bool reserved_bool8; + +} lzma_block; + + +/** + * \brief Decode the Block Header Size field + * + * To decode Block Header using lzma_block_header_decode(), the size of the + * Block Header has to be known and stored into lzma_block.header_size. + * The size can be calculated from the first byte of a Block using this macro. + * Note that if the first byte is 0x00, it indicates beginning of Index; use + * this macro only when the byte is not 0x00. + * + * There is no encoding macro because lzma_block_header_size() and + * lzma_block_header_encode() should be used. + */ +#define lzma_block_header_size_decode(b) (((uint32_t)(b) + 1) * 4) + + +/** + * \brief Calculate Block Header Size + * + * Calculate the minimum size needed for the Block Header field using the + * settings specified in the lzma_block structure. Note that it is OK to + * increase the calculated header_size value as long as it is a multiple of + * four and doesn't exceed LZMA_BLOCK_HEADER_SIZE_MAX. Increasing header_size + * just means that lzma_block_header_encode() will add Header Padding. + * + * \note This doesn't check that all the options are valid i.e. this + * may return LZMA_OK even if lzma_block_header_encode() or + * lzma_block_encoder() would fail. If you want to validate the + * filter chain, consider using lzma_memlimit_encoder() which as + * a side-effect validates the filter chain. + * + * \param block Block options + * + * \return Possible lzma_ret values: + * - LZMA_OK: Size calculated successfully and stored to + * block->header_size. + * - LZMA_OPTIONS_ERROR: Unsupported version, filters or + * filter options. + * - LZMA_PROG_ERROR: Invalid values like compressed_size == 0. + */ +extern LZMA_API(lzma_ret) lzma_block_header_size(lzma_block *block) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Encode Block Header + * + * The caller must have calculated the size of the Block Header already with + * lzma_block_header_size(). If a value larger than the one calculated by + * lzma_block_header_size() is used, the Block Header will be padded to the + * specified size. + * + * \param block Block options to be encoded. + * \param[out] out Beginning of the output buffer. This must be + * at least block->header_size bytes. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Encoding was successful. block->header_size + * bytes were written to output buffer. + * - LZMA_OPTIONS_ERROR: Invalid or unsupported options. + * - LZMA_PROG_ERROR: Invalid arguments, for example + * block->header_size is invalid or block->filters is NULL. + */ +extern LZMA_API(lzma_ret) lzma_block_header_encode( + const lzma_block *block, uint8_t *out) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Decode Block Header + * + * block->version should (usually) be set to the highest value supported + * by the application. If the application sets block->version to a value + * higher than supported by the current liblzma version, this function will + * downgrade block->version to the highest value supported by it. Thus one + * should check the value of block->version after calling this function if + * block->version was set to a non-zero value and the application doesn't + * otherwise know that the liblzma version being used is new enough to + * support the specified block->version. + * + * The size of the Block Header must have already been decoded with + * lzma_block_header_size_decode() macro and stored to block->header_size. + * + * The integrity check type from Stream Header must have been stored + * to block->check. + * + * block->filters must have been allocated, but they don't need to be + * initialized (possible existing filter options are not freed). + * + * \param[out] block Destination for Block options + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() (and also free() + * if an error occurs). + * \param in Beginning of the input buffer. This must be + * at least block->header_size bytes. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Decoding was successful. block->header_size + * bytes were read from the input buffer. + * - LZMA_OPTIONS_ERROR: The Block Header specifies some + * unsupported options such as unsupported filters. This can + * happen also if block->version was set to a too low value + * compared to what would be required to properly represent + * the information stored in the Block Header. + * - LZMA_DATA_ERROR: Block Header is corrupt, for example, + * the CRC32 doesn't match. + * - LZMA_PROG_ERROR: Invalid arguments, for example + * block->header_size is invalid or block->filters is NULL. + */ +extern LZMA_API(lzma_ret) lzma_block_header_decode(lzma_block *block, + const lzma_allocator *allocator, const uint8_t *in) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Validate and set Compressed Size according to Unpadded Size + * + * Block Header stores Compressed Size, but Index has Unpadded Size. If the + * application has already parsed the Index and is now decoding Blocks, + * it can calculate Compressed Size from Unpadded Size. This function does + * exactly that with error checking: + * + * - Compressed Size calculated from Unpadded Size must be positive integer, + * that is, Unpadded Size must be big enough that after Block Header and + * Check fields there's still at least one byte for Compressed Size. + * + * - If Compressed Size was present in Block Header, the new value + * calculated from Unpadded Size is compared against the value + * from Block Header. + * + * \note This function must be called _after_ decoding the Block Header + * field so that it can properly validate Compressed Size if it + * was present in Block Header. + * + * \param block Block options: block->header_size must + * already be set with lzma_block_header_size(). + * \param unpadded_size Unpadded Size from the Index field in bytes + * + * \return Possible lzma_ret values: + * - LZMA_OK: block->compressed_size was set successfully. + * - LZMA_DATA_ERROR: unpadded_size is too small compared to + * block->header_size and lzma_check_size(block->check). + * - LZMA_PROG_ERROR: Some values are invalid. For example, + * block->header_size must be a multiple of four and + * between 8 and 1024 inclusive. + */ +extern LZMA_API(lzma_ret) lzma_block_compressed_size( + lzma_block *block, lzma_vli unpadded_size) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Calculate Unpadded Size + * + * The Index field stores Unpadded Size and Uncompressed Size. The latter + * can be taken directly from the lzma_block structure after coding a Block, + * but Unpadded Size needs to be calculated from Block Header Size, + * Compressed Size, and size of the Check field. This is where this function + * is needed. + * + * \param block Block options: block->header_size must already be + * set with lzma_block_header_size(). + * + * \return Unpadded Size on success, or zero on error. + */ +extern LZMA_API(lzma_vli) lzma_block_unpadded_size(const lzma_block *block) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Calculate the total encoded size of a Block + * + * This is equivalent to lzma_block_unpadded_size() except that the returned + * value includes the size of the Block Padding field. + * + * \param block Block options: block->header_size must already be + * set with lzma_block_header_size(). + * + * \return On success, total encoded size of the Block. On error, + * zero is returned. + */ +extern LZMA_API(lzma_vli) lzma_block_total_size(const lzma_block *block) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Initialize .xz Block encoder + * + * Valid actions for lzma_code() are LZMA_RUN, LZMA_SYNC_FLUSH (only if the + * filter chain supports it), and LZMA_FINISH. + * + * The Block encoder encodes the Block Data, Block Padding, and Check value. + * It does NOT encode the Block Header which can be encoded with + * lzma_block_header_encode(). + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + * \param block Block options: block->version, block->check, + * and block->filters must have been initialized. + * + * \return Possible lzma_ret values: + * - LZMA_OK: All good, continue with lzma_code(). + * - LZMA_MEM_ERROR + * - LZMA_OPTIONS_ERROR + * - LZMA_UNSUPPORTED_CHECK: block->check specifies a Check ID + * that is not supported by this build of liblzma. Initializing + * the encoder failed. + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_block_encoder( + lzma_stream *strm, lzma_block *block) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Initialize .xz Block decoder + * + * Valid actions for lzma_code() are LZMA_RUN and LZMA_FINISH. Using + * LZMA_FINISH is not required. It is supported only for convenience. + * + * The Block decoder decodes the Block Data, Block Padding, and Check value. + * It does NOT decode the Block Header which can be decoded with + * lzma_block_header_decode(). + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + * \param block Block options + * + * \return Possible lzma_ret values: + * - LZMA_OK: All good, continue with lzma_code(). + * - LZMA_PROG_ERROR + * - LZMA_MEM_ERROR + */ +extern LZMA_API(lzma_ret) lzma_block_decoder( + lzma_stream *strm, lzma_block *block) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Calculate maximum output size for single-call Block encoding + * + * This is equivalent to lzma_stream_buffer_bound() but for .xz Blocks. + * See the documentation of lzma_stream_buffer_bound(). + * + * \param uncompressed_size Size of the data to be encoded with the + * single-call Block encoder. + * + * \return Maximum output size in bytes for single-call Block encoding. + */ +extern LZMA_API(size_t) lzma_block_buffer_bound(size_t uncompressed_size) + lzma_nothrow; + + +/** + * \brief Single-call .xz Block encoder + * + * In contrast to the multi-call encoder initialized with + * lzma_block_encoder(), this function encodes also the Block Header. This + * is required to make it possible to write appropriate Block Header also + * in case the data isn't compressible, and different filter chain has to be + * used to encode the data in uncompressed form using uncompressed chunks + * of the LZMA2 filter. + * + * When the data isn't compressible, header_size, compressed_size, and + * uncompressed_size are set just like when the data was compressible, but + * it is possible that header_size is too small to hold the filter chain + * specified in block->filters, because that isn't necessarily the filter + * chain that was actually used to encode the data. lzma_block_unpadded_size() + * still works normally, because it doesn't read the filters array. + * + * \param block Block options: block->version, block->check, + * and block->filters must have been initialized. + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * \param in Beginning of the input buffer + * \param in_size Size of the input buffer + * \param[out] out Beginning of the output buffer + * \param[out] out_pos The next byte will be written to out[*out_pos]. + * *out_pos is updated only if encoding succeeds. + * \param out_size Size of the out buffer; the first byte into + * which no data is written to is out[out_size]. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Encoding was successful. + * - LZMA_BUF_ERROR: Not enough output buffer space. + * - LZMA_UNSUPPORTED_CHECK + * - LZMA_OPTIONS_ERROR + * - LZMA_MEM_ERROR + * - LZMA_DATA_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_block_buffer_encode( + lzma_block *block, const lzma_allocator *allocator, + const uint8_t *in, size_t in_size, + uint8_t *out, size_t *out_pos, size_t out_size) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Single-call uncompressed .xz Block encoder + * + * This is like lzma_block_buffer_encode() except this doesn't try to + * compress the data and instead encodes the data using LZMA2 uncompressed + * chunks. The required output buffer size can be determined with + * lzma_block_buffer_bound(). + * + * Since the data won't be compressed, this function ignores block->filters. + * This function doesn't take lzma_allocator because this function doesn't + * allocate any memory from the heap. + * + * \param block Block options: block->version, block->check, + * and block->filters must have been initialized. + * \param in Beginning of the input buffer + * \param in_size Size of the input buffer + * \param[out] out Beginning of the output buffer + * \param[out] out_pos The next byte will be written to out[*out_pos]. + * *out_pos is updated only if encoding succeeds. + * \param out_size Size of the out buffer; the first byte into + * which no data is written to is out[out_size]. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Encoding was successful. + * - LZMA_BUF_ERROR: Not enough output buffer space. + * - LZMA_UNSUPPORTED_CHECK + * - LZMA_OPTIONS_ERROR + * - LZMA_MEM_ERROR + * - LZMA_DATA_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_block_uncomp_encode(lzma_block *block, + const uint8_t *in, size_t in_size, + uint8_t *out, size_t *out_pos, size_t out_size) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Single-call .xz Block decoder + * + * This is single-call equivalent of lzma_block_decoder(), and requires that + * the caller has already decoded Block Header and checked its memory usage. + * + * \param block Block options + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * \param in Beginning of the input buffer + * \param in_pos The next byte will be read from in[*in_pos]. + * *in_pos is updated only if decoding succeeds. + * \param in_size Size of the input buffer; the first byte that + * won't be read is in[in_size]. + * \param[out] out Beginning of the output buffer + * \param[out] out_pos The next byte will be written to out[*out_pos]. + * *out_pos is updated only if encoding succeeds. + * \param out_size Size of the out buffer; the first byte into + * which no data is written to is out[out_size]. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Decoding was successful. + * - LZMA_OPTIONS_ERROR + * - LZMA_DATA_ERROR + * - LZMA_MEM_ERROR + * - LZMA_BUF_ERROR: Output buffer was too small. + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_block_buffer_decode( + lzma_block *block, const lzma_allocator *allocator, + const uint8_t *in, size_t *in_pos, size_t in_size, + uint8_t *out, size_t *out_pos, size_t out_size) + lzma_nothrow; diff --git a/vcpkg/installed/x64-osx/include/lzma/check.h b/vcpkg/installed/x64-osx/include/lzma/check.h new file mode 100644 index 0000000..e7a50ed --- /dev/null +++ b/vcpkg/installed/x64-osx/include/lzma/check.h @@ -0,0 +1,163 @@ +/* SPDX-License-Identifier: 0BSD */ + +/** + * \file lzma/check.h + * \brief Integrity checks + * \note Never include this file directly. Use instead. + */ + +/* + * Author: Lasse Collin + */ + +#ifndef LZMA_H_INTERNAL +# error Never include this file directly. Use instead. +#endif + + +/** + * \brief Type of the integrity check (Check ID) + * + * The .xz format supports multiple types of checks that are calculated + * from the uncompressed data. They vary in both speed and ability to + * detect errors. + */ +typedef enum { + LZMA_CHECK_NONE = 0, + /**< + * No Check is calculated. + * + * Size of the Check field: 0 bytes + */ + + LZMA_CHECK_CRC32 = 1, + /**< + * CRC32 using the polynomial from the IEEE 802.3 standard + * + * Size of the Check field: 4 bytes + */ + + LZMA_CHECK_CRC64 = 4, + /**< + * CRC64 using the polynomial from the ECMA-182 standard + * + * Size of the Check field: 8 bytes + */ + + LZMA_CHECK_SHA256 = 10 + /**< + * SHA-256 + * + * Size of the Check field: 32 bytes + */ +} lzma_check; + + +/** + * \brief Maximum valid Check ID + * + * The .xz file format specification specifies 16 Check IDs (0-15). Some + * of them are only reserved, that is, no actual Check algorithm has been + * assigned. When decoding, liblzma still accepts unknown Check IDs for + * future compatibility. If a valid but unsupported Check ID is detected, + * liblzma can indicate a warning; see the flags LZMA_TELL_NO_CHECK, + * LZMA_TELL_UNSUPPORTED_CHECK, and LZMA_TELL_ANY_CHECK in container.h. + */ +#define LZMA_CHECK_ID_MAX 15 + + +/** + * \brief Test if the given Check ID is supported + * + * LZMA_CHECK_NONE and LZMA_CHECK_CRC32 are always supported (even if + * liblzma is built with limited features). + * + * \note It is safe to call this with a value that is not in the + * range [0, 15]; in that case the return value is always false. + * + * \param check Check ID + * + * \return lzma_bool: + * - true if Check ID is supported by this liblzma build. + * - false otherwise. + */ +extern LZMA_API(lzma_bool) lzma_check_is_supported(lzma_check check) + lzma_nothrow lzma_attr_const; + + +/** + * \brief Get the size of the Check field with the given Check ID + * + * Although not all Check IDs have a check algorithm associated, the size of + * every Check is already frozen. This function returns the size (in bytes) of + * the Check field with the specified Check ID. The values are: + * { 0, 4, 4, 4, 8, 8, 8, 16, 16, 16, 32, 32, 32, 64, 64, 64 } + * + * \param check Check ID + * + * \return Size of the Check field in bytes. If the argument is not in + * the range [0, 15], UINT32_MAX is returned. + */ +extern LZMA_API(uint32_t) lzma_check_size(lzma_check check) + lzma_nothrow lzma_attr_const; + + +/** + * \brief Maximum size of a Check field + */ +#define LZMA_CHECK_SIZE_MAX 64 + + +/** + * \brief Calculate CRC32 + * + * Calculate CRC32 using the polynomial from the IEEE 802.3 standard. + * + * \param buf Pointer to the input buffer + * \param size Size of the input buffer + * \param crc Previously returned CRC value. This is used to + * calculate the CRC of a big buffer in smaller chunks. + * Set to zero when starting a new calculation. + * + * \return Updated CRC value, which can be passed to this function + * again to continue CRC calculation. + */ +extern LZMA_API(uint32_t) lzma_crc32( + const uint8_t *buf, size_t size, uint32_t crc) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Calculate CRC64 + * + * Calculate CRC64 using the polynomial from the ECMA-182 standard. + * + * This function is used similarly to lzma_crc32(). + * + * \param buf Pointer to the input buffer + * \param size Size of the input buffer + * \param crc Previously returned CRC value. This is used to + * calculate the CRC of a big buffer in smaller chunks. + * Set to zero when starting a new calculation. + * + * \return Updated CRC value, which can be passed to this function + * again to continue CRC calculation. + */ +extern LZMA_API(uint64_t) lzma_crc64( + const uint8_t *buf, size_t size, uint64_t crc) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Get the type of the integrity check + * + * This function can be called only immediately after lzma_code() has + * returned LZMA_NO_CHECK, LZMA_UNSUPPORTED_CHECK, or LZMA_GET_CHECK. + * Calling this function in any other situation has undefined behavior. + * + * \param strm Pointer to lzma_stream meeting the above conditions. + * + * \return Check ID in the lzma_stream, or undefined if called improperly. + */ +extern LZMA_API(lzma_check) lzma_get_check(const lzma_stream *strm) + lzma_nothrow; diff --git a/vcpkg/installed/x64-osx/include/lzma/container.h b/vcpkg/installed/x64-osx/include/lzma/container.h new file mode 100644 index 0000000..8e4af42 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/lzma/container.h @@ -0,0 +1,995 @@ +/* SPDX-License-Identifier: 0BSD */ + +/** + * \file lzma/container.h + * \brief File formats + * \note Never include this file directly. Use instead. + */ + +/* + * Author: Lasse Collin + */ + +#ifndef LZMA_H_INTERNAL +# error Never include this file directly. Use instead. +#endif + + +/************ + * Encoding * + ************/ + +/** + * \brief Default compression preset + * + * It's not straightforward to recommend a default preset, because in some + * cases keeping the resource usage relatively low is more important that + * getting the maximum compression ratio. + */ +#define LZMA_PRESET_DEFAULT UINT32_C(6) + + +/** + * \brief Mask for preset level + * + * This is useful only if you need to extract the level from the preset + * variable. That should be rare. + */ +#define LZMA_PRESET_LEVEL_MASK UINT32_C(0x1F) + + +/* + * Preset flags + * + * Currently only one flag is defined. + */ + +/** + * \brief Extreme compression preset + * + * This flag modifies the preset to make the encoding significantly slower + * while improving the compression ratio only marginally. This is useful + * when you don't mind spending time to get as small result as possible. + * + * This flag doesn't affect the memory usage requirements of the decoder (at + * least not significantly). The memory usage of the encoder may be increased + * a little but only at the lowest preset levels (0-3). + */ +#define LZMA_PRESET_EXTREME (UINT32_C(1) << 31) + + +/** + * \brief Multithreading options + */ +typedef struct { + /** + * \brief Flags + * + * Set this to zero if no flags are wanted. + * + * Encoder: No flags are currently supported. + * + * Decoder: Bitwise-or of zero or more of the decoder flags: + * - LZMA_TELL_NO_CHECK + * - LZMA_TELL_UNSUPPORTED_CHECK + * - LZMA_TELL_ANY_CHECK + * - LZMA_IGNORE_CHECK + * - LZMA_CONCATENATED + * - LZMA_FAIL_FAST + */ + uint32_t flags; + + /** + * \brief Number of worker threads to use + */ + uint32_t threads; + + /** + * \brief Encoder only: Maximum uncompressed size of a Block + * + * The encoder will start a new .xz Block every block_size bytes. + * Using LZMA_FULL_FLUSH or LZMA_FULL_BARRIER with lzma_code() + * the caller may tell liblzma to start a new Block earlier. + * + * With LZMA2, a recommended block size is 2-4 times the LZMA2 + * dictionary size. With very small dictionaries, it is recommended + * to use at least 1 MiB block size for good compression ratio, even + * if this is more than four times the dictionary size. Note that + * these are only recommendations for typical use cases; feel free + * to use other values. Just keep in mind that using a block size + * less than the LZMA2 dictionary size is waste of RAM. + * + * Set this to 0 to let liblzma choose the block size depending + * on the compression options. For LZMA2 it will be 3*dict_size + * or 1 MiB, whichever is more. + * + * For each thread, about 3 * block_size bytes of memory will be + * allocated. This may change in later liblzma versions. If so, + * the memory usage will probably be reduced, not increased. + */ + uint64_t block_size; + + /** + * \brief Timeout to allow lzma_code() to return early + * + * Multithreading can make liblzma consume input and produce + * output in a very bursty way: it may first read a lot of input + * to fill internal buffers, then no input or output occurs for + * a while. + * + * In single-threaded mode, lzma_code() won't return until it has + * either consumed all the input or filled the output buffer. If + * this is done in multithreaded mode, it may cause a call + * lzma_code() to take even tens of seconds, which isn't acceptable + * in all applications. + * + * To avoid very long blocking times in lzma_code(), a timeout + * (in milliseconds) may be set here. If lzma_code() would block + * longer than this number of milliseconds, it will return with + * LZMA_OK. Reasonable values are 100 ms or more. The xz command + * line tool uses 300 ms. + * + * If long blocking times are acceptable, set timeout to a special + * value of 0. This will disable the timeout mechanism and will make + * lzma_code() block until all the input is consumed or the output + * buffer has been filled. + * + * \note Even with a timeout, lzma_code() might sometimes take + * a long time to return. No timing guarantees are made. + */ + uint32_t timeout; + + /** + * \brief Encoder only: Compression preset + * + * The preset is set just like with lzma_easy_encoder(). + * The preset is ignored if filters below is non-NULL. + */ + uint32_t preset; + + /** + * \brief Encoder only: Filter chain (alternative to a preset) + * + * If this is NULL, the preset above is used. Otherwise the preset + * is ignored and the filter chain specified here is used. + */ + const lzma_filter *filters; + + /** + * \brief Encoder only: Integrity check type + * + * See check.h for available checks. The xz command line tool + * defaults to LZMA_CHECK_CRC64, which is a good choice if you + * are unsure. + */ + lzma_check check; + + /* + * Reserved space to allow possible future extensions without + * breaking the ABI. You should not touch these, because the names + * of these variables may change. These are and will never be used + * with the currently supported options, so it is safe to leave these + * uninitialized. + */ + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum1; + + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum2; + + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum3; + + /** \private Reserved member. */ + uint32_t reserved_int1; + + /** \private Reserved member. */ + uint32_t reserved_int2; + + /** \private Reserved member. */ + uint32_t reserved_int3; + + /** \private Reserved member. */ + uint32_t reserved_int4; + + /** + * \brief Memory usage limit to reduce the number of threads + * + * Encoder: Ignored. + * + * Decoder: + * + * If the number of threads has been set so high that more than + * memlimit_threading bytes of memory would be needed, the number + * of threads will be reduced so that the memory usage will not exceed + * memlimit_threading bytes. However, if memlimit_threading cannot + * be met even in single-threaded mode, then decoding will continue + * in single-threaded mode and memlimit_threading may be exceeded + * even by a large amount. That is, memlimit_threading will never make + * lzma_code() return LZMA_MEMLIMIT_ERROR. To truly cap the memory + * usage, see memlimit_stop below. + * + * Setting memlimit_threading to UINT64_MAX or a similar huge value + * means that liblzma is allowed to keep the whole compressed file + * and the whole uncompressed file in memory in addition to the memory + * needed by the decompressor data structures used by each thread! + * In other words, a reasonable value limit must be set here or it + * will cause problems sooner or later. If you have no idea what + * a reasonable value could be, try lzma_physmem() / 4 as a starting + * point. Setting this limit will never prevent decompression of + * a file; this will only reduce the number of threads. + * + * If memlimit_threading is greater than memlimit_stop, then the value + * of memlimit_stop will be used for both. + */ + uint64_t memlimit_threading; + + /** + * \brief Memory usage limit that should never be exceeded + * + * Encoder: Ignored. + * + * Decoder: If decompressing will need more than this amount of + * memory even in the single-threaded mode, then lzma_code() will + * return LZMA_MEMLIMIT_ERROR. + */ + uint64_t memlimit_stop; + + /** \private Reserved member. */ + uint64_t reserved_int7; + + /** \private Reserved member. */ + uint64_t reserved_int8; + + /** \private Reserved member. */ + void *reserved_ptr1; + + /** \private Reserved member. */ + void *reserved_ptr2; + + /** \private Reserved member. */ + void *reserved_ptr3; + + /** \private Reserved member. */ + void *reserved_ptr4; + +} lzma_mt; + + +/** + * \brief Calculate approximate memory usage of easy encoder + * + * This function is a wrapper for lzma_raw_encoder_memusage(). + * + * \param preset Compression preset (level and possible flags) + * + * \return Number of bytes of memory required for the given + * preset when encoding or UINT64_MAX on error. + */ +extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Calculate approximate decoder memory usage of a preset + * + * This function is a wrapper for lzma_raw_decoder_memusage(). + * + * \param preset Compression preset (level and possible flags) + * + * \return Number of bytes of memory required to decompress a file + * that was compressed using the given preset or UINT64_MAX + * on error. + */ +extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Initialize .xz Stream encoder using a preset number + * + * This function is intended for those who just want to use the basic features + * of liblzma (that is, most developers out there). + * + * If initialization fails (return value is not LZMA_OK), all the memory + * allocated for *strm by liblzma is always freed. Thus, there is no need + * to call lzma_end() after failed initialization. + * + * If initialization succeeds, use lzma_code() to do the actual encoding. + * Valid values for 'action' (the second argument of lzma_code()) are + * LZMA_RUN, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, and LZMA_FINISH. In future, + * there may be compression levels or flags that don't support LZMA_SYNC_FLUSH. + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + * \param preset Compression preset to use. A preset consist of level + * number and zero or more flags. Usually flags aren't + * used, so preset is simply a number [0, 9] which match + * the options -0 ... -9 of the xz command line tool. + * Additional flags can be be set using bitwise-or with + * the preset level number, e.g. 6 | LZMA_PRESET_EXTREME. + * \param check Integrity check type to use. See check.h for available + * checks. The xz command line tool defaults to + * LZMA_CHECK_CRC64, which is a good choice if you are + * unsure. LZMA_CHECK_CRC32 is good too as long as the + * uncompressed file is not many gigabytes. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Initialization succeeded. Use lzma_code() to + * encode your data. + * - LZMA_MEM_ERROR: Memory allocation failed. + * - LZMA_OPTIONS_ERROR: The given compression preset is not + * supported by this build of liblzma. + * - LZMA_UNSUPPORTED_CHECK: The given check type is not + * supported by this liblzma build. + * - LZMA_PROG_ERROR: One or more of the parameters have values + * that will never be valid. For example, strm == NULL. + */ +extern LZMA_API(lzma_ret) lzma_easy_encoder( + lzma_stream *strm, uint32_t preset, lzma_check check) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Single-call .xz Stream encoding using a preset number + * + * The maximum required output buffer size can be calculated with + * lzma_stream_buffer_bound(). + * + * \param preset Compression preset to use. See the description + * in lzma_easy_encoder(). + * \param check Type of the integrity check to calculate from + * uncompressed data. + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * \param in Beginning of the input buffer + * \param in_size Size of the input buffer + * \param[out] out Beginning of the output buffer + * \param[out] out_pos The next byte will be written to out[*out_pos]. + * *out_pos is updated only if encoding succeeds. + * \param out_size Size of the out buffer; the first byte into + * which no data is written to is out[out_size]. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Encoding was successful. + * - LZMA_BUF_ERROR: Not enough output buffer space. + * - LZMA_UNSUPPORTED_CHECK + * - LZMA_OPTIONS_ERROR + * - LZMA_MEM_ERROR + * - LZMA_DATA_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_easy_buffer_encode( + uint32_t preset, lzma_check check, + const lzma_allocator *allocator, + const uint8_t *in, size_t in_size, + uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow; + + +/** + * \brief Initialize .xz Stream encoder using a custom filter chain + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + * \param filters Array of filters terminated with + * .id == LZMA_VLI_UNKNOWN. See filters.h for more + * information. + * \param check Type of the integrity check to calculate from + * uncompressed data. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Initialization was successful. + * - LZMA_MEM_ERROR + * - LZMA_UNSUPPORTED_CHECK + * - LZMA_OPTIONS_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_stream_encoder(lzma_stream *strm, + const lzma_filter *filters, lzma_check check) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Calculate approximate memory usage of multithreaded .xz encoder + * + * Since doing the encoding in threaded mode doesn't affect the memory + * requirements of single-threaded decompressor, you can use + * lzma_easy_decoder_memusage(options->preset) or + * lzma_raw_decoder_memusage(options->filters) to calculate + * the decompressor memory requirements. + * + * \param options Compression options + * + * \return Number of bytes of memory required for encoding with the + * given options. If an error occurs, for example due to + * unsupported preset or filter chain, UINT64_MAX is returned. + */ +extern LZMA_API(uint64_t) lzma_stream_encoder_mt_memusage( + const lzma_mt *options) lzma_nothrow lzma_attr_pure; + + +/** + * \brief Initialize multithreaded .xz Stream encoder + * + * This provides the functionality of lzma_easy_encoder() and + * lzma_stream_encoder() as a single function for multithreaded use. + * + * The supported actions for lzma_code() are LZMA_RUN, LZMA_FULL_FLUSH, + * LZMA_FULL_BARRIER, and LZMA_FINISH. Support for LZMA_SYNC_FLUSH might be + * added in the future. + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + * \param options Pointer to multithreaded compression options + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_MEM_ERROR + * - LZMA_UNSUPPORTED_CHECK + * - LZMA_OPTIONS_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_stream_encoder_mt( + lzma_stream *strm, const lzma_mt *options) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Calculate recommended Block size for multithreaded .xz encoder + * + * This calculates a recommended Block size for multithreaded encoding given + * a filter chain. This is used internally by lzma_stream_encoder_mt() to + * determine the Block size if the block_size member is not set to the + * special value of 0 in the lzma_mt options struct. + * + * If one wishes to change the filters between Blocks, this function is + * helpful to set the block_size member of the lzma_mt struct before calling + * lzma_stream_encoder_mt(). Since the block_size member represents the + * maximum possible Block size for the multithreaded .xz encoder, one can + * use this function to find the maximum recommended Block size based on + * all planned filter chains. Otherwise, the multithreaded encoder will + * base its maximum Block size on the first filter chain used (if the + * block_size member is not set), which may unnecessarily limit the Block + * size for a later filter chain. + * + * \param filters Array of filters terminated with + * .id == LZMA_VLI_UNKNOWN. + * + * \return Recommended Block size in bytes, or UINT64_MAX if + * an error occurred. + */ +extern LZMA_API(uint64_t) lzma_mt_block_size(const lzma_filter *filters) + lzma_nothrow; + + +/** + * \brief Initialize .lzma encoder (legacy file format) + * + * The .lzma format is sometimes called the LZMA_Alone format, which is the + * reason for the name of this function. The .lzma format supports only the + * LZMA1 filter. There is no support for integrity checks like CRC32. + * + * Use this function if and only if you need to create files readable by + * legacy LZMA tools such as LZMA Utils 4.32.x. Moving to the .xz format + * is strongly recommended. + * + * The valid action values for lzma_code() are LZMA_RUN and LZMA_FINISH. + * No kind of flushing is supported, because the file format doesn't make + * it possible. + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + * \param options Pointer to encoder options + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_MEM_ERROR + * - LZMA_OPTIONS_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_alone_encoder( + lzma_stream *strm, const lzma_options_lzma *options) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Calculate output buffer size for single-call Stream encoder + * + * When trying to compress incompressible data, the encoded size will be + * slightly bigger than the input data. This function calculates how much + * output buffer space is required to be sure that lzma_stream_buffer_encode() + * doesn't return LZMA_BUF_ERROR. + * + * The calculated value is not exact, but it is guaranteed to be big enough. + * The actual maximum output space required may be slightly smaller (up to + * about 100 bytes). This should not be a problem in practice. + * + * If the calculated maximum size doesn't fit into size_t or would make the + * Stream grow past LZMA_VLI_MAX (which should never happen in practice), + * zero is returned to indicate the error. + * + * \note The limit calculated by this function applies only to + * single-call encoding. Multi-call encoding may (and probably + * will) have larger maximum expansion when encoding + * incompressible data. Currently there is no function to + * calculate the maximum expansion of multi-call encoding. + * + * \param uncompressed_size Size in bytes of the uncompressed + * input data + * + * \return Maximum number of bytes needed to store the compressed data. + */ +extern LZMA_API(size_t) lzma_stream_buffer_bound(size_t uncompressed_size) + lzma_nothrow; + + +/** + * \brief Single-call .xz Stream encoder + * + * \param filters Array of filters terminated with + * .id == LZMA_VLI_UNKNOWN. See filters.h for more + * information. + * \param check Type of the integrity check to calculate from + * uncompressed data. + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * \param in Beginning of the input buffer + * \param in_size Size of the input buffer + * \param[out] out Beginning of the output buffer + * \param[out] out_pos The next byte will be written to out[*out_pos]. + * *out_pos is updated only if encoding succeeds. + * \param out_size Size of the out buffer; the first byte into + * which no data is written to is out[out_size]. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Encoding was successful. + * - LZMA_BUF_ERROR: Not enough output buffer space. + * - LZMA_UNSUPPORTED_CHECK + * - LZMA_OPTIONS_ERROR + * - LZMA_MEM_ERROR + * - LZMA_DATA_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_stream_buffer_encode( + lzma_filter *filters, lzma_check check, + const lzma_allocator *allocator, + const uint8_t *in, size_t in_size, + uint8_t *out, size_t *out_pos, size_t out_size) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief MicroLZMA encoder + * + * The MicroLZMA format is a raw LZMA stream whose first byte (always 0x00) + * has been replaced with bitwise-negation of the LZMA properties (lc/lp/pb). + * This encoding ensures that the first byte of MicroLZMA stream is never + * 0x00. There is no end of payload marker and thus the uncompressed size + * must be stored separately. For the best error detection the dictionary + * size should be stored separately as well but alternatively one may use + * the uncompressed size as the dictionary size when decoding. + * + * With the MicroLZMA encoder, lzma_code() behaves slightly unusually. + * The action argument must be LZMA_FINISH and the return value will never be + * LZMA_OK. Thus the encoding is always done with a single lzma_code() after + * the initialization. The benefit of the combination of initialization + * function and lzma_code() is that memory allocations can be re-used for + * better performance. + * + * lzma_code() will try to encode as much input as is possible to fit into + * the given output buffer. If not all input can be encoded, the stream will + * be finished without encoding all the input. The caller must check both + * input and output buffer usage after lzma_code() (total_in and total_out + * in lzma_stream can be convenient). Often lzma_code() can fill the output + * buffer completely if there is a lot of input, but sometimes a few bytes + * may remain unused because the next LZMA symbol would require more space. + * + * lzma_stream.avail_out must be at least 6. Otherwise LZMA_PROG_ERROR + * will be returned. + * + * The LZMA dictionary should be reasonably low to speed up the encoder + * re-initialization. A good value is bigger than the resulting + * uncompressed size of most of the output chunks. For example, if output + * size is 4 KiB, dictionary size of 32 KiB or 64 KiB is good. If the + * data compresses extremely well, even 128 KiB may be useful. + * + * The MicroLZMA format and this encoder variant were made with the EROFS + * file system in mind. This format may be convenient in other embedded + * uses too where many small streams are needed. XZ Embedded includes a + * decoder for this format. + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + * \param options Pointer to encoder options + * + * \return Possible lzma_ret values: + * - LZMA_STREAM_END: All good. Check the amounts of input used + * and output produced. Store the amount of input used + * (uncompressed size) as it needs to be known to decompress + * the data. + * - LZMA_OPTIONS_ERROR + * - LZMA_MEM_ERROR + * - LZMA_PROG_ERROR: In addition to the generic reasons for this + * error code, this may also be returned if there isn't enough + * output space (6 bytes) to create a valid MicroLZMA stream. + */ +extern LZMA_API(lzma_ret) lzma_microlzma_encoder( + lzma_stream *strm, const lzma_options_lzma *options) + lzma_nothrow; + + +/************ + * Decoding * + ************/ + +/** + * This flag makes lzma_code() return LZMA_NO_CHECK if the input stream + * being decoded has no integrity check. Note that when used with + * lzma_auto_decoder(), all .lzma files will trigger LZMA_NO_CHECK + * if LZMA_TELL_NO_CHECK is used. + */ +#define LZMA_TELL_NO_CHECK UINT32_C(0x01) + + +/** + * This flag makes lzma_code() return LZMA_UNSUPPORTED_CHECK if the input + * stream has an integrity check, but the type of the integrity check is not + * supported by this liblzma version or build. Such files can still be + * decoded, but the integrity check cannot be verified. + */ +#define LZMA_TELL_UNSUPPORTED_CHECK UINT32_C(0x02) + + +/** + * This flag makes lzma_code() return LZMA_GET_CHECK as soon as the type + * of the integrity check is known. The type can then be got with + * lzma_get_check(). + */ +#define LZMA_TELL_ANY_CHECK UINT32_C(0x04) + + +/** + * This flag makes lzma_code() not calculate and verify the integrity check + * of the compressed data in .xz files. This means that invalid integrity + * check values won't be detected and LZMA_DATA_ERROR won't be returned in + * such cases. + * + * This flag only affects the checks of the compressed data itself; the CRC32 + * values in the .xz headers will still be verified normally. + * + * Don't use this flag unless you know what you are doing. Possible reasons + * to use this flag: + * + * - Trying to recover data from a corrupt .xz file. + * + * - Speeding up decompression, which matters mostly with SHA-256 + * or with files that have compressed extremely well. It's recommended + * to not use this flag for this purpose unless the file integrity is + * verified externally in some other way. + * + * Support for this flag was added in liblzma 5.1.4beta. + */ +#define LZMA_IGNORE_CHECK UINT32_C(0x10) + + +/** + * This flag enables decoding of concatenated files with file formats that + * allow concatenating compressed files as is. From the formats currently + * supported by liblzma, only the .xz and .lz formats allow concatenated + * files. Concatenated files are not allowed with the legacy .lzma format. + * + * This flag also affects the usage of the 'action' argument for lzma_code(). + * When LZMA_CONCATENATED is used, lzma_code() won't return LZMA_STREAM_END + * unless LZMA_FINISH is used as 'action'. Thus, the application has to set + * LZMA_FINISH in the same way as it does when encoding. + * + * If LZMA_CONCATENATED is not used, the decoders still accept LZMA_FINISH + * as 'action' for lzma_code(), but the usage of LZMA_FINISH isn't required. + */ +#define LZMA_CONCATENATED UINT32_C(0x08) + + +/** + * This flag makes the threaded decoder report errors (like LZMA_DATA_ERROR) + * as soon as they are detected. This saves time when the application has no + * interest in a partially decompressed truncated or corrupt file. Note that + * due to timing randomness, if the same truncated or corrupt input is + * decompressed multiple times with this flag, a different amount of output + * may be produced by different runs, and even the error code might vary. + * + * When using LZMA_FAIL_FAST, it is recommended to use LZMA_FINISH to tell + * the decoder when no more input will be coming because it can help fast + * detection and reporting of truncated files. Note that in this situation + * truncated files might be diagnosed with LZMA_DATA_ERROR instead of + * LZMA_OK or LZMA_BUF_ERROR! + * + * Without this flag the threaded decoder will provide as much output as + * possible at first and then report the pending error. This default behavior + * matches the single-threaded decoder and provides repeatable behavior + * with truncated or corrupt input. There are a few special cases where the + * behavior can still differ like memory allocation failures (LZMA_MEM_ERROR). + * + * Single-threaded decoders currently ignore this flag. + * + * Support for this flag was added in liblzma 5.3.3alpha. Note that in older + * versions this flag isn't supported (LZMA_OPTIONS_ERROR) even by functions + * that ignore this flag in newer liblzma versions. + */ +#define LZMA_FAIL_FAST UINT32_C(0x20) + + +/** + * \brief Initialize .xz Stream decoder + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + * \param memlimit Memory usage limit as bytes. Use UINT64_MAX + * to effectively disable the limiter. liblzma + * 5.2.3 and earlier don't allow 0 here and return + * LZMA_PROG_ERROR; later versions treat 0 as if 1 + * had been specified. + * \param flags Bitwise-or of zero or more of the decoder flags: + * LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, + * LZMA_TELL_ANY_CHECK, LZMA_IGNORE_CHECK, + * LZMA_CONCATENATED, LZMA_FAIL_FAST + * + * \return Possible lzma_ret values: + * - LZMA_OK: Initialization was successful. + * - LZMA_MEM_ERROR: Cannot allocate memory. + * - LZMA_OPTIONS_ERROR: Unsupported flags + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_stream_decoder( + lzma_stream *strm, uint64_t memlimit, uint32_t flags) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Initialize multithreaded .xz Stream decoder + * + * The decoder can decode multiple Blocks in parallel. This requires that each + * Block Header contains the Compressed Size and Uncompressed size fields + * which are added by the multi-threaded encoder, see lzma_stream_encoder_mt(). + * + * A Stream with one Block will only utilize one thread. A Stream with multiple + * Blocks but without size information in Block Headers will be processed in + * single-threaded mode in the same way as done by lzma_stream_decoder(). + * Concatenated Streams are processed one Stream at a time; no inter-Stream + * parallelization is done. + * + * This function behaves like lzma_stream_decoder() when options->threads == 1 + * and options->memlimit_threading <= 1. + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + * \param options Pointer to multithreaded compression options + * + * \return Possible lzma_ret values: + * - LZMA_OK: Initialization was successful. + * - LZMA_MEM_ERROR: Cannot allocate memory. + * - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached. + * - LZMA_OPTIONS_ERROR: Unsupported flags. + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_stream_decoder_mt( + lzma_stream *strm, const lzma_mt *options) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Decode .xz, .lzma, and .lz (lzip) files with autodetection + * + * This decoder autodetects between the .xz, .lzma, and .lz file formats, + * and calls lzma_stream_decoder(), lzma_alone_decoder(), or + * lzma_lzip_decoder() once the type of the input file has been detected. + * + * Support for .lz was added in 5.4.0. + * + * If the flag LZMA_CONCATENATED is used and the input is a .lzma file: + * For historical reasons concatenated .lzma files aren't supported. + * If there is trailing data after one .lzma stream, lzma_code() will + * return LZMA_DATA_ERROR. (lzma_alone_decoder() doesn't have such a check + * as it doesn't support any decoder flags. It will return LZMA_STREAM_END + * after one .lzma stream.) + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + * \param memlimit Memory usage limit as bytes. Use UINT64_MAX + * to effectively disable the limiter. liblzma + * 5.2.3 and earlier don't allow 0 here and return + * LZMA_PROG_ERROR; later versions treat 0 as if 1 + * had been specified. + * \param flags Bitwise-or of zero or more of the decoder flags: + * LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, + * LZMA_TELL_ANY_CHECK, LZMA_IGNORE_CHECK, + * LZMA_CONCATENATED, LZMA_FAIL_FAST + * + * \return Possible lzma_ret values: + * - LZMA_OK: Initialization was successful. + * - LZMA_MEM_ERROR: Cannot allocate memory. + * - LZMA_OPTIONS_ERROR: Unsupported flags + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_auto_decoder( + lzma_stream *strm, uint64_t memlimit, uint32_t flags) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Initialize .lzma decoder (legacy file format) + * + * Valid 'action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH. + * There is no need to use LZMA_FINISH, but it's allowed because it may + * simplify certain types of applications. + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + * \param memlimit Memory usage limit as bytes. Use UINT64_MAX + * to effectively disable the limiter. liblzma + * 5.2.3 and earlier don't allow 0 here and return + * LZMA_PROG_ERROR; later versions treat 0 as if 1 + * had been specified. + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_MEM_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_alone_decoder( + lzma_stream *strm, uint64_t memlimit) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Initialize .lz (lzip) decoder (a foreign file format) + * + * This decoder supports the .lz format version 0 and the unextended .lz + * format version 1: + * + * - Files in the format version 0 were produced by lzip 1.3 and older. + * Such files aren't common but may be found from file archives + * as a few source packages were released in this format. People + * might have old personal files in this format too. Decompression + * support for the format version 0 was removed in lzip 1.18. + * + * - lzip 1.3 added decompression support for .lz format version 1 files. + * Compression support was added in lzip 1.4. In lzip 1.6 the .lz format + * version 1 was extended to support the Sync Flush marker. This extension + * is not supported by liblzma. lzma_code() will return LZMA_DATA_ERROR + * at the location of the Sync Flush marker. In practice files with + * the Sync Flush marker are very rare and thus liblzma can decompress + * almost all .lz files. + * + * Just like with lzma_stream_decoder() for .xz files, LZMA_CONCATENATED + * should be used when decompressing normal standalone .lz files. + * + * The .lz format allows putting non-.lz data at the end of a file after at + * least one valid .lz member. That is, one can append custom data at the end + * of a .lz file and the decoder is required to ignore it. In liblzma this + * is relevant only when LZMA_CONCATENATED is used. In that case lzma_code() + * will return LZMA_STREAM_END and leave lzma_stream.next_in pointing to + * the first byte of the non-.lz data. An exception to this is if the first + * 1-3 bytes of the non-.lz data are identical to the .lz magic bytes + * (0x4C, 0x5A, 0x49, 0x50; "LZIP" in US-ASCII). In such a case the 1-3 bytes + * will have been ignored by lzma_code(). If one wishes to locate the non-.lz + * data reliably, one must ensure that the first byte isn't 0x4C. Actually + * one should ensure that none of the first four bytes of trailing data are + * equal to the magic bytes because lzip >= 1.20 requires it by default. + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + * \param memlimit Memory usage limit as bytes. Use UINT64_MAX + * to effectively disable the limiter. + * \param flags Bitwise-or of flags, or zero for no flags. + * All decoder flags listed above are supported + * although only LZMA_CONCATENATED and (in very rare + * cases) LZMA_IGNORE_CHECK are actually useful. + * LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, + * and LZMA_FAIL_FAST do nothing. LZMA_TELL_ANY_CHECK + * is supported for consistency only as CRC32 is + * always used in the .lz format. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Initialization was successful. + * - LZMA_MEM_ERROR: Cannot allocate memory. + * - LZMA_OPTIONS_ERROR: Unsupported flags + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_lzip_decoder( + lzma_stream *strm, uint64_t memlimit, uint32_t flags) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Single-call .xz Stream decoder + * + * \param memlimit Pointer to how much memory the decoder is allowed + * to allocate. The value pointed by this pointer is + * modified if and only if LZMA_MEMLIMIT_ERROR is + * returned. + * \param flags Bitwise-or of zero or more of the decoder flags: + * LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, + * LZMA_IGNORE_CHECK, LZMA_CONCATENATED, + * LZMA_FAIL_FAST. Note that LZMA_TELL_ANY_CHECK + * is not allowed and will return LZMA_PROG_ERROR. + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * \param in Beginning of the input buffer + * \param in_pos The next byte will be read from in[*in_pos]. + * *in_pos is updated only if decoding succeeds. + * \param in_size Size of the input buffer; the first byte that + * won't be read is in[in_size]. + * \param[out] out Beginning of the output buffer + * \param[out] out_pos The next byte will be written to out[*out_pos]. + * *out_pos is updated only if decoding succeeds. + * \param out_size Size of the out buffer; the first byte into + * which no data is written to is out[out_size]. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Decoding was successful. + * - LZMA_FORMAT_ERROR + * - LZMA_OPTIONS_ERROR + * - LZMA_DATA_ERROR + * - LZMA_NO_CHECK: This can be returned only if using + * the LZMA_TELL_NO_CHECK flag. + * - LZMA_UNSUPPORTED_CHECK: This can be returned only if using + * the LZMA_TELL_UNSUPPORTED_CHECK flag. + * - LZMA_MEM_ERROR + * - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached. + * The minimum required memlimit value was stored to *memlimit. + * - LZMA_BUF_ERROR: Output buffer was too small. + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_stream_buffer_decode( + uint64_t *memlimit, uint32_t flags, + const lzma_allocator *allocator, + const uint8_t *in, size_t *in_pos, size_t in_size, + uint8_t *out, size_t *out_pos, size_t out_size) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief MicroLZMA decoder + * + * See lzma_microlzma_encoder() for more information. + * + * The lzma_code() usage with this decoder is completely normal. The + * special behavior of lzma_code() applies to lzma_microlzma_encoder() only. + * + * \param strm Pointer to lzma_stream that is at least initialized + * with LZMA_STREAM_INIT. + * \param comp_size Compressed size of the MicroLZMA stream. + * The caller must somehow know this exactly. + * \param uncomp_size Uncompressed size of the MicroLZMA stream. + * If the exact uncompressed size isn't known, this + * can be set to a value that is at most as big as + * the exact uncompressed size would be, but then the + * next argument uncomp_size_is_exact must be false. + * \param uncomp_size_is_exact + * If true, uncomp_size must be exactly correct. + * This will improve error detection at the end of + * the stream. If the exact uncompressed size isn't + * known, this must be false. uncomp_size must still + * be at most as big as the exact uncompressed size + * is. Setting this to false when the exact size is + * known will work but error detection at the end of + * the stream will be weaker. + * \param dict_size LZMA dictionary size that was used when + * compressing the data. It is OK to use a bigger + * value too but liblzma will then allocate more + * memory than would actually be required and error + * detection will be slightly worse. (Note that with + * the implementation in XZ Embedded it doesn't + * affect the memory usage if one specifies bigger + * dictionary than actually required.) + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_MEM_ERROR + * - LZMA_OPTIONS_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_microlzma_decoder( + lzma_stream *strm, uint64_t comp_size, + uint64_t uncomp_size, lzma_bool uncomp_size_is_exact, + uint32_t dict_size) lzma_nothrow; diff --git a/vcpkg/installed/x64-osx/include/lzma/delta.h b/vcpkg/installed/x64-osx/include/lzma/delta.h new file mode 100644 index 0000000..5ebacef --- /dev/null +++ b/vcpkg/installed/x64-osx/include/lzma/delta.h @@ -0,0 +1,95 @@ +/* SPDX-License-Identifier: 0BSD */ + +/** + * \file lzma/delta.h + * \brief Delta filter + * \note Never include this file directly. Use instead. + */ + +/* + * Author: Lasse Collin + */ + +#ifndef LZMA_H_INTERNAL +# error Never include this file directly. Use instead. +#endif + + +/** + * \brief Filter ID + * + * Filter ID of the Delta filter. This is used as lzma_filter.id. + */ +#define LZMA_FILTER_DELTA LZMA_VLI_C(0x03) + + +/** + * \brief Type of the delta calculation + * + * Currently only byte-wise delta is supported. Other possible types could + * be, for example, delta of 16/32/64-bit little/big endian integers, but + * these are not currently planned since byte-wise delta is almost as good. + */ +typedef enum { + LZMA_DELTA_TYPE_BYTE +} lzma_delta_type; + + +/** + * \brief Options for the Delta filter + * + * These options are needed by both encoder and decoder. + */ +typedef struct { + /** For now, this must always be LZMA_DELTA_TYPE_BYTE. */ + lzma_delta_type type; + + /** + * \brief Delta distance + * + * With the only currently supported type, LZMA_DELTA_TYPE_BYTE, + * the distance is as bytes. + * + * Examples: + * - 16-bit stereo audio: distance = 4 bytes + * - 24-bit RGB image data: distance = 3 bytes + */ + uint32_t dist; + + /** + * \brief Minimum value for lzma_options_delta.dist. + */ +# define LZMA_DELTA_DIST_MIN 1 + + /** + * \brief Maximum value for lzma_options_delta.dist. + */ +# define LZMA_DELTA_DIST_MAX 256 + + /* + * Reserved space to allow possible future extensions without + * breaking the ABI. You should not touch these, because the names + * of these variables may change. These are and will never be used + * when type is LZMA_DELTA_TYPE_BYTE, so it is safe to leave these + * uninitialized. + */ + + /** \private Reserved member. */ + uint32_t reserved_int1; + + /** \private Reserved member. */ + uint32_t reserved_int2; + + /** \private Reserved member. */ + uint32_t reserved_int3; + + /** \private Reserved member. */ + uint32_t reserved_int4; + + /** \private Reserved member. */ + void *reserved_ptr1; + + /** \private Reserved member. */ + void *reserved_ptr2; + +} lzma_options_delta; diff --git a/vcpkg/installed/x64-osx/include/lzma/filter.h b/vcpkg/installed/x64-osx/include/lzma/filter.h new file mode 100644 index 0000000..e86809c --- /dev/null +++ b/vcpkg/installed/x64-osx/include/lzma/filter.h @@ -0,0 +1,769 @@ +/* SPDX-License-Identifier: 0BSD */ + +/** + * \file lzma/filter.h + * \brief Common filter related types and functions + * \note Never include this file directly. Use instead. + */ + +/* + * Author: Lasse Collin + */ + +#ifndef LZMA_H_INTERNAL +# error Never include this file directly. Use instead. +#endif + + +/** + * \brief Maximum number of filters in a chain + * + * A filter chain can have 1-4 filters, of which three are allowed to change + * the size of the data. Usually only one or two filters are needed. + */ +#define LZMA_FILTERS_MAX 4 + + +/** + * \brief Filter options + * + * This structure is used to pass a Filter ID and a pointer to the filter's + * options to liblzma. A few functions work with a single lzma_filter + * structure, while most functions expect a filter chain. + * + * A filter chain is indicated with an array of lzma_filter structures. + * The array is terminated with .id = LZMA_VLI_UNKNOWN. Thus, the filter + * array must have LZMA_FILTERS_MAX + 1 elements (that is, five) to + * be able to hold any arbitrary filter chain. This is important when + * using lzma_block_header_decode() from block.h, because a filter array + * that is too small would make liblzma write past the end of the array. + */ +typedef struct { + /** + * \brief Filter ID + * + * Use constants whose name begin with 'LZMA_FILTER_' to specify + * different filters. In an array of lzma_filter structures, use + * LZMA_VLI_UNKNOWN to indicate end of filters. + * + * \note This is not an enum, because on some systems enums + * cannot be 64-bit. + */ + lzma_vli id; + + /** + * \brief Pointer to filter-specific options structure + * + * If the filter doesn't need options, set this to NULL. If id is + * set to LZMA_VLI_UNKNOWN, options is ignored, and thus + * doesn't need be initialized. + */ + void *options; + +} lzma_filter; + + +/** + * \brief Test if the given Filter ID is supported for encoding + * + * \param id Filter ID + * + * \return lzma_bool: + * - true if the Filter ID is supported for encoding by this + * liblzma build. + * - false otherwise. + */ +extern LZMA_API(lzma_bool) lzma_filter_encoder_is_supported(lzma_vli id) + lzma_nothrow lzma_attr_const; + + +/** + * \brief Test if the given Filter ID is supported for decoding + * + * \param id Filter ID + * + * \return lzma_bool: + * - true if the Filter ID is supported for decoding by this + * liblzma build. + * - false otherwise. + */ +extern LZMA_API(lzma_bool) lzma_filter_decoder_is_supported(lzma_vli id) + lzma_nothrow lzma_attr_const; + + +/** + * \brief Copy the filters array + * + * Copy the Filter IDs and filter-specific options from src to dest. + * Up to LZMA_FILTERS_MAX filters are copied, plus the terminating + * .id == LZMA_VLI_UNKNOWN. Thus, dest should have at least + * LZMA_FILTERS_MAX + 1 elements space unless the caller knows that + * src is smaller than that. + * + * Unless the filter-specific options is NULL, the Filter ID has to be + * supported by liblzma, because liblzma needs to know the size of every + * filter-specific options structure. The filter-specific options are not + * validated. If options is NULL, any unsupported Filter IDs are copied + * without returning an error. + * + * Old filter-specific options in dest are not freed, so dest doesn't + * need to be initialized by the caller in any way. + * + * If an error occurs, memory possibly already allocated by this function + * is always freed. liblzma versions older than 5.2.7 may modify the dest + * array and leave its contents in an undefined state if an error occurs. + * liblzma 5.2.7 and newer only modify the dest array when returning LZMA_OK. + * + * \param src Array of filters terminated with + * .id == LZMA_VLI_UNKNOWN. + * \param[out] dest Destination filter array + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_MEM_ERROR + * - LZMA_OPTIONS_ERROR: Unsupported Filter ID and its options + * is not NULL. + * - LZMA_PROG_ERROR: src or dest is NULL. + */ +extern LZMA_API(lzma_ret) lzma_filters_copy( + const lzma_filter *src, lzma_filter *dest, + const lzma_allocator *allocator) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Free the options in the array of lzma_filter structures + * + * This frees the filter chain options. The filters array itself is not freed. + * + * The filters array must have at most LZMA_FILTERS_MAX + 1 elements + * including the terminating element which must have .id = LZMA_VLI_UNKNOWN. + * For all elements before the terminating element: + * - options will be freed using the given lzma_allocator or, + * if allocator is NULL, using free(). + * - options will be set to NULL. + * - id will be set to LZMA_VLI_UNKNOWN. + * + * If filters is NULL, this does nothing. Again, this never frees the + * filters array itself. + * + * \param filters Array of filters terminated with + * .id == LZMA_VLI_UNKNOWN. + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + */ +extern LZMA_API(void) lzma_filters_free( + lzma_filter *filters, const lzma_allocator *allocator) + lzma_nothrow; + + +/** + * \brief Calculate approximate memory requirements for raw encoder + * + * This function can be used to calculate the memory requirements for + * Block and Stream encoders too because Block and Stream encoders don't + * need significantly more memory than raw encoder. + * + * \param filters Array of filters terminated with + * .id == LZMA_VLI_UNKNOWN. + * + * \return Number of bytes of memory required for the given + * filter chain when encoding or UINT64_MAX on error. + */ +extern LZMA_API(uint64_t) lzma_raw_encoder_memusage(const lzma_filter *filters) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Calculate approximate memory requirements for raw decoder + * + * This function can be used to calculate the memory requirements for + * Block and Stream decoders too because Block and Stream decoders don't + * need significantly more memory than raw decoder. + * + * \param filters Array of filters terminated with + * .id == LZMA_VLI_UNKNOWN. + * + * \return Number of bytes of memory required for the given + * filter chain when decoding or UINT64_MAX on error. + */ +extern LZMA_API(uint64_t) lzma_raw_decoder_memusage(const lzma_filter *filters) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Initialize raw encoder + * + * This function may be useful when implementing custom file formats. + * + * The 'action' with lzma_code() can be LZMA_RUN, LZMA_SYNC_FLUSH (if the + * filter chain supports it), or LZMA_FINISH. + * + * \param strm Pointer to lzma_stream that is at least + * initialized with LZMA_STREAM_INIT. + * \param filters Array of filters terminated with + * .id == LZMA_VLI_UNKNOWN. + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_MEM_ERROR + * - LZMA_OPTIONS_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_raw_encoder( + lzma_stream *strm, const lzma_filter *filters) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Initialize raw decoder + * + * The initialization of raw decoder goes similarly to raw encoder. + * + * The 'action' with lzma_code() can be LZMA_RUN or LZMA_FINISH. Using + * LZMA_FINISH is not required, it is supported just for convenience. + * + * \param strm Pointer to lzma_stream that is at least + * initialized with LZMA_STREAM_INIT. + * \param filters Array of filters terminated with + * .id == LZMA_VLI_UNKNOWN. + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_MEM_ERROR + * - LZMA_OPTIONS_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_raw_decoder( + lzma_stream *strm, const lzma_filter *filters) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Update the filter chain in the encoder + * + * This function may be called after lzma_code() has returned LZMA_STREAM_END + * when LZMA_FULL_BARRIER, LZMA_FULL_FLUSH, or LZMA_SYNC_FLUSH was used: + * + * - After LZMA_FULL_BARRIER or LZMA_FULL_FLUSH: Single-threaded .xz Stream + * encoder (lzma_stream_encoder()) and (since liblzma 5.4.0) multi-threaded + * Stream encoder (lzma_stream_encoder_mt()) allow setting a new filter + * chain to be used for the next Block(s). + * + * - After LZMA_SYNC_FLUSH: Raw encoder (lzma_raw_encoder()), + * Block encoder (lzma_block_encoder()), and single-threaded .xz Stream + * encoder (lzma_stream_encoder()) allow changing certain filter-specific + * options in the middle of encoding. The actual filters in the chain + * (Filter IDs) must not be changed! Currently only the lc, lp, and pb + * options of LZMA2 (not LZMA1) can be changed this way. + * + * - In the future some filters might allow changing some of their options + * without any barrier or flushing but currently such filters don't exist. + * + * This function may also be called when no data has been compressed yet + * although this is rarely useful. In that case, this function will behave + * as if LZMA_FULL_FLUSH (Stream encoders) or LZMA_SYNC_FLUSH (Raw or Block + * encoder) had been used right before calling this function. + * + * \param strm Pointer to lzma_stream that is at least + * initialized with LZMA_STREAM_INIT. + * \param filters Array of filters terminated with + * .id == LZMA_VLI_UNKNOWN. + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_MEM_ERROR + * - LZMA_MEMLIMIT_ERROR + * - LZMA_OPTIONS_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_filters_update( + lzma_stream *strm, const lzma_filter *filters) lzma_nothrow; + + +/** + * \brief Single-call raw encoder + * + * \note There is no function to calculate how big output buffer + * would surely be big enough. (lzma_stream_buffer_bound() + * works only for lzma_stream_buffer_encode(); raw encoder + * won't necessarily meet that bound.) + * + * \param filters Array of filters terminated with + * .id == LZMA_VLI_UNKNOWN. + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * \param in Beginning of the input buffer + * \param in_size Size of the input buffer + * \param[out] out Beginning of the output buffer + * \param[out] out_pos The next byte will be written to out[*out_pos]. + * *out_pos is updated only if encoding succeeds. + * \param out_size Size of the out buffer; the first byte into + * which no data is written to is out[out_size]. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Encoding was successful. + * - LZMA_BUF_ERROR: Not enough output buffer space. + * - LZMA_OPTIONS_ERROR + * - LZMA_MEM_ERROR + * - LZMA_DATA_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_raw_buffer_encode( + const lzma_filter *filters, const lzma_allocator *allocator, + const uint8_t *in, size_t in_size, uint8_t *out, + size_t *out_pos, size_t out_size) lzma_nothrow; + + +/** + * \brief Single-call raw decoder + * + * \param filters Array of filters terminated with + * .id == LZMA_VLI_UNKNOWN. + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * \param in Beginning of the input buffer + * \param in_pos The next byte will be read from in[*in_pos]. + * *in_pos is updated only if decoding succeeds. + * \param in_size Size of the input buffer; the first byte that + * won't be read is in[in_size]. + * \param[out] out Beginning of the output buffer + * \param[out] out_pos The next byte will be written to out[*out_pos]. + * *out_pos is updated only if encoding succeeds. + * \param out_size Size of the out buffer; the first byte into + * which no data is written to is out[out_size]. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Decoding was successful. + * - LZMA_BUF_ERROR: Not enough output buffer space. + * - LZMA_OPTIONS_ERROR + * - LZMA_MEM_ERROR + * - LZMA_DATA_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_raw_buffer_decode( + const lzma_filter *filters, const lzma_allocator *allocator, + const uint8_t *in, size_t *in_pos, size_t in_size, + uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow; + + +/** + * \brief Get the size of the Filter Properties field + * + * This function may be useful when implementing custom file formats + * using the raw encoder and decoder. + * + * \note This function validates the Filter ID, but does not + * necessarily validate the options. Thus, it is possible + * that this returns LZMA_OK while the following call to + * lzma_properties_encode() returns LZMA_OPTIONS_ERROR. + * + * \param[out] size Pointer to uint32_t to hold the size of the properties + * \param filter Filter ID and options (the size of the properties may + * vary depending on the options) + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_OPTIONS_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_properties_size( + uint32_t *size, const lzma_filter *filter) lzma_nothrow; + + +/** + * \brief Encode the Filter Properties field + * + * \note Even this function won't validate more options than actually + * necessary. Thus, it is possible that encoding the properties + * succeeds but using the same options to initialize the encoder + * will fail. + * + * \note If lzma_properties_size() indicated that the size + * of the Filter Properties field is zero, calling + * lzma_properties_encode() is not required, but it + * won't do any harm either. + * + * \param filter Filter ID and options + * \param[out] props Buffer to hold the encoded options. The size of + * the buffer must have been already determined with + * lzma_properties_size(). + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_properties_encode( + const lzma_filter *filter, uint8_t *props) lzma_nothrow; + + +/** + * \brief Decode the Filter Properties field + * + * \param filter filter->id must have been set to the correct + * Filter ID. filter->options doesn't need to be + * initialized (it's not freed by this function). The + * decoded options will be stored in filter->options; + * it's application's responsibility to free it when + * appropriate. filter->options is set to NULL if + * there are no properties or if an error occurs. + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * and in case of an error, also free(). + * \param props Input buffer containing the properties. + * \param props_size Size of the properties. This must be the exact + * size; giving too much or too little input will + * return LZMA_OPTIONS_ERROR. + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_OPTIONS_ERROR + * - LZMA_MEM_ERROR + */ +extern LZMA_API(lzma_ret) lzma_properties_decode( + lzma_filter *filter, const lzma_allocator *allocator, + const uint8_t *props, size_t props_size) lzma_nothrow; + + +/** + * \brief Calculate encoded size of a Filter Flags field + * + * Knowing the size of Filter Flags is useful to know when allocating + * memory to hold the encoded Filter Flags. + * + * \note If you need to calculate size of List of Filter Flags, + * you need to loop over every lzma_filter entry. + * + * \param[out] size Pointer to integer to hold the calculated size + * \param filter Filter ID and associated options whose encoded + * size is to be calculated + * + * \return Possible lzma_ret values: + * - LZMA_OK: *size set successfully. Note that this doesn't + * guarantee that filter->options is valid, thus + * lzma_filter_flags_encode() may still fail. + * - LZMA_OPTIONS_ERROR: Unknown Filter ID or unsupported options. + * - LZMA_PROG_ERROR: Invalid options + */ +extern LZMA_API(lzma_ret) lzma_filter_flags_size( + uint32_t *size, const lzma_filter *filter) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Encode Filter Flags into given buffer + * + * In contrast to some functions, this doesn't allocate the needed buffer. + * This is due to how this function is used internally by liblzma. + * + * \param filter Filter ID and options to be encoded + * \param[out] out Beginning of the output buffer + * \param[out] out_pos out[*out_pos] is the next write position. This + * is updated by the encoder. + * \param out_size out[out_size] is the first byte to not write. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Encoding was successful. + * - LZMA_OPTIONS_ERROR: Invalid or unsupported options. + * - LZMA_PROG_ERROR: Invalid options or not enough output + * buffer space (you should have checked it with + * lzma_filter_flags_size()). + */ +extern LZMA_API(lzma_ret) lzma_filter_flags_encode(const lzma_filter *filter, + uint8_t *out, size_t *out_pos, size_t out_size) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Decode Filter Flags from given buffer + * + * The decoded result is stored into *filter. The old value of + * filter->options is not free()d. If anything other than LZMA_OK + * is returned, filter->options is set to NULL. + * + * \param[out] filter Destination filter. The decoded Filter ID will + * be stored in filter->id. If options are needed + * they will be allocated and the pointer will be + * stored in filter->options. + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * \param in Beginning of the input buffer + * \param[out] in_pos The next byte will be read from in[*in_pos]. + * *in_pos is updated only if decoding succeeds. + * \param in_size Size of the input buffer; the first byte that + * won't be read is in[in_size]. + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_OPTIONS_ERROR + * - LZMA_MEM_ERROR + * - LZMA_DATA_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_filter_flags_decode( + lzma_filter *filter, const lzma_allocator *allocator, + const uint8_t *in, size_t *in_pos, size_t in_size) + lzma_nothrow lzma_attr_warn_unused_result; + + +/*********** + * Strings * + ***********/ + +/** + * \brief Allow or show all filters + * + * By default only the filters supported in the .xz format are accept by + * lzma_str_to_filters() or shown by lzma_str_list_filters(). + */ +#define LZMA_STR_ALL_FILTERS UINT32_C(0x01) + + +/** + * \brief Do not validate the filter chain in lzma_str_to_filters() + * + * By default lzma_str_to_filters() can return an error if the filter chain + * as a whole isn't usable in the .xz format or in the raw encoder or decoder. + * With this flag, this validation is skipped. This flag doesn't affect the + * handling of the individual filter options. To allow non-.xz filters also + * LZMA_STR_ALL_FILTERS is needed. + */ +#define LZMA_STR_NO_VALIDATION UINT32_C(0x02) + + +/** + * \brief Stringify encoder options + * + * Show the filter-specific options that the encoder will use. + * This may be useful for verbose diagnostic messages. + * + * Note that if options were decoded from .xz headers then the encoder options + * may be undefined. This flag shouldn't be used in such a situation. + */ +#define LZMA_STR_ENCODER UINT32_C(0x10) + + +/** + * \brief Stringify decoder options + * + * Show the filter-specific options that the decoder will use. + * This may be useful for showing what filter options were decoded + * from file headers. + */ +#define LZMA_STR_DECODER UINT32_C(0x20) + + +/** + * \brief Produce xz-compatible getopt_long() syntax + * + * That is, "delta:dist=2 lzma2:dict=4MiB,pb=1,lp=1" becomes + * "--delta=dist=2 --lzma2=dict=4MiB,pb=1,lp=1". + * + * This syntax is compatible with xz 5.0.0 as long as the filters and + * their options are supported too. + */ +#define LZMA_STR_GETOPT_LONG UINT32_C(0x40) + + +/** + * \brief Use two dashes "--" instead of a space to separate filters + * + * That is, "delta:dist=2 lzma2:pb=1,lp=1" becomes + * "delta:dist=2--lzma2:pb=1,lp=1". This looks slightly odd but this + * kind of strings should be usable on the command line without quoting. + * However, it is possible that future versions with new filter options + * might produce strings that require shell quoting anyway as the exact + * set of possible characters isn't frozen for now. + * + * It is guaranteed that the single quote (') will never be used in + * filter chain strings (even if LZMA_STR_NO_SPACES isn't used). + */ +#define LZMA_STR_NO_SPACES UINT32_C(0x80) + + +/** + * \brief Convert a string to a filter chain + * + * This tries to make it easier to write applications that allow users + * to set custom compression options. This only handles the filter + * configuration (including presets) but not the number of threads, + * block size, check type, or memory limits. + * + * The input string can be either a preset or a filter chain. Presets + * begin with a digit 0-9 and may be followed by zero or more flags + * which are lower-case letters. Currently only "e" is supported, matching + * LZMA_PRESET_EXTREME. For partial xz command line syntax compatibility, + * a preset string may start with a single dash "-". + * + * A filter chain consists of one or more "filtername:opt1=value1,opt2=value2" + * strings separated by one or more spaces. Leading and trailing spaces are + * ignored. All names and values must be lower-case. Extra commas in the + * option list are ignored. The order of filters is significant: when + * encoding, the uncompressed input data goes to the leftmost filter first. + * Normally "lzma2" is the last filter in the chain. + * + * If one wishes to avoid spaces, for example, to avoid shell quoting, + * it is possible to use two dashes "--" instead of spaces to separate + * the filters. + * + * For xz command line compatibility, each filter may be prefixed with + * two dashes "--" and the colon ":" separating the filter name from + * the options may be replaced with an equals sign "=". + * + * By default, only filters that can be used in the .xz format are accepted. + * To allow all filters (LZMA1) use the flag LZMA_STR_ALL_FILTERS. + * + * By default, very basic validation is done for the filter chain as a whole, + * for example, that LZMA2 is only used as the last filter in the chain. + * The validation isn't perfect though and it's possible that this function + * succeeds but using the filter chain for encoding or decoding will still + * result in LZMA_OPTIONS_ERROR. To disable this validation, use the flag + * LZMA_STR_NO_VALIDATION. + * + * The available filter names and their options are available via + * lzma_str_list_filters(). See the xz man page for the description + * of filter names and options. + * + * For command line applications, below is an example how an error message + * can be displayed. Note the use of an empty string for the field width. + * If "^" was used there it would create an off-by-one error except at + * the very beginning of the line. + * + * \code{.c} + * const char *str = ...; // From user + * lzma_filter filters[LZMA_FILTERS_MAX + 1]; + * int pos; + * const char *msg = lzma_str_to_filters(str, &pos, filters, 0, NULL); + * if (msg != NULL) { + * printf("%s: Error in XZ compression options:\n", argv[0]); + * printf("%s: %s\n", argv[0], str); + * printf("%s: %*s^\n", argv[0], errpos, ""); + * printf("%s: %s\n", argv[0], msg); + * } + * \endcode + * + * \param str User-supplied string describing a preset or + * a filter chain. If a default value is needed and + * you don't know what would be good, use "6" since + * that is the default preset in xz too. + * \param[out] error_pos If this isn't NULL, this value will be set on + * both success and on all errors. This tells the + * location of the error in the string. This is + * an int to make it straightforward to use this + * as printf() field width. The value is guaranteed + * to be in the range [0, INT_MAX] even if strlen(str) + * somehow was greater than INT_MAX. + * \param[out] filters An array of lzma_filter structures. There must + * be LZMA_FILTERS_MAX + 1 (that is, five) elements + * in the array. The old contents are ignored so it + * doesn't need to be initialized. This array is + * modified only if this function returns NULL. + * Once the allocated filter options are no longer + * needed, lzma_filters_free() can be used to free the + * options (it doesn't free the filters array itself). + * \param flags Bitwise-or of zero or more of the flags + * LZMA_STR_ALL_FILTERS and LZMA_STR_NO_VALIDATION. + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * + * \return On success, NULL is returned. On error, a statically-allocated + * error message is returned which together with the error_pos + * should give some idea what is wrong. + */ +extern LZMA_API(const char *) lzma_str_to_filters( + const char *str, int *error_pos, lzma_filter *filters, + uint32_t flags, const lzma_allocator *allocator) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Convert a filter chain to a string + * + * Use cases: + * + * - Verbose output showing the full encoder options to the user + * (use LZMA_STR_ENCODER in flags) + * + * - Showing the filters and options that are required to decode a file + * (use LZMA_STR_DECODER in flags) + * + * - Showing the filter names without any options in informational messages + * where the technical details aren't important (no flags). In this case + * the .options in the filters array are ignored and may be NULL even if + * a filter has a mandatory options structure. + * + * Note that even if the filter chain was specified using a preset, + * the resulting filter chain isn't reversed to a preset. So if you + * specify "6" to lzma_str_to_filters() then lzma_str_from_filters() + * will produce a string containing "lzma2". + * + * \param[out] str On success *str will be set to point to an + * allocated string describing the given filter + * chain. Old value is ignored. On error *str is + * always set to NULL. + * \param filters Array of filters terminated with + * .id == LZMA_VLI_UNKNOWN. + * \param flags Bitwise-or of zero or more of the flags + * LZMA_STR_ENCODER, LZMA_STR_DECODER, + * LZMA_STR_GETOPT_LONG, and LZMA_STR_NO_SPACES. + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_OPTIONS_ERROR: Empty filter chain + * (filters[0].id == LZMA_VLI_UNKNOWN) or the filter chain + * includes a Filter ID that is not supported by this function. + * - LZMA_MEM_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_str_from_filters( + char **str, const lzma_filter *filters, uint32_t flags, + const lzma_allocator *allocator) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief List available filters and/or their options (for help message) + * + * If a filter_id is given then only one line is created which contains the + * filter name. If LZMA_STR_ENCODER or LZMA_STR_DECODER is used then the + * options read by the encoder or decoder are printed on the same line. + * + * If filter_id is LZMA_VLI_UNKNOWN then all supported .xz-compatible filters + * are listed: + * + * - If neither LZMA_STR_ENCODER nor LZMA_STR_DECODER is used then + * the supported filter names are listed on a single line separated + * by spaces. + * + * - If LZMA_STR_ENCODER or LZMA_STR_DECODER is used then filters and + * the supported options are listed one filter per line. There won't + * be a newline after the last filter. + * + * - If LZMA_STR_ALL_FILTERS is used then the list will include also + * those filters that cannot be used in the .xz format (LZMA1). + * + * \param str On success *str will be set to point to an + * allocated string listing the filters and options. + * Old value is ignored. On error *str is always set + * to NULL. + * \param filter_id Filter ID or LZMA_VLI_UNKNOWN. + * \param flags Bitwise-or of zero or more of the flags + * LZMA_STR_ALL_FILTERS, LZMA_STR_ENCODER, + * LZMA_STR_DECODER, and LZMA_STR_GETOPT_LONG. + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_OPTIONS_ERROR: Unsupported filter_id or flags + * - LZMA_MEM_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_str_list_filters( + char **str, lzma_vli filter_id, uint32_t flags, + const lzma_allocator *allocator) + lzma_nothrow lzma_attr_warn_unused_result; diff --git a/vcpkg/installed/x64-osx/include/lzma/hardware.h b/vcpkg/installed/x64-osx/include/lzma/hardware.h new file mode 100644 index 0000000..7a1a84f --- /dev/null +++ b/vcpkg/installed/x64-osx/include/lzma/hardware.h @@ -0,0 +1,62 @@ +/* SPDX-License-Identifier: 0BSD */ + +/** + * \file lzma/hardware.h + * \brief Hardware information + * \note Never include this file directly. Use instead. + * + * Since liblzma can consume a lot of system resources, it also provides + * ways to limit the resource usage. Applications linking against liblzma + * need to do the actual decisions how much resources to let liblzma to use. + * To ease making these decisions, liblzma provides functions to find out + * the relevant capabilities of the underlying hardware. Currently there + * is only a function to find out the amount of RAM, but in the future there + * will be also a function to detect how many concurrent threads the system + * can run. + * + * \note On some operating systems, these function may temporarily + * load a shared library or open file descriptor(s) to find out + * the requested hardware information. Unless the application + * assumes that specific file descriptors are not touched by + * other threads, this should have no effect on thread safety. + * Possible operations involving file descriptors will restart + * the syscalls if they return EINTR. + */ + +/* + * Author: Lasse Collin + */ + +#ifndef LZMA_H_INTERNAL +# error Never include this file directly. Use instead. +#endif + + +/** + * \brief Get the total amount of physical memory (RAM) in bytes + * + * This function may be useful when determining a reasonable memory + * usage limit for decompressing or how much memory it is OK to use + * for compressing. + * + * \return On success, the total amount of physical memory in bytes + * is returned. If the amount of RAM cannot be determined, + * zero is returned. This can happen if an error occurs + * or if there is no code in liblzma to detect the amount + * of RAM on the specific operating system. + */ +extern LZMA_API(uint64_t) lzma_physmem(void) lzma_nothrow; + + +/** + * \brief Get the number of processor cores or threads + * + * This function may be useful when determining how many threads to use. + * If the hardware supports more than one thread per CPU core, the number + * of hardware threads is returned if that information is available. + * + * \return On success, the number of available CPU threads or cores is + * returned. If this information isn't available or an error + * occurs, zero is returned. + */ +extern LZMA_API(uint32_t) lzma_cputhreads(void) lzma_nothrow; diff --git a/vcpkg/installed/x64-osx/include/lzma/index.h b/vcpkg/installed/x64-osx/include/lzma/index.h new file mode 100644 index 0000000..b17025e --- /dev/null +++ b/vcpkg/installed/x64-osx/include/lzma/index.h @@ -0,0 +1,882 @@ +/* SPDX-License-Identifier: 0BSD */ + +/** + * \file lzma/index.h + * \brief Handling of .xz Index and related information + * \note Never include this file directly. Use instead. + */ + +/* + * Author: Lasse Collin + */ + +#ifndef LZMA_H_INTERNAL +# error Never include this file directly. Use instead. +#endif + + +/** + * \brief Opaque data type to hold the Index(es) and other information + * + * lzma_index often holds just one .xz Index and possibly the Stream Flags + * of the same Stream and size of the Stream Padding field. However, + * multiple lzma_indexes can be concatenated with lzma_index_cat() and then + * there may be information about multiple Streams in the same lzma_index. + * + * Notes about thread safety: Only one thread may modify lzma_index at + * a time. All functions that take non-const pointer to lzma_index + * modify it. As long as no thread is modifying the lzma_index, getting + * information from the same lzma_index can be done from multiple threads + * at the same time with functions that take a const pointer to + * lzma_index or use lzma_index_iter. The same iterator must be used + * only by one thread at a time, of course, but there can be as many + * iterators for the same lzma_index as needed. + */ +typedef struct lzma_index_s lzma_index; + + +/** + * \brief Iterator to get information about Blocks and Streams + */ +typedef struct { + struct { + /** + * \brief Pointer to Stream Flags + * + * This is NULL if Stream Flags have not been set for + * this Stream with lzma_index_stream_flags(). + */ + const lzma_stream_flags *flags; + + /** \private Reserved member. */ + const void *reserved_ptr1; + + /** \private Reserved member. */ + const void *reserved_ptr2; + + /** \private Reserved member. */ + const void *reserved_ptr3; + + /** + * \brief Stream number in the lzma_index + * + * The first Stream is 1. + */ + lzma_vli number; + + /** + * \brief Number of Blocks in the Stream + * + * If this is zero, the block structure below has + * undefined values. + */ + lzma_vli block_count; + + /** + * \brief Compressed start offset of this Stream + * + * The offset is relative to the beginning of the lzma_index + * (i.e. usually the beginning of the .xz file). + */ + lzma_vli compressed_offset; + + /** + * \brief Uncompressed start offset of this Stream + * + * The offset is relative to the beginning of the lzma_index + * (i.e. usually the beginning of the .xz file). + */ + lzma_vli uncompressed_offset; + + /** + * \brief Compressed size of this Stream + * + * This includes all headers except the possible + * Stream Padding after this Stream. + */ + lzma_vli compressed_size; + + /** + * \brief Uncompressed size of this Stream + */ + lzma_vli uncompressed_size; + + /** + * \brief Size of Stream Padding after this Stream + * + * If it hasn't been set with lzma_index_stream_padding(), + * this defaults to zero. Stream Padding is always + * a multiple of four bytes. + */ + lzma_vli padding; + + + /** \private Reserved member. */ + lzma_vli reserved_vli1; + + /** \private Reserved member. */ + lzma_vli reserved_vli2; + + /** \private Reserved member. */ + lzma_vli reserved_vli3; + + /** \private Reserved member. */ + lzma_vli reserved_vli4; + } stream; + + struct { + /** + * \brief Block number in the file + * + * The first Block is 1. + */ + lzma_vli number_in_file; + + /** + * \brief Compressed start offset of this Block + * + * This offset is relative to the beginning of the + * lzma_index (i.e. usually the beginning of the .xz file). + * Normally this is where you should seek in the .xz file + * to start decompressing this Block. + */ + lzma_vli compressed_file_offset; + + /** + * \brief Uncompressed start offset of this Block + * + * This offset is relative to the beginning of the lzma_index + * (i.e. usually the beginning of the .xz file). + * + * When doing random-access reading, it is possible that + * the target offset is not exactly at Block boundary. One + * will need to compare the target offset against + * uncompressed_file_offset or uncompressed_stream_offset, + * and possibly decode and throw away some amount of data + * before reaching the target offset. + */ + lzma_vli uncompressed_file_offset; + + /** + * \brief Block number in this Stream + * + * The first Block is 1. + */ + lzma_vli number_in_stream; + + /** + * \brief Compressed start offset of this Block + * + * This offset is relative to the beginning of the Stream + * containing this Block. + */ + lzma_vli compressed_stream_offset; + + /** + * \brief Uncompressed start offset of this Block + * + * This offset is relative to the beginning of the Stream + * containing this Block. + */ + lzma_vli uncompressed_stream_offset; + + /** + * \brief Uncompressed size of this Block + * + * You should pass this to the Block decoder if you will + * decode this Block. It will allow the Block decoder to + * validate the uncompressed size. + */ + lzma_vli uncompressed_size; + + /** + * \brief Unpadded size of this Block + * + * You should pass this to the Block decoder if you will + * decode this Block. It will allow the Block decoder to + * validate the unpadded size. + */ + lzma_vli unpadded_size; + + /** + * \brief Total compressed size + * + * This includes all headers and padding in this Block. + * This is useful if you need to know how many bytes + * the Block decoder will actually read. + */ + lzma_vli total_size; + + /** \private Reserved member. */ + lzma_vli reserved_vli1; + + /** \private Reserved member. */ + lzma_vli reserved_vli2; + + /** \private Reserved member. */ + lzma_vli reserved_vli3; + + /** \private Reserved member. */ + lzma_vli reserved_vli4; + + /** \private Reserved member. */ + const void *reserved_ptr1; + + /** \private Reserved member. */ + const void *reserved_ptr2; + + /** \private Reserved member. */ + const void *reserved_ptr3; + + /** \private Reserved member. */ + const void *reserved_ptr4; + } block; + + /** + * \private Internal data + * + * Internal data which is used to store the state of the iterator. + * The exact format may vary between liblzma versions, so don't + * touch these in any way. + */ + union { + /** \private Internal member. */ + const void *p; + + /** \private Internal member. */ + size_t s; + + /** \private Internal member. */ + lzma_vli v; + } internal[6]; +} lzma_index_iter; + + +/** + * \brief Operation mode for lzma_index_iter_next() + */ +typedef enum { + LZMA_INDEX_ITER_ANY = 0, + /**< + * \brief Get the next Block or Stream + * + * Go to the next Block if the current Stream has at least + * one Block left. Otherwise go to the next Stream even if + * it has no Blocks. If the Stream has no Blocks + * (lzma_index_iter.stream.block_count == 0), + * lzma_index_iter.block will have undefined values. + */ + + LZMA_INDEX_ITER_STREAM = 1, + /**< + * \brief Get the next Stream + * + * Go to the next Stream even if the current Stream has + * unread Blocks left. If the next Stream has at least one + * Block, the iterator will point to the first Block. + * If there are no Blocks, lzma_index_iter.block will have + * undefined values. + */ + + LZMA_INDEX_ITER_BLOCK = 2, + /**< + * \brief Get the next Block + * + * Go to the next Block if the current Stream has at least + * one Block left. If the current Stream has no Blocks left, + * the next Stream with at least one Block is located and + * the iterator will be made to point to the first Block of + * that Stream. + */ + + LZMA_INDEX_ITER_NONEMPTY_BLOCK = 3 + /**< + * \brief Get the next non-empty Block + * + * This is like LZMA_INDEX_ITER_BLOCK except that it will + * skip Blocks whose Uncompressed Size is zero. + */ + +} lzma_index_iter_mode; + + +/** + * \brief Mask for return value from lzma_index_checks() for check none + * + * \note This and the other CHECK_MASK macros were added in 5.5.1alpha. + */ +#define LZMA_INDEX_CHECK_MASK_NONE (UINT32_C(1) << LZMA_CHECK_NONE) + +/** + * \brief Mask for return value from lzma_index_checks() for check CRC32 + */ +#define LZMA_INDEX_CHECK_MASK_CRC32 (UINT32_C(1) << LZMA_CHECK_CRC32) + +/** + * \brief Mask for return value from lzma_index_checks() for check CRC64 + */ +#define LZMA_INDEX_CHECK_MASK_CRC64 (UINT32_C(1) << LZMA_CHECK_CRC64) + +/** + * \brief Mask for return value from lzma_index_checks() for check SHA256 + */ +#define LZMA_INDEX_CHECK_MASK_SHA256 (UINT32_C(1) << LZMA_CHECK_SHA256) + +/** + * \brief Calculate memory usage of lzma_index + * + * On disk, the size of the Index field depends on both the number of Records + * stored and the size of the Records (due to variable-length integer + * encoding). When the Index is kept in lzma_index structure, the memory usage + * depends only on the number of Records/Blocks stored in the Index(es), and + * in case of concatenated lzma_indexes, the number of Streams. The size in + * RAM is almost always significantly bigger than in the encoded form on disk. + * + * This function calculates an approximate amount of memory needed to hold + * the given number of Streams and Blocks in lzma_index structure. This + * value may vary between CPU architectures and also between liblzma versions + * if the internal implementation is modified. + * + * \param streams Number of Streams + * \param blocks Number of Blocks + * + * \return Approximate memory in bytes needed in a lzma_index structure. + */ +extern LZMA_API(uint64_t) lzma_index_memusage( + lzma_vli streams, lzma_vli blocks) lzma_nothrow; + + +/** + * \brief Calculate the memory usage of an existing lzma_index + * + * This is a shorthand for lzma_index_memusage(lzma_index_stream_count(i), + * lzma_index_block_count(i)). + * + * \param i Pointer to lzma_index structure + * + * \return Approximate memory in bytes used by the lzma_index structure. + */ +extern LZMA_API(uint64_t) lzma_index_memused(const lzma_index *i) + lzma_nothrow; + + +/** + * \brief Allocate and initialize a new lzma_index structure + * + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * + * \return On success, a pointer to an empty initialized lzma_index is + * returned. If allocation fails, NULL is returned. + */ +extern LZMA_API(lzma_index *) lzma_index_init(const lzma_allocator *allocator) + lzma_nothrow; + + +/** + * \brief Deallocate lzma_index + * + * If i is NULL, this does nothing. + * + * \param i Pointer to lzma_index structure to deallocate + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + */ +extern LZMA_API(void) lzma_index_end( + lzma_index *i, const lzma_allocator *allocator) lzma_nothrow; + + +/** + * \brief Add a new Block to lzma_index + * + * \param i Pointer to a lzma_index structure + * \param allocator lzma_allocator for custom allocator + * functions. Set to NULL to use malloc() + * and free(). + * \param unpadded_size Unpadded Size of a Block. This can be + * calculated with lzma_block_unpadded_size() + * after encoding or decoding the Block. + * \param uncompressed_size Uncompressed Size of a Block. This can be + * taken directly from lzma_block structure + * after encoding or decoding the Block. + * + * Appending a new Block does not invalidate iterators. For example, + * if an iterator was pointing to the end of the lzma_index, after + * lzma_index_append() it is possible to read the next Block with + * an existing iterator. + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_MEM_ERROR + * - LZMA_DATA_ERROR: Compressed or uncompressed size of the + * Stream or size of the Index field would grow too big. + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_index_append( + lzma_index *i, const lzma_allocator *allocator, + lzma_vli unpadded_size, lzma_vli uncompressed_size) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Set the Stream Flags + * + * Set the Stream Flags of the last (and typically the only) Stream + * in lzma_index. This can be useful when reading information from the + * lzma_index, because to decode Blocks, knowing the integrity check type + * is needed. + * + * \param i Pointer to lzma_index structure + * \param stream_flags Pointer to lzma_stream_flags structure. This + * is copied into the internal preallocated + * structure, so the caller doesn't need to keep + * the flags' data available after calling this + * function. + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_OPTIONS_ERROR: Unsupported stream_flags->version. + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_index_stream_flags( + lzma_index *i, const lzma_stream_flags *stream_flags) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Get the types of integrity Checks + * + * If lzma_index_stream_flags() is used to set the Stream Flags for + * every Stream, lzma_index_checks() can be used to get a bitmask to + * indicate which Check types have been used. It can be useful e.g. if + * showing the Check types to the user. + * + * The bitmask is 1 << check_id, e.g. CRC32 is 1 << 1 and SHA-256 is 1 << 10. + * These masks are defined for convenience as LZMA_INDEX_CHECK_MASK_XXX + * + * \param i Pointer to lzma_index structure + * + * \return Bitmask indicating which Check types are used in the lzma_index + */ +extern LZMA_API(uint32_t) lzma_index_checks(const lzma_index *i) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Set the amount of Stream Padding + * + * Set the amount of Stream Padding of the last (and typically the only) + * Stream in the lzma_index. This is needed when planning to do random-access + * reading within multiple concatenated Streams. + * + * By default, the amount of Stream Padding is assumed to be zero bytes. + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_DATA_ERROR: The file size would grow too big. + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_index_stream_padding( + lzma_index *i, lzma_vli stream_padding) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Get the number of Streams + * + * \param i Pointer to lzma_index structure + * + * \return Number of Streams in the lzma_index + */ +extern LZMA_API(lzma_vli) lzma_index_stream_count(const lzma_index *i) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Get the number of Blocks + * + * This returns the total number of Blocks in lzma_index. To get number + * of Blocks in individual Streams, use lzma_index_iter. + * + * \param i Pointer to lzma_index structure + * + * \return Number of blocks in the lzma_index + */ +extern LZMA_API(lzma_vli) lzma_index_block_count(const lzma_index *i) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Get the size of the Index field as bytes + * + * This is needed to verify the Backward Size field in the Stream Footer. + * + * \param i Pointer to lzma_index structure + * + * \return Size in bytes of the Index + */ +extern LZMA_API(lzma_vli) lzma_index_size(const lzma_index *i) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Get the total size of the Stream + * + * If multiple lzma_indexes have been combined, this works as if the Blocks + * were in a single Stream. This is useful if you are going to combine + * Blocks from multiple Streams into a single new Stream. + * + * \param i Pointer to lzma_index structure + * + * \return Size in bytes of the Stream (if all Blocks are combined + * into one Stream). + */ +extern LZMA_API(lzma_vli) lzma_index_stream_size(const lzma_index *i) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Get the total size of the Blocks + * + * This doesn't include the Stream Header, Stream Footer, Stream Padding, + * or Index fields. + * + * \param i Pointer to lzma_index structure + * + * \return Size in bytes of all Blocks in the Stream(s) + */ +extern LZMA_API(lzma_vli) lzma_index_total_size(const lzma_index *i) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Get the total size of the file + * + * When no lzma_indexes have been combined with lzma_index_cat() and there is + * no Stream Padding, this function is identical to lzma_index_stream_size(). + * If multiple lzma_indexes have been combined, this includes also the headers + * of each separate Stream and the possible Stream Padding fields. + * + * \param i Pointer to lzma_index structure + * + * \return Total size of the .xz file in bytes + */ +extern LZMA_API(lzma_vli) lzma_index_file_size(const lzma_index *i) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Get the uncompressed size of the file + * + * \param i Pointer to lzma_index structure + * + * \return Size in bytes of the uncompressed data in the file + */ +extern LZMA_API(lzma_vli) lzma_index_uncompressed_size(const lzma_index *i) + lzma_nothrow lzma_attr_pure; + + +/** + * \brief Initialize an iterator + * + * This function associates the iterator with the given lzma_index, and calls + * lzma_index_iter_rewind() on the iterator. + * + * This function doesn't allocate any memory, thus there is no + * lzma_index_iter_end(). The iterator is valid as long as the + * associated lzma_index is valid, that is, until lzma_index_end() or + * using it as source in lzma_index_cat(). Specifically, lzma_index doesn't + * become invalid if new Blocks are added to it with lzma_index_append() or + * if it is used as the destination in lzma_index_cat(). + * + * It is safe to make copies of an initialized lzma_index_iter, for example, + * to easily restart reading at some particular position. + * + * \param iter Pointer to a lzma_index_iter structure + * \param i lzma_index to which the iterator will be associated + */ +extern LZMA_API(void) lzma_index_iter_init( + lzma_index_iter *iter, const lzma_index *i) lzma_nothrow; + + +/** + * \brief Rewind the iterator + * + * Rewind the iterator so that next call to lzma_index_iter_next() will + * return the first Block or Stream. + * + * \param iter Pointer to a lzma_index_iter structure + */ +extern LZMA_API(void) lzma_index_iter_rewind(lzma_index_iter *iter) + lzma_nothrow; + + +/** + * \brief Get the next Block or Stream + * + * \param iter Iterator initialized with lzma_index_iter_init() + * \param mode Specify what kind of information the caller wants + * to get. See lzma_index_iter_mode for details. + * + * \return lzma_bool: + * - true if no Block or Stream matching the mode is found. + * *iter is not updated (failure). + * - false if the next Block or Stream matching the mode was + * found. *iter is updated (success). + */ +extern LZMA_API(lzma_bool) lzma_index_iter_next( + lzma_index_iter *iter, lzma_index_iter_mode mode) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Locate a Block + * + * If it is possible to seek in the .xz file, it is possible to parse + * the Index field(s) and use lzma_index_iter_locate() to do random-access + * reading with granularity of Block size. + * + * If the target is smaller than the uncompressed size of the Stream (can be + * checked with lzma_index_uncompressed_size()): + * - Information about the Stream and Block containing the requested + * uncompressed offset is stored into *iter. + * - Internal state of the iterator is adjusted so that + * lzma_index_iter_next() can be used to read subsequent Blocks or Streams. + * + * If the target is greater than the uncompressed size of the Stream, *iter + * is not modified. + * + * \param iter Iterator that was earlier initialized with + * lzma_index_iter_init(). + * \param target Uncompressed target offset which the caller would + * like to locate from the Stream + * + * \return lzma_bool: + * - true if the target is greater than or equal to the + * uncompressed size of the Stream (failure) + * - false if the target is smaller than the uncompressed size + * of the Stream (success) + */ +extern LZMA_API(lzma_bool) lzma_index_iter_locate( + lzma_index_iter *iter, lzma_vli target) lzma_nothrow; + + +/** + * \brief Concatenate lzma_indexes + * + * Concatenating lzma_indexes is useful when doing random-access reading in + * multi-Stream .xz file, or when combining multiple Streams into single + * Stream. + * + * \param[out] dest lzma_index after which src is appended + * \param src lzma_index to be appended after dest. If this + * function succeeds, the memory allocated for src + * is freed or moved to be part of dest, and all + * iterators pointing to src will become invalid. + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * + * \return Possible lzma_ret values: + * - LZMA_OK: lzma_indexes were concatenated successfully. + * src is now a dangling pointer. + * - LZMA_DATA_ERROR: *dest would grow too big. + * - LZMA_MEM_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_index_cat(lzma_index *dest, lzma_index *src, + const lzma_allocator *allocator) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Duplicate lzma_index + * + * \param i Pointer to lzma_index structure to be duplicated + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * + * \return A copy of the lzma_index, or NULL if memory allocation failed. + */ +extern LZMA_API(lzma_index *) lzma_index_dup( + const lzma_index *i, const lzma_allocator *allocator) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Initialize .xz Index encoder + * + * \param strm Pointer to properly prepared lzma_stream + * \param i Pointer to lzma_index which should be encoded. + * + * The valid 'action' values for lzma_code() are LZMA_RUN and LZMA_FINISH. + * It is enough to use only one of them (you can choose freely). + * + * \return Possible lzma_ret values: + * - LZMA_OK: Initialization succeeded, continue with lzma_code(). + * - LZMA_MEM_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_index_encoder( + lzma_stream *strm, const lzma_index *i) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Initialize .xz Index decoder + * + * \param strm Pointer to properly prepared lzma_stream + * \param[out] i The decoded Index will be made available via + * this pointer. Initially this function will + * set *i to NULL (the old value is ignored). If + * decoding succeeds (lzma_code() returns + * LZMA_STREAM_END), *i will be set to point + * to a new lzma_index, which the application + * has to later free with lzma_index_end(). + * \param memlimit How much memory the resulting lzma_index is + * allowed to require. liblzma 5.2.3 and earlier + * don't allow 0 here and return LZMA_PROG_ERROR; + * later versions treat 0 as if 1 had been specified. + * + * Valid 'action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH. + * There is no need to use LZMA_FINISH, but it's allowed because it may + * simplify certain types of applications. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Initialization succeeded, continue with lzma_code(). + * - LZMA_MEM_ERROR + * - LZMA_PROG_ERROR + * + * \note liblzma 5.2.3 and older list also LZMA_MEMLIMIT_ERROR here + * but that error code has never been possible from this + * initialization function. + */ +extern LZMA_API(lzma_ret) lzma_index_decoder( + lzma_stream *strm, lzma_index **i, uint64_t memlimit) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Single-call .xz Index encoder + * + * \note This function doesn't take allocator argument since all + * the internal data is allocated on stack. + * + * \param i lzma_index to be encoded + * \param[out] out Beginning of the output buffer + * \param[out] out_pos The next byte will be written to out[*out_pos]. + * *out_pos is updated only if encoding succeeds. + * \param out_size Size of the out buffer; the first byte into + * which no data is written to is out[out_size]. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Encoding was successful. + * - LZMA_BUF_ERROR: Output buffer is too small. Use + * lzma_index_size() to find out how much output + * space is needed. + * - LZMA_PROG_ERROR + * + */ +extern LZMA_API(lzma_ret) lzma_index_buffer_encode(const lzma_index *i, + uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow; + + +/** + * \brief Single-call .xz Index decoder + * + * \param[out] i If decoding succeeds, *i will point to a new + * lzma_index, which the application has to + * later free with lzma_index_end(). If an error + * occurs, *i will be NULL. The old value of *i + * is always ignored and thus doesn't need to be + * initialized by the caller. + * \param[out] memlimit Pointer to how much memory the resulting + * lzma_index is allowed to require. The value + * pointed by this pointer is modified if and only + * if LZMA_MEMLIMIT_ERROR is returned. + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * \param in Beginning of the input buffer + * \param in_pos The next byte will be read from in[*in_pos]. + * *in_pos is updated only if decoding succeeds. + * \param in_size Size of the input buffer; the first byte that + * won't be read is in[in_size]. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Decoding was successful. + * - LZMA_MEM_ERROR + * - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached. + * The minimum required memlimit value was stored to *memlimit. + * - LZMA_DATA_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_index_buffer_decode(lzma_index **i, + uint64_t *memlimit, const lzma_allocator *allocator, + const uint8_t *in, size_t *in_pos, size_t in_size) + lzma_nothrow; + + +/** + * \brief Initialize a .xz file information decoder + * + * This decoder decodes the Stream Header, Stream Footer, Index, and + * Stream Padding field(s) from the input .xz file and stores the resulting + * combined index in *dest_index. This information can be used to get the + * uncompressed file size with lzma_index_uncompressed_size(*dest_index) or, + * for example, to implement random access reading by locating the Blocks + * in the Streams. + * + * To get the required information from the .xz file, lzma_code() may ask + * the application to seek in the input file by returning LZMA_SEEK_NEEDED + * and having the target file position specified in lzma_stream.seek_pos. + * The number of seeks required depends on the input file and how big buffers + * the application provides. When possible, the decoder will seek backward + * and forward in the given buffer to avoid useless seek requests. Thus, if + * the application provides the whole file at once, no external seeking will + * be required (that is, lzma_code() won't return LZMA_SEEK_NEEDED). + * + * The value in lzma_stream.total_in can be used to estimate how much data + * liblzma had to read to get the file information. However, due to seeking + * and the way total_in is updated, the value of total_in will be somewhat + * inaccurate (a little too big). Thus, total_in is a good estimate but don't + * expect to see the same exact value for the same file if you change the + * input buffer size or switch to a different liblzma version. + * + * Valid 'action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH. + * You only need to use LZMA_RUN; LZMA_FINISH is only supported because it + * might be convenient for some applications. If you use LZMA_FINISH and if + * lzma_code() asks the application to seek, remember to reset 'action' back + * to LZMA_RUN unless you hit the end of the file again. + * + * Possible return values from lzma_code(): + * - LZMA_OK: All OK so far, more input needed + * - LZMA_SEEK_NEEDED: Provide more input starting from the absolute + * file position strm->seek_pos + * - LZMA_STREAM_END: Decoding was successful, *dest_index has been set + * - LZMA_FORMAT_ERROR: The input file is not in the .xz format (the + * expected magic bytes were not found from the beginning of the file) + * - LZMA_OPTIONS_ERROR: File looks valid but contains headers that aren't + * supported by this version of liblzma + * - LZMA_DATA_ERROR: File is corrupt + * - LZMA_BUF_ERROR + * - LZMA_MEM_ERROR + * - LZMA_MEMLIMIT_ERROR + * - LZMA_PROG_ERROR + * + * \param strm Pointer to a properly prepared lzma_stream + * \param[out] dest_index Pointer to a pointer where the decoder will put + * the decoded lzma_index. The old value + * of *dest_index is ignored (not freed). + * \param memlimit How much memory the resulting lzma_index is + * allowed to require. Use UINT64_MAX to + * effectively disable the limiter. + * \param file_size Size of the input .xz file + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_MEM_ERROR + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_file_info_decoder( + lzma_stream *strm, lzma_index **dest_index, + uint64_t memlimit, uint64_t file_size) + lzma_nothrow; diff --git a/vcpkg/installed/x64-osx/include/lzma/index_hash.h b/vcpkg/installed/x64-osx/include/lzma/index_hash.h new file mode 100644 index 0000000..68f9024 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/lzma/index_hash.h @@ -0,0 +1,123 @@ +/* SPDX-License-Identifier: 0BSD */ + +/** + * \file lzma/index_hash.h + * \brief Validate Index by using a hash function + * \note Never include this file directly. Use instead. + * + * Hashing makes it possible to use constant amount of memory to validate + * Index of arbitrary size. + */ + +/* + * Author: Lasse Collin + */ + +#ifndef LZMA_H_INTERNAL +# error Never include this file directly. Use instead. +#endif + +/** + * \brief Opaque data type to hold the Index hash + */ +typedef struct lzma_index_hash_s lzma_index_hash; + + +/** + * \brief Allocate and initialize a new lzma_index_hash structure + * + * If index_hash is NULL, this function allocates and initializes a new + * lzma_index_hash structure and returns a pointer to it. If allocation + * fails, NULL is returned. + * + * If index_hash is non-NULL, this function reinitializes the lzma_index_hash + * structure and returns the same pointer. In this case, return value cannot + * be NULL or a different pointer than the index_hash that was given as + * an argument. + * + * \param index_hash Pointer to a lzma_index_hash structure or NULL. + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + * + * \return Initialized lzma_index_hash structure on success or + * NULL on failure. + */ +extern LZMA_API(lzma_index_hash *) lzma_index_hash_init( + lzma_index_hash *index_hash, const lzma_allocator *allocator) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Deallocate lzma_index_hash structure + * + * \param index_hash Pointer to a lzma_index_hash structure to free. + * \param allocator lzma_allocator for custom allocator functions. + * Set to NULL to use malloc() and free(). + */ +extern LZMA_API(void) lzma_index_hash_end( + lzma_index_hash *index_hash, const lzma_allocator *allocator) + lzma_nothrow; + + +/** + * \brief Add a new Record to an Index hash + * + * \param index_hash Pointer to a lzma_index_hash structure + * \param unpadded_size Unpadded Size of a Block + * \param uncompressed_size Uncompressed Size of a Block + * + * \return Possible lzma_ret values: + * - LZMA_OK + * - LZMA_DATA_ERROR: Compressed or uncompressed size of the + * Stream or size of the Index field would grow too big. + * - LZMA_PROG_ERROR: Invalid arguments or this function is being + * used when lzma_index_hash_decode() has already been used. + */ +extern LZMA_API(lzma_ret) lzma_index_hash_append(lzma_index_hash *index_hash, + lzma_vli unpadded_size, lzma_vli uncompressed_size) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Decode and validate the Index field + * + * After telling the sizes of all Blocks with lzma_index_hash_append(), + * the actual Index field is decoded with this function. Specifically, + * once decoding of the Index field has been started, no more Records + * can be added using lzma_index_hash_append(). + * + * This function doesn't use lzma_stream structure to pass the input data. + * Instead, the input buffer is specified using three arguments. This is + * because it matches better the internal APIs of liblzma. + * + * \param index_hash Pointer to a lzma_index_hash structure + * \param in Pointer to the beginning of the input buffer + * \param[out] in_pos in[*in_pos] is the next byte to process + * \param in_size in[in_size] is the first byte not to process + * + * \return Possible lzma_ret values: + * - LZMA_OK: So far good, but more input is needed. + * - LZMA_STREAM_END: Index decoded successfully and it matches + * the Records given with lzma_index_hash_append(). + * - LZMA_DATA_ERROR: Index is corrupt or doesn't match the + * information given with lzma_index_hash_append(). + * - LZMA_BUF_ERROR: Cannot progress because *in_pos >= in_size. + * - LZMA_PROG_ERROR + */ +extern LZMA_API(lzma_ret) lzma_index_hash_decode(lzma_index_hash *index_hash, + const uint8_t *in, size_t *in_pos, size_t in_size) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Get the size of the Index field as bytes + * + * This is needed to verify the Backward Size field in the Stream Footer. + * + * \param index_hash Pointer to a lzma_index_hash structure + * + * \return Size of the Index field in bytes. + */ +extern LZMA_API(lzma_vli) lzma_index_hash_size( + const lzma_index_hash *index_hash) + lzma_nothrow lzma_attr_pure; diff --git a/vcpkg/installed/x64-osx/include/lzma/lzma12.h b/vcpkg/installed/x64-osx/include/lzma/lzma12.h new file mode 100644 index 0000000..05f5b66 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/lzma/lzma12.h @@ -0,0 +1,568 @@ +/* SPDX-License-Identifier: 0BSD */ + +/** + * \file lzma/lzma12.h + * \brief LZMA1 and LZMA2 filters + * \note Never include this file directly. Use instead. + */ + +/* + * Author: Lasse Collin + */ + +#ifndef LZMA_H_INTERNAL +# error Never include this file directly. Use instead. +#endif + + +/** + * \brief LZMA1 Filter ID (for raw encoder/decoder only, not in .xz) + * + * LZMA1 is the very same thing as what was called just LZMA in LZMA Utils, + * 7-Zip, and LZMA SDK. It's called LZMA1 here to prevent developers from + * accidentally using LZMA when they actually want LZMA2. + */ +#define LZMA_FILTER_LZMA1 LZMA_VLI_C(0x4000000000000001) + +/** + * \brief LZMA1 Filter ID with extended options (for raw encoder/decoder) + * + * This is like LZMA_FILTER_LZMA1 but with this ID a few extra options + * are supported in the lzma_options_lzma structure: + * + * - A flag to tell the encoder if the end of payload marker (EOPM) alias + * end of stream (EOS) marker must be written at the end of the stream. + * In contrast, LZMA_FILTER_LZMA1 always writes the end marker. + * + * - Decoder needs to be told the uncompressed size of the stream + * or that it is unknown (using the special value UINT64_MAX). + * If the size is known, a flag can be set to allow the presence of + * the end marker anyway. In contrast, LZMA_FILTER_LZMA1 always + * behaves as if the uncompressed size was unknown. + * + * This allows handling file formats where LZMA1 streams are used but where + * the end marker isn't allowed or where it might not (always) be present. + * This extended LZMA1 functionality is provided as a Filter ID for raw + * encoder and decoder instead of adding new encoder and decoder initialization + * functions because this way it is possible to also use extra filters, + * for example, LZMA_FILTER_X86 in a filter chain with LZMA_FILTER_LZMA1EXT, + * which might be needed to handle some file formats. + */ +#define LZMA_FILTER_LZMA1EXT LZMA_VLI_C(0x4000000000000002) + +/** + * \brief LZMA2 Filter ID + * + * Usually you want this instead of LZMA1. Compared to LZMA1, LZMA2 adds + * support for LZMA_SYNC_FLUSH, uncompressed chunks (smaller expansion + * when trying to compress incompressible data), possibility to change + * lc/lp/pb in the middle of encoding, and some other internal improvements. + */ +#define LZMA_FILTER_LZMA2 LZMA_VLI_C(0x21) + + +/** + * \brief Match finders + * + * Match finder has major effect on both speed and compression ratio. + * Usually hash chains are faster than binary trees. + * + * If you will use LZMA_SYNC_FLUSH often, the hash chains may be a better + * choice, because binary trees get much higher compression ratio penalty + * with LZMA_SYNC_FLUSH. + * + * The memory usage formulas are only rough estimates, which are closest to + * reality when dict_size is a power of two. The formulas are more complex + * in reality, and can also change a little between liblzma versions. Use + * lzma_raw_encoder_memusage() to get more accurate estimate of memory usage. + */ +typedef enum { + LZMA_MF_HC3 = 0x03, + /**< + * \brief Hash Chain with 2- and 3-byte hashing + * + * Minimum nice_len: 3 + * + * Memory usage: + * - dict_size <= 16 MiB: dict_size * 7.5 + * - dict_size > 16 MiB: dict_size * 5.5 + 64 MiB + */ + + LZMA_MF_HC4 = 0x04, + /**< + * \brief Hash Chain with 2-, 3-, and 4-byte hashing + * + * Minimum nice_len: 4 + * + * Memory usage: + * - dict_size <= 32 MiB: dict_size * 7.5 + * - dict_size > 32 MiB: dict_size * 6.5 + */ + + LZMA_MF_BT2 = 0x12, + /**< + * \brief Binary Tree with 2-byte hashing + * + * Minimum nice_len: 2 + * + * Memory usage: dict_size * 9.5 + */ + + LZMA_MF_BT3 = 0x13, + /**< + * \brief Binary Tree with 2- and 3-byte hashing + * + * Minimum nice_len: 3 + * + * Memory usage: + * - dict_size <= 16 MiB: dict_size * 11.5 + * - dict_size > 16 MiB: dict_size * 9.5 + 64 MiB + */ + + LZMA_MF_BT4 = 0x14 + /**< + * \brief Binary Tree with 2-, 3-, and 4-byte hashing + * + * Minimum nice_len: 4 + * + * Memory usage: + * - dict_size <= 32 MiB: dict_size * 11.5 + * - dict_size > 32 MiB: dict_size * 10.5 + */ +} lzma_match_finder; + + +/** + * \brief Test if given match finder is supported + * + * It is safe to call this with a value that isn't listed in + * lzma_match_finder enumeration; the return value will be false. + * + * There is no way to list which match finders are available in this + * particular liblzma version and build. It would be useless, because + * a new match finder, which the application developer wasn't aware, + * could require giving additional options to the encoder that the older + * match finders don't need. + * + * \param match_finder Match finder ID + * + * \return lzma_bool: + * - true if the match finder is supported by this liblzma build. + * - false otherwise. + */ +extern LZMA_API(lzma_bool) lzma_mf_is_supported(lzma_match_finder match_finder) + lzma_nothrow lzma_attr_const; + + +/** + * \brief Compression modes + * + * This selects the function used to analyze the data produced by the match + * finder. + */ +typedef enum { + LZMA_MODE_FAST = 1, + /**< + * \brief Fast compression + * + * Fast mode is usually at its best when combined with + * a hash chain match finder. + */ + + LZMA_MODE_NORMAL = 2 + /**< + * \brief Normal compression + * + * This is usually notably slower than fast mode. Use this + * together with binary tree match finders to expose the + * full potential of the LZMA1 or LZMA2 encoder. + */ +} lzma_mode; + + +/** + * \brief Test if given compression mode is supported + * + * It is safe to call this with a value that isn't listed in lzma_mode + * enumeration; the return value will be false. + * + * There is no way to list which modes are available in this particular + * liblzma version and build. It would be useless, because a new compression + * mode, which the application developer wasn't aware, could require giving + * additional options to the encoder that the older modes don't need. + * + * \param mode Mode ID. + * + * \return lzma_bool: + * - true if the compression mode is supported by this liblzma + * build. + * - false otherwise. + */ +extern LZMA_API(lzma_bool) lzma_mode_is_supported(lzma_mode mode) + lzma_nothrow lzma_attr_const; + + +/** + * \brief Options specific to the LZMA1 and LZMA2 filters + * + * Since LZMA1 and LZMA2 share most of the code, it's simplest to share + * the options structure too. For encoding, all but the reserved variables + * need to be initialized unless specifically mentioned otherwise. + * lzma_lzma_preset() can be used to get a good starting point. + * + * For raw decoding, both LZMA1 and LZMA2 need dict_size, preset_dict, and + * preset_dict_size (if preset_dict != NULL). LZMA1 needs also lc, lp, and pb. + */ +typedef struct { + /** + * \brief Dictionary size in bytes + * + * Dictionary size indicates how many bytes of the recently processed + * uncompressed data is kept in memory. One method to reduce size of + * the uncompressed data is to store distance-length pairs, which + * indicate what data to repeat from the dictionary buffer. Thus, + * the bigger the dictionary, the better the compression ratio + * usually is. + * + * Maximum size of the dictionary depends on multiple things: + * - Memory usage limit + * - Available address space (not a problem on 64-bit systems) + * - Selected match finder (encoder only) + * + * Currently the maximum dictionary size for encoding is 1.5 GiB + * (i.e. (UINT32_C(1) << 30) + (UINT32_C(1) << 29)) even on 64-bit + * systems for certain match finder implementation reasons. In the + * future, there may be match finders that support bigger + * dictionaries. + * + * Decoder already supports dictionaries up to 4 GiB - 1 B (i.e. + * UINT32_MAX), so increasing the maximum dictionary size of the + * encoder won't cause problems for old decoders. + * + * Because extremely small dictionaries sizes would have unneeded + * overhead in the decoder, the minimum dictionary size is 4096 bytes. + * + * \note When decoding, too big dictionary does no other harm + * than wasting memory. + */ + uint32_t dict_size; +# define LZMA_DICT_SIZE_MIN UINT32_C(4096) +# define LZMA_DICT_SIZE_DEFAULT (UINT32_C(1) << 23) + + /** + * \brief Pointer to an initial dictionary + * + * It is possible to initialize the LZ77 history window using + * a preset dictionary. It is useful when compressing many + * similar, relatively small chunks of data independently from + * each other. The preset dictionary should contain typical + * strings that occur in the files being compressed. The most + * probable strings should be near the end of the preset dictionary. + * + * This feature should be used only in special situations. For + * now, it works correctly only with raw encoding and decoding. + * Currently none of the container formats supported by + * liblzma allow preset dictionary when decoding, thus if + * you create a .xz or .lzma file with preset dictionary, it + * cannot be decoded with the regular decoder functions. In the + * future, the .xz format will likely get support for preset + * dictionary though. + */ + const uint8_t *preset_dict; + + /** + * \brief Size of the preset dictionary + * + * Specifies the size of the preset dictionary. If the size is + * bigger than dict_size, only the last dict_size bytes are + * processed. + * + * This variable is read only when preset_dict is not NULL. + * If preset_dict is not NULL but preset_dict_size is zero, + * no preset dictionary is used (identical to only setting + * preset_dict to NULL). + */ + uint32_t preset_dict_size; + + /** + * \brief Number of literal context bits + * + * How many of the highest bits of the previous uncompressed + * eight-bit byte (also known as 'literal') are taken into + * account when predicting the bits of the next literal. + * + * E.g. in typical English text, an upper-case letter is + * often followed by a lower-case letter, and a lower-case + * letter is usually followed by another lower-case letter. + * In the US-ASCII character set, the highest three bits are 010 + * for upper-case letters and 011 for lower-case letters. + * When lc is at least 3, the literal coding can take advantage of + * this property in the uncompressed data. + * + * There is a limit that applies to literal context bits and literal + * position bits together: lc + lp <= 4. Without this limit the + * decoding could become very slow, which could have security related + * results in some cases like email servers doing virus scanning. + * This limit also simplifies the internal implementation in liblzma. + * + * There may be LZMA1 streams that have lc + lp > 4 (maximum possible + * lc would be 8). It is not possible to decode such streams with + * liblzma. + */ + uint32_t lc; +# define LZMA_LCLP_MIN 0 +# define LZMA_LCLP_MAX 4 +# define LZMA_LC_DEFAULT 3 + + /** + * \brief Number of literal position bits + * + * lp affects what kind of alignment in the uncompressed data is + * assumed when encoding literals. A literal is a single 8-bit byte. + * See pb below for more information about alignment. + */ + uint32_t lp; +# define LZMA_LP_DEFAULT 0 + + /** + * \brief Number of position bits + * + * pb affects what kind of alignment in the uncompressed data is + * assumed in general. The default means four-byte alignment + * (2^ pb =2^2=4), which is often a good choice when there's + * no better guess. + * + * When the alignment is known, setting pb accordingly may reduce + * the file size a little. E.g. with text files having one-byte + * alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can + * improve compression slightly. For UTF-16 text, pb=1 is a good + * choice. If the alignment is an odd number like 3 bytes, pb=0 + * might be the best choice. + * + * Even though the assumed alignment can be adjusted with pb and + * lp, LZMA1 and LZMA2 still slightly favor 16-byte alignment. + * It might be worth taking into account when designing file formats + * that are likely to be often compressed with LZMA1 or LZMA2. + */ + uint32_t pb; +# define LZMA_PB_MIN 0 +# define LZMA_PB_MAX 4 +# define LZMA_PB_DEFAULT 2 + + /** Compression mode */ + lzma_mode mode; + + /** + * \brief Nice length of a match + * + * This determines how many bytes the encoder compares from the match + * candidates when looking for the best match. Once a match of at + * least nice_len bytes long is found, the encoder stops looking for + * better candidates and encodes the match. (Naturally, if the found + * match is actually longer than nice_len, the actual length is + * encoded; it's not truncated to nice_len.) + * + * Bigger values usually increase the compression ratio and + * compression time. For most files, 32 to 128 is a good value, + * which gives very good compression ratio at good speed. + * + * The exact minimum value depends on the match finder. The maximum + * is 273, which is the maximum length of a match that LZMA1 and + * LZMA2 can encode. + */ + uint32_t nice_len; + + /** Match finder ID */ + lzma_match_finder mf; + + /** + * \brief Maximum search depth in the match finder + * + * For every input byte, match finder searches through the hash chain + * or binary tree in a loop, each iteration going one step deeper in + * the chain or tree. The searching stops if + * - a match of at least nice_len bytes long is found; + * - all match candidates from the hash chain or binary tree have + * been checked; or + * - maximum search depth is reached. + * + * Maximum search depth is needed to prevent the match finder from + * wasting too much time in case there are lots of short match + * candidates. On the other hand, stopping the search before all + * candidates have been checked can reduce compression ratio. + * + * Setting depth to zero tells liblzma to use an automatic default + * value, that depends on the selected match finder and nice_len. + * The default is in the range [4, 200] or so (it may vary between + * liblzma versions). + * + * Using a bigger depth value than the default can increase + * compression ratio in some cases. There is no strict maximum value, + * but high values (thousands or millions) should be used with care: + * the encoder could remain fast enough with typical input, but + * malicious input could cause the match finder to slow down + * dramatically, possibly creating a denial of service attack. + */ + uint32_t depth; + + /** + * \brief For LZMA_FILTER_LZMA1EXT: Extended flags + * + * This is used only with LZMA_FILTER_LZMA1EXT. + * + * Currently only one flag is supported, LZMA_LZMA1EXT_ALLOW_EOPM: + * + * - Encoder: If the flag is set, then end marker is written just + * like it is with LZMA_FILTER_LZMA1. Without this flag the + * end marker isn't written and the application has to store + * the uncompressed size somewhere outside the compressed stream. + * To decompress streams without the end marker, the application + * has to set the correct uncompressed size in ext_size_low and + * ext_size_high. + * + * - Decoder: If the uncompressed size in ext_size_low and + * ext_size_high is set to the special value UINT64_MAX + * (indicating unknown uncompressed size) then this flag is + * ignored and the end marker must always be present, that is, + * the behavior is identical to LZMA_FILTER_LZMA1. + * + * Otherwise, if this flag isn't set, then the input stream + * must not have the end marker; if the end marker is detected + * then it will result in LZMA_DATA_ERROR. This is useful when + * it is known that the stream must not have the end marker and + * strict validation is wanted. + * + * If this flag is set, then it is autodetected if the end marker + * is present after the specified number of uncompressed bytes + * has been decompressed (ext_size_low and ext_size_high). The + * end marker isn't allowed in any other position. This behavior + * is useful when uncompressed size is known but the end marker + * may or may not be present. This is the case, for example, + * in .7z files (valid .7z files that have the end marker in + * LZMA1 streams are rare but they do exist). + */ + uint32_t ext_flags; +# define LZMA_LZMA1EXT_ALLOW_EOPM UINT32_C(0x01) + + /** + * \brief For LZMA_FILTER_LZMA1EXT: Uncompressed size (low bits) + * + * The 64-bit uncompressed size is needed for decompression with + * LZMA_FILTER_LZMA1EXT. The size is ignored by the encoder. + * + * The special value UINT64_MAX indicates that the uncompressed size + * is unknown and that the end of payload marker (also known as + * end of stream marker) must be present to indicate the end of + * the LZMA1 stream. Any other value indicates the expected + * uncompressed size of the LZMA1 stream. (If LZMA1 was used together + * with filters that change the size of the data then the uncompressed + * size of the LZMA1 stream could be different than the final + * uncompressed size of the filtered stream.) + * + * ext_size_low holds the least significant 32 bits of the + * uncompressed size. The most significant 32 bits must be set + * in ext_size_high. The macro lzma_ext_size_set(opt_lzma, u64size) + * can be used to set these members. + * + * The 64-bit uncompressed size is split into two uint32_t variables + * because there were no reserved uint64_t members and using the + * same options structure for LZMA_FILTER_LZMA1, LZMA_FILTER_LZMA1EXT, + * and LZMA_FILTER_LZMA2 was otherwise more convenient than having + * a new options structure for LZMA_FILTER_LZMA1EXT. (Replacing two + * uint32_t members with one uint64_t changes the ABI on some systems + * as the alignment of this struct can increase from 4 bytes to 8.) + */ + uint32_t ext_size_low; + + /** + * \brief For LZMA_FILTER_LZMA1EXT: Uncompressed size (high bits) + * + * This holds the most significant 32 bits of the uncompressed size. + */ + uint32_t ext_size_high; + + /* + * Reserved space to allow possible future extensions without + * breaking the ABI. You should not touch these, because the names + * of these variables may change. These are and will never be used + * with the currently supported options, so it is safe to leave these + * uninitialized. + */ + + /** \private Reserved member. */ + uint32_t reserved_int4; + + /** \private Reserved member. */ + uint32_t reserved_int5; + + /** \private Reserved member. */ + uint32_t reserved_int6; + + /** \private Reserved member. */ + uint32_t reserved_int7; + + /** \private Reserved member. */ + uint32_t reserved_int8; + + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum1; + + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum2; + + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum3; + + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum4; + + /** \private Reserved member. */ + void *reserved_ptr1; + + /** \private Reserved member. */ + void *reserved_ptr2; + +} lzma_options_lzma; + + +/** + * \brief Macro to set the 64-bit uncompressed size in ext_size_* + * + * This might be convenient when decoding using LZMA_FILTER_LZMA1EXT. + * This isn't used with LZMA_FILTER_LZMA1 or LZMA_FILTER_LZMA2. + */ +#define lzma_set_ext_size(opt_lzma2, u64size) \ +do { \ + (opt_lzma2).ext_size_low = (uint32_t)(u64size); \ + (opt_lzma2).ext_size_high = (uint32_t)((uint64_t)(u64size) >> 32); \ +} while (0) + + +/** + * \brief Set a compression preset to lzma_options_lzma structure + * + * 0 is the fastest and 9 is the slowest. These match the switches -0 .. -9 + * of the xz command line tool. In addition, it is possible to bitwise-or + * flags to the preset. Currently only LZMA_PRESET_EXTREME is supported. + * The flags are defined in container.h, because the flags are used also + * with lzma_easy_encoder(). + * + * The preset levels are subject to changes between liblzma versions. + * + * This function is available only if LZMA1 or LZMA2 encoder has been enabled + * when building liblzma. + * + * If features (like certain match finders) have been disabled at build time, + * then the function may return success (false) even though the resulting + * LZMA1/LZMA2 options may not be usable for encoder initialization + * (LZMA_OPTIONS_ERROR). + * + * \param[out] options Pointer to LZMA1 or LZMA2 options to be filled + * \param preset Preset level bitwse-ORed with preset flags + * + * \return lzma_bool: + * - true if the preset is not supported (failure). + * - false otherwise (success). + */ +extern LZMA_API(lzma_bool) lzma_lzma_preset( + lzma_options_lzma *options, uint32_t preset) lzma_nothrow; diff --git a/vcpkg/installed/x64-osx/include/lzma/stream_flags.h b/vcpkg/installed/x64-osx/include/lzma/stream_flags.h new file mode 100644 index 0000000..a33fe46 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/lzma/stream_flags.h @@ -0,0 +1,265 @@ +/* SPDX-License-Identifier: 0BSD */ + +/** + * \file lzma/stream_flags.h + * \brief .xz Stream Header and Stream Footer encoder and decoder + * \note Never include this file directly. Use instead. + */ + +/* + * Author: Lasse Collin + */ + +#ifndef LZMA_H_INTERNAL +# error Never include this file directly. Use instead. +#endif + + +/** + * \brief Size of Stream Header and Stream Footer + * + * Stream Header and Stream Footer have the same size and they are not + * going to change even if a newer version of the .xz file format is + * developed in future. + */ +#define LZMA_STREAM_HEADER_SIZE 12 + + +/** + * \brief Options for encoding/decoding Stream Header and Stream Footer + */ +typedef struct { + /** + * \brief Stream Flags format version + * + * To prevent API and ABI breakages if new features are needed in + * Stream Header or Stream Footer, a version number is used to + * indicate which members in this structure are in use. For now, + * version must always be zero. With non-zero version, the + * lzma_stream_header_encode() and lzma_stream_footer_encode() + * will return LZMA_OPTIONS_ERROR. + * + * lzma_stream_header_decode() and lzma_stream_footer_decode() + * will always set this to the lowest value that supports all the + * features indicated by the Stream Flags field. The application + * must check that the version number set by the decoding functions + * is supported by the application. Otherwise it is possible that + * the application will decode the Stream incorrectly. + */ + uint32_t version; + + /** + * \brief Backward Size + * + * Backward Size must be a multiple of four bytes. In this Stream + * format version, Backward Size is the size of the Index field. + * + * Backward Size isn't actually part of the Stream Flags field, but + * it is convenient to include in this structure anyway. Backward + * Size is present only in the Stream Footer. There is no need to + * initialize backward_size when encoding Stream Header. + * + * lzma_stream_header_decode() always sets backward_size to + * LZMA_VLI_UNKNOWN so that it is convenient to use + * lzma_stream_flags_compare() when both Stream Header and Stream + * Footer have been decoded. + */ + lzma_vli backward_size; + + /** + * \brief Minimum value for lzma_stream_flags.backward_size + */ +# define LZMA_BACKWARD_SIZE_MIN 4 + + /** + * \brief Maximum value for lzma_stream_flags.backward_size + */ +# define LZMA_BACKWARD_SIZE_MAX (LZMA_VLI_C(1) << 34) + + /** + * \brief Check ID + * + * This indicates the type of the integrity check calculated from + * uncompressed data. + */ + lzma_check check; + + /* + * Reserved space to allow possible future extensions without + * breaking the ABI. You should not touch these, because the + * names of these variables may change. + * + * (We will never be able to use all of these since Stream Flags + * is just two bytes plus Backward Size of four bytes. But it's + * nice to have the proper types when they are needed.) + */ + + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum1; + + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum2; + + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum3; + + /** \private Reserved member. */ + lzma_reserved_enum reserved_enum4; + + /** \private Reserved member. */ + lzma_bool reserved_bool1; + + /** \private Reserved member. */ + lzma_bool reserved_bool2; + + /** \private Reserved member. */ + lzma_bool reserved_bool3; + + /** \private Reserved member. */ + lzma_bool reserved_bool4; + + /** \private Reserved member. */ + lzma_bool reserved_bool5; + + /** \private Reserved member. */ + lzma_bool reserved_bool6; + + /** \private Reserved member. */ + lzma_bool reserved_bool7; + + /** \private Reserved member. */ + lzma_bool reserved_bool8; + + /** \private Reserved member. */ + uint32_t reserved_int1; + + /** \private Reserved member. */ + uint32_t reserved_int2; + +} lzma_stream_flags; + + +/** + * \brief Encode Stream Header + * + * \param options Stream Header options to be encoded. + * options->backward_size is ignored and doesn't + * need to be initialized. + * \param[out] out Beginning of the output buffer of + * LZMA_STREAM_HEADER_SIZE bytes. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Encoding was successful. + * - LZMA_OPTIONS_ERROR: options->version is not supported by + * this liblzma version. + * - LZMA_PROG_ERROR: Invalid options. + */ +extern LZMA_API(lzma_ret) lzma_stream_header_encode( + const lzma_stream_flags *options, uint8_t *out) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Encode Stream Footer + * + * \param options Stream Footer options to be encoded. + * \param[out] out Beginning of the output buffer of + * LZMA_STREAM_HEADER_SIZE bytes. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Encoding was successful. + * - LZMA_OPTIONS_ERROR: options->version is not supported by + * this liblzma version. + * - LZMA_PROG_ERROR: Invalid options. + */ +extern LZMA_API(lzma_ret) lzma_stream_footer_encode( + const lzma_stream_flags *options, uint8_t *out) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Decode Stream Header + * + * options->backward_size is always set to LZMA_VLI_UNKNOWN. This is to + * help comparing Stream Flags from Stream Header and Stream Footer with + * lzma_stream_flags_compare(). + * + * \note When decoding .xz files that contain multiple Streams, it may + * make sense to print "file format not recognized" only if + * decoding of the Stream Header of the \a first Stream gives + * LZMA_FORMAT_ERROR. If non-first Stream Header gives + * LZMA_FORMAT_ERROR, the message used for LZMA_DATA_ERROR is + * probably more appropriate. + * For example, the Stream decoder in liblzma uses + * LZMA_DATA_ERROR if LZMA_FORMAT_ERROR is returned by + * lzma_stream_header_decode() when decoding non-first Stream. + * + * \param[out] options Target for the decoded Stream Header options. + * \param in Beginning of the input buffer of + * LZMA_STREAM_HEADER_SIZE bytes. + * + * + * \return Possible lzma_ret values: + * - LZMA_OK: Decoding was successful. + * - LZMA_FORMAT_ERROR: Magic bytes don't match, thus the given + * buffer cannot be Stream Header. + * - LZMA_DATA_ERROR: CRC32 doesn't match, thus the header + * is corrupt. + * - LZMA_OPTIONS_ERROR: Unsupported options are present + * in the header. + */ +extern LZMA_API(lzma_ret) lzma_stream_header_decode( + lzma_stream_flags *options, const uint8_t *in) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Decode Stream Footer + * + * \note If Stream Header was already decoded successfully, but + * decoding Stream Footer returns LZMA_FORMAT_ERROR, the + * application should probably report some other error message + * than "file format not recognized". The file likely + * is corrupt (possibly truncated). The Stream decoder in liblzma + * uses LZMA_DATA_ERROR in this situation. + * + * \param[out] options Target for the decoded Stream Footer options. + * \param in Beginning of the input buffer of + * LZMA_STREAM_HEADER_SIZE bytes. + * + * \return Possible lzma_ret values: + * - LZMA_OK: Decoding was successful. + * - LZMA_FORMAT_ERROR: Magic bytes don't match, thus the given + * buffer cannot be Stream Footer. + * - LZMA_DATA_ERROR: CRC32 doesn't match, thus the Stream Footer + * is corrupt. + * - LZMA_OPTIONS_ERROR: Unsupported options are present + * in Stream Footer. + */ +extern LZMA_API(lzma_ret) lzma_stream_footer_decode( + lzma_stream_flags *options, const uint8_t *in) + lzma_nothrow lzma_attr_warn_unused_result; + + +/** + * \brief Compare two lzma_stream_flags structures + * + * backward_size values are compared only if both are not + * LZMA_VLI_UNKNOWN. + * + * \param a Pointer to lzma_stream_flags structure + * \param b Pointer to lzma_stream_flags structure + * + * \return Possible lzma_ret values: + * - LZMA_OK: Both are equal. If either had backward_size set + * to LZMA_VLI_UNKNOWN, backward_size values were not + * compared or validated. + * - LZMA_DATA_ERROR: The structures differ. + * - LZMA_OPTIONS_ERROR: version in either structure is greater + * than the maximum supported version (currently zero). + * - LZMA_PROG_ERROR: Invalid value, e.g. invalid check or + * backward_size. + */ +extern LZMA_API(lzma_ret) lzma_stream_flags_compare( + const lzma_stream_flags *a, const lzma_stream_flags *b) + lzma_nothrow lzma_attr_pure; diff --git a/vcpkg/installed/x64-osx/include/lzma/version.h b/vcpkg/installed/x64-osx/include/lzma/version.h new file mode 100644 index 0000000..53526b9 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/lzma/version.h @@ -0,0 +1,134 @@ +/* SPDX-License-Identifier: 0BSD */ + +/** + * \file lzma/version.h + * \brief Version number + * \note Never include this file directly. Use instead. + */ + +/* + * Author: Lasse Collin + */ + +#ifndef LZMA_H_INTERNAL +# error Never include this file directly. Use instead. +#endif + + +/** \brief Major version number of the liblzma release. */ +#define LZMA_VERSION_MAJOR 5 + +/** \brief Minor version number of the liblzma release. */ +#define LZMA_VERSION_MINOR 6 + +/** \brief Patch version number of the liblzma release. */ +#define LZMA_VERSION_PATCH 2 + +/** + * \brief Version stability marker + * + * This will always be one of three values: + * - LZMA_VERSION_STABILITY_ALPHA + * - LZMA_VERSION_STABILITY_BETA + * - LZMA_VERSION_STABILITY_STABLE + */ +#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE + +/** \brief Commit version number of the liblzma release */ +#ifndef LZMA_VERSION_COMMIT +# define LZMA_VERSION_COMMIT "" +#endif + + +/* + * Map symbolic stability levels to integers. + */ +#define LZMA_VERSION_STABILITY_ALPHA 0 +#define LZMA_VERSION_STABILITY_BETA 1 +#define LZMA_VERSION_STABILITY_STABLE 2 + + +/** + * \brief Compile-time version number + * + * The version number is of format xyyyzzzs where + * - x = major + * - yyy = minor + * - zzz = revision + * - s indicates stability: 0 = alpha, 1 = beta, 2 = stable + * + * The same xyyyzzz triplet is never reused with different stability levels. + * For example, if 5.1.0alpha has been released, there will never be 5.1.0beta + * or 5.1.0 stable. + * + * \note The version number of liblzma has nothing to with + * the version number of Igor Pavlov's LZMA SDK. + */ +#define LZMA_VERSION (LZMA_VERSION_MAJOR * UINT32_C(10000000) \ + + LZMA_VERSION_MINOR * UINT32_C(10000) \ + + LZMA_VERSION_PATCH * UINT32_C(10) \ + + LZMA_VERSION_STABILITY) + + +/* + * Macros to construct the compile-time version string + */ +#if LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_ALPHA +# define LZMA_VERSION_STABILITY_STRING "alpha" +#elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_BETA +# define LZMA_VERSION_STABILITY_STRING "beta" +#elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_STABLE +# define LZMA_VERSION_STABILITY_STRING "" +#else +# error Incorrect LZMA_VERSION_STABILITY +#endif + +#define LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit) \ + #major "." #minor "." #patch stability commit + +#define LZMA_VERSION_STRING_C(major, minor, patch, stability, commit) \ + LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit) + + +/** + * \brief Compile-time version as a string + * + * This can be for example "4.999.5alpha", "4.999.8beta", or "5.0.0" (stable + * versions don't have any "stable" suffix). In future, a snapshot built + * from source code repository may include an additional suffix, for example + * "4.999.8beta-21-g1d92". The commit ID won't be available in numeric form + * in LZMA_VERSION macro. + */ +#define LZMA_VERSION_STRING LZMA_VERSION_STRING_C( \ + LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, \ + LZMA_VERSION_PATCH, LZMA_VERSION_STABILITY_STRING, \ + LZMA_VERSION_COMMIT) + + +/* #ifndef is needed for use with windres (MinGW-w64 or Cygwin). */ +#ifndef LZMA_H_INTERNAL_RC + +/** + * \brief Run-time version number as an integer + * + * This allows an application to compare if it was built against the same, + * older, or newer version of liblzma that is currently running. + * + * \return The value of LZMA_VERSION macro at the compile time of liblzma + */ +extern LZMA_API(uint32_t) lzma_version_number(void) + lzma_nothrow lzma_attr_const; + + +/** + * \brief Run-time version as a string + * + * This function may be useful to display which version of liblzma an + * application is currently using. + * + * \return Run-time version of liblzma + */ +extern LZMA_API(const char *) lzma_version_string(void) + lzma_nothrow lzma_attr_const; + +#endif diff --git a/vcpkg/installed/x64-osx/include/lzma/vli.h b/vcpkg/installed/x64-osx/include/lzma/vli.h new file mode 100644 index 0000000..6b04902 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/lzma/vli.h @@ -0,0 +1,166 @@ +/* SPDX-License-Identifier: 0BSD */ + +/** + * \file lzma/vli.h + * \brief Variable-length integer handling + * \note Never include this file directly. Use instead. + * + * In the .xz format, most integers are encoded in a variable-length + * representation, which is sometimes called little endian base-128 encoding. + * This saves space when smaller values are more likely than bigger values. + * + * The encoding scheme encodes seven bits to every byte, using minimum + * number of bytes required to represent the given value. Encodings that use + * non-minimum number of bytes are invalid, thus every integer has exactly + * one encoded representation. The maximum number of bits in a VLI is 63, + * thus the vli argument must be less than or equal to UINT64_MAX / 2. You + * should use LZMA_VLI_MAX for clarity. + */ + +/* + * Author: Lasse Collin + */ + +#ifndef LZMA_H_INTERNAL +# error Never include this file directly. Use instead. +#endif + + +/** + * \brief Maximum supported value of a variable-length integer + */ +#define LZMA_VLI_MAX (UINT64_MAX / 2) + +/** + * \brief VLI value to denote that the value is unknown + */ +#define LZMA_VLI_UNKNOWN UINT64_MAX + +/** + * \brief Maximum supported encoded length of variable length integers + */ +#define LZMA_VLI_BYTES_MAX 9 + +/** + * \brief VLI constant suffix + */ +#define LZMA_VLI_C(n) UINT64_C(n) + + +/** + * \brief Variable-length integer type + * + * Valid VLI values are in the range [0, LZMA_VLI_MAX]. Unknown value is + * indicated with LZMA_VLI_UNKNOWN, which is the maximum value of the + * underlying integer type. + * + * lzma_vli will be uint64_t for the foreseeable future. If a bigger size + * is needed in the future, it is guaranteed that 2 * LZMA_VLI_MAX will + * not overflow lzma_vli. This simplifies integer overflow detection. + */ +typedef uint64_t lzma_vli; + + +/** + * \brief Validate a variable-length integer + * + * This is useful to test that application has given acceptable values + * for example in the uncompressed_size and compressed_size variables. + * + * \return True if the integer is representable as a VLI or if it + * indicates an unknown value. False otherwise. + */ +#define lzma_vli_is_valid(vli) \ + ((vli) <= LZMA_VLI_MAX || (vli) == LZMA_VLI_UNKNOWN) + + +/** + * \brief Encode a variable-length integer + * + * This function has two modes: single-call and multi-call. Single-call mode + * encodes the whole integer at once; it is an error if the output buffer is + * too small. Multi-call mode saves the position in *vli_pos, and thus it is + * possible to continue encoding if the buffer becomes full before the whole + * integer has been encoded. + * + * \param vli Integer to be encoded + * \param[out] vli_pos How many VLI-encoded bytes have already been written + * out. When starting to encode a new integer in + * multi-call mode, *vli_pos must be set to zero. + * To use single-call encoding, set vli_pos to NULL. + * \param[out] out Beginning of the output buffer + * \param[out] out_pos The next byte will be written to out[*out_pos]. + * \param out_size Size of the out buffer; the first byte into + * which no data is written to is out[out_size]. + * + * \return Slightly different return values are used in multi-call and + * single-call modes. + * + * Single-call (vli_pos == NULL): + * - LZMA_OK: Integer successfully encoded. + * - LZMA_PROG_ERROR: Arguments are not sane. This can be due + * to too little output space; single-call mode doesn't use + * LZMA_BUF_ERROR, since the application should have checked + * the encoded size with lzma_vli_size(). + * + * Multi-call (vli_pos != NULL): + * - LZMA_OK: So far all OK, but the integer is not + * completely written out yet. + * - LZMA_STREAM_END: Integer successfully encoded. + * - LZMA_BUF_ERROR: No output space was provided. + * - LZMA_PROG_ERROR: Arguments are not sane. + */ +extern LZMA_API(lzma_ret) lzma_vli_encode(lzma_vli vli, size_t *vli_pos, + uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow; + + +/** + * \brief Decode a variable-length integer + * + * Like lzma_vli_encode(), this function has single-call and multi-call modes. + * + * \param[out] vli Pointer to decoded integer. The decoder will + * initialize it to zero when *vli_pos == 0, so + * application isn't required to initialize *vli. + * \param[out] vli_pos How many bytes have already been decoded. When + * starting to decode a new integer in multi-call + * mode, *vli_pos must be initialized to zero. To + * use single-call decoding, set vli_pos to NULL. + * \param in Beginning of the input buffer + * \param[out] in_pos The next byte will be read from in[*in_pos]. + * \param in_size Size of the input buffer; the first byte that + * won't be read is in[in_size]. + * + * \return Slightly different return values are used in multi-call and + * single-call modes. + * + * Single-call (vli_pos == NULL): + * - LZMA_OK: Integer successfully decoded. + * - LZMA_DATA_ERROR: Integer is corrupt. This includes hitting + * the end of the input buffer before the whole integer was + * decoded; providing no input at all will use LZMA_DATA_ERROR. + * - LZMA_PROG_ERROR: Arguments are not sane. + * + * Multi-call (vli_pos != NULL): + * - LZMA_OK: So far all OK, but the integer is not + * completely decoded yet. + * - LZMA_STREAM_END: Integer successfully decoded. + * - LZMA_DATA_ERROR: Integer is corrupt. + * - LZMA_BUF_ERROR: No input was provided. + * - LZMA_PROG_ERROR: Arguments are not sane. + */ +extern LZMA_API(lzma_ret) lzma_vli_decode(lzma_vli *vli, size_t *vli_pos, + const uint8_t *in, size_t *in_pos, size_t in_size) + lzma_nothrow; + + +/** + * \brief Get the number of bytes required to encode a VLI + * + * \param vli Integer whose encoded size is to be determined + * + * \return Number of bytes on success (1-9). If vli isn't valid, + * zero is returned. + */ +extern LZMA_API(uint32_t) lzma_vli_size(lzma_vli vli) + lzma_nothrow lzma_attr_pure; diff --git a/vcpkg/installed/x64-osx/include/pcre2.h b/vcpkg/installed/x64-osx/include/pcre2.h new file mode 100644 index 0000000..02aefc6 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/pcre2.h @@ -0,0 +1,1007 @@ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* This is the public header file for the PCRE library, second API, to be +#included by applications that call PCRE2 functions. + + Copyright (c) 2016-2024 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + +#ifndef PCRE2_H_IDEMPOTENT_GUARD +#define PCRE2_H_IDEMPOTENT_GUARD + +/* The current PCRE version information. */ + +#define PCRE2_MAJOR 10 +#define PCRE2_MINOR 43 +#define PCRE2_PRERELEASE +#define PCRE2_DATE 2024-02-16 + +/* When an application links to a PCRE DLL in Windows, the symbols that are +imported have to be identified as such. When building PCRE2, the appropriate +export setting is defined in pcre2_internal.h, which includes this file. So we +don't change existing definitions of PCRE2_EXP_DECL. */ + +#if defined(_WIN32) && !1 +# ifndef PCRE2_EXP_DECL +# define PCRE2_EXP_DECL extern __declspec(dllimport) +# endif +#endif + +/* By default, we use the standard "extern" declarations. */ + +#ifndef PCRE2_EXP_DECL +# ifdef __cplusplus +# define PCRE2_EXP_DECL extern "C" +# else +# define PCRE2_EXP_DECL extern +# endif +#endif + +/* When compiling with the MSVC compiler, it is sometimes necessary to include +a "calling convention" before exported function names. (This is secondhand +information; I know nothing about MSVC myself). For example, something like + + void __cdecl function(....) + +might be needed. In order so make this easy, all the exported functions have +PCRE2_CALL_CONVENTION just before their names. It is rarely needed; if not +set, we ensure here that it has no effect. */ + +#ifndef PCRE2_CALL_CONVENTION +#define PCRE2_CALL_CONVENTION +#endif + +/* Have to include limits.h, stdlib.h, and inttypes.h to ensure that size_t and +uint8_t, UCHAR_MAX, etc are defined. Some systems that do have inttypes.h do +not have stdint.h, which is why we use inttypes.h, which according to the C +standard is a superset of stdint.h. If inttypes.h is not available the build +will break and the relevant values must be provided by some other means. */ + +#include +#include +#include + +/* Allow for C++ users compiling this directly. */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* The following option bits can be passed to pcre2_compile(), pcre2_match(), +or pcre2_dfa_match(). PCRE2_NO_UTF_CHECK affects only the function to which it +is passed. Put these bits at the most significant end of the options word so +others can be added next to them */ + +#define PCRE2_ANCHORED 0x80000000u +#define PCRE2_NO_UTF_CHECK 0x40000000u +#define PCRE2_ENDANCHORED 0x20000000u + +/* The following option bits can be passed only to pcre2_compile(). However, +they may affect compilation, JIT compilation, and/or interpretive execution. +The following tags indicate which: + +C alters what is compiled by pcre2_compile() +J alters what is compiled by pcre2_jit_compile() +M is inspected during pcre2_match() execution +D is inspected during pcre2_dfa_match() execution +*/ + +#define PCRE2_ALLOW_EMPTY_CLASS 0x00000001u /* C */ +#define PCRE2_ALT_BSUX 0x00000002u /* C */ +#define PCRE2_AUTO_CALLOUT 0x00000004u /* C */ +#define PCRE2_CASELESS 0x00000008u /* C */ +#define PCRE2_DOLLAR_ENDONLY 0x00000010u /* J M D */ +#define PCRE2_DOTALL 0x00000020u /* C */ +#define PCRE2_DUPNAMES 0x00000040u /* C */ +#define PCRE2_EXTENDED 0x00000080u /* C */ +#define PCRE2_FIRSTLINE 0x00000100u /* J M D */ +#define PCRE2_MATCH_UNSET_BACKREF 0x00000200u /* C J M */ +#define PCRE2_MULTILINE 0x00000400u /* C */ +#define PCRE2_NEVER_UCP 0x00000800u /* C */ +#define PCRE2_NEVER_UTF 0x00001000u /* C */ +#define PCRE2_NO_AUTO_CAPTURE 0x00002000u /* C */ +#define PCRE2_NO_AUTO_POSSESS 0x00004000u /* C */ +#define PCRE2_NO_DOTSTAR_ANCHOR 0x00008000u /* C */ +#define PCRE2_NO_START_OPTIMIZE 0x00010000u /* J M D */ +#define PCRE2_UCP 0x00020000u /* C J M D */ +#define PCRE2_UNGREEDY 0x00040000u /* C */ +#define PCRE2_UTF 0x00080000u /* C J M D */ +#define PCRE2_NEVER_BACKSLASH_C 0x00100000u /* C */ +#define PCRE2_ALT_CIRCUMFLEX 0x00200000u /* J M D */ +#define PCRE2_ALT_VERBNAMES 0x00400000u /* C */ +#define PCRE2_USE_OFFSET_LIMIT 0x00800000u /* J M D */ +#define PCRE2_EXTENDED_MORE 0x01000000u /* C */ +#define PCRE2_LITERAL 0x02000000u /* C */ +#define PCRE2_MATCH_INVALID_UTF 0x04000000u /* J M D */ + +/* An additional compile options word is available in the compile context. */ + +#define PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES 0x00000001u /* C */ +#define PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL 0x00000002u /* C */ +#define PCRE2_EXTRA_MATCH_WORD 0x00000004u /* C */ +#define PCRE2_EXTRA_MATCH_LINE 0x00000008u /* C */ +#define PCRE2_EXTRA_ESCAPED_CR_IS_LF 0x00000010u /* C */ +#define PCRE2_EXTRA_ALT_BSUX 0x00000020u /* C */ +#define PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK 0x00000040u /* C */ +#define PCRE2_EXTRA_CASELESS_RESTRICT 0x00000080u /* C */ +#define PCRE2_EXTRA_ASCII_BSD 0x00000100u /* C */ +#define PCRE2_EXTRA_ASCII_BSS 0x00000200u /* C */ +#define PCRE2_EXTRA_ASCII_BSW 0x00000400u /* C */ +#define PCRE2_EXTRA_ASCII_POSIX 0x00000800u /* C */ +#define PCRE2_EXTRA_ASCII_DIGIT 0x00001000u /* C */ + +/* These are for pcre2_jit_compile(). */ + +#define PCRE2_JIT_COMPLETE 0x00000001u /* For full matching */ +#define PCRE2_JIT_PARTIAL_SOFT 0x00000002u +#define PCRE2_JIT_PARTIAL_HARD 0x00000004u +#define PCRE2_JIT_INVALID_UTF 0x00000100u + +/* These are for pcre2_match(), pcre2_dfa_match(), pcre2_jit_match(), and +pcre2_substitute(). Some are allowed only for one of the functions, and in +these cases it is noted below. Note that PCRE2_ANCHORED, PCRE2_ENDANCHORED and +PCRE2_NO_UTF_CHECK can also be passed to these functions (though +pcre2_jit_match() ignores the latter since it bypasses all sanity checks). */ + +#define PCRE2_NOTBOL 0x00000001u +#define PCRE2_NOTEOL 0x00000002u +#define PCRE2_NOTEMPTY 0x00000004u /* ) These two must be kept */ +#define PCRE2_NOTEMPTY_ATSTART 0x00000008u /* ) adjacent to each other. */ +#define PCRE2_PARTIAL_SOFT 0x00000010u +#define PCRE2_PARTIAL_HARD 0x00000020u +#define PCRE2_DFA_RESTART 0x00000040u /* pcre2_dfa_match() only */ +#define PCRE2_DFA_SHORTEST 0x00000080u /* pcre2_dfa_match() only */ +#define PCRE2_SUBSTITUTE_GLOBAL 0x00000100u /* pcre2_substitute() only */ +#define PCRE2_SUBSTITUTE_EXTENDED 0x00000200u /* pcre2_substitute() only */ +#define PCRE2_SUBSTITUTE_UNSET_EMPTY 0x00000400u /* pcre2_substitute() only */ +#define PCRE2_SUBSTITUTE_UNKNOWN_UNSET 0x00000800u /* pcre2_substitute() only */ +#define PCRE2_SUBSTITUTE_OVERFLOW_LENGTH 0x00001000u /* pcre2_substitute() only */ +#define PCRE2_NO_JIT 0x00002000u /* not for pcre2_dfa_match() */ +#define PCRE2_COPY_MATCHED_SUBJECT 0x00004000u +#define PCRE2_SUBSTITUTE_LITERAL 0x00008000u /* pcre2_substitute() only */ +#define PCRE2_SUBSTITUTE_MATCHED 0x00010000u /* pcre2_substitute() only */ +#define PCRE2_SUBSTITUTE_REPLACEMENT_ONLY 0x00020000u /* pcre2_substitute() only */ +#define PCRE2_DISABLE_RECURSELOOP_CHECK 0x00040000u /* not for pcre2_dfa_match() or pcre2_jit_match() */ + +/* Options for pcre2_pattern_convert(). */ + +#define PCRE2_CONVERT_UTF 0x00000001u +#define PCRE2_CONVERT_NO_UTF_CHECK 0x00000002u +#define PCRE2_CONVERT_POSIX_BASIC 0x00000004u +#define PCRE2_CONVERT_POSIX_EXTENDED 0x00000008u +#define PCRE2_CONVERT_GLOB 0x00000010u +#define PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR 0x00000030u +#define PCRE2_CONVERT_GLOB_NO_STARSTAR 0x00000050u + +/* Newline and \R settings, for use in compile contexts. The newline values +must be kept in step with values set in config.h and both sets must all be +greater than zero. */ + +#define PCRE2_NEWLINE_CR 1 +#define PCRE2_NEWLINE_LF 2 +#define PCRE2_NEWLINE_CRLF 3 +#define PCRE2_NEWLINE_ANY 4 +#define PCRE2_NEWLINE_ANYCRLF 5 +#define PCRE2_NEWLINE_NUL 6 + +#define PCRE2_BSR_UNICODE 1 +#define PCRE2_BSR_ANYCRLF 2 + +/* Error codes for pcre2_compile(). Some of these are also used by +pcre2_pattern_convert(). */ + +#define PCRE2_ERROR_END_BACKSLASH 101 +#define PCRE2_ERROR_END_BACKSLASH_C 102 +#define PCRE2_ERROR_UNKNOWN_ESCAPE 103 +#define PCRE2_ERROR_QUANTIFIER_OUT_OF_ORDER 104 +#define PCRE2_ERROR_QUANTIFIER_TOO_BIG 105 +#define PCRE2_ERROR_MISSING_SQUARE_BRACKET 106 +#define PCRE2_ERROR_ESCAPE_INVALID_IN_CLASS 107 +#define PCRE2_ERROR_CLASS_RANGE_ORDER 108 +#define PCRE2_ERROR_QUANTIFIER_INVALID 109 +#define PCRE2_ERROR_INTERNAL_UNEXPECTED_REPEAT 110 +#define PCRE2_ERROR_INVALID_AFTER_PARENS_QUERY 111 +#define PCRE2_ERROR_POSIX_CLASS_NOT_IN_CLASS 112 +#define PCRE2_ERROR_POSIX_NO_SUPPORT_COLLATING 113 +#define PCRE2_ERROR_MISSING_CLOSING_PARENTHESIS 114 +#define PCRE2_ERROR_BAD_SUBPATTERN_REFERENCE 115 +#define PCRE2_ERROR_NULL_PATTERN 116 +#define PCRE2_ERROR_BAD_OPTIONS 117 +#define PCRE2_ERROR_MISSING_COMMENT_CLOSING 118 +#define PCRE2_ERROR_PARENTHESES_NEST_TOO_DEEP 119 +#define PCRE2_ERROR_PATTERN_TOO_LARGE 120 +#define PCRE2_ERROR_HEAP_FAILED 121 +#define PCRE2_ERROR_UNMATCHED_CLOSING_PARENTHESIS 122 +#define PCRE2_ERROR_INTERNAL_CODE_OVERFLOW 123 +#define PCRE2_ERROR_MISSING_CONDITION_CLOSING 124 +#define PCRE2_ERROR_LOOKBEHIND_NOT_FIXED_LENGTH 125 +#define PCRE2_ERROR_ZERO_RELATIVE_REFERENCE 126 +#define PCRE2_ERROR_TOO_MANY_CONDITION_BRANCHES 127 +#define PCRE2_ERROR_CONDITION_ASSERTION_EXPECTED 128 +#define PCRE2_ERROR_BAD_RELATIVE_REFERENCE 129 +#define PCRE2_ERROR_UNKNOWN_POSIX_CLASS 130 +#define PCRE2_ERROR_INTERNAL_STUDY_ERROR 131 +#define PCRE2_ERROR_UNICODE_NOT_SUPPORTED 132 +#define PCRE2_ERROR_PARENTHESES_STACK_CHECK 133 +#define PCRE2_ERROR_CODE_POINT_TOO_BIG 134 +#define PCRE2_ERROR_LOOKBEHIND_TOO_COMPLICATED 135 +#define PCRE2_ERROR_LOOKBEHIND_INVALID_BACKSLASH_C 136 +#define PCRE2_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE 137 +#define PCRE2_ERROR_CALLOUT_NUMBER_TOO_BIG 138 +#define PCRE2_ERROR_MISSING_CALLOUT_CLOSING 139 +#define PCRE2_ERROR_ESCAPE_INVALID_IN_VERB 140 +#define PCRE2_ERROR_UNRECOGNIZED_AFTER_QUERY_P 141 +#define PCRE2_ERROR_MISSING_NAME_TERMINATOR 142 +#define PCRE2_ERROR_DUPLICATE_SUBPATTERN_NAME 143 +#define PCRE2_ERROR_INVALID_SUBPATTERN_NAME 144 +#define PCRE2_ERROR_UNICODE_PROPERTIES_UNAVAILABLE 145 +#define PCRE2_ERROR_MALFORMED_UNICODE_PROPERTY 146 +#define PCRE2_ERROR_UNKNOWN_UNICODE_PROPERTY 147 +#define PCRE2_ERROR_SUBPATTERN_NAME_TOO_LONG 148 +#define PCRE2_ERROR_TOO_MANY_NAMED_SUBPATTERNS 149 +#define PCRE2_ERROR_CLASS_INVALID_RANGE 150 +#define PCRE2_ERROR_OCTAL_BYTE_TOO_BIG 151 +#define PCRE2_ERROR_INTERNAL_OVERRAN_WORKSPACE 152 +#define PCRE2_ERROR_INTERNAL_MISSING_SUBPATTERN 153 +#define PCRE2_ERROR_DEFINE_TOO_MANY_BRANCHES 154 +#define PCRE2_ERROR_BACKSLASH_O_MISSING_BRACE 155 +#define PCRE2_ERROR_INTERNAL_UNKNOWN_NEWLINE 156 +#define PCRE2_ERROR_BACKSLASH_G_SYNTAX 157 +#define PCRE2_ERROR_PARENS_QUERY_R_MISSING_CLOSING 158 +/* Error 159 is obsolete and should now never occur */ +#define PCRE2_ERROR_VERB_ARGUMENT_NOT_ALLOWED 159 +#define PCRE2_ERROR_VERB_UNKNOWN 160 +#define PCRE2_ERROR_SUBPATTERN_NUMBER_TOO_BIG 161 +#define PCRE2_ERROR_SUBPATTERN_NAME_EXPECTED 162 +#define PCRE2_ERROR_INTERNAL_PARSED_OVERFLOW 163 +#define PCRE2_ERROR_INVALID_OCTAL 164 +#define PCRE2_ERROR_SUBPATTERN_NAMES_MISMATCH 165 +#define PCRE2_ERROR_MARK_MISSING_ARGUMENT 166 +#define PCRE2_ERROR_INVALID_HEXADECIMAL 167 +#define PCRE2_ERROR_BACKSLASH_C_SYNTAX 168 +#define PCRE2_ERROR_BACKSLASH_K_SYNTAX 169 +#define PCRE2_ERROR_INTERNAL_BAD_CODE_LOOKBEHINDS 170 +#define PCRE2_ERROR_BACKSLASH_N_IN_CLASS 171 +#define PCRE2_ERROR_CALLOUT_STRING_TOO_LONG 172 +#define PCRE2_ERROR_UNICODE_DISALLOWED_CODE_POINT 173 +#define PCRE2_ERROR_UTF_IS_DISABLED 174 +#define PCRE2_ERROR_UCP_IS_DISABLED 175 +#define PCRE2_ERROR_VERB_NAME_TOO_LONG 176 +#define PCRE2_ERROR_BACKSLASH_U_CODE_POINT_TOO_BIG 177 +#define PCRE2_ERROR_MISSING_OCTAL_OR_HEX_DIGITS 178 +#define PCRE2_ERROR_VERSION_CONDITION_SYNTAX 179 +#define PCRE2_ERROR_INTERNAL_BAD_CODE_AUTO_POSSESS 180 +#define PCRE2_ERROR_CALLOUT_NO_STRING_DELIMITER 181 +#define PCRE2_ERROR_CALLOUT_BAD_STRING_DELIMITER 182 +#define PCRE2_ERROR_BACKSLASH_C_CALLER_DISABLED 183 +#define PCRE2_ERROR_QUERY_BARJX_NEST_TOO_DEEP 184 +#define PCRE2_ERROR_BACKSLASH_C_LIBRARY_DISABLED 185 +#define PCRE2_ERROR_PATTERN_TOO_COMPLICATED 186 +#define PCRE2_ERROR_LOOKBEHIND_TOO_LONG 187 +#define PCRE2_ERROR_PATTERN_STRING_TOO_LONG 188 +#define PCRE2_ERROR_INTERNAL_BAD_CODE 189 +#define PCRE2_ERROR_INTERNAL_BAD_CODE_IN_SKIP 190 +#define PCRE2_ERROR_NO_SURROGATES_IN_UTF16 191 +#define PCRE2_ERROR_BAD_LITERAL_OPTIONS 192 +#define PCRE2_ERROR_SUPPORTED_ONLY_IN_UNICODE 193 +#define PCRE2_ERROR_INVALID_HYPHEN_IN_OPTIONS 194 +#define PCRE2_ERROR_ALPHA_ASSERTION_UNKNOWN 195 +#define PCRE2_ERROR_SCRIPT_RUN_NOT_AVAILABLE 196 +#define PCRE2_ERROR_TOO_MANY_CAPTURES 197 +#define PCRE2_ERROR_CONDITION_ATOMIC_ASSERTION_EXPECTED 198 +#define PCRE2_ERROR_BACKSLASH_K_IN_LOOKAROUND 199 + + +/* "Expected" matching error codes: no match and partial match. */ + +#define PCRE2_ERROR_NOMATCH (-1) +#define PCRE2_ERROR_PARTIAL (-2) + +/* Error codes for UTF-8 validity checks */ + +#define PCRE2_ERROR_UTF8_ERR1 (-3) +#define PCRE2_ERROR_UTF8_ERR2 (-4) +#define PCRE2_ERROR_UTF8_ERR3 (-5) +#define PCRE2_ERROR_UTF8_ERR4 (-6) +#define PCRE2_ERROR_UTF8_ERR5 (-7) +#define PCRE2_ERROR_UTF8_ERR6 (-8) +#define PCRE2_ERROR_UTF8_ERR7 (-9) +#define PCRE2_ERROR_UTF8_ERR8 (-10) +#define PCRE2_ERROR_UTF8_ERR9 (-11) +#define PCRE2_ERROR_UTF8_ERR10 (-12) +#define PCRE2_ERROR_UTF8_ERR11 (-13) +#define PCRE2_ERROR_UTF8_ERR12 (-14) +#define PCRE2_ERROR_UTF8_ERR13 (-15) +#define PCRE2_ERROR_UTF8_ERR14 (-16) +#define PCRE2_ERROR_UTF8_ERR15 (-17) +#define PCRE2_ERROR_UTF8_ERR16 (-18) +#define PCRE2_ERROR_UTF8_ERR17 (-19) +#define PCRE2_ERROR_UTF8_ERR18 (-20) +#define PCRE2_ERROR_UTF8_ERR19 (-21) +#define PCRE2_ERROR_UTF8_ERR20 (-22) +#define PCRE2_ERROR_UTF8_ERR21 (-23) + +/* Error codes for UTF-16 validity checks */ + +#define PCRE2_ERROR_UTF16_ERR1 (-24) +#define PCRE2_ERROR_UTF16_ERR2 (-25) +#define PCRE2_ERROR_UTF16_ERR3 (-26) + +/* Error codes for UTF-32 validity checks */ + +#define PCRE2_ERROR_UTF32_ERR1 (-27) +#define PCRE2_ERROR_UTF32_ERR2 (-28) + +/* Miscellaneous error codes for pcre2[_dfa]_match(), substring extraction +functions, context functions, and serializing functions. They are in numerical +order. Originally they were in alphabetical order too, but now that PCRE2 is +released, the numbers must not be changed. */ + +#define PCRE2_ERROR_BADDATA (-29) +#define PCRE2_ERROR_MIXEDTABLES (-30) /* Name was changed */ +#define PCRE2_ERROR_BADMAGIC (-31) +#define PCRE2_ERROR_BADMODE (-32) +#define PCRE2_ERROR_BADOFFSET (-33) +#define PCRE2_ERROR_BADOPTION (-34) +#define PCRE2_ERROR_BADREPLACEMENT (-35) +#define PCRE2_ERROR_BADUTFOFFSET (-36) +#define PCRE2_ERROR_CALLOUT (-37) /* Never used by PCRE2 itself */ +#define PCRE2_ERROR_DFA_BADRESTART (-38) +#define PCRE2_ERROR_DFA_RECURSE (-39) +#define PCRE2_ERROR_DFA_UCOND (-40) +#define PCRE2_ERROR_DFA_UFUNC (-41) +#define PCRE2_ERROR_DFA_UITEM (-42) +#define PCRE2_ERROR_DFA_WSSIZE (-43) +#define PCRE2_ERROR_INTERNAL (-44) +#define PCRE2_ERROR_JIT_BADOPTION (-45) +#define PCRE2_ERROR_JIT_STACKLIMIT (-46) +#define PCRE2_ERROR_MATCHLIMIT (-47) +#define PCRE2_ERROR_NOMEMORY (-48) +#define PCRE2_ERROR_NOSUBSTRING (-49) +#define PCRE2_ERROR_NOUNIQUESUBSTRING (-50) +#define PCRE2_ERROR_NULL (-51) +#define PCRE2_ERROR_RECURSELOOP (-52) +#define PCRE2_ERROR_DEPTHLIMIT (-53) +#define PCRE2_ERROR_RECURSIONLIMIT (-53) /* Obsolete synonym */ +#define PCRE2_ERROR_UNAVAILABLE (-54) +#define PCRE2_ERROR_UNSET (-55) +#define PCRE2_ERROR_BADOFFSETLIMIT (-56) +#define PCRE2_ERROR_BADREPESCAPE (-57) +#define PCRE2_ERROR_REPMISSINGBRACE (-58) +#define PCRE2_ERROR_BADSUBSTITUTION (-59) +#define PCRE2_ERROR_BADSUBSPATTERN (-60) +#define PCRE2_ERROR_TOOMANYREPLACE (-61) +#define PCRE2_ERROR_BADSERIALIZEDDATA (-62) +#define PCRE2_ERROR_HEAPLIMIT (-63) +#define PCRE2_ERROR_CONVERT_SYNTAX (-64) +#define PCRE2_ERROR_INTERNAL_DUPMATCH (-65) +#define PCRE2_ERROR_DFA_UINVALID_UTF (-66) +#define PCRE2_ERROR_INVALIDOFFSET (-67) + + +/* Request types for pcre2_pattern_info() */ + +#define PCRE2_INFO_ALLOPTIONS 0 +#define PCRE2_INFO_ARGOPTIONS 1 +#define PCRE2_INFO_BACKREFMAX 2 +#define PCRE2_INFO_BSR 3 +#define PCRE2_INFO_CAPTURECOUNT 4 +#define PCRE2_INFO_FIRSTCODEUNIT 5 +#define PCRE2_INFO_FIRSTCODETYPE 6 +#define PCRE2_INFO_FIRSTBITMAP 7 +#define PCRE2_INFO_HASCRORLF 8 +#define PCRE2_INFO_JCHANGED 9 +#define PCRE2_INFO_JITSIZE 10 +#define PCRE2_INFO_LASTCODEUNIT 11 +#define PCRE2_INFO_LASTCODETYPE 12 +#define PCRE2_INFO_MATCHEMPTY 13 +#define PCRE2_INFO_MATCHLIMIT 14 +#define PCRE2_INFO_MAXLOOKBEHIND 15 +#define PCRE2_INFO_MINLENGTH 16 +#define PCRE2_INFO_NAMECOUNT 17 +#define PCRE2_INFO_NAMEENTRYSIZE 18 +#define PCRE2_INFO_NAMETABLE 19 +#define PCRE2_INFO_NEWLINE 20 +#define PCRE2_INFO_DEPTHLIMIT 21 +#define PCRE2_INFO_RECURSIONLIMIT 21 /* Obsolete synonym */ +#define PCRE2_INFO_SIZE 22 +#define PCRE2_INFO_HASBACKSLASHC 23 +#define PCRE2_INFO_FRAMESIZE 24 +#define PCRE2_INFO_HEAPLIMIT 25 +#define PCRE2_INFO_EXTRAOPTIONS 26 + +/* Request types for pcre2_config(). */ + +#define PCRE2_CONFIG_BSR 0 +#define PCRE2_CONFIG_JIT 1 +#define PCRE2_CONFIG_JITTARGET 2 +#define PCRE2_CONFIG_LINKSIZE 3 +#define PCRE2_CONFIG_MATCHLIMIT 4 +#define PCRE2_CONFIG_NEWLINE 5 +#define PCRE2_CONFIG_PARENSLIMIT 6 +#define PCRE2_CONFIG_DEPTHLIMIT 7 +#define PCRE2_CONFIG_RECURSIONLIMIT 7 /* Obsolete synonym */ +#define PCRE2_CONFIG_STACKRECURSE 8 /* Obsolete */ +#define PCRE2_CONFIG_UNICODE 9 +#define PCRE2_CONFIG_UNICODE_VERSION 10 +#define PCRE2_CONFIG_VERSION 11 +#define PCRE2_CONFIG_HEAPLIMIT 12 +#define PCRE2_CONFIG_NEVER_BACKSLASH_C 13 +#define PCRE2_CONFIG_COMPILED_WIDTHS 14 +#define PCRE2_CONFIG_TABLES_LENGTH 15 + + +/* Types for code units in patterns and subject strings. */ + +typedef uint8_t PCRE2_UCHAR8; +typedef uint16_t PCRE2_UCHAR16; +typedef uint32_t PCRE2_UCHAR32; + +typedef const PCRE2_UCHAR8 *PCRE2_SPTR8; +typedef const PCRE2_UCHAR16 *PCRE2_SPTR16; +typedef const PCRE2_UCHAR32 *PCRE2_SPTR32; + +/* The PCRE2_SIZE type is used for all string lengths and offsets in PCRE2, +including pattern offsets for errors and subject offsets after a match. We +define special values to indicate zero-terminated strings and unset offsets in +the offset vector (ovector). */ + +#define PCRE2_SIZE size_t +#define PCRE2_SIZE_MAX SIZE_MAX +#define PCRE2_ZERO_TERMINATED (~(PCRE2_SIZE)0) +#define PCRE2_UNSET (~(PCRE2_SIZE)0) + +/* Generic types for opaque structures and JIT callback functions. These +declarations are defined in a macro that is expanded for each width later. */ + +#define PCRE2_TYPES_LIST \ +struct pcre2_real_general_context; \ +typedef struct pcre2_real_general_context pcre2_general_context; \ +\ +struct pcre2_real_compile_context; \ +typedef struct pcre2_real_compile_context pcre2_compile_context; \ +\ +struct pcre2_real_match_context; \ +typedef struct pcre2_real_match_context pcre2_match_context; \ +\ +struct pcre2_real_convert_context; \ +typedef struct pcre2_real_convert_context pcre2_convert_context; \ +\ +struct pcre2_real_code; \ +typedef struct pcre2_real_code pcre2_code; \ +\ +struct pcre2_real_match_data; \ +typedef struct pcre2_real_match_data pcre2_match_data; \ +\ +struct pcre2_real_jit_stack; \ +typedef struct pcre2_real_jit_stack pcre2_jit_stack; \ +\ +typedef pcre2_jit_stack *(*pcre2_jit_callback)(void *); + + +/* The structures for passing out data via callout functions. We use structures +so that new fields can be added on the end in future versions, without changing +the API of the function, thereby allowing old clients to work without +modification. Define the generic versions in a macro; the width-specific +versions are generated from this macro below. */ + +/* Flags for the callout_flags field. These are cleared after a callout. */ + +#define PCRE2_CALLOUT_STARTMATCH 0x00000001u /* Set for each bumpalong */ +#define PCRE2_CALLOUT_BACKTRACK 0x00000002u /* Set after a backtrack */ + +#define PCRE2_STRUCTURE_LIST \ +typedef struct pcre2_callout_block { \ + uint32_t version; /* Identifies version of block */ \ + /* ------------------------ Version 0 ------------------------------- */ \ + uint32_t callout_number; /* Number compiled into pattern */ \ + uint32_t capture_top; /* Max current capture */ \ + uint32_t capture_last; /* Most recently closed capture */ \ + PCRE2_SIZE *offset_vector; /* The offset vector */ \ + PCRE2_SPTR mark; /* Pointer to current mark or NULL */ \ + PCRE2_SPTR subject; /* The subject being matched */ \ + PCRE2_SIZE subject_length; /* The length of the subject */ \ + PCRE2_SIZE start_match; /* Offset to start of this match attempt */ \ + PCRE2_SIZE current_position; /* Where we currently are in the subject */ \ + PCRE2_SIZE pattern_position; /* Offset to next item in the pattern */ \ + PCRE2_SIZE next_item_length; /* Length of next item in the pattern */ \ + /* ------------------- Added for Version 1 -------------------------- */ \ + PCRE2_SIZE callout_string_offset; /* Offset to string within pattern */ \ + PCRE2_SIZE callout_string_length; /* Length of string compiled into pattern */ \ + PCRE2_SPTR callout_string; /* String compiled into pattern */ \ + /* ------------------- Added for Version 2 -------------------------- */ \ + uint32_t callout_flags; /* See above for list */ \ + /* ------------------------------------------------------------------ */ \ +} pcre2_callout_block; \ +\ +typedef struct pcre2_callout_enumerate_block { \ + uint32_t version; /* Identifies version of block */ \ + /* ------------------------ Version 0 ------------------------------- */ \ + PCRE2_SIZE pattern_position; /* Offset to next item in the pattern */ \ + PCRE2_SIZE next_item_length; /* Length of next item in the pattern */ \ + uint32_t callout_number; /* Number compiled into pattern */ \ + PCRE2_SIZE callout_string_offset; /* Offset to string within pattern */ \ + PCRE2_SIZE callout_string_length; /* Length of string compiled into pattern */ \ + PCRE2_SPTR callout_string; /* String compiled into pattern */ \ + /* ------------------------------------------------------------------ */ \ +} pcre2_callout_enumerate_block; \ +\ +typedef struct pcre2_substitute_callout_block { \ + uint32_t version; /* Identifies version of block */ \ + /* ------------------------ Version 0 ------------------------------- */ \ + PCRE2_SPTR input; /* Pointer to input subject string */ \ + PCRE2_SPTR output; /* Pointer to output buffer */ \ + PCRE2_SIZE output_offsets[2]; /* Changed portion of the output */ \ + PCRE2_SIZE *ovector; /* Pointer to current ovector */ \ + uint32_t oveccount; /* Count of pairs set in ovector */ \ + uint32_t subscount; /* Substitution number */ \ + /* ------------------------------------------------------------------ */ \ +} pcre2_substitute_callout_block; + + +/* List the generic forms of all other functions in macros, which will be +expanded for each width below. Start with functions that give general +information. */ + +#define PCRE2_GENERAL_INFO_FUNCTIONS \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION pcre2_config(uint32_t, void *); + + +/* Functions for manipulating contexts. */ + +#define PCRE2_GENERAL_CONTEXT_FUNCTIONS \ +PCRE2_EXP_DECL pcre2_general_context *PCRE2_CALL_CONVENTION \ + pcre2_general_context_copy(pcre2_general_context *); \ +PCRE2_EXP_DECL pcre2_general_context *PCRE2_CALL_CONVENTION \ + pcre2_general_context_create(void *(*)(size_t, void *), \ + void (*)(void *, void *), void *); \ +PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ + pcre2_general_context_free(pcre2_general_context *); + +#define PCRE2_COMPILE_CONTEXT_FUNCTIONS \ +PCRE2_EXP_DECL pcre2_compile_context *PCRE2_CALL_CONVENTION \ + pcre2_compile_context_copy(pcre2_compile_context *); \ +PCRE2_EXP_DECL pcre2_compile_context *PCRE2_CALL_CONVENTION \ + pcre2_compile_context_create(pcre2_general_context *);\ +PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ + pcre2_compile_context_free(pcre2_compile_context *); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_bsr(pcre2_compile_context *, uint32_t); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_character_tables(pcre2_compile_context *, const uint8_t *); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_compile_extra_options(pcre2_compile_context *, uint32_t); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_max_pattern_length(pcre2_compile_context *, PCRE2_SIZE); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_max_varlookbehind(pcre2_compile_context *, uint32_t); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_newline(pcre2_compile_context *, uint32_t); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_parens_nest_limit(pcre2_compile_context *, uint32_t); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_compile_recursion_guard(pcre2_compile_context *, \ + int (*)(uint32_t, void *), void *); + +#define PCRE2_MATCH_CONTEXT_FUNCTIONS \ +PCRE2_EXP_DECL pcre2_match_context *PCRE2_CALL_CONVENTION \ + pcre2_match_context_copy(pcre2_match_context *); \ +PCRE2_EXP_DECL pcre2_match_context *PCRE2_CALL_CONVENTION \ + pcre2_match_context_create(pcre2_general_context *); \ +PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ + pcre2_match_context_free(pcre2_match_context *); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_callout(pcre2_match_context *, \ + int (*)(pcre2_callout_block *, void *), void *); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_substitute_callout(pcre2_match_context *, \ + int (*)(pcre2_substitute_callout_block *, void *), void *); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_depth_limit(pcre2_match_context *, uint32_t); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_heap_limit(pcre2_match_context *, uint32_t); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_match_limit(pcre2_match_context *, uint32_t); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_offset_limit(pcre2_match_context *, PCRE2_SIZE); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_recursion_limit(pcre2_match_context *, uint32_t); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_recursion_memory_management(pcre2_match_context *, \ + void *(*)(size_t, void *), void (*)(void *, void *), void *); + +#define PCRE2_CONVERT_CONTEXT_FUNCTIONS \ +PCRE2_EXP_DECL pcre2_convert_context *PCRE2_CALL_CONVENTION \ + pcre2_convert_context_copy(pcre2_convert_context *); \ +PCRE2_EXP_DECL pcre2_convert_context *PCRE2_CALL_CONVENTION \ + pcre2_convert_context_create(pcre2_general_context *); \ +PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ + pcre2_convert_context_free(pcre2_convert_context *); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_glob_escape(pcre2_convert_context *, uint32_t); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_set_glob_separator(pcre2_convert_context *, uint32_t); + + +/* Functions concerned with compiling a pattern to PCRE internal code. */ + +#define PCRE2_COMPILE_FUNCTIONS \ +PCRE2_EXP_DECL pcre2_code *PCRE2_CALL_CONVENTION \ + pcre2_compile(PCRE2_SPTR, PCRE2_SIZE, uint32_t, int *, PCRE2_SIZE *, \ + pcre2_compile_context *); \ +PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ + pcre2_code_free(pcre2_code *); \ +PCRE2_EXP_DECL pcre2_code *PCRE2_CALL_CONVENTION \ + pcre2_code_copy(const pcre2_code *); \ +PCRE2_EXP_DECL pcre2_code *PCRE2_CALL_CONVENTION \ + pcre2_code_copy_with_tables(const pcre2_code *); + + +/* Functions that give information about a compiled pattern. */ + +#define PCRE2_PATTERN_INFO_FUNCTIONS \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_pattern_info(const pcre2_code *, uint32_t, void *); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_callout_enumerate(const pcre2_code *, \ + int (*)(pcre2_callout_enumerate_block *, void *), void *); + + +/* Functions for running a match and inspecting the result. */ + +#define PCRE2_MATCH_FUNCTIONS \ +PCRE2_EXP_DECL pcre2_match_data *PCRE2_CALL_CONVENTION \ + pcre2_match_data_create(uint32_t, pcre2_general_context *); \ +PCRE2_EXP_DECL pcre2_match_data *PCRE2_CALL_CONVENTION \ + pcre2_match_data_create_from_pattern(const pcre2_code *, \ + pcre2_general_context *); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_dfa_match(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \ + uint32_t, pcre2_match_data *, pcre2_match_context *, int *, PCRE2_SIZE); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_match(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \ + uint32_t, pcre2_match_data *, pcre2_match_context *); \ +PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ + pcre2_match_data_free(pcre2_match_data *); \ +PCRE2_EXP_DECL PCRE2_SPTR PCRE2_CALL_CONVENTION \ + pcre2_get_mark(pcre2_match_data *); \ +PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \ + pcre2_get_match_data_size(pcre2_match_data *); \ +PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \ + pcre2_get_match_data_heapframes_size(pcre2_match_data *); \ +PCRE2_EXP_DECL uint32_t PCRE2_CALL_CONVENTION \ + pcre2_get_ovector_count(pcre2_match_data *); \ +PCRE2_EXP_DECL PCRE2_SIZE *PCRE2_CALL_CONVENTION \ + pcre2_get_ovector_pointer(pcre2_match_data *); \ +PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \ + pcre2_get_startchar(pcre2_match_data *); + + +/* Convenience functions for handling matched substrings. */ + +#define PCRE2_SUBSTRING_FUNCTIONS \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_substring_copy_byname(pcre2_match_data *, PCRE2_SPTR, PCRE2_UCHAR *, \ + PCRE2_SIZE *); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_substring_copy_bynumber(pcre2_match_data *, uint32_t, PCRE2_UCHAR *, \ + PCRE2_SIZE *); \ +PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ + pcre2_substring_free(PCRE2_UCHAR *); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_substring_get_byname(pcre2_match_data *, PCRE2_SPTR, PCRE2_UCHAR **, \ + PCRE2_SIZE *); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_substring_get_bynumber(pcre2_match_data *, uint32_t, PCRE2_UCHAR **, \ + PCRE2_SIZE *); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_substring_length_byname(pcre2_match_data *, PCRE2_SPTR, PCRE2_SIZE *); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_substring_length_bynumber(pcre2_match_data *, uint32_t, PCRE2_SIZE *); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_substring_nametable_scan(const pcre2_code *, PCRE2_SPTR, PCRE2_SPTR *, \ + PCRE2_SPTR *); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_substring_number_from_name(const pcre2_code *, PCRE2_SPTR); \ +PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ + pcre2_substring_list_free(PCRE2_UCHAR **); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_substring_list_get(pcre2_match_data *, PCRE2_UCHAR ***, PCRE2_SIZE **); + +/* Functions for serializing / deserializing compiled patterns. */ + +#define PCRE2_SERIALIZE_FUNCTIONS \ +PCRE2_EXP_DECL int32_t PCRE2_CALL_CONVENTION \ + pcre2_serialize_encode(const pcre2_code **, int32_t, uint8_t **, \ + PCRE2_SIZE *, pcre2_general_context *); \ +PCRE2_EXP_DECL int32_t PCRE2_CALL_CONVENTION \ + pcre2_serialize_decode(pcre2_code **, int32_t, const uint8_t *, \ + pcre2_general_context *); \ +PCRE2_EXP_DECL int32_t PCRE2_CALL_CONVENTION \ + pcre2_serialize_get_number_of_codes(const uint8_t *); \ +PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ + pcre2_serialize_free(uint8_t *); + + +/* Convenience function for match + substitute. */ + +#define PCRE2_SUBSTITUTE_FUNCTION \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_substitute(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \ + uint32_t, pcre2_match_data *, pcre2_match_context *, PCRE2_SPTR, \ + PCRE2_SIZE, PCRE2_UCHAR *, PCRE2_SIZE *); + + +/* Functions for converting pattern source strings. */ + +#define PCRE2_CONVERT_FUNCTIONS \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_pattern_convert(PCRE2_SPTR, PCRE2_SIZE, uint32_t, PCRE2_UCHAR **, \ + PCRE2_SIZE *, pcre2_convert_context *); \ +PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ + pcre2_converted_pattern_free(PCRE2_UCHAR *); + + +/* Functions for JIT processing */ + +#define PCRE2_JIT_FUNCTIONS \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_jit_compile(pcre2_code *, uint32_t); \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_jit_match(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \ + uint32_t, pcre2_match_data *, pcre2_match_context *); \ +PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ + pcre2_jit_free_unused_memory(pcre2_general_context *); \ +PCRE2_EXP_DECL pcre2_jit_stack *PCRE2_CALL_CONVENTION \ + pcre2_jit_stack_create(size_t, size_t, pcre2_general_context *); \ +PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ + pcre2_jit_stack_assign(pcre2_match_context *, pcre2_jit_callback, void *); \ +PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ + pcre2_jit_stack_free(pcre2_jit_stack *); + + +/* Other miscellaneous functions. */ + +#define PCRE2_OTHER_FUNCTIONS \ +PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ + pcre2_get_error_message(int, PCRE2_UCHAR *, PCRE2_SIZE); \ +PCRE2_EXP_DECL const uint8_t *PCRE2_CALL_CONVENTION \ + pcre2_maketables(pcre2_general_context *); \ +PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ + pcre2_maketables_free(pcre2_general_context *, const uint8_t *); + +/* Define macros that generate width-specific names from generic versions. The +three-level macro scheme is necessary to get the macros expanded when we want +them to be. First we get the width from PCRE2_LOCAL_WIDTH, which is used for +generating three versions of everything below. After that, PCRE2_SUFFIX will be +re-defined to use PCRE2_CODE_UNIT_WIDTH, for use when macros such as +pcre2_compile are called by application code. */ + +#define PCRE2_JOIN(a,b) a ## b +#define PCRE2_GLUE(a,b) PCRE2_JOIN(a,b) +#define PCRE2_SUFFIX(a) PCRE2_GLUE(a,PCRE2_LOCAL_WIDTH) + + +/* Data types */ + +#define PCRE2_UCHAR PCRE2_SUFFIX(PCRE2_UCHAR) +#define PCRE2_SPTR PCRE2_SUFFIX(PCRE2_SPTR) + +#define pcre2_code PCRE2_SUFFIX(pcre2_code_) +#define pcre2_jit_callback PCRE2_SUFFIX(pcre2_jit_callback_) +#define pcre2_jit_stack PCRE2_SUFFIX(pcre2_jit_stack_) + +#define pcre2_real_code PCRE2_SUFFIX(pcre2_real_code_) +#define pcre2_real_general_context PCRE2_SUFFIX(pcre2_real_general_context_) +#define pcre2_real_compile_context PCRE2_SUFFIX(pcre2_real_compile_context_) +#define pcre2_real_convert_context PCRE2_SUFFIX(pcre2_real_convert_context_) +#define pcre2_real_match_context PCRE2_SUFFIX(pcre2_real_match_context_) +#define pcre2_real_jit_stack PCRE2_SUFFIX(pcre2_real_jit_stack_) +#define pcre2_real_match_data PCRE2_SUFFIX(pcre2_real_match_data_) + + +/* Data blocks */ + +#define pcre2_callout_block PCRE2_SUFFIX(pcre2_callout_block_) +#define pcre2_callout_enumerate_block PCRE2_SUFFIX(pcre2_callout_enumerate_block_) +#define pcre2_substitute_callout_block PCRE2_SUFFIX(pcre2_substitute_callout_block_) +#define pcre2_general_context PCRE2_SUFFIX(pcre2_general_context_) +#define pcre2_compile_context PCRE2_SUFFIX(pcre2_compile_context_) +#define pcre2_convert_context PCRE2_SUFFIX(pcre2_convert_context_) +#define pcre2_match_context PCRE2_SUFFIX(pcre2_match_context_) +#define pcre2_match_data PCRE2_SUFFIX(pcre2_match_data_) + + +/* Functions: the complete list in alphabetical order */ + +#define pcre2_callout_enumerate PCRE2_SUFFIX(pcre2_callout_enumerate_) +#define pcre2_code_copy PCRE2_SUFFIX(pcre2_code_copy_) +#define pcre2_code_copy_with_tables PCRE2_SUFFIX(pcre2_code_copy_with_tables_) +#define pcre2_code_free PCRE2_SUFFIX(pcre2_code_free_) +#define pcre2_compile PCRE2_SUFFIX(pcre2_compile_) +#define pcre2_compile_context_copy PCRE2_SUFFIX(pcre2_compile_context_copy_) +#define pcre2_compile_context_create PCRE2_SUFFIX(pcre2_compile_context_create_) +#define pcre2_compile_context_free PCRE2_SUFFIX(pcre2_compile_context_free_) +#define pcre2_config PCRE2_SUFFIX(pcre2_config_) +#define pcre2_convert_context_copy PCRE2_SUFFIX(pcre2_convert_context_copy_) +#define pcre2_convert_context_create PCRE2_SUFFIX(pcre2_convert_context_create_) +#define pcre2_convert_context_free PCRE2_SUFFIX(pcre2_convert_context_free_) +#define pcre2_converted_pattern_free PCRE2_SUFFIX(pcre2_converted_pattern_free_) +#define pcre2_dfa_match PCRE2_SUFFIX(pcre2_dfa_match_) +#define pcre2_general_context_copy PCRE2_SUFFIX(pcre2_general_context_copy_) +#define pcre2_general_context_create PCRE2_SUFFIX(pcre2_general_context_create_) +#define pcre2_general_context_free PCRE2_SUFFIX(pcre2_general_context_free_) +#define pcre2_get_error_message PCRE2_SUFFIX(pcre2_get_error_message_) +#define pcre2_get_mark PCRE2_SUFFIX(pcre2_get_mark_) +#define pcre2_get_match_data_heapframes_size PCRE2_SUFFIX(pcre2_get_match_data_heapframes_size_) +#define pcre2_get_match_data_size PCRE2_SUFFIX(pcre2_get_match_data_size_) +#define pcre2_get_ovector_pointer PCRE2_SUFFIX(pcre2_get_ovector_pointer_) +#define pcre2_get_ovector_count PCRE2_SUFFIX(pcre2_get_ovector_count_) +#define pcre2_get_startchar PCRE2_SUFFIX(pcre2_get_startchar_) +#define pcre2_jit_compile PCRE2_SUFFIX(pcre2_jit_compile_) +#define pcre2_jit_match PCRE2_SUFFIX(pcre2_jit_match_) +#define pcre2_jit_free_unused_memory PCRE2_SUFFIX(pcre2_jit_free_unused_memory_) +#define pcre2_jit_stack_assign PCRE2_SUFFIX(pcre2_jit_stack_assign_) +#define pcre2_jit_stack_create PCRE2_SUFFIX(pcre2_jit_stack_create_) +#define pcre2_jit_stack_free PCRE2_SUFFIX(pcre2_jit_stack_free_) +#define pcre2_maketables PCRE2_SUFFIX(pcre2_maketables_) +#define pcre2_maketables_free PCRE2_SUFFIX(pcre2_maketables_free_) +#define pcre2_match PCRE2_SUFFIX(pcre2_match_) +#define pcre2_match_context_copy PCRE2_SUFFIX(pcre2_match_context_copy_) +#define pcre2_match_context_create PCRE2_SUFFIX(pcre2_match_context_create_) +#define pcre2_match_context_free PCRE2_SUFFIX(pcre2_match_context_free_) +#define pcre2_match_data_create PCRE2_SUFFIX(pcre2_match_data_create_) +#define pcre2_match_data_create_from_pattern PCRE2_SUFFIX(pcre2_match_data_create_from_pattern_) +#define pcre2_match_data_free PCRE2_SUFFIX(pcre2_match_data_free_) +#define pcre2_pattern_convert PCRE2_SUFFIX(pcre2_pattern_convert_) +#define pcre2_pattern_info PCRE2_SUFFIX(pcre2_pattern_info_) +#define pcre2_serialize_decode PCRE2_SUFFIX(pcre2_serialize_decode_) +#define pcre2_serialize_encode PCRE2_SUFFIX(pcre2_serialize_encode_) +#define pcre2_serialize_free PCRE2_SUFFIX(pcre2_serialize_free_) +#define pcre2_serialize_get_number_of_codes PCRE2_SUFFIX(pcre2_serialize_get_number_of_codes_) +#define pcre2_set_bsr PCRE2_SUFFIX(pcre2_set_bsr_) +#define pcre2_set_callout PCRE2_SUFFIX(pcre2_set_callout_) +#define pcre2_set_character_tables PCRE2_SUFFIX(pcre2_set_character_tables_) +#define pcre2_set_compile_extra_options PCRE2_SUFFIX(pcre2_set_compile_extra_options_) +#define pcre2_set_compile_recursion_guard PCRE2_SUFFIX(pcre2_set_compile_recursion_guard_) +#define pcre2_set_depth_limit PCRE2_SUFFIX(pcre2_set_depth_limit_) +#define pcre2_set_glob_escape PCRE2_SUFFIX(pcre2_set_glob_escape_) +#define pcre2_set_glob_separator PCRE2_SUFFIX(pcre2_set_glob_separator_) +#define pcre2_set_heap_limit PCRE2_SUFFIX(pcre2_set_heap_limit_) +#define pcre2_set_match_limit PCRE2_SUFFIX(pcre2_set_match_limit_) +#define pcre2_set_max_varlookbehind PCRE2_SUFFIX(pcre2_set_max_varlookbehind_) +#define pcre2_set_max_pattern_length PCRE2_SUFFIX(pcre2_set_max_pattern_length_) +#define pcre2_set_newline PCRE2_SUFFIX(pcre2_set_newline_) +#define pcre2_set_parens_nest_limit PCRE2_SUFFIX(pcre2_set_parens_nest_limit_) +#define pcre2_set_offset_limit PCRE2_SUFFIX(pcre2_set_offset_limit_) +#define pcre2_set_substitute_callout PCRE2_SUFFIX(pcre2_set_substitute_callout_) +#define pcre2_substitute PCRE2_SUFFIX(pcre2_substitute_) +#define pcre2_substring_copy_byname PCRE2_SUFFIX(pcre2_substring_copy_byname_) +#define pcre2_substring_copy_bynumber PCRE2_SUFFIX(pcre2_substring_copy_bynumber_) +#define pcre2_substring_free PCRE2_SUFFIX(pcre2_substring_free_) +#define pcre2_substring_get_byname PCRE2_SUFFIX(pcre2_substring_get_byname_) +#define pcre2_substring_get_bynumber PCRE2_SUFFIX(pcre2_substring_get_bynumber_) +#define pcre2_substring_length_byname PCRE2_SUFFIX(pcre2_substring_length_byname_) +#define pcre2_substring_length_bynumber PCRE2_SUFFIX(pcre2_substring_length_bynumber_) +#define pcre2_substring_list_get PCRE2_SUFFIX(pcre2_substring_list_get_) +#define pcre2_substring_list_free PCRE2_SUFFIX(pcre2_substring_list_free_) +#define pcre2_substring_nametable_scan PCRE2_SUFFIX(pcre2_substring_nametable_scan_) +#define pcre2_substring_number_from_name PCRE2_SUFFIX(pcre2_substring_number_from_name_) + +/* Keep this old function name for backwards compatibility */ +#define pcre2_set_recursion_limit PCRE2_SUFFIX(pcre2_set_recursion_limit_) + +/* Keep this obsolete function for backwards compatibility: it is now a noop. */ +#define pcre2_set_recursion_memory_management PCRE2_SUFFIX(pcre2_set_recursion_memory_management_) + +/* Now generate all three sets of width-specific structures and function +prototypes. */ + +#define PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS \ +PCRE2_TYPES_LIST \ +PCRE2_STRUCTURE_LIST \ +PCRE2_GENERAL_INFO_FUNCTIONS \ +PCRE2_GENERAL_CONTEXT_FUNCTIONS \ +PCRE2_COMPILE_CONTEXT_FUNCTIONS \ +PCRE2_CONVERT_CONTEXT_FUNCTIONS \ +PCRE2_CONVERT_FUNCTIONS \ +PCRE2_MATCH_CONTEXT_FUNCTIONS \ +PCRE2_COMPILE_FUNCTIONS \ +PCRE2_PATTERN_INFO_FUNCTIONS \ +PCRE2_MATCH_FUNCTIONS \ +PCRE2_SUBSTRING_FUNCTIONS \ +PCRE2_SERIALIZE_FUNCTIONS \ +PCRE2_SUBSTITUTE_FUNCTION \ +PCRE2_JIT_FUNCTIONS \ +PCRE2_OTHER_FUNCTIONS + +#define PCRE2_LOCAL_WIDTH 8 +PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS +#undef PCRE2_LOCAL_WIDTH + +#define PCRE2_LOCAL_WIDTH 16 +PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS +#undef PCRE2_LOCAL_WIDTH + +#define PCRE2_LOCAL_WIDTH 32 +PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS +#undef PCRE2_LOCAL_WIDTH + +/* Undefine the list macros; they are no longer needed. */ + +#undef PCRE2_TYPES_LIST +#undef PCRE2_STRUCTURE_LIST +#undef PCRE2_GENERAL_INFO_FUNCTIONS +#undef PCRE2_GENERAL_CONTEXT_FUNCTIONS +#undef PCRE2_COMPILE_CONTEXT_FUNCTIONS +#undef PCRE2_CONVERT_CONTEXT_FUNCTIONS +#undef PCRE2_MATCH_CONTEXT_FUNCTIONS +#undef PCRE2_COMPILE_FUNCTIONS +#undef PCRE2_PATTERN_INFO_FUNCTIONS +#undef PCRE2_MATCH_FUNCTIONS +#undef PCRE2_SUBSTRING_FUNCTIONS +#undef PCRE2_SERIALIZE_FUNCTIONS +#undef PCRE2_SUBSTITUTE_FUNCTION +#undef PCRE2_JIT_FUNCTIONS +#undef PCRE2_OTHER_FUNCTIONS +#undef PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS + +/* PCRE2_CODE_UNIT_WIDTH must be defined. If it is 8, 16, or 32, redefine +PCRE2_SUFFIX to use it. If it is 0, undefine the other macros and make +PCRE2_SUFFIX a no-op. Otherwise, generate an error. */ + +#undef PCRE2_SUFFIX +#ifndef PCRE2_CODE_UNIT_WIDTH +#error PCRE2_CODE_UNIT_WIDTH must be defined before including pcre2.h. +#error Use 8, 16, or 32; or 0 for a multi-width application. +#else /* PCRE2_CODE_UNIT_WIDTH is defined */ +#if PCRE2_CODE_UNIT_WIDTH == 8 || \ + PCRE2_CODE_UNIT_WIDTH == 16 || \ + PCRE2_CODE_UNIT_WIDTH == 32 +#define PCRE2_SUFFIX(a) PCRE2_GLUE(a, PCRE2_CODE_UNIT_WIDTH) +#elif PCRE2_CODE_UNIT_WIDTH == 0 +#undef PCRE2_JOIN +#undef PCRE2_GLUE +#define PCRE2_SUFFIX(a) a +#else +#error PCRE2_CODE_UNIT_WIDTH must be 0, 8, 16, or 32. +#endif +#endif /* PCRE2_CODE_UNIT_WIDTH is defined */ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* PCRE2_H_IDEMPOTENT_GUARD */ + +/* End of pcre2.h */ diff --git a/vcpkg/installed/x64-osx/include/pcre2posix.h b/vcpkg/installed/x64-osx/include/pcre2posix.h new file mode 100644 index 0000000..cccea57 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/pcre2posix.h @@ -0,0 +1,187 @@ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE2 is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. This is +the public header file to be #included by applications that call PCRE2 via the +POSIX wrapper interface. + + Written by Philip Hazel + Original API code Copyright (c) 1997-2012 University of Cambridge + New API code Copyright (c) 2016-2023 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + +#ifndef PCRE2POSIX_H_IDEMPOTENT_GUARD +#define PCRE2POSIX_H_IDEMPOTENT_GUARD + +/* Have to include stdlib.h in order to ensure that size_t is defined. */ + +#include + +/* Allow for C++ users */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Options, mostly defined by POSIX, but with some extras. */ + +#define REG_ICASE 0x0001 /* Maps to PCRE2_CASELESS */ +#define REG_NEWLINE 0x0002 /* Maps to PCRE2_MULTILINE */ +#define REG_NOTBOL 0x0004 /* Maps to PCRE2_NOTBOL */ +#define REG_NOTEOL 0x0008 /* Maps to PCRE2_NOTEOL */ +#define REG_DOTALL 0x0010 /* NOT defined by POSIX; maps to PCRE2_DOTALL */ +#define REG_NOSUB 0x0020 /* Do not report what was matched */ +#define REG_UTF 0x0040 /* NOT defined by POSIX; maps to PCRE2_UTF */ +#define REG_STARTEND 0x0080 /* BSD feature: pass subject string by so,eo */ +#define REG_NOTEMPTY 0x0100 /* NOT defined by POSIX; maps to PCRE2_NOTEMPTY */ +#define REG_UNGREEDY 0x0200 /* NOT defined by POSIX; maps to PCRE2_UNGREEDY */ +#define REG_UCP 0x0400 /* NOT defined by POSIX; maps to PCRE2_UCP */ +#define REG_PEND 0x0800 /* GNU feature: pass end pattern by re_endp */ +#define REG_NOSPEC 0x1000 /* Maps to PCRE2_LITERAL */ + +/* This is not used by PCRE2, but by defining it we make it easier +to slot PCRE2 into existing programs that make POSIX calls. */ + +#define REG_EXTENDED 0 + +/* Error values. Not all these are relevant or used by the wrapper. */ + +enum { + REG_ASSERT = 1, /* internal error ? */ + REG_BADBR, /* invalid repeat counts in {} */ + REG_BADPAT, /* pattern error */ + REG_BADRPT, /* ? * + invalid */ + REG_EBRACE, /* unbalanced {} */ + REG_EBRACK, /* unbalanced [] */ + REG_ECOLLATE, /* collation error - not relevant */ + REG_ECTYPE, /* bad class */ + REG_EESCAPE, /* bad escape sequence */ + REG_EMPTY, /* empty expression */ + REG_EPAREN, /* unbalanced () */ + REG_ERANGE, /* bad range inside [] */ + REG_ESIZE, /* expression too big */ + REG_ESPACE, /* failed to get memory */ + REG_ESUBREG, /* bad back reference */ + REG_INVARG, /* bad argument */ + REG_NOMATCH /* match failed */ +}; + + +/* The structure representing a compiled regular expression. It is also used +for passing the pattern end pointer when REG_PEND is set. */ + +typedef struct { + void *re_pcre2_code; + void *re_match_data; + const char *re_endp; + size_t re_nsub; + size_t re_erroffset; + int re_cflags; +} regex_t; + +/* The structure in which a captured offset is returned. */ + +typedef int regoff_t; + +typedef struct { + regoff_t rm_so; + regoff_t rm_eo; +} regmatch_t; + +/* When compiling with the MSVC compiler, it is sometimes necessary to include +a "calling convention" before exported function names. (This is secondhand +information; I know nothing about MSVC myself). For example, something like + + void __cdecl function(....) + +might be needed. In order to make this easy, all the exported functions have +PCRE2_CALL_CONVENTION just before their names. It is rarely needed; if not +set, we ensure here that it has no effect. */ + +#ifndef PCRE2_CALL_CONVENTION +#define PCRE2_CALL_CONVENTION +#endif + +#ifndef PCRE2_EXPORT +#define PCRE2_EXPORT +#endif + +/* When an application links to a PCRE2 DLL in Windows, the symbols that are +imported have to be identified as such. When building PCRE2, the appropriate +export settings are needed, and are set in pcre2posix.c before including this +file. */ + +/* By default, we use the standard "extern" declarations. */ + +#ifndef PCRE2POSIX_EXP_DECL +# if defined(_WIN32) && defined(PCRE2POSIX_SHARED) && !defined(PCRE2_STATIC) +# define PCRE2POSIX_EXP_DECL extern __declspec(dllimport) +# define PCRE2POSIX_EXP_DEFN __declspec(dllimport) +# else +# define PCRE2POSIX_EXP_DECL extern PCRE2_EXPORT +# define PCRE2POSIX_EXP_DEFN +# endif +#endif + +/* The functions. The actual code is in functions with pcre2_xxx names for +uniqueness. POSIX names are provided as macros for API compatibility with POSIX +regex functions. It's done this way to ensure to they are always linked from +the PCRE2 library and not by accident from elsewhere (regex_t differs in size +elsewhere). */ + +PCRE2POSIX_EXP_DECL int PCRE2_CALL_CONVENTION pcre2_regcomp(regex_t *, const char *, int); +PCRE2POSIX_EXP_DECL int PCRE2_CALL_CONVENTION pcre2_regexec(const regex_t *, const char *, size_t, + regmatch_t *, int); +PCRE2POSIX_EXP_DECL size_t PCRE2_CALL_CONVENTION pcre2_regerror(int, const regex_t *, char *, size_t); +PCRE2POSIX_EXP_DECL void PCRE2_CALL_CONVENTION pcre2_regfree(regex_t *); + +#define regcomp pcre2_regcomp +#define regexec pcre2_regexec +#define regerror pcre2_regerror +#define regfree pcre2_regfree + +/* Debian had a patch that used different names. These are now here to save +them having to maintain their own patch, but are not documented by PCRE2. */ + +#define PCRE2regcomp pcre2_regcomp +#define PCRE2regexec pcre2_regexec +#define PCRE2regerror pcre2_regerror +#define PCRE2regfree pcre2_regfree + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* PCRE2POSIX_H_IDEMPOTENT_GUARD */ + +/* End of pcre2posix.h */ diff --git a/vcpkg/installed/x64-osx/include/png.h b/vcpkg/installed/x64-osx/include/png.h new file mode 100644 index 0000000..83d3903 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/png.h @@ -0,0 +1,3250 @@ + +/* png.h - header file for PNG reference library + * + * libpng version 1.6.43 + * + * Copyright (c) 2018-2024 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. (See LICENSE, below.) + * + * Authors and maintainers: + * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat + * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger + * libpng versions 0.97, January 1998, through 1.6.35, July 2018: + * Glenn Randers-Pehrson + * libpng versions 1.6.36, December 2018, through 1.6.43, February 2024: + * Cosmin Truta + * See also "Contributing Authors", below. + */ + +/* + * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE + * ========================================= + * + * PNG Reference Library License version 2 + * --------------------------------------- + * + * * Copyright (c) 1995-2024 The PNG Reference Library Authors. + * * Copyright (c) 2018-2024 Cosmin Truta. + * * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. + * * Copyright (c) 1996-1997 Andreas Dilger. + * * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * The software is supplied "as is", without warranty of any kind, + * express or implied, including, without limitation, the warranties + * of merchantability, fitness for a particular purpose, title, and + * non-infringement. In no event shall the Copyright owners, or + * anyone distributing the software, be liable for any damages or + * other liability, whether in contract, tort or otherwise, arising + * from, out of, or in connection with the software, or the use or + * other dealings in the software, even if advised of the possibility + * of such damage. + * + * Permission is hereby granted to use, copy, modify, and distribute + * this software, or portions hereof, for any purpose, without fee, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you + * must not claim that you wrote the original software. If you + * use this software in a product, an acknowledgment in the product + * documentation would be appreciated, but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must + * not be misrepresented as being the original software. + * + * 3. This Copyright notice may not be removed or altered from any + * source or altered source distribution. + * + * + * PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35) + * ----------------------------------------------------------------------- + * + * libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are + * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are + * derived from libpng-1.0.6, and are distributed according to the same + * disclaimer and license as libpng-1.0.6 with the following individuals + * added to the list of Contributing Authors: + * + * Simon-Pierre Cadieux + * Eric S. Raymond + * Mans Rullgard + * Cosmin Truta + * Gilles Vollant + * James Yu + * Mandar Sahastrabuddhe + * Google Inc. + * Vadim Barkov + * + * and with the following additions to the disclaimer: + * + * There is no warranty against interference with your enjoyment of + * the library or against infringement. There is no warranty that our + * efforts or the library will fulfill any of your particular purposes + * or needs. This library is provided with all faults, and the entire + * risk of satisfactory quality, performance, accuracy, and effort is + * with the user. + * + * Some files in the "contrib" directory and some configure-generated + * files that are distributed with libpng have other copyright owners, and + * are released under other open source licenses. + * + * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are + * Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from + * libpng-0.96, and are distributed according to the same disclaimer and + * license as libpng-0.96, with the following individuals added to the + * list of Contributing Authors: + * + * Tom Lane + * Glenn Randers-Pehrson + * Willem van Schaik + * + * libpng versions 0.89, June 1996, through 0.96, May 1997, are + * Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, + * and are distributed according to the same disclaimer and license as + * libpng-0.88, with the following individuals added to the list of + * Contributing Authors: + * + * John Bowler + * Kevin Bracey + * Sam Bushell + * Magnus Holmgren + * Greg Roelofs + * Tom Tanner + * + * Some files in the "scripts" directory have other copyright owners, + * but are released under this license. + * + * libpng versions 0.5, May 1995, through 0.88, January 1996, are + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * For the purposes of this copyright and license, "Contributing Authors" + * is defined as the following set of individuals: + * + * Andreas Dilger + * Dave Martindale + * Guy Eric Schalnat + * Paul Schmidt + * Tim Wegner + * + * The PNG Reference Library is supplied "AS IS". The Contributing + * Authors and Group 42, Inc. disclaim all warranties, expressed or + * implied, including, without limitation, the warranties of + * merchantability and of fitness for any purpose. The Contributing + * Authors and Group 42, Inc. assume no liability for direct, indirect, + * incidental, special, exemplary, or consequential damages, which may + * result from the use of the PNG Reference Library, even if advised of + * the possibility of such damage. + * + * Permission is hereby granted to use, copy, modify, and distribute this + * source code, or portions hereof, for any purpose, without fee, subject + * to the following restrictions: + * + * 1. The origin of this source code must not be misrepresented. + * + * 2. Altered versions must be plainly marked as such and must not + * be misrepresented as being the original source. + * + * 3. This Copyright notice may not be removed or altered from any + * source or altered source distribution. + * + * The Contributing Authors and Group 42, Inc. specifically permit, + * without fee, and encourage the use of this source code as a component + * to supporting the PNG file format in commercial products. If you use + * this source code in a product, acknowledgment is not required but would + * be appreciated. + * + * END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE. + * + * TRADEMARK + * ========= + * + * The name "libpng" has not been registered by the Copyright owners + * as a trademark in any jurisdiction. However, because libpng has + * been distributed and maintained world-wide, continually since 1995, + * the Copyright owners claim "common-law trademark protection" in any + * jurisdiction where common-law trademark is recognized. + */ + +/* + * A "png_get_copyright" function is available, for convenient use in "about" + * boxes and the like: + * + * printf("%s", png_get_copyright(NULL)); + * + * Also, the PNG logo (in PNG format, of course) is supplied in the + * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + */ + +/* + * The contributing authors would like to thank all those who helped + * with testing, bug fixes, and patience. This wouldn't have been + * possible without all of you. + * + * Thanks to Frank J. T. Wojcik for helping with the documentation. + */ + +/* Note about libpng version numbers: + * + * Due to various miscommunications, unforeseen code incompatibilities + * and occasional factors outside the authors' control, version numbering + * on the library has not always been consistent and straightforward. + * The following table summarizes matters since version 0.89c, which was + * the first widely used release: + * + * source png.h png.h shared-lib + * version string int version + * ------- ------ ----- ---------- + * 0.89c "1.0 beta 3" 0.89 89 1.0.89 + * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90] + * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95] + * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96] + * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97] + * 0.97c 0.97 97 2.0.97 + * 0.98 0.98 98 2.0.98 + * 0.99 0.99 98 2.0.99 + * 0.99a-m 0.99 99 2.0.99 + * 1.00 1.00 100 2.1.0 [100 should be 10000] + * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000] + * 1.0.1 png.h string is 10001 2.1.0 + * 1.0.1a-e identical to the 10002 from here on, the shared library + * 1.0.2 source version) 10002 is 2.V where V is the source code + * 1.0.2a-b 10003 version, except as noted. + * 1.0.3 10003 + * 1.0.3a-d 10004 + * 1.0.4 10004 + * 1.0.4a-f 10005 + * 1.0.5 (+ 2 patches) 10005 + * 1.0.5a-d 10006 + * 1.0.5e-r 10100 (not source compatible) + * 1.0.5s-v 10006 (not binary compatible) + * 1.0.6 (+ 3 patches) 10006 (still binary incompatible) + * 1.0.6d-f 10007 (still binary incompatible) + * 1.0.6g 10007 + * 1.0.6h 10007 10.6h (testing xy.z so-numbering) + * 1.0.6i 10007 10.6i + * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0) + * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible) + * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible) + * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible) + * 1.0.7 1 10007 (still compatible) + * ... + * 1.0.69 10 10069 10.so.0.69[.0] + * ... + * 1.2.59 13 10259 12.so.0.59[.0] + * ... + * 1.4.20 14 10420 14.so.0.20[.0] + * ... + * 1.5.30 15 10530 15.so.15.30[.0] + * ... + * 1.6.43 16 10643 16.so.16.43[.0] + * + * Henceforth the source version will match the shared-library major and + * minor numbers; the shared-library major version number will be used for + * changes in backward compatibility, as it is intended. + * The PNG_LIBPNG_VER macro, which is not used within libpng but is + * available for applications, is an unsigned integer of the form XYYZZ + * corresponding to the source version X.Y.Z (leading zeros in Y and Z). + * Beta versions were given the previous public release number plus a + * letter, until version 1.0.6j; from then on they were given the upcoming + * public release number plus "betaNN" or "rcNN". + * + * Binary incompatibility exists only when applications make direct access + * to the info_ptr or png_ptr members through png.h, and the compiled + * application is loaded with a different version of the library. + * + * See libpng.txt or libpng.3 for more information. The PNG specification + * is available as a W3C Recommendation and as an ISO/IEC Standard; see + * + */ + +#ifndef PNG_H +#define PNG_H + +/* This is not the place to learn how to use libpng. The file libpng-manual.txt + * describes how to use libpng, and the file example.c summarizes it + * with some code on which to build. This file is useful for looking + * at the actual function definitions and structure components. If that + * file has been stripped from your copy of libpng, you can find it at + * + * + * If you just need to read a PNG file and don't want to read the documentation + * skip to the end of this file and read the section entitled 'simplified API'. + */ + +/* Version information for png.h - this should match the version in png.c */ +#define PNG_LIBPNG_VER_STRING "1.6.43" +#define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n" + +/* The versions of shared library builds should stay in sync, going forward */ +#define PNG_LIBPNG_VER_SHAREDLIB 16 +#define PNG_LIBPNG_VER_SONUM PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */ +#define PNG_LIBPNG_VER_DLLNUM PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */ + +/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ +#define PNG_LIBPNG_VER_MAJOR 1 +#define PNG_LIBPNG_VER_MINOR 6 +#define PNG_LIBPNG_VER_RELEASE 43 + +/* This should be zero for a public release, or non-zero for a + * development version. + */ +#define PNG_LIBPNG_VER_BUILD 0 + +/* Release Status */ +#define PNG_LIBPNG_BUILD_ALPHA 1 +#define PNG_LIBPNG_BUILD_BETA 2 +#define PNG_LIBPNG_BUILD_RC 3 +#define PNG_LIBPNG_BUILD_STABLE 4 +#define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7 + +/* Release-Specific Flags */ +#define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with + PNG_LIBPNG_BUILD_STABLE only */ +#define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with + PNG_LIBPNG_BUILD_SPECIAL */ +#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with + PNG_LIBPNG_BUILD_PRIVATE */ + +#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE + +/* Careful here. At one time, Guy wanted to use 082, but that + * would be octal. We must not include leading zeros. + * Versions 0.7 through 1.0.0 were in the range 0 to 100 here + * (only version 1.0.0 was mis-numbered 100 instead of 10000). + * From version 1.0.1 it is: + * XXYYZZ, where XX=major, YY=minor, ZZ=release + */ +#define PNG_LIBPNG_VER 10643 /* 1.6.43 */ + +/* Library configuration: these options cannot be changed after + * the library has been built. + */ +#ifndef PNGLCONF_H +/* If pnglibconf.h is missing, you can + * copy scripts/pnglibconf.h.prebuilt to pnglibconf.h + */ +# include "pnglibconf.h" +#endif + +#ifndef PNG_VERSION_INFO_ONLY +/* Machine specific configuration. */ +# include "pngconf.h" +#endif + +/* + * Added at libpng-1.2.8 + * + * Ref MSDN: Private as priority over Special + * VS_FF_PRIVATEBUILD File *was not* built using standard release + * procedures. If this value is given, the StringFileInfo block must + * contain a PrivateBuild string. + * + * VS_FF_SPECIALBUILD File *was* built by the original company using + * standard release procedures but is a variation of the standard + * file of the same version number. If this value is given, the + * StringFileInfo block must contain a SpecialBuild string. + */ + +#ifdef PNG_USER_PRIVATEBUILD /* From pnglibconf.h */ +# define PNG_LIBPNG_BUILD_TYPE \ + (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE) +#else +# ifdef PNG_LIBPNG_SPECIALBUILD +# define PNG_LIBPNG_BUILD_TYPE \ + (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL) +# else +# define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE) +# endif +#endif + +#ifndef PNG_VERSION_INFO_ONLY + +/* Inhibit C++ name-mangling for libpng functions but not for system calls. */ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* Version information for C files, stored in png.c. This had better match + * the version above. + */ +#define png_libpng_ver png_get_header_ver(NULL) + +/* This file is arranged in several sections: + * + * 1. [omitted] + * 2. Any configuration options that can be specified by for the application + * code when it is built. (Build time configuration is in pnglibconf.h) + * 3. Type definitions (base types are defined in pngconf.h), structure + * definitions. + * 4. Exported library functions. + * 5. Simplified API. + * 6. Implementation options. + * + * The library source code has additional files (principally pngpriv.h) that + * allow configuration of the library. + */ + +/* Section 1: [omitted] */ + +/* Section 2: run time configuration + * See pnglibconf.h for build time configuration + * + * Run time configuration allows the application to choose between + * implementations of certain arithmetic APIs. The default is set + * at build time and recorded in pnglibconf.h, but it is safe to + * override these (and only these) settings. Note that this won't + * change what the library does, only application code, and the + * settings can (and probably should) be made on a per-file basis + * by setting the #defines before including png.h + * + * Use macros to read integers from PNG data or use the exported + * functions? + * PNG_USE_READ_MACROS: use the macros (see below) Note that + * the macros evaluate their argument multiple times. + * PNG_NO_USE_READ_MACROS: call the relevant library function. + * + * Use the alternative algorithm for compositing alpha samples that + * does not use division? + * PNG_READ_COMPOSITE_NODIV_SUPPORTED: use the 'no division' + * algorithm. + * PNG_NO_READ_COMPOSITE_NODIV: use the 'division' algorithm. + * + * How to handle benign errors if PNG_ALLOW_BENIGN_ERRORS is + * false? + * PNG_ALLOW_BENIGN_ERRORS: map calls to the benign error + * APIs to png_warning. + * Otherwise the calls are mapped to png_error. + */ + +/* Section 3: type definitions, including structures and compile time + * constants. + * See pngconf.h for base types that vary by machine/system + */ + +/* This triggers a compiler error in png.c, if png.c and png.h + * do not agree upon the version number. + */ +typedef char* png_libpng_version_1_6_43; + +/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. + * + * png_struct is the cache of information used while reading or writing a single + * PNG file. One of these is always required, although the simplified API + * (below) hides the creation and destruction of it. + */ +typedef struct png_struct_def png_struct; +typedef const png_struct * png_const_structp; +typedef png_struct * png_structp; +typedef png_struct * * png_structpp; + +/* png_info contains information read from or to be written to a PNG file. One + * or more of these must exist while reading or creating a PNG file. The + * information is not used by libpng during read but is used to control what + * gets written when a PNG file is created. "png_get_" function calls read + * information during read and "png_set_" functions calls write information + * when creating a PNG. + * been moved into a separate header file that is not accessible to + * applications. Read libpng-manual.txt or libpng.3 for more info. + */ +typedef struct png_info_def png_info; +typedef png_info * png_infop; +typedef const png_info * png_const_infop; +typedef png_info * * png_infopp; + +/* Types with names ending 'p' are pointer types. The corresponding types with + * names ending 'rp' are identical pointer types except that the pointer is + * marked 'restrict', which means that it is the only pointer to the object + * passed to the function. Applications should not use the 'restrict' types; + * it is always valid to pass 'p' to a pointer with a function argument of the + * corresponding 'rp' type. Different compilers have different rules with + * regard to type matching in the presence of 'restrict'. For backward + * compatibility libpng callbacks never have 'restrict' in their parameters and, + * consequentially, writing portable application code is extremely difficult if + * an attempt is made to use 'restrict'. + */ +typedef png_struct * PNG_RESTRICT png_structrp; +typedef const png_struct * PNG_RESTRICT png_const_structrp; +typedef png_info * PNG_RESTRICT png_inforp; +typedef const png_info * PNG_RESTRICT png_const_inforp; + +/* Three color definitions. The order of the red, green, and blue, (and the + * exact size) is not important, although the size of the fields need to + * be png_byte or png_uint_16 (as defined below). + */ +typedef struct png_color_struct +{ + png_byte red; + png_byte green; + png_byte blue; +} png_color; +typedef png_color * png_colorp; +typedef const png_color * png_const_colorp; +typedef png_color * * png_colorpp; + +typedef struct png_color_16_struct +{ + png_byte index; /* used for palette files */ + png_uint_16 red; /* for use in red green blue files */ + png_uint_16 green; + png_uint_16 blue; + png_uint_16 gray; /* for use in grayscale files */ +} png_color_16; +typedef png_color_16 * png_color_16p; +typedef const png_color_16 * png_const_color_16p; +typedef png_color_16 * * png_color_16pp; + +typedef struct png_color_8_struct +{ + png_byte red; /* for use in red green blue files */ + png_byte green; + png_byte blue; + png_byte gray; /* for use in grayscale files */ + png_byte alpha; /* for alpha channel files */ +} png_color_8; +typedef png_color_8 * png_color_8p; +typedef const png_color_8 * png_const_color_8p; +typedef png_color_8 * * png_color_8pp; + +/* + * The following two structures are used for the in-core representation + * of sPLT chunks. + */ +typedef struct png_sPLT_entry_struct +{ + png_uint_16 red; + png_uint_16 green; + png_uint_16 blue; + png_uint_16 alpha; + png_uint_16 frequency; +} png_sPLT_entry; +typedef png_sPLT_entry * png_sPLT_entryp; +typedef const png_sPLT_entry * png_const_sPLT_entryp; +typedef png_sPLT_entry * * png_sPLT_entrypp; + +/* When the depth of the sPLT palette is 8 bits, the color and alpha samples + * occupy the LSB of their respective members, and the MSB of each member + * is zero-filled. The frequency member always occupies the full 16 bits. + */ + +typedef struct png_sPLT_struct +{ + png_charp name; /* palette name */ + png_byte depth; /* depth of palette samples */ + png_sPLT_entryp entries; /* palette entries */ + png_int_32 nentries; /* number of palette entries */ +} png_sPLT_t; +typedef png_sPLT_t * png_sPLT_tp; +typedef const png_sPLT_t * png_const_sPLT_tp; +typedef png_sPLT_t * * png_sPLT_tpp; + +#ifdef PNG_TEXT_SUPPORTED +/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file, + * and whether that contents is compressed or not. The "key" field + * points to a regular zero-terminated C string. The "text" fields can be a + * regular C string, an empty string, or a NULL pointer. + * However, the structure returned by png_get_text() will always contain + * the "text" field as a regular zero-terminated C string (possibly + * empty), never a NULL pointer, so it can be safely used in printf() and + * other string-handling functions. Note that the "itxt_length", "lang", and + * "lang_key" members of the structure only exist when the library is built + * with iTXt chunk support. Prior to libpng-1.4.0 the library was built by + * default without iTXt support. Also note that when iTXt *is* supported, + * the "lang" and "lang_key" fields contain NULL pointers when the + * "compression" field contains * PNG_TEXT_COMPRESSION_NONE or + * PNG_TEXT_COMPRESSION_zTXt. Note that the "compression value" is not the + * same as what appears in the PNG tEXt/zTXt/iTXt chunk's "compression flag" + * which is always 0 or 1, or its "compression method" which is always 0. + */ +typedef struct png_text_struct +{ + int compression; /* compression value: + -1: tEXt, none + 0: zTXt, deflate + 1: iTXt, none + 2: iTXt, deflate */ + png_charp key; /* keyword, 1-79 character description of "text" */ + png_charp text; /* comment, may be an empty string (ie "") + or a NULL pointer */ + size_t text_length; /* length of the text string */ + size_t itxt_length; /* length of the itxt string */ + png_charp lang; /* language code, 0-79 characters + or a NULL pointer */ + png_charp lang_key; /* keyword translated UTF-8 string, 0 or more + chars or a NULL pointer */ +} png_text; +typedef png_text * png_textp; +typedef const png_text * png_const_textp; +typedef png_text * * png_textpp; +#endif + +/* Supported compression types for text in PNG files (tEXt, and zTXt). + * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. */ +#define PNG_TEXT_COMPRESSION_NONE_WR -3 +#define PNG_TEXT_COMPRESSION_zTXt_WR -2 +#define PNG_TEXT_COMPRESSION_NONE -1 +#define PNG_TEXT_COMPRESSION_zTXt 0 +#define PNG_ITXT_COMPRESSION_NONE 1 +#define PNG_ITXT_COMPRESSION_zTXt 2 +#define PNG_TEXT_COMPRESSION_LAST 3 /* Not a valid value */ + +/* png_time is a way to hold the time in an machine independent way. + * Two conversions are provided, both from time_t and struct tm. There + * is no portable way to convert to either of these structures, as far + * as I know. If you know of a portable way, send it to me. As a side + * note - PNG has always been Year 2000 compliant! + */ +typedef struct png_time_struct +{ + png_uint_16 year; /* full year, as in, 1995 */ + png_byte month; /* month of year, 1 - 12 */ + png_byte day; /* day of month, 1 - 31 */ + png_byte hour; /* hour of day, 0 - 23 */ + png_byte minute; /* minute of hour, 0 - 59 */ + png_byte second; /* second of minute, 0 - 60 (for leap seconds) */ +} png_time; +typedef png_time * png_timep; +typedef const png_time * png_const_timep; +typedef png_time * * png_timepp; + +#if defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED) ||\ + defined(PNG_USER_CHUNKS_SUPPORTED) +/* png_unknown_chunk is a structure to hold queued chunks for which there is + * no specific support. The idea is that we can use this to queue + * up private chunks for output even though the library doesn't actually + * know about their semantics. + * + * The data in the structure is set by libpng on read and used on write. + */ +typedef struct png_unknown_chunk_t +{ + png_byte name[5]; /* Textual chunk name with '\0' terminator */ + png_byte *data; /* Data, should not be modified on read! */ + size_t size; + + /* On write 'location' must be set using the flag values listed below. + * Notice that on read it is set by libpng however the values stored have + * more bits set than are listed below. Always treat the value as a + * bitmask. On write set only one bit - setting multiple bits may cause the + * chunk to be written in multiple places. + */ + png_byte location; /* mode of operation at read time */ +} +png_unknown_chunk; + +typedef png_unknown_chunk * png_unknown_chunkp; +typedef const png_unknown_chunk * png_const_unknown_chunkp; +typedef png_unknown_chunk * * png_unknown_chunkpp; +#endif + +/* Flag values for the unknown chunk location byte. */ +#define PNG_HAVE_IHDR 0x01 +#define PNG_HAVE_PLTE 0x02 +#define PNG_AFTER_IDAT 0x08 + +/* Maximum positive integer used in PNG is (2^31)-1 */ +#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL) +#define PNG_UINT_32_MAX ((png_uint_32)(-1)) +#define PNG_SIZE_MAX ((size_t)(-1)) + +/* These are constants for fixed point values encoded in the + * PNG specification manner (x100000) + */ +#define PNG_FP_1 100000 +#define PNG_FP_HALF 50000 +#define PNG_FP_MAX ((png_fixed_point)0x7fffffffL) +#define PNG_FP_MIN (-PNG_FP_MAX) + +/* These describe the color_type field in png_info. */ +/* color type masks */ +#define PNG_COLOR_MASK_PALETTE 1 +#define PNG_COLOR_MASK_COLOR 2 +#define PNG_COLOR_MASK_ALPHA 4 + +/* color types. Note that not all combinations are legal */ +#define PNG_COLOR_TYPE_GRAY 0 +#define PNG_COLOR_TYPE_PALETTE (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE) +#define PNG_COLOR_TYPE_RGB (PNG_COLOR_MASK_COLOR) +#define PNG_COLOR_TYPE_RGB_ALPHA (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA) +#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA) +/* aliases */ +#define PNG_COLOR_TYPE_RGBA PNG_COLOR_TYPE_RGB_ALPHA +#define PNG_COLOR_TYPE_GA PNG_COLOR_TYPE_GRAY_ALPHA + +/* This is for compression type. PNG 1.0-1.2 only define the single type. */ +#define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */ +#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE + +/* This is for filter type. PNG 1.0-1.2 only define the single type. */ +#define PNG_FILTER_TYPE_BASE 0 /* Single row per-byte filtering */ +#define PNG_INTRAPIXEL_DIFFERENCING 64 /* Used only in MNG datastreams */ +#define PNG_FILTER_TYPE_DEFAULT PNG_FILTER_TYPE_BASE + +/* These are for the interlacing type. These values should NOT be changed. */ +#define PNG_INTERLACE_NONE 0 /* Non-interlaced image */ +#define PNG_INTERLACE_ADAM7 1 /* Adam7 interlacing */ +#define PNG_INTERLACE_LAST 2 /* Not a valid value */ + +/* These are for the oFFs chunk. These values should NOT be changed. */ +#define PNG_OFFSET_PIXEL 0 /* Offset in pixels */ +#define PNG_OFFSET_MICROMETER 1 /* Offset in micrometers (1/10^6 meter) */ +#define PNG_OFFSET_LAST 2 /* Not a valid value */ + +/* These are for the pCAL chunk. These values should NOT be changed. */ +#define PNG_EQUATION_LINEAR 0 /* Linear transformation */ +#define PNG_EQUATION_BASE_E 1 /* Exponential base e transform */ +#define PNG_EQUATION_ARBITRARY 2 /* Arbitrary base exponential transform */ +#define PNG_EQUATION_HYPERBOLIC 3 /* Hyperbolic sine transformation */ +#define PNG_EQUATION_LAST 4 /* Not a valid value */ + +/* These are for the sCAL chunk. These values should NOT be changed. */ +#define PNG_SCALE_UNKNOWN 0 /* unknown unit (image scale) */ +#define PNG_SCALE_METER 1 /* meters per pixel */ +#define PNG_SCALE_RADIAN 2 /* radians per pixel */ +#define PNG_SCALE_LAST 3 /* Not a valid value */ + +/* These are for the pHYs chunk. These values should NOT be changed. */ +#define PNG_RESOLUTION_UNKNOWN 0 /* pixels/unknown unit (aspect ratio) */ +#define PNG_RESOLUTION_METER 1 /* pixels/meter */ +#define PNG_RESOLUTION_LAST 2 /* Not a valid value */ + +/* These are for the sRGB chunk. These values should NOT be changed. */ +#define PNG_sRGB_INTENT_PERCEPTUAL 0 +#define PNG_sRGB_INTENT_RELATIVE 1 +#define PNG_sRGB_INTENT_SATURATION 2 +#define PNG_sRGB_INTENT_ABSOLUTE 3 +#define PNG_sRGB_INTENT_LAST 4 /* Not a valid value */ + +/* This is for text chunks */ +#define PNG_KEYWORD_MAX_LENGTH 79 + +/* Maximum number of entries in PLTE/sPLT/tRNS arrays */ +#define PNG_MAX_PALETTE_LENGTH 256 + +/* These determine if an ancillary chunk's data has been successfully read + * from the PNG header, or if the application has filled in the corresponding + * data in the info_struct to be written into the output file. The values + * of the PNG_INFO_ defines should NOT be changed. + */ +#define PNG_INFO_gAMA 0x0001U +#define PNG_INFO_sBIT 0x0002U +#define PNG_INFO_cHRM 0x0004U +#define PNG_INFO_PLTE 0x0008U +#define PNG_INFO_tRNS 0x0010U +#define PNG_INFO_bKGD 0x0020U +#define PNG_INFO_hIST 0x0040U +#define PNG_INFO_pHYs 0x0080U +#define PNG_INFO_oFFs 0x0100U +#define PNG_INFO_tIME 0x0200U +#define PNG_INFO_pCAL 0x0400U +#define PNG_INFO_sRGB 0x0800U /* GR-P, 0.96a */ +#define PNG_INFO_iCCP 0x1000U /* ESR, 1.0.6 */ +#define PNG_INFO_sPLT 0x2000U /* ESR, 1.0.6 */ +#define PNG_INFO_sCAL 0x4000U /* ESR, 1.0.6 */ +#define PNG_INFO_IDAT 0x8000U /* ESR, 1.0.6 */ +#define PNG_INFO_eXIf 0x10000U /* GR-P, 1.6.31 */ + +/* This is used for the transformation routines, as some of them + * change these values for the row. It also should enable using + * the routines for other purposes. + */ +typedef struct png_row_info_struct +{ + png_uint_32 width; /* width of row */ + size_t rowbytes; /* number of bytes in row */ + png_byte color_type; /* color type of row */ + png_byte bit_depth; /* bit depth of row */ + png_byte channels; /* number of channels (1, 2, 3, or 4) */ + png_byte pixel_depth; /* bits per pixel (depth * channels) */ +} png_row_info; + +typedef png_row_info * png_row_infop; +typedef png_row_info * * png_row_infopp; + +/* These are the function types for the I/O functions and for the functions + * that allow the user to override the default I/O functions with his or her + * own. The png_error_ptr type should match that of user-supplied warning + * and error functions, while the png_rw_ptr type should match that of the + * user read/write data functions. Note that the 'write' function must not + * modify the buffer it is passed. The 'read' function, on the other hand, is + * expected to return the read data in the buffer. + */ +typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp)); +typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, size_t)); +typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp)); +typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32, + int)); +typedef PNG_CALLBACK(void, *png_write_status_ptr, (png_structp, png_uint_32, + int)); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop)); +typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop)); + +/* The following callback receives png_uint_32 row_number, int pass for the + * png_bytep data of the row. When transforming an interlaced image the + * row number is the row number within the sub-image of the interlace pass, so + * the value will increase to the height of the sub-image (not the full image) + * then reset to 0 for the next pass. + * + * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to + * find the output pixel (x,y) given an interlaced sub-image pixel + * (row,col,pass). (See below for these macros.) + */ +typedef PNG_CALLBACK(void, *png_progressive_row_ptr, (png_structp, png_bytep, + png_uint_32, int)); +#endif + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +typedef PNG_CALLBACK(void, *png_user_transform_ptr, (png_structp, png_row_infop, + png_bytep)); +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp, + png_unknown_chunkp)); +#endif +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED +/* not used anywhere */ +/* typedef PNG_CALLBACK(void, *png_unknown_chunk_ptr, (png_structp)); */ +#endif + +#ifdef PNG_SETJMP_SUPPORTED +/* This must match the function definition in , and the application + * must include this before png.h to obtain the definition of jmp_buf. The + * function is required to be PNG_NORETURN, but this is not checked. If the + * function does return the application will crash via an abort() or similar + * system level call. + * + * If you get a warning here while building the library you may need to make + * changes to ensure that pnglibconf.h records the calling convention used by + * your compiler. This may be very difficult - try using a different compiler + * to build the library! + */ +PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef); +#endif + +/* Transform masks for the high-level interface */ +#define PNG_TRANSFORM_IDENTITY 0x0000 /* read and write */ +#define PNG_TRANSFORM_STRIP_16 0x0001 /* read only */ +#define PNG_TRANSFORM_STRIP_ALPHA 0x0002 /* read only */ +#define PNG_TRANSFORM_PACKING 0x0004 /* read and write */ +#define PNG_TRANSFORM_PACKSWAP 0x0008 /* read and write */ +#define PNG_TRANSFORM_EXPAND 0x0010 /* read only */ +#define PNG_TRANSFORM_INVERT_MONO 0x0020 /* read and write */ +#define PNG_TRANSFORM_SHIFT 0x0040 /* read and write */ +#define PNG_TRANSFORM_BGR 0x0080 /* read and write */ +#define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */ +#define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */ +#define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */ +#define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* write only */ +/* Added to libpng-1.2.34 */ +#define PNG_TRANSFORM_STRIP_FILLER_BEFORE PNG_TRANSFORM_STRIP_FILLER +#define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */ +/* Added to libpng-1.4.0 */ +#define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */ +/* Added to libpng-1.5.4 */ +#define PNG_TRANSFORM_EXPAND_16 0x4000 /* read only */ +#if ~0U > 0xffffU /* or else this might break on a 16-bit machine */ +#define PNG_TRANSFORM_SCALE_16 0x8000 /* read only */ +#endif + +/* Flags for MNG supported features */ +#define PNG_FLAG_MNG_EMPTY_PLTE 0x01 +#define PNG_FLAG_MNG_FILTER_64 0x04 +#define PNG_ALL_MNG_FEATURES 0x05 + +/* NOTE: prior to 1.5 these functions had no 'API' style declaration, + * this allowed the zlib default functions to be used on Windows + * platforms. In 1.5 the zlib default malloc (which just calls malloc and + * ignores the first argument) should be completely compatible with the + * following. + */ +typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp, + png_alloc_size_t)); +typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp)); + +/* Section 4: exported functions + * Here are the function definitions most commonly used. This is not + * the place to find out how to use libpng. See libpng-manual.txt for the + * full explanation, see example.c for the summary. This just provides + * a simple one line description of the use of each function. + * + * The PNG_EXPORT() and PNG_EXPORTA() macros used below are defined in + * pngconf.h and in the *.dfn files in the scripts directory. + * + * PNG_EXPORT(ordinal, type, name, (args)); + * + * ordinal: ordinal that is used while building + * *.def files. The ordinal value is only + * relevant when preprocessing png.h with + * the *.dfn files for building symbol table + * entries, and are removed by pngconf.h. + * type: return type of the function + * name: function name + * args: function arguments, with types + * + * When we wish to append attributes to a function prototype we use + * the PNG_EXPORTA() macro instead. + * + * PNG_EXPORTA(ordinal, type, name, (args), attributes); + * + * ordinal, type, name, and args: same as in PNG_EXPORT(). + * attributes: function attributes + */ + +/* Returns the version number of the library */ +PNG_EXPORT(1, png_uint_32, png_access_version_number, (void)); + +/* Tell lib we have already handled the first magic bytes. + * Handling more than 8 bytes from the beginning of the file is an error. + */ +PNG_EXPORT(2, void, png_set_sig_bytes, (png_structrp png_ptr, int num_bytes)); + +/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a + * PNG file. Returns zero if the supplied bytes match the 8-byte PNG + * signature, and non-zero otherwise. Having num_to_check == 0 or + * start > 7 will always fail (i.e. return non-zero). + */ +PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, size_t start, + size_t num_to_check)); + +/* Simple signature checking function. This is the same as calling + * png_check_sig(sig, n) := (png_sig_cmp(sig, 0, n) == 0). + */ +#define png_check_sig(sig, n) (png_sig_cmp((sig), 0, (n)) == 0) /* DEPRECATED */ + +/* Allocate and initialize png_ptr struct for reading, and any other memory. */ +PNG_EXPORTA(4, png_structp, png_create_read_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn), + PNG_ALLOCATED); + +/* Allocate and initialize png_ptr struct for writing, and any other memory */ +PNG_EXPORTA(5, png_structp, png_create_write_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn), + PNG_ALLOCATED); + +PNG_EXPORT(6, size_t, png_get_compression_buffer_size, + (png_const_structrp png_ptr)); + +PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structrp png_ptr, + size_t size)); + +/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp + * match up. + */ +#ifdef PNG_SETJMP_SUPPORTED +/* This function returns the jmp_buf built in to *png_ptr. It must be + * supplied with an appropriate 'longjmp' function to use on that jmp_buf + * unless the default error function is overridden in which case NULL is + * acceptable. The size of the jmp_buf is checked against the actual size + * allocated by the library - the call will return NULL on a mismatch + * indicating an ABI mismatch. + */ +PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structrp png_ptr, + png_longjmp_ptr longjmp_fn, size_t jmp_buf_size)); +# define png_jmpbuf(png_ptr) \ + (*png_set_longjmp_fn((png_ptr), longjmp, (sizeof (jmp_buf)))) +#else +# define png_jmpbuf(png_ptr) \ + (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP) +#endif +/* This function should be used by libpng applications in place of + * longjmp(png_ptr->jmpbuf, val). If longjmp_fn() has been set, it + * will use it; otherwise it will call PNG_ABORT(). This function was + * added in libpng-1.5.0. + */ +PNG_EXPORTA(9, void, png_longjmp, (png_const_structrp png_ptr, int val), + PNG_NORETURN); + +#ifdef PNG_READ_SUPPORTED +/* Reset the compression stream */ +PNG_EXPORTA(10, int, png_reset_zstream, (png_structrp png_ptr), PNG_DEPRECATED); +#endif + +/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */ +#ifdef PNG_USER_MEM_SUPPORTED +PNG_EXPORTA(11, png_structp, png_create_read_struct_2, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + PNG_ALLOCATED); +PNG_EXPORTA(12, png_structp, png_create_write_struct_2, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + PNG_ALLOCATED); +#endif + +/* Write the PNG file signature. */ +PNG_EXPORT(13, void, png_write_sig, (png_structrp png_ptr)); + +/* Write a PNG chunk - size, type, (optional) data, CRC. */ +PNG_EXPORT(14, void, png_write_chunk, (png_structrp png_ptr, png_const_bytep + chunk_name, png_const_bytep data, size_t length)); + +/* Write the start of a PNG chunk - length and chunk name. */ +PNG_EXPORT(15, void, png_write_chunk_start, (png_structrp png_ptr, + png_const_bytep chunk_name, png_uint_32 length)); + +/* Write the data of a PNG chunk started with png_write_chunk_start(). */ +PNG_EXPORT(16, void, png_write_chunk_data, (png_structrp png_ptr, + png_const_bytep data, size_t length)); + +/* Finish a chunk started with png_write_chunk_start() (includes CRC). */ +PNG_EXPORT(17, void, png_write_chunk_end, (png_structrp png_ptr)); + +/* Allocate and initialize the info structure */ +PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_const_structrp png_ptr), + PNG_ALLOCATED); + +/* DEPRECATED: this function allowed init structures to be created using the + * default allocation method (typically malloc). Use is deprecated in 1.6.0 and + * the API will be removed in the future. + */ +PNG_EXPORTA(19, void, png_info_init_3, (png_infopp info_ptr, + size_t png_info_struct_size), PNG_DEPRECATED); + +/* Writes all the PNG information before the image. */ +PNG_EXPORT(20, void, png_write_info_before_PLTE, + (png_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(21, void, png_write_info, + (png_structrp png_ptr, png_const_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the information before the actual image data. */ +PNG_EXPORT(22, void, png_read_info, + (png_structrp png_ptr, png_inforp info_ptr)); +#endif + +#ifdef PNG_TIME_RFC1123_SUPPORTED + /* Convert to a US string format: there is no localization support in this + * routine. The original implementation used a 29 character buffer in + * png_struct, this will be removed in future versions. + */ +#if PNG_LIBPNG_VER < 10700 +/* To do: remove this from libpng17 (and from libpng17/png.c and pngstruct.h) */ +PNG_EXPORTA(23, png_const_charp, png_convert_to_rfc1123, (png_structrp png_ptr, + png_const_timep ptime),PNG_DEPRECATED); +#endif +PNG_EXPORT(241, int, png_convert_to_rfc1123_buffer, (char out[29], + png_const_timep ptime)); +#endif + +#ifdef PNG_CONVERT_tIME_SUPPORTED +/* Convert from a struct tm to png_time */ +PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime, + const struct tm * ttime)); + +/* Convert from time_t to png_time. Uses gmtime() */ +PNG_EXPORT(25, void, png_convert_from_time_t, (png_timep ptime, time_t ttime)); +#endif /* CONVERT_tIME */ + +#ifdef PNG_READ_EXPAND_SUPPORTED +/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ +PNG_EXPORT(26, void, png_set_expand, (png_structrp png_ptr)); +PNG_EXPORT(27, void, png_set_expand_gray_1_2_4_to_8, (png_structrp png_ptr)); +PNG_EXPORT(28, void, png_set_palette_to_rgb, (png_structrp png_ptr)); +PNG_EXPORT(29, void, png_set_tRNS_to_alpha, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* Expand to 16-bit channels, forces conversion of palette to RGB and expansion + * of a tRNS chunk if present. + */ +PNG_EXPORT(221, void, png_set_expand_16, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +/* Use blue, green, red order for pixels. */ +PNG_EXPORT(30, void, png_set_bgr, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED +/* Expand the grayscale to 24-bit RGB if necessary. */ +PNG_EXPORT(31, void, png_set_gray_to_rgb, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +/* Reduce RGB to grayscale. */ +#define PNG_ERROR_ACTION_NONE 1 +#define PNG_ERROR_ACTION_WARN 2 +#define PNG_ERROR_ACTION_ERROR 3 +#define PNG_RGB_TO_GRAY_DEFAULT (-1)/*for red/green coefficients*/ + +PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structrp png_ptr, + int error_action, double red, double green)) +PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structrp png_ptr, + int error_action, png_fixed_point red, png_fixed_point green)) + +PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status, (png_const_structrp + png_ptr)); +#endif + +#ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED +PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth, + png_colorp palette)); +#endif + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED +/* How the alpha channel is interpreted - this affects how the color channels + * of a PNG file are returned to the calling application when an alpha channel, + * or a tRNS chunk in a palette file, is present. + * + * This has no effect on the way pixels are written into a PNG output + * datastream. The color samples in a PNG datastream are never premultiplied + * with the alpha samples. + * + * The default is to return data according to the PNG specification: the alpha + * channel is a linear measure of the contribution of the pixel to the + * corresponding composited pixel, and the color channels are unassociated + * (not premultiplied). The gamma encoded color channels must be scaled + * according to the contribution and to do this it is necessary to undo + * the encoding, scale the color values, perform the composition and re-encode + * the values. This is the 'PNG' mode. + * + * The alternative is to 'associate' the alpha with the color information by + * storing color channel values that have been scaled by the alpha. + * image. These are the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' modes + * (the latter being the two common names for associated alpha color channels). + * + * For the 'OPTIMIZED' mode, a pixel is treated as opaque only if the alpha + * value is equal to the maximum value. + * + * The final choice is to gamma encode the alpha channel as well. This is + * broken because, in practice, no implementation that uses this choice + * correctly undoes the encoding before handling alpha composition. Use this + * choice only if other serious errors in the software or hardware you use + * mandate it; the typical serious error is for dark halos to appear around + * opaque areas of the composited PNG image because of arithmetic overflow. + * + * The API function png_set_alpha_mode specifies which of these choices to use + * with an enumerated 'mode' value and the gamma of the required output: + */ +#define PNG_ALPHA_PNG 0 /* according to the PNG standard */ +#define PNG_ALPHA_STANDARD 1 /* according to Porter/Duff */ +#define PNG_ALPHA_ASSOCIATED 1 /* as above; this is the normal practice */ +#define PNG_ALPHA_PREMULTIPLIED 1 /* as above */ +#define PNG_ALPHA_OPTIMIZED 2 /* 'PNG' for opaque pixels, else 'STANDARD' */ +#define PNG_ALPHA_BROKEN 3 /* the alpha channel is gamma encoded */ + +PNG_FP_EXPORT(227, void, png_set_alpha_mode, (png_structrp png_ptr, int mode, + double output_gamma)) +PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr, + int mode, png_fixed_point output_gamma)) +#endif + +#if defined(PNG_GAMMA_SUPPORTED) || defined(PNG_READ_ALPHA_MODE_SUPPORTED) +/* The output_gamma value is a screen gamma in libpng terminology: it expresses + * how to decode the output values, not how they are encoded. + */ +#define PNG_DEFAULT_sRGB -1 /* sRGB gamma and color space */ +#define PNG_GAMMA_MAC_18 -2 /* Old Mac '1.8' gamma and color space */ +#define PNG_GAMMA_sRGB 220000 /* Television standards--matches sRGB gamma */ +#define PNG_GAMMA_LINEAR PNG_FP_1 /* Linear */ +#endif + +/* The following are examples of calls to png_set_alpha_mode to achieve the + * required overall gamma correction and, where necessary, alpha + * premultiplication. + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB); + * This is the default libpng handling of the alpha channel - it is not + * pre-multiplied into the color components. In addition the call states + * that the output is for a sRGB system and causes all PNG files without gAMA + * chunks to be assumed to be encoded using sRGB. + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC); + * In this case the output is assumed to be something like an sRGB conformant + * display preceded by a power-law lookup table of power 1.45. This is how + * early Mac systems behaved. + * + * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_GAMMA_LINEAR); + * This is the classic Jim Blinn approach and will work in academic + * environments where everything is done by the book. It has the shortcoming + * of assuming that input PNG data with no gamma information is linear - this + * is unlikely to be correct unless the PNG files where generated locally. + * Most of the time the output precision will be so low as to show + * significant banding in dark areas of the image. + * + * png_set_expand_16(pp); + * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_DEFAULT_sRGB); + * This is a somewhat more realistic Jim Blinn inspired approach. PNG files + * are assumed to have the sRGB encoding if not marked with a gamma value and + * the output is always 16 bits per component. This permits accurate scaling + * and processing of the data. If you know that your input PNG files were + * generated locally you might need to replace PNG_DEFAULT_sRGB with the + * correct value for your system. + * + * png_set_alpha_mode(pp, PNG_ALPHA_OPTIMIZED, PNG_DEFAULT_sRGB); + * If you just need to composite the PNG image onto an existing background + * and if you control the code that does this you can use the optimization + * setting. In this case you just copy completely opaque pixels to the + * output. For pixels that are not completely transparent (you just skip + * those) you do the composition math using png_composite or png_composite_16 + * below then encode the resultant 8-bit or 16-bit values to match the output + * encoding. + * + * Other cases + * If neither the PNG nor the standard linear encoding work for you because + * of the software or hardware you use then you have a big problem. The PNG + * case will probably result in halos around the image. The linear encoding + * will probably result in a washed out, too bright, image (it's actually too + * contrasty.) Try the ALPHA_OPTIMIZED mode above - this will probably + * substantially reduce the halos. Alternatively try: + * + * png_set_alpha_mode(pp, PNG_ALPHA_BROKEN, PNG_DEFAULT_sRGB); + * This option will also reduce the halos, but there will be slight dark + * halos round the opaque parts of the image where the background is light. + * In the OPTIMIZED mode the halos will be light halos where the background + * is dark. Take your pick - the halos are unavoidable unless you can get + * your hardware/software fixed! (The OPTIMIZED approach is slightly + * faster.) + * + * When the default gamma of PNG files doesn't match the output gamma. + * If you have PNG files with no gamma information png_set_alpha_mode allows + * you to provide a default gamma, but it also sets the output gamma to the + * matching value. If you know your PNG files have a gamma that doesn't + * match the output you can take advantage of the fact that + * png_set_alpha_mode always sets the output gamma but only sets the PNG + * default if it is not already set: + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB); + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC); + * The first call sets both the default and the output gamma values, the + * second call overrides the output gamma without changing the default. This + * is easier than achieving the same effect with png_set_gamma. You must use + * PNG_ALPHA_PNG for the first call - internal checking in png_set_alpha will + * fire if more than one call to png_set_alpha_mode and png_set_background is + * made in the same read operation, however multiple calls with PNG_ALPHA_PNG + * are ignored. + */ + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED +PNG_EXPORT(36, void, png_set_strip_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) +PNG_EXPORT(37, void, png_set_swap_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) +PNG_EXPORT(38, void, png_set_invert_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) +/* Add a filler byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */ +PNG_EXPORT(39, void, png_set_filler, (png_structrp png_ptr, png_uint_32 filler, + int flags)); +/* The values of the PNG_FILLER_ defines should NOT be changed */ +# define PNG_FILLER_BEFORE 0 +# define PNG_FILLER_AFTER 1 +/* Add an alpha byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */ +PNG_EXPORT(40, void, png_set_add_alpha, (png_structrp png_ptr, + png_uint_32 filler, int flags)); +#endif /* READ_FILLER || WRITE_FILLER */ + +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +/* Swap bytes in 16-bit depth files. */ +PNG_EXPORT(41, void, png_set_swap, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) +/* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */ +PNG_EXPORT(42, void, png_set_packing, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ + defined(PNG_WRITE_PACKSWAP_SUPPORTED) +/* Swap packing order of pixels in bytes. */ +PNG_EXPORT(43, void, png_set_packswap, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) +/* Converts files to legal bit depths. */ +PNG_EXPORT(44, void, png_set_shift, (png_structrp png_ptr, png_const_color_8p + true_bits)); +#endif + +#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ + defined(PNG_WRITE_INTERLACING_SUPPORTED) +/* Have the code handle the interlacing. Returns the number of passes. + * MUST be called before png_read_update_info or png_start_read_image, + * otherwise it will not have the desired effect. Note that it is still + * necessary to call png_read_row or png_read_rows png_get_image_height + * times for each pass. +*/ +PNG_EXPORT(45, int, png_set_interlace_handling, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) +/* Invert monochrome files */ +PNG_EXPORT(46, void, png_set_invert_mono, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_BACKGROUND_SUPPORTED +/* Handle alpha and tRNS by replacing with a background color. Prior to + * libpng-1.5.4 this API must not be called before the PNG file header has been + * read. Doing so will result in unexpected behavior and possible warnings or + * errors if the PNG file contains a bKGD chunk. + */ +PNG_FP_EXPORT(47, void, png_set_background, (png_structrp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, double background_gamma)) +PNG_FIXED_EXPORT(215, void, png_set_background_fixed, (png_structrp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, png_fixed_point background_gamma)) +#endif +#ifdef PNG_READ_BACKGROUND_SUPPORTED +# define PNG_BACKGROUND_GAMMA_UNKNOWN 0 +# define PNG_BACKGROUND_GAMMA_SCREEN 1 +# define PNG_BACKGROUND_GAMMA_FILE 2 +# define PNG_BACKGROUND_GAMMA_UNIQUE 3 +#endif + +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED +/* Scale a 16-bit depth file down to 8-bit, accurately. */ +PNG_EXPORT(229, void, png_set_scale_16, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED +#define PNG_READ_16_TO_8_SUPPORTED /* Name prior to 1.5.4 */ +/* Strip the second byte of information from a 16-bit depth file. */ +PNG_EXPORT(48, void, png_set_strip_16, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* Turn on quantizing, and reduce the palette to the number of colors + * available. + */ +PNG_EXPORT(49, void, png_set_quantize, (png_structrp png_ptr, + png_colorp palette, int num_palette, int maximum_colors, + png_const_uint_16p histogram, int full_quantize)); +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* The threshold on gamma processing is configurable but hard-wired into the + * library. The following is the floating point variant. + */ +#define PNG_GAMMA_THRESHOLD (PNG_GAMMA_THRESHOLD_FIXED*.00001) + +/* Handle gamma correction. Screen_gamma=(display_exponent). + * NOTE: this API simply sets the screen and file gamma values. It will + * therefore override the value for gamma in a PNG file if it is called after + * the file header has been read - use with care - call before reading the PNG + * file for best results! + * + * These routines accept the same gamma values as png_set_alpha_mode (described + * above). The PNG_GAMMA_ defines and PNG_DEFAULT_sRGB can be passed to either + * API (floating point or fixed.) Notice, however, that the 'file_gamma' value + * is the inverse of a 'screen gamma' value. + */ +PNG_FP_EXPORT(50, void, png_set_gamma, (png_structrp png_ptr, + double screen_gamma, double override_file_gamma)) +PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed, (png_structrp png_ptr, + png_fixed_point screen_gamma, png_fixed_point override_file_gamma)) +#endif + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +/* Set how many lines between output flushes - 0 for no flushing */ +PNG_EXPORT(51, void, png_set_flush, (png_structrp png_ptr, int nrows)); +/* Flush the current PNG output buffer */ +PNG_EXPORT(52, void, png_write_flush, (png_structrp png_ptr)); +#endif + +/* Optional update palette with requested transformations */ +PNG_EXPORT(53, void, png_start_read_image, (png_structrp png_ptr)); + +/* Optional call to update the users info structure */ +PNG_EXPORT(54, void, png_read_update_info, (png_structrp png_ptr, + png_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read one or more rows of image data. */ +PNG_EXPORT(55, void, png_read_rows, (png_structrp png_ptr, png_bytepp row, + png_bytepp display_row, png_uint_32 num_rows)); +#endif + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read a row of data. */ +PNG_EXPORT(56, void, png_read_row, (png_structrp png_ptr, png_bytep row, + png_bytep display_row)); +#endif + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the whole image into memory at once. */ +PNG_EXPORT(57, void, png_read_image, (png_structrp png_ptr, png_bytepp image)); +#endif + +/* Write a row of image data */ +PNG_EXPORT(58, void, png_write_row, (png_structrp png_ptr, + png_const_bytep row)); + +/* Write a few rows of image data: (*row) is not written; however, the type + * is declared as writeable to maintain compatibility with previous versions + * of libpng and to allow the 'display_row' array from read_rows to be passed + * unchanged to write_rows. + */ +PNG_EXPORT(59, void, png_write_rows, (png_structrp png_ptr, png_bytepp row, + png_uint_32 num_rows)); + +/* Write the image data */ +PNG_EXPORT(60, void, png_write_image, (png_structrp png_ptr, png_bytepp image)); + +/* Write the end of the PNG file. */ +PNG_EXPORT(61, void, png_write_end, (png_structrp png_ptr, + png_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the end of the PNG file. */ +PNG_EXPORT(62, void, png_read_end, (png_structrp png_ptr, png_inforp info_ptr)); +#endif + +/* Free any memory associated with the png_info_struct */ +PNG_EXPORT(63, void, png_destroy_info_struct, (png_const_structrp png_ptr, + png_infopp info_ptr_ptr)); + +/* Free any memory associated with the png_struct and the png_info_structs */ +PNG_EXPORT(64, void, png_destroy_read_struct, (png_structpp png_ptr_ptr, + png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); + +/* Free any memory associated with the png_struct and the png_info_structs */ +PNG_EXPORT(65, void, png_destroy_write_struct, (png_structpp png_ptr_ptr, + png_infopp info_ptr_ptr)); + +/* Set the libpng method of handling chunk CRC errors */ +PNG_EXPORT(66, void, png_set_crc_action, (png_structrp png_ptr, int crit_action, + int ancil_action)); + +/* Values for png_set_crc_action() say how to handle CRC errors in + * ancillary and critical chunks, and whether to use the data contained + * therein. Note that it is impossible to "discard" data in a critical + * chunk. For versions prior to 0.90, the action was always error/quit, + * whereas in version 0.90 and later, the action for CRC errors in ancillary + * chunks is warn/discard. These values should NOT be changed. + * + * value action:critical action:ancillary + */ +#define PNG_CRC_DEFAULT 0 /* error/quit warn/discard data */ +#define PNG_CRC_ERROR_QUIT 1 /* error/quit error/quit */ +#define PNG_CRC_WARN_DISCARD 2 /* (INVALID) warn/discard data */ +#define PNG_CRC_WARN_USE 3 /* warn/use data warn/use data */ +#define PNG_CRC_QUIET_USE 4 /* quiet/use data quiet/use data */ +#define PNG_CRC_NO_CHANGE 5 /* use current value use current value */ + +#ifdef PNG_WRITE_SUPPORTED +/* These functions give the user control over the scan-line filtering in + * libpng and the compression methods used by zlib. These functions are + * mainly useful for testing, as the defaults should work with most users. + * Those users who are tight on memory or want faster performance at the + * expense of compression can modify them. See the compression library + * header file (zlib.h) for an explanation of the compression functions. + */ + +/* Set the filtering method(s) used by libpng. Currently, the only valid + * value for "method" is 0. + */ +PNG_EXPORT(67, void, png_set_filter, (png_structrp png_ptr, int method, + int filters)); +#endif /* WRITE */ + +/* Flags for png_set_filter() to say which filters to use. The flags + * are chosen so that they don't conflict with real filter types + * below, in case they are supplied instead of the #defined constants. + * These values should NOT be changed. + */ +#define PNG_NO_FILTERS 0x00 +#define PNG_FILTER_NONE 0x08 +#define PNG_FILTER_SUB 0x10 +#define PNG_FILTER_UP 0x20 +#define PNG_FILTER_AVG 0x40 +#define PNG_FILTER_PAETH 0x80 +#define PNG_FAST_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP) +#define PNG_ALL_FILTERS (PNG_FAST_FILTERS | PNG_FILTER_AVG | PNG_FILTER_PAETH) + +/* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now. + * These defines should NOT be changed. + */ +#define PNG_FILTER_VALUE_NONE 0 +#define PNG_FILTER_VALUE_SUB 1 +#define PNG_FILTER_VALUE_UP 2 +#define PNG_FILTER_VALUE_AVG 3 +#define PNG_FILTER_VALUE_PAETH 4 +#define PNG_FILTER_VALUE_LAST 5 + +#ifdef PNG_WRITE_SUPPORTED +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* DEPRECATED */ +PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structrp png_ptr, + int heuristic_method, int num_weights, png_const_doublep filter_weights, + png_const_doublep filter_costs)) +PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed, + (png_structrp png_ptr, int heuristic_method, int num_weights, + png_const_fixed_point_p filter_weights, + png_const_fixed_point_p filter_costs)) +#endif /* WRITE_WEIGHTED_FILTER */ + +/* The following are no longer used and will be removed from libpng-1.7: */ +#define PNG_FILTER_HEURISTIC_DEFAULT 0 /* Currently "UNWEIGHTED" */ +#define PNG_FILTER_HEURISTIC_UNWEIGHTED 1 /* Used by libpng < 0.95 */ +#define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */ +#define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */ + +/* Set the library compression level. Currently, valid values range from + * 0 - 9, corresponding directly to the zlib compression levels 0 - 9 + * (0 - no compression, 9 - "maximal" compression). Note that tests have + * shown that zlib compression levels 3-6 usually perform as well as level 9 + * for PNG images, and do considerably fewer calculations. In the future, + * these values may not correspond directly to the zlib compression levels. + */ +#ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED +PNG_EXPORT(69, void, png_set_compression_level, (png_structrp png_ptr, + int level)); + +PNG_EXPORT(70, void, png_set_compression_mem_level, (png_structrp png_ptr, + int mem_level)); + +PNG_EXPORT(71, void, png_set_compression_strategy, (png_structrp png_ptr, + int strategy)); + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +PNG_EXPORT(72, void, png_set_compression_window_bits, (png_structrp png_ptr, + int window_bits)); + +PNG_EXPORT(73, void, png_set_compression_method, (png_structrp png_ptr, + int method)); +#endif /* WRITE_CUSTOMIZE_COMPRESSION */ + +#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +/* Also set zlib parameters for compressing non-IDAT chunks */ +PNG_EXPORT(222, void, png_set_text_compression_level, (png_structrp png_ptr, + int level)); + +PNG_EXPORT(223, void, png_set_text_compression_mem_level, (png_structrp png_ptr, + int mem_level)); + +PNG_EXPORT(224, void, png_set_text_compression_strategy, (png_structrp png_ptr, + int strategy)); + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +PNG_EXPORT(225, void, png_set_text_compression_window_bits, + (png_structrp png_ptr, int window_bits)); + +PNG_EXPORT(226, void, png_set_text_compression_method, (png_structrp png_ptr, + int method)); +#endif /* WRITE_CUSTOMIZE_ZTXT_COMPRESSION */ +#endif /* WRITE */ + +/* These next functions are called for input/output, memory, and error + * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c, + * and call standard C I/O routines such as fread(), fwrite(), and + * fprintf(). These functions can be made to use other I/O routines + * at run time for those applications that need to handle I/O in a + * different manner by calling png_set_???_fn(). See libpng-manual.txt for + * more information. + */ + +#ifdef PNG_STDIO_SUPPORTED +/* Initialize the input/output for the PNG file to the default functions. */ +PNG_EXPORT(74, void, png_init_io, (png_structrp png_ptr, png_FILE_p fp)); +#endif + +/* Replace the (error and abort), and warning functions with user + * supplied functions. If no messages are to be printed you must still + * write and use replacement functions. The replacement error_fn should + * still do a longjmp to the last setjmp location if you are using this + * method of error handling. If error_fn or warning_fn is NULL, the + * default function will be used. + */ + +PNG_EXPORT(75, void, png_set_error_fn, (png_structrp png_ptr, + png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); + +/* Return the user pointer associated with the error functions */ +PNG_EXPORT(76, png_voidp, png_get_error_ptr, (png_const_structrp png_ptr)); + +/* Replace the default data output functions with a user supplied one(s). + * If buffered output is not used, then output_flush_fn can be set to NULL. + * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time + * output_flush_fn will be ignored (and thus can be NULL). + * It is probably a mistake to use NULL for output_flush_fn if + * write_data_fn is not also NULL unless you have built libpng with + * PNG_WRITE_FLUSH_SUPPORTED undefined, because in this case libpng's + * default flush function, which uses the standard *FILE structure, will + * be used. + */ +PNG_EXPORT(77, void, png_set_write_fn, (png_structrp png_ptr, png_voidp io_ptr, + png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); + +/* Replace the default data input function with a user supplied one. */ +PNG_EXPORT(78, void, png_set_read_fn, (png_structrp png_ptr, png_voidp io_ptr, + png_rw_ptr read_data_fn)); + +/* Return the user pointer associated with the I/O functions */ +PNG_EXPORT(79, png_voidp, png_get_io_ptr, (png_const_structrp png_ptr)); + +PNG_EXPORT(80, void, png_set_read_status_fn, (png_structrp png_ptr, + png_read_status_ptr read_row_fn)); + +PNG_EXPORT(81, void, png_set_write_status_fn, (png_structrp png_ptr, + png_write_status_ptr write_row_fn)); + +#ifdef PNG_USER_MEM_SUPPORTED +/* Replace the default memory allocation functions with user supplied one(s). */ +PNG_EXPORT(82, void, png_set_mem_fn, (png_structrp png_ptr, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn)); +/* Return the user pointer associated with the memory functions */ +PNG_EXPORT(83, png_voidp, png_get_mem_ptr, (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED +PNG_EXPORT(84, void, png_set_read_user_transform_fn, (png_structrp png_ptr, + png_user_transform_ptr read_user_transform_fn)); +#endif + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED +PNG_EXPORT(85, void, png_set_write_user_transform_fn, (png_structrp png_ptr, + png_user_transform_ptr write_user_transform_fn)); +#endif + +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +PNG_EXPORT(86, void, png_set_user_transform_info, (png_structrp png_ptr, + png_voidp user_transform_ptr, int user_transform_depth, + int user_transform_channels)); +/* Return the user pointer associated with the user transform functions */ +PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr, + (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED +/* Return information about the row currently being processed. Note that these + * APIs do not fail but will return unexpected results if called outside a user + * transform callback. Also note that when transforming an interlaced image the + * row number is the row number within the sub-image of the interlace pass, so + * the value will increase to the height of the sub-image (not the full image) + * then reset to 0 for the next pass. + * + * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to + * find the output pixel (x,y) given an interlaced sub-image pixel + * (row,col,pass). (See below for these macros.) + */ +PNG_EXPORT(217, png_uint_32, png_get_current_row_number, (png_const_structrp)); +PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structrp)); +#endif + +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED +/* This callback is called only for *unknown* chunks. If + * PNG_HANDLE_AS_UNKNOWN_SUPPORTED is set then it is possible to set known + * chunks to be treated as unknown, however in this case the callback must do + * any processing required by the chunk (e.g. by calling the appropriate + * png_set_ APIs.) + * + * There is no write support - on write, by default, all the chunks in the + * 'unknown' list are written in the specified position. + * + * The integer return from the callback function is interpreted thus: + * + * negative: An error occurred; png_chunk_error will be called. + * zero: The chunk was not handled, the chunk will be saved. A critical + * chunk will cause an error at this point unless it is to be saved. + * positive: The chunk was handled, libpng will ignore/discard it. + * + * See "INTERACTION WITH USER CHUNK CALLBACKS" below for important notes about + * how this behavior will change in libpng 1.7 + */ +PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structrp png_ptr, + png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +/* Sets the function callbacks for the push reader, and a pointer to a + * user-defined structure available to the callback functions. + */ +PNG_EXPORT(90, void, png_set_progressive_read_fn, (png_structrp png_ptr, + png_voidp progressive_ptr, png_progressive_info_ptr info_fn, + png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn)); + +/* Returns the user pointer associated with the push read functions */ +PNG_EXPORT(91, png_voidp, png_get_progressive_ptr, + (png_const_structrp png_ptr)); + +/* Function to be called when data becomes available */ +PNG_EXPORT(92, void, png_process_data, (png_structrp png_ptr, + png_inforp info_ptr, png_bytep buffer, size_t buffer_size)); + +/* A function which may be called *only* within png_process_data to stop the + * processing of any more data. The function returns the number of bytes + * remaining, excluding any that libpng has cached internally. A subsequent + * call to png_process_data must supply these bytes again. If the argument + * 'save' is set to true the routine will first save all the pending data and + * will always return 0. + */ +PNG_EXPORT(219, size_t, png_process_data_pause, (png_structrp, int save)); + +/* A function which may be called *only* outside (after) a call to + * png_process_data. It returns the number of bytes of data to skip in the + * input. Normally it will return 0, but if it returns a non-zero value the + * application must skip than number of bytes of input data and pass the + * following data to the next call to png_process_data. + */ +PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structrp)); + +/* Function that combines rows. 'new_row' is a flag that should come from + * the callback and be non-NULL if anything needs to be done; the library + * stores its own version of the new data internally and ignores the passed + * in value. + */ +PNG_EXPORT(93, void, png_progressive_combine_row, (png_const_structrp png_ptr, + png_bytep old_row, png_const_bytep new_row)); +#endif /* PROGRESSIVE_READ */ + +PNG_EXPORTA(94, png_voidp, png_malloc, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); +/* Added at libpng version 1.4.0 */ +PNG_EXPORTA(95, png_voidp, png_calloc, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); + +/* Added at libpng version 1.2.4 */ +PNG_EXPORTA(96, png_voidp, png_malloc_warn, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); + +/* Frees a pointer allocated by png_malloc() */ +PNG_EXPORT(97, void, png_free, (png_const_structrp png_ptr, png_voidp ptr)); + +/* Free data that was allocated internally */ +PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 free_me, int num)); + +/* Reassign the responsibility for freeing existing data, whether allocated + * by libpng or by the application; this works on the png_info structure passed + * in, without changing the state for other png_info structures. + */ +PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr, + png_inforp info_ptr, int freer, png_uint_32 mask)); + +/* Assignments for png_data_freer */ +#define PNG_DESTROY_WILL_FREE_DATA 1 +#define PNG_SET_WILL_FREE_DATA 1 +#define PNG_USER_WILL_FREE_DATA 2 +/* Flags for png_ptr->free_me and info_ptr->free_me */ +#define PNG_FREE_HIST 0x0008U +#define PNG_FREE_ICCP 0x0010U +#define PNG_FREE_SPLT 0x0020U +#define PNG_FREE_ROWS 0x0040U +#define PNG_FREE_PCAL 0x0080U +#define PNG_FREE_SCAL 0x0100U +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +# define PNG_FREE_UNKN 0x0200U +#endif +/* PNG_FREE_LIST 0x0400U removed in 1.6.0 because it is ignored */ +#define PNG_FREE_PLTE 0x1000U +#define PNG_FREE_TRNS 0x2000U +#define PNG_FREE_TEXT 0x4000U +#define PNG_FREE_EXIF 0x8000U /* Added at libpng-1.6.31 */ +#define PNG_FREE_ALL 0xffffU +#define PNG_FREE_MUL 0x4220U /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ + +#ifdef PNG_USER_MEM_SUPPORTED +PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED PNG_DEPRECATED); +PNG_EXPORTA(101, void, png_free_default, (png_const_structrp png_ptr, + png_voidp ptr), PNG_DEPRECATED); +#endif + +#ifdef PNG_ERROR_TEXT_SUPPORTED +/* Fatal error in PNG image of libpng - can't continue */ +PNG_EXPORTA(102, void, png_error, (png_const_structrp png_ptr, + png_const_charp error_message), PNG_NORETURN); + +/* The same, but the chunk name is prepended to the error string. */ +PNG_EXPORTA(103, void, png_chunk_error, (png_const_structrp png_ptr, + png_const_charp error_message), PNG_NORETURN); + +#else +/* Fatal error in PNG image of libpng - can't continue */ +PNG_EXPORTA(104, void, png_err, (png_const_structrp png_ptr), PNG_NORETURN); +# define png_error(s1,s2) png_err(s1) +# define png_chunk_error(s1,s2) png_err(s1) +#endif + +#ifdef PNG_WARNINGS_SUPPORTED +/* Non-fatal error in libpng. Can continue, but may have a problem. */ +PNG_EXPORT(105, void, png_warning, (png_const_structrp png_ptr, + png_const_charp warning_message)); + +/* Non-fatal error in libpng, chunk name is prepended to message. */ +PNG_EXPORT(106, void, png_chunk_warning, (png_const_structrp png_ptr, + png_const_charp warning_message)); +#else +# define png_warning(s1,s2) ((void)(s1)) +# define png_chunk_warning(s1,s2) ((void)(s1)) +#endif + +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +/* Benign error in libpng. Can continue, but may have a problem. + * User can choose whether to handle as a fatal error or as a warning. */ +PNG_EXPORT(107, void, png_benign_error, (png_const_structrp png_ptr, + png_const_charp warning_message)); + +#ifdef PNG_READ_SUPPORTED +/* Same, chunk name is prepended to message (only during read) */ +PNG_EXPORT(108, void, png_chunk_benign_error, (png_const_structrp png_ptr, + png_const_charp warning_message)); +#endif + +PNG_EXPORT(109, void, png_set_benign_errors, + (png_structrp png_ptr, int allowed)); +#else +# ifdef PNG_ALLOW_BENIGN_ERRORS +# define png_benign_error png_warning +# define png_chunk_benign_error png_chunk_warning +# else +# define png_benign_error png_error +# define png_chunk_benign_error png_chunk_error +# endif +#endif + +/* The png_set_ functions are for storing values in the png_info_struct. + * Similarly, the png_get_ calls are used to read values from the + * png_info_struct, either storing the parameters in the passed variables, or + * setting pointers into the png_info_struct where the data is stored. The + * png_get_ functions return a non-zero value if the data was available + * in info_ptr, or return zero and do not change any of the parameters if the + * data was not available. + * + * These functions should be used instead of directly accessing png_info + * to avoid problems with future changes in the size and internal layout of + * png_info_struct. + */ +/* Returns "flag" if chunk data is valid in info_ptr. */ +PNG_EXPORT(110, png_uint_32, png_get_valid, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 flag)); + +/* Returns number of bytes needed to hold a transformed row. */ +PNG_EXPORT(111, size_t, png_get_rowbytes, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +#ifdef PNG_INFO_IMAGE_SUPPORTED +/* Returns row_pointers, which is an array of pointers to scanlines that was + * returned from png_read_png(). + */ +PNG_EXPORT(112, png_bytepp, png_get_rows, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Set row_pointers, which is an array of pointers to scanlines for use + * by png_write_png(). + */ +PNG_EXPORT(113, void, png_set_rows, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytepp row_pointers)); +#endif + +/* Returns number of color channels in image. */ +PNG_EXPORT(114, png_byte, png_get_channels, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +#ifdef PNG_EASY_ACCESS_SUPPORTED +/* Returns image width in pixels. */ +PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image height in pixels. */ +PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image bit_depth. */ +PNG_EXPORT(117, png_byte, png_get_bit_depth, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image color_type. */ +PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image filter_type. */ +PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image interlace_type. */ +PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image compression_type. */ +PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image resolution in pixels per meter, from pHYs chunk data. */ +PNG_EXPORT(122, png_uint_32, png_get_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(123, png_uint_32, png_get_x_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(124, png_uint_32, png_get_y_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +/* Returns pixel aspect ratio, computed from pHYs chunk data. */ +PNG_FP_EXPORT(125, float, png_get_pixel_aspect_ratio, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) + +/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */ +PNG_EXPORT(126, png_int_32, png_get_x_offset_pixels, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(127, png_int_32, png_get_y_offset_pixels, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(128, png_int_32, png_get_x_offset_microns, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(129, png_int_32, png_get_y_offset_microns, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +#endif /* EASY_ACCESS */ + +#ifdef PNG_READ_SUPPORTED +/* Returns pointer to signature string read from PNG header */ +PNG_EXPORT(130, png_const_bytep, png_get_signature, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); +#endif + +#ifdef PNG_bKGD_SUPPORTED +PNG_EXPORT(131, png_uint_32, png_get_bKGD, (png_const_structrp png_ptr, + png_inforp info_ptr, png_color_16p *background)); +#endif + +#ifdef PNG_bKGD_SUPPORTED +PNG_EXPORT(132, void, png_set_bKGD, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_color_16p background)); +#endif + +#ifdef PNG_cHRM_SUPPORTED +PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *white_x, double *white_y, double *red_x, + double *red_y, double *green_x, double *green_y, double *blue_x, + double *blue_y)) +PNG_FP_EXPORT(230, png_uint_32, png_get_cHRM_XYZ, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *red_X, double *red_Y, double *red_Z, + double *green_X, double *green_Y, double *green_Z, double *blue_X, + double *blue_Y, double *blue_Z)) +PNG_FIXED_EXPORT(134, png_uint_32, png_get_cHRM_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_white_x, png_fixed_point *int_white_y, + png_fixed_point *int_red_x, png_fixed_point *int_red_y, + png_fixed_point *int_green_x, png_fixed_point *int_green_y, + png_fixed_point *int_blue_x, png_fixed_point *int_blue_y)) +PNG_FIXED_EXPORT(231, png_uint_32, png_get_cHRM_XYZ_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_red_X, png_fixed_point *int_red_Y, + png_fixed_point *int_red_Z, png_fixed_point *int_green_X, + png_fixed_point *int_green_Y, png_fixed_point *int_green_Z, + png_fixed_point *int_blue_X, png_fixed_point *int_blue_Y, + png_fixed_point *int_blue_Z)) +#endif + +#ifdef PNG_cHRM_SUPPORTED +PNG_FP_EXPORT(135, void, png_set_cHRM, (png_const_structrp png_ptr, + png_inforp info_ptr, + double white_x, double white_y, double red_x, double red_y, double green_x, + double green_y, double blue_x, double blue_y)) +PNG_FP_EXPORT(232, void, png_set_cHRM_XYZ, (png_const_structrp png_ptr, + png_inforp info_ptr, double red_X, double red_Y, double red_Z, + double green_X, double green_Y, double green_Z, double blue_X, + double blue_Y, double blue_Z)) +PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_white_x, + png_fixed_point int_white_y, png_fixed_point int_red_x, + png_fixed_point int_red_y, png_fixed_point int_green_x, + png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)) +PNG_FIXED_EXPORT(233, void, png_set_cHRM_XYZ_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_red_X, png_fixed_point int_red_Y, + png_fixed_point int_red_Z, png_fixed_point int_green_X, + png_fixed_point int_green_Y, png_fixed_point int_green_Z, + png_fixed_point int_blue_X, png_fixed_point int_blue_Y, + png_fixed_point int_blue_Z)) +#endif + +#ifdef PNG_eXIf_SUPPORTED +PNG_EXPORT(246, png_uint_32, png_get_eXIf, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytep *exif)); +PNG_EXPORT(247, void, png_set_eXIf, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytep exif)); + +PNG_EXPORT(248, png_uint_32, png_get_eXIf_1, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *num_exif, png_bytep *exif)); +PNG_EXPORT(249, void, png_set_eXIf_1, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 num_exif, png_bytep exif)); +#endif + +#ifdef PNG_gAMA_SUPPORTED +PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *file_gamma)) +PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_file_gamma)) +#endif + +#ifdef PNG_gAMA_SUPPORTED +PNG_FP_EXPORT(139, void, png_set_gAMA, (png_const_structrp png_ptr, + png_inforp info_ptr, double file_gamma)) +PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_file_gamma)) +#endif + +#ifdef PNG_hIST_SUPPORTED +PNG_EXPORT(141, png_uint_32, png_get_hIST, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_16p *hist)); +PNG_EXPORT(142, void, png_set_hIST, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_uint_16p hist)); +#endif + +PNG_EXPORT(143, png_uint_32, png_get_IHDR, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *width, png_uint_32 *height, + int *bit_depth, int *color_type, int *interlace_method, + int *compression_method, int *filter_method)); + +PNG_EXPORT(144, void, png_set_IHDR, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_method, int compression_method, + int filter_method)); + +#ifdef PNG_oFFs_SUPPORTED +PNG_EXPORT(145, png_uint_32, png_get_oFFs, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, + int *unit_type)); +#endif + +#ifdef PNG_oFFs_SUPPORTED +PNG_EXPORT(146, void, png_set_oFFs, (png_const_structrp png_ptr, + png_inforp info_ptr, png_int_32 offset_x, png_int_32 offset_y, + int unit_type)); +#endif + +#ifdef PNG_pCAL_SUPPORTED +PNG_EXPORT(147, png_uint_32, png_get_pCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, png_charp *purpose, png_int_32 *X0, + png_int_32 *X1, int *type, int *nparams, png_charp *units, + png_charpp *params)); +#endif + +#ifdef PNG_pCAL_SUPPORTED +PNG_EXPORT(148, void, png_set_pCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_charp purpose, png_int_32 X0, png_int_32 X1, + int type, int nparams, png_const_charp units, png_charpp params)); +#endif + +#ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(149, png_uint_32, png_get_pHYs, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, + int *unit_type)); +#endif + +#ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(150, void, png_set_pHYs, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); +#endif + +PNG_EXPORT(151, png_uint_32, png_get_PLTE, (png_const_structrp png_ptr, + png_inforp info_ptr, png_colorp *palette, int *num_palette)); + +PNG_EXPORT(152, void, png_set_PLTE, (png_structrp png_ptr, + png_inforp info_ptr, png_const_colorp palette, int num_palette)); + +#ifdef PNG_sBIT_SUPPORTED +PNG_EXPORT(153, png_uint_32, png_get_sBIT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_color_8p *sig_bit)); +#endif + +#ifdef PNG_sBIT_SUPPORTED +PNG_EXPORT(154, void, png_set_sBIT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_color_8p sig_bit)); +#endif + +#ifdef PNG_sRGB_SUPPORTED +PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structrp png_ptr, + png_const_inforp info_ptr, int *file_srgb_intent)); +#endif + +#ifdef PNG_sRGB_SUPPORTED +PNG_EXPORT(156, void, png_set_sRGB, (png_const_structrp png_ptr, + png_inforp info_ptr, int srgb_intent)); +PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_const_structrp png_ptr, + png_inforp info_ptr, int srgb_intent)); +#endif + +#ifdef PNG_iCCP_SUPPORTED +PNG_EXPORT(158, png_uint_32, png_get_iCCP, (png_const_structrp png_ptr, + png_inforp info_ptr, png_charpp name, int *compression_type, + png_bytepp profile, png_uint_32 *proflen)); +#endif + +#ifdef PNG_iCCP_SUPPORTED +PNG_EXPORT(159, void, png_set_iCCP, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_charp name, int compression_type, + png_const_bytep profile, png_uint_32 proflen)); +#endif + +#ifdef PNG_sPLT_SUPPORTED +PNG_EXPORT(160, int, png_get_sPLT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_sPLT_tpp entries)); +#endif + +#ifdef PNG_sPLT_SUPPORTED +PNG_EXPORT(161, void, png_set_sPLT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_sPLT_tp entries, int nentries)); +#endif + +#ifdef PNG_TEXT_SUPPORTED +/* png_get_text also returns the number of text chunks in *num_text */ +PNG_EXPORT(162, int, png_get_text, (png_const_structrp png_ptr, + png_inforp info_ptr, png_textp *text_ptr, int *num_text)); +#endif + +/* Note while png_set_text() will accept a structure whose text, + * language, and translated keywords are NULL pointers, the structure + * returned by png_get_text will always contain regular + * zero-terminated C strings. They might be empty strings but + * they will never be NULL pointers. + */ + +#ifdef PNG_TEXT_SUPPORTED +PNG_EXPORT(163, void, png_set_text, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_textp text_ptr, int num_text)); +#endif + +#ifdef PNG_tIME_SUPPORTED +PNG_EXPORT(164, png_uint_32, png_get_tIME, (png_const_structrp png_ptr, + png_inforp info_ptr, png_timep *mod_time)); +#endif + +#ifdef PNG_tIME_SUPPORTED +PNG_EXPORT(165, void, png_set_tIME, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_timep mod_time)); +#endif + +#ifdef PNG_tRNS_SUPPORTED +PNG_EXPORT(166, png_uint_32, png_get_tRNS, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytep *trans_alpha, int *num_trans, + png_color_16p *trans_color)); +#endif + +#ifdef PNG_tRNS_SUPPORTED +PNG_EXPORT(167, void, png_set_tRNS, (png_structrp png_ptr, + png_inforp info_ptr, png_const_bytep trans_alpha, int num_trans, + png_const_color_16p trans_color)); +#endif + +#ifdef PNG_sCAL_SUPPORTED +PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL, (png_const_structrp png_ptr, + png_const_inforp info_ptr, int *unit, double *width, double *height)) +#if defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) || \ + defined(PNG_FLOATING_POINT_SUPPORTED) +/* NOTE: this API is currently implemented using floating point arithmetic, + * consequently it can only be used on systems with floating point support. + * In any case the range of values supported by png_fixed_point is small and it + * is highly recommended that png_get_sCAL_s be used instead. + */ +PNG_FIXED_EXPORT(214, png_uint_32, png_get_sCAL_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit, + png_fixed_point *width, png_fixed_point *height)) +#endif +PNG_EXPORT(169, png_uint_32, png_get_sCAL_s, + (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit, + png_charpp swidth, png_charpp sheight)); + +PNG_FP_EXPORT(170, void, png_set_sCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, double width, double height)) +PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, png_fixed_point width, + png_fixed_point height)) +PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, + png_const_charp swidth, png_const_charp sheight)); +#endif /* sCAL */ + +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED +/* Provide the default handling for all unknown chunks or, optionally, for + * specific unknown chunks. + * + * NOTE: prior to 1.6.0 the handling specified for particular chunks on read was + * ignored and the default was used, the per-chunk setting only had an effect on + * write. If you wish to have chunk-specific handling on read in code that must + * work on earlier versions you must use a user chunk callback to specify the + * desired handling (keep or discard.) + * + * The 'keep' parameter is a PNG_HANDLE_CHUNK_ value as listed below. The + * parameter is interpreted as follows: + * + * READ: + * PNG_HANDLE_CHUNK_AS_DEFAULT: + * Known chunks: do normal libpng processing, do not keep the chunk (but + * see the comments below about PNG_HANDLE_AS_UNKNOWN_SUPPORTED) + * Unknown chunks: for a specific chunk use the global default, when used + * as the default discard the chunk data. + * PNG_HANDLE_CHUNK_NEVER: + * Discard the chunk data. + * PNG_HANDLE_CHUNK_IF_SAFE: + * Keep the chunk data if the chunk is not critical else raise a chunk + * error. + * PNG_HANDLE_CHUNK_ALWAYS: + * Keep the chunk data. + * + * If the chunk data is saved it can be retrieved using png_get_unknown_chunks, + * below. Notice that specifying "AS_DEFAULT" as a global default is equivalent + * to specifying "NEVER", however when "AS_DEFAULT" is used for specific chunks + * it simply resets the behavior to the libpng default. + * + * INTERACTION WITH USER CHUNK CALLBACKS: + * The per-chunk handling is always used when there is a png_user_chunk_ptr + * callback and the callback returns 0; the chunk is then always stored *unless* + * it is critical and the per-chunk setting is other than ALWAYS. Notice that + * the global default is *not* used in this case. (In effect the per-chunk + * value is incremented to at least IF_SAFE.) + * + * IMPORTANT NOTE: this behavior will change in libpng 1.7 - the global and + * per-chunk defaults will be honored. If you want to preserve the current + * behavior when your callback returns 0 you must set PNG_HANDLE_CHUNK_IF_SAFE + * as the default - if you don't do this libpng 1.6 will issue a warning. + * + * If you want unhandled unknown chunks to be discarded in libpng 1.6 and + * earlier simply return '1' (handled). + * + * PNG_HANDLE_AS_UNKNOWN_SUPPORTED: + * If this is *not* set known chunks will always be handled by libpng and + * will never be stored in the unknown chunk list. Known chunks listed to + * png_set_keep_unknown_chunks will have no effect. If it is set then known + * chunks listed with a keep other than AS_DEFAULT will *never* be processed + * by libpng, in addition critical chunks must either be processed by the + * callback or saved. + * + * The IHDR and IEND chunks must not be listed. Because this turns off the + * default handling for chunks that would otherwise be recognized the + * behavior of libpng transformations may well become incorrect! + * + * WRITE: + * When writing chunks the options only apply to the chunks specified by + * png_set_unknown_chunks (below), libpng will *always* write known chunks + * required by png_set_ calls and will always write the core critical chunks + * (as required for PLTE). + * + * Each chunk in the png_set_unknown_chunks list is looked up in the + * png_set_keep_unknown_chunks list to find the keep setting, this is then + * interpreted as follows: + * + * PNG_HANDLE_CHUNK_AS_DEFAULT: + * Write safe-to-copy chunks and write other chunks if the global + * default is set to _ALWAYS, otherwise don't write this chunk. + * PNG_HANDLE_CHUNK_NEVER: + * Do not write the chunk. + * PNG_HANDLE_CHUNK_IF_SAFE: + * Write the chunk if it is safe-to-copy, otherwise do not write it. + * PNG_HANDLE_CHUNK_ALWAYS: + * Write the chunk. + * + * Note that the default behavior is effectively the opposite of the read case - + * in read unknown chunks are not stored by default, in write they are written + * by default. Also the behavior of PNG_HANDLE_CHUNK_IF_SAFE is very different + * - on write the safe-to-copy bit is checked, on read the critical bit is + * checked and on read if the chunk is critical an error will be raised. + * + * num_chunks: + * =========== + * If num_chunks is positive, then the "keep" parameter specifies the manner + * for handling only those chunks appearing in the chunk_list array, + * otherwise the chunk list array is ignored. + * + * If num_chunks is 0 the "keep" parameter specifies the default behavior for + * unknown chunks, as described above. + * + * If num_chunks is negative, then the "keep" parameter specifies the manner + * for handling all unknown chunks plus all chunks recognized by libpng + * except for the IHDR, PLTE, tRNS, IDAT, and IEND chunks (which continue to + * be processed by libpng. + */ +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED +PNG_EXPORT(172, void, png_set_keep_unknown_chunks, (png_structrp png_ptr, + int keep, png_const_bytep chunk_list, int num_chunks)); +#endif /* HANDLE_AS_UNKNOWN */ + +/* The "keep" PNG_HANDLE_CHUNK_ parameter for the specified chunk is returned; + * the result is therefore true (non-zero) if special handling is required, + * false for the default handling. + */ +PNG_EXPORT(173, int, png_handle_as_unknown, (png_const_structrp png_ptr, + png_const_bytep chunk_name)); +#endif /* SET_UNKNOWN_CHUNKS */ + +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +PNG_EXPORT(174, void, png_set_unknown_chunks, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_unknown_chunkp unknowns, + int num_unknowns)); + /* NOTE: prior to 1.6.0 this routine set the 'location' field of the added + * unknowns to the location currently stored in the png_struct. This is + * invariably the wrong value on write. To fix this call the following API + * for each chunk in the list with the correct location. If you know your + * code won't be compiled on earlier versions you can rely on + * png_set_unknown_chunks(write-ptr, png_get_unknown_chunks(read-ptr)) doing + * the correct thing. + */ + +PNG_EXPORT(175, void, png_set_unknown_chunk_location, + (png_const_structrp png_ptr, png_inforp info_ptr, int chunk, int location)); + +PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structrp png_ptr, + png_inforp info_ptr, png_unknown_chunkpp entries)); +#endif + +/* Png_free_data() will turn off the "valid" flag for anything it frees. + * If you need to turn it off for a chunk that your application has freed, + * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); + */ +PNG_EXPORT(177, void, png_set_invalid, (png_const_structrp png_ptr, + png_inforp info_ptr, int mask)); + +#ifdef PNG_INFO_IMAGE_SUPPORTED +/* The "params" pointer is currently not used and is for future expansion. */ +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +PNG_EXPORT(178, void, png_read_png, (png_structrp png_ptr, png_inforp info_ptr, + int transforms, png_voidp params)); +#endif +#ifdef PNG_WRITE_SUPPORTED +PNG_EXPORT(179, void, png_write_png, (png_structrp png_ptr, png_inforp info_ptr, + int transforms, png_voidp params)); +#endif +#endif + +PNG_EXPORT(180, png_const_charp, png_get_copyright, + (png_const_structrp png_ptr)); +PNG_EXPORT(181, png_const_charp, png_get_header_ver, + (png_const_structrp png_ptr)); +PNG_EXPORT(182, png_const_charp, png_get_header_version, + (png_const_structrp png_ptr)); +PNG_EXPORT(183, png_const_charp, png_get_libpng_ver, + (png_const_structrp png_ptr)); + +#ifdef PNG_MNG_FEATURES_SUPPORTED +PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structrp png_ptr, + png_uint_32 mng_features_permitted)); +#endif + +/* For use in png_set_keep_unknown, added to version 1.2.6 */ +#define PNG_HANDLE_CHUNK_AS_DEFAULT 0 +#define PNG_HANDLE_CHUNK_NEVER 1 +#define PNG_HANDLE_CHUNK_IF_SAFE 2 +#define PNG_HANDLE_CHUNK_ALWAYS 3 +#define PNG_HANDLE_CHUNK_LAST 4 + +/* Strip the prepended error numbers ("#nnn ") from error and warning + * messages before passing them to the error or warning handler. + */ +#ifdef PNG_ERROR_NUMBERS_SUPPORTED +PNG_EXPORT(185, void, png_set_strip_error_numbers, (png_structrp png_ptr, + png_uint_32 strip_mode)); +#endif + +/* Added in libpng-1.2.6 */ +#ifdef PNG_SET_USER_LIMITS_SUPPORTED +PNG_EXPORT(186, void, png_set_user_limits, (png_structrp png_ptr, + png_uint_32 user_width_max, png_uint_32 user_height_max)); +PNG_EXPORT(187, png_uint_32, png_get_user_width_max, + (png_const_structrp png_ptr)); +PNG_EXPORT(188, png_uint_32, png_get_user_height_max, + (png_const_structrp png_ptr)); +/* Added in libpng-1.4.0 */ +PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structrp png_ptr, + png_uint_32 user_chunk_cache_max)); +PNG_EXPORT(190, png_uint_32, png_get_chunk_cache_max, + (png_const_structrp png_ptr)); +/* Added in libpng-1.4.1 */ +PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structrp png_ptr, + png_alloc_size_t user_chunk_cache_max)); +PNG_EXPORT(192, png_alloc_size_t, png_get_chunk_malloc_max, + (png_const_structrp png_ptr)); +#endif + +#if defined(PNG_INCH_CONVERSIONS_SUPPORTED) +PNG_EXPORT(193, png_uint_32, png_get_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_EXPORT(194, png_uint_32, png_get_x_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_EXPORT(195, png_uint_32, png_get_y_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_FP_EXPORT(196, float, png_get_x_offset_inches, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ +PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#endif + +PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structrp png_ptr, + png_const_inforp info_ptr)) +#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ +PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#endif + +# ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, + int *unit_type)); +# endif /* pHYs */ +#endif /* INCH_CONVERSIONS */ + +/* Added in libpng-1.4.0 */ +#ifdef PNG_IO_STATE_SUPPORTED +PNG_EXPORT(199, png_uint_32, png_get_io_state, (png_const_structrp png_ptr)); + +/* Removed from libpng 1.6; use png_get_io_chunk_type. */ +PNG_REMOVED(200, png_const_bytep, png_get_io_chunk_name, (png_structrp png_ptr), + PNG_DEPRECATED) + +PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type, + (png_const_structrp png_ptr)); + +/* The flags returned by png_get_io_state() are the following: */ +# define PNG_IO_NONE 0x0000 /* no I/O at this moment */ +# define PNG_IO_READING 0x0001 /* currently reading */ +# define PNG_IO_WRITING 0x0002 /* currently writing */ +# define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */ +# define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */ +# define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */ +# define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */ +# define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */ +# define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */ +#endif /* IO_STATE */ + +/* Interlace support. The following macros are always defined so that if + * libpng interlace handling is turned off the macros may be used to handle + * interlaced images within the application. + */ +#define PNG_INTERLACE_ADAM7_PASSES 7 + +/* Two macros to return the first row and first column of the original, + * full, image which appears in a given pass. 'pass' is in the range 0 + * to 6 and the result is in the range 0 to 7. + */ +#define PNG_PASS_START_ROW(pass) (((1&~(pass))<<(3-((pass)>>1)))&7) +#define PNG_PASS_START_COL(pass) (((1& (pass))<<(3-(((pass)+1)>>1)))&7) + +/* A macro to return the offset between pixels in the output row for a pair of + * pixels in the input - effectively the inverse of the 'COL_SHIFT' macro that + * follows. Note that ROW_OFFSET is the offset from one row to the next whereas + * COL_OFFSET is from one column to the next, within a row. + */ +#define PNG_PASS_ROW_OFFSET(pass) ((pass)>2?(8>>(((pass)-1)>>1)):8) +#define PNG_PASS_COL_OFFSET(pass) (1<<((7-(pass))>>1)) + +/* Two macros to help evaluate the number of rows or columns in each + * pass. This is expressed as a shift - effectively log2 of the number or + * rows or columns in each 8x8 tile of the original image. + */ +#define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3) +#define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3) + +/* Hence two macros to determine the number of rows or columns in a given + * pass of an image given its height or width. In fact these macros may + * return non-zero even though the sub-image is empty, because the other + * dimension may be empty for a small image. + */ +#define PNG_PASS_ROWS(height, pass) (((height)+(((1<>PNG_PASS_ROW_SHIFT(pass)) +#define PNG_PASS_COLS(width, pass) (((width)+(((1<>PNG_PASS_COL_SHIFT(pass)) + +/* For the reader row callbacks (both progressive and sequential) it is + * necessary to find the row in the output image given a row in an interlaced + * image, so two more macros: + */ +#define PNG_ROW_FROM_PASS_ROW(y_in, pass) \ + (((y_in)<>(((7-(off))-(pass))<<2)) & 0xF) | \ + ((0x01145AF0>>(((7-(off))-(pass))<<2)) & 0xF0)) + +#define PNG_ROW_IN_INTERLACE_PASS(y, pass) \ + ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1) +#define PNG_COL_IN_INTERLACE_PASS(x, pass) \ + ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1) + +#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED +/* With these routines we avoid an integer divide, which will be slower on + * most machines. However, it does take more operations than the corresponding + * divide method, so it may be slower on a few RISC systems. There are two + * shifts (by 8 or 16 bits) and an addition, versus a single integer divide. + * + * Note that the rounding factors are NOT supposed to be the same! 128 and + * 32768 are correct for the NODIV code; 127 and 32767 are correct for the + * standard method. + * + * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ] + */ + + /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ + +# define png_composite(composite, fg, alpha, bg) \ + { \ + png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \ + * (png_uint_16)(alpha) \ + + (png_uint_16)(bg)*(png_uint_16)(255 \ + - (png_uint_16)(alpha)) + 128); \ + (composite) = (png_byte)(((temp + (temp >> 8)) >> 8) & 0xff); \ + } + +# define png_composite_16(composite, fg, alpha, bg) \ + { \ + png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \ + * (png_uint_32)(alpha) \ + + (png_uint_32)(bg)*(65535 \ + - (png_uint_32)(alpha)) + 32768); \ + (composite) = (png_uint_16)(0xffff & ((temp + (temp >> 16)) >> 16)); \ + } + +#else /* Standard method using integer division */ + +# define png_composite(composite, fg, alpha, bg) \ + (composite) = \ + (png_byte)(0xff & (((png_uint_16)(fg) * (png_uint_16)(alpha) + \ + (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \ + 127) / 255)) + +# define png_composite_16(composite, fg, alpha, bg) \ + (composite) = \ + (png_uint_16)(0xffff & (((png_uint_32)(fg) * (png_uint_32)(alpha) + \ + (png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) + \ + 32767) / 65535)) +#endif /* READ_COMPOSITE_NODIV */ + +#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(201, png_uint_32, png_get_uint_32, (png_const_bytep buf)); +PNG_EXPORT(202, png_uint_16, png_get_uint_16, (png_const_bytep buf)); +PNG_EXPORT(203, png_int_32, png_get_int_32, (png_const_bytep buf)); +#endif + +PNG_EXPORT(204, png_uint_32, png_get_uint_31, (png_const_structrp png_ptr, + png_const_bytep buf)); +/* No png_get_int_16 -- may be added if there's a real need for it. */ + +/* Place a 32-bit number into a buffer in PNG byte order (big-endian). */ +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(205, void, png_save_uint_32, (png_bytep buf, png_uint_32 i)); +#endif +#ifdef PNG_SAVE_INT_32_SUPPORTED +PNG_EXPORT(206, void, png_save_int_32, (png_bytep buf, png_int_32 i)); +#endif + +/* Place a 16-bit number into a buffer in PNG byte order. + * The parameter is declared unsigned int, not png_uint_16, + * just to avoid potential problems on pre-ANSI C compilers. + */ +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i)); +/* No png_save_int_16 -- may be added if there's a real need for it. */ +#endif + +#ifdef PNG_USE_READ_MACROS +/* Inline macros to do direct reads of bytes from the input buffer. + * The png_get_int_32() routine assumes we are using two's complement + * format for negative values, which is almost certainly true. + */ +# define PNG_get_uint_32(buf) \ + (((png_uint_32)(*(buf)) << 24) + \ + ((png_uint_32)(*((buf) + 1)) << 16) + \ + ((png_uint_32)(*((buf) + 2)) << 8) + \ + ((png_uint_32)(*((buf) + 3)))) + + /* From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the + * function) incorrectly returned a value of type png_uint_32. + */ +# define PNG_get_uint_16(buf) \ + ((png_uint_16) \ + (((unsigned int)(*(buf)) << 8) + \ + ((unsigned int)(*((buf) + 1))))) + +# define PNG_get_int_32(buf) \ + ((png_int_32)((*(buf) & 0x80) \ + ? -((png_int_32)(((png_get_uint_32(buf)^0xffffffffU)+1U)&0x7fffffffU)) \ + : (png_int_32)png_get_uint_32(buf))) + +/* If PNG_PREFIX is defined the same thing as below happens in pnglibconf.h, + * but defining a macro name prefixed with PNG_PREFIX. + */ +# ifndef PNG_PREFIX +# define png_get_uint_32(buf) PNG_get_uint_32(buf) +# define png_get_uint_16(buf) PNG_get_uint_16(buf) +# define png_get_int_32(buf) PNG_get_int_32(buf) +# endif +#else +# ifdef PNG_PREFIX + /* No macros; revert to the (redefined) function */ +# define PNG_get_uint_32 (png_get_uint_32) +# define PNG_get_uint_16 (png_get_uint_16) +# define PNG_get_int_32 (png_get_int_32) +# endif +#endif + +#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED +PNG_EXPORT(242, void, png_set_check_for_invalid_index, + (png_structrp png_ptr, int allowed)); +# ifdef PNG_GET_PALETTE_MAX_SUPPORTED +PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr, + png_const_infop info_ptr)); +# endif +#endif /* CHECK_FOR_INVALID_INDEX */ + +/******************************************************************************* + * Section 5: SIMPLIFIED API + ******************************************************************************* + * + * Please read the documentation in libpng-manual.txt (TODO: write said + * documentation) if you don't understand what follows. + * + * The simplified API hides the details of both libpng and the PNG file format + * itself. It allows PNG files to be read into a very limited number of + * in-memory bitmap formats or to be written from the same formats. If these + * formats do not accommodate your needs then you can, and should, use the more + * sophisticated APIs above - these support a wide variety of in-memory formats + * and a wide variety of sophisticated transformations to those formats as well + * as a wide variety of APIs to manipulate ancillary information. + * + * To read a PNG file using the simplified API: + * + * 1) Declare a 'png_image' structure (see below) on the stack, set the + * version field to PNG_IMAGE_VERSION and the 'opaque' pointer to NULL + * (this is REQUIRED, your program may crash if you don't do it.) + * 2) Call the appropriate png_image_begin_read... function. + * 3) Set the png_image 'format' member to the required sample format. + * 4) Allocate a buffer for the image and, if required, the color-map. + * 5) Call png_image_finish_read to read the image and, if required, the + * color-map into your buffers. + * + * There are no restrictions on the format of the PNG input itself; all valid + * color types, bit depths, and interlace methods are acceptable, and the + * input image is transformed as necessary to the requested in-memory format + * during the png_image_finish_read() step. The only caveat is that if you + * request a color-mapped image from a PNG that is full-color or makes + * complex use of an alpha channel the transformation is extremely lossy and the + * result may look terrible. + * + * To write a PNG file using the simplified API: + * + * 1) Declare a 'png_image' structure on the stack and memset() it to all zero. + * 2) Initialize the members of the structure that describe the image, setting + * the 'format' member to the format of the image samples. + * 3) Call the appropriate png_image_write... function with a pointer to the + * image and, if necessary, the color-map to write the PNG data. + * + * png_image is a structure that describes the in-memory format of an image + * when it is being read or defines the in-memory format of an image that you + * need to write: + */ +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) || \ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) + +#define PNG_IMAGE_VERSION 1 + +typedef struct png_control *png_controlp; +typedef struct +{ + png_controlp opaque; /* Initialize to NULL, free with png_image_free */ + png_uint_32 version; /* Set to PNG_IMAGE_VERSION */ + png_uint_32 width; /* Image width in pixels (columns) */ + png_uint_32 height; /* Image height in pixels (rows) */ + png_uint_32 format; /* Image format as defined below */ + png_uint_32 flags; /* A bit mask containing informational flags */ + png_uint_32 colormap_entries; + /* Number of entries in the color-map */ + + /* In the event of an error or warning the following field will be set to a + * non-zero value and the 'message' field will contain a '\0' terminated + * string with the libpng error or warning message. If both warnings and + * an error were encountered, only the error is recorded. If there + * are multiple warnings, only the first one is recorded. + * + * The upper 30 bits of this value are reserved, the low two bits contain + * a value as follows: + */ +# define PNG_IMAGE_WARNING 1 +# define PNG_IMAGE_ERROR 2 + /* + * The result is a two-bit code such that a value more than 1 indicates + * a failure in the API just called: + * + * 0 - no warning or error + * 1 - warning + * 2 - error + * 3 - error preceded by warning + */ +# define PNG_IMAGE_FAILED(png_cntrl) ((((png_cntrl).warning_or_error)&0x03)>1) + + png_uint_32 warning_or_error; + + char message[64]; +} png_image, *png_imagep; + +/* The samples of the image have one to four channels whose components have + * original values in the range 0 to 1.0: + * + * 1: A single gray or luminance channel (G). + * 2: A gray/luminance channel and an alpha channel (GA). + * 3: Three red, green, blue color channels (RGB). + * 4: Three color channels and an alpha channel (RGBA). + * + * The components are encoded in one of two ways: + * + * a) As a small integer, value 0..255, contained in a single byte. For the + * alpha channel the original value is simply value/255. For the color or + * luminance channels the value is encoded according to the sRGB specification + * and matches the 8-bit format expected by typical display devices. + * + * The color/gray channels are not scaled (pre-multiplied) by the alpha + * channel and are suitable for passing to color management software. + * + * b) As a value in the range 0..65535, contained in a 2-byte integer. All + * channels can be converted to the original value by dividing by 65535; all + * channels are linear. Color channels use the RGB encoding (RGB end-points) of + * the sRGB specification. This encoding is identified by the + * PNG_FORMAT_FLAG_LINEAR flag below. + * + * When the simplified API needs to convert between sRGB and linear colorspaces, + * the actual sRGB transfer curve defined in the sRGB specification (see the + * article at ) is used, not the gamma=1/2.2 + * approximation used elsewhere in libpng. + * + * When an alpha channel is present it is expected to denote pixel coverage + * of the color or luminance channels and is returned as an associated alpha + * channel: the color/gray channels are scaled (pre-multiplied) by the alpha + * value. + * + * The samples are either contained directly in the image data, between 1 and 8 + * bytes per pixel according to the encoding, or are held in a color-map indexed + * by bytes in the image data. In the case of a color-map the color-map entries + * are individual samples, encoded as above, and the image data has one byte per + * pixel to select the relevant sample from the color-map. + */ + +/* PNG_FORMAT_* + * + * #defines to be used in png_image::format. Each #define identifies a + * particular layout of sample data and, if present, alpha values. There are + * separate defines for each of the two component encodings. + * + * A format is built up using single bit flag values. All combinations are + * valid. Formats can be built up from the flag values or you can use one of + * the predefined values below. When testing formats always use the FORMAT_FLAG + * macros to test for individual features - future versions of the library may + * add new flags. + * + * When reading or writing color-mapped images the format should be set to the + * format of the entries in the color-map then png_image_{read,write}_colormap + * called to read or write the color-map and set the format correctly for the + * image data. Do not set the PNG_FORMAT_FLAG_COLORMAP bit directly! + * + * NOTE: libpng can be built with particular features disabled. If you see + * compiler errors because the definition of one of the following flags has been + * compiled out it is because libpng does not have the required support. It is + * possible, however, for the libpng configuration to enable the format on just + * read or just write; in that case you may see an error at run time. You can + * guard against this by checking for the definition of the appropriate + * "_SUPPORTED" macro, one of: + * + * PNG_SIMPLIFIED_{READ,WRITE}_{BGR,AFIRST}_SUPPORTED + */ +#define PNG_FORMAT_FLAG_ALPHA 0x01U /* format with an alpha channel */ +#define PNG_FORMAT_FLAG_COLOR 0x02U /* color format: otherwise grayscale */ +#define PNG_FORMAT_FLAG_LINEAR 0x04U /* 2-byte channels else 1-byte */ +#define PNG_FORMAT_FLAG_COLORMAP 0x08U /* image data is color-mapped */ + +#ifdef PNG_FORMAT_BGR_SUPPORTED +# define PNG_FORMAT_FLAG_BGR 0x10U /* BGR colors, else order is RGB */ +#endif + +#ifdef PNG_FORMAT_AFIRST_SUPPORTED +# define PNG_FORMAT_FLAG_AFIRST 0x20U /* alpha channel comes first */ +#endif + +#define PNG_FORMAT_FLAG_ASSOCIATED_ALPHA 0x40U /* alpha channel is associated */ + +/* Commonly used formats have predefined macros. + * + * First the single byte (sRGB) formats: + */ +#define PNG_FORMAT_GRAY 0 +#define PNG_FORMAT_GA PNG_FORMAT_FLAG_ALPHA +#define PNG_FORMAT_AG (PNG_FORMAT_GA|PNG_FORMAT_FLAG_AFIRST) +#define PNG_FORMAT_RGB PNG_FORMAT_FLAG_COLOR +#define PNG_FORMAT_BGR (PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_BGR) +#define PNG_FORMAT_RGBA (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_ARGB (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_AFIRST) +#define PNG_FORMAT_BGRA (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_ABGR (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_AFIRST) + +/* Then the linear 2-byte formats. When naming these "Y" is used to + * indicate a luminance (gray) channel. + */ +#define PNG_FORMAT_LINEAR_Y PNG_FORMAT_FLAG_LINEAR +#define PNG_FORMAT_LINEAR_Y_ALPHA (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_LINEAR_RGB (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR) +#define PNG_FORMAT_LINEAR_RGB_ALPHA \ + (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA) + +/* With color-mapped formats the image data is one byte for each pixel, the byte + * is an index into the color-map which is formatted as above. To obtain a + * color-mapped format it is sufficient just to add the PNG_FOMAT_FLAG_COLORMAP + * to one of the above definitions, or you can use one of the definitions below. + */ +#define PNG_FORMAT_RGB_COLORMAP (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_BGR_COLORMAP (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_RGBA_COLORMAP (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_ARGB_COLORMAP (PNG_FORMAT_ARGB|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_BGRA_COLORMAP (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_ABGR_COLORMAP (PNG_FORMAT_ABGR|PNG_FORMAT_FLAG_COLORMAP) + +/* PNG_IMAGE macros + * + * These are convenience macros to derive information from a png_image + * structure. The PNG_IMAGE_SAMPLE_ macros return values appropriate to the + * actual image sample values - either the entries in the color-map or the + * pixels in the image. The PNG_IMAGE_PIXEL_ macros return corresponding values + * for the pixels and will always return 1 for color-mapped formats. The + * remaining macros return information about the rows in the image and the + * complete image. + * + * NOTE: All the macros that take a png_image::format parameter are compile time + * constants if the format parameter is, itself, a constant. Therefore these + * macros can be used in array declarations and case labels where required. + * Similarly the macros are also pre-processor constants (sizeof is not used) so + * they can be used in #if tests. + * + * First the information about the samples. + */ +#define PNG_IMAGE_SAMPLE_CHANNELS(fmt)\ + (((fmt)&(PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA))+1) + /* Return the total number of channels in a given format: 1..4 */ + +#define PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt)\ + ((((fmt) & PNG_FORMAT_FLAG_LINEAR) >> 2)+1) + /* Return the size in bytes of a single component of a pixel or color-map + * entry (as appropriate) in the image: 1 or 2. + */ + +#define PNG_IMAGE_SAMPLE_SIZE(fmt)\ + (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt)) + /* This is the size of the sample data for one sample. If the image is + * color-mapped it is the size of one color-map entry (and image pixels are + * one byte in size), otherwise it is the size of one image pixel. + */ + +#define PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt)\ + (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * 256) + /* The maximum size of the color-map required by the format expressed in a + * count of components. This can be used to compile-time allocate a + * color-map: + * + * png_uint_16 colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(linear_fmt)]; + * + * png_byte colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(sRGB_fmt)]; + * + * Alternatively use the PNG_IMAGE_COLORMAP_SIZE macro below to use the + * information from one of the png_image_begin_read_ APIs and dynamically + * allocate the required memory. + */ + +/* Corresponding information about the pixels */ +#define PNG_IMAGE_PIXEL_(test,fmt)\ + (((fmt)&PNG_FORMAT_FLAG_COLORMAP)?1:test(fmt)) + +#define PNG_IMAGE_PIXEL_CHANNELS(fmt)\ + PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_CHANNELS,fmt) + /* The number of separate channels (components) in a pixel; 1 for a + * color-mapped image. + */ + +#define PNG_IMAGE_PIXEL_COMPONENT_SIZE(fmt)\ + PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_COMPONENT_SIZE,fmt) + /* The size, in bytes, of each component in a pixel; 1 for a color-mapped + * image. + */ + +#define PNG_IMAGE_PIXEL_SIZE(fmt) PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_SIZE,fmt) + /* The size, in bytes, of a complete pixel; 1 for a color-mapped image. */ + +/* Information about the whole row, or whole image */ +#define PNG_IMAGE_ROW_STRIDE(image)\ + (PNG_IMAGE_PIXEL_CHANNELS((image).format) * (image).width) + /* Return the total number of components in a single row of the image; this + * is the minimum 'row stride', the minimum count of components between each + * row. For a color-mapped image this is the minimum number of bytes in a + * row. + * + * WARNING: this macro overflows for some images with more than one component + * and very large image widths. libpng will refuse to process an image where + * this macro would overflow. + */ + +#define PNG_IMAGE_BUFFER_SIZE(image, row_stride)\ + (PNG_IMAGE_PIXEL_COMPONENT_SIZE((image).format)*(image).height*(row_stride)) + /* Return the size, in bytes, of an image buffer given a png_image and a row + * stride - the number of components to leave space for in each row. + * + * WARNING: this macro overflows a 32-bit integer for some large PNG images, + * libpng will refuse to process an image where such an overflow would occur. + */ + +#define PNG_IMAGE_SIZE(image)\ + PNG_IMAGE_BUFFER_SIZE(image, PNG_IMAGE_ROW_STRIDE(image)) + /* Return the size, in bytes, of the image in memory given just a png_image; + * the row stride is the minimum stride required for the image. + */ + +#define PNG_IMAGE_COLORMAP_SIZE(image)\ + (PNG_IMAGE_SAMPLE_SIZE((image).format) * (image).colormap_entries) + /* Return the size, in bytes, of the color-map of this image. If the image + * format is not a color-map format this will return a size sufficient for + * 256 entries in the given format; check PNG_FORMAT_FLAG_COLORMAP if + * you don't want to allocate a color-map in this case. + */ + +/* PNG_IMAGE_FLAG_* + * + * Flags containing additional information about the image are held in the + * 'flags' field of png_image. + */ +#define PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB 0x01 + /* This indicates that the RGB values of the in-memory bitmap do not + * correspond to the red, green and blue end-points defined by sRGB. + */ + +#define PNG_IMAGE_FLAG_FAST 0x02 + /* On write emphasise speed over compression; the resultant PNG file will be + * larger but will be produced significantly faster, particular for large + * images. Do not use this option for images which will be distributed, only + * used it when producing intermediate files that will be read back in + * repeatedly. For a typical 24-bit image the option will double the read + * speed at the cost of increasing the image size by 25%, however for many + * more compressible images the PNG file can be 10 times larger with only a + * slight speed gain. + */ + +#define PNG_IMAGE_FLAG_16BIT_sRGB 0x04 + /* On read if the image is a 16-bit per component image and there is no gAMA + * or sRGB chunk assume that the components are sRGB encoded. Notice that + * images output by the simplified API always have gamma information; setting + * this flag only affects the interpretation of 16-bit images from an + * external source. It is recommended that the application expose this flag + * to the user; the user can normally easily recognize the difference between + * linear and sRGB encoding. This flag has no effect on write - the data + * passed to the write APIs must have the correct encoding (as defined + * above.) + * + * If the flag is not set (the default) input 16-bit per component data is + * assumed to be linear. + * + * NOTE: the flag can only be set after the png_image_begin_read_ call, + * because that call initializes the 'flags' field. + */ + +#ifdef PNG_SIMPLIFIED_READ_SUPPORTED +/* READ APIs + * --------- + * + * The png_image passed to the read APIs must have been initialized by setting + * the png_controlp field 'opaque' to NULL (or, safer, memset the whole thing.) + */ +#ifdef PNG_STDIO_SUPPORTED +PNG_EXPORT(234, int, png_image_begin_read_from_file, (png_imagep image, + const char *file_name)); + /* The named file is opened for read and the image header is filled in + * from the PNG header in the file. + */ + +PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image, + FILE* file)); + /* The PNG header is read from the stdio FILE object. */ +#endif /* STDIO */ + +PNG_EXPORT(236, int, png_image_begin_read_from_memory, (png_imagep image, + png_const_voidp memory, size_t size)); + /* The PNG header is read from the given memory buffer. */ + +PNG_EXPORT(237, int, png_image_finish_read, (png_imagep image, + png_const_colorp background, void *buffer, png_int_32 row_stride, + void *colormap)); + /* Finish reading the image into the supplied buffer and clean up the + * png_image structure. + * + * row_stride is the step, in byte or 2-byte units as appropriate, + * between adjacent rows. A positive stride indicates that the top-most row + * is first in the buffer - the normal top-down arrangement. A negative + * stride indicates that the bottom-most row is first in the buffer. + * + * background need only be supplied if an alpha channel must be removed from + * a png_byte format and the removal is to be done by compositing on a solid + * color; otherwise it may be NULL and any composition will be done directly + * onto the buffer. The value is an sRGB color to use for the background, + * for grayscale output the green channel is used. + * + * background must be supplied when an alpha channel must be removed from a + * single byte color-mapped output format, in other words if: + * + * 1) The original format from png_image_begin_read_from_* had + * PNG_FORMAT_FLAG_ALPHA set. + * 2) The format set by the application does not. + * 3) The format set by the application has PNG_FORMAT_FLAG_COLORMAP set and + * PNG_FORMAT_FLAG_LINEAR *not* set. + * + * For linear output removing the alpha channel is always done by compositing + * on black and background is ignored. + * + * colormap must be supplied when PNG_FORMAT_FLAG_COLORMAP is set. It must + * be at least the size (in bytes) returned by PNG_IMAGE_COLORMAP_SIZE. + * image->colormap_entries will be updated to the actual number of entries + * written to the colormap; this may be less than the original value. + */ + +PNG_EXPORT(238, void, png_image_free, (png_imagep image)); + /* Free any data allocated by libpng in image->opaque, setting the pointer to + * NULL. May be called at any time after the structure is initialized. + */ +#endif /* SIMPLIFIED_READ */ + +#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED +/* WRITE APIS + * ---------- + * For write you must initialize a png_image structure to describe the image to + * be written. To do this use memset to set the whole structure to 0 then + * initialize fields describing your image. + * + * version: must be set to PNG_IMAGE_VERSION + * opaque: must be initialized to NULL + * width: image width in pixels + * height: image height in rows + * format: the format of the data (image and color-map) you wish to write + * flags: set to 0 unless one of the defined flags applies; set + * PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB for color format images where the RGB + * values do not correspond to the colors in sRGB. + * colormap_entries: set to the number of entries in the color-map (0 to 256) + */ +#ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED +PNG_EXPORT(239, int, png_image_write_to_file, (png_imagep image, + const char *file, int convert_to_8bit, const void *buffer, + png_int_32 row_stride, const void *colormap)); + /* Write the image to the named file. */ + +PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file, + int convert_to_8_bit, const void *buffer, png_int_32 row_stride, + const void *colormap)); + /* Write the image to the given (FILE*). */ +#endif /* SIMPLIFIED_WRITE_STDIO */ + +/* With all write APIs if image is in one of the linear formats with 16-bit + * data then setting convert_to_8_bit will cause the output to be an 8-bit PNG + * gamma encoded according to the sRGB specification, otherwise a 16-bit linear + * encoded PNG file is written. + * + * With color-mapped data formats the colormap parameter point to a color-map + * with at least image->colormap_entries encoded in the specified format. If + * the format is linear the written PNG color-map will be converted to sRGB + * regardless of the convert_to_8_bit flag. + * + * With all APIs row_stride is handled as in the read APIs - it is the spacing + * from one row to the next in component sized units (1 or 2 bytes) and if + * negative indicates a bottom-up row layout in the buffer. If row_stride is + * zero, libpng will calculate it for you from the image width and number of + * channels. + * + * Note that the write API does not support interlacing, sub-8-bit pixels or + * most ancillary chunks. If you need to write text chunks (e.g. for copyright + * notices) you need to use one of the other APIs. + */ + +PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory, + png_alloc_size_t * PNG_RESTRICT memory_bytes, int convert_to_8_bit, + const void *buffer, png_int_32 row_stride, const void *colormap)); + /* Write the image to the given memory buffer. The function both writes the + * whole PNG data stream to *memory and updates *memory_bytes with the count + * of bytes written. + * + * 'memory' may be NULL. In this case *memory_bytes is not read however on + * success the number of bytes which would have been written will still be + * stored in *memory_bytes. On failure *memory_bytes will contain 0. + * + * If 'memory' is not NULL it must point to memory[*memory_bytes] of + * writeable memory. + * + * If the function returns success memory[*memory_bytes] (if 'memory' is not + * NULL) contains the written PNG data. *memory_bytes will always be less + * than or equal to the original value. + * + * If the function returns false and *memory_bytes was not changed an error + * occurred during write. If *memory_bytes was changed, or is not 0 if + * 'memory' was NULL, the write would have succeeded but for the memory + * buffer being too small. *memory_bytes contains the required number of + * bytes and will be bigger that the original value. + */ + +#define png_image_write_get_memory_size(image, size, convert_to_8_bit, buffer,\ + row_stride, colormap)\ + png_image_write_to_memory(&(image), 0, &(size), convert_to_8_bit, buffer,\ + row_stride, colormap) + /* Return the amount of memory in 'size' required to compress this image. + * The png_image structure 'image' must be filled in as in the above + * function and must not be changed before the actual write call, the buffer + * and all other parameters must also be identical to that in the final + * write call. The 'size' variable need not be initialized. + * + * NOTE: the macro returns true/false, if false is returned 'size' will be + * set to zero and the write failed and probably will fail if tried again. + */ + +/* You can pre-allocate the buffer by making sure it is of sufficient size + * regardless of the amount of compression achieved. The buffer size will + * always be bigger than the original image and it will never be filled. The + * following macros are provided to assist in allocating the buffer. + */ +#define PNG_IMAGE_DATA_SIZE(image) (PNG_IMAGE_SIZE(image)+(image).height) + /* The number of uncompressed bytes in the PNG byte encoding of the image; + * uncompressing the PNG IDAT data will give this number of bytes. + * + * NOTE: while PNG_IMAGE_SIZE cannot overflow for an image in memory this + * macro can because of the extra bytes used in the PNG byte encoding. You + * need to avoid this macro if your image size approaches 2^30 in width or + * height. The same goes for the remainder of these macros; they all produce + * bigger numbers than the actual in-memory image size. + */ +#ifndef PNG_ZLIB_MAX_SIZE +# define PNG_ZLIB_MAX_SIZE(b) ((b)+(((b)+7U)>>3)+(((b)+63U)>>6)+11U) + /* An upper bound on the number of compressed bytes given 'b' uncompressed + * bytes. This is based on deflateBounds() in zlib; different + * implementations of zlib compression may conceivably produce more data so + * if your zlib implementation is not zlib itself redefine this macro + * appropriately. + */ +#endif + +#define PNG_IMAGE_COMPRESSED_SIZE_MAX(image)\ + PNG_ZLIB_MAX_SIZE((png_alloc_size_t)PNG_IMAGE_DATA_SIZE(image)) + /* An upper bound on the size of the data in the PNG IDAT chunks. */ + +#define PNG_IMAGE_PNG_SIZE_MAX_(image, image_size)\ + ((8U/*sig*/+25U/*IHDR*/+16U/*gAMA*/+44U/*cHRM*/+12U/*IEND*/+\ + (((image).format&PNG_FORMAT_FLAG_COLORMAP)?/*colormap: PLTE, tRNS*/\ + 12U+3U*(image).colormap_entries/*PLTE data*/+\ + (((image).format&PNG_FORMAT_FLAG_ALPHA)?\ + 12U/*tRNS*/+(image).colormap_entries:0U):0U)+\ + 12U)+(12U*((image_size)/PNG_ZBUF_SIZE))/*IDAT*/+(image_size)) + /* A helper for the following macro; if your compiler cannot handle the + * following macro use this one with the result of + * PNG_IMAGE_COMPRESSED_SIZE_MAX(image) as the second argument (most + * compilers should handle this just fine.) + */ + +#define PNG_IMAGE_PNG_SIZE_MAX(image)\ + PNG_IMAGE_PNG_SIZE_MAX_(image, PNG_IMAGE_COMPRESSED_SIZE_MAX(image)) + /* An upper bound on the total length of the PNG data stream for 'image'. + * The result is of type png_alloc_size_t, on 32-bit systems this may + * overflow even though PNG_IMAGE_DATA_SIZE does not overflow; the write will + * run out of buffer space but return a corrected size which should work. + */ +#endif /* SIMPLIFIED_WRITE */ +/******************************************************************************* + * END OF SIMPLIFIED API + ******************************************************************************/ +#endif /* SIMPLIFIED_{READ|WRITE} */ + +/******************************************************************************* + * Section 6: IMPLEMENTATION OPTIONS + ******************************************************************************* + * + * Support for arbitrary implementation-specific optimizations. The API allows + * particular options to be turned on or off. 'Option' is the number of the + * option and 'onoff' is 0 (off) or non-0 (on). The value returned is given + * by the PNG_OPTION_ defines below. + * + * HARDWARE: normally hardware capabilities, such as the Intel SSE instructions, + * are detected at run time, however sometimes it may be impossible + * to do this in user mode, in which case it is necessary to discover + * the capabilities in an OS specific way. Such capabilities are + * listed here when libpng has support for them and must be turned + * ON by the application if present. + * + * SOFTWARE: sometimes software optimizations actually result in performance + * decrease on some architectures or systems, or with some sets of + * PNG images. 'Software' options allow such optimizations to be + * selected at run time. + */ +#ifdef PNG_SET_OPTION_SUPPORTED +#ifdef PNG_ARM_NEON_API_SUPPORTED +# define PNG_ARM_NEON 0 /* HARDWARE: ARM Neon SIMD instructions supported */ +#endif +#define PNG_MAXIMUM_INFLATE_WINDOW 2 /* SOFTWARE: force maximum window */ +#define PNG_SKIP_sRGB_CHECK_PROFILE 4 /* SOFTWARE: Check ICC profile for sRGB */ +#ifdef PNG_MIPS_MSA_API_SUPPORTED +# define PNG_MIPS_MSA 6 /* HARDWARE: MIPS Msa SIMD instructions supported */ +#endif +#ifdef PNG_DISABLE_ADLER32_CHECK_SUPPORTED +# define PNG_IGNORE_ADLER32 8 /* SOFTWARE: disable Adler32 check on IDAT */ +#endif +#ifdef PNG_POWERPC_VSX_API_SUPPORTED +# define PNG_POWERPC_VSX 10 /* HARDWARE: PowerPC VSX SIMD instructions + * supported */ +#endif +#ifdef PNG_MIPS_MMI_API_SUPPORTED +# define PNG_MIPS_MMI 12 /* HARDWARE: MIPS MMI SIMD instructions supported */ +#endif + +#define PNG_OPTION_NEXT 14 /* Next option - numbers must be even */ + +/* Return values: NOTE: there are four values and 'off' is *not* zero */ +#define PNG_OPTION_UNSET 0 /* Unset - defaults to off */ +#define PNG_OPTION_INVALID 1 /* Option number out of range */ +#define PNG_OPTION_OFF 2 +#define PNG_OPTION_ON 3 + +PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option, + int onoff)); +#endif /* SET_OPTION */ + +/******************************************************************************* + * END OF HARDWARE AND SOFTWARE OPTIONS + ******************************************************************************/ + +/* Maintainer: Put new public prototypes here ^, in libpng.3, in project + * defs, and in scripts/symbols.def. + */ + +/* The last ordinal number (this is the *last* one already used; the next + * one to use is one more than this.) + */ +#ifdef PNG_EXPORT_LAST_ORDINAL + PNG_EXPORT_LAST_ORDINAL(249); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* PNG_VERSION_INFO_ONLY */ +/* Do not put anything past this line */ +#endif /* PNG_H */ diff --git a/vcpkg/installed/x64-osx/include/pngconf.h b/vcpkg/installed/x64-osx/include/pngconf.h new file mode 100644 index 0000000..000d7b1 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/pngconf.h @@ -0,0 +1,623 @@ + +/* pngconf.h - machine-configurable file for libpng + * + * libpng version 1.6.43 + * + * Copyright (c) 2018-2024 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * Any machine specific code is near the front of this file, so if you + * are configuring libpng for a machine, you may want to read the section + * starting here down to where it starts to typedef png_color, png_text, + * and png_info. + */ + +#ifndef PNGCONF_H +#define PNGCONF_H + +#ifndef PNG_BUILDING_SYMBOL_TABLE /* else includes may cause problems */ + +/* From libpng 1.6.0 libpng requires an ANSI X3.159-1989 ("ISOC90") compliant C + * compiler for correct compilation. The following header files are required by + * the standard. If your compiler doesn't provide these header files, or they + * do not match the standard, you will need to provide/improve them. + */ +#include +#include + +/* Library header files. These header files are all defined by ISOC90; libpng + * expects conformant implementations, however, an ISOC90 conformant system need + * not provide these header files if the functionality cannot be implemented. + * In this case it will be necessary to disable the relevant parts of libpng in + * the build of pnglibconf.h. + * + * Prior to 1.6.0 string.h was included here; the API changes in 1.6.0 to not + * include this unnecessary header file. + */ + +#ifdef PNG_STDIO_SUPPORTED + /* Required for the definition of FILE: */ +# include +#endif + +#ifdef PNG_SETJMP_SUPPORTED + /* Required for the definition of jmp_buf and the declaration of longjmp: */ +# include +#endif + +#ifdef PNG_CONVERT_tIME_SUPPORTED + /* Required for struct tm: */ +# include +#endif + +#endif /* PNG_BUILDING_SYMBOL_TABLE */ + +/* Prior to 1.6.0, it was possible to turn off 'const' in declarations, + * using PNG_NO_CONST. This is no longer supported. + */ +#define PNG_CONST const /* backward compatibility only */ + +/* This controls optimization of the reading of 16-bit and 32-bit + * values from PNG files. It can be set on a per-app-file basis: it + * just changes whether a macro is used when the function is called. + * The library builder sets the default; if read functions are not + * built into the library the macro implementation is forced on. + */ +#ifndef PNG_READ_INT_FUNCTIONS_SUPPORTED +# define PNG_USE_READ_MACROS +#endif +#if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS) +# if PNG_DEFAULT_READ_MACROS +# define PNG_USE_READ_MACROS +# endif +#endif + +/* COMPILER SPECIFIC OPTIONS. + * + * These options are provided so that a variety of difficult compilers + * can be used. Some are fixed at build time (e.g. PNG_API_RULE + * below) but still have compiler specific implementations, others + * may be changed on a per-file basis when compiling against libpng. + */ + +/* The PNGARG macro was used in versions of libpng prior to 1.6.0 to protect + * against legacy (pre ISOC90) compilers that did not understand function + * prototypes. It is not required for modern C compilers. + */ +#ifndef PNGARG +# define PNGARG(arglist) arglist +#endif + +/* Function calling conventions. + * ============================= + * Normally it is not necessary to specify to the compiler how to call + * a function - it just does it - however on x86 systems derived from + * Microsoft and Borland C compilers ('IBM PC', 'DOS', 'Windows' systems + * and some others) there are multiple ways to call a function and the + * default can be changed on the compiler command line. For this reason + * libpng specifies the calling convention of every exported function and + * every function called via a user supplied function pointer. This is + * done in this file by defining the following macros: + * + * PNGAPI Calling convention for exported functions. + * PNGCBAPI Calling convention for user provided (callback) functions. + * PNGCAPI Calling convention used by the ANSI-C library (required + * for longjmp callbacks and sometimes used internally to + * specify the calling convention for zlib). + * + * These macros should never be overridden. If it is necessary to + * change calling convention in a private build this can be done + * by setting PNG_API_RULE (which defaults to 0) to one of the values + * below to select the correct 'API' variants. + * + * PNG_API_RULE=0 Use PNGCAPI - the 'C' calling convention - throughout. + * This is correct in every known environment. + * PNG_API_RULE=1 Use the operating system convention for PNGAPI and + * the 'C' calling convention (from PNGCAPI) for + * callbacks (PNGCBAPI). This is no longer required + * in any known environment - if it has to be used + * please post an explanation of the problem to the + * libpng mailing list. + * + * These cases only differ if the operating system does not use the C + * calling convention, at present this just means the above cases + * (x86 DOS/Windows systems) and, even then, this does not apply to + * Cygwin running on those systems. + * + * Note that the value must be defined in pnglibconf.h so that what + * the application uses to call the library matches the conventions + * set when building the library. + */ + +/* Symbol export + * ============= + * When building a shared library it is almost always necessary to tell + * the compiler which symbols to export. The png.h macro 'PNG_EXPORT' + * is used to mark the symbols. On some systems these symbols can be + * extracted at link time and need no special processing by the compiler, + * on other systems the symbols are flagged by the compiler and just + * the declaration requires a special tag applied (unfortunately) in a + * compiler dependent way. Some systems can do either. + * + * A small number of older systems also require a symbol from a DLL to + * be flagged to the program that calls it. This is a problem because + * we do not know in the header file included by application code that + * the symbol will come from a shared library, as opposed to a statically + * linked one. For this reason the application must tell us by setting + * the magic flag PNG_USE_DLL to turn on the special processing before + * it includes png.h. + * + * Four additional macros are used to make this happen: + * + * PNG_IMPEXP The magic (if any) to cause a symbol to be exported from + * the build or imported if PNG_USE_DLL is set - compiler + * and system specific. + * + * PNG_EXPORT_TYPE(type) A macro that pre or appends PNG_IMPEXP to + * 'type', compiler specific. + * + * PNG_DLL_EXPORT Set to the magic to use during a libpng build to + * make a symbol exported from the DLL. Not used in the + * public header files; see pngpriv.h for how it is used + * in the libpng build. + * + * PNG_DLL_IMPORT Set to the magic to force the libpng symbols to come + * from a DLL - used to define PNG_IMPEXP when + * PNG_USE_DLL is set. + */ + +/* System specific discovery. + * ========================== + * This code is used at build time to find PNG_IMPEXP, the API settings + * and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL + * import processing is possible. On Windows systems it also sets + * compiler-specific macros to the values required to change the calling + * conventions of the various functions. + */ +#if defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || \ + defined(__CYGWIN__) + /* Windows system (DOS doesn't support DLLs). Includes builds under Cygwin or + * MinGW on any architecture currently supported by Windows. Also includes + * Watcom builds but these need special treatment because they are not + * compatible with GCC or Visual C because of different calling conventions. + */ +# if PNG_API_RULE == 2 + /* If this line results in an error, either because __watcall is not + * understood or because of a redefine just below you cannot use *this* + * build of the library with the compiler you are using. *This* build was + * build using Watcom and applications must also be built using Watcom! + */ +# define PNGCAPI __watcall +# endif + +# if defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 800)) +# define PNGCAPI __cdecl +# if PNG_API_RULE == 1 + /* If this line results in an error __stdcall is not understood and + * PNG_API_RULE should not have been set to '1'. + */ +# define PNGAPI __stdcall +# endif +# else + /* An older compiler, or one not detected (erroneously) above, + * if necessary override on the command line to get the correct + * variants for the compiler. + */ +# ifndef PNGCAPI +# define PNGCAPI _cdecl +# endif +# if PNG_API_RULE == 1 && !defined(PNGAPI) +# define PNGAPI _stdcall +# endif +# endif /* compiler/api */ + + /* NOTE: PNGCBAPI always defaults to PNGCAPI. */ + +# if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD) +# error "PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed" +# endif + +# if (defined(_MSC_VER) && _MSC_VER < 800) ||\ + (defined(__BORLANDC__) && __BORLANDC__ < 0x500) + /* older Borland and MSC + * compilers used '__export' and required this to be after + * the type. + */ +# ifndef PNG_EXPORT_TYPE +# define PNG_EXPORT_TYPE(type) type PNG_IMPEXP +# endif +# define PNG_DLL_EXPORT __export +# else /* newer compiler */ +# define PNG_DLL_EXPORT __declspec(dllexport) +# ifndef PNG_DLL_IMPORT +# define PNG_DLL_IMPORT __declspec(dllimport) +# endif +# endif /* compiler */ + +#else /* !Windows */ +# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__) +# define PNGAPI _System +# else /* !Windows/x86 && !OS/2 */ + /* Use the defaults, or define PNG*API on the command line (but + * this will have to be done for every compile!) + */ +# endif /* other system, !OS/2 */ +#endif /* !Windows/x86 */ + +/* Now do all the defaulting . */ +#ifndef PNGCAPI +# define PNGCAPI +#endif +#ifndef PNGCBAPI +# define PNGCBAPI PNGCAPI +#endif +#ifndef PNGAPI +# define PNGAPI PNGCAPI +#endif + +/* PNG_IMPEXP may be set on the compilation system command line or (if not set) + * then in an internal header file when building the library, otherwise (when + * using the library) it is set here. + */ +#ifndef PNG_IMPEXP +# if defined(PNG_USE_DLL) && defined(PNG_DLL_IMPORT) + /* This forces use of a DLL, disallowing static linking */ +# define PNG_IMPEXP PNG_DLL_IMPORT +# endif + +# ifndef PNG_IMPEXP +# define PNG_IMPEXP +# endif +#endif + +/* In 1.5.2 the definition of PNG_FUNCTION has been changed to always treat + * 'attributes' as a storage class - the attributes go at the start of the + * function definition, and attributes are always appended regardless of the + * compiler. This considerably simplifies these macros but may cause problems + * if any compilers both need function attributes and fail to handle them as + * a storage class (this is unlikely.) + */ +#ifndef PNG_FUNCTION +# define PNG_FUNCTION(type, name, args, attributes) attributes type name args +#endif + +#ifndef PNG_EXPORT_TYPE +# define PNG_EXPORT_TYPE(type) PNG_IMPEXP type +#endif + + /* The ordinal value is only relevant when preprocessing png.h for symbol + * table entries, so we discard it here. See the .dfn files in the + * scripts directory. + */ + +#ifndef PNG_EXPORTA +# define PNG_EXPORTA(ordinal, type, name, args, attributes) \ + PNG_FUNCTION(PNG_EXPORT_TYPE(type), (PNGAPI name), PNGARG(args), \ + PNG_LINKAGE_API attributes) +#endif + +/* ANSI-C (C90) does not permit a macro to be invoked with an empty argument, + * so make something non-empty to satisfy the requirement: + */ +#define PNG_EMPTY /*empty list*/ + +#define PNG_EXPORT(ordinal, type, name, args) \ + PNG_EXPORTA(ordinal, type, name, args, PNG_EMPTY) + +/* Use PNG_REMOVED to comment out a removed interface. */ +#ifndef PNG_REMOVED +# define PNG_REMOVED(ordinal, type, name, args, attributes) +#endif + +#ifndef PNG_CALLBACK +# define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) PNGARG(args) +#endif + +/* Support for compiler specific function attributes. These are used + * so that where compiler support is available incorrect use of API + * functions in png.h will generate compiler warnings. + * + * Added at libpng-1.2.41. + */ + +#ifndef PNG_NO_PEDANTIC_WARNINGS +# ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED +# define PNG_PEDANTIC_WARNINGS_SUPPORTED +# endif +#endif + +#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED + /* Support for compiler specific function attributes. These are used + * so that where compiler support is available, incorrect use of API + * functions in png.h will generate compiler warnings. Added at libpng + * version 1.2.41. Disabling these removes the warnings but may also produce + * less efficient code. + */ +# if defined(__clang__) && defined(__has_attribute) + /* Clang defines both __clang__ and __GNUC__. Check __clang__ first. */ +# if !defined(PNG_USE_RESULT) && __has_attribute(__warn_unused_result__) +# define PNG_USE_RESULT __attribute__((__warn_unused_result__)) +# endif +# if !defined(PNG_NORETURN) && __has_attribute(__noreturn__) +# define PNG_NORETURN __attribute__((__noreturn__)) +# endif +# if !defined(PNG_ALLOCATED) && __has_attribute(__malloc__) +# define PNG_ALLOCATED __attribute__((__malloc__)) +# endif +# if !defined(PNG_DEPRECATED) && __has_attribute(__deprecated__) +# define PNG_DEPRECATED __attribute__((__deprecated__)) +# endif +# if !defined(PNG_PRIVATE) +# ifdef __has_extension +# if __has_extension(attribute_unavailable_with_message) +# define PNG_PRIVATE __attribute__((__unavailable__(\ + "This function is not exported by libpng."))) +# endif +# endif +# endif +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif + +# elif defined(__GNUC__) +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT __attribute__((__warn_unused_result__)) +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __attribute__((__noreturn__)) +# endif +# if __GNUC__ >= 3 +# ifndef PNG_ALLOCATED +# define PNG_ALLOCATED __attribute__((__malloc__)) +# endif +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __attribute__((__deprecated__)) +# endif +# ifndef PNG_PRIVATE +# if 0 /* Doesn't work so we use deprecated instead*/ +# define PNG_PRIVATE \ + __attribute__((warning("This function is not exported by libpng."))) +# else +# define PNG_PRIVATE \ + __attribute__((__deprecated__)) +# endif +# endif +# if ((__GNUC__ > 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1)) +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif +# endif /* __GNUC__.__GNUC_MINOR__ > 3.0 */ +# endif /* __GNUC__ >= 3 */ + +# elif defined(_MSC_VER) && (_MSC_VER >= 1300) +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /* not supported */ +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __declspec(noreturn) +# endif +# ifndef PNG_ALLOCATED +# if (_MSC_VER >= 1400) +# define PNG_ALLOCATED __declspec(restrict) +# endif +# endif +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __declspec(deprecated) +# endif +# ifndef PNG_PRIVATE +# define PNG_PRIVATE __declspec(deprecated) +# endif +# ifndef PNG_RESTRICT +# if (_MSC_VER >= 1400) +# define PNG_RESTRICT __restrict +# endif +# endif + +# elif defined(__WATCOMC__) +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif +# endif +#endif /* PNG_PEDANTIC_WARNINGS */ + +#ifndef PNG_DEPRECATED +# define PNG_DEPRECATED /* Use of this function is deprecated */ +#endif +#ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /* The result of this function must be checked */ +#endif +#ifndef PNG_NORETURN +# define PNG_NORETURN /* This function does not return */ +#endif +#ifndef PNG_ALLOCATED +# define PNG_ALLOCATED /* The result of the function is new memory */ +#endif +#ifndef PNG_PRIVATE +# define PNG_PRIVATE /* This is a private libpng function */ +#endif +#ifndef PNG_RESTRICT +# define PNG_RESTRICT /* The C99 "restrict" feature */ +#endif + +#ifndef PNG_FP_EXPORT /* A floating point API. */ +# ifdef PNG_FLOATING_POINT_SUPPORTED +# define PNG_FP_EXPORT(ordinal, type, name, args)\ + PNG_EXPORT(ordinal, type, name, args); +# else /* No floating point APIs */ +# define PNG_FP_EXPORT(ordinal, type, name, args) +# endif +#endif +#ifndef PNG_FIXED_EXPORT /* A fixed point API. */ +# ifdef PNG_FIXED_POINT_SUPPORTED +# define PNG_FIXED_EXPORT(ordinal, type, name, args)\ + PNG_EXPORT(ordinal, type, name, args); +# else /* No fixed point APIs */ +# define PNG_FIXED_EXPORT(ordinal, type, name, args) +# endif +#endif + +#ifndef PNG_BUILDING_SYMBOL_TABLE +/* Some typedefs to get us started. These should be safe on most of the common + * platforms. + * + * png_uint_32 and png_int_32 may, currently, be larger than required to hold a + * 32-bit value however this is not normally advisable. + * + * png_uint_16 and png_int_16 should always be two bytes in size - this is + * verified at library build time. + * + * png_byte must always be one byte in size. + * + * The checks below use constants from limits.h, as defined by the ISOC90 + * standard. + */ +#if CHAR_BIT == 8 && UCHAR_MAX == 255 + typedef unsigned char png_byte; +#else +# error "libpng requires 8-bit bytes" +#endif + +#if INT_MIN == -32768 && INT_MAX == 32767 + typedef int png_int_16; +#elif SHRT_MIN == -32768 && SHRT_MAX == 32767 + typedef short png_int_16; +#else +# error "libpng requires a signed 16-bit type" +#endif + +#if UINT_MAX == 65535 + typedef unsigned int png_uint_16; +#elif USHRT_MAX == 65535 + typedef unsigned short png_uint_16; +#else +# error "libpng requires an unsigned 16-bit type" +#endif + +#if INT_MIN < -2147483646 && INT_MAX > 2147483646 + typedef int png_int_32; +#elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646 + typedef long int png_int_32; +#else +# error "libpng requires a signed 32-bit (or more) type" +#endif + +#if UINT_MAX > 4294967294U + typedef unsigned int png_uint_32; +#elif ULONG_MAX > 4294967294U + typedef unsigned long int png_uint_32; +#else +# error "libpng requires an unsigned 32-bit (or more) type" +#endif + +/* Prior to 1.6.0, it was possible to disable the use of size_t and ptrdiff_t. + * From 1.6.0 onwards, an ISO C90 compiler, as well as a standard-compliant + * behavior of sizeof and ptrdiff_t are required. + * The legacy typedefs are provided here for backwards compatibility. + */ +typedef size_t png_size_t; +typedef ptrdiff_t png_ptrdiff_t; + +/* libpng needs to know the maximum value of 'size_t' and this controls the + * definition of png_alloc_size_t, below. This maximum value of size_t limits + * but does not control the maximum allocations the library makes - there is + * direct application control of this through png_set_user_limits(). + */ +#ifndef PNG_SMALL_SIZE_T + /* Compiler specific tests for systems where size_t is known to be less than + * 32 bits (some of these systems may no longer work because of the lack of + * 'far' support; see above.) + */ +# if (defined(__TURBOC__) && !defined(__FLAT__)) ||\ + (defined(_MSC_VER) && defined(MAXSEG_64K)) +# define PNG_SMALL_SIZE_T +# endif +#endif + +/* png_alloc_size_t is guaranteed to be no smaller than size_t, and no smaller + * than png_uint_32. Casts from size_t or png_uint_32 to png_alloc_size_t are + * not necessary; in fact, it is recommended not to use them at all, so that + * the compiler can complain when something turns out to be problematic. + * + * Casts in the other direction (from png_alloc_size_t to size_t or + * png_uint_32) should be explicitly applied; however, we do not expect to + * encounter practical situations that require such conversions. + * + * PNG_SMALL_SIZE_T must be defined if the maximum value of size_t is less than + * 4294967295 - i.e. less than the maximum value of png_uint_32. + */ +#ifdef PNG_SMALL_SIZE_T + typedef png_uint_32 png_alloc_size_t; +#else + typedef size_t png_alloc_size_t; +#endif + +/* Prior to 1.6.0 libpng offered limited support for Microsoft C compiler + * implementations of Intel CPU specific support of user-mode segmented address + * spaces, where 16-bit pointers address more than 65536 bytes of memory using + * separate 'segment' registers. The implementation requires two different + * types of pointer (only one of which includes the segment value.) + * + * If required this support is available in version 1.2 of libpng and may be + * available in versions through 1.5, although the correctness of the code has + * not been verified recently. + */ + +/* Typedef for floating-point numbers that are converted to fixed-point with a + * multiple of 100,000, e.g., gamma + */ +typedef png_int_32 png_fixed_point; + +/* Add typedefs for pointers */ +typedef void * png_voidp; +typedef const void * png_const_voidp; +typedef png_byte * png_bytep; +typedef const png_byte * png_const_bytep; +typedef png_uint_32 * png_uint_32p; +typedef const png_uint_32 * png_const_uint_32p; +typedef png_int_32 * png_int_32p; +typedef const png_int_32 * png_const_int_32p; +typedef png_uint_16 * png_uint_16p; +typedef const png_uint_16 * png_const_uint_16p; +typedef png_int_16 * png_int_16p; +typedef const png_int_16 * png_const_int_16p; +typedef char * png_charp; +typedef const char * png_const_charp; +typedef png_fixed_point * png_fixed_point_p; +typedef const png_fixed_point * png_const_fixed_point_p; +typedef size_t * png_size_tp; +typedef const size_t * png_const_size_tp; + +#ifdef PNG_STDIO_SUPPORTED +typedef FILE * png_FILE_p; +#endif + +#ifdef PNG_FLOATING_POINT_SUPPORTED +typedef double * png_doublep; +typedef const double * png_const_doublep; +#endif + +/* Pointers to pointers; i.e. arrays */ +typedef png_byte * * png_bytepp; +typedef png_uint_32 * * png_uint_32pp; +typedef png_int_32 * * png_int_32pp; +typedef png_uint_16 * * png_uint_16pp; +typedef png_int_16 * * png_int_16pp; +typedef const char * * png_const_charpp; +typedef char * * png_charpp; +typedef png_fixed_point * * png_fixed_point_pp; +#ifdef PNG_FLOATING_POINT_SUPPORTED +typedef double * * png_doublepp; +#endif + +/* Pointers to pointers to pointers; i.e., pointer to array */ +typedef char * * * png_charppp; + +#endif /* PNG_BUILDING_SYMBOL_TABLE */ + +#endif /* PNGCONF_H */ diff --git a/vcpkg/installed/x64-osx/include/pnglibconf.h b/vcpkg/installed/x64-osx/include/pnglibconf.h new file mode 100644 index 0000000..c62c497 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/pnglibconf.h @@ -0,0 +1,224 @@ +/* pnglibconf.h - library build configuration */ + +/* libpng version 1.6.43 */ + +/* Copyright (c) 2018-2024 Cosmin Truta */ +/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */ + +/* This code is released under the libpng license. */ +/* For conditions of distribution and use, see the disclaimer */ +/* and license in png.h */ + +/* pnglibconf.h */ +/* Machine generated file: DO NOT EDIT */ +/* Derived from: scripts/pnglibconf.dfa */ +#ifndef PNGLCONF_H +#define PNGLCONF_H +/* options */ +#define PNG_16BIT_SUPPORTED +#define PNG_ALIGNED_MEMORY_SUPPORTED +/*#undef PNG_ARM_NEON_API_SUPPORTED*/ +/*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/ +#define PNG_BENIGN_ERRORS_SUPPORTED +#define PNG_BENIGN_READ_ERRORS_SUPPORTED +/*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/ +#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED +#define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_COLORSPACE_SUPPORTED +#define PNG_CONSOLE_IO_SUPPORTED +#define PNG_CONVERT_tIME_SUPPORTED +/*#undef PNG_DISABLE_ADLER32_CHECK_SUPPORTED*/ +#define PNG_EASY_ACCESS_SUPPORTED +/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/ +#define PNG_ERROR_TEXT_SUPPORTED +#define PNG_FIXED_POINT_SUPPORTED +#define PNG_FLOATING_ARITHMETIC_SUPPORTED +#define PNG_FLOATING_POINT_SUPPORTED +#define PNG_FORMAT_AFIRST_SUPPORTED +#define PNG_FORMAT_BGR_SUPPORTED +#define PNG_GAMMA_SUPPORTED +#define PNG_GET_PALETTE_MAX_SUPPORTED +#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED +#define PNG_INCH_CONVERSIONS_SUPPORTED +#define PNG_INFO_IMAGE_SUPPORTED +#define PNG_IO_STATE_SUPPORTED +/*#undef PNG_MIPS_MMI_API_SUPPORTED*/ +/*#undef PNG_MIPS_MMI_CHECK_SUPPORTED*/ +/*#undef PNG_MIPS_MSA_API_SUPPORTED*/ +/*#undef PNG_MIPS_MSA_CHECK_SUPPORTED*/ +#define PNG_MNG_FEATURES_SUPPORTED +#define PNG_POINTER_INDEXING_SUPPORTED +/*#undef PNG_POWERPC_VSX_API_SUPPORTED*/ +/*#undef PNG_POWERPC_VSX_CHECK_SUPPORTED*/ +#define PNG_PROGRESSIVE_READ_SUPPORTED +#define PNG_READ_16BIT_SUPPORTED +#define PNG_READ_ALPHA_MODE_SUPPORTED +#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_READ_BACKGROUND_SUPPORTED +#define PNG_READ_BGR_SUPPORTED +#define PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_READ_COMPOSITE_NODIV_SUPPORTED +#define PNG_READ_COMPRESSED_TEXT_SUPPORTED +#define PNG_READ_EXPAND_16_SUPPORTED +#define PNG_READ_EXPAND_SUPPORTED +#define PNG_READ_FILLER_SUPPORTED +#define PNG_READ_GAMMA_SUPPORTED +#define PNG_READ_GET_PALETTE_MAX_SUPPORTED +#define PNG_READ_GRAY_TO_RGB_SUPPORTED +#define PNG_READ_INTERLACING_SUPPORTED +#define PNG_READ_INT_FUNCTIONS_SUPPORTED +#define PNG_READ_INVERT_ALPHA_SUPPORTED +#define PNG_READ_INVERT_SUPPORTED +#define PNG_READ_OPT_PLTE_SUPPORTED +#define PNG_READ_PACKSWAP_SUPPORTED +#define PNG_READ_PACK_SUPPORTED +#define PNG_READ_QUANTIZE_SUPPORTED +#define PNG_READ_RGB_TO_GRAY_SUPPORTED +#define PNG_READ_SCALE_16_TO_8_SUPPORTED +#define PNG_READ_SHIFT_SUPPORTED +#define PNG_READ_STRIP_16_TO_8_SUPPORTED +#define PNG_READ_STRIP_ALPHA_SUPPORTED +#define PNG_READ_SUPPORTED +#define PNG_READ_SWAP_ALPHA_SUPPORTED +#define PNG_READ_SWAP_SUPPORTED +#define PNG_READ_TEXT_SUPPORTED +#define PNG_READ_TRANSFORMS_SUPPORTED +#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_READ_USER_CHUNKS_SUPPORTED +#define PNG_READ_USER_TRANSFORM_SUPPORTED +#define PNG_READ_bKGD_SUPPORTED +#define PNG_READ_cHRM_SUPPORTED +#define PNG_READ_eXIf_SUPPORTED +#define PNG_READ_gAMA_SUPPORTED +#define PNG_READ_hIST_SUPPORTED +#define PNG_READ_iCCP_SUPPORTED +#define PNG_READ_iTXt_SUPPORTED +#define PNG_READ_oFFs_SUPPORTED +#define PNG_READ_pCAL_SUPPORTED +#define PNG_READ_pHYs_SUPPORTED +#define PNG_READ_sBIT_SUPPORTED +#define PNG_READ_sCAL_SUPPORTED +#define PNG_READ_sPLT_SUPPORTED +#define PNG_READ_sRGB_SUPPORTED +#define PNG_READ_tEXt_SUPPORTED +#define PNG_READ_tIME_SUPPORTED +#define PNG_READ_tRNS_SUPPORTED +#define PNG_READ_zTXt_SUPPORTED +#define PNG_SAVE_INT_32_SUPPORTED +#define PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_SEQUENTIAL_READ_SUPPORTED +#define PNG_SETJMP_SUPPORTED +#define PNG_SET_OPTION_SUPPORTED +#define PNG_SET_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_SET_USER_LIMITS_SUPPORTED +#define PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED +#define PNG_SIMPLIFIED_READ_BGR_SUPPORTED +#define PNG_SIMPLIFIED_READ_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_SUPPORTED +#define PNG_STDIO_SUPPORTED +#define PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_TEXT_SUPPORTED +#define PNG_TIME_RFC1123_SUPPORTED +#define PNG_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_USER_CHUNKS_SUPPORTED +#define PNG_USER_LIMITS_SUPPORTED +#define PNG_USER_MEM_SUPPORTED +#define PNG_USER_TRANSFORM_INFO_SUPPORTED +#define PNG_USER_TRANSFORM_PTR_SUPPORTED +#define PNG_WARNINGS_SUPPORTED +#define PNG_WRITE_16BIT_SUPPORTED +#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_WRITE_BGR_SUPPORTED +#define PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED +#define PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED +#define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +#define PNG_WRITE_FILLER_SUPPORTED +#define PNG_WRITE_FILTER_SUPPORTED +#define PNG_WRITE_FLUSH_SUPPORTED +#define PNG_WRITE_GET_PALETTE_MAX_SUPPORTED +#define PNG_WRITE_INTERLACING_SUPPORTED +#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED +#define PNG_WRITE_INVERT_ALPHA_SUPPORTED +#define PNG_WRITE_INVERT_SUPPORTED +#define PNG_WRITE_OPTIMIZE_CMF_SUPPORTED +#define PNG_WRITE_PACKSWAP_SUPPORTED +#define PNG_WRITE_PACK_SUPPORTED +#define PNG_WRITE_SHIFT_SUPPORTED +#define PNG_WRITE_SUPPORTED +#define PNG_WRITE_SWAP_ALPHA_SUPPORTED +#define PNG_WRITE_SWAP_SUPPORTED +#define PNG_WRITE_TEXT_SUPPORTED +#define PNG_WRITE_TRANSFORMS_SUPPORTED +#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_WRITE_USER_TRANSFORM_SUPPORTED +#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED +#define PNG_WRITE_bKGD_SUPPORTED +#define PNG_WRITE_cHRM_SUPPORTED +#define PNG_WRITE_eXIf_SUPPORTED +#define PNG_WRITE_gAMA_SUPPORTED +#define PNG_WRITE_hIST_SUPPORTED +#define PNG_WRITE_iCCP_SUPPORTED +#define PNG_WRITE_iTXt_SUPPORTED +#define PNG_WRITE_oFFs_SUPPORTED +#define PNG_WRITE_pCAL_SUPPORTED +#define PNG_WRITE_pHYs_SUPPORTED +#define PNG_WRITE_sBIT_SUPPORTED +#define PNG_WRITE_sCAL_SUPPORTED +#define PNG_WRITE_sPLT_SUPPORTED +#define PNG_WRITE_sRGB_SUPPORTED +#define PNG_WRITE_tEXt_SUPPORTED +#define PNG_WRITE_tIME_SUPPORTED +#define PNG_WRITE_tRNS_SUPPORTED +#define PNG_WRITE_zTXt_SUPPORTED +#define PNG_bKGD_SUPPORTED +#define PNG_cHRM_SUPPORTED +#define PNG_eXIf_SUPPORTED +#define PNG_gAMA_SUPPORTED +#define PNG_hIST_SUPPORTED +#define PNG_iCCP_SUPPORTED +#define PNG_iTXt_SUPPORTED +#define PNG_oFFs_SUPPORTED +#define PNG_pCAL_SUPPORTED +#define PNG_pHYs_SUPPORTED +#define PNG_sBIT_SUPPORTED +#define PNG_sCAL_SUPPORTED +#define PNG_sPLT_SUPPORTED +#define PNG_sRGB_SUPPORTED +#define PNG_tEXt_SUPPORTED +#define PNG_tIME_SUPPORTED +#define PNG_tRNS_SUPPORTED +#define PNG_zTXt_SUPPORTED +/* end of options */ +/* settings */ +#define PNG_API_RULE 0 +#define PNG_DEFAULT_READ_MACROS 1 +#define PNG_GAMMA_THRESHOLD_FIXED 5000 +#define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE +#define PNG_INFLATE_BUF_SIZE 1024 +#define PNG_LINKAGE_API extern +#define PNG_LINKAGE_CALLBACK extern +#define PNG_LINKAGE_DATA extern +#define PNG_LINKAGE_FUNCTION extern +#define PNG_MAX_GAMMA_8 11 +#define PNG_QUANTIZE_BLUE_BITS 5 +#define PNG_QUANTIZE_GREEN_BITS 5 +#define PNG_QUANTIZE_RED_BITS 5 +#define PNG_TEXT_Z_DEFAULT_COMPRESSION (-1) +#define PNG_TEXT_Z_DEFAULT_STRATEGY 0 +#define PNG_USER_CHUNK_CACHE_MAX 1000 +#define PNG_USER_CHUNK_MALLOC_MAX 8000000 +#define PNG_USER_HEIGHT_MAX 1000000 +#define PNG_USER_WIDTH_MAX 1000000 +#define PNG_ZBUF_SIZE 8192 +#define PNG_ZLIB_VERNUM 0x1310 +#define PNG_Z_DEFAULT_COMPRESSION (-1) +#define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0 +#define PNG_Z_DEFAULT_STRATEGY 1 +#define PNG_sCAL_PRECISION 5 +#define PNG_sRGB_PROFILE_CHECKS 2 +/* end of settings */ +#endif /* PNGLCONF_H */ diff --git a/vcpkg/installed/x64-osx/include/tiff.h b/vcpkg/installed/x64-osx/include/tiff.h new file mode 100644 index 0000000..d8da33d --- /dev/null +++ b/vcpkg/installed/x64-osx/include/tiff.h @@ -0,0 +1,899 @@ +/* + * Copyright (c) 1988-1997 Sam Leffler + * Copyright (c) 1991-1997 Silicon Graphics, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that (i) the above copyright notices and this permission notice appear in + * all copies of the software and related documentation, and (ii) the names of + * Sam Leffler and Silicon Graphics may not be used in any advertising or + * publicity relating to the software without the specific, prior written + * permission of Sam Leffler and Silicon Graphics. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR + * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#ifndef _TIFF_ +#define _TIFF_ + +#include "tiffconf.h" + +/* + * Tag Image File Format (TIFF) + * + * Based on Rev 6.0 from: + * Developer's Desk + * Aldus Corporation + * 411 First Ave. South + * Suite 200 + * Seattle, WA 98104 + * 206-622-5500 + * + * (http://partners.adobe.com/asn/developer/PDFS/TN/TIFF6.pdf) + * + * For BigTIFF design notes see the following links + * http://www.remotesensing.org/libtiff/bigtiffdesign.html + * http://www.awaresystems.be/imaging/tiff/bigtiff.html + */ + +#define TIFF_VERSION_CLASSIC 42 +#define TIFF_VERSION_BIG 43 + +#define TIFF_BIGENDIAN 0x4d4d +#define TIFF_LITTLEENDIAN 0x4949 +#define MDI_LITTLEENDIAN 0x5045 +#define MDI_BIGENDIAN 0x4550 + +/* + * Intrinsic data types required by the file format: + * + * 8-bit quantities int8_t/uint_8_t + * 16-bit quantities int16_t/uint_16_t + * 32-bit quantities int32_t/uint_32_t + * 64-bit quantities int64_t/uint_64_t + * strings unsigned char* + */ +#ifdef __GNUC__ +#define TIFF_GCC_DEPRECATED __attribute__((deprecated)) +#else +#define TIFF_GCC_DEPRECATED +#endif +#ifdef _MSC_VER +#define TIFF_MSC_DEPRECATED \ + __declspec(deprecated("libtiff type deprecated; please use corresponding " \ + "C99 stdint.h type")) +#else +#define TIFF_MSC_DEPRECATED +#endif + +#ifndef TIFF_DISABLE_DEPRECATED +typedef TIFF_MSC_DEPRECATED int8_t int8 TIFF_GCC_DEPRECATED; +typedef TIFF_MSC_DEPRECATED uint8_t uint8 TIFF_GCC_DEPRECATED; + +typedef TIFF_MSC_DEPRECATED int16_t int16 TIFF_GCC_DEPRECATED; +typedef TIFF_MSC_DEPRECATED uint16_t uint16 TIFF_GCC_DEPRECATED; + +typedef TIFF_MSC_DEPRECATED int32_t int32 TIFF_GCC_DEPRECATED; +typedef TIFF_MSC_DEPRECATED uint32_t uint32 TIFF_GCC_DEPRECATED; + +typedef TIFF_MSC_DEPRECATED int64_t int64 TIFF_GCC_DEPRECATED; +typedef TIFF_MSC_DEPRECATED uint64_t uint64 TIFF_GCC_DEPRECATED; +#endif /* TIFF_DISABLE_DEPRECATED */ + +/* + * Some types as promoted in a variable argument list + * We use uint16_vap rather then directly using int, because this way + * we document the type we actually want to pass through, conceptually, + * rather then confusing the issue by merely stating the type it gets + * promoted to + */ + +typedef int uint16_vap; + +/* + * TIFF header. + */ +typedef struct +{ + uint16_t tiff_magic; /* magic number (defines byte order) */ + uint16_t tiff_version; /* TIFF version number */ +} TIFFHeaderCommon; +typedef struct +{ + uint16_t tiff_magic; /* magic number (defines byte order) */ + uint16_t tiff_version; /* TIFF version number */ + uint32_t tiff_diroff; /* byte offset to first directory */ +} TIFFHeaderClassic; +typedef struct +{ + uint16_t tiff_magic; /* magic number (defines byte order) */ + uint16_t tiff_version; /* TIFF version number */ + uint16_t tiff_offsetsize; /* size of offsets, should be 8 */ + uint16_t tiff_unused; /* unused word, should be 0 */ + uint64_t tiff_diroff; /* byte offset to first directory */ +} TIFFHeaderBig; + +/* + * NB: In the comments below, + * - items marked with a + are obsoleted by revision 5.0, + * - items marked with a ! are introduced in revision 6.0. + * - items marked with a % are introduced post revision 6.0. + * - items marked with a $ are obsoleted by revision 6.0. + * - items marked with a & are introduced by Adobe DNG specification. + */ + +/* + * Tag data type information. + * + * Note: RATIONALs are the ratio of two 32-bit integer values. + *--: + * Note2: TIFF_IFD8 data type is used in tiffFields[]-tag definition in order to + distinguish the write-handling of those tags between ClassicTIFF and BigTiff: + For ClassicTIFF libtiff writes a 32-bit value and the TIFF_IFD + type-id into the file For BigTIFF libtiff writes a 64-bit value and the + TIFF_IFD8 type-id into the file + */ +typedef enum +{ + TIFF_NOTYPE = 0, /* placeholder */ + TIFF_BYTE = 1, /* 8-bit unsigned integer */ + TIFF_ASCII = 2, /* 8-bit bytes w/ last byte null */ + TIFF_SHORT = 3, /* 16-bit unsigned integer */ + TIFF_LONG = 4, /* 32-bit unsigned integer */ + TIFF_RATIONAL = 5, /* 64-bit unsigned fraction */ + TIFF_SBYTE = 6, /* !8-bit signed integer */ + TIFF_UNDEFINED = 7, /* !8-bit untyped data */ + TIFF_SSHORT = 8, /* !16-bit signed integer */ + TIFF_SLONG = 9, /* !32-bit signed integer */ + TIFF_SRATIONAL = 10, /* !64-bit signed fraction */ + TIFF_FLOAT = 11, /* !32-bit IEEE floating point */ + TIFF_DOUBLE = 12, /* !64-bit IEEE floating point */ + TIFF_IFD = 13, /* %32-bit unsigned integer (offset) */ + TIFF_LONG8 = 16, /* BigTIFF 64-bit unsigned integer */ + TIFF_SLONG8 = 17, /* BigTIFF 64-bit signed integer */ + TIFF_IFD8 = 18 /* BigTIFF 64-bit unsigned integer (offset) */ +} TIFFDataType; + +/* + * TIFF Tag Definitions. + */ +/* clang-format off */ /* for better readability of tag comments */ +#define TIFFTAG_SUBFILETYPE 254 /* subfile data descriptor */ +#define FILETYPE_REDUCEDIMAGE 0x1 /* reduced resolution version */ +#define FILETYPE_PAGE 0x2 /* one page of many */ +#define FILETYPE_MASK 0x4 /* transparency mask */ +#define TIFFTAG_OSUBFILETYPE 255 /* +kind of data in subfile */ +#define OFILETYPE_IMAGE 1 /* full resolution image data */ +#define OFILETYPE_REDUCEDIMAGE 2 /* reduced size image data */ +#define OFILETYPE_PAGE 3 /* one page of many */ +#define TIFFTAG_IMAGEWIDTH 256 /* image width in pixels */ +#define TIFFTAG_IMAGELENGTH 257 /* image height in pixels */ +#define TIFFTAG_BITSPERSAMPLE 258 /* bits per channel (sample) */ +#define TIFFTAG_COMPRESSION 259 /* data compression technique */ +#define COMPRESSION_NONE 1 /* dump mode */ +#define COMPRESSION_CCITTRLE 2 /* CCITT modified Huffman RLE */ +#define COMPRESSION_CCITTFAX3 3 /* CCITT Group 3 fax encoding */ +#define COMPRESSION_CCITT_T4 3 /* CCITT T.4 (TIFF 6 name) */ +#define COMPRESSION_CCITTFAX4 4 /* CCITT Group 4 fax encoding */ +#define COMPRESSION_CCITT_T6 4 /* CCITT T.6 (TIFF 6 name) */ +#define COMPRESSION_LZW 5 /* Lempel-Ziv & Welch */ +#define COMPRESSION_OJPEG 6 /* !6.0 JPEG */ +#define COMPRESSION_JPEG 7 /* %JPEG DCT compression */ +#define COMPRESSION_T85 9 /* !TIFF/FX T.85 JBIG compression */ +#define COMPRESSION_T43 10 /* !TIFF/FX T.43 colour by layered JBIG compression */ +#define COMPRESSION_NEXT 32766 /* NeXT 2-bit RLE */ +#define COMPRESSION_CCITTRLEW 32771 /* #1 w/ word alignment */ +#define COMPRESSION_PACKBITS 32773 /* Macintosh RLE */ +#define COMPRESSION_THUNDERSCAN 32809 /* ThunderScan RLE */ +/* codes 32895-32898 are reserved for ANSI IT8 TIFF/IT */ +#define COMPRESSION_DCS 32947 /* Kodak DCS encoding */ +#define COMPRESSION_JBIG 34661 /* ISO JBIG */ +#define COMPRESSION_SGILOG 34676 /* SGI Log Luminance RLE */ +#define COMPRESSION_SGILOG24 34677 /* SGI Log 24-bit packed */ +#define COMPRESSION_JP2000 34712 /* Leadtools JPEG2000 */ +#define COMPRESSION_LERC 34887 /* ESRI Lerc codec: https://github.com/Esri/lerc */ +/* compression codes 34887-34889 are reserved for ESRI */ +#define COMPRESSION_LZMA 34925 /* LZMA2 */ +#define COMPRESSION_ZSTD 50000 /* ZSTD: WARNING not registered in Adobe-maintained registry */ +#define COMPRESSION_WEBP 50001 /* WEBP: WARNING not registered in Adobe-maintained registry */ +#define COMPRESSION_JXL 50002 /* JPEGXL: WARNING not registered in Adobe-maintained registry */ +#define TIFFTAG_PHOTOMETRIC 262 /* photometric interpretation */ +#define PHOTOMETRIC_MINISWHITE 0 /* min value is white */ +#define PHOTOMETRIC_MINISBLACK 1 /* min value is black */ +#define PHOTOMETRIC_RGB 2 /* RGB color model */ +#define PHOTOMETRIC_PALETTE 3 /* color map indexed */ +#define PHOTOMETRIC_MASK 4 /* $holdout mask */ +#define PHOTOMETRIC_SEPARATED 5 /* !color separations */ +#define PHOTOMETRIC_YCBCR 6 /* !CCIR 601 */ +#define PHOTOMETRIC_CIELAB 8 /* !1976 CIE L*a*b* */ +#define PHOTOMETRIC_ICCLAB 9 /* ICC L*a*b* [Adobe TIFF Technote 4] */ +#define PHOTOMETRIC_ITULAB 10 /* ITU L*a*b* */ +#define PHOTOMETRIC_CFA 32803 /* color filter array */ +#define PHOTOMETRIC_LOGL 32844 /* CIE Log2(L) */ +#define PHOTOMETRIC_LOGLUV 32845 /* CIE Log2(L) (u',v') */ +#define TIFFTAG_THRESHHOLDING 263 /* +thresholding used on data */ +#define THRESHHOLD_BILEVEL 1 /* b&w art scan */ +#define THRESHHOLD_HALFTONE 2 /* or dithered scan */ +#define THRESHHOLD_ERRORDIFFUSE 3 /* usually floyd-steinberg */ +#define TIFFTAG_CELLWIDTH 264 /* +dithering matrix width */ +#define TIFFTAG_CELLLENGTH 265 /* +dithering matrix height */ +#define TIFFTAG_FILLORDER 266 /* data order within a byte */ +#define FILLORDER_MSB2LSB 1 /* most significant -> least */ +#define FILLORDER_LSB2MSB 2 /* least significant -> most */ +#define TIFFTAG_DOCUMENTNAME 269 /* name of doc. image is from */ +#define TIFFTAG_IMAGEDESCRIPTION 270 /* info about image */ +#define TIFFTAG_MAKE 271 /* scanner manufacturer name */ +#define TIFFTAG_MODEL 272 /* scanner model name/number */ +#define TIFFTAG_STRIPOFFSETS 273 /* offsets to data strips */ +#define TIFFTAG_ORIENTATION 274 /* +image orientation */ +#define ORIENTATION_TOPLEFT 1 /* row 0 top, col 0 lhs */ +#define ORIENTATION_TOPRIGHT 2 /* row 0 top, col 0 rhs */ +#define ORIENTATION_BOTRIGHT 3 /* row 0 bottom, col 0 rhs */ +#define ORIENTATION_BOTLEFT 4 /* row 0 bottom, col 0 lhs */ +#define ORIENTATION_LEFTTOP 5 /* row 0 lhs, col 0 top */ +#define ORIENTATION_RIGHTTOP 6 /* row 0 rhs, col 0 top */ +#define ORIENTATION_RIGHTBOT 7 /* row 0 rhs, col 0 bottom */ +#define ORIENTATION_LEFTBOT 8 /* row 0 lhs, col 0 bottom */ +#define TIFFTAG_SAMPLESPERPIXEL 277 /* samples per pixel */ +#define TIFFTAG_ROWSPERSTRIP 278 /* rows per strip of data */ +#define TIFFTAG_STRIPBYTECOUNTS 279 /* bytes counts for strips */ +#define TIFFTAG_MINSAMPLEVALUE 280 /* +minimum sample value */ +#define TIFFTAG_MAXSAMPLEVALUE 281 /* +maximum sample value */ +#define TIFFTAG_XRESOLUTION 282 /* pixels/resolution in x */ +#define TIFFTAG_YRESOLUTION 283 /* pixels/resolution in y */ +#define TIFFTAG_PLANARCONFIG 284 /* storage organization */ +#define PLANARCONFIG_CONTIG 1 /* single image plane */ +#define PLANARCONFIG_SEPARATE 2 /* separate planes of data */ +#define TIFFTAG_PAGENAME 285 /* page name image is from */ +#define TIFFTAG_XPOSITION 286 /* x page offset of image lhs */ +#define TIFFTAG_YPOSITION 287 /* y page offset of image lhs */ +#define TIFFTAG_FREEOFFSETS 288 /* +byte offset to free block */ +#define TIFFTAG_FREEBYTECOUNTS 289 /* +sizes of free blocks */ +#define TIFFTAG_GRAYRESPONSEUNIT 290 /* $gray scale curve accuracy */ +#define GRAYRESPONSEUNIT_10S 1 /* tenths of a unit */ +#define GRAYRESPONSEUNIT_100S 2 /* hundredths of a unit */ +#define GRAYRESPONSEUNIT_1000S 3 /* thousandths of a unit */ +#define GRAYRESPONSEUNIT_10000S 4 /* ten-thousandths of a unit */ +#define GRAYRESPONSEUNIT_100000S 5 /* hundred-thousandths */ +#define TIFFTAG_GRAYRESPONSECURVE 291 /* $gray scale response curve */ +#define TIFFTAG_GROUP3OPTIONS 292 /* 32 flag bits */ +#define TIFFTAG_T4OPTIONS 292 /* TIFF 6.0 proper name alias */ +#define GROUP3OPT_2DENCODING 0x1 /* 2-dimensional coding */ +#define GROUP3OPT_UNCOMPRESSED 0x2 /* data not compressed */ +#define GROUP3OPT_FILLBITS 0x4 /* fill to byte boundary */ +#define TIFFTAG_GROUP4OPTIONS 293 /* 32 flag bits */ +#define TIFFTAG_T6OPTIONS 293 /* TIFF 6.0 proper name */ +#define GROUP4OPT_UNCOMPRESSED 0x2 /* data not compressed */ +#define TIFFTAG_RESOLUTIONUNIT 296 /* units of resolutions */ +#define RESUNIT_NONE 1 /* no meaningful units */ +#define RESUNIT_INCH 2 /* english */ +#define RESUNIT_CENTIMETER 3 /* metric */ +#define TIFFTAG_PAGENUMBER 297 /* page numbers of multi-page */ +#define TIFFTAG_COLORRESPONSEUNIT 300 /* $color curve accuracy */ +#define COLORRESPONSEUNIT_10S 1 /* tenths of a unit */ +#define COLORRESPONSEUNIT_100S 2 /* hundredths of a unit */ +#define COLORRESPONSEUNIT_1000S 3 /* thousandths of a unit */ +#define COLORRESPONSEUNIT_10000S 4 /* ten-thousandths of a unit */ +#define COLORRESPONSEUNIT_100000S 5 /* hundred-thousandths */ +#define TIFFTAG_TRANSFERFUNCTION 301 /* !colorimetry info */ +#define TIFFTAG_SOFTWARE 305 /* name & release */ +#define TIFFTAG_DATETIME 306 /* creation date and time */ +#define TIFFTAG_ARTIST 315 /* creator of image */ +#define TIFFTAG_HOSTCOMPUTER 316 /* machine where created */ +#define TIFFTAG_PREDICTOR 317 /* prediction scheme w/ LZW */ +#define PREDICTOR_NONE 1 /* no prediction scheme used */ +#define PREDICTOR_HORIZONTAL 2 /* horizontal differencing */ +#define PREDICTOR_FLOATINGPOINT 3 /* floating point predictor */ +#define TIFFTAG_WHITEPOINT 318 /* image white point */ +#define TIFFTAG_PRIMARYCHROMATICITIES 319 /* !primary chromaticities */ +#define TIFFTAG_COLORMAP 320 /* RGB map for palette image */ +#define TIFFTAG_HALFTONEHINTS 321 /* !highlight+shadow info */ +#define TIFFTAG_TILEWIDTH 322 /* !tile width in pixels */ +#define TIFFTAG_TILELENGTH 323 /* !tile height in pixels */ +#define TIFFTAG_TILEOFFSETS 324 /* !offsets to data tiles */ +#define TIFFTAG_TILEBYTECOUNTS 325 /* !byte counts for tiles */ +#define TIFFTAG_BADFAXLINES 326 /* lines w/ wrong pixel count */ +#define TIFFTAG_CLEANFAXDATA 327 /* regenerated line info */ +#define CLEANFAXDATA_CLEAN 0 /* no errors detected */ +#define CLEANFAXDATA_REGENERATED 1 /* receiver regenerated lines */ +#define CLEANFAXDATA_UNCLEAN 2 /* uncorrected errors exist */ +#define TIFFTAG_CONSECUTIVEBADFAXLINES 328 /* max consecutive bad lines */ +#define TIFFTAG_SUBIFD 330 /* subimage descriptors */ +#define TIFFTAG_INKSET 332 /* !inks in separated image */ +#define INKSET_CMYK 1 /* !cyan-magenta-yellow-black color */ +#define INKSET_MULTIINK 2 /* !multi-ink or hi-fi color */ +#define TIFFTAG_INKNAMES 333 /* !ascii names of inks */ +#define TIFFTAG_NUMBEROFINKS 334 /* !number of inks */ +#define TIFFTAG_DOTRANGE 336 /* !0% and 100% dot codes */ +#define TIFFTAG_TARGETPRINTER 337 /* !separation target */ +#define TIFFTAG_EXTRASAMPLES 338 /* !info about extra samples */ +#define EXTRASAMPLE_UNSPECIFIED 0 /* !unspecified data */ +#define EXTRASAMPLE_ASSOCALPHA 1 /* !associated alpha data */ +#define EXTRASAMPLE_UNASSALPHA 2 /* !unassociated alpha data */ +#define TIFFTAG_SAMPLEFORMAT 339 /* !data sample format */ +#define SAMPLEFORMAT_UINT 1 /* !unsigned integer data */ +#define SAMPLEFORMAT_INT 2 /* !signed integer data */ +#define SAMPLEFORMAT_IEEEFP 3 /* !IEEE floating point data */ +#define SAMPLEFORMAT_VOID 4 /* !untyped data */ +#define SAMPLEFORMAT_COMPLEXINT 5 /* !complex signed int */ +#define SAMPLEFORMAT_COMPLEXIEEEFP 6 /* !complex ieee floating */ +#define TIFFTAG_SMINSAMPLEVALUE 340 /* !variable MinSampleValue */ +#define TIFFTAG_SMAXSAMPLEVALUE 341 /* !variable MaxSampleValue */ +#define TIFFTAG_CLIPPATH 343 /* %ClipPath [Adobe TIFF technote 2] */ +#define TIFFTAG_XCLIPPATHUNITS 344 /* %XClipPathUnits [Adobe TIFF technote 2] */ +#define TIFFTAG_YCLIPPATHUNITS 345 /* %YClipPathUnits [Adobe TIFF technote 2] */ +#define TIFFTAG_INDEXED 346 /* %Indexed [Adobe TIFF Technote 3] */ +#define TIFFTAG_JPEGTABLES 347 /* %JPEG table stream */ +#define TIFFTAG_OPIPROXY 351 /* %OPI Proxy [Adobe TIFF technote] */ +/* Tags 400-435 are from the TIFF/FX spec */ +#define TIFFTAG_GLOBALPARAMETERSIFD 400 /* ! */ +#define TIFFTAG_PROFILETYPE 401 /* ! */ +#define PROFILETYPE_UNSPECIFIED 0 /* ! */ +#define PROFILETYPE_G3_FAX 1 /* ! */ +#define TIFFTAG_FAXPROFILE 402 /* ! */ +#define FAXPROFILE_S 1 /* !TIFF/FX FAX profile S */ +#define FAXPROFILE_F 2 /* !TIFF/FX FAX profile F */ +#define FAXPROFILE_J 3 /* !TIFF/FX FAX profile J */ +#define FAXPROFILE_C 4 /* !TIFF/FX FAX profile C */ +#define FAXPROFILE_L 5 /* !TIFF/FX FAX profile L */ +#define FAXPROFILE_M 6 /* !TIFF/FX FAX profile LM */ +#define TIFFTAG_CODINGMETHODS 403 /* !TIFF/FX coding methods */ +#define CODINGMETHODS_T4_1D (1 << 1) /* !T.4 1D */ +#define CODINGMETHODS_T4_2D (1 << 2) /* !T.4 2D */ +#define CODINGMETHODS_T6 (1 << 3) /* !T.6 */ +#define CODINGMETHODS_T85 (1 << 4) /* !T.85 JBIG */ +#define CODINGMETHODS_T42 (1 << 5) /* !T.42 JPEG */ +#define CODINGMETHODS_T43 (1 << 6) /* !T.43 colour by layered JBIG */ +#define TIFFTAG_VERSIONYEAR 404 /* !TIFF/FX version year */ +#define TIFFTAG_MODENUMBER 405 /* !TIFF/FX mode number */ +#define TIFFTAG_DECODE 433 /* !TIFF/FX decode */ +#define TIFFTAG_IMAGEBASECOLOR 434 /* !TIFF/FX image base colour */ +#define TIFFTAG_T82OPTIONS 435 /* !TIFF/FX T.82 options */ +/* + * Tags 512-521 are obsoleted by Technical Note #2 which specifies a + * revised JPEG-in-TIFF scheme. + */ +#define TIFFTAG_JPEGPROC 512 /* !JPEG processing algorithm */ +#define JPEGPROC_BASELINE 1 /* !baseline sequential */ +#define JPEGPROC_LOSSLESS 14 /* !Huffman coded lossless */ +#define TIFFTAG_JPEGIFOFFSET 513 /* !pointer to SOI marker */ +#define TIFFTAG_JPEGIFBYTECOUNT 514 /* !JFIF stream length */ +#define TIFFTAG_JPEGRESTARTINTERVAL 515 /* !restart interval length */ +#define TIFFTAG_JPEGLOSSLESSPREDICTORS 517 /* !lossless proc predictor */ +#define TIFFTAG_JPEGPOINTTRANSFORM 518 /* !lossless point transform */ +#define TIFFTAG_JPEGQTABLES 519 /* !Q matrix offsets */ +#define TIFFTAG_JPEGDCTABLES 520 /* !DCT table offsets */ +#define TIFFTAG_JPEGACTABLES 521 /* !AC coefficient offsets */ +#define TIFFTAG_YCBCRCOEFFICIENTS 529 /* !RGB -> YCbCr transform */ +#define TIFFTAG_YCBCRSUBSAMPLING 530 /* !YCbCr subsampling factors */ +#define TIFFTAG_YCBCRPOSITIONING 531 /* !subsample positioning */ +#define YCBCRPOSITION_CENTERED 1 /* !as in PostScript Level 2 */ +#define YCBCRPOSITION_COSITED 2 /* !as in CCIR 601-1 */ +#define TIFFTAG_REFERENCEBLACKWHITE 532 /* !colorimetry info */ +#define TIFFTAG_STRIPROWCOUNTS 559 /* !TIFF/FX strip row counts */ +#define TIFFTAG_XMLPACKET 700 /* %XML packet [Adobe XMP Specification, January 2004 */ +#define TIFFTAG_OPIIMAGEID 32781 /* %OPI ImageID [Adobe TIFF technote] */ +/* For eiStream Annotation Specification, Version 1.00.06 see + * http://web.archive.org/web/20050309141348/http://www.kofile.com/support%20pro/faqs/annospec.htm */ +#define TIFFTAG_TIFFANNOTATIONDATA 32932 +/* tags 32952-32956 are private tags registered to Island Graphics */ +#define TIFFTAG_REFPTS 32953 /* image reference points */ +#define TIFFTAG_REGIONTACKPOINT 32954 /* region-xform tack point */ +#define TIFFTAG_REGIONWARPCORNERS 32955 /* warp quadrilateral */ +#define TIFFTAG_REGIONAFFINE 32956 /* affine transformation mat */ +/* tags 32995-32999 are private tags registered to SGI */ +#define TIFFTAG_MATTEING 32995 /* $use ExtraSamples */ +#define TIFFTAG_DATATYPE 32996 /* $use SampleFormat */ +#define TIFFTAG_IMAGEDEPTH 32997 /* z depth of image */ +#define TIFFTAG_TILEDEPTH 32998 /* z depth/data tile */ +/* tags 33300-33309 are private tags registered to Pixar */ +/* + * TIFFTAG_PIXAR_IMAGEFULLWIDTH and TIFFTAG_PIXAR_IMAGEFULLLENGTH + * are set when an image has been cropped out of a larger image. + * They reflect the size of the original uncropped image. + * The TIFFTAG_XPOSITION and TIFFTAG_YPOSITION can be used + * to determine the position of the smaller image in the larger one. + */ +#define TIFFTAG_PIXAR_IMAGEFULLWIDTH 33300 /* full image size in x */ +#define TIFFTAG_PIXAR_IMAGEFULLLENGTH 33301 /* full image size in y */ +/* Tags 33302-33306 are used to identify special image modes and data + * used by Pixar's texture formats. + */ +#define TIFFTAG_PIXAR_TEXTUREFORMAT 33302 /* texture map format */ +#define TIFFTAG_PIXAR_WRAPMODES 33303 /* s & t wrap modes */ +#define TIFFTAG_PIXAR_FOVCOT 33304 /* cotan(fov) for env. maps */ +#define TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN 33305 +#define TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 33306 +/* tag 33405 is a private tag registered to Eastman Kodak */ +#define TIFFTAG_WRITERSERIALNUMBER 33405 /* device serial number */ +#define TIFFTAG_CFAREPEATPATTERNDIM 33421 /* (alias for TIFFTAG_EP_CFAREPEATPATTERNDIM)*/ +#define TIFFTAG_CFAPATTERN 33422 /* (alias for TIFFTAG_EP_CFAPATTERN) */ +#define TIFFTAG_BATTERYLEVEL 33423 /* (alias for TIFFTAG_EP_BATTERYLEVEL) */ +/* tag 33432 is listed in the 6.0 spec w/ unknown ownership */ +#define TIFFTAG_COPYRIGHT 33432 /* copyright string */ +/* Tags 33445-33452 are used for Molecular Dynamics GEL fileformat, + * see http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf + * (2023: the above web site is unavailable but tags are explained briefly at + * https://www.awaresystems.be/imaging/tiff/tifftags/docs/gel.html + */ +#define TIFFTAG_MD_FILETAG 33445 /* Specifies the pixel data format encoding in the GEL file format. */ +#define TIFFTAG_MD_SCALEPIXEL 33446 /* scale factor */ +#define TIFFTAG_MD_COLORTABLE 33447 /* conversion from 16bit to 8bit */ +#define TIFFTAG_MD_LABNAME 33448 /* name of the lab that scanned this file. */ +#define TIFFTAG_MD_SAMPLEINFO 33449 /* information about the scanned GEL sample */ +#define TIFFTAG_MD_PREPDATE 33450 /* information about the date the sample was prepared YY/MM/DD */ +#define TIFFTAG_MD_PREPTIME 33451 /* information about the time the sample was prepared HH:MM*/ +#define TIFFTAG_MD_FILEUNITS 33452 /* Units for data in this file, as used in the GEL file format. */ +/* IPTC TAG from RichTIFF specifications */ +#define TIFFTAG_RICHTIFFIPTC 33723 +#define TIFFTAG_INGR_PACKET_DATA_TAG 33918 /* Intergraph Application specific storage. */ +#define TIFFTAG_INGR_FLAG_REGISTERS 33919 /* Intergraph Application specific flags. */ +#define TIFFTAG_IRASB_TRANSORMATION_MATRIX 33920 /* Originally part of Intergraph's GeoTIFF tags, but likely understood by IrasB only. */ +#define TIFFTAG_MODELTIEPOINTTAG 33922 /* GeoTIFF */ +/* 34016-34029 are reserved for ANSI IT8 TIFF/IT */ +#define TIFFTAG_STONITS 37439 /* Sample value to Nits */ +/* tag 34929 is a private tag registered to FedEx */ +#define TIFFTAG_FEDEX_EDR 34929 /* unknown use */ +#define TIFFTAG_IMAGESOURCEDATA 37724 /* http://justsolve.archiveteam.org/wiki/PSD, http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/ */ +#define TIFFTAG_INTEROPERABILITYIFD 40965 /* Pointer to EXIF Interoperability private directory */ +#define TIFFTAG_GDAL_METADATA 42112 /* Used by the GDAL library */ +#define TIFFTAG_GDAL_NODATA 42113 /* Used by the GDAL library */ +#define TIFFTAG_OCE_SCANJOB_DESCRIPTION 50215 /* Used in the Oce scanning process */ +#define TIFFTAG_OCE_APPLICATION_SELECTOR 50216 /* Used in the Oce scanning process. */ +#define TIFFTAG_OCE_IDENTIFICATION_NUMBER 50217 +#define TIFFTAG_OCE_IMAGELOGIC_CHARACTERISTICS 50218 +/* tags 50674 to 50677 are reserved for ESRI */ +#define TIFFTAG_LERC_PARAMETERS 50674 /* Stores LERC version and additional compression method */ + +/* Adobe Digital Negative (DNG) format tags */ +#define TIFFTAG_DNGVERSION 50706 /* &DNG version number */ +#define TIFFTAG_DNGBACKWARDVERSION 50707 /* &DNG compatibility version */ +#define TIFFTAG_UNIQUECAMERAMODEL 50708 /* &name for the camera model */ +#define TIFFTAG_LOCALIZEDCAMERAMODEL 50709 /* &localized camera model name (UTF-8) */ +#define TIFFTAG_CFAPLANECOLOR 50710 /* &CFAPattern->LinearRaw space mapping */ +#define TIFFTAG_CFALAYOUT 50711 /* &spatial layout of the CFA */ +#define TIFFTAG_LINEARIZATIONTABLE 50712 /* &lookup table description */ +#define TIFFTAG_BLACKLEVELREPEATDIM 50713 /* &repeat pattern size for the BlackLevel tag */ +#define TIFFTAG_BLACKLEVEL 50714 /* &zero light encoding level */ +#define TIFFTAG_BLACKLEVELDELTAH 50715 /* &zero light encoding level differences (columns) */ +#define TIFFTAG_BLACKLEVELDELTAV 50716 /* &zero light encoding level differences (rows) */ +#define TIFFTAG_WHITELEVEL 50717 /* &fully saturated encoding level */ +#define TIFFTAG_DEFAULTSCALE 50718 /* &default scale factors */ +#define TIFFTAG_DEFAULTCROPORIGIN 50719 /* &origin of the final image area */ +#define TIFFTAG_DEFAULTCROPSIZE 50720 /* &size of the final image area */ +#define TIFFTAG_COLORMATRIX1 50721 /* &XYZ->reference color space transformation matrix 1 */ +#define TIFFTAG_COLORMATRIX2 50722 /* &XYZ->reference color space transformation matrix 2 */ +#define TIFFTAG_CAMERACALIBRATION1 50723 /* &calibration matrix 1 */ +#define TIFFTAG_CAMERACALIBRATION2 50724 /* &calibration matrix 2 */ +#define TIFFTAG_REDUCTIONMATRIX1 50725 /* &dimensionality reduction matrix 1 */ +#define TIFFTAG_REDUCTIONMATRIX2 50726 /* &dimensionality reduction matrix 2 */ +#define TIFFTAG_ANALOGBALANCE 50727 /* &gain applied the stored raw values*/ +#define TIFFTAG_ASSHOTNEUTRAL 50728 /* &selected white balance in linear reference space */ +#define TIFFTAG_ASSHOTWHITEXY 50729 /* &selected white balance in x-y chromaticity coordinates */ +#define TIFFTAG_BASELINEEXPOSURE 50730 /* &how much to move the zero point */ +#define TIFFTAG_BASELINENOISE 50731 /* &relative noise level */ +#define TIFFTAG_BASELINESHARPNESS 50732 /* &relative amount of sharpening */ +/* TIFFTAG_BAYERGREENSPLIT: &how closely the values of the green pixels in the blue/green rows + * track the values of the green pixels in the red/green rows */ +#define TIFFTAG_BAYERGREENSPLIT 50733 +#define TIFFTAG_LINEARRESPONSELIMIT 50734 /* &non-linear encoding range */ +#define TIFFTAG_CAMERASERIALNUMBER 50735 /* &camera's serial number */ +#define TIFFTAG_LENSINFO 50736 /* info about the lens */ +#define TIFFTAG_CHROMABLURRADIUS 50737 /* &chroma blur radius */ +#define TIFFTAG_ANTIALIASSTRENGTH 50738 /* &relative strength of the camera's anti-alias filter */ +#define TIFFTAG_SHADOWSCALE 50739 /* &used by Adobe Camera Raw */ +#define TIFFTAG_DNGPRIVATEDATA 50740 /* &manufacturer's private data */ +#define TIFFTAG_MAKERNOTESAFETY 50741 /* &whether the EXIF MakerNote tag is safe to preserve along with the rest of the EXIF data */ +#define TIFFTAG_CALIBRATIONILLUMINANT1 50778 /* &illuminant 1 */ +#define TIFFTAG_CALIBRATIONILLUMINANT2 50779 /* &illuminant 2 */ +#define TIFFTAG_BESTQUALITYSCALE 50780 /* &best quality multiplier */ +#define TIFFTAG_RAWDATAUNIQUEID 50781 /* &unique identifier for the raw image data */ +#define TIFFTAG_ORIGINALRAWFILENAME 50827 /* &file name of the original raw file (UTF-8) */ +#define TIFFTAG_ORIGINALRAWFILEDATA 50828 /* &contents of the original raw file */ +#define TIFFTAG_ACTIVEAREA 50829 /* &active (non-masked) pixels of the sensor */ +#define TIFFTAG_MASKEDAREAS 50830 /* &list of coordinates of fully masked pixels */ +#define TIFFTAG_ASSHOTICCPROFILE 50831 /* &these two tags used to */ +#define TIFFTAG_ASSHOTPREPROFILEMATRIX 50832 /* map cameras's color space into ICC profile space */ +#define TIFFTAG_CURRENTICCPROFILE 50833 /* & */ +#define TIFFTAG_CURRENTPREPROFILEMATRIX 50834 /* & */ + +/* DNG 1.2.0.0 */ +#define TIFFTAG_COLORIMETRICREFERENCE 50879 /* &colorimetric reference */ +#define TIFFTAG_CAMERACALIBRATIONSIGNATURE 50931 /* &camera calibration signature (UTF-8) */ +#define TIFFTAG_PROFILECALIBRATIONSIGNATURE 50932 /* &profile calibration signature (UTF-8) */ +/* TIFFTAG_EXTRACAMERAPROFILES 50933 &extra camera profiles : is already defined for GeoTIFF DGIWG */ +#define TIFFTAG_ASSHOTPROFILENAME 50934 /* &as shot profile name (UTF-8) */ +#define TIFFTAG_NOISEREDUCTIONAPPLIED 50935 /* &amount of applied noise reduction */ +#define TIFFTAG_PROFILENAME 50936 /* &camera profile name (UTF-8) */ +#define TIFFTAG_PROFILEHUESATMAPDIMS 50937 /* &dimensions of HSV mapping */ +#define TIFFTAG_PROFILEHUESATMAPDATA1 50938 /* &first HSV mapping table */ +#define TIFFTAG_PROFILEHUESATMAPDATA2 50939 /* &second HSV mapping table */ +#define TIFFTAG_PROFILETONECURVE 50940 /* &default tone curve */ +#define TIFFTAG_PROFILEEMBEDPOLICY 50941 /* &profile embedding policy */ +#define TIFFTAG_PROFILECOPYRIGHT 50942 /* &profile copyright information (UTF-8) */ +#define TIFFTAG_FORWARDMATRIX1 50964 /* &matrix for mapping white balanced camera colors to XYZ D50 */ +#define TIFFTAG_FORWARDMATRIX2 50965 /* &matrix for mapping white balanced camera colors to XYZ D50 */ +#define TIFFTAG_PREVIEWAPPLICATIONNAME 50966 /* &name of application that created preview (UTF-8) */ +#define TIFFTAG_PREVIEWAPPLICATIONVERSION 50967 /* &version of application that created preview (UTF-8) */ +#define TIFFTAG_PREVIEWSETTINGSNAME 50968 /* &name of conversion settings (UTF-8) */ +#define TIFFTAG_PREVIEWSETTINGSDIGEST 50969 /* &unique id of conversion settings */ +#define TIFFTAG_PREVIEWCOLORSPACE 50970 /* &preview color space */ +#define TIFFTAG_PREVIEWDATETIME 50971 /* &date/time preview was rendered */ +#define TIFFTAG_RAWIMAGEDIGEST 50972 /* &md5 of raw image data */ +#define TIFFTAG_ORIGINALRAWFILEDIGEST 50973 /* &md5 of the data stored in the OriginalRawFileData tag */ +#define TIFFTAG_SUBTILEBLOCKSIZE 50974 /* &subtile block size */ +#define TIFFTAG_ROWINTERLEAVEFACTOR 50975 /* &number of interleaved fields */ +#define TIFFTAG_PROFILELOOKTABLEDIMS 50981 /* &num of input samples in each dim of default "look" table */ +#define TIFFTAG_PROFILELOOKTABLEDATA 50982 /* &default "look" table for use as starting point */ + +/* DNG 1.3.0.0 */ +#define TIFFTAG_OPCODELIST1 51008 /* &opcodes that should be applied to raw image after reading */ +#define TIFFTAG_OPCODELIST2 51009 /* &opcodes that should be applied after mapping to linear reference */ +#define TIFFTAG_OPCODELIST3 51022 /* &opcodes that should be applied after demosaicing */ +#define TIFFTAG_NOISEPROFILE 51041 /* &noise profile */ + +/* DNG 1.4.0.0 */ +#define TIFFTAG_DEFAULTUSERCROP 51125 /* &default user crop rectangle in relative coords */ +#define TIFFTAG_DEFAULTBLACKRENDER 51110 /* &black rendering hint */ +#define TIFFTAG_BASELINEEXPOSUREOFFSET 51109 /* &baseline exposure offset */ +#define TIFFTAG_PROFILELOOKTABLEENCODING 51108 /* &3D LookTable indexing conversion */ +#define TIFFTAG_PROFILEHUESATMAPENCODING 51107 /* &3D HueSatMap indexing conversion */ +#define TIFFTAG_ORIGINALDEFAULTFINALSIZE 51089 /* &default final size of larger original file for this proxy */ +#define TIFFTAG_ORIGINALBESTQUALITYFINALSIZE 51090 /* &best quality final size of larger original file for this proxy */ +#define TIFFTAG_ORIGINALDEFAULTCROPSIZE 51091 /* &the default crop size of larger original file for this proxy */ +#define TIFFTAG_NEWRAWIMAGEDIGEST 51111 /* &modified MD5 digest of the raw image data */ +#define TIFFTAG_RAWTOPREVIEWGAIN 51112 /* &The gain between the main raw FD and the preview IFD containing this tag */ + +/* DNG 1.5.0.0 */ +#define TIFFTAG_DEPTHFORMAT 51177 /* &encoding of the depth data in the file */ +#define TIFFTAG_DEPTHNEAR 51178 /* &distance from the camera represented by value 0 in the depth map */ +#define TIFFTAG_DEPTHFAR 51179 /* &distance from the camera represented by the maximum value in the depth map */ +#define TIFFTAG_DEPTHUNITS 51180 /* &measurement units for DepthNear and DepthFar */ +#define TIFFTAG_DEPTHMEASURETYPE 51181 /* &measurement geometry for the depth map */ +#define TIFFTAG_ENHANCEPARAMS 51182 /* &a string that documents how the enhanced image data was processed. */ + +/* DNG 1.6.0.0 */ +#define TIFFTAG_PROFILEGAINTABLEMAP 52525 /* &spatially varying gain tables that can be applied as starting point */ +#define TIFFTAG_SEMANTICNAME 52526 /* &a string that identifies the semantic mask */ +#define TIFFTAG_SEMANTICINSTANCEID 52528 /* &a string that identifies a specific instance in a semantic mask */ +#define TIFFTAG_MASKSUBAREA 52536 /* &the crop rectangle of this IFD's mask, relative to the main image */ +#define TIFFTAG_RGBTABLES 52543 /* &color transforms to apply to masked image regions */ +#define TIFFTAG_CALIBRATIONILLUMINANT3 52529 /* &the illuminant used for the third set of color calibration tags */ +#define TIFFTAG_COLORMATRIX3 52531 /* &matrix to convert XYZ values to reference camera native color space under CalibrationIlluminant3 */ +#define TIFFTAG_CAMERACALIBRATION3 52530 /* &matrix to transform reference camera native space values to individual camera native space values under CalibrationIlluminant3 */ +#define TIFFTAG_REDUCTIONMATRIX3 52538 /* &dimensionality reduction matrix for use in color conversion to XYZ under CalibrationIlluminant3 */ +#define TIFFTAG_PROFILEHUESATMAPDATA3 52537 /* &the data for the third HSV table */ +#define TIFFTAG_FORWARDMATRIX3 52532 /* &matrix to map white balanced camera colors to XYZ D50 */ +#define TIFFTAG_ILLUMINANTDATA1 52533 /* &data for the first calibration illuminant */ +#define TIFFTAG_ILLUMINANTDATA2 52534 /* &data for the second calibration illuminant */ +#define TIFFTAG_ILLUMINANTDATA3 53535 /* &data for the third calibration illuminant */ + +/* TIFF/EP */ +#define TIFFTAG_EP_CFAREPEATPATTERNDIM 33421 /* dimensions of CFA pattern */ +#define TIFFTAG_EP_CFAPATTERN 33422 /* color filter array pattern */ +#define TIFFTAG_EP_BATTERYLEVEL 33423 /* battery level (rational or ASCII) */ +#define TIFFTAG_EP_INTERLACE 34857 /* Number of multi-field images */ +/* TIFFTAG_EP_IPTC_NAA and TIFFTAG_RICHTIFFIPTC share the same tag number (33723) + * LibTIFF type is UNDEFINED or BYTE, but often times incorrectly specified as LONG, + * because TIFF/EP (ISO/DIS 12234-2) specifies type LONG or ASCII. */ +#define TIFFTAG_EP_IPTC_NAA 33723 /* Alias IPTC/NAA Newspaper Association RichTIFF */ +#define TIFFTAG_EP_TIMEZONEOFFSET 34858 /* Time zone offset relative to UTC */ +#define TIFFTAG_EP_SELFTIMERMODE 34859 /* Number of seconds capture was delayed from button press */ +#define TIFFTAG_EP_FLASHENERGY 37387 /* Flash energy, or range if there is uncertainty */ +#define TIFFTAG_EP_SPATIALFREQUENCYRESPONSE 37388 /* Spatial frequency response */ +#define TIFFTAG_EP_NOISE 37389 /* Camera noise measurement values */ +#define TIFFTAG_EP_FOCALPLANEXRESOLUTION 37390 /* Focal plane X resolution */ +#define TIFFTAG_EP_FOCALPLANEYRESOLUTION 37391 /* Focal plane Y resolution */ +#define TIFFTAG_EP_FOCALPLANERESOLUTIONUNIT 37392 /* Focal plane resolution unit */ +#define TIFFTAG_EP_IMAGENUMBER 37393 /* Number of image when several of burst shot stored in same TIFF/EP */ +#define TIFFTAG_EP_SECURITYCLASSIFICATION 37394 /* Security classification */ +#define TIFFTAG_EP_IMAGEHISTORY 37395 /* Record of what has been done to the image */ +#define TIFFTAG_EP_EXPOSUREINDEX 37397 /* Exposure index */ +#define TIFFTAG_EP_STANDARDID 37398 /* TIFF/EP standard version, n.n.n.n */ +#define TIFFTAG_EP_SENSINGMETHOD 37399 /* Type of image sensor */ +/* + * TIFF/EP tags equivalent to EXIF tags + * Note that TIFF-EP and EXIF use nearly the same metadata tag set, but TIFF-EP stores the tags in IFD 0, + * while EXIF store the tags in a separate IFD. Either location is allowed by DNG, but the EXIF location is preferred. + */ +#define TIFFTAG_EP_EXPOSURETIME 33434 /* Exposure time */ +#define TIFFTAG_EP_FNUMBER 33437 /* F number */ +#define TIFFTAG_EP_EXPOSUREPROGRAM 34850 /* Exposure program */ +#define TIFFTAG_EP_SPECTRALSENSITIVITY 34852 /* Spectral sensitivity */ +#define TIFFTAG_EP_ISOSPEEDRATINGS 34855 /* ISO speed rating */ +#define TIFFTAG_EP_OECF 34856 /* Optoelectric conversion factor */ +#define TIFFTAG_EP_DATETIMEORIGINAL 36867 /* Date and time of original data generation */ +#define TIFFTAG_EP_COMPRESSEDBITSPERPIXEL 37122 /* Image compression mode */ +#define TIFFTAG_EP_SHUTTERSPEEDVALUE 37377 /* Shutter speed */ +#define TIFFTAG_EP_APERTUREVALUE 37378 /* Aperture */ +#define TIFFTAG_EP_BRIGHTNESSVALUE 37379 /* Brightness */ +#define TIFFTAG_EP_EXPOSUREBIASVALUE 37380 /* Exposure bias */ +#define TIFFTAG_EP_MAXAPERTUREVALUE 37381 /* Maximum lens aperture */ +#define TIFFTAG_EP_SUBJECTDISTANCE 37382 /* Subject distance */ +#define TIFFTAG_EP_METERINGMODE 37383 /* Metering mode */ +#define TIFFTAG_EP_LIGHTSOURCE 37384 /* Light source */ +#define TIFFTAG_EP_FLASH 37385 /* Flash */ +#define TIFFTAG_EP_FOCALLENGTH 37386 /* Lens focal length */ +#define TIFFTAG_EP_SUBJECTLOCATION 37396 /* Subject location (area) */ + +#define TIFFTAG_RPCCOEFFICIENT 50844 /* Define by GDAL for geospatial georeferencing through RPC: http://geotiff.maptools.org/rpc_prop.html */ +#define TIFFTAG_ALIAS_LAYER_METADATA 50784 /* Alias Sketchbook Pro layer usage description. */ + +/* GeoTIFF DGIWG */ +#define TIFFTAG_TIFF_RSID 50908 /* https://www.awaresystems.be/imaging/tiff/tifftags/tiff_rsid.html */ +#define TIFFTAG_GEO_METADATA 50909 /* https://www.awaresystems.be/imaging/tiff/tifftags/geo_metadata.html */ +#define TIFFTAG_EXTRACAMERAPROFILES 50933 /* http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products/photoshop/pdfs/dng_spec_1.4.0.0.pdf */ + +/* tag 65535 is an undefined tag used by Eastman Kodak */ +#define TIFFTAG_DCSHUESHIFTVALUES 65535 /* hue shift correction data */ + +/* + * The following are ``pseudo tags'' that can be used to control + * codec-specific functionality. These tags are not written to file. + * Note that these values start at 0xffff+1 so that they'll never + * collide with Aldus-assigned tags. + * + * If you want your private pseudo tags ``registered'' (i.e. added to + * this file), please post a bug report via the tracking system at + * http://www.remotesensing.org/libtiff/bugs.html with the appropriate + * C definitions to add. + */ +#define TIFFTAG_FAXMODE 65536 /* Group 3/4 format control */ +#define FAXMODE_CLASSIC 0x0000 /* default, include RTC */ +#define FAXMODE_NORTC 0x0001 /* no RTC at end of data */ +#define FAXMODE_NOEOL 0x0002 /* no EOL code at end of row */ +#define FAXMODE_BYTEALIGN 0x0004 /* byte align row */ +#define FAXMODE_WORDALIGN 0x0008 /* word align row */ +#define FAXMODE_CLASSF FAXMODE_NORTC /* TIFF Class F */ +#define TIFFTAG_JPEGQUALITY 65537 /* Compression quality level */ +/* Note: quality level is on the IJG 0-100 scale. Default value is 75 */ +#define TIFFTAG_JPEGCOLORMODE 65538 /* Auto RGB<=>YCbCr convert? */ +#define JPEGCOLORMODE_RAW 0x0000 /* no conversion (default) */ +#define JPEGCOLORMODE_RGB 0x0001 /* do auto conversion */ +#define TIFFTAG_JPEGTABLESMODE 65539 /* What to put in JPEGTables */ +#define JPEGTABLESMODE_QUANT 0x0001 /* include quantization tbls */ +#define JPEGTABLESMODE_HUFF 0x0002 /* include Huffman tbls */ +/* Note: default is JPEGTABLESMODE_QUANT | JPEGTABLESMODE_HUFF */ +#define TIFFTAG_FAXFILLFUNC 65540 /* G3/G4 fill function */ +#define TIFFTAG_PIXARLOGDATAFMT 65549 /* PixarLogCodec I/O data sz */ +#define PIXARLOGDATAFMT_8BIT 0 /* regular u_char samples */ +#define PIXARLOGDATAFMT_8BITABGR 1 /* ABGR-order u_chars */ +#define PIXARLOGDATAFMT_11BITLOG 2 /* 11-bit log-encoded (raw) */ +#define PIXARLOGDATAFMT_12BITPICIO 3 /* as per PICIO (1.0==2048) */ +#define PIXARLOGDATAFMT_16BIT 4 /* signed short samples */ +#define PIXARLOGDATAFMT_FLOAT 5 /* IEEE float samples */ +/* 65550-65556 are allocated to Oceana Matrix */ +#define TIFFTAG_DCSIMAGERTYPE 65550 /* imager model & filter */ +#define DCSIMAGERMODEL_M3 0 /* M3 chip (1280 x 1024) */ +#define DCSIMAGERMODEL_M5 1 /* M5 chip (1536 x 1024) */ +#define DCSIMAGERMODEL_M6 2 /* M6 chip (3072 x 2048) */ +#define DCSIMAGERFILTER_IR 0 /* infrared filter */ +#define DCSIMAGERFILTER_MONO 1 /* monochrome filter */ +#define DCSIMAGERFILTER_CFA 2 /* color filter array */ +#define DCSIMAGERFILTER_OTHER 3 /* other filter */ +#define TIFFTAG_DCSINTERPMODE 65551 /* interpolation mode */ +#define DCSINTERPMODE_NORMAL 0x0 /* whole image, default */ +#define DCSINTERPMODE_PREVIEW 0x1 /* preview of image (384x256) */ +#define TIFFTAG_DCSBALANCEARRAY 65552 /* color balance values */ +#define TIFFTAG_DCSCORRECTMATRIX 65553 /* color correction values */ +#define TIFFTAG_DCSGAMMA 65554 /* gamma value */ +#define TIFFTAG_DCSTOESHOULDERPTS 65555 /* toe & shoulder points */ +#define TIFFTAG_DCSCALIBRATIONFD 65556 /* calibration file desc */ +/* Note: quality level is on the ZLIB 1-9 scale. Default value is -1 */ +#define TIFFTAG_ZIPQUALITY 65557 /* compression quality level */ +#define TIFFTAG_PIXARLOGQUALITY 65558 /* PixarLog uses same scale */ +/* 65559 is allocated to Oceana Matrix */ +#define TIFFTAG_DCSCLIPRECTANGLE 65559 /* area of image to acquire */ +#define TIFFTAG_SGILOGDATAFMT 65560 /* SGILog user data format */ +#define SGILOGDATAFMT_FLOAT 0 /* IEEE float samples */ +#define SGILOGDATAFMT_16BIT 1 /* 16-bit samples */ +#define SGILOGDATAFMT_RAW 2 /* uninterpreted data */ +#define SGILOGDATAFMT_8BIT 3 /* 8-bit RGB monitor values */ +#define TIFFTAG_SGILOGENCODE 65561 /* SGILog data encoding control*/ +#define SGILOGENCODE_NODITHER 0 /* do not dither encoded values*/ +#define SGILOGENCODE_RANDITHER 1 /* randomly dither encd values */ +#define TIFFTAG_LZMAPRESET 65562 /* LZMA2 preset (compression level) */ +#define TIFFTAG_PERSAMPLE 65563 /* interface for per sample tags */ +#define PERSAMPLE_MERGED 0 /* present as a single value */ +#define PERSAMPLE_MULTI 1 /* present as multiple values */ +#define TIFFTAG_ZSTD_LEVEL 65564 /* ZSTD compression level */ +#define TIFFTAG_LERC_VERSION 65565 /* LERC version */ +#define LERC_VERSION_2_4 4 +#define TIFFTAG_LERC_ADD_COMPRESSION 65566 /* LERC additional compression */ +#define LERC_ADD_COMPRESSION_NONE 0 +#define LERC_ADD_COMPRESSION_DEFLATE 1 +#define LERC_ADD_COMPRESSION_ZSTD 2 +#define TIFFTAG_LERC_MAXZERROR 65567 /* LERC maximum error */ +#define TIFFTAG_WEBP_LEVEL 65568 /* WebP compression level */ +#define TIFFTAG_WEBP_LOSSLESS 65569 /* WebP lossless/lossy */ +#define TIFFTAG_WEBP_LOSSLESS_EXACT 65571 /* WebP lossless exact mode. Set-only mode. Default is 1. Can be set to 0 to increase compression rate, but R,G,B in areas where alpha = 0 will not be preserved */ +#define TIFFTAG_DEFLATE_SUBCODEC 65570 /* ZIP codec: to get/set the sub-codec to use. Will default to libdeflate when available */ +#define DEFLATE_SUBCODEC_ZLIB 0 +#define DEFLATE_SUBCODEC_LIBDEFLATE 1 + +/* + * EXIF tags + */ +#define EXIFTAG_EXPOSURETIME 33434 /* Exposure time */ +#define EXIFTAG_FNUMBER 33437 /* F number */ +#define EXIFTAG_EXPOSUREPROGRAM 34850 /* Exposure program */ +#define EXIFTAG_SPECTRALSENSITIVITY 34852 /* Spectral sensitivity */ +/* After EXIF 2.2.1 ISOSpeedRatings is named PhotographicSensitivity. + In addition, while "Count=Any", only 1 count should be used. */ +#define EXIFTAG_ISOSPEEDRATINGS 34855 /* ISO speed rating */ +#define EXIFTAG_PHOTOGRAPHICSENSITIVITY 34855 /* Photographic Sensitivity (new name for tag 34855) */ +#define EXIFTAG_OECF 34856 /* Optoelectric conversion factor */ +#define EXIFTAG_EXIFVERSION 36864 /* Exif version */ +#define EXIFTAG_DATETIMEORIGINAL 36867 /* Date and time of original data generation */ +#define EXIFTAG_DATETIMEDIGITIZED 36868 /* Date and time of digital data generation */ +#define EXIFTAG_COMPONENTSCONFIGURATION 37121 /* Meaning of each component */ +#define EXIFTAG_COMPRESSEDBITSPERPIXEL 37122 /* Image compression mode */ +#define EXIFTAG_SHUTTERSPEEDVALUE 37377 /* Shutter speed */ +#define EXIFTAG_APERTUREVALUE 37378 /* Aperture */ +#define EXIFTAG_BRIGHTNESSVALUE 37379 /* Brightness */ +#define EXIFTAG_EXPOSUREBIASVALUE 37380 /* Exposure bias */ +#define EXIFTAG_MAXAPERTUREVALUE 37381 /* Maximum lens aperture */ +#define EXIFTAG_SUBJECTDISTANCE 37382 /* Subject distance */ +#define EXIFTAG_METERINGMODE 37383 /* Metering mode */ +#define EXIFTAG_LIGHTSOURCE 37384 /* Light source */ +#define EXIFTAG_FLASH 37385 /* Flash */ +#define EXIFTAG_FOCALLENGTH 37386 /* Lens focal length */ +#define EXIFTAG_SUBJECTAREA 37396 /* Subject area */ +#define EXIFTAG_MAKERNOTE 37500 /* Manufacturer notes */ +#define EXIFTAG_USERCOMMENT 37510 /* User comments */ +#define EXIFTAG_SUBSECTIME 37520 /* DateTime subseconds */ +#define EXIFTAG_SUBSECTIMEORIGINAL 37521 /* DateTimeOriginal subseconds */ +#define EXIFTAG_SUBSECTIMEDIGITIZED 37522 /* DateTimeDigitized subseconds */ +#define EXIFTAG_FLASHPIXVERSION 40960 /* Supported Flashpix version */ +#define EXIFTAG_COLORSPACE 40961 /* Color space information */ +#define EXIFTAG_PIXELXDIMENSION 40962 /* Valid image width */ +#define EXIFTAG_PIXELYDIMENSION 40963 /* Valid image height */ +#define EXIFTAG_RELATEDSOUNDFILE 40964 /* Related audio file */ +#define EXIFTAG_FLASHENERGY 41483 /* Flash energy */ +#define EXIFTAG_SPATIALFREQUENCYRESPONSE 41484 /* Spatial frequency response */ +#define EXIFTAG_FOCALPLANEXRESOLUTION 41486 /* Focal plane X resolution */ +#define EXIFTAG_FOCALPLANEYRESOLUTION 41487 /* Focal plane Y resolution */ +#define EXIFTAG_FOCALPLANERESOLUTIONUNIT 41488 /* Focal plane resolution unit */ +#define EXIFTAG_SUBJECTLOCATION 41492 /* Subject location */ +#define EXIFTAG_EXPOSUREINDEX 41493 /* Exposure index */ +#define EXIFTAG_SENSINGMETHOD 41495 /* Sensing method */ +#define EXIFTAG_FILESOURCE 41728 /* File source */ +#define EXIFTAG_SCENETYPE 41729 /* Scene type */ +#define EXIFTAG_CFAPATTERN 41730 /* CFA pattern */ +#define EXIFTAG_CUSTOMRENDERED 41985 /* Custom image processing */ +#define EXIFTAG_EXPOSUREMODE 41986 /* Exposure mode */ +#define EXIFTAG_WHITEBALANCE 41987 /* White balance */ +#define EXIFTAG_DIGITALZOOMRATIO 41988 /* Digital zoom ratio */ +#define EXIFTAG_FOCALLENGTHIN35MMFILM 41989 /* Focal length in 35 mm film */ +#define EXIFTAG_SCENECAPTURETYPE 41990 /* Scene capture type */ +#define EXIFTAG_GAINCONTROL 41991 /* Gain control */ +#define EXIFTAG_CONTRAST 41992 /* Contrast */ +#define EXIFTAG_SATURATION 41993 /* Saturation */ +#define EXIFTAG_SHARPNESS 41994 /* Sharpness */ +#define EXIFTAG_DEVICESETTINGDESCRIPTION 41995 /* Device settings description */ +#define EXIFTAG_SUBJECTDISTANCERANGE 41996 /* Subject distance range */ +#define EXIFTAG_IMAGEUNIQUEID 42016 /* Unique image ID */ + +/*--: New for EXIF-Version 2.32, May 2019 ... */ +#define EXIFTAG_SENSITIVITYTYPE 34864 /* The SensitivityType tag indicates which one of the parameters of ISO12232 is the PhotographicSensitivity tag. */ +#define EXIFTAG_STANDARDOUTPUTSENSITIVITY 34865 /* This tag indicates the standard output sensitivity value of a camera or input device defined in ISO 12232. */ +#define EXIFTAG_RECOMMENDEDEXPOSUREINDEX 34866 /* recommended exposure index */ +#define EXIFTAG_ISOSPEED 34867 /* ISO speed value */ +#define EXIFTAG_ISOSPEEDLATITUDEYYY 34868 /* ISO speed latitude yyy */ +#define EXIFTAG_ISOSPEEDLATITUDEZZZ 34869 /* ISO speed latitude zzz */ +#define EXIFTAG_OFFSETTIME 36880 /* offset from UTC of the time of DateTime tag. */ +#define EXIFTAG_OFFSETTIMEORIGINAL 36881 /* offset from UTC of the time of DateTimeOriginal tag. */ +#define EXIFTAG_OFFSETTIMEDIGITIZED 36882 /* offset from UTC of the time of DateTimeDigitized tag. */ +#define EXIFTAG_TEMPERATURE 37888 /* Temperature as the ambient situation at the shot in dergee Celsius */ +#define EXIFTAG_HUMIDITY 37889 /* Humidity as the ambient situation at the shot in percent */ +#define EXIFTAG_PRESSURE 37890 /* Pressure as the ambient situation at the shot hecto-Pascal (hPa) */ +#define EXIFTAG_WATERDEPTH 37891 /* WaterDepth as the ambient situation at the shot in meter (m) */ +#define EXIFTAG_ACCELERATION 37892 /* Acceleration (a scalar regardless of direction) as the ambientsituation at the shot in units of mGal (10-5 m/s^2) */ +/* EXIFTAG_CAMERAELEVATIONANGLE: Elevation/depression. angle of the orientation of the camera(imaging optical axis) + * as the ambient situation at the shot in degree from -180deg to +180deg. */ +#define EXIFTAG_CAMERAELEVATIONANGLE 37893 +#define EXIFTAG_CAMERAOWNERNAME 42032 /* owner of a camera */ +#define EXIFTAG_BODYSERIALNUMBER 42033 /* serial number of the body of the camera */ +/* EXIFTAG_LENSSPECIFICATION: minimum focal length (in mm), maximum focal length (in mm),minimum F number in the minimum focal length, + * and minimum F number in the maximum focal length, */ +#define EXIFTAG_LENSSPECIFICATION 42034 +#define EXIFTAG_LENSMAKE 42035 /* the lens manufacturer */ +#define EXIFTAG_LENSMODEL 42036 /* the lens model name and model number */ +#define EXIFTAG_LENSSERIALNUMBER 42037 /* the serial number of the interchangeable lens */ +#define EXIFTAG_GAMMA 42240 /* value of coefficient gamma */ +#define EXIFTAG_COMPOSITEIMAGE 42080 /* composite image */ +#define EXIFTAG_SOURCEIMAGENUMBEROFCOMPOSITEIMAGE 42081 /* source image number of composite image */ +#define EXIFTAG_SOURCEEXPOSURETIMESOFCOMPOSITEIMAGE 42082 /* source exposure times of composite image */ + +/* + * EXIF-GPS tags (Version 2.31, July 2016) + */ +#define GPSTAG_VERSIONID 0 /* Indicates the version of GPSInfoIFD. */ +#define GPSTAG_LATITUDEREF 1 /* Indicates whether the latitude is north or south latitude. */ +#define GPSTAG_LATITUDE 2 /* Indicates the latitude. */ +#define GPSTAG_LONGITUDEREF 3 /* Indicates whether the longitude is east or west longitude. */ +#define GPSTAG_LONGITUDE 4 /* Indicates the longitude. */ +#define GPSTAG_ALTITUDEREF 5 /* Indicates the altitude used as the reference altitude. */ +#define GPSTAG_ALTITUDE 6 /* Indicates the altitude based on the reference in GPSAltitudeRef. */ +#define GPSTAG_TIMESTAMP 7 /*Indicates the time as UTC (Coordinated Universal Time). */ +#define GPSTAG_SATELLITES 8 /*Indicates the GPS satellites used for measurements. */ +#define GPSTAG_STATUS 9 /* Indicates the status of the GPS receiver when the image is recorded. */ +#define GPSTAG_MEASUREMODE 10 /* Indicates the GPS measurement mode. */ +#define GPSTAG_DOP 11 /* Indicates the GPS DOP (data degree of precision). */ +#define GPSTAG_SPEEDREF 12 /* Indicates the unit used to express the GPS receiver speed of movement. */ +#define GPSTAG_SPEED 13 /* Indicates the speed of GPS receiver movement. */ +#define GPSTAG_TRACKREF 14 /* Indicates the reference for giving the direction of GPS receiver movement. */ +#define GPSTAG_TRACK 15 /* Indicates the direction of GPS receiver movement. */ +#define GPSTAG_IMGDIRECTIONREF 16 /* Indicates the reference for giving the direction of the image when it is captured. */ +#define GPSTAG_IMGDIRECTION 17 /* Indicates the direction of the image when it was captured. */ +#define GPSTAG_MAPDATUM 18 /* Indicates the geodetic survey data used by the GPS receiver. (e.g. WGS-84) */ +#define GPSTAG_DESTLATITUDEREF 19 /* Indicates whether the latitude of the destination point is north or south latitude. */ +#define GPSTAG_DESTLATITUDE 20 /* Indicates the latitude of the destination point. */ +#define GPSTAG_DESTLONGITUDEREF 21 /* Indicates whether the longitude of the destination point is east or west longitude. */ +#define GPSTAG_DESTLONGITUDE 22 /* Indicates the longitude of the destination point. */ +#define GPSTAG_DESTBEARINGREF 23 /* Indicates the reference used for giving the bearing to the destination point. */ +#define GPSTAG_DESTBEARING 24 /* Indicates the bearing to the destination point. */ +#define GPSTAG_DESTDISTANCEREF 25 /* Indicates the unit used to express the distance to the destination point. */ +#define GPSTAG_DESTDISTANCE 26 /* Indicates the distance to the destination point. */ +#define GPSTAG_PROCESSINGMETHOD 27 /* A character string recording the name of the method used for location finding. */ +#define GPSTAG_AREAINFORMATION 28 /* A character string recording the name of the GPS area. */ +#define GPSTAG_DATESTAMP 29 /* A character string recording date and time information relative to UTC (Coordinated Universal Time). */ +#define GPSTAG_DIFFERENTIAL 30 /* Indicates whether differential correction is applied to the GPS receiver. */ +#define GPSTAG_GPSHPOSITIONINGERROR 31 /* Indicates horizontal positioning errors in meters. */ + +#endif /* _TIFF_ */ diff --git a/vcpkg/installed/x64-osx/include/tiffconf.h b/vcpkg/installed/x64-osx/include/tiffconf.h new file mode 100644 index 0000000..97d19e1 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/tiffconf.h @@ -0,0 +1,144 @@ +/* + Configuration defines for installed libtiff. + This file maintained for backward compatibility. Do not use definitions + from this file in your programs. +*/ + +/* clang-format off */ +/* clang-format disabled because CMake scripts are very sensitive to the + * formatting of this file. configure_file variables of type "" are + * modified by clang-format and won't be substituted. + */ + +#ifndef _TIFFCONF_ +#define _TIFFCONF_ + + +#include +#include +#include + + +/* Signed 16-bit type */ +#define TIFF_INT16_T int16_t + +/* Signed 32-bit type */ +#define TIFF_INT32_T int32_t + +/* Signed 64-bit type */ +#define TIFF_INT64_T int64_t + +/* Signed 8-bit type */ +#define TIFF_INT8_T int8_t + +/* Unsigned 16-bit type */ +#define TIFF_UINT16_T uint16_t + +/* Unsigned 32-bit type */ +#define TIFF_UINT32_T uint32_t + +/* Unsigned 64-bit type */ +#define TIFF_UINT64_T uint64_t + +/* Unsigned 8-bit type */ +#define TIFF_UINT8_T uint8_t + +/* Signed size type */ +#define TIFF_SSIZE_T int64_t + +/* Compatibility stuff. */ + +/* Define as 0 or 1 according to the floating point format supported by the + machine */ +#define HAVE_IEEEFP 1 + +/* The concept of HOST_FILLORDER is broken. Since libtiff 4.5.1 + * this macro will always be hardcoded to FILLORDER_LSB2MSB on all + * architectures, to reflect past long behavior of doing so on x86 architecture. + * Note however that the default FillOrder used by libtiff is FILLORDER_MSB2LSB, + * as mandated per the TIFF specification. + * The influence of HOST_FILLORDER is only when passing the 'H' mode in + * TIFFOpen(). + * You should NOT rely on this macro to decide the CPU endianness! + * This macro will be removed in libtiff 4.6 + */ +#define HOST_FILLORDER FILLORDER_LSB2MSB + +/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian + (Intel) */ +#define HOST_BIGENDIAN 0 + +/* Support CCITT Group 3 & 4 algorithms */ +#define CCITT_SUPPORT 1 + +/* Support JPEG compression (requires IJG JPEG library) */ +#define JPEG_SUPPORT 1 + +/* Support JBIG compression (requires JBIG-KIT library) */ +/* #undef JBIG_SUPPORT */ + +/* Support LERC compression */ +/* #undef LERC_SUPPORT */ + +/* Support LogLuv high dynamic range encoding */ +#define LOGLUV_SUPPORT 1 + +/* Support LZW algorithm */ +#define LZW_SUPPORT 1 + +/* Support NeXT 2-bit RLE algorithm */ +#define NEXT_SUPPORT 1 + +/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation + fails with unpatched IJG JPEG library) */ +#define OJPEG_SUPPORT 1 + +/* Support Macintosh PackBits algorithm */ +#define PACKBITS_SUPPORT 1 + +/* Support Pixar log-format algorithm (requires Zlib) */ +#define PIXARLOG_SUPPORT 1 + +/* Support ThunderScan 4-bit RLE algorithm */ +#define THUNDER_SUPPORT 1 + +/* Support Deflate compression */ +#define ZIP_SUPPORT 1 + +/* Support libdeflate enhanced compression */ +/* #undef LIBDEFLATE_SUPPORT */ + +/* Support strip chopping (whether or not to convert single-strip uncompressed + images to multiple strips of ~8Kb to reduce memory usage) */ +#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP + +/* Enable SubIFD tag (330) support */ +#define SUBIFD_SUPPORT 1 + +/* Treat extra sample as alpha (default enabled). The RGBA interface will + treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many + packages produce RGBA files but don't mark the alpha properly. */ +#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1 + +/* Pick up YCbCr subsampling info from the JPEG data stream to support files + lacking the tag (default enabled). */ +#define CHECK_JPEG_YCBCR_SUBSAMPLING 1 + +/* Support MS MDI magic number files as TIFF */ +#define MDI_SUPPORT 1 + +/* + * Feature support definitions. + * XXX: These macros are obsoleted. Don't use them in your apps! + * Macros stays here for backward compatibility and should be always defined. + */ +#define COLORIMETRY_SUPPORT +#define YCBCR_SUPPORT +#define CMYK_SUPPORT +#define ICC_SUPPORT +#define PHOTOSHOP_SUPPORT +#define IPTC_SUPPORT + +#endif /* _TIFFCONF_ */ + +/* clang-format on */ diff --git a/vcpkg/installed/x64-osx/include/tiffio.h b/vcpkg/installed/x64-osx/include/tiffio.h new file mode 100644 index 0000000..2046054 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/tiffio.h @@ -0,0 +1,653 @@ +/* + * Copyright (c) 1988-1997 Sam Leffler + * Copyright (c) 1991-1997 Silicon Graphics, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that (i) the above copyright notices and this permission notice appear in + * all copies of the software and related documentation, and (ii) the names of + * Sam Leffler and Silicon Graphics may not be used in any advertising or + * publicity relating to the software without the specific, prior written + * permission of Sam Leffler and Silicon Graphics. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR + * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#ifndef _TIFFIO_ +#define _TIFFIO_ + +/* + * TIFF I/O Library Definitions. + */ +#include "tiff.h" +#include "tiffvers.h" + +/* + * TIFF is defined as an incomplete type to hide the + * library's internal data structures from clients. + */ +typedef struct tiff TIFF; + +/* + * The following typedefs define the intrinsic size of + * data types used in the *exported* interfaces. These + * definitions depend on the proper definition of types + * in tiff.h. Note also that the varargs interface used + * to pass tag types and values uses the types defined in + * tiff.h directly. + * + * NB: ttag_t is unsigned int and not unsigned short because + * ANSI C requires that the type before the ellipsis be a + * promoted type (i.e. one of int, unsigned int, pointer, + * or double) and because we defined pseudo-tags that are + * outside the range of legal Aldus-assigned tags. + * NB: tsize_t is signed and not unsigned because some functions + * return -1. + * NB: toff_t is not off_t for many reasons; TIFFs max out at + * 32-bit file offsets, and BigTIFF maxes out at 64-bit + * offsets being the most important, and to ensure use of + * a consistently unsigned type across architectures. + * Prior to libtiff 4.0, this was an unsigned 32 bit type. + */ +/* + * this is the machine addressing size type, only it's signed, so make it + * int32_t on 32bit machines, int64_t on 64bit machines + */ +typedef TIFF_SSIZE_T tmsize_t; +#define TIFF_TMSIZE_T_MAX (tmsize_t)(SIZE_MAX >> 1) + +typedef uint64_t toff_t; /* file offset */ +/* the following are deprecated and should be replaced by their defining + counterparts */ +typedef uint32_t ttag_t; /* directory tag */ +typedef uint32_t tdir_t; /* directory index */ +typedef uint16_t tsample_t; /* sample number */ +typedef uint32_t tstrile_t; /* strip or tile number */ +typedef tstrile_t tstrip_t; /* strip number */ +typedef tstrile_t ttile_t; /* tile number */ +typedef tmsize_t tsize_t; /* i/o size in bytes */ +typedef void *tdata_t; /* image data ref */ + +#if !defined(__WIN32__) && (defined(_WIN32) || defined(WIN32)) +#define __WIN32__ +#endif + +/* + * On windows you should define USE_WIN32_FILEIO if you are using tif_win32.c + * or AVOID_WIN32_FILEIO if you are using something else (like tif_unix.c). + * + * By default tif_unix.c is assumed. + */ + +#if defined(_WINDOWS) || defined(__WIN32__) || defined(_Windows) +#if !defined(__CYGWIN) && !defined(AVOID_WIN32_FILEIO) && \ + !defined(USE_WIN32_FILEIO) +#define AVOID_WIN32_FILEIO +#endif +#endif + +#if defined(USE_WIN32_FILEIO) +#define VC_EXTRALEAN +#include +#ifdef __WIN32__ +DECLARE_HANDLE(thandle_t); /* Win32 file handle */ +#else +typedef HFILE thandle_t; /* client data handle */ +#endif /* __WIN32__ */ +#else +typedef void *thandle_t; /* client data handle */ +#endif /* USE_WIN32_FILEIO */ + +/* + * Flags to pass to TIFFPrintDirectory to control + * printing of data structures that are potentially + * very large. Bit-or these flags to enable printing + * multiple items. + */ +#define TIFFPRINT_NONE 0x0 /* no extra info */ +#define TIFFPRINT_STRIPS 0x1 /* strips/tiles info */ +#define TIFFPRINT_CURVES 0x2 /* color/gray response curves */ +#define TIFFPRINT_COLORMAP 0x4 /* colormap */ +#define TIFFPRINT_JPEGQTABLES 0x100 /* JPEG Q matrices */ +#define TIFFPRINT_JPEGACTABLES 0x200 /* JPEG AC tables */ +#define TIFFPRINT_JPEGDCTABLES 0x200 /* JPEG DC tables */ + +/* + * Colour conversion stuff + */ + +/* reference white */ +#define D65_X0 (95.0470F) +#define D65_Y0 (100.0F) +#define D65_Z0 (108.8827F) + +#define D50_X0 (96.4250F) +#define D50_Y0 (100.0F) +#define D50_Z0 (82.4680F) + +/* Structure for holding information about a display device. */ + +typedef unsigned char TIFFRGBValue; /* 8-bit samples */ + +typedef struct +{ + float d_mat[3][3]; /* XYZ -> luminance matrix */ + float d_YCR; /* Light o/p for reference white */ + float d_YCG; + float d_YCB; + uint32_t d_Vrwr; /* Pixel values for ref. white */ + uint32_t d_Vrwg; + uint32_t d_Vrwb; + float d_Y0R; /* Residual light for black pixel */ + float d_Y0G; + float d_Y0B; + float d_gammaR; /* Gamma values for the three guns */ + float d_gammaG; + float d_gammaB; +} TIFFDisplay; + +typedef struct +{ /* YCbCr->RGB support */ + TIFFRGBValue *clamptab; /* range clamping table */ + int *Cr_r_tab; + int *Cb_b_tab; + int32_t *Cr_g_tab; + int32_t *Cb_g_tab; + int32_t *Y_tab; +} TIFFYCbCrToRGB; + +typedef struct +{ /* CIE Lab 1976->RGB support */ + int range; /* Size of conversion table */ +#define CIELABTORGB_TABLE_RANGE 1500 + float rstep, gstep, bstep; + float X0, Y0, Z0; /* Reference white point */ + TIFFDisplay display; + float Yr2r[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yr to r */ + float Yg2g[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yg to g */ + float Yb2b[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yb to b */ +} TIFFCIELabToRGB; + +/* + * RGBA-style image support. + */ +typedef struct _TIFFRGBAImage TIFFRGBAImage; +/* + * The image reading and conversion routines invoke + * ``put routines'' to copy/image/whatever tiles of + * raw image data. A default set of routines are + * provided to convert/copy raw image data to 8-bit + * packed ABGR format rasters. Applications can supply + * alternate routines that unpack the data into a + * different format or, for example, unpack the data + * and draw the unpacked raster on the display. + */ +typedef void (*tileContigRoutine)(TIFFRGBAImage *, uint32_t *, uint32_t, + uint32_t, uint32_t, uint32_t, int32_t, + int32_t, unsigned char *); +typedef void (*tileSeparateRoutine)(TIFFRGBAImage *, uint32_t *, uint32_t, + uint32_t, uint32_t, uint32_t, int32_t, + int32_t, unsigned char *, unsigned char *, + unsigned char *, unsigned char *); +/* + * RGBA-reader state. + */ +struct _TIFFRGBAImage +{ + TIFF *tif; /* image handle */ + int stoponerr; /* stop on read error */ + int isContig; /* data is packed/separate */ + int alpha; /* type of alpha data present */ + uint32_t width; /* image width */ + uint32_t height; /* image height */ + uint16_t bitspersample; /* image bits/sample */ + uint16_t samplesperpixel; /* image samples/pixel */ + uint16_t orientation; /* image orientation */ + uint16_t req_orientation; /* requested orientation */ + uint16_t photometric; /* image photometric interp */ + uint16_t *redcmap; /* colormap palette */ + uint16_t *greencmap; + uint16_t *bluecmap; + /* get image data routine */ + int (*get)(TIFFRGBAImage *, uint32_t *, uint32_t, uint32_t); + /* put decoded strip/tile */ + union + { + void (*any)(TIFFRGBAImage *); + tileContigRoutine contig; + tileSeparateRoutine separate; + } put; + TIFFRGBValue *Map; /* sample mapping array */ + uint32_t **BWmap; /* black&white map */ + uint32_t **PALmap; /* palette image map */ + TIFFYCbCrToRGB *ycbcr; /* YCbCr conversion state */ + TIFFCIELabToRGB *cielab; /* CIE L*a*b conversion state */ + + uint8_t *UaToAa; /* Unassociated alpha to associated alpha conversion LUT */ + uint8_t *Bitdepth16To8; /* LUT for conversion from 16bit to 8bit values */ + + int row_offset; + int col_offset; +}; + +/* + * Macros for extracting components from the + * packed ABGR form returned by TIFFReadRGBAImage. + */ +#define TIFFGetR(abgr) ((abgr)&0xff) +#define TIFFGetG(abgr) (((abgr) >> 8) & 0xff) +#define TIFFGetB(abgr) (((abgr) >> 16) & 0xff) +#define TIFFGetA(abgr) (((abgr) >> 24) & 0xff) + +/* + * A CODEC is a software package that implements decoding, + * encoding, or decoding+encoding of a compression algorithm. + * The library provides a collection of builtin codecs. + * More codecs may be registered through calls to the library + * and/or the builtin implementations may be overridden. + */ +typedef int (*TIFFInitMethod)(TIFF *, int); +typedef struct +{ + char *name; + uint16_t scheme; + TIFFInitMethod init; +} TIFFCodec; + +typedef struct +{ + uint32_t uNum; + uint32_t uDenom; +} TIFFRational_t; + +#include +#include + +/* share internal LogLuv conversion routines? */ +#ifndef LOGLUV_PUBLIC +#define LOGLUV_PUBLIC 1 +#endif + +#if defined(__GNUC__) || defined(__clang__) || defined(__attribute__) +#define TIFF_ATTRIBUTE(x) __attribute__(x) +#else +#define TIFF_ATTRIBUTE(x) /*nothing*/ +#endif + +#if defined(c_plusplus) || defined(__cplusplus) +extern "C" +{ +#endif + typedef void (*TIFFErrorHandler)(const char *, const char *, va_list); + typedef void (*TIFFErrorHandlerExt)(thandle_t, const char *, const char *, + va_list); + typedef int (*TIFFErrorHandlerExtR)(TIFF *, void *user_data, const char *, + const char *, va_list); + typedef tmsize_t (*TIFFReadWriteProc)(thandle_t, void *, tmsize_t); + typedef toff_t (*TIFFSeekProc)(thandle_t, toff_t, int); + typedef int (*TIFFCloseProc)(thandle_t); + typedef toff_t (*TIFFSizeProc)(thandle_t); + typedef int (*TIFFMapFileProc)(thandle_t, void **base, toff_t *size); + typedef void (*TIFFUnmapFileProc)(thandle_t, void *base, toff_t size); + typedef void (*TIFFExtendProc)(TIFF *); + + extern const char *TIFFGetVersion(void); + + extern const TIFFCodec *TIFFFindCODEC(uint16_t); + extern TIFFCodec *TIFFRegisterCODEC(uint16_t, const char *, TIFFInitMethod); + extern void TIFFUnRegisterCODEC(TIFFCodec *); + extern int TIFFIsCODECConfigured(uint16_t); + extern TIFFCodec *TIFFGetConfiguredCODECs(void); + + /* + * Auxiliary functions. + */ + + extern void *_TIFFmalloc(tmsize_t s); + extern void *_TIFFcalloc(tmsize_t nmemb, tmsize_t siz); + extern void *_TIFFrealloc(void *p, tmsize_t s); + extern void _TIFFmemset(void *p, int v, tmsize_t c); + extern void _TIFFmemcpy(void *d, const void *s, tmsize_t c); + extern int _TIFFmemcmp(const void *p1, const void *p2, tmsize_t c); + extern void _TIFFfree(void *p); + + /* + ** Stuff, related to tag handling and creating custom tags. + */ + extern int TIFFGetTagListCount(TIFF *); + extern uint32_t TIFFGetTagListEntry(TIFF *, int tag_index); + +#define TIFF_ANY TIFF_NOTYPE /* for field descriptor searching */ +#define TIFF_VARIABLE -1 /* marker for variable length tags */ +#define TIFF_SPP -2 /* marker for SamplesPerPixel tags */ +#define TIFF_VARIABLE2 -3 /* marker for uint32_t var-length tags */ + +#define FIELD_CUSTOM 65 + + typedef struct _TIFFField TIFFField; + typedef struct _TIFFFieldArray TIFFFieldArray; + + extern const TIFFField *TIFFFindField(TIFF *, uint32_t, TIFFDataType); + extern const TIFFField *TIFFFieldWithTag(TIFF *, uint32_t); + extern const TIFFField *TIFFFieldWithName(TIFF *, const char *); + + extern uint32_t TIFFFieldTag(const TIFFField *); + extern const char *TIFFFieldName(const TIFFField *); + extern TIFFDataType TIFFFieldDataType(const TIFFField *); + extern int TIFFFieldPassCount(const TIFFField *); + extern int TIFFFieldReadCount(const TIFFField *); + extern int TIFFFieldWriteCount(const TIFFField *); + extern int + TIFFFieldSetGetSize(const TIFFField *); /* returns internal storage size of + TIFFSetGetFieldType in bytes. */ + extern int TIFFFieldSetGetCountSize( + const TIFFField *); /* returns size of count parameter 0=none, + 2=uint16_t, 4=uint32_t */ + extern int TIFFFieldIsAnonymous(const TIFFField *); + + typedef int (*TIFFVSetMethod)(TIFF *, uint32_t, va_list); + typedef int (*TIFFVGetMethod)(TIFF *, uint32_t, va_list); + typedef void (*TIFFPrintMethod)(TIFF *, FILE *, long); + + typedef struct + { + TIFFVSetMethod vsetfield; /* tag set routine */ + TIFFVGetMethod vgetfield; /* tag get routine */ + TIFFPrintMethod printdir; /* directory print routine */ + } TIFFTagMethods; + + extern TIFFTagMethods *TIFFAccessTagMethods(TIFF *); + extern void *TIFFGetClientInfo(TIFF *, const char *); + extern void TIFFSetClientInfo(TIFF *, void *, const char *); + + extern void TIFFCleanup(TIFF *tif); + extern void TIFFClose(TIFF *tif); + extern int TIFFFlush(TIFF *tif); + extern int TIFFFlushData(TIFF *tif); + extern int TIFFGetField(TIFF *tif, uint32_t tag, ...); + extern int TIFFVGetField(TIFF *tif, uint32_t tag, va_list ap); + extern int TIFFGetFieldDefaulted(TIFF *tif, uint32_t tag, ...); + extern int TIFFVGetFieldDefaulted(TIFF *tif, uint32_t tag, va_list ap); + extern int TIFFReadDirectory(TIFF *tif); + extern int TIFFReadCustomDirectory(TIFF *tif, toff_t diroff, + const TIFFFieldArray *infoarray); + extern int TIFFReadEXIFDirectory(TIFF *tif, toff_t diroff); + extern int TIFFReadGPSDirectory(TIFF *tif, toff_t diroff); + extern uint64_t TIFFScanlineSize64(TIFF *tif); + extern tmsize_t TIFFScanlineSize(TIFF *tif); + extern uint64_t TIFFRasterScanlineSize64(TIFF *tif); + extern tmsize_t TIFFRasterScanlineSize(TIFF *tif); + extern uint64_t TIFFStripSize64(TIFF *tif); + extern tmsize_t TIFFStripSize(TIFF *tif); + extern uint64_t TIFFRawStripSize64(TIFF *tif, uint32_t strip); + extern tmsize_t TIFFRawStripSize(TIFF *tif, uint32_t strip); + extern uint64_t TIFFVStripSize64(TIFF *tif, uint32_t nrows); + extern tmsize_t TIFFVStripSize(TIFF *tif, uint32_t nrows); + extern uint64_t TIFFTileRowSize64(TIFF *tif); + extern tmsize_t TIFFTileRowSize(TIFF *tif); + extern uint64_t TIFFTileSize64(TIFF *tif); + extern tmsize_t TIFFTileSize(TIFF *tif); + extern uint64_t TIFFVTileSize64(TIFF *tif, uint32_t nrows); + extern tmsize_t TIFFVTileSize(TIFF *tif, uint32_t nrows); + extern uint32_t TIFFDefaultStripSize(TIFF *tif, uint32_t request); + extern void TIFFDefaultTileSize(TIFF *, uint32_t *, uint32_t *); + extern int TIFFFileno(TIFF *); + extern int TIFFSetFileno(TIFF *, int); + extern thandle_t TIFFClientdata(TIFF *); + extern thandle_t TIFFSetClientdata(TIFF *, thandle_t); + extern int TIFFGetMode(TIFF *); + extern int TIFFSetMode(TIFF *, int); + extern int TIFFIsTiled(TIFF *); + extern int TIFFIsByteSwapped(TIFF *); + extern int TIFFIsUpSampled(TIFF *); + extern int TIFFIsMSB2LSB(TIFF *); + extern int TIFFIsBigEndian(TIFF *); + extern int TIFFIsBigTIFF(TIFF *); + extern TIFFReadWriteProc TIFFGetReadProc(TIFF *); + extern TIFFReadWriteProc TIFFGetWriteProc(TIFF *); + extern TIFFSeekProc TIFFGetSeekProc(TIFF *); + extern TIFFCloseProc TIFFGetCloseProc(TIFF *); + extern TIFFSizeProc TIFFGetSizeProc(TIFF *); + extern TIFFMapFileProc TIFFGetMapFileProc(TIFF *); + extern TIFFUnmapFileProc TIFFGetUnmapFileProc(TIFF *); + extern uint32_t TIFFCurrentRow(TIFF *); + extern tdir_t TIFFCurrentDirectory(TIFF *); + extern tdir_t TIFFNumberOfDirectories(TIFF *); + extern uint64_t TIFFCurrentDirOffset(TIFF *); + extern uint32_t TIFFCurrentStrip(TIFF *); + extern uint32_t TIFFCurrentTile(TIFF *tif); + extern int TIFFReadBufferSetup(TIFF *tif, void *bp, tmsize_t size); + extern int TIFFWriteBufferSetup(TIFF *tif, void *bp, tmsize_t size); + extern int TIFFSetupStrips(TIFF *); + extern int TIFFWriteCheck(TIFF *, int, const char *); + extern void TIFFFreeDirectory(TIFF *); + extern int TIFFCreateDirectory(TIFF *); + extern int TIFFCreateCustomDirectory(TIFF *, const TIFFFieldArray *); + extern int TIFFCreateEXIFDirectory(TIFF *); + extern int TIFFCreateGPSDirectory(TIFF *); + extern int TIFFLastDirectory(TIFF *); + extern int TIFFSetDirectory(TIFF *, tdir_t); + extern int TIFFSetSubDirectory(TIFF *, uint64_t); + extern int TIFFUnlinkDirectory(TIFF *, tdir_t); + extern int TIFFSetField(TIFF *, uint32_t, ...); + extern int TIFFVSetField(TIFF *, uint32_t, va_list); + extern int TIFFUnsetField(TIFF *, uint32_t); + extern int TIFFWriteDirectory(TIFF *); + extern int TIFFWriteCustomDirectory(TIFF *, uint64_t *); + extern int TIFFCheckpointDirectory(TIFF *); + extern int TIFFRewriteDirectory(TIFF *); + extern int TIFFDeferStrileArrayWriting(TIFF *); + extern int TIFFForceStrileArrayWriting(TIFF *); + +#if defined(c_plusplus) || defined(__cplusplus) + extern void TIFFPrintDirectory(TIFF *, FILE *, long = 0); + extern int TIFFReadScanline(TIFF *tif, void *buf, uint32_t row, + uint16_t sample = 0); + extern int TIFFWriteScanline(TIFF *tif, void *buf, uint32_t row, + uint16_t sample = 0); + extern int TIFFReadRGBAImage(TIFF *, uint32_t, uint32_t, uint32_t *, + int = 0); + extern int TIFFReadRGBAImageOriented(TIFF *, uint32_t, uint32_t, uint32_t *, + int = ORIENTATION_BOTLEFT, int = 0); +#else +extern void TIFFPrintDirectory(TIFF *, FILE *, long); +extern int TIFFReadScanline(TIFF *tif, void *buf, uint32_t row, + uint16_t sample); +extern int TIFFWriteScanline(TIFF *tif, void *buf, uint32_t row, + uint16_t sample); +extern int TIFFReadRGBAImage(TIFF *, uint32_t, uint32_t, uint32_t *, int); +extern int TIFFReadRGBAImageOriented(TIFF *, uint32_t, uint32_t, uint32_t *, + int, int); +#endif + + extern int TIFFReadRGBAStrip(TIFF *, uint32_t, uint32_t *); + extern int TIFFReadRGBATile(TIFF *, uint32_t, uint32_t, uint32_t *); + extern int TIFFReadRGBAStripExt(TIFF *, uint32_t, uint32_t *, + int stop_on_error); + extern int TIFFReadRGBATileExt(TIFF *, uint32_t, uint32_t, uint32_t *, + int stop_on_error); + extern int TIFFRGBAImageOK(TIFF *, char[1024]); + extern int TIFFRGBAImageBegin(TIFFRGBAImage *, TIFF *, int, char[1024]); + extern int TIFFRGBAImageGet(TIFFRGBAImage *, uint32_t *, uint32_t, + uint32_t); + extern void TIFFRGBAImageEnd(TIFFRGBAImage *); + + extern const char *TIFFFileName(TIFF *); + extern const char *TIFFSetFileName(TIFF *, const char *); + extern void TIFFError(const char *, const char *, ...) + TIFF_ATTRIBUTE((__format__(__printf__, 2, 3))); + extern void TIFFErrorExt(thandle_t, const char *, const char *, ...) + TIFF_ATTRIBUTE((__format__(__printf__, 3, 4))); + extern void TIFFWarning(const char *, const char *, ...) + TIFF_ATTRIBUTE((__format__(__printf__, 2, 3))); + extern void TIFFWarningExt(thandle_t, const char *, const char *, ...) + TIFF_ATTRIBUTE((__format__(__printf__, 3, 4))); + extern TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler); + extern TIFFErrorHandlerExt TIFFSetErrorHandlerExt(TIFFErrorHandlerExt); + extern TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler); + extern TIFFErrorHandlerExt TIFFSetWarningHandlerExt(TIFFErrorHandlerExt); + + extern void TIFFWarningExtR(TIFF *, const char *, const char *, ...) + TIFF_ATTRIBUTE((__format__(__printf__, 3, 4))); + extern void TIFFErrorExtR(TIFF *, const char *, const char *, ...) + TIFF_ATTRIBUTE((__format__(__printf__, 3, 4))); + + typedef struct TIFFOpenOptions TIFFOpenOptions; + extern TIFFOpenOptions *TIFFOpenOptionsAlloc(void); + extern void TIFFOpenOptionsFree(TIFFOpenOptions *); + extern void + TIFFOpenOptionsSetMaxSingleMemAlloc(TIFFOpenOptions *opts, + tmsize_t max_single_mem_alloc); + extern void + TIFFOpenOptionsSetErrorHandlerExtR(TIFFOpenOptions *opts, + TIFFErrorHandlerExtR handler, + void *errorhandler_user_data); + extern void + TIFFOpenOptionsSetWarningHandlerExtR(TIFFOpenOptions *opts, + TIFFErrorHandlerExtR handler, + void *warnhandler_user_data); + + extern TIFF *TIFFOpen(const char *, const char *); + extern TIFF *TIFFOpenExt(const char *, const char *, TIFFOpenOptions *opts); +#ifdef __WIN32__ + extern TIFF *TIFFOpenW(const wchar_t *, const char *); + extern TIFF *TIFFOpenWExt(const wchar_t *, const char *, + TIFFOpenOptions *opts); +#endif /* __WIN32__ */ + extern TIFF *TIFFFdOpen(int, const char *, const char *); + extern TIFF *TIFFFdOpenExt(int, const char *, const char *, + TIFFOpenOptions *opts); + extern TIFF *TIFFClientOpen(const char *, const char *, thandle_t, + TIFFReadWriteProc, TIFFReadWriteProc, + TIFFSeekProc, TIFFCloseProc, TIFFSizeProc, + TIFFMapFileProc, TIFFUnmapFileProc); + extern TIFF *TIFFClientOpenExt(const char *, const char *, thandle_t, + TIFFReadWriteProc, TIFFReadWriteProc, + TIFFSeekProc, TIFFCloseProc, TIFFSizeProc, + TIFFMapFileProc, TIFFUnmapFileProc, + TIFFOpenOptions *opts); + extern TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc); + extern uint32_t TIFFComputeTile(TIFF *tif, uint32_t x, uint32_t y, + uint32_t z, uint16_t s); + extern int TIFFCheckTile(TIFF *tif, uint32_t x, uint32_t y, uint32_t z, + uint16_t s); + extern uint32_t TIFFNumberOfTiles(TIFF *); + extern tmsize_t TIFFReadTile(TIFF *tif, void *buf, uint32_t x, uint32_t y, + uint32_t z, uint16_t s); + extern tmsize_t TIFFWriteTile(TIFF *tif, void *buf, uint32_t x, uint32_t y, + uint32_t z, uint16_t s); + extern uint32_t TIFFComputeStrip(TIFF *, uint32_t, uint16_t); + extern uint32_t TIFFNumberOfStrips(TIFF *); + extern tmsize_t TIFFReadEncodedStrip(TIFF *tif, uint32_t strip, void *buf, + tmsize_t size); + extern tmsize_t TIFFReadRawStrip(TIFF *tif, uint32_t strip, void *buf, + tmsize_t size); + extern tmsize_t TIFFReadEncodedTile(TIFF *tif, uint32_t tile, void *buf, + tmsize_t size); + extern tmsize_t TIFFReadRawTile(TIFF *tif, uint32_t tile, void *buf, + tmsize_t size); + extern int TIFFReadFromUserBuffer(TIFF *tif, uint32_t strile, void *inbuf, + tmsize_t insize, void *outbuf, + tmsize_t outsize); + extern tmsize_t TIFFWriteEncodedStrip(TIFF *tif, uint32_t strip, void *data, + tmsize_t cc); + extern tmsize_t TIFFWriteRawStrip(TIFF *tif, uint32_t strip, void *data, + tmsize_t cc); + extern tmsize_t TIFFWriteEncodedTile(TIFF *tif, uint32_t tile, void *data, + tmsize_t cc); + extern tmsize_t TIFFWriteRawTile(TIFF *tif, uint32_t tile, void *data, + tmsize_t cc); + extern int TIFFDataWidth( + TIFFDataType); /* table of tag datatype widths within TIFF file. */ + extern void TIFFSetWriteOffset(TIFF *tif, toff_t off); + extern void TIFFSwabShort(uint16_t *); + extern void TIFFSwabLong(uint32_t *); + extern void TIFFSwabLong8(uint64_t *); + extern void TIFFSwabFloat(float *); + extern void TIFFSwabDouble(double *); + extern void TIFFSwabArrayOfShort(uint16_t *wp, tmsize_t n); + extern void TIFFSwabArrayOfTriples(uint8_t *tp, tmsize_t n); + extern void TIFFSwabArrayOfLong(uint32_t *lp, tmsize_t n); + extern void TIFFSwabArrayOfLong8(uint64_t *lp, tmsize_t n); + extern void TIFFSwabArrayOfFloat(float *fp, tmsize_t n); + extern void TIFFSwabArrayOfDouble(double *dp, tmsize_t n); + extern void TIFFReverseBits(uint8_t *cp, tmsize_t n); + extern const unsigned char *TIFFGetBitRevTable(int); + + extern uint64_t TIFFGetStrileOffset(TIFF *tif, uint32_t strile); + extern uint64_t TIFFGetStrileByteCount(TIFF *tif, uint32_t strile); + extern uint64_t TIFFGetStrileOffsetWithErr(TIFF *tif, uint32_t strile, + int *pbErr); + extern uint64_t TIFFGetStrileByteCountWithErr(TIFF *tif, uint32_t strile, + int *pbErr); + +#ifdef LOGLUV_PUBLIC +#define U_NEU 0.210526316 +#define V_NEU 0.473684211 +#define UVSCALE 410. + extern double LogL16toY(int); + extern double LogL10toY(int); + extern void XYZtoRGB24(float *, uint8_t *); + extern int uv_decode(double *, double *, int); + extern void LogLuv24toXYZ(uint32_t, float *); + extern void LogLuv32toXYZ(uint32_t, float *); +#if defined(c_plusplus) || defined(__cplusplus) + extern int LogL16fromY(double, int = SGILOGENCODE_NODITHER); + extern int LogL10fromY(double, int = SGILOGENCODE_NODITHER); + extern int uv_encode(double, double, int = SGILOGENCODE_NODITHER); + extern uint32_t LogLuv24fromXYZ(float *, int = SGILOGENCODE_NODITHER); + extern uint32_t LogLuv32fromXYZ(float *, int = SGILOGENCODE_NODITHER); +#else + extern int LogL16fromY(double, int); + extern int LogL10fromY(double, int); + extern int uv_encode(double, double, int); + extern uint32_t LogLuv24fromXYZ(float *, int); + extern uint32_t LogLuv32fromXYZ(float *, int); +#endif +#endif /* LOGLUV_PUBLIC */ + + extern int TIFFCIELabToRGBInit(TIFFCIELabToRGB *, const TIFFDisplay *, + float *); + extern void TIFFCIELabToXYZ(TIFFCIELabToRGB *, uint32_t, int32_t, int32_t, + float *, float *, float *); + extern void TIFFXYZToRGB(TIFFCIELabToRGB *, float, float, float, uint32_t *, + uint32_t *, uint32_t *); + + extern int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB *, float *, float *); + extern void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *, uint32_t, int32_t, int32_t, + uint32_t *, uint32_t *, uint32_t *); + + /**************************************************************************** + * O B S O L E T E D I N T E R F A C E S + * + * Don't use this stuff in your applications, it may be removed in the + *future libtiff versions. + ****************************************************************************/ + typedef struct + { + ttag_t field_tag; /* field's tag */ + short field_readcount; /* read count/TIFF_VARIABLE/TIFF_SPP */ + short field_writecount; /* write count/TIFF_VARIABLE */ + TIFFDataType field_type; /* type of associated data */ + unsigned short field_bit; /* bit in fieldsset bit vector */ + unsigned char field_oktochange; /* if true, can change while writing */ + unsigned char field_passcount; /* if true, pass dir count on set */ + char *field_name; /* ASCII name */ + } TIFFFieldInfo; + + extern int TIFFMergeFieldInfo(TIFF *, const TIFFFieldInfo[], uint32_t); + +#if defined(c_plusplus) || defined(__cplusplus) +} +#endif + +#endif /* _TIFFIO_ */ diff --git a/vcpkg/installed/x64-osx/include/tiffvers.h b/vcpkg/installed/x64-osx/include/tiffvers.h new file mode 100644 index 0000000..4630580 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/tiffvers.h @@ -0,0 +1,36 @@ +/* tiffvers.h version information is updated according to version information + * in configure.ac */ + +/* clang-format off */ + +/* clang-format disabled because FindTIFF.cmake is very sensitive to the + * formatting of below line being a single line. + * Furthermore, configure_file variables of type "" are + * modified by clang-format and won't be substituted by CMake. + */ +#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.6.0\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc." +/* + * This define can be used in code that requires + * compilation-related definitions specific to a + * version or versions of the library. Runtime + * version checking should be done based on the + * string returned by TIFFGetVersion. + */ +#define TIFFLIB_VERSION 20230908 + +/* The following defines have been added in 4.5.0 */ +#define TIFFLIB_MAJOR_VERSION 4 +#define TIFFLIB_MINOR_VERSION 6 +#define TIFFLIB_MICRO_VERSION 0 +#define TIFFLIB_VERSION_STR_MAJ_MIN_MIC "4.6.0" + +/* Macro added in 4.5.0. Returns TRUE if the current libtiff version is + * greater or equal to major.minor.micro + */ +#define TIFFLIB_AT_LEAST(major, minor, micro) \ + (TIFFLIB_MAJOR_VERSION > (major) || \ + (TIFFLIB_MAJOR_VERSION == (major) && TIFFLIB_MINOR_VERSION > (minor)) || \ + (TIFFLIB_MAJOR_VERSION == (major) && TIFFLIB_MINOR_VERSION == (minor) && \ + TIFFLIB_MICRO_VERSION >= (micro))) + +/* clang-format on */ diff --git a/vcpkg/installed/x64-osx/include/turbojpeg.h b/vcpkg/installed/x64-osx/include/turbojpeg.h new file mode 100644 index 0000000..68b88a4 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/turbojpeg.h @@ -0,0 +1,2328 @@ +/* + * Copyright (C)2009-2015, 2017, 2020-2023 D. R. Commander. + * All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of the libjpeg-turbo Project nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __TURBOJPEG_H__ +#define __TURBOJPEG_H__ + +#include + +#if defined(_WIN32) && defined(DLLDEFINE) +#define DLLEXPORT __declspec(dllexport) +#else +#define DLLEXPORT +#endif +#define DLLCALL + + +/** + * @addtogroup TurboJPEG + * TurboJPEG API. This API provides an interface for generating, decoding, and + * transforming planar YUV and JPEG images in memory. + * + * @anchor YUVnotes + * YUV Image Format Notes + * ---------------------- + * Technically, the JPEG format uses the YCbCr colorspace (which is technically + * not a colorspace but a color transform), but per the convention of the + * digital video community, the TurboJPEG API uses "YUV" to refer to an image + * format consisting of Y, Cb, and Cr image planes. + * + * Each plane is simply a 2D array of bytes, each byte representing the value + * of one of the components (Y, Cb, or Cr) at a particular location in the + * image. The width and height of each plane are determined by the image + * width, height, and level of chrominance subsampling. The luminance plane + * width is the image width padded to the nearest multiple of the horizontal + * subsampling factor (1 in the case of 4:4:4, grayscale, 4:4:0, or 4:4:1; 2 in + * the case of 4:2:2 or 4:2:0; 4 in the case of 4:1:1.) Similarly, the + * luminance plane height is the image height padded to the nearest multiple of + * the vertical subsampling factor (1 in the case of 4:4:4, 4:2:2, grayscale, + * or 4:1:1; 2 in the case of 4:2:0 or 4:4:0; 4 in the case of 4:4:1.) This is + * irrespective of any additional padding that may be specified as an argument + * to the various YUV functions. The chrominance plane width is equal to the + * luminance plane width divided by the horizontal subsampling factor, and the + * chrominance plane height is equal to the luminance plane height divided by + * the vertical subsampling factor. + * + * For example, if the source image is 35 x 35 pixels and 4:2:2 subsampling is + * used, then the luminance plane would be 36 x 35 bytes, and each of the + * chrominance planes would be 18 x 35 bytes. If you specify a row alignment + * of 4 bytes on top of this, then the luminance plane would be 36 x 35 bytes, + * and each of the chrominance planes would be 20 x 35 bytes. + * + * @{ + */ + + +/** + * The number of initialization options + */ +#define TJ_NUMINIT 3 + +/** + * Initialization options. + */ +enum TJINIT { + /** + * Initialize the TurboJPEG instance for compression. + */ + TJINIT_COMPRESS, + /** + * Initialize the TurboJPEG instance for decompression. + */ + TJINIT_DECOMPRESS, + /** + * Initialize the TurboJPEG instance for lossless transformation (both + * compression and decompression.) + */ + TJINIT_TRANSFORM +}; + + +/** + * The number of chrominance subsampling options + */ +#define TJ_NUMSAMP 7 + +/** + * Chrominance subsampling options. + * When pixels are converted from RGB to YCbCr (see #TJCS_YCbCr) or from CMYK + * to YCCK (see #TJCS_YCCK) as part of the JPEG compression process, some of + * the Cb and Cr (chrominance) components can be discarded or averaged together + * to produce a smaller image with little perceptible loss of image clarity. + * (The human eye is more sensitive to small changes in brightness than to + * small changes in color.) This is called "chrominance subsampling". + */ +enum TJSAMP { + /** + * 4:4:4 chrominance subsampling (no chrominance subsampling). The JPEG or + * YUV image will contain one chrominance component for every pixel in the + * source image. + */ + TJSAMP_444, + /** + * 4:2:2 chrominance subsampling. The JPEG or YUV image will contain one + * chrominance component for every 2x1 block of pixels in the source image. + */ + TJSAMP_422, + /** + * 4:2:0 chrominance subsampling. The JPEG or YUV image will contain one + * chrominance component for every 2x2 block of pixels in the source image. + */ + TJSAMP_420, + /** + * Grayscale. The JPEG or YUV image will contain no chrominance components. + */ + TJSAMP_GRAY, + /** + * 4:4:0 chrominance subsampling. The JPEG or YUV image will contain one + * chrominance component for every 1x2 block of pixels in the source image. + * + * @note 4:4:0 subsampling is not fully accelerated in libjpeg-turbo. + */ + TJSAMP_440, + /** + * 4:1:1 chrominance subsampling. The JPEG or YUV image will contain one + * chrominance component for every 4x1 block of pixels in the source image. + * JPEG images compressed with 4:1:1 subsampling will be almost exactly the + * same size as those compressed with 4:2:0 subsampling, and in the + * aggregate, both subsampling methods produce approximately the same + * perceptual quality. However, 4:1:1 is better able to reproduce sharp + * horizontal features. + * + * @note 4:1:1 subsampling is not fully accelerated in libjpeg-turbo. + */ + TJSAMP_411, + /** + * 4:4:1 chrominance subsampling. The JPEG or YUV image will contain one + * chrominance component for every 1x4 block of pixels in the source image. + * JPEG images compressed with 4:4:1 subsampling will be almost exactly the + * same size as those compressed with 4:2:0 subsampling, and in the + * aggregate, both subsampling methods produce approximately the same + * perceptual quality. However, 4:4:1 is better able to reproduce sharp + * vertical features. + * + * @note 4:4:1 subsampling is not fully accelerated in libjpeg-turbo. + */ + TJSAMP_441, + /** + * Unknown subsampling. The JPEG image uses an unusual type of chrominance + * subsampling. Such images can be decompressed into packed-pixel images, + * but they cannot be + * - decompressed into planar YUV images, + * - losslessly transformed if #TJXOPT_CROP is specified, or + * - partially decompressed using a cropping region. + */ + TJSAMP_UNKNOWN = -1 +}; + +/** + * MCU block width (in pixels) for a given level of chrominance subsampling. + * MCU block sizes: + * - 8x8 for no subsampling or grayscale + * - 16x8 for 4:2:2 + * - 8x16 for 4:4:0 + * - 16x16 for 4:2:0 + * - 32x8 for 4:1:1 + * - 8x32 for 4:4:1 + */ +static const int tjMCUWidth[TJ_NUMSAMP] = { 8, 16, 16, 8, 8, 32, 8 }; + +/** + * MCU block height (in pixels) for a given level of chrominance subsampling. + * MCU block sizes: + * - 8x8 for no subsampling or grayscale + * - 16x8 for 4:2:2 + * - 8x16 for 4:4:0 + * - 16x16 for 4:2:0 + * - 32x8 for 4:1:1 + * - 8x32 for 4:4:1 + */ +static const int tjMCUHeight[TJ_NUMSAMP] = { 8, 8, 16, 8, 16, 8, 32 }; + + +/** + * The number of pixel formats + */ +#define TJ_NUMPF 12 + +/** + * Pixel formats + */ +enum TJPF { + /** + * RGB pixel format. The red, green, and blue components in the image are + * stored in 3-sample pixels in the order R, G, B from lowest to highest + * memory address within each pixel. + */ + TJPF_RGB, + /** + * BGR pixel format. The red, green, and blue components in the image are + * stored in 3-sample pixels in the order B, G, R from lowest to highest + * memory address within each pixel. + */ + TJPF_BGR, + /** + * RGBX pixel format. The red, green, and blue components in the image are + * stored in 4-sample pixels in the order R, G, B from lowest to highest + * memory address within each pixel. The X component is ignored when + * compressing and undefined when decompressing. + */ + TJPF_RGBX, + /** + * BGRX pixel format. The red, green, and blue components in the image are + * stored in 4-sample pixels in the order B, G, R from lowest to highest + * memory address within each pixel. The X component is ignored when + * compressing and undefined when decompressing. + */ + TJPF_BGRX, + /** + * XBGR pixel format. The red, green, and blue components in the image are + * stored in 4-sample pixels in the order R, G, B from highest to lowest + * memory address within each pixel. The X component is ignored when + * compressing and undefined when decompressing. + */ + TJPF_XBGR, + /** + * XRGB pixel format. The red, green, and blue components in the image are + * stored in 4-sample pixels in the order B, G, R from highest to lowest + * memory address within each pixel. The X component is ignored when + * compressing and undefined when decompressing. + */ + TJPF_XRGB, + /** + * Grayscale pixel format. Each 1-sample pixel represents a luminance + * (brightness) level from 0 to the maximum sample value (255 for 8-bit + * samples, 4095 for 12-bit samples, and 65535 for 16-bit samples.) + */ + TJPF_GRAY, + /** + * RGBA pixel format. This is the same as @ref TJPF_RGBX, except that when + * decompressing, the X component is guaranteed to be equal to the maximum + * sample value, which can be interpreted as an opaque alpha channel. + */ + TJPF_RGBA, + /** + * BGRA pixel format. This is the same as @ref TJPF_BGRX, except that when + * decompressing, the X component is guaranteed to be equal to the maximum + * sample value, which can be interpreted as an opaque alpha channel. + */ + TJPF_BGRA, + /** + * ABGR pixel format. This is the same as @ref TJPF_XBGR, except that when + * decompressing, the X component is guaranteed to be equal to the maximum + * sample value, which can be interpreted as an opaque alpha channel. + */ + TJPF_ABGR, + /** + * ARGB pixel format. This is the same as @ref TJPF_XRGB, except that when + * decompressing, the X component is guaranteed to be equal to the maximum + * sample value, which can be interpreted as an opaque alpha channel. + */ + TJPF_ARGB, + /** + * CMYK pixel format. Unlike RGB, which is an additive color model used + * primarily for display, CMYK (Cyan/Magenta/Yellow/Key) is a subtractive + * color model used primarily for printing. In the CMYK color model, the + * value of each color component typically corresponds to an amount of cyan, + * magenta, yellow, or black ink that is applied to a white background. In + * order to convert between CMYK and RGB, it is necessary to use a color + * management system (CMS.) A CMS will attempt to map colors within the + * printer's gamut to perceptually similar colors in the display's gamut and + * vice versa, but the mapping is typically not 1:1 or reversible, nor can it + * be defined with a simple formula. Thus, such a conversion is out of scope + * for a codec library. However, the TurboJPEG API allows for compressing + * packed-pixel CMYK images into YCCK JPEG images (see #TJCS_YCCK) and + * decompressing YCCK JPEG images into packed-pixel CMYK images. + */ + TJPF_CMYK, + /** + * Unknown pixel format. Currently this is only used by #tj3LoadImage8(), + * #tj3LoadImage12(), and #tj3LoadImage16(). + */ + TJPF_UNKNOWN = -1 +}; + +/** + * Red offset (in samples) for a given pixel format. This specifies the number + * of samples that the red component is offset from the start of the pixel. + * For instance, if an 8-bit-per-component pixel of format TJPF_BGRX is stored + * in `unsigned char pixel[]`, then the red component will be + * `pixel[tjRedOffset[TJPF_BGRX]]`. This will be -1 if the pixel format does + * not have a red component. + */ +static const int tjRedOffset[TJ_NUMPF] = { + 0, 2, 0, 2, 3, 1, -1, 0, 2, 3, 1, -1 +}; +/** + * Green offset (in samples) for a given pixel format. This specifies the + * number of samples that the green component is offset from the start of the + * pixel. For instance, if an 8-bit-per-component pixel of format TJPF_BGRX is + * stored in `unsigned char pixel[]`, then the green component will be + * `pixel[tjGreenOffset[TJPF_BGRX]]`. This will be -1 if the pixel format does + * not have a green component. + */ +static const int tjGreenOffset[TJ_NUMPF] = { + 1, 1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1 +}; +/** + * Blue offset (in samples) for a given pixel format. This specifies the + * number of samples that the blue component is offset from the start of the + * pixel. For instance, if an 8-bit-per-component pixel of format TJPF_BGRX is + * stored in `unsigned char pixel[]`, then the blue component will be + * `pixel[tjBlueOffset[TJPF_BGRX]]`. This will be -1 if the pixel format does + * not have a blue component. + */ +static const int tjBlueOffset[TJ_NUMPF] = { + 2, 0, 2, 0, 1, 3, -1, 2, 0, 1, 3, -1 +}; +/** + * Alpha offset (in samples) for a given pixel format. This specifies the + * number of samples that the alpha component is offset from the start of the + * pixel. For instance, if an 8-bit-per-component pixel of format TJPF_BGRA is + * stored in `unsigned char pixel[]`, then the alpha component will be + * `pixel[tjAlphaOffset[TJPF_BGRA]]`. This will be -1 if the pixel format does + * not have an alpha component. + */ +static const int tjAlphaOffset[TJ_NUMPF] = { + -1, -1, -1, -1, -1, -1, -1, 3, 3, 0, 0, -1 +}; +/** + * Pixel size (in samples) for a given pixel format + */ +static const int tjPixelSize[TJ_NUMPF] = { + 3, 3, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4 +}; + + +/** + * The number of JPEG colorspaces + */ +#define TJ_NUMCS 5 + +/** + * JPEG colorspaces + */ +enum TJCS { + /** + * RGB colorspace. When compressing the JPEG image, the R, G, and B + * components in the source image are reordered into image planes, but no + * colorspace conversion or subsampling is performed. RGB JPEG images can be + * compressed from and decompressed to packed-pixel images with any of the + * extended RGB or grayscale pixel formats, but they cannot be compressed + * from or decompressed to planar YUV images. + */ + TJCS_RGB, + /** + * YCbCr colorspace. YCbCr is not an absolute colorspace but rather a + * mathematical transformation of RGB designed solely for storage and + * transmission. YCbCr images must be converted to RGB before they can + * actually be displayed. In the YCbCr colorspace, the Y (luminance) + * component represents the black & white portion of the original image, and + * the Cb and Cr (chrominance) components represent the color portion of the + * original image. Originally, the analog equivalent of this transformation + * allowed the same signal to drive both black & white and color televisions, + * but JPEG images use YCbCr primarily because it allows the color data to be + * optionally subsampled for the purposes of reducing network or disk usage. + * YCbCr is the most common JPEG colorspace, and YCbCr JPEG images can be + * compressed from and decompressed to packed-pixel images with any of the + * extended RGB or grayscale pixel formats. YCbCr JPEG images can also be + * compressed from and decompressed to planar YUV images. + */ + TJCS_YCbCr, + /** + * Grayscale colorspace. The JPEG image retains only the luminance data (Y + * component), and any color data from the source image is discarded. + * Grayscale JPEG images can be compressed from and decompressed to + * packed-pixel images with any of the extended RGB or grayscale pixel + * formats, or they can be compressed from and decompressed to planar YUV + * images. + */ + TJCS_GRAY, + /** + * CMYK colorspace. When compressing the JPEG image, the C, M, Y, and K + * components in the source image are reordered into image planes, but no + * colorspace conversion or subsampling is performed. CMYK JPEG images can + * only be compressed from and decompressed to packed-pixel images with the + * CMYK pixel format. + */ + TJCS_CMYK, + /** + * YCCK colorspace. YCCK (AKA "YCbCrK") is not an absolute colorspace but + * rather a mathematical transformation of CMYK designed solely for storage + * and transmission. It is to CMYK as YCbCr is to RGB. CMYK pixels can be + * reversibly transformed into YCCK, and as with YCbCr, the chrominance + * components in the YCCK pixels can be subsampled without incurring major + * perceptual loss. YCCK JPEG images can only be compressed from and + * decompressed to packed-pixel images with the CMYK pixel format. + */ + TJCS_YCCK +}; + + +/** + * Parameters + */ +enum TJPARAM { + /** + * Error handling behavior + * + * **Value** + * - `0` *[default]* Allow the current compression/decompression/transform + * operation to complete unless a fatal error is encountered. + * - `1` Immediately discontinue the current + * compression/decompression/transform operation if a warning (non-fatal + * error) occurs. + */ + TJPARAM_STOPONWARNING, + /** + * Row order in packed-pixel source/destination images + * + * **Value** + * - `0` *[default]* top-down (X11) order + * - `1` bottom-up (Windows, OpenGL) order + */ + TJPARAM_BOTTOMUP, + /** + * JPEG destination buffer (re)allocation [compression, lossless + * transformation] + * + * **Value** + * - `0` *[default]* Attempt to allocate or reallocate the JPEG destination + * buffer as needed. + * - `1` Generate an error if the JPEG destination buffer is invalid or too + * small. + */ + TJPARAM_NOREALLOC, + /** + * Perceptual quality of lossy JPEG images [compression only] + * + * **Value** + * - `1`-`100` (`1` = worst quality but best compression, `100` = best + * quality but worst compression) *[no default; must be explicitly + * specified]* + */ + TJPARAM_QUALITY, + /** + * Chrominance subsampling level + * + * The JPEG or YUV image uses (decompression, decoding) or will use (lossy + * compression, encoding) the specified level of chrominance subsampling. + * + * **Value** + * - One of the @ref TJSAMP "chrominance subsampling options" *[no default; + * must be explicitly specified for lossy compression, encoding, and + * decoding]* + */ + TJPARAM_SUBSAMP, + /** + * JPEG width (in pixels) [decompression only, read-only] + */ + TJPARAM_JPEGWIDTH, + /** + * JPEG height (in pixels) [decompression only, read-only] + */ + TJPARAM_JPEGHEIGHT, + /** + * JPEG data precision (bits per sample) [decompression only, read-only] + * + * The JPEG image uses the specified number of bits per sample. + * + * **Value** + * - `8`, `12`, or `16` + * + * 12-bit data precision implies #TJPARAM_OPTIMIZE unless #TJPARAM_ARITHMETIC + * is set. + */ + TJPARAM_PRECISION, + /** + * JPEG colorspace + * + * The JPEG image uses (decompression) or will use (lossy compression) the + * specified colorspace. + * + * **Value** + * - One of the @ref TJCS "JPEG colorspaces" *[default for lossy compression: + * automatically selected based on the subsampling level and pixel format]* + */ + TJPARAM_COLORSPACE, + /** + * Chrominance upsampling algorithm [lossy decompression only] + * + * **Value** + * - `0` *[default]* Use smooth upsampling when decompressing a JPEG image + * that was compressed using chrominance subsampling. This creates a smooth + * transition between neighboring chrominance components in order to reduce + * upsampling artifacts in the decompressed image. + * - `1` Use the fastest chrominance upsampling algorithm available, which + * may combine upsampling with color conversion. + */ + TJPARAM_FASTUPSAMPLE, + /** + * DCT/IDCT algorithm [lossy compression and decompression] + * + * **Value** + * - `0` *[default]* Use the most accurate DCT/IDCT algorithm available. + * - `1` Use the fastest DCT/IDCT algorithm available. + * + * This parameter is provided mainly for backward compatibility with libjpeg, + * which historically implemented several different DCT/IDCT algorithms + * because of performance limitations with 1990s CPUs. In the libjpeg-turbo + * implementation of the TurboJPEG API: + * - The "fast" and "accurate" DCT/IDCT algorithms perform similarly on + * modern x86/x86-64 CPUs that support AVX2 instructions. + * - The "fast" algorithm is generally only about 5-15% faster than the + * "accurate" algorithm on other types of CPUs. + * - The difference in accuracy between the "fast" and "accurate" algorithms + * is the most pronounced at JPEG quality levels above 90 and tends to be + * more pronounced with decompression than with compression. + * - The "fast" algorithm degrades and is not fully accelerated for JPEG + * quality levels above 97, so it will be slower than the "accurate" + * algorithm. + */ + TJPARAM_FASTDCT, + /** + * Optimized baseline entropy coding [lossy compression only] + * + * **Value** + * - `0` *[default]* The JPEG image will use the default Huffman tables. + * - `1` Optimal Huffman tables will be computed for the JPEG image. For + * lossless transformation, this can also be specified using + * #TJXOPT_OPTIMIZE. + * + * Optimized baseline entropy coding will improve compression slightly + * (generally 5% or less), but it will reduce compression performance + * considerably. + */ + TJPARAM_OPTIMIZE, + /** + * Progressive entropy coding + * + * **Value** + * - `0` *[default for compression, lossless transformation]* The lossy JPEG + * image uses (decompression) or will use (compression, lossless + * transformation) baseline entropy coding. + * - `1` The lossy JPEG image uses (decompression) or will use (compression, + * lossless transformation) progressive entropy coding. For lossless + * transformation, this can also be specified using #TJXOPT_PROGRESSIVE. + * + * Progressive entropy coding will generally improve compression relative to + * baseline entropy coding, but it will reduce compression and decompression + * performance considerably. Can be combined with #TJPARAM_ARITHMETIC. + * Implies #TJPARAM_OPTIMIZE unless #TJPARAM_ARITHMETIC is also set. + */ + TJPARAM_PROGRESSIVE, + /** + * Progressive JPEG scan limit for lossy JPEG images [decompression, lossless + * transformation] + * + * Setting this parameter will cause the decompression and transform + * functions to return an error if the number of scans in a progressive JPEG + * image exceeds the specified limit. The primary purpose of this is to + * allow security-critical applications to guard against an exploit of the + * progressive JPEG format described in + * this report. + * + * **Value** + * - maximum number of progressive JPEG scans that the decompression and + * transform functions will process *[default: `0` (no limit)]* + * + * @see #TJPARAM_PROGRESSIVE + */ + TJPARAM_SCANLIMIT, + /** + * Arithmetic entropy coding + * + * **Value** + * - `0` *[default for compression, lossless transformation]* The lossy JPEG + * image uses (decompression) or will use (compression, lossless + * transformation) Huffman entropy coding. + * - `1` The lossy JPEG image uses (decompression) or will use (compression, + * lossless transformation) arithmetic entropy coding. For lossless + * transformation, this can also be specified using #TJXOPT_ARITHMETIC. + * + * Arithmetic entropy coding will generally improve compression relative to + * Huffman entropy coding, but it will reduce compression and decompression + * performance considerably. Can be combined with #TJPARAM_PROGRESSIVE. + */ + TJPARAM_ARITHMETIC, + /** + * Lossless JPEG + * + * **Value** + * - `0` *[default for compression]* The JPEG image is (decompression) or + * will be (compression) lossy/DCT-based. + * - `1` The JPEG image is (decompression) or will be (compression) + * lossless/predictive. + * + * In most cases, compressing and decompressing lossless JPEG images is + * considerably slower than compressing and decompressing lossy JPEG images, + * and lossless JPEG images are much larger than lossy JPEG images. Thus, + * lossless JPEG images are typically used only for applications that require + * mathematically lossless compression. Also note that the following + * features are not available with lossless JPEG images: + * - Colorspace conversion (lossless JPEG images always use #TJCS_RGB, + * #TJCS_GRAY, or #TJCS_CMYK, depending on the pixel format of the source + * image) + * - Chrominance subsampling (lossless JPEG images always use #TJSAMP_444) + * - JPEG quality selection + * - DCT/IDCT algorithm selection + * - Progressive entropy coding + * - Arithmetic entropy coding + * - Compression from/decompression to planar YUV images + * - Decompression scaling + * - Lossless transformation + * + * @see #TJPARAM_LOSSLESSPSV, #TJPARAM_LOSSLESSPT + */ + TJPARAM_LOSSLESS, + /** + * Lossless JPEG predictor selection value (PSV) + * + * **Value** + * - `1`-`7` *[default for compression: `1`]* + * + * Lossless JPEG compression shares no algorithms with lossy JPEG + * compression. Instead, it uses differential pulse-code modulation (DPCM), + * an algorithm whereby each sample is encoded as the difference between the + * sample's value and a "predictor", which is based on the values of + * neighboring samples. If Ra is the sample immediately to the left of the + * current sample, Rb is the sample immediately above the current sample, and + * Rc is the sample diagonally to the left and above the current sample, then + * the relationship between the predictor selection value and the predictor + * is as follows: + * + * PSV | Predictor + * ----|---------- + * 1 | Ra + * 2 | Rb + * 3 | Rc + * 4 | Ra + Rb – Rc + * 5 | Ra + (Rb – Rc) / 2 + * 6 | Rb + (Ra – Rc) / 2 + * 7 | (Ra + Rb) / 2 + * + * Predictors 1-3 are 1-dimensional predictors, whereas Predictors 4-7 are + * 2-dimensional predictors. The best predictor for a particular image + * depends on the image. + * + * @see #TJPARAM_LOSSLESS + */ + TJPARAM_LOSSLESSPSV, + /** + * Lossless JPEG point transform (Pt) + * + * **Value** + * - `0` through ***precision*** *- 1*, where ***precision*** is the JPEG + * data precision in bits *[default for compression: `0`]* + * + * A point transform value of `0` is necessary in order to generate a fully + * lossless JPEG image. (A non-zero point transform value right-shifts the + * input samples by the specified number of bits, which is effectively a form + * of lossy color quantization.) + * + * @see #TJPARAM_LOSSLESS, #TJPARAM_PRECISION + */ + TJPARAM_LOSSLESSPT, + /** + * JPEG restart marker interval in MCU blocks (lossy) or samples (lossless) + * [compression only] + * + * The nature of entropy coding is such that a corrupt JPEG image cannot + * be decompressed beyond the point of corruption unless it contains restart + * markers. A restart marker stops and restarts the entropy coding algorithm + * so that, if a JPEG image is corrupted, decompression can resume at the + * next marker. Thus, adding more restart markers improves the fault + * tolerance of the JPEG image, but adding too many restart markers can + * adversely affect the compression ratio and performance. + * + * **Value** + * - the number of MCU blocks or samples between each restart marker + * *[default: `0` (no restart markers)]* + * + * Setting this parameter to a non-zero value sets #TJPARAM_RESTARTROWS to 0. + */ + TJPARAM_RESTARTBLOCKS, + /** + * JPEG restart marker interval in MCU rows (lossy) or sample rows (lossless) + * [compression only] + * + * See #TJPARAM_RESTARTBLOCKS for a description of restart markers. + * + * **Value** + * - the number of MCU rows or sample rows between each restart marker + * *[default: `0` (no restart markers)]* + * + * Setting this parameter to a non-zero value sets #TJPARAM_RESTARTBLOCKS to + * 0. + */ + TJPARAM_RESTARTROWS, + /** + * JPEG horizontal pixel density + * + * **Value** + * - The JPEG image has (decompression) or will have (compression) the + * specified horizontal pixel density *[default for compression: `1`]*. + * + * This value is stored in or read from the JPEG header. It does not affect + * the contents of the JPEG image. Note that this parameter is set by + * #tj3LoadImage8() when loading a Windows BMP file that contains pixel + * density information, and the value of this parameter is stored to a + * Windows BMP file by #tj3SaveImage8() if the value of #TJPARAM_DENSITYUNITS + * is `2`. + * + * @see TJPARAM_DENSITYUNITS + */ + TJPARAM_XDENSITY, + /** + * JPEG vertical pixel density + * + * **Value** + * - The JPEG image has (decompression) or will have (compression) the + * specified vertical pixel density *[default for compression: `1`]*. + * + * This value is stored in or read from the JPEG header. It does not affect + * the contents of the JPEG image. Note that this parameter is set by + * #tj3LoadImage8() when loading a Windows BMP file that contains pixel + * density information, and the value of this parameter is stored to a + * Windows BMP file by #tj3SaveImage8() if the value of #TJPARAM_DENSITYUNITS + * is `2`. + * + * @see TJPARAM_DENSITYUNITS + */ + TJPARAM_YDENSITY, + /** + * JPEG pixel density units + * + * **Value** + * - `0` *[default for compression]* The pixel density of the JPEG image is + * expressed (decompression) or will be expressed (compression) in unknown + * units. + * - `1` The pixel density of the JPEG image is expressed (decompression) or + * will be expressed (compression) in units of pixels/inch. + * - `2` The pixel density of the JPEG image is expressed (decompression) or + * will be expressed (compression) in units of pixels/cm. + * + * This value is stored in or read from the JPEG header. It does not affect + * the contents of the JPEG image. Note that this parameter is set by + * #tj3LoadImage8() when loading a Windows BMP file that contains pixel + * density information, and the value of this parameter is stored to a + * Windows BMP file by #tj3SaveImage8() if the value is `2`. + * + * @see TJPARAM_XDENSITY, TJPARAM_YDENSITY + */ + TJPARAM_DENSITYUNITS, + /** + * Memory limit for intermediate buffers + * + * **Value** + * - the maximum amount of memory (in megabytes) that will be allocated for + * intermediate buffers, which are used with progressive JPEG compression and + * decompression, optimized baseline entropy coding, lossless JPEG + * compression, and lossless transformation *[default: `0` (no limit)]* + */ + TJPARAM_MAXMEMORY, + /** + * Image size limit [decompression, lossless transformation, packed-pixel + * image loading] + * + * Setting this parameter will cause the decompression, transform, and image + * loading functions to return an error if the number of pixels in the source + * image exceeds the specified limit. This allows security-critical + * applications to guard against excessive memory consumption. + * + * **Value** + * - maximum number of pixels that the decompression, transform, and image + * loading functions will process *[default: `0` (no limit)]* + */ + TJPARAM_MAXPIXELS +}; + + +/** + * The number of error codes + */ +#define TJ_NUMERR 2 + +/** + * Error codes + */ +enum TJERR { + /** + * The error was non-fatal and recoverable, but the destination image may + * still be corrupt. + */ + TJERR_WARNING, + /** + * The error was fatal and non-recoverable. + */ + TJERR_FATAL +}; + + +/** + * The number of transform operations + */ +#define TJ_NUMXOP 8 + +/** + * Transform operations for #tj3Transform() + */ +enum TJXOP { + /** + * Do not transform the position of the image pixels + */ + TJXOP_NONE, + /** + * Flip (mirror) image horizontally. This transform is imperfect if there + * are any partial MCU blocks on the right edge (see #TJXOPT_PERFECT.) + */ + TJXOP_HFLIP, + /** + * Flip (mirror) image vertically. This transform is imperfect if there are + * any partial MCU blocks on the bottom edge (see #TJXOPT_PERFECT.) + */ + TJXOP_VFLIP, + /** + * Transpose image (flip/mirror along upper left to lower right axis.) This + * transform is always perfect. + */ + TJXOP_TRANSPOSE, + /** + * Transverse transpose image (flip/mirror along upper right to lower left + * axis.) This transform is imperfect if there are any partial MCU blocks in + * the image (see #TJXOPT_PERFECT.) + */ + TJXOP_TRANSVERSE, + /** + * Rotate image clockwise by 90 degrees. This transform is imperfect if + * there are any partial MCU blocks on the bottom edge (see + * #TJXOPT_PERFECT.) + */ + TJXOP_ROT90, + /** + * Rotate image 180 degrees. This transform is imperfect if there are any + * partial MCU blocks in the image (see #TJXOPT_PERFECT.) + */ + TJXOP_ROT180, + /** + * Rotate image counter-clockwise by 90 degrees. This transform is imperfect + * if there are any partial MCU blocks on the right edge (see + * #TJXOPT_PERFECT.) + */ + TJXOP_ROT270 +}; + + +/** + * This option will cause #tj3Transform() to return an error if the transform + * is not perfect. Lossless transforms operate on MCU blocks, whose size + * depends on the level of chrominance subsampling used (see #tjMCUWidth and + * #tjMCUHeight.) If the image's width or height is not evenly divisible by + * the MCU block size, then there will be partial MCU blocks on the right + * and/or bottom edges. It is not possible to move these partial MCU blocks to + * the top or left of the image, so any transform that would require that is + * "imperfect." If this option is not specified, then any partial MCU blocks + * that cannot be transformed will be left in place, which will create + * odd-looking strips on the right or bottom edge of the image. + */ +#define TJXOPT_PERFECT (1 << 0) +/** + * This option will cause #tj3Transform() to discard any partial MCU blocks + * that cannot be transformed. + */ +#define TJXOPT_TRIM (1 << 1) +/** + * This option will enable lossless cropping. See #tj3Transform() for more + * information. + */ +#define TJXOPT_CROP (1 << 2) +/** + * This option will discard the color data in the source image and produce a + * grayscale destination image. + */ +#define TJXOPT_GRAY (1 << 3) +/** + * This option will prevent #tj3Transform() from outputting a JPEG image for + * this particular transform. (This can be used in conjunction with a custom + * filter to capture the transformed DCT coefficients without transcoding + * them.) + */ +#define TJXOPT_NOOUTPUT (1 << 4) +/** + * This option will enable progressive entropy coding in the JPEG image + * generated by this particular transform. Progressive entropy coding will + * generally improve compression relative to baseline entropy coding (the + * default), but it will reduce decompression performance considerably. + * Can be combined with #TJXOPT_ARITHMETIC. Implies #TJXOPT_OPTIMIZE unless + * #TJXOPT_ARITHMETIC is also specified. + */ +#define TJXOPT_PROGRESSIVE (1 << 5) +/** + * This option will prevent #tj3Transform() from copying any extra markers + * (including EXIF and ICC profile data) from the source image to the + * destination image. + */ +#define TJXOPT_COPYNONE (1 << 6) +/** + * This option will enable arithmetic entropy coding in the JPEG image + * generated by this particular transform. Arithmetic entropy coding will + * generally improve compression relative to Huffman entropy coding (the + * default), but it will reduce decompression performance considerably. Can be + * combined with #TJXOPT_PROGRESSIVE. + */ +#define TJXOPT_ARITHMETIC (1 << 7) +/** + * This option will enable optimized baseline entropy coding in the JPEG image + * generated by this particular transform. Optimized baseline entropy coding + * will improve compression slightly (generally 5% or less.) + */ +#define TJXOPT_OPTIMIZE (1 << 8) + + +/** + * Scaling factor + */ +typedef struct { + /** + * Numerator + */ + int num; + /** + * Denominator + */ + int denom; +} tjscalingfactor; + +/** + * Cropping region + */ +typedef struct { + /** + * The left boundary of the cropping region. This must be evenly divisible + * by the MCU block width (see #tjMCUWidth.) + */ + int x; + /** + * The upper boundary of the cropping region. For lossless transformation, + * this must be evenly divisible by the MCU block height (see #tjMCUHeight.) + */ + int y; + /** + * The width of the cropping region. Setting this to 0 is the equivalent of + * setting it to the width of the source JPEG image - x. + */ + int w; + /** + * The height of the cropping region. Setting this to 0 is the equivalent of + * setting it to the height of the source JPEG image - y. + */ + int h; +} tjregion; + +/** + * A #tjregion structure that specifies no cropping + */ +static const tjregion TJUNCROPPED = { 0, 0, 0, 0 }; + +/** + * Lossless transform + */ +typedef struct tjtransform { + /** + * Cropping region + */ + tjregion r; + /** + * One of the @ref TJXOP "transform operations" + */ + int op; + /** + * The bitwise OR of one of more of the @ref TJXOPT_ARITHMETIC + * "transform options" + */ + int options; + /** + * Arbitrary data that can be accessed within the body of the callback + * function + */ + void *data; + /** + * A callback function that can be used to modify the DCT coefficients after + * they are losslessly transformed but before they are transcoded to a new + * JPEG image. This allows for custom filters or other transformations to be + * applied in the frequency domain. + * + * @param coeffs pointer to an array of transformed DCT coefficients. (NOTE: + * this pointer is not guaranteed to be valid once the callback returns, so + * applications wishing to hand off the DCT coefficients to another function + * or library should make a copy of them within the body of the callback.) + * + * @param arrayRegion #tjregion structure containing the width and height of + * the array pointed to by `coeffs` as well as its offset relative to the + * component plane. TurboJPEG implementations may choose to split each + * component plane into multiple DCT coefficient arrays and call the callback + * function once for each array. + * + * @param planeRegion #tjregion structure containing the width and height of + * the component plane to which `coeffs` belongs + * + * @param componentID ID number of the component plane to which `coeffs` + * belongs. (Y, Cb, and Cr have, respectively, ID's of 0, 1, and 2 in + * typical JPEG images.) + * + * @param transformID ID number of the transformed image to which `coeffs` + * belongs. This is the same as the index of the transform in the + * `transforms` array that was passed to #tj3Transform(). + * + * @param transform a pointer to a #tjtransform structure that specifies the + * parameters and/or cropping region for this transform + * + * @return 0 if the callback was successful, or -1 if an error occurred. + */ + int (*customFilter) (short *coeffs, tjregion arrayRegion, + tjregion planeRegion, int componentID, int transformID, + struct tjtransform *transform); +} tjtransform; + +/** + * TurboJPEG instance handle + */ +typedef void *tjhandle; + + +/** + * Compute the scaled value of `dimension` using the given scaling factor. + * This macro performs the integer equivalent of `ceil(dimension * + * scalingFactor)`. + */ +#define TJSCALED(dimension, scalingFactor) \ + (((dimension) * scalingFactor.num + scalingFactor.denom - 1) / \ + scalingFactor.denom) + +/** + * A #tjscalingfactor structure that specifies a scaling factor of 1/1 (no + * scaling) + */ +static const tjscalingfactor TJUNSCALED = { 1, 1 }; + + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + * Create a new TurboJPEG instance. + * + * @param initType one of the @ref TJINIT "initialization options" + * + * @return a handle to the newly-created instance, or NULL if an error occurred + * (see #tj3GetErrorStr().) + */ +DLLEXPORT tjhandle tj3Init(int initType); + + +/** + * Set the value of a parameter. + * + * @param handle handle to a TurboJPEG instance + * + * @param param one of the @ref TJPARAM "parameters" + * + * @param value value of the parameter (refer to @ref TJPARAM + * "parameter documentation") + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr().) + */ +DLLEXPORT int tj3Set(tjhandle handle, int param, int value); + + +/** + * Get the value of a parameter. + * + * @param handle handle to a TurboJPEG instance + * + * @param param one of the @ref TJPARAM "parameters" + * + * @return the value of the specified parameter, or -1 if the value is unknown. + */ +DLLEXPORT int tj3Get(tjhandle handle, int param); + + +/** + * Compress an 8-bit-per-sample packed-pixel RGB, grayscale, or CMYK image into + * an 8-bit-per-sample JPEG image. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * compression + * + * @param srcBuf pointer to a buffer containing a packed-pixel RGB, grayscale, + * or CMYK source image to be compressed. This buffer should normally be + * `pitch * height` samples in size. However, you can also use this parameter + * to compress from a specific region of a larger buffer. + * + * @param width width (in pixels) of the source image + * + * @param pitch samples per row in the source image. Normally this should be + * width * #tjPixelSize[pixelFormat], if the image is unpadded. + * (Setting this parameter to 0 is the equivalent of setting it to + * width * #tjPixelSize[pixelFormat].) However, you can also use this + * parameter to specify the row alignment/padding of the source image, to skip + * rows, or to compress from a specific region of a larger buffer. + * + * @param height height (in pixels) of the source image + * + * @param pixelFormat pixel format of the source image (see @ref TJPF + * "Pixel formats".) + * + * @param jpegBuf address of a pointer to a byte buffer that will receive the + * JPEG image. TurboJPEG has the ability to reallocate the JPEG buffer to + * accommodate the size of the JPEG image. Thus, you can choose to: + * -# pre-allocate the JPEG buffer with an arbitrary size using #tj3Alloc() and + * let TurboJPEG grow the buffer as needed, + * -# set `*jpegBuf` to NULL to tell TurboJPEG to allocate the buffer for you, + * or + * -# pre-allocate the buffer to a "worst case" size determined by calling + * #tj3JPEGBufSize(). This should ensure that the buffer never has to be + * re-allocated. (Setting #TJPARAM_NOREALLOC guarantees that it won't be.) + * . + * If you choose option 1, then `*jpegSize` should be set to the size of your + * pre-allocated buffer. In any case, unless you have set #TJPARAM_NOREALLOC, + * you should always check `*jpegBuf` upon return from this function, as it may + * have changed. + * + * @param jpegSize pointer to a size_t variable that holds the size of the JPEG + * buffer. If `*jpegBuf` points to a pre-allocated buffer, then `*jpegSize` + * should be set to the size of the buffer. Upon return, `*jpegSize` will + * contain the size of the JPEG image (in bytes.) If `*jpegBuf` points to a + * JPEG buffer that is being reused from a previous call to one of the JPEG + * compression functions, then `*jpegSize` is ignored. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3Compress8(tjhandle handle, const unsigned char *srcBuf, + int width, int pitch, int height, int pixelFormat, + unsigned char **jpegBuf, size_t *jpegSize); + +/** + * Compress a 12-bit-per-sample packed-pixel RGB, grayscale, or CMYK image into + * a 12-bit-per-sample JPEG image. + * + * \details \copydetails tj3Compress8() + */ +DLLEXPORT int tj3Compress12(tjhandle handle, const short *srcBuf, int width, + int pitch, int height, int pixelFormat, + unsigned char **jpegBuf, size_t *jpegSize); + +/** + * Compress a 16-bit-per-sample packed-pixel RGB, grayscale, or CMYK image into + * a 16-bit-per-sample lossless JPEG image. + * + * \details \copydetails tj3Compress8() + */ +DLLEXPORT int tj3Compress16(tjhandle handle, const unsigned short *srcBuf, + int width, int pitch, int height, int pixelFormat, + unsigned char **jpegBuf, size_t *jpegSize); + + +/** + * Compress an 8-bit-per-sample unified planar YUV image into an + * 8-bit-per-sample JPEG image. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * compression + * + * @param srcBuf pointer to a buffer containing a unified planar YUV source + * image to be compressed. The size of this buffer should match the value + * returned by #tj3YUVBufSize() for the given image width, height, row + * alignment, and level of chrominance subsampling (see #TJPARAM_SUBSAMP.) The + * Y, U (Cb), and V (Cr) image planes should be stored sequentially in the + * buffer. (Refer to @ref YUVnotes "YUV Image Format Notes".) + * + * @param width width (in pixels) of the source image. If the width is not an + * even multiple of the MCU block width (see #tjMCUWidth), then an intermediate + * buffer copy will be performed. + * + * @param align row alignment (in bytes) of the source image (must be a power + * of 2.) Setting this parameter to n indicates that each row in each plane of + * the source image is padded to the nearest multiple of n bytes + * (1 = unpadded.) + * + * @param height height (in pixels) of the source image. If the height is not + * an even multiple of the MCU block height (see #tjMCUHeight), then an + * intermediate buffer copy will be performed. + * + * @param jpegBuf address of a pointer to a byte buffer that will receive the + * JPEG image. TurboJPEG has the ability to reallocate the JPEG buffer to + * accommodate the size of the JPEG image. Thus, you can choose to: + * -# pre-allocate the JPEG buffer with an arbitrary size using #tj3Alloc() and + * let TurboJPEG grow the buffer as needed, + * -# set `*jpegBuf` to NULL to tell TurboJPEG to allocate the buffer for you, + * or + * -# pre-allocate the buffer to a "worst case" size determined by calling + * #tj3JPEGBufSize(). This should ensure that the buffer never has to be + * re-allocated. (Setting #TJPARAM_NOREALLOC guarantees that it won't be.) + * . + * If you choose option 1, then `*jpegSize` should be set to the size of your + * pre-allocated buffer. In any case, unless you have set #TJPARAM_NOREALLOC, + * you should always check `*jpegBuf` upon return from this function, as it may + * have changed. + * + * @param jpegSize pointer to a size_t variable that holds the size of the JPEG + * buffer. If `*jpegBuf` points to a pre-allocated buffer, then `*jpegSize` + * should be set to the size of the buffer. Upon return, `*jpegSize` will + * contain the size of the JPEG image (in bytes.) If `*jpegBuf` points to a + * JPEG buffer that is being reused from a previous call to one of the JPEG + * compression functions, then `*jpegSize` is ignored. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3CompressFromYUV8(tjhandle handle, + const unsigned char *srcBuf, int width, + int align, int height, + unsigned char **jpegBuf, size_t *jpegSize); + + +/** + * Compress a set of 8-bit-per-sample Y, U (Cb), and V (Cr) image planes into + * an 8-bit-per-sample JPEG image. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * compression + * + * @param srcPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes + * (or just a Y plane, if compressing a grayscale image) that contain a YUV + * source image to be compressed. These planes can be contiguous or + * non-contiguous in memory. The size of each plane should match the value + * returned by #tj3YUVPlaneSize() for the given image width, height, strides, + * and level of chrominance subsampling (see #TJPARAM_SUBSAMP.) Refer to + * @ref YUVnotes "YUV Image Format Notes" for more details. + * + * @param width width (in pixels) of the source image. If the width is not an + * even multiple of the MCU block width (see #tjMCUWidth), then an intermediate + * buffer copy will be performed. + * + * @param strides an array of integers, each specifying the number of bytes per + * row in the corresponding plane of the YUV source image. Setting the stride + * for any plane to 0 is the same as setting it to the plane width (see + * @ref YUVnotes "YUV Image Format Notes".) If `strides` is NULL, then the + * strides for all planes will be set to their respective plane widths. You + * can adjust the strides in order to specify an arbitrary amount of row + * padding in each plane or to create a JPEG image from a subregion of a larger + * planar YUV image. + * + * @param height height (in pixels) of the source image. If the height is not + * an even multiple of the MCU block height (see #tjMCUHeight), then an + * intermediate buffer copy will be performed. + * + * @param jpegBuf address of a pointer to a byte buffer that will receive the + * JPEG image. TurboJPEG has the ability to reallocate the JPEG buffer to + * accommodate the size of the JPEG image. Thus, you can choose to: + * -# pre-allocate the JPEG buffer with an arbitrary size using #tj3Alloc() and + * let TurboJPEG grow the buffer as needed, + * -# set `*jpegBuf` to NULL to tell TurboJPEG to allocate the buffer for you, + * or + * -# pre-allocate the buffer to a "worst case" size determined by calling + * #tj3JPEGBufSize(). This should ensure that the buffer never has to be + * re-allocated. (Setting #TJPARAM_NOREALLOC guarantees that it won't be.) + * . + * If you choose option 1, then `*jpegSize` should be set to the size of your + * pre-allocated buffer. In any case, unless you have set #TJPARAM_NOREALLOC, + * you should always check `*jpegBuf` upon return from this function, as it may + * have changed. + * + * @param jpegSize pointer to a size_t variable that holds the size of the JPEG + * buffer. If `*jpegBuf` points to a pre-allocated buffer, then `*jpegSize` + * should be set to the size of the buffer. Upon return, `*jpegSize` will + * contain the size of the JPEG image (in bytes.) If `*jpegBuf` points to a + * JPEG buffer that is being reused from a previous call to one of the JPEG + * compression functions, then `*jpegSize` is ignored. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3CompressFromYUVPlanes8(tjhandle handle, + const unsigned char * const *srcPlanes, + int width, const int *strides, + int height, unsigned char **jpegBuf, + size_t *jpegSize); + + +/** + * The maximum size of the buffer (in bytes) required to hold a JPEG image with + * the given parameters. The number of bytes returned by this function is + * larger than the size of the uncompressed source image. The reason for this + * is that the JPEG format uses 16-bit coefficients, so it is possible for a + * very high-quality source image with very high-frequency content to expand + * rather than compress when converted to the JPEG format. Such images + * represent very rare corner cases, but since there is no way to predict the + * size of a JPEG image prior to compression, the corner cases have to be + * handled. + * + * @param width width (in pixels) of the image + * + * @param height height (in pixels) of the image + * + * @param jpegSubsamp the level of chrominance subsampling to be used when + * generating the JPEG image (see @ref TJSAMP + * "Chrominance subsampling options".) #TJSAMP_UNKNOWN is treated like + * #TJSAMP_444, since a buffer large enough to hold a JPEG image with no + * subsampling should also be large enough to hold a JPEG image with an + * arbitrary level of subsampling. Note that lossless JPEG images always + * use #TJSAMP_444. + * + * @return the maximum size of the buffer (in bytes) required to hold the + * image, or 0 if the arguments are out of bounds. + */ +DLLEXPORT size_t tj3JPEGBufSize(int width, int height, int jpegSubsamp); + + +/** + * The size of the buffer (in bytes) required to hold a unified planar YUV + * image with the given parameters. + * + * @param width width (in pixels) of the image + * + * @param align row alignment (in bytes) of the image (must be a power of 2.) + * Setting this parameter to n specifies that each row in each plane of the + * image will be padded to the nearest multiple of n bytes (1 = unpadded.) + * + * @param height height (in pixels) of the image + * + * @param subsamp level of chrominance subsampling in the image (see + * @ref TJSAMP "Chrominance subsampling options".) + * + * @return the size of the buffer (in bytes) required to hold the image, or 0 + * if the arguments are out of bounds. + */ +DLLEXPORT size_t tj3YUVBufSize(int width, int align, int height, int subsamp); + + +/** + * The size of the buffer (in bytes) required to hold a YUV image plane with + * the given parameters. + * + * @param componentID ID number of the image plane (0 = Y, 1 = U/Cb, 2 = V/Cr) + * + * @param width width (in pixels) of the YUV image. NOTE: this is the width of + * the whole image, not the plane width. + * + * @param stride bytes per row in the image plane. Setting this to 0 is the + * equivalent of setting it to the plane width. + * + * @param height height (in pixels) of the YUV image. NOTE: this is the height + * of the whole image, not the plane height. + * + * @param subsamp level of chrominance subsampling in the image (see + * @ref TJSAMP "Chrominance subsampling options".) + * + * @return the size of the buffer (in bytes) required to hold the YUV image + * plane, or 0 if the arguments are out of bounds. + */ +DLLEXPORT size_t tj3YUVPlaneSize(int componentID, int width, int stride, + int height, int subsamp); + + +/** + * The plane width of a YUV image plane with the given parameters. Refer to + * @ref YUVnotes "YUV Image Format Notes" for a description of plane width. + * + * @param componentID ID number of the image plane (0 = Y, 1 = U/Cb, 2 = V/Cr) + * + * @param width width (in pixels) of the YUV image + * + * @param subsamp level of chrominance subsampling in the image (see + * @ref TJSAMP "Chrominance subsampling options".) + * + * @return the plane width of a YUV image plane with the given parameters, or 0 + * if the arguments are out of bounds. + */ +DLLEXPORT int tj3YUVPlaneWidth(int componentID, int width, int subsamp); + + +/** + * The plane height of a YUV image plane with the given parameters. Refer to + * @ref YUVnotes "YUV Image Format Notes" for a description of plane height. + * + * @param componentID ID number of the image plane (0 = Y, 1 = U/Cb, 2 = V/Cr) + * + * @param height height (in pixels) of the YUV image + * + * @param subsamp level of chrominance subsampling in the image (see + * @ref TJSAMP "Chrominance subsampling options".) + * + * @return the plane height of a YUV image plane with the given parameters, or + * 0 if the arguments are out of bounds. + */ +DLLEXPORT int tj3YUVPlaneHeight(int componentID, int height, int subsamp); + + +/** + * Encode an 8-bit-per-sample packed-pixel RGB or grayscale image into an + * 8-bit-per-sample unified planar YUV image. This function performs color + * conversion (which is accelerated in the libjpeg-turbo implementation) but + * does not execute any of the other steps in the JPEG compression process. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * compression + * + * @param srcBuf pointer to a buffer containing a packed-pixel RGB or grayscale + * source image to be encoded. This buffer should normally be `pitch * height` + * bytes in size. However, you can also use this parameter to encode from a + * specific region of a larger buffer. + * + * @param width width (in pixels) of the source image + * + * @param pitch bytes per row in the source image. Normally this should be + * width * #tjPixelSize[pixelFormat], if the image is unpadded. + * (Setting this parameter to 0 is the equivalent of setting it to + * width * #tjPixelSize[pixelFormat].) However, you can also use this + * parameter to specify the row alignment/padding of the source image, to skip + * rows, or to encode from a specific region of a larger packed-pixel image. + * + * @param height height (in pixels) of the source image + * + * @param pixelFormat pixel format of the source image (see @ref TJPF + * "Pixel formats".) + * + * @param dstBuf pointer to a buffer that will receive the unified planar YUV + * image. Use #tj3YUVBufSize() to determine the appropriate size for this + * buffer based on the image width, height, row alignment, and level of + * chrominance subsampling (see #TJPARAM_SUBSAMP.) The Y, U (Cb), and V (Cr) + * image planes will be stored sequentially in the buffer. (Refer to + * @ref YUVnotes "YUV Image Format Notes".) + * + * @param align row alignment (in bytes) of the YUV image (must be a power of + * 2.) Setting this parameter to n will cause each row in each plane of the + * YUV image to be padded to the nearest multiple of n bytes (1 = unpadded.) + * To generate images suitable for X Video, `align` should be set to 4. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3EncodeYUV8(tjhandle handle, const unsigned char *srcBuf, + int width, int pitch, int height, int pixelFormat, + unsigned char *dstBuf, int align); + + +/** + * Encode an 8-bit-per-sample packed-pixel RGB or grayscale image into separate + * 8-bit-per-sample Y, U (Cb), and V (Cr) image planes. This function performs + * color conversion (which is accelerated in the libjpeg-turbo implementation) + * but does not execute any of the other steps in the JPEG compression process. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * compression + * + * @param srcBuf pointer to a buffer containing a packed-pixel RGB or grayscale + * source image to be encoded. This buffer should normally be `pitch * height` + * bytes in size. However, you can also use this parameter to encode from a + * specific region of a larger buffer. + * + * + * @param width width (in pixels) of the source image + * + * @param pitch bytes per row in the source image. Normally this should be + * width * #tjPixelSize[pixelFormat], if the image is unpadded. + * (Setting this parameter to 0 is the equivalent of setting it to + * width * #tjPixelSize[pixelFormat].) However, you can also use this + * parameter to specify the row alignment/padding of the source image, to skip + * rows, or to encode from a specific region of a larger packed-pixel image. + * + * @param height height (in pixels) of the source image + * + * @param pixelFormat pixel format of the source image (see @ref TJPF + * "Pixel formats".) + * + * @param dstPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes + * (or just a Y plane, if generating a grayscale image) that will receive the + * encoded image. These planes can be contiguous or non-contiguous in memory. + * Use #tj3YUVPlaneSize() to determine the appropriate size for each plane + * based on the image width, height, strides, and level of chrominance + * subsampling (see #TJPARAM_SUBSAMP.) Refer to @ref YUVnotes + * "YUV Image Format Notes" for more details. + * + * @param strides an array of integers, each specifying the number of bytes per + * row in the corresponding plane of the YUV image. Setting the stride for any + * plane to 0 is the same as setting it to the plane width (see @ref YUVnotes + * "YUV Image Format Notes".) If `strides` is NULL, then the strides for all + * planes will be set to their respective plane widths. You can adjust the + * strides in order to add an arbitrary amount of row padding to each plane or + * to encode an RGB or grayscale image into a subregion of a larger planar YUV + * image. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3EncodeYUVPlanes8(tjhandle handle, const unsigned char *srcBuf, + int width, int pitch, int height, + int pixelFormat, unsigned char **dstPlanes, + int *strides); + + +/** + * Retrieve information about a JPEG image without decompressing it, or prime + * the decompressor with quantization and Huffman tables. If a JPEG image is + * passed to this function, then the @ref TJPARAM "parameters" that describe + * the JPEG image will be set when the function returns. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * decompression + * + * @param jpegBuf pointer to a byte buffer containing a JPEG image or an + * "abbreviated table specification" (AKA "tables-only") datastream. Passing a + * tables-only datastream to this function primes the decompressor with + * quantization and Huffman tables that can be used when decompressing + * subsequent "abbreviated image" datastreams. This is useful, for instance, + * when decompressing video streams in which all frames share the same + * quantization and Huffman tables. + * + * @param jpegSize size of the JPEG image or tables-only datastream (in bytes) + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3DecompressHeader(tjhandle handle, + const unsigned char *jpegBuf, + size_t jpegSize); + + +/** + * Returns a list of fractional scaling factors that the JPEG decompressor + * supports. + * + * @param numScalingFactors pointer to an integer variable that will receive + * the number of elements in the list + * + * @return a pointer to a list of fractional scaling factors, or NULL if an + * error is encountered (see #tj3GetErrorStr().) + */ +DLLEXPORT tjscalingfactor *tj3GetScalingFactors(int *numScalingFactors); + + +/** + * Set the scaling factor for subsequent lossy decompression operations. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * decompression + * + * @param scalingFactor #tjscalingfactor structure that specifies a fractional + * scaling factor that the decompressor supports (see #tj3GetScalingFactors()), + * or #TJUNSCALED for no scaling. Decompression scaling is a function + * of the IDCT algorithm, so scaling factors are generally limited to multiples + * of 1/8. If the entire JPEG image will be decompressed, then the width and + * height of the scaled destination image can be determined by calling + * #TJSCALED() with the JPEG width and height (see #TJPARAM_JPEGWIDTH and + * #TJPARAM_JPEGHEIGHT) and the specified scaling factor. When decompressing + * into a planar YUV image, an intermediate buffer copy will be performed if + * the width or height of the scaled destination image is not an even multiple + * of the MCU block size (see #tjMCUWidth and #tjMCUHeight.) Note that + * decompression scaling is not available (and the specified scaling factor is + * ignored) when decompressing lossless JPEG images (see #TJPARAM_LOSSLESS), + * since the IDCT algorithm is not used with those images. Note also that + * #TJPARAM_FASTDCT is ignored when decompression scaling is enabled. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr().) + */ +DLLEXPORT int tj3SetScalingFactor(tjhandle handle, + tjscalingfactor scalingFactor); + + +/** + * Set the cropping region for partially decompressing a lossy JPEG image into + * a packed-pixel image + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * decompression + * + * @param croppingRegion #tjregion structure that specifies a subregion of the + * JPEG image to decompress, or #TJUNCROPPED for no cropping. The + * left boundary of the cropping region must be evenly divisible by the scaled + * MCU block width (#TJSCALED(#tjMCUWidth[subsamp], scalingFactor), + * where `subsamp` is the level of chrominance subsampling in the JPEG image + * (see #TJPARAM_SUBSAMP) and `scalingFactor` is the decompression scaling + * factor (see #tj3SetScalingFactor().) The cropping region should be + * specified relative to the scaled image dimensions. Unless `croppingRegion` + * is #TJUNCROPPED, the JPEG header must be read (see + * #tj3DecompressHeader()) prior to calling this function. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr().) + */ +DLLEXPORT int tj3SetCroppingRegion(tjhandle handle, tjregion croppingRegion); + + +/** + * Decompress an 8-bit-per-sample JPEG image into an 8-bit-per-sample + * packed-pixel RGB, grayscale, or CMYK image. The @ref TJPARAM "parameters" + * that describe the JPEG image will be set when this function returns. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * decompression + * + * @param jpegBuf pointer to a byte buffer containing the JPEG image to + * decompress + * + * @param jpegSize size of the JPEG image (in bytes) + * + * @param dstBuf pointer to a buffer that will receive the packed-pixel + * decompressed image. This buffer should normally be + * `pitch * destinationHeight` samples in size. However, you can also use this + * parameter to decompress into a specific region of a larger buffer. NOTE: + * If the JPEG image is lossy, then `destinationHeight` is either the scaled + * JPEG height (see #TJSCALED(), #TJPARAM_JPEGHEIGHT, and + * #tj3SetScalingFactor()) or the height of the cropping region (see + * #tj3SetCroppingRegion().) If the JPEG image is lossless, then + * `destinationHeight` is the JPEG height. + * + * @param pitch samples per row in the destination image. Normally this should + * be set to destinationWidth * #tjPixelSize[pixelFormat], if the + * destination image should be unpadded. (Setting this parameter to 0 is the + * equivalent of setting it to + * destinationWidth * #tjPixelSize[pixelFormat].) However, you can + * also use this parameter to specify the row alignment/padding of the + * destination image, to skip rows, or to decompress into a specific region of + * a larger buffer. NOTE: If the JPEG image is lossy, then `destinationWidth` + * is either the scaled JPEG width (see #TJSCALED(), #TJPARAM_JPEGWIDTH, and + * #tj3SetScalingFactor()) or the width of the cropping region (see + * #tj3SetCroppingRegion().) If the JPEG image is lossless, then + * `destinationWidth` is the JPEG width. + * + * @param pixelFormat pixel format of the destination image (see @ref + * TJPF "Pixel formats".) + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3Decompress8(tjhandle handle, const unsigned char *jpegBuf, + size_t jpegSize, unsigned char *dstBuf, int pitch, + int pixelFormat); + +/** + * Decompress a 12-bit-per-sample JPEG image into a 12-bit-per-sample + * packed-pixel RGB, grayscale, or CMYK image. + * + * \details \copydetails tj3Decompress8() + */ +DLLEXPORT int tj3Decompress12(tjhandle handle, const unsigned char *jpegBuf, + size_t jpegSize, short *dstBuf, int pitch, + int pixelFormat); + +/** + * Decompress a 16-bit-per-sample lossless JPEG image into a 16-bit-per-sample + * packed-pixel RGB, grayscale, or CMYK image. + * + * \details \copydetails tj3Decompress8() + */ +DLLEXPORT int tj3Decompress16(tjhandle handle, const unsigned char *jpegBuf, + size_t jpegSize, unsigned short *dstBuf, + int pitch, int pixelFormat); + + +/** + * Decompress an 8-bit-per-sample JPEG image into an 8-bit-per-sample unified + * planar YUV image. This function performs JPEG decompression but leaves out + * the color conversion step, so a planar YUV image is generated instead of a + * packed-pixel image. The @ref TJPARAM "parameters" that describe the JPEG + * image will be set when this function returns. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * decompression + * + * @param jpegBuf pointer to a byte buffer containing the JPEG image to + * decompress + * + * @param jpegSize size of the JPEG image (in bytes) + * + * @param dstBuf pointer to a buffer that will receive the unified planar YUV + * decompressed image. Use #tj3YUVBufSize() to determine the appropriate size + * for this buffer based on the scaled JPEG width and height (see #TJSCALED(), + * #TJPARAM_JPEGWIDTH, #TJPARAM_JPEGHEIGHT, and #tj3SetScalingFactor()), row + * alignment, and level of chrominance subsampling (see #TJPARAM_SUBSAMP.) The + * Y, U (Cb), and V (Cr) image planes will be stored sequentially in the + * buffer. (Refer to @ref YUVnotes "YUV Image Format Notes".) + * + * @param align row alignment (in bytes) of the YUV image (must be a power of + * 2.) Setting this parameter to n will cause each row in each plane of the + * YUV image to be padded to the nearest multiple of n bytes (1 = unpadded.) + * To generate images suitable for X Video, `align` should be set to 4. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3DecompressToYUV8(tjhandle handle, + const unsigned char *jpegBuf, + size_t jpegSize, + unsigned char *dstBuf, int align); + + +/** + * Decompress an 8-bit-per-sample JPEG image into separate 8-bit-per-sample Y, + * U (Cb), and V (Cr) image planes. This function performs JPEG decompression + * but leaves out the color conversion step, so a planar YUV image is generated + * instead of a packed-pixel image. The @ref TJPARAM "parameters" that + * describe the JPEG image will be set when this function returns. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * decompression + * + * @param jpegBuf pointer to a byte buffer containing the JPEG image to + * decompress + * + * @param jpegSize size of the JPEG image (in bytes) + * + * @param dstPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes + * (or just a Y plane, if decompressing a grayscale image) that will receive + * the decompressed image. These planes can be contiguous or non-contiguous in + * memory. Use #tj3YUVPlaneSize() to determine the appropriate size for each + * plane based on the scaled JPEG width and height (see #TJSCALED(), + * #TJPARAM_JPEGWIDTH, #TJPARAM_JPEGHEIGHT, and #tj3SetScalingFactor()), + * strides, and level of chrominance subsampling (see #TJPARAM_SUBSAMP.) Refer + * to @ref YUVnotes "YUV Image Format Notes" for more details. + * + * @param strides an array of integers, each specifying the number of bytes per + * row in the corresponding plane of the YUV image. Setting the stride for any + * plane to 0 is the same as setting it to the scaled plane width (see + * @ref YUVnotes "YUV Image Format Notes".) If `strides` is NULL, then the + * strides for all planes will be set to their respective scaled plane widths. + * You can adjust the strides in order to add an arbitrary amount of row + * padding to each plane or to decompress the JPEG image into a subregion of a + * larger planar YUV image. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3DecompressToYUVPlanes8(tjhandle handle, + const unsigned char *jpegBuf, + size_t jpegSize, + unsigned char **dstPlanes, + int *strides); + + +/** + * Decode an 8-bit-per-sample unified planar YUV image into an 8-bit-per-sample + * packed-pixel RGB or grayscale image. This function performs color + * conversion (which is accelerated in the libjpeg-turbo implementation) but + * does not execute any of the other steps in the JPEG decompression process. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * decompression + * + * @param srcBuf pointer to a buffer containing a unified planar YUV source + * image to be decoded. The size of this buffer should match the value + * returned by #tj3YUVBufSize() for the given image width, height, row + * alignment, and level of chrominance subsampling (see #TJPARAM_SUBSAMP.) The + * Y, U (Cb), and V (Cr) image planes should be stored sequentially in the + * source buffer. (Refer to @ref YUVnotes "YUV Image Format Notes".) + * + * @param align row alignment (in bytes) of the YUV source image (must be a + * power of 2.) Setting this parameter to n indicates that each row in each + * plane of the YUV source image is padded to the nearest multiple of n bytes + * (1 = unpadded.) + * + * @param dstBuf pointer to a buffer that will receive the packed-pixel decoded + * image. This buffer should normally be `pitch * height` bytes in size. + * However, you can also use this parameter to decode into a specific region of + * a larger buffer. + * + * @param width width (in pixels) of the source and destination images + * + * @param pitch bytes per row in the destination image. Normally this should + * be set to width * #tjPixelSize[pixelFormat], if the destination + * image should be unpadded. (Setting this parameter to 0 is the equivalent of + * setting it to width * #tjPixelSize[pixelFormat].) However, you can + * also use this parameter to specify the row alignment/padding of the + * destination image, to skip rows, or to decode into a specific region of a + * larger buffer. + * + * @param height height (in pixels) of the source and destination images + * + * @param pixelFormat pixel format of the destination image (see @ref TJPF + * "Pixel formats".) + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3DecodeYUV8(tjhandle handle, const unsigned char *srcBuf, + int align, unsigned char *dstBuf, int width, + int pitch, int height, int pixelFormat); + + +/** + * Decode a set of 8-bit-per-sample Y, U (Cb), and V (Cr) image planes into an + * 8-bit-per-sample packed-pixel RGB or grayscale image. This function + * performs color conversion (which is accelerated in the libjpeg-turbo + * implementation) but does not execute any of the other steps in the JPEG + * decompression process. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * decompression + * + * @param srcPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes + * (or just a Y plane, if decoding a grayscale image) that contain a YUV image + * to be decoded. These planes can be contiguous or non-contiguous in memory. + * The size of each plane should match the value returned by #tj3YUVPlaneSize() + * for the given image width, height, strides, and level of chrominance + * subsampling (see #TJPARAM_SUBSAMP.) Refer to @ref YUVnotes + * "YUV Image Format Notes" for more details. + * + * @param strides an array of integers, each specifying the number of bytes per + * row in the corresponding plane of the YUV source image. Setting the stride + * for any plane to 0 is the same as setting it to the plane width (see + * @ref YUVnotes "YUV Image Format Notes".) If `strides` is NULL, then the + * strides for all planes will be set to their respective plane widths. You + * can adjust the strides in order to specify an arbitrary amount of row + * padding in each plane or to decode a subregion of a larger planar YUV image. + * + * @param dstBuf pointer to a buffer that will receive the packed-pixel decoded + * image. This buffer should normally be `pitch * height` bytes in size. + * However, you can also use this parameter to decode into a specific region of + * a larger buffer. + * + * @param width width (in pixels) of the source and destination images + * + * @param pitch bytes per row in the destination image. Normally this should + * be set to width * #tjPixelSize[pixelFormat], if the destination + * image should be unpadded. (Setting this parameter to 0 is the equivalent of + * setting it to width * #tjPixelSize[pixelFormat].) However, you can + * also use this parameter to specify the row alignment/padding of the + * destination image, to skip rows, or to decode into a specific region of a + * larger buffer. + * + * @param height height (in pixels) of the source and destination images + * + * @param pixelFormat pixel format of the destination image (see @ref TJPF + * "Pixel formats".) + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3DecodeYUVPlanes8(tjhandle handle, + const unsigned char * const *srcPlanes, + const int *strides, unsigned char *dstBuf, + int width, int pitch, int height, + int pixelFormat); + + +/** + * Losslessly transform a JPEG image into another JPEG image. Lossless + * transforms work by moving the raw DCT coefficients from one JPEG image + * structure to another without altering the values of the coefficients. While + * this is typically faster than decompressing the image, transforming it, and + * re-compressing it, lossless transforms are not free. Each lossless + * transform requires reading and performing entropy decoding on all of the + * coefficients in the source image, regardless of the size of the destination + * image. Thus, this function provides a means of generating multiple + * transformed images from the same source or applying multiple transformations + * simultaneously, in order to eliminate the need to read the source + * coefficients multiple times. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * lossless transformation + * + * @param jpegBuf pointer to a byte buffer containing the JPEG source image to + * transform + * + * @param jpegSize size of the JPEG source image (in bytes) + * + * @param n the number of transformed JPEG images to generate + * + * @param dstBufs pointer to an array of n byte buffers. `dstBufs[i]` will + * receive a JPEG image that has been transformed using the parameters in + * `transforms[i]`. TurboJPEG has the ability to reallocate the JPEG + * destination buffer to accommodate the size of the transformed JPEG image. + * Thus, you can choose to: + * -# pre-allocate the JPEG destination buffer with an arbitrary size using + * #tj3Alloc() and let TurboJPEG grow the buffer as needed, + * -# set `dstBufs[i]` to NULL to tell TurboJPEG to allocate the buffer for + * you, or + * -# pre-allocate the buffer to a "worst case" size determined by calling + * #tj3JPEGBufSize() with the transformed or cropped width and height and the + * level of subsampling used in the source image. Under normal circumstances, + * this should ensure that the buffer never has to be re-allocated. (Setting + * #TJPARAM_NOREALLOC guarantees that it won't be.) Note, however, that there + * are some rare cases (such as transforming images with a large amount of + * embedded EXIF or ICC profile data) in which the transformed JPEG image will + * be larger than the worst-case size, and #TJPARAM_NOREALLOC cannot be used in + * those cases. + * . + * If you choose option 1, then `dstSizes[i]` should be set to the size of your + * pre-allocated buffer. In any case, unless you have set #TJPARAM_NOREALLOC, + * you should always check `dstBufs[i]` upon return from this function, as it + * may have changed. + * + * @param dstSizes pointer to an array of n size_t variables that will receive + * the actual sizes (in bytes) of each transformed JPEG image. If `dstBufs[i]` + * points to a pre-allocated buffer, then `dstSizes[i]` should be set to the + * size of the buffer. Upon return, `dstSizes[i]` will contain the size of the + * transformed JPEG image (in bytes.) + * + * @param transforms pointer to an array of n #tjtransform structures, each of + * which specifies the transform parameters and/or cropping region for the + * corresponding transformed JPEG image. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3Transform(tjhandle handle, const unsigned char *jpegBuf, + size_t jpegSize, int n, unsigned char **dstBufs, + size_t *dstSizes, const tjtransform *transforms); + + +/** + * Destroy a TurboJPEG instance. + * + * @param handle handle to a TurboJPEG instance. If the handle is NULL, then + * this function has no effect. + */ +DLLEXPORT void tj3Destroy(tjhandle handle); + + +/** + * Allocate a byte buffer for use with TurboJPEG. You should always use this + * function to allocate the JPEG destination buffer(s) for the compression and + * transform functions unless you are disabling automatic buffer (re)allocation + * (by setting #TJPARAM_NOREALLOC.) + * + * @param bytes the number of bytes to allocate + * + * @return a pointer to a newly-allocated buffer with the specified number of + * bytes. + * + * @see tj3Free() + */ +DLLEXPORT void *tj3Alloc(size_t bytes); + + +/** + * Load an 8-bit-per-sample packed-pixel image from disk into memory. + * + * @param handle handle to a TurboJPEG instance + * + * @param filename name of a file containing a packed-pixel image in Windows + * BMP or PBMPLUS (PPM/PGM) format. Windows BMP files require 8-bit-per-sample + * data precision. If the data precision of the PBMPLUS file does not match + * the target data precision, then upconverting or downconverting will be + * performed. + * + * @param width pointer to an integer variable that will receive the width (in + * pixels) of the packed-pixel image + * + * @param align row alignment (in samples) of the packed-pixel buffer to be + * returned (must be a power of 2.) Setting this parameter to n will cause all + * rows in the buffer to be padded to the nearest multiple of n samples + * (1 = unpadded.) + * + * @param height pointer to an integer variable that will receive the height + * (in pixels) of the packed-pixel image + * + * @param pixelFormat pointer to an integer variable that specifies or will + * receive the pixel format of the packed-pixel buffer. The behavior of this + * function will vary depending on the value of `*pixelFormat` passed to the + * function: + * - @ref TJPF_UNKNOWN : The packed-pixel buffer returned by this function will + * use the most optimal pixel format for the file type, and `*pixelFormat` will + * contain the ID of that pixel format upon successful return from this + * function. + * - @ref TJPF_GRAY : Only PGM files and 8-bit-per-pixel BMP files with a + * grayscale colormap can be loaded. + * - @ref TJPF_CMYK : The RGB or grayscale pixels stored in the file will be + * converted using a quick & dirty algorithm that is suitable only for testing + * purposes. (Proper conversion between CMYK and other formats requires a + * color management system.) + * - Other @ref TJPF "pixel formats" : The packed-pixel buffer will use the + * specified pixel format, and pixel format conversion will be performed if + * necessary. + * + * @return a pointer to a newly-allocated buffer containing the packed-pixel + * image, converted to the chosen pixel format and with the chosen row + * alignment, or NULL if an error occurred (see #tj3GetErrorStr().) This + * buffer should be freed using #tj3Free(). + */ +DLLEXPORT unsigned char *tj3LoadImage8(tjhandle handle, const char *filename, + int *width, int align, int *height, + int *pixelFormat); + +/** + * Load a 12-bit-per-sample packed-pixel image from disk into memory. + * + * \details \copydetails tj3LoadImage8() + */ +DLLEXPORT short *tj3LoadImage12(tjhandle handle, const char *filename, + int *width, int align, int *height, + int *pixelFormat); + +/** + * Load a 16-bit-per-sample packed-pixel image from disk into memory. + * + * \details \copydetails tj3LoadImage8() + */ +DLLEXPORT unsigned short *tj3LoadImage16(tjhandle handle, const char *filename, + int *width, int align, int *height, + int *pixelFormat); + + +/** + * Save an 8-bit-per-sample packed-pixel image from memory to disk. + * + * @param handle handle to a TurboJPEG instance + * + * @param filename name of a file to which to save the packed-pixel image. The + * image will be stored in Windows BMP or PBMPLUS (PPM/PGM) format, depending + * on the file extension. Windows BMP files require 8-bit-per-sample data + * precision. + * + * @param buffer pointer to a buffer containing a packed-pixel RGB, grayscale, + * or CMYK image to be saved + * + * @param width width (in pixels) of the packed-pixel image + * + * @param pitch samples per row in the packed-pixel image. Setting this + * parameter to 0 is the equivalent of setting it to + * width * #tjPixelSize[pixelFormat]. + * + * @param height height (in pixels) of the packed-pixel image + * + * @param pixelFormat pixel format of the packed-pixel image (see @ref TJPF + * "Pixel formats".) If this parameter is set to @ref TJPF_GRAY, then the + * image will be stored in PGM or 8-bit-per-pixel (indexed color) BMP format. + * Otherwise, the image will be stored in PPM or 24-bit-per-pixel BMP format. + * If this parameter is set to @ref TJPF_CMYK, then the CMYK pixels will be + * converted to RGB using a quick & dirty algorithm that is suitable only for + * testing purposes. (Proper conversion between CMYK and other formats + * requires a color management system.) + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr().) + */ +DLLEXPORT int tj3SaveImage8(tjhandle handle, const char *filename, + const unsigned char *buffer, int width, int pitch, + int height, int pixelFormat); + +/** + * Save a 12-bit-per-sample packed-pixel image from memory to disk. + * + * \details \copydetails tj3SaveImage8() + */ +DLLEXPORT int tj3SaveImage12(tjhandle handle, const char *filename, + const short *buffer, int width, int pitch, + int height, int pixelFormat); + +/** + * Save a 16-bit-per-sample packed-pixel image from memory to disk. + * + * \details \copydetails tj3SaveImage8() + */ +DLLEXPORT int tj3SaveImage16(tjhandle handle, const char *filename, + const unsigned short *buffer, int width, + int pitch, int height, int pixelFormat); + + +/** + * Free a byte buffer previously allocated by TurboJPEG. You should always use + * this function to free JPEG destination buffer(s) that were automatically + * (re)allocated by the compression and transform functions or that were + * manually allocated using #tj3Alloc(). + * + * @param buffer address of the buffer to free. If the address is NULL, then + * this function has no effect. + * + * @see tj3Alloc() + */ +DLLEXPORT void tj3Free(void *buffer); + + +/** + * Returns a descriptive error message explaining why the last command failed. + * + * @param handle handle to a TurboJPEG instance, or NULL if the error was + * generated by a global function (but note that retrieving the error message + * for a global function is thread-safe only on platforms that support + * thread-local storage.) + * + * @return a descriptive error message explaining why the last command failed. + */ +DLLEXPORT char *tj3GetErrorStr(tjhandle handle); + + +/** + * Returns a code indicating the severity of the last error. See + * @ref TJERR "Error codes". + * + * @param handle handle to a TurboJPEG instance + * + * @return a code indicating the severity of the last error. See + * @ref TJERR "Error codes". + */ +DLLEXPORT int tj3GetErrorCode(tjhandle handle); + + +/* Backward compatibility functions and macros (nothing to see here) */ + +/* TurboJPEG 1.0+ */ + +#define NUMSUBOPT TJ_NUMSAMP +#define TJ_444 TJSAMP_444 +#define TJ_422 TJSAMP_422 +#define TJ_420 TJSAMP_420 +#define TJ_411 TJSAMP_420 +#define TJ_GRAYSCALE TJSAMP_GRAY + +#define TJ_BGR 1 +#define TJ_BOTTOMUP TJFLAG_BOTTOMUP +#define TJ_FORCEMMX TJFLAG_FORCEMMX +#define TJ_FORCESSE TJFLAG_FORCESSE +#define TJ_FORCESSE2 TJFLAG_FORCESSE2 +#define TJ_ALPHAFIRST 64 +#define TJ_FORCESSE3 TJFLAG_FORCESSE3 +#define TJ_FASTUPSAMPLE TJFLAG_FASTUPSAMPLE + +#define TJPAD(width) (((width) + 3) & (~3)) + +DLLEXPORT unsigned long TJBUFSIZE(int width, int height); + +DLLEXPORT int tjCompress(tjhandle handle, unsigned char *srcBuf, int width, + int pitch, int height, int pixelSize, + unsigned char *dstBuf, unsigned long *compressedSize, + int jpegSubsamp, int jpegQual, int flags); + +DLLEXPORT int tjDecompress(tjhandle handle, unsigned char *jpegBuf, + unsigned long jpegSize, unsigned char *dstBuf, + int width, int pitch, int height, int pixelSize, + int flags); + +DLLEXPORT int tjDecompressHeader(tjhandle handle, unsigned char *jpegBuf, + unsigned long jpegSize, int *width, + int *height); + +DLLEXPORT int tjDestroy(tjhandle handle); + +DLLEXPORT char *tjGetErrorStr(void); + +DLLEXPORT tjhandle tjInitCompress(void); + +DLLEXPORT tjhandle tjInitDecompress(void); + +/* TurboJPEG 1.1+ */ + +#define TJ_YUV 512 + +DLLEXPORT unsigned long TJBUFSIZEYUV(int width, int height, int jpegSubsamp); + +DLLEXPORT int tjDecompressHeader2(tjhandle handle, unsigned char *jpegBuf, + unsigned long jpegSize, int *width, + int *height, int *jpegSubsamp); + +DLLEXPORT int tjDecompressToYUV(tjhandle handle, unsigned char *jpegBuf, + unsigned long jpegSize, unsigned char *dstBuf, + int flags); + +DLLEXPORT int tjEncodeYUV(tjhandle handle, unsigned char *srcBuf, int width, + int pitch, int height, int pixelSize, + unsigned char *dstBuf, int subsamp, int flags); + +/* TurboJPEG 1.2+ */ + +#define TJFLAG_BOTTOMUP 2 +#define TJFLAG_FORCEMMX 8 +#define TJFLAG_FORCESSE 16 +#define TJFLAG_FORCESSE2 32 +#define TJFLAG_FORCESSE3 128 +#define TJFLAG_FASTUPSAMPLE 256 +#define TJFLAG_NOREALLOC 1024 + +DLLEXPORT unsigned char *tjAlloc(int bytes); + +DLLEXPORT unsigned long tjBufSize(int width, int height, int jpegSubsamp); + +DLLEXPORT unsigned long tjBufSizeYUV(int width, int height, int subsamp); + +DLLEXPORT int tjCompress2(tjhandle handle, const unsigned char *srcBuf, + int width, int pitch, int height, int pixelFormat, + unsigned char **jpegBuf, unsigned long *jpegSize, + int jpegSubsamp, int jpegQual, int flags); + +DLLEXPORT int tjDecompress2(tjhandle handle, const unsigned char *jpegBuf, + unsigned long jpegSize, unsigned char *dstBuf, + int width, int pitch, int height, int pixelFormat, + int flags); + +DLLEXPORT int tjEncodeYUV2(tjhandle handle, unsigned char *srcBuf, int width, + int pitch, int height, int pixelFormat, + unsigned char *dstBuf, int subsamp, int flags); + +DLLEXPORT void tjFree(unsigned char *buffer); + +DLLEXPORT tjscalingfactor *tjGetScalingFactors(int *numscalingfactors); + +DLLEXPORT tjhandle tjInitTransform(void); + +DLLEXPORT int tjTransform(tjhandle handle, const unsigned char *jpegBuf, + unsigned long jpegSize, int n, + unsigned char **dstBufs, unsigned long *dstSizes, + tjtransform *transforms, int flags); + +/* TurboJPEG 1.2.1+ */ + +#define TJFLAG_FASTDCT 2048 +#define TJFLAG_ACCURATEDCT 4096 + +/* TurboJPEG 1.4+ */ + +DLLEXPORT unsigned long tjBufSizeYUV2(int width, int align, int height, + int subsamp); + +DLLEXPORT int tjCompressFromYUV(tjhandle handle, const unsigned char *srcBuf, + int width, int align, int height, int subsamp, + unsigned char **jpegBuf, + unsigned long *jpegSize, int jpegQual, + int flags); + +DLLEXPORT int tjCompressFromYUVPlanes(tjhandle handle, + const unsigned char **srcPlanes, + int width, const int *strides, + int height, int subsamp, + unsigned char **jpegBuf, + unsigned long *jpegSize, int jpegQual, + int flags); + +DLLEXPORT int tjDecodeYUV(tjhandle handle, const unsigned char *srcBuf, + int align, int subsamp, unsigned char *dstBuf, + int width, int pitch, int height, int pixelFormat, + int flags); + +DLLEXPORT int tjDecodeYUVPlanes(tjhandle handle, + const unsigned char **srcPlanes, + const int *strides, int subsamp, + unsigned char *dstBuf, int width, int pitch, + int height, int pixelFormat, int flags); + +DLLEXPORT int tjDecompressHeader3(tjhandle handle, + const unsigned char *jpegBuf, + unsigned long jpegSize, int *width, + int *height, int *jpegSubsamp, + int *jpegColorspace); + +DLLEXPORT int tjDecompressToYUV2(tjhandle handle, const unsigned char *jpegBuf, + unsigned long jpegSize, unsigned char *dstBuf, + int width, int align, int height, int flags); + +DLLEXPORT int tjDecompressToYUVPlanes(tjhandle handle, + const unsigned char *jpegBuf, + unsigned long jpegSize, + unsigned char **dstPlanes, int width, + int *strides, int height, int flags); + +DLLEXPORT int tjEncodeYUV3(tjhandle handle, const unsigned char *srcBuf, + int width, int pitch, int height, int pixelFormat, + unsigned char *dstBuf, int align, int subsamp, + int flags); + +DLLEXPORT int tjEncodeYUVPlanes(tjhandle handle, const unsigned char *srcBuf, + int width, int pitch, int height, + int pixelFormat, unsigned char **dstPlanes, + int *strides, int subsamp, int flags); + +DLLEXPORT int tjPlaneHeight(int componentID, int height, int subsamp); + +DLLEXPORT unsigned long tjPlaneSizeYUV(int componentID, int width, int stride, + int height, int subsamp); + +DLLEXPORT int tjPlaneWidth(int componentID, int width, int subsamp); + +/* TurboJPEG 2.0+ */ + +#define TJFLAG_STOPONWARNING 8192 +#define TJFLAG_PROGRESSIVE 16384 + +DLLEXPORT int tjGetErrorCode(tjhandle handle); + +DLLEXPORT char *tjGetErrorStr2(tjhandle handle); + +DLLEXPORT unsigned char *tjLoadImage(const char *filename, int *width, + int align, int *height, int *pixelFormat, + int flags); + +DLLEXPORT int tjSaveImage(const char *filename, unsigned char *buffer, + int width, int pitch, int height, int pixelFormat, + int flags); + +/* TurboJPEG 2.1+ */ + +#define TJFLAG_LIMITSCANS 32768 + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/vcpkg/installed/x64-osx/include/x265.h b/vcpkg/installed/x64-osx/include/x265.h new file mode 100644 index 0000000..4452526 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/x265.h @@ -0,0 +1,2674 @@ +/***************************************************************************** + * Copyright (C) 2013-2020 MulticoreWare, Inc + * + * Authors: Steve Borho + * Min Chen + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. + * + * This program is also available under a commercial proprietary license. + * For more information, contact us at license @ x265.com. + *****************************************************************************/ + +#ifndef X265_H +#define X265_H +#include +#include +#include +#include "x265_config.h" +#ifdef __cplusplus +extern "C" { +#endif + +#if _MSC_VER +#pragma warning(disable: 4201) // non-standard extension used (nameless struct/union) +#endif + +/* x265_encoder: + * opaque handler for encoder */ +typedef struct x265_encoder x265_encoder; + +/* x265_picyuv: + * opaque handler for PicYuv */ +typedef struct x265_picyuv x265_picyuv; + +/* Application developers planning to link against a shared library version of + * libx265 from a Microsoft Visual Studio or similar development environment + * will need to define X265_API_IMPORTS before including this header. + * This clause does not apply to MinGW, similar development environments, or non + * Windows platforms. */ +#ifdef X265_API_IMPORTS +#define X265_API __declspec(dllimport) +#else +#define X265_API +#endif + +typedef enum +{ + NAL_UNIT_CODED_SLICE_TRAIL_N = 0, + NAL_UNIT_CODED_SLICE_TRAIL_R, + NAL_UNIT_CODED_SLICE_TSA_N, + NAL_UNIT_CODED_SLICE_TSA_R, + NAL_UNIT_CODED_SLICE_STSA_N, + NAL_UNIT_CODED_SLICE_STSA_R, + NAL_UNIT_CODED_SLICE_RADL_N, + NAL_UNIT_CODED_SLICE_RADL_R, + NAL_UNIT_CODED_SLICE_RASL_N, + NAL_UNIT_CODED_SLICE_RASL_R, + NAL_UNIT_CODED_SLICE_BLA_W_LP = 16, + NAL_UNIT_CODED_SLICE_BLA_W_RADL, + NAL_UNIT_CODED_SLICE_BLA_N_LP, + NAL_UNIT_CODED_SLICE_IDR_W_RADL, + NAL_UNIT_CODED_SLICE_IDR_N_LP, + NAL_UNIT_CODED_SLICE_CRA, + NAL_UNIT_VPS = 32, + NAL_UNIT_SPS, + NAL_UNIT_PPS, + NAL_UNIT_ACCESS_UNIT_DELIMITER, + NAL_UNIT_EOS, + NAL_UNIT_EOB, + NAL_UNIT_FILLER_DATA, + NAL_UNIT_PREFIX_SEI, + NAL_UNIT_SUFFIX_SEI, + NAL_UNIT_UNSPECIFIED = 62, + NAL_UNIT_INVALID = 64, +} NalUnitType; + +/* The data within the payload is already NAL-encapsulated; the type is merely + * in the struct for easy access by the calling application. All data returned + * in an x265_nal, including the data in payload, is no longer valid after the + * next call to x265_encoder_encode. Thus it must be used or copied before + * calling x265_encoder_encode again. */ +typedef struct x265_nal +{ + uint32_t type; /* NalUnitType */ + uint32_t sizeBytes; /* size in bytes */ + uint8_t* payload; +} x265_nal; + +#define X265_LOOKAHEAD_MAX 250 + +typedef struct x265_lookahead_data +{ + int64_t plannedSatd[X265_LOOKAHEAD_MAX + 1]; + uint32_t *vbvCost; + uint32_t *intraVbvCost; + uint32_t *satdForVbv; + uint32_t *intraSatdForVbv; + int keyframe; + int lastMiniGopBFrame; + int plannedType[X265_LOOKAHEAD_MAX + 1]; + int64_t dts; + int64_t reorderedPts; +} x265_lookahead_data; + +typedef struct x265_analysis_validate +{ + int maxNumReferences; + int analysisReuseLevel; + int sourceWidth; + int sourceHeight; + int keyframeMax; + int keyframeMin; + int openGOP; + int bframes; + int bPyramid; + int maxCUSize; + int minCUSize; + int intraRefresh; + int lookaheadDepth; + int chunkStart; + int chunkEnd; + int cuTree; + int ctuDistortionRefine; + int rightOffset; + int bottomOffset; + int frameDuplication; +}x265_analysis_validate; + +/* Stores intra analysis data for a single frame. This struct needs better packing */ +typedef struct x265_analysis_intra_data +{ + uint8_t* depth; + uint8_t* modes; + char* partSizes; + uint8_t* chromaModes; + int8_t* cuQPOff; +}x265_analysis_intra_data; + +typedef struct x265_analysis_MV +{ + union{ + struct { int32_t x, y; }; + + int64_t word; + }; +}x265_analysis_MV; + +/* Stores inter analysis data for a single frame */ +typedef struct x265_analysis_inter_data +{ + int32_t* ref; + uint8_t* depth; + uint8_t* modes; + uint8_t* partSize; + uint8_t* mergeFlag; + uint8_t* interDir; + uint8_t* mvpIdx[2]; + int8_t* refIdx[2]; + x265_analysis_MV* mv[2]; + int64_t* sadCost; + int8_t* cuQPOff; +}x265_analysis_inter_data; + +typedef struct x265_weight_param +{ + uint32_t log2WeightDenom; + int inputWeight; + int inputOffset; + int wtPresent; +}x265_weight_param; + +#if X265_DEPTH < 10 +typedef uint32_t sse_t; +#else +typedef uint64_t sse_t; +#endif + +#define CTU_DISTORTION_OFF 0 +#define CTU_DISTORTION_INTERNAL 1 +#define CTU_DISTORTION_EXTERNAL 2 + +typedef struct x265_analysis_distortion_data +{ + sse_t* ctuDistortion; + double* scaledDistortion; + double averageDistortion; + double sdDistortion; + uint32_t highDistortionCtuCount; + uint32_t lowDistortionCtuCount; + double* offset; + double* threshold; + +}x265_analysis_distortion_data; + +#define MAX_NUM_REF 16 +#define EDGE_BINS 2 +#define MAX_HIST_BINS 1024 + +/* Stores all analysis data for a single frame */ +typedef struct x265_analysis_data +{ + int64_t satdCost; + uint32_t frameRecordSize; + uint32_t poc; + uint32_t sliceType; + uint32_t numCUsInFrame; + uint32_t numPartitions; + uint32_t depthBytes; + int32_t edgeHist[EDGE_BINS]; + int32_t yuvHist[3][MAX_HIST_BINS]; + int bScenecut; + x265_weight_param* wt; + x265_analysis_inter_data* interData; + x265_analysis_intra_data* intraData; + uint32_t numCuInHeight; + x265_lookahead_data lookahead; + uint8_t* modeFlag[2]; + x265_analysis_validate saveParam; + x265_analysis_distortion_data* distortionData; + uint64_t frameBits; + int list0POC[MAX_NUM_REF]; + int list1POC[MAX_NUM_REF]; + double totalIntraPercent; +} x265_analysis_data; + +/* cu statistics */ +typedef struct x265_cu_stats +{ + double percentSkipCu[4]; // Percentage of skip cu in all depths + double percentMergeCu[4]; // Percentage of merge cu in all depths + double percentIntraDistribution[4][3]; // Percentage of DC, Planar, Angular intra modes in all depths + double percentInterDistribution[4][3]; // Percentage of 2Nx2N inter, rect and amp in all depths + double percentIntraNxN; // Percentage of 4x4 cu + + /* All the above values will add up to 100%. */ +} x265_cu_stats; + + +/* pu statistics */ +typedef struct x265_pu_stats +{ + double percentSkipPu[4]; // Percentage of skip cu in all depths + double percentIntraPu[4]; // Percentage of intra modes in all depths + double percentAmpPu[4]; // Percentage of amp modes in all depths + double percentInterPu[4][3]; // Percentage of inter 2nx2n, 2nxn and nx2n in all depths + double percentMergePu[4][3]; // Percentage of merge 2nx2n, 2nxn and nx2n in all depth + double percentNxN; + + /* All the above values will add up to 100%. */ +} x265_pu_stats; + +/* Frame level statistics */ +typedef struct x265_frame_stats +{ + double qp; + double rateFactor; + double psnrY; + double psnrU; + double psnrV; + double psnr; + double ssim; + double decideWaitTime; + double row0WaitTime; + double wallTime; + double refWaitWallTime; + double totalCTUTime; + double stallTime; + double avgWPP; + double avgLumaDistortion; + double avgChromaDistortion; + double avgPsyEnergy; + double avgResEnergy; + double avgLumaLevel; + double bufferFill; + uint64_t bits; + int encoderOrder; + int poc; + int countRowBlocks; + int list0POC[MAX_NUM_REF]; + int list1POC[MAX_NUM_REF]; + uint16_t maxLumaLevel; + uint16_t minLumaLevel; + + uint16_t maxChromaULevel; + uint16_t minChromaULevel; + double avgChromaULevel; + + + uint16_t maxChromaVLevel; + uint16_t minChromaVLevel; + double avgChromaVLevel; + + char sliceType; + int bScenecut; + double ipCostRatio; + int frameLatency; + x265_cu_stats cuStats; + x265_pu_stats puStats; + double totalFrameTime; + double vmafFrameScore; + double bufferFillFinal; + double unclippedBufferFillFinal; + uint8_t tLayer; +} x265_frame_stats; + +typedef struct x265_ctu_info_t +{ + int32_t ctuAddress; + int32_t ctuPartitions[64]; + void* ctuInfo; +} x265_ctu_info_t; + +typedef enum +{ + NO_CTU_INFO = 0, + HAS_CTU_INFO = 1, + CTU_INFO_CHANGE = 2, +}CTUInfo; + +typedef enum +{ + DEFAULT = 0, + AVC_INFO = 1, + HEVC_INFO = 2, +}AnalysisRefineType; + +/* Arbitrary User SEI + * Payload size is in bytes and the payload pointer must be non-NULL. + * Payload types and syntax can be found in Annex D of the H.265 Specification. + * SEI Payload Alignment bits as described in Annex D must be included at the + * end of the payload if needed. The payload should not be NAL-encapsulated. + * Payloads are written in the order of input */ + +typedef enum +{ + BUFFERING_PERIOD = 0, + PICTURE_TIMING = 1, + PAN_SCAN_RECT = 2, + FILLER_PAYLOAD = 3, + USER_DATA_REGISTERED_ITU_T_T35 = 4, + USER_DATA_UNREGISTERED = 5, + RECOVERY_POINT = 6, + SCENE_INFO = 9, + FULL_FRAME_SNAPSHOT = 15, + PROGRESSIVE_REFINEMENT_SEGMENT_START = 16, + PROGRESSIVE_REFINEMENT_SEGMENT_END = 17, + FILM_GRAIN_CHARACTERISTICS = 19, + POST_FILTER_HINT = 22, + TONE_MAPPING_INFO = 23, + FRAME_PACKING = 45, + DISPLAY_ORIENTATION = 47, + SOP_DESCRIPTION = 128, + ACTIVE_PARAMETER_SETS = 129, + DECODING_UNIT_INFO = 130, + TEMPORAL_LEVEL0_INDEX = 131, + DECODED_PICTURE_HASH = 132, + SCALABLE_NESTING = 133, + REGION_REFRESH_INFO = 134, + MASTERING_DISPLAY_INFO = 137, + CONTENT_LIGHT_LEVEL_INFO = 144, + ALTERNATIVE_TRANSFER_CHARACTERISTICS = 147, +} SEIPayloadType; + +typedef struct x265_sei_payload +{ + int payloadSize; + SEIPayloadType payloadType; + uint8_t* payload; +} x265_sei_payload; + +typedef struct x265_sei +{ + int numPayloads; + x265_sei_payload *payloads; +} x265_sei; + +typedef struct x265_dolby_vision_rpu +{ + int payloadSize; + uint8_t* payload; +}x265_dolby_vision_rpu; + +/* Used to pass pictures into the encoder, and to get picture data back out of + * the encoder. The input and output semantics are different */ +typedef struct x265_picture +{ + /* presentation time stamp: user-specified, returned on output */ + int64_t pts; + + /* display time stamp: ignored on input, copied from reordered pts. Returned + * on output */ + int64_t dts; + + /* force quantizer for != X265_QP_AUTO */ + /* The value provided on input is returned with the same picture (POC) on + * output */ + void* userData; + + /* Must be specified on input pictures, the number of planes is determined + * by the colorSpace value */ + void* planes[3]; + + /* Stride is the number of bytes between row starts */ + int stride[3]; + + /* Must be specified on input pictures. x265_picture_init() will set it to + * the encoder's internal bit depth, but this field must describe the depth + * of the input pictures. Must be between 8 and 16. Values larger than 8 + * imply 16bits per input sample. If input bit depth is larger than the + * internal bit depth, the encoder will down-shift pixels. Input samples + * larger than 8bits will be masked to internal bit depth. On output the + * bitDepth will be the internal encoder bit depth */ + int bitDepth; + + /* Must be specified on input pictures: X265_TYPE_AUTO or other. + * x265_picture_init() sets this to auto, returned on output */ + int sliceType; + + /* Ignored on input, set to picture count, returned on output */ + int poc; + + /* Must be specified on input pictures: X265_CSP_I420 or other. It must + * match the internal color space of the encoder. x265_picture_init() will + * initialize this value to the internal color space */ + int colorSpace; + + /* Force the slice base QP for this picture within the encoder. Set to 0 + * to allow the encoder to determine base QP */ + int forceqp; + + /* If param.analysisLoad and param.analysisSave are disabled, this field is + * ignored on input and output. Else the user must call x265_alloc_analysis_data() + * to allocate analysis buffers for every picture passed to the encoder. + * + * On input when param.analysisLoad is enabled and analysisData + * member pointers are valid, the encoder will use the data stored here to + * reduce encoder work. + * + * On output when param.analysisSave is enabled and analysisData + * member pointers are valid, the encoder will write output analysis into + * this data structure */ + x265_analysis_data analysisData; + + /* An array of quantizer offsets to be applied to this image during encoding. + * These are added on top of the decisions made by rateControl. + * Adaptive quantization must be enabled to use this feature. These quantizer + * offsets should be given for each 16x16 block (8x8 block, when qg-size is 8). + * Behavior if quant offsets differ between encoding passes is undefined. */ + float *quantOffsets; + + /* Frame level statistics */ + x265_frame_stats frameData; + + /* User defined SEI */ + x265_sei userSEI; + + /* Ratecontrol statistics for collecting the ratecontrol information. + * It is not used for collecting the last pass ratecontrol data in + * multi pass ratecontrol mode. */ + void* rcData; + + size_t framesize; + + int height; + + // pts is reordered in the order of encoding. + int64_t reorderedPts; + + //Dolby Vision RPU metadata + x265_dolby_vision_rpu rpu; + + int fieldNum; + + //SEI picture structure message + uint32_t picStruct; + + int width; +} x265_picture; + +typedef enum +{ + X265_DIA_SEARCH, + X265_HEX_SEARCH, + X265_UMH_SEARCH, + X265_STAR_SEARCH, + X265_SEA, + X265_FULL_SEARCH +} X265_ME_METHODS; + +/* CPU flags */ + +/* x86 */ +#define X265_CPU_MMX (1 << 0) +#define X265_CPU_MMX2 (1 << 1) /* MMX2 aka MMXEXT aka ISSE */ +#define X265_CPU_MMXEXT X265_CPU_MMX2 +#define X265_CPU_SSE (1 << 2) +#define X265_CPU_SSE2 (1 << 3) +#define X265_CPU_LZCNT (1 << 4) +#define X265_CPU_SSE3 (1 << 5) +#define X265_CPU_SSSE3 (1 << 6) +#define X265_CPU_SSE4 (1 << 7) /* SSE4.1 */ +#define X265_CPU_SSE42 (1 << 8) /* SSE4.2 */ +#define X265_CPU_AVX (1 << 9) /* Requires OS support even if YMM registers aren't used. */ +#define X265_CPU_XOP (1 << 10) /* AMD XOP */ +#define X265_CPU_FMA4 (1 << 11) /* AMD FMA4 */ +#define X265_CPU_FMA3 (1 << 12) /* Intel FMA3 */ +#define X265_CPU_BMI1 (1 << 13) /* BMI1 */ +#define X265_CPU_BMI2 (1 << 14) /* BMI2 */ +#define X265_CPU_AVX2 (1 << 15) /* AVX2 */ +#define X265_CPU_AVX512 (1 << 16) /* AVX-512 {F, CD, BW, DQ, VL}, requires OS support */ +/* x86 modifiers */ +#define X265_CPU_CACHELINE_32 (1 << 17) /* avoid memory loads that span the border between two cachelines */ +#define X265_CPU_CACHELINE_64 (1 << 18) /* 32/64 is the size of a cacheline in bytes */ +#define X265_CPU_SSE2_IS_SLOW (1 << 19) /* avoid most SSE2 functions on Athlon64 */ +#define X265_CPU_SSE2_IS_FAST (1 << 20) /* a few functions are only faster on Core2 and Phenom */ +#define X265_CPU_SLOW_SHUFFLE (1 << 21) /* The Conroe has a slow shuffle unit (relative to overall SSE performance) */ +#define X265_CPU_STACK_MOD4 (1 << 22) /* if stack is only mod4 and not mod16 */ +#define X265_CPU_SLOW_ATOM (1 << 23) /* The Atom is terrible: slow SSE unaligned loads, slow + * SIMD multiplies, slow SIMD variable shifts, slow pshufb, + * cacheline split penalties -- gather everything here that + * isn't shared by other CPUs to avoid making half a dozen + * new SLOW flags. */ +#define X265_CPU_SLOW_PSHUFB (1 << 24) /* such as on the Intel Atom */ +#define X265_CPU_SLOW_PALIGNR (1 << 25) /* such as on the AMD Bobcat */ + +/* ARM */ +#define X265_CPU_ARMV6 0x0000001 +#define X265_CPU_NEON 0x0000002 /* ARM NEON */ +#define X265_CPU_SVE2 0x0000008 /* ARM SVE2 */ +#define X265_CPU_SVE 0x0000010 /* ARM SVE2 */ +#define X265_CPU_FAST_NEON_MRC 0x0000004 /* Transfer from NEON to ARM register is fast (Cortex-A9) */ + +/* IBM Power8 */ +#define X265_CPU_ALTIVEC 0x0000001 + +#define X265_MAX_SUBPEL_LEVEL 7 + +/* Log level */ +#define X265_LOG_NONE (-1) +#define X265_LOG_ERROR 0 +#define X265_LOG_WARNING 1 +#define X265_LOG_INFO 2 +#define X265_LOG_DEBUG 3 +#define X265_LOG_FULL 4 + +#define X265_B_ADAPT_NONE 0 +#define X265_B_ADAPT_FAST 1 +#define X265_B_ADAPT_TRELLIS 2 + +#define X265_REF_LIMIT_DEPTH 1 +#define X265_REF_LIMIT_CU 2 + +#define X265_TU_LIMIT_BFS 1 +#define X265_TU_LIMIT_DFS 2 +#define X265_TU_LIMIT_NEIGH 4 + +#define X265_BFRAME_MAX 16 +#define X265_MAX_FRAME_THREADS 16 + +#define X265_TYPE_AUTO 0x0000 /* Let x265 choose the right type */ +#define X265_TYPE_IDR 0x0001 +#define X265_TYPE_I 0x0002 +#define X265_TYPE_P 0x0003 +#define X265_TYPE_BREF 0x0004 /* Non-disposable B-frame */ +#define X265_TYPE_B 0x0005 +#define IS_X265_TYPE_I(x) ((x) == X265_TYPE_I || (x) == X265_TYPE_IDR) +#define IS_X265_TYPE_B(x) ((x) == X265_TYPE_B || (x) == X265_TYPE_BREF) + +#define X265_QP_AUTO 0 + +#define X265_AQ_NONE 0 +#define X265_AQ_VARIANCE 1 +#define X265_AQ_AUTO_VARIANCE 2 +#define X265_AQ_AUTO_VARIANCE_BIASED 3 +#define X265_AQ_EDGE 4 +#define x265_ADAPT_RD_STRENGTH 4 +#define X265_REFINE_INTER_LEVELS 3 +/* NOTE! For this release only X265_CSP_I420 and X265_CSP_I444 are supported */ +/* Supported internal color space types (according to semantics of chroma_format_idc) */ +#define X265_CSP_I400 0 /* yuv 4:0:0 planar */ +#define X265_CSP_I420 1 /* yuv 4:2:0 planar */ +#define X265_CSP_I422 2 /* yuv 4:2:2 planar */ +#define X265_CSP_I444 3 /* yuv 4:4:4 planar */ +#define X265_CSP_COUNT 4 /* Number of supported internal color spaces */ + +/* These color spaces will eventually be supported as input pictures. The pictures will + * be converted to the appropriate planar color spaces at ingest */ +#define X265_CSP_NV12 4 /* yuv 4:2:0, with one y plane and one packed u+v */ +#define X265_CSP_NV16 5 /* yuv 4:2:2, with one y plane and one packed u+v */ + +/* Interleaved color-spaces may eventually be supported as input pictures */ +#define X265_CSP_BGR 6 /* packed bgr 24bits */ +#define X265_CSP_BGRA 7 /* packed bgr 32bits */ +#define X265_CSP_RGB 8 /* packed rgb 24bits */ +#define X265_CSP_MAX 9 /* end of list */ +#define X265_EXTENDED_SAR 255 /* aspect ratio explicitly specified as width:height */ +/* Analysis options */ +#define X265_ANALYSIS_OFF 0 +#define X265_ANALYSIS_SAVE 1 +#define X265_ANALYSIS_LOAD 2 + +#define FORWARD 1 +#define BACKWARD 2 +#define BI_DIRECTIONAL 3 +#define SLICE_TYPE_DELTA 0.3 /* The offset decremented or incremented for P-frames or b-frames respectively*/ +#define BACKWARD_WINDOW 1 /* Scenecut window before a scenecut */ +#define FORWARD_WINDOW 2 /* Scenecut window after a scenecut */ +#define BWD_WINDOW_DELTA 0.4 + +#define X265_MAX_GOP_CONFIG 3 +#define X265_MAX_GOP_LENGTH 16 +#define MAX_T_LAYERS 7 + +#define X265_IPRATIO_STRENGTH 1.43 + +typedef struct x265_cli_csp +{ + int planes; + int width[3]; + int height[3]; +} x265_cli_csp; + +static const x265_cli_csp x265_cli_csps[] = +{ + { 1, { 0, 0, 0 }, { 0, 0, 0 } }, /* i400 */ + { 3, { 0, 1, 1 }, { 0, 1, 1 } }, /* i420 */ + { 3, { 0, 1, 1 }, { 0, 0, 0 } }, /* i422 */ + { 3, { 0, 0, 0 }, { 0, 0, 0 } }, /* i444 */ + { 2, { 0, 0 }, { 0, 1 } }, /* nv12 */ + { 2, { 0, 0 }, { 0, 0 } }, /* nv16 */ +}; + +/* rate tolerance method */ +typedef enum +{ + X265_RC_ABR, + X265_RC_CQP, + X265_RC_CRF +} X265_RC_METHODS; + +/* slice type statistics */ +typedef struct x265_sliceType_stats +{ + double avgQp; + double bitrate; + double psnrY; + double psnrU; + double psnrV; + double ssim; + uint32_t numPics; +} x265_sliceType_stats; + +/* Output statistics from encoder */ +typedef struct x265_stats +{ + double globalPsnrY; + double globalPsnrU; + double globalPsnrV; + double globalPsnr; + double globalSsim; + double elapsedEncodeTime; /* wall time since encoder was opened */ + double elapsedVideoTime; /* encoded picture count / frame rate */ + double bitrate; /* accBits / elapsed video time */ + double aggregateVmafScore; /* aggregate VMAF score for input video*/ + uint64_t accBits; /* total bits output thus far */ + uint32_t encodedPictureCount; /* number of output pictures thus far */ + uint32_t totalWPFrames; /* number of uni-directional weighted frames used */ + x265_sliceType_stats statsI; /* statistics of I slice */ + x265_sliceType_stats statsP; /* statistics of P slice */ + x265_sliceType_stats statsB; /* statistics of B slice */ + uint16_t maxCLL; /* maximum content light level */ + uint16_t maxFALL; /* maximum frame average light level */ +} x265_stats; + +/* String values accepted by x265_param_parse() (and CLI) for various parameters */ +static const char * const x265_motion_est_names[] = { "dia", "hex", "umh", "star", "sea", "full", 0 }; +static const char * const x265_source_csp_names[] = { "i400", "i420", "i422", "i444", "nv12", "nv16", 0 }; +static const char * const x265_video_format_names[] = { "component", "pal", "ntsc", "secam", "mac", "unknown", 0 }; +static const char * const x265_fullrange_names[] = { "limited", "full", 0 }; +static const char * const x265_colorprim_names[] = { "reserved", "bt709", "unknown", "reserved", "bt470m", "bt470bg", "smpte170m", "smpte240m", "film", "bt2020", "smpte428", "smpte431", "smpte432", 0 }; +static const char * const x265_transfer_names[] = { "reserved", "bt709", "unknown", "reserved", "bt470m", "bt470bg", "smpte170m", "smpte240m", "linear", "log100", + "log316", "iec61966-2-4", "bt1361e", "iec61966-2-1", "bt2020-10", "bt2020-12", + "smpte2084", "smpte428", "arib-std-b67", 0 }; +static const char * const x265_colmatrix_names[] = { "gbr", "bt709", "unknown", "", "fcc", "bt470bg", "smpte170m", "smpte240m", + "ycgco", "bt2020nc", "bt2020c", "smpte2085", "chroma-derived-nc", "chroma-derived-c", "ictcp", 0 }; +static const char * const x265_sar_names[] = { "unknown", "1:1", "12:11", "10:11", "16:11", "40:33", "24:11", "20:11", + "32:11", "80:33", "18:11", "15:11", "64:33", "160:99", "4:3", "3:2", "2:1", 0 }; +static const char * const x265_interlace_names[] = { "prog", "tff", "bff", 0 }; +static const char * const x265_analysis_names[] = { "off", "save", "load", 0 }; + +struct x265_zone; +struct x265_param; +/* Zones: override ratecontrol for specific sections of the video. + * If zones overlap, whichever comes later in the list takes precedence. */ +typedef struct x265_zone +{ + int startFrame, endFrame; /* range of frame numbers */ + int keyframeMax; /* it store the default/user defined keyframeMax value*/ + int bForceQp; /* whether to use qp vs bitrate factor */ + int qp; + float bitrateFactor; + struct x265_param* zoneParam; + double* relativeComplexity; +} x265_zone; + +/* data to calculate aggregate VMAF score */ +typedef struct x265_vmaf_data +{ + int width; + int height; + size_t offset; + int internalBitDepth; + FILE *reference_file; /* FILE pointer for input file */ + FILE *distorted_file; /* FILE pointer for recon file generated*/ +}x265_vmaf_data; + +/* data to calculate frame level VMAF score */ +typedef struct x265_vmaf_framedata +{ + int width; + int height; + int frame_set; + int internalBitDepth; + void *reference_frame; /* points to fenc of particular frame */ + void *distorted_frame; /* points to recon of particular frame */ +}x265_vmaf_framedata; + +/* common data needed to calculate both frame level and video level VMAF scores */ +typedef struct x265_vmaf_commondata +{ + char *format; + char *model_path; + char *log_path; + char *log_fmt; + int disable_clip; + int disable_avx; + int enable_transform; + int phone_model; + int psnr; + int ssim; + int ms_ssim; + char *pool; + int thread; + int subsample; + int enable_conf_interval; +}x265_vmaf_commondata; + +static const x265_vmaf_commondata vcd[] = { { NULL, (char *)"/usr/local/share/model/vmaf_v0.6.1.pkl", NULL, NULL, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 1, 0 } }; + +typedef struct x265_temporal_layer { + int poc_offset; /* POC offset */ + int8_t layer; /* Current layer */ + int8_t qp_offset; /* QP offset */ +} x265_temporal_layer; + +static const int8_t x265_temporal_layer_bframes[MAX_T_LAYERS] = {-1, -1, 3, 7, 15, -1, -1}; + +static const int8_t x265_gop_ra_length[X265_MAX_GOP_CONFIG] = { 4, 8, 16}; +static const x265_temporal_layer x265_gop_ra[X265_MAX_GOP_CONFIG][X265_MAX_GOP_LENGTH] = { + { + { + 4, + 0, + 1, + }, + { + 2, + 1, + 5, + }, + { + 1, + 2, + 3, + }, + { + 3, + 2, + 5, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + } + }, + + { + { + 8, + 0, + 1, + }, + { + 4, + 1, + 5, + }, + { + 2, + 2, + 4, + }, + { + 1, + 3, + 5, + }, + { + 3, + 3, + 2, + }, + { + 6, + 2, + 5, + }, + { + 5, + 3, + 4, + }, + { + 7, + 3, + 5, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + { + -1, + -1, + -1, + }, + }, + { + { + 16, + 0, + 1, + }, + { + 8, + 1, + 6, + }, + { + 4, + 2, + 5, + }, + { + 2, + 3, + 6, + }, + { + 1, + 4, + 4, + }, + { + 3, + 4, + 6, + }, + { + 6, + 3, + 5, + }, + { + 5, + 4, + 6, + }, + { + 7, + 4, + 1, + }, + { + 12, + 2, + 6, + }, + { + 10, + 3, + 5, + }, + { + 9, + 4, + 6, + }, + { + 11, + 4, + 4, + }, + { + 14, + 3, + 6, + }, + { + 13, + 4, + 5, + }, + { + 15, + 4, + 6, + } + } +}; + +typedef enum +{ + X265_SHARE_MODE_FILE = 0, + X265_SHARE_MODE_SHAREDMEM +}X265_DATA_SHARE_MODES; + +/* x265 input parameters + * + * For version safety you may use x265_param_alloc/free() to manage the + * allocation of x265_param instances, and x265_param_parse() to assign values + * by name. By never dereferencing param fields in your own code you can treat + * x265_param as an opaque data structure */ +typedef struct x265_param +{ + /* x265_param_default() will auto-detect this cpu capability bitmap. it is + * recommended to not change this value unless you know the cpu detection is + * somehow flawed on your target hardware. The asm function tables are + * process global, the first encoder configures them for all encoders */ + int cpuid; + /*== Parallelism Features ==*/ + + /* Number of concurrently encoded frames between 1 and X265_MAX_FRAME_THREADS + * or 0 for auto-detection. By default x265 will use a number of frame + * threads empirically determined to be optimal for your CPU core count, + * between 2 and 6. Using more than one frame thread causes motion search + * in the down direction to be clamped but otherwise encode behavior is + * unaffected. With CQP rate control the output bitstream is deterministic + * for all values of frameNumThreads greater than 1. All other forms of + * rate-control can be negatively impacted by increases to the number of + * frame threads because the extra concurrency adds uncertainty to the + * bitrate estimations. Frame parallelism is generally limited by the the + * is generally limited by the the number of CU rows + * + * When thread pools are used, each frame thread is assigned to a single + * pool and the frame thread itself is given the node affinity of its pool. + * But when no thread pools are used no node affinity is assigned. */ + int frameNumThreads; + + /* Comma seperated list of threads per NUMA node. If "none", then no worker + * pools are created and only frame parallelism is possible. If NULL or "" + * (default) x265 will use all available threads on each NUMA node. + * + * '+' is a special value indicating all cores detected on the node + * '*' is a special value indicating all cores detected on the node and all + * remaining nodes. + * '-' is a special value indicating no cores on the node, same as '0' + * + * example strings for a 4-node system: + * "" - default, unspecified, all numa nodes are used for thread pools + * "*" - same as default + * "none" - no thread pools are created, only frame parallelism possible + * "-" - same as "none" + * "10" - allocate one pool, using up to 10 cores on node 0 + * "-,+" - allocate one pool, using all cores on node 1 + * "+,-,+" - allocate two pools, using all cores on nodes 0 and 2 + * "+,-,+,-" - allocate two pools, using all cores on nodes 0 and 2 + * "-,*" - allocate three pools, using all cores on nodes 1, 2 and 3 + * "8,8,8,8" - allocate four pools with up to 8 threads in each pool + * + * The total number of threads will be determined by the number of threads + * assigned to all nodes. The worker threads will each be given affinity for + * their node, they will not be allowed to migrate between nodes, but they + * will be allowed to move between CPU cores within their node. + * + * If the three pool features: bEnableWavefront, bDistributeModeAnalysis and + * bDistributeMotionEstimation are all disabled, then numaPools is ignored + * and no thread pools are created. + * + * If "none" is specified, then all three of the thread pool features are + * implicitly disabled. + * + * Multiple thread pools will be allocated for any NUMA node with more than + * 64 logical CPU cores. But any given thread pool will always use at most + * one NUMA node. + * + * Frame encoders are distributed between the available thread pools, and + * the encoder will never generate more thread pools than frameNumThreads */ + const char* numaPools; + + /* Enable wavefront parallel processing, greatly increases parallelism for + * less than 1% compression efficiency loss. Requires a thread pool, enabled + * by default */ + int bEnableWavefront; + + /* Use multiple threads to measure CU mode costs. Recommended for many core + * CPUs. On RD levels less than 5, it may not offload enough work to warrant + * the overhead. It is useful with the slow preset since it has the + * rectangular predictions enabled. At RD level 5 and 6 (preset slower and + * below), this feature should be an unambiguous win if you have CPU + * cores available for work. Default disabled */ + int bDistributeModeAnalysis; + + /* Use multiple threads to perform motion estimation to (ME to one reference + * per thread). Recommended for many core CPUs. The more references the more + * motion searches there will be to distribute. This option is often not a + * win, particularly in video sequences with low motion. Default disabled */ + int bDistributeMotionEstimation; + + /*== Logging Features ==*/ + + /* Enable analysis and logging distribution of CUs. Now deprecated */ + int bLogCuStats; + + /* Enable the measurement and reporting of PSNR. Default is enabled */ + int bEnablePsnr; + + /* Enable the measurement and reporting of SSIM. Default is disabled */ + int bEnableSsim; + + /* The level of logging detail emitted by the encoder. X265_LOG_NONE to + * X265_LOG_FULL, default is X265_LOG_INFO */ + int logLevel; + + /* Level of csv logging. 0 is summary, 1 is frame level logging, + * 2 is frame level logging with performance statistics */ + int csvLogLevel; + + /* filename of CSV log. If csvLogLevel is non-zero, the encoder will emit + * per-slice statistics to this log file in encode order. Otherwise the + * encoder will emit per-stream statistics into the log file when + * x265_encoder_log is called (presumably at the end of the encode) */ + const char* csvfn; + + /*== Internal Picture Specification ==*/ + + /* Internal encoder bit depth. If x265 was compiled to use 8bit pixels + * (HIGH_BIT_DEPTH=0), this field must be 8, else this field must be 10. + * Future builds may support 12bit pixels. */ + int internalBitDepth; + + /* Color space of internal pictures, must match color space of input + * pictures */ + int internalCsp; + + /* Numerator and denominator of frame rate */ + uint32_t fpsNum; + uint32_t fpsDenom; + + /* Width (in pixels) of the source pictures. If this width is not an even + * multiple of 4, the encoder will pad the pictures internally to meet this + * minimum requirement. All valid HEVC widths are supported */ + int sourceWidth; + + /* Height (in pixels) of the source pictures. If this height is not an even + * multiple of 4, the encoder will pad the pictures internally to meet this + * minimum requirement. All valid HEVC heights are supported */ + int sourceHeight; + + /* Interlace type of source pictures. 0 - progressive pictures (default). + * 1 - top field first, 2 - bottom field first. HEVC encodes interlaced + * content as fields, they must be provided to the encoder in the correct + * temporal order */ + int interlaceMode; + + /* Total Number of frames to be encoded, calculated from the user input + * (--frames) and (--seek). In case, the input is read from a pipe, this can + * remain as 0. It is later used in 2 pass RateControl, hence storing the + * value in param */ + int totalFrames; + + /*== Profile / Tier / Level ==*/ + + /* Note: the profile is specified by x265_param_apply_profile() */ + + /* Minimum decoder requirement level. Defaults to 0, which implies auto- + * detection by the encoder. If specified, the encoder will attempt to bring + * the encode specifications within that specified level. If the encoder is + * unable to reach the level it issues a warning and emits the actual + * decoder requirement. If the requested requirement level is higher than + * the actual level, the actual requirement level is signaled. The value is + * an specified as an integer with the level times 10, for example level + * "5.1" is specified as 51, and level "5.0" is specified as 50. */ + int levelIdc; + + /* if levelIdc is specified (non-zero) this flag will differentiate between + * Main (0) and High (1) tier. Default is Main tier (0) */ + int bHighTier; + + /* Enable UHD Blu-ray compatibility support. If specified, the encoder will + * attempt to modify/set the encode specifications. If the encoder is unable + * to do so, this option will be turned OFF. */ + int uhdBluray; + + /* The maximum number of L0 references a P or B slice may use. This + * influences the size of the decoded picture buffer. The higher this + * number, the more reference frames there will be available for motion + * search, improving compression efficiency of most video at a cost of + * performance. Value must be between 1 and 16, default is 3 */ + int maxNumReferences; + + /* Allow libx265 to emit HEVC bitstreams which do not meet strict level + * requirements. Defaults to false */ + int bAllowNonConformance; + + /*== Bitstream Options ==*/ + + /* Flag indicating whether VPS, SPS and PPS headers should be output with + * each keyframe. Default false */ + int bRepeatHeaders; + + /* Flag indicating whether the encoder should generate start codes (Annex B + * format) or length (file format) before NAL units. Default true, Annex B. + * Muxers should set this to the correct value */ + int bAnnexB; + + /* Flag indicating whether the encoder should emit an Access Unit Delimiter + * NAL at the start of every access unit. Default false */ + int bEnableAccessUnitDelimiters; + + /* Enables the buffering period SEI and picture timing SEI to signal the HRD + * parameters. Default is disabled */ + int bEmitHRDSEI; + + /* Enables the emission of a user data SEI with the stream headers which + * describes the encoder version, build info, and parameters. This is + * very helpful for debugging, but may interfere with regression tests. + * Default enabled */ + int bEmitInfoSEI; + + /* Enable the generation of SEI messages for each encoded frame containing + * the hashes of the three reconstructed picture planes. Most decoders will + * validate those hashes against the reconstructed images it generates and + * report any mismatches. This is essentially a debugging feature. Hash + * types are MD5(1), CRC(2), Checksum(3). Default is 0, none */ + int decodedPictureHashSEI; + + /* Enable Temporal Sub Layers while encoding, signals NAL units of coded + * slices with their temporalId. Output bitstreams can be extracted either + * at the base temporal layer (layer 0) with roughly half the frame rate or + * at a higher temporal layer (layer 1) that decodes all the frames in the + * sequence. */ + int bEnableTemporalSubLayers; + + /*== GOP structure and slice type decisions (lookahead) ==*/ + + /* Enable open GOP - meaning I slices are not necessarily IDR and thus frames + * encoded after an I slice may reference frames encoded prior to the I + * frame which have remained in the decoded picture buffer. Open GOP + * generally has better compression efficiency and negligible encoder + * performance impact, but the use case may preclude it. Default true */ + int bOpenGOP; + + /*Force nal type to CRA to all frames expect first frame. Default disabled*/ + int craNal; + + /* Scene cuts closer together than this are coded as I, not IDR. */ + int keyframeMin; + + /* Maximum keyframe distance or intra period in number of frames. If 0 or 1, + * all frames are I frames. A negative value is casted to MAX_INT internally + * which effectively makes frame 0 the only I frame. Default is 250 */ + int keyframeMax; + + /* Maximum consecutive B frames that can be emitted by the lookahead. When + * b-adapt is 0 and keyframMax is greater than bframes, the lookahead emits + * a fixed pattern of `bframes` B frames between each P. With b-adapt 1 the + * lookahead ignores the value of bframes for the most part. With b-adapt 2 + * the value of bframes determines the search (POC) distance performed in + * both directions, quadratically increasing the compute load of the + * lookahead. The higher the value, the more B frames the lookahead may + * possibly use consecutively, usually improving compression. Default is 3, + * maximum is 16 */ + int bframes; + + /* Sets the operating mode of the lookahead. With b-adapt 0, the GOP + * structure is fixed based on the values of keyframeMax and bframes. + * With b-adapt 1 a light lookahead is used to chose B frame placement. + * With b-adapt 2 (trellis) a viterbi B path selection is performed */ + int bFrameAdaptive; + + /* When enabled, the encoder will use the B frame in the middle of each + * mini-GOP larger than 2 B frames as a motion reference for the surrounding + * B frames. This improves compression efficiency for a small performance + * penalty. Referenced B frames are treated somewhere between a B and a P + * frame by rate control. Default is enabled. */ + int bBPyramid; + + /* A value which is added to the cost estimate of B frames in the lookahead. + * It may be a positive value (making B frames appear less expensive, which + * biases the lookahead to choose more B frames) or negative, which makes the + * lookahead choose more P frames. Default is 0, there are no limits */ + int bFrameBias; + + /* The number of frames that must be queued in the lookahead before it may + * make slice decisions. Increasing this value directly increases the encode + * latency. The longer the queue the more optimally the lookahead may make + * slice decisions, particularly with b-adapt 2. When cu-tree is enabled, + * the length of the queue linearly increases the effectiveness of the + * cu-tree analysis. Default is 40 frames, maximum is 250 */ + int lookaheadDepth; + + /* Use multiple worker threads to measure the estimated cost of each frame + * within the lookahead. When bFrameAdaptive is 2, most frame cost estimates + * will be performed in batch mode, many cost estimates at the same time, + * and lookaheadSlices is ignored for batched estimates. The effect on + * performance can be quite small. The higher this parameter, the less + * accurate the frame costs will be (since context is lost across slice + * boundaries) which will result in less accurate B-frame and scene-cut + * decisions. Default is 0 - disabled. 1 is the same as 0. Max 16 */ + int lookaheadSlices; + + /* An arbitrary threshold which determines how aggressively the lookahead + * should detect scene cuts for cost based scenecut detection. + * The default (40) is recommended. */ + int scenecutThreshold; + + /* Replace keyframes by using a column of intra blocks that move across the video + * from one side to the other, thereby "refreshing" the image. In effect, instead of a + * big keyframe, the keyframe is "spread" over many frames. */ + int bIntraRefresh; + + /*== Coding Unit (CU) definitions ==*/ + + /* Maximum CU width and height in pixels. The size must be 64, 32, or 16. + * The higher the size, the more efficiently x265 can encode areas of low + * complexity, greatly improving compression efficiency at large + * resolutions. The smaller the size, the more effective wavefront and + * frame parallelism will become because of the increase in rows. default 64 + * All encoders within the same process must use the same maxCUSize, until + * all encoders are closed and x265_cleanup() is called to reset the value. */ + uint32_t maxCUSize; + + /* Minimum CU width and height in pixels. The size must be 64, 32, 16, or + * 8. Default 8. All encoders within the same process must use the same + * minCUSize. */ + uint32_t minCUSize; + + /* Enable rectangular motion prediction partitions (vertical and + * horizontal), available at all CU depths from 64x64 to 8x8. Default is + * disabled */ + int bEnableRectInter; + + /* Enable asymmetrical motion predictions. At CU depths 64, 32, and 16, it + * is possible to use 25%/75% split partitions in the up, down, right, left + * directions. For some material this can improve compression efficiency at + * the cost of extra analysis. bEnableRectInter must be enabled for this + * feature to be used. Default disabled */ + int bEnableAMP; + + /*== Residual Quadtree Transform Unit (TU) definitions ==*/ + + /* Maximum TU width and height in pixels. The size must be 32, 16, 8 or 4. + * The larger the size the more efficiently the residual can be compressed + * by the DCT transforms, at the expense of more computation */ + uint32_t maxTUSize; + + /* The additional depth the residual quad-tree is allowed to recurse beyond + * the coding quad-tree, for inter coded blocks. This must be between 1 and + * 4. The higher the value the more efficiently the residual can be + * compressed by the DCT transforms, at the expense of much more compute */ + uint32_t tuQTMaxInterDepth; + + /* The additional depth the residual quad-tree is allowed to recurse beyond + * the coding quad-tree, for intra coded blocks. This must be between 1 and + * 4. The higher the value the more efficiently the residual can be + * compressed by the DCT transforms, at the expense of much more compute */ + uint32_t tuQTMaxIntraDepth; + + /* Enable early exit decisions for inter coded blocks to avoid recursing to + * higher TU depths. Default: 0 */ + uint32_t limitTU; + + /* Set the amount of rate-distortion analysis to use within quant. 0 implies + * no rate-distortion optimization. At level 1 rate-distortion cost is used to + * find optimal rounding values for each level (and allows psy-rdoq to be + * enabled). At level 2 rate-distortion cost is used to make decimate decisions + * on each 4x4 coding group (including the cost of signaling the group within + * the group bitmap). Psy-rdoq is less effective at preserving energy when + * RDOQ is at level 2. Default: 0 */ + int rdoqLevel; + + /* Enable the implicit signaling of the sign bit of the last coefficient of + * each transform unit. This saves one bit per TU at the expense of figuring + * out which coefficient can be toggled with the least distortion. + * Default is enabled */ + int bEnableSignHiding; + + /* Allow intra coded blocks to be encoded directly as residual without the + * DCT transform, when this improves efficiency. Checking whether the block + * will benefit from this option incurs a performance penalty. Default is + * disabled */ + int bEnableTransformSkip; + + /* An integer value in range of 0 to 2000, which denotes strength of noise + * reduction in intra CUs. 0 means disabled */ + int noiseReductionIntra; + + /* An integer value in range of 0 to 2000, which denotes strength of noise + * reduction in inter CUs. 0 means disabled */ + int noiseReductionInter; + + /* Quantization scaling lists. HEVC supports 6 quantization scaling lists to + * be defined; one each for Y, Cb, Cr for intra prediction and one each for + * inter prediction. + * + * - NULL and "off" will disable quant scaling (default) + * - "default" will enable the HEVC default scaling lists, which + * do not need to be signaled since they are specified + * - all other strings indicate a filename containing custom scaling lists + * in the HM format. The encode will fail if the file is not parsed + * correctly. Custom lists must be signaled in the SPS. */ + const char *scalingLists; + + /*== Intra Coding Tools ==*/ + + /* Enable constrained intra prediction. This causes intra prediction to + * input samples that were inter predicted. For some use cases this is + * believed to me more robust to stream errors, but it has a compression + * penalty on P and (particularly) B slices. Defaults to disabled */ + int bEnableConstrainedIntra; + + /* Enable strong intra smoothing for 32x32 blocks where the reference + * samples are flat. It may or may not improve compression efficiency, + * depending on your source material. Defaults to disabled */ + int bEnableStrongIntraSmoothing; + + /*== Inter Coding Tools ==*/ + + /* The maximum number of merge candidates that are considered during inter + * analysis. This number (between 1 and 5) is signaled in the stream + * headers and determines the number of bits required to signal a merge so + * it can have significant trade-offs. The smaller this number the higher + * the performance but the less compression efficiency. Default is 3 */ + uint32_t maxNumMergeCand; + + /* Limit the motion references used for each search based on the results of + * previous motion searches already performed for the same CU: If 0 all + * references are always searched. If X265_REF_LIMIT_CU all motion searches + * will restrict themselves to the references selected by the 2Nx2N search + * at the same depth. If X265_REF_LIMIT_DEPTH the 2Nx2N motion search will + * only use references that were selected by the best motion searches of the + * 4 split CUs at the next lower CU depth. The two flags may be combined */ + uint32_t limitReferences; + + /* Limit modes analyzed for each CU using cost metrics from the 4 sub-CUs */ + uint32_t limitModes; + + /* ME search method (DIA, HEX, UMH, STAR, SEA, FULL). The search patterns + * (methods) are sorted in increasing complexity, with diamond being the + * simplest and fastest and full being the slowest. DIA, HEX, UMH and SEA were + * adapted from x264 directly. STAR is an adaption of the HEVC reference + * encoder's three step search, while full is a naive exhaustive search. The + * default is the star search, it has a good balance of performance and + * compression efficiency */ + int searchMethod; + + /* A value between 0 and X265_MAX_SUBPEL_LEVEL which adjusts the amount of + * effort performed during sub-pel refine. Default is 5 */ + int subpelRefine; + + /* The maximum distance from the motion prediction that the full pel motion + * search is allowed to progress before terminating. This value can have an + * effect on frame parallelism, as referenced frames must be at least this + * many rows of reconstructed pixels ahead of the referencee at all times. + * (When considering reference lag, the motion prediction must be ignored + * because it cannot be known ahead of time). Default is 60, which is the + * default max CU size (64) minus the luma HPEL half-filter length (4). If a + * smaller CU size is used, the search range should be similarly reduced */ + int searchRange; + + /* Enable availability of temporal motion vector for AMVP, default is enabled */ + int bEnableTemporalMvp; + + /* Enable 3-level Hierarchical motion estimation at One-Sixteenth, Quarter and Full resolution. + * Default is disabled */ + int bEnableHME; + + /* Enable HME search method (DIA, HEX, UMH, STAR, SEA, FULL) for level 0, 1 and 2. + * Default is hex, umh, umh for L0, L1 and L2 respectively. */ + int hmeSearchMethod[3]; + + /* Enable weighted prediction in P slices. This enables weighting analysis + * in the lookahead, which influences slice decisions, and enables weighting + * analysis in the main encoder which allows P reference samples to have a + * weight function applied to them prior to using them for motion + * compensation. In video which has lighting changes, it can give a large + * improvement in compression efficiency. Default is enabled */ + int bEnableWeightedPred; + + /* Enable weighted prediction in B slices. Default is disabled */ + int bEnableWeightedBiPred; + /* Enable source pixels in motion estimation. Default is disabled */ + int bSourceReferenceEstimation; + /*== Loop Filters ==*/ + /* Enable the deblocking loop filter, which improves visual quality by + * reducing blocking effects at block edges, particularly at lower bitrates + * or higher QP. When enabled it adds another CU row of reference lag, + * reducing frame parallelism effectiveness. Default is enabled */ + int bEnableLoopFilter; + + /* deblocking filter tC offset [-6, 6] -6 light filter, 6 strong. + * This is the coded div2 value, actual offset is doubled at use */ + int deblockingFilterTCOffset; + + /* deblocking filter Beta offset [-6, 6] -6 light filter, 6 strong + * This is the coded div2 value, actual offset is doubled at use */ + int deblockingFilterBetaOffset; + + /* Enable the Sample Adaptive Offset loop filter, which reduces distortion + * effects by adjusting reconstructed sample values based on histogram + * analysis to better approximate the original samples. When enabled it adds + * a CU row of reference lag, reducing frame parallelism effectiveness. + * Default is enabled */ + int bEnableSAO; + + /* Note: when deblocking and SAO are both enabled, the loop filter CU lag is + * only one row, as they operate in series on the same row. */ + + /* Select the method in which SAO deals with deblocking boundary pixels. If + * disabled the right and bottom boundary areas are skipped. If enabled, + * non-deblocked pixels are used entirely. Default is disabled */ + int bSaoNonDeblocked; + + /* Select tune rate in which SAO has to be applied. + 1 - Filtering applied only on I-frames(I) [Light tune] + 2 - No Filtering on B frames (I, P) [Medium tune] + 3 - No Filtering on non-ref b frames (I, P, B) [Strong tune] */ + int selectiveSAO; + + /*== Analysis tools ==*/ + + /* A value between 1 and 6 (both inclusive) which determines the level of + * rate distortion optimizations to perform during mode and depth decisions. + * The more RDO the better the compression efficiency at a major cost of + * performance. Default is 3 */ + int rdLevel; + + /* Enable early skip decisions to avoid analysing additional modes in likely + * skip blocks. Default is disabled */ + int bEnableEarlySkip; + + /* Enable early CU size decisions to avoid recursing to higher depths. + * Default is enabled */ + int recursionSkipMode; + + /* Use a faster search method to find the best intra mode. Default is 0 */ + int bEnableFastIntra; + + /* Enable a faster determination of whether skipping the DCT transform will + * be beneficial. Slight performance gain for some compression loss. Default + * is enabled */ + int bEnableTSkipFast; + + /* The CU Lossless flag, when enabled, compares the rate-distortion costs + * for normal and lossless encoding, and chooses the best mode for each CU. + * If lossless mode is chosen, the cu-transquant-bypass flag is set for that + * CU */ + int bCULossless; + + /* Specify whether to attempt to encode intra modes in B frames. By default + * enabled, but only applicable for the presets which use rdLevel 5 or 6 + * (veryslow and placebo). All other presets will not try intra in B frames + * regardless of this setting */ + int bIntraInBFrames; + + /* Apply an optional penalty to the estimated cost of 32x32 intra blocks in + * non-intra slices. 0 is disabled, 1 enables a small penalty, and 2 enables + * a full penalty. This favors inter-coding and its low bitrate over + * potential increases in distortion, but usually improves performance. + * Default is 0 */ + int rdPenalty; + + /* Psycho-visual rate-distortion strength. Only has an effect in presets + * which use RDO. It makes mode decision favor options which preserve the + * energy of the source, at the cost of lost compression. The value must + * be between 0 and 5.0, 1.0 is typical. Default 2.0 */ + double psyRd; + + /* Strength of psycho-visual optimizations in quantization. Only has an + * effect when RDOQ is enabled (presets slow, slower and veryslow). The + * value must be between 0 and 50, 1.0 is typical. Default 0 */ + double psyRdoq; + + /* Perform quantisation parameter based RD refinement. RD cost is calculated + * on the best CU partitions, chosen after the CU analysis, for a range of QPs + * to find the optimal rounding effect. Only effective at rd-levels 5 and 6. + * Default disabled */ + int bEnableRdRefine; + + /* If save, write per-frame analysis information into analysis buffers. + * If load, read analysis information into analysis buffer and use this + * analysis information to reduce the amount of work the encoder must perform. + * Default disabled. Now deprecated*/ + int analysisReuseMode; + + /* Filename for multi-pass-opt-analysis/distortion. Default name is "x265_analysis.dat" */ + const char* analysisReuseFileName; + + /*== Rate Control ==*/ + + /* The lossless flag enables true lossless coding, bypassing scaling, + * transform, quantization and in-loop filter processes. This is used for + * ultra-high bitrates with zero loss of quality. It implies no rate control */ + int bLossless; + + /* Generally a small signed integer which offsets the QP used to quantize + * the Cb chroma residual (delta from luma QP specified by rate-control). + * Default is 0, which is recommended */ + int cbQpOffset; + + /* Generally a small signed integer which offsets the QP used to quantize + * the Cr chroma residual (delta from luma QP specified by rate-control). + * Default is 0, which is recommended */ + int crQpOffset; + + /* Specifies the preferred transfer characteristics syntax element in the + * alternative transfer characteristics SEI message (see. D.2.38 and D.3.38 of + * JCTVC-W1005 http://phenix.it-sudparis.eu/jct/doc_end_user/documents/23_San%20Diego/wg11/JCTVC-W1005-v4.zip + * */ + int preferredTransferCharacteristics; + + /* + * Specifies the value for the pic_struc syntax element of the picture timing SEI message (See D2.3 and D3.3) + * of the HEVC spec. for a detailed explanation + * */ + int pictureStructure; + + struct + { + /* Explicit mode of rate-control, necessary for API users. It must + * be one of the X265_RC_METHODS enum values. */ + int rateControlMode; + + /* Base QP to use for Constant QP rate control. Adaptive QP may alter + * the QP used for each block. If a QP is specified on the command line + * CQP rate control is implied. Default: 32 */ + int qp; + + /* target bitrate for Average BitRate (ABR) rate control. If a non- zero + * bitrate is specified on the command line, ABR is implied. Default 0 */ + int bitrate; + + /* qComp sets the quantizer curve compression factor. It weights the frame + * quantizer based on the complexity of residual (measured by lookahead). + * Default value is 0.6. Increasing it to 1 will effectively generate CQP */ + double qCompress; + + /* QP offset between I/P and P/B frames. Default ipfactor: 1.4 + * Default pbFactor: 1.3 */ + double ipFactor; + double pbFactor; + + /* Ratefactor constant: targets a certain constant "quality". + * Acceptable values between 0 and 51. Default value: 28 */ + double rfConstant; + + /* Max QP difference between frames. Default: 4 */ + int qpStep; + + /* Enable adaptive quantization. This mode distributes available bits between all + * CTUs of a frame, assigning more bits to low complexity areas. Turning + * this ON will usually affect PSNR negatively, however SSIM and visual quality + * generally improves. Default: X265_AQ_AUTO_VARIANCE */ + int aqMode; + + /* + * Enable adaptive quantization. + * It scales the quantization step size according to the spatial activity of one + * coding unit relative to frame average spatial activity. This AQ method utilizes + * the minimum variance of sub-unit in each coding unit to represent the coding + * unit’s spatial complexity. */ + int hevcAq; + + /* Sets the strength of AQ bias towards low detail CTUs. Valid only if + * AQ is enabled. Default value: 1.0. Acceptable values between 0.0 and 3.0 */ + double aqStrength; + + /* Delta QP range by QP adaptation based on a psycho-visual model. + * Acceptable values between 1.0 to 6.0 */ + double qpAdaptationRange; + + /* Sets the maximum rate the VBV buffer should be assumed to refill at + * Default is zero */ + int vbvMaxBitrate; + + /* Sets the size of the VBV buffer in kilobits. Default is zero */ + int vbvBufferSize; + + /* Sets how full the VBV buffer must be before playback starts. If it is less than + * 1, then the initial fill is vbv-init * vbvBufferSize. Otherwise, it is + * interpreted as the initial fill in kbits. Default is 0.9 */ + double vbvBufferInit; + + /* Enable CUTree rate-control. This keeps track of the CUs that propagate temporally + * across frames and assigns more bits to these CUs. Improves encode efficiency. + * Default: enabled */ + int cuTree; + + /* In CRF mode, maximum CRF as caused by VBV. 0 implies no limit */ + double rfConstantMax; + + /* In CRF mode, minimum CRF as caused by VBV */ + double rfConstantMin; + + /* Multi-pass encoding */ + /* Enable writing the stats in a multi-pass encode to the stat output file/memory */ + int bStatWrite; + + /* Enable loading data from the stat input file/memory in a multi pass encode */ + int bStatRead; + + /* Filename of the 2pass output/input stats file, if unspecified the + * encoder will default to using x265_2pass.log */ + const char* statFileName; + + /* temporally blur quants */ + double qblur; + + /* temporally blur complexity */ + double complexityBlur; + + /* Enable slow and a more detailed first pass encode in multi pass rate control */ + int bEnableSlowFirstPass; + + /* rate-control overrides */ + int zoneCount; + x265_zone* zones; + + /* number of zones in zone-file*/ + int zonefileCount; + + /* specify a text file which contains MAX_MAX_QP + 1 floating point + * values to be copied into x265_lambda_tab and a second set of + * MAX_MAX_QP + 1 floating point values for x265_lambda2_tab. All values + * are separated by comma, space or newline. Text after a hash (#) is + * ignored. The lambda tables are process-global, so these new lambda + * values will affect all encoders in the same process */ + const char* lambdaFileName; + + /* Enable stricter conditions to check bitrate deviations in CBR mode. May compromise + * quality to maintain bitrate adherence */ + int bStrictCbr; + + /* Enable adaptive quantization at CU granularity. This parameter specifies + * the minimum CU size at which QP can be adjusted, i.e. Quantization Group + * (QG) size. Allowed values are 64, 32, 16, 8 provided it falls within the + * inclusuve range [maxCUSize, minCUSize]. Experimental, default: maxCUSize */ + uint32_t qgSize; + + /* internally enable if tune grain is set */ + int bEnableGrain; + + /* sets a hard upper limit on QP */ + int qpMax; + + /* sets a hard lower limit on QP */ + int qpMin; + + /* internally enable if tune grain is set */ + int bEnableConstVbv; + + /* if only the focused frames would be re-encode or not */ + int bEncFocusedFramesOnly; + + /* Share the data with stats file or shared memory. + It must be one of the X265_DATA_SHARE_MODES enum values + Available if the bStatWrite or bStatRead is true. + Use stats file by default. + The stats file mode would be used among the encoders running in sequence. + The shared memory mode could only be used among the encoders running in parallel. + Now only the cutree data could be shared among shared memory. More data would be support in the future.*/ + int dataShareMode; + + /* Unique shared memory name. Required if the shared memory mode enabled. NULL by default */ + const char* sharedMemName; + + } rc; + + /*== Video Usability Information ==*/ + struct + { + /* Aspect ratio idc to be added to the VUI. The default is 0 indicating + * the apsect ratio is unspecified. If set to X265_EXTENDED_SAR then + * sarWidth and sarHeight must also be set */ + int aspectRatioIdc; + + /* Sample Aspect Ratio width in arbitrary units to be added to the VUI + * only if aspectRatioIdc is set to X265_EXTENDED_SAR. This is the width + * of an individual pixel. If this is set then sarHeight must also be set */ + int sarWidth; + + /* Sample Aspect Ratio height in arbitrary units to be added to the VUI. + * only if aspectRatioIdc is set to X265_EXTENDED_SAR. This is the width + * of an individual pixel. If this is set then sarWidth must also be set */ + int sarHeight; + + /* Enable overscan info present flag in the VUI. If this is set then + * bEnabledOverscanAppropriateFlag will be added to the VUI. The default + * is false */ + int bEnableOverscanInfoPresentFlag; + + /* Enable overscan appropriate flag. The status of this flag is added + * to the VUI only if bEnableOverscanInfoPresentFlag is set. If this + * flag is set then cropped decoded pictures may be output for display. + * The default is false */ + int bEnableOverscanAppropriateFlag; + + /* Video signal type present flag of the VUI. If this is set then + * videoFormat, bEnableVideoFullRangeFlag and + * bEnableColorDescriptionPresentFlag will be added to the VUI. The + * default is false */ + int bEnableVideoSignalTypePresentFlag; + + /* Video format of the source video. 0 = component, 1 = PAL, 2 = NTSC, + * 3 = SECAM, 4 = MAC, 5 = unspecified video format is the default */ + int videoFormat; + + /* Video full range flag indicates the black level and range of the luma + * and chroma signals as derived from E′Y, E′PB, and E′PR or E′R, E′G, + * and E′B real-valued component signals. The default is false */ + int bEnableVideoFullRangeFlag; + + /* Color description present flag in the VUI. If this is set then + * color_primaries, transfer_characteristics and matrix_coeffs are to be + * added to the VUI. The default is false */ + int bEnableColorDescriptionPresentFlag; + + /* Color primaries holds the chromacity coordinates of the source + * primaries. The default is 2 */ + int colorPrimaries; + + /* Transfer characteristics indicates the opto-electronic transfer + * characteristic of the source picture. The default is 2 */ + int transferCharacteristics; + + /* Matrix coefficients used to derive the luma and chroma signals from + * the red, blue and green primaries. The default is 2 */ + int matrixCoeffs; + + /* Chroma location info present flag adds chroma_sample_loc_type_top_field and + * chroma_sample_loc_type_bottom_field to the VUI. The default is false */ + int bEnableChromaLocInfoPresentFlag; + + /* Chroma sample location type top field holds the chroma location in + * the top field. The default is 0 */ + int chromaSampleLocTypeTopField; + + /* Chroma sample location type bottom field holds the chroma location in + * the bottom field. The default is 0 */ + int chromaSampleLocTypeBottomField; + + /* Default display window flag adds def_disp_win_left_offset, + * def_disp_win_right_offset, def_disp_win_top_offset and + * def_disp_win_bottom_offset to the VUI. The default is false */ + int bEnableDefaultDisplayWindowFlag; + + /* Default display window left offset holds the left offset with the + * conformance cropping window to further crop the displayed window */ + int defDispWinLeftOffset; + + /* Default display window right offset holds the right offset with the + * conformance cropping window to further crop the displayed window */ + int defDispWinRightOffset; + + /* Default display window top offset holds the top offset with the + * conformance cropping window to further crop the displayed window */ + int defDispWinTopOffset; + + /* Default display window bottom offset holds the bottom offset with the + * conformance cropping window to further crop the displayed window */ + int defDispWinBottomOffset; + } vui; + + /* SMPTE ST 2086 mastering display color volume SEI info, specified as a + * string which is parsed when the stream header SEI are emitted. The string + * format is "G(%hu,%hu)B(%hu,%hu)R(%hu,%hu)WP(%hu,%hu)L(%u,%u)" where %hu + * are unsigned 16bit integers and %u are unsigned 32bit integers. The SEI + * includes X,Y display primaries for RGB channels, white point X,Y and + * max,min luminance values. */ + const char* masteringDisplayColorVolume; + + /* Maximum Content light level(MaxCLL), specified as integer that indicates the + * maximum pixel intensity level in units of 1 candela per square metre of the + * bitstream. x265 will also calculate MaxCLL programmatically from the input + * pixel values and set in the Content light level info SEI */ + uint16_t maxCLL; + + /* Maximum Frame Average Light Level(MaxFALL), specified as integer that indicates + * the maximum frame average intensity level in units of 1 candela per square + * metre of the bitstream. x265 will also calculate MaxFALL programmatically + * from the input pixel values and set in the Content light level info SEI */ + uint16_t maxFALL; + + /* Minimum luma level of input source picture, specified as a integer which + * would automatically increase any luma values below the specified --min-luma + * value to that value. */ + uint16_t minLuma; + + /* Maximum luma level of input source picture, specified as a integer which + * would automatically decrease any luma values above the specified --max-luma + * value to that value. */ + uint16_t maxLuma; + + /* Maximum of the picture order count */ + int log2MaxPocLsb; + + /* Emit VUI Timing info, an optional VUI field */ + int bEmitVUITimingInfo; + + /* Emit HRD Timing info */ + int bEmitVUIHRDInfo; + + /* Maximum count of Slices of picture, the value range is [1, maximum rows] */ + unsigned int maxSlices; + + /* Optimize QP in PPS based on statistics from prevvious GOP*/ + int bOptQpPPS; + + /* Opitmize ref list length in PPS based on stats from previous GOP*/ + int bOptRefListLengthPPS; + + /* Enable storing commonly RPS in SPS in multi pass mode */ + int bMultiPassOptRPS; + /* This value represents the percentage difference between the inter cost and + * intra cost of a frame used in scenecut detection. Default 5. */ + double scenecutBias; + /* Use multiple worker threads dedicated to doing only lookahead instead of sharing + * the worker threads with Frame Encoders. A dedicated lookahead threadpool is created with the + * specified number of worker threads. This can range from 0 upto half the + * hardware threads available for encoding. Using too many threads for lookahead can starve + * resources for frame Encoder and can harm performance. Default is 0 - disabled. */ + int lookaheadThreads; + /* Optimize CU level QPs to signal consistent deltaQPs in frame for rd level > 4 */ + int bOptCUDeltaQP; + /* Refine analysis in multipass ratecontrol based on analysis information stored */ + int analysisMultiPassRefine; + /* Refine analysis in multipass ratecontrol based on distortion data stored */ + int analysisMultiPassDistortion; + /* Adaptive Quantization based on relative motion */ + int bAQMotion; + /* SSIM based RDO, based on residual divisive normalization scheme. Used for mode + * selection during analysis of CTUs, can achieve significant gain in terms of + * objective quality metrics SSIM and PSNR */ + int bSsimRd; + + /* Increase RD at points where bitrate drops due to vbv. Default 0 */ + double dynamicRd; + + /* Enables the emitting of HDR SEI packets which contains HDR-specific params. + * Auto-enabled when max-cll, max-fall, or mastering display info is specified. + * Default is disabled. Now deprecated.*/ + int bEmitHDRSEI; + + /* Enable luma and chroma offsets for HDR/WCG content. + * Default is disabled. Now deprecated.*/ + int bHDROpt; + + /* A value between 1 and 10 (both inclusive) determines the level of + * information stored/reused in analysis save/load. Higher the refine + * level higher the information stored/reused. Default is 5. Now deprecated. */ + int analysisReuseLevel; + + /* Limit Sample Adaptive Offset filter computation by early terminating SAO + * process based on inter prediction mode, CTU spatial-domain correlations, + * and relations between luma and chroma */ + int bLimitSAO; + + /* File containing the tone mapping information */ + const char* toneMapFile; + + /* Insert tone mapping information only for IDR frames and when the + * tone mapping information changes. */ + int bDhdr10opt; + + /* Determine how x265 react to the content information recieved through the API */ + int bCTUInfo; + + /* Use ratecontrol statistics from pic_in, if available*/ + int bUseRcStats; + + /* Factor by which input video is scaled down for analysis save mode. Default is 0 */ + int scaleFactor; + + /* Enable intra refinement in load mode*/ + int intraRefine; + + /* Enable inter refinement in load mode*/ + int interRefine; + + /* Enable motion vector refinement in load mode*/ + int mvRefine; + + /* Log of maximum CTU size */ + uint32_t maxLog2CUSize; + + /* Actual CU depth with respect to config depth */ + uint32_t maxCUDepth; + + /* CU depth with respect to maximum transform size */ + uint32_t unitSizeDepth; + + /* Number of 4x4 units in maximum CU size */ + uint32_t num4x4Partitions; + + /* Specify if analysis mode uses file for data reuse */ + int bUseAnalysisFile; + + /* File pointer for csv log */ + FILE* csvfpt; + + /* Force flushing the frames from encoder */ + int forceFlush; + + /* Enable skipping split RD analysis when sum of split CU rdCost larger than none split CU rdCost for Intra CU */ + int bEnableSplitRdSkip; + + /* Disable lookahead */ + int bDisableLookahead; + + /* Use low-pass subband dct approximation + * This DCT approximation is less computational intensive and gives results close to standard DCT */ + int bLowPassDct; + + /* Sets the portion of the decode buffer that must be available after all the + * specified frames have been inserted into the decode buffer. If it is less + * than 1, then the final buffer available is vbv-end * vbvBufferSize. Otherwise, + * it is interpreted as the final buffer available in kbits. Default 0 (disabled) */ + double vbvBufferEnd; + + /* Frame from which qp has to be adjusted to hit final decode buffer emptiness. + * Specified as a fraction of the total frames. Default 0 */ + double vbvEndFrameAdjust; + + /* Reuse MV information obtained through API */ + int bAnalysisType; + /* Allow the encoder to have a copy of the planes of x265_picture in Frame */ + int bCopyPicToFrame; + + /*Number of frames for GOP boundary decision lookahead.If a scenecut frame is found + * within this from the gop boundary set by keyint, the GOP will be extented until such a point, + * otherwise the GOP will be terminated as set by keyint*/ + int gopLookahead; + + /*Write per-frame analysis information into analysis buffers. Default disabled. */ + const char* analysisSave; + + /* Read analysis information into analysis buffer and use this analysis information + * to reduce the amount of work the encoder must perform. Default disabled. */ + const char* analysisLoad; + + /*Number of RADL pictures allowed in front of IDR*/ + int radl; + + /* This value controls the maximum AU size defined in specification + * It represents the percentage of maximum AU size used. + * Default is 1 (which is 100%). Range is 0.5 to 1. */ + double maxAUSizeFactor; + + /* Enables the emission of a Recovery Point SEI with the stream headers + * at each IDR frame describing poc of the recovery point, exact matching flag + * and broken link flag. Default is disabled. */ + int bEmitIDRRecoverySEI; + + /* Dynamically change refine-inter at block level*/ + int bDynamicRefine; + + /* Enable writing all SEI messgaes in one single NAL instead of mul*/ + int bSingleSeiNal; + + + /* First frame of the chunk. Frames preceeding this in display order will + * be encoded, however, they will be discarded in the bitstream. + * Default 0 (disabled). */ + int chunkStart; + + /* Last frame of the chunk. Frames following this in display order will be + * used in taking lookahead decisions, but, they will not be encoded. + * Default 0 (disabled). */ + int chunkEnd; + /* File containing base64 encoded SEI messages in POC order */ + const char* naluFile; + + /* Generate bitstreams confirming to the specified dolby vision profile, + * note that 0x7C01 makes RPU appear to be an unspecified NAL type in + * HEVC stream. if BL is backward compatible, Dolby Vision single + * layer VES will be equivalent to a backward compatible BL VES on legacy + * device as RPU will be ignored. Default 0 (disabled) */ + int dolbyProfile; + + /* Set concantenation flag for the first keyframe in the HRD buffering period SEI. */ + int bEnableHRDConcatFlag; + + + /* Store/normalize ctu distortion in analysis-save/load. Ranges from 0 - 1. + * 0 - Disabled. 1 - Save/Load ctu distortion to/from the file specified + * analysis-save/load. Default 0. */ + int ctuDistortionRefine; + + /* Enable SVT HEVC Encoder */ + int bEnableSvtHevc; + + /* SVT-HEVC param structure. For internal use when SVT HEVC encoder is enabled */ + void* svtHevcParam; + + /* Detect fade-in regions. Enforces I-slice for the brightest point. + Re-init RC history at that point in ABR mode. Default is disabled. */ + int bEnableFades; + + /* Enable field coding */ + int bField; + + /*Emit content light level info SEI*/ + int bEmitCLL; + + /* + * Signals picture structure SEI timing message for every frame + * picture structure 7 is signalled for frame doubling + * picture structure 8 is signalled for frame tripling + * */ + int bEnableFrameDuplication; + + /* + * For adaptive frame duplication, a threshold is set above which the frames are similar. + * User can set a variable threshold. Default 70. + * */ + int dupThreshold; + + /*Input sequence bit depth. It can be either 8bit, 10bit or 12bit.*/ + int sourceBitDepth; + + /*Size of the zone to be reconfigured in frames. Default 0. API only. */ + uint32_t reconfigWindowSize; + + /*Flag to indicate if rate-control history has to be reset during zone reconfiguration. + Default 1 (Enabled). API only. */ + int bResetZoneConfig; + + /*Flag to indicate rate-control history has not to be reset during zone reconfiguration. + Default 0 (Disabled) */ + int bNoResetZoneConfig; + + /* It reduces the bits spent on the inter-frames within the scenecutWindow before and / or after a scenecut + * by increasing their QP in ratecontrol pass2 algorithm without any deterioration in visual quality. + * 0 - Disabled (default). + * 1 - Forward masking. + * 2 - Backward masking. + * 3 - Bi-directional masking. */ + int bEnableSceneCutAwareQp; + + /* The duration(in milliseconds) for which there is a reduction in the bits spent on the inter-frames after a scenecut + * by increasing their QP, when bEnableSceneCutAwareQp is 1 or 3. Default is 500ms.*/ + int fwdMaxScenecutWindow; + int fwdScenecutWindow[6]; + + /* The offset by which QP is incremented for inter-frames after a scenecut when bEnableSceneCutAwareQp is 1 or 3. + * Default is +5. */ + double fwdRefQpDelta[6]; + + /* The offset by which QP is incremented for non-referenced inter-frames after a scenecut when bEnableSceneCutAwareQp is 1 or 3. */ + double fwdNonRefQpDelta[6]; + + /* Enables histogram based scenecut detection algorithm to detect scenecuts. Default disabled */ + int bHistBasedSceneCut; + + /* Enable HME search ranges for L0, L1 and L2 respectively. */ + int hmeRange[3]; + + /* Block-level QP optimization for HDR10 content. Default is disabled.*/ + int bHDR10Opt; + + /* Enables the emitting of HDR10 SEI packets which contains HDR10-specific params. + * Auto-enabled when max-cll, max-fall, or mastering display info is specified. + * Default is disabled */ + int bEmitHDR10SEI; + + /* A value between 1 and 10 (both inclusive) determines the level of + * analysis information stored in analysis-save. Higher the refine level higher + * the information stored. Default is 5 */ + int analysisSaveReuseLevel; + + /* A value between 1 and 10 (both inclusive) determines the level of + * analysis information reused in analysis-load. Higher the refine level higher + * the information reused. Default is 5 */ + int analysisLoadReuseLevel; + + /* Conformance window right offset specifies the padding offset to the + * right side of the internal copy of the input pictures in the library. + * The decoded picture will be cropped based on conformance window right offset + * signaled in the SPS before output. Default is 0. + * Recommended to set this during non-file based analysis-load. + * This is to inform the encoder about the conformace window right offset + * to be added to match the number of CUs across the width for which analysis + * info is available from the corresponding analysis-save. */ + + int confWinRightOffset; + + /* Conformance window bottom offset specifies the padding offset to the + * bottom side of the internal copy of the input pictures in the library. + * The decoded picture will be cropped based on conformance window bottom offset + * signaled in the SPS before output. Default is 0. + * Recommended to set this during non-file based analysis-load. + * This is to inform the encoder about the conformace window bottom offset + * to be added to match the number of CUs across the height for which analysis + * info is available from the corresponding analysis-save. */ + + int confWinBottomOffset; + + /* Edge variance threshold for quad tree establishment. */ + float edgeVarThreshold; + + /* Maxrate that could be signaled to the decoder. Default 0. API only. */ + int decoderVbvMaxRate; + + /*Enables Qp tuning with respect to real time VBV buffer fullness in rate + control 2 pass. Experimental.Default is disabled*/ + int bliveVBV2pass; + + /* Minimum VBV fullness to be maintained. Default 50. Keep the buffer + * at least 50% full */ + double minVbvFullness; + + /* Maximum VBV fullness to be maintained. Default 80. Keep the buffer + * at max 80% full */ + double maxVbvFullness; + + /* The duration(in milliseconds) for which there is a reduction in the bits spent on the inter-frames before a scenecut + * by increasing their QP, when bEnableSceneCutAwareQp is 2 or 3. Default is 100ms.*/ + int bwdMaxScenecutWindow; + int bwdScenecutWindow[6]; + + /* The offset by which QP is incremented for inter-frames before a scenecut when bEnableSceneCutAwareQp is 2 or 3. */ + double bwdRefQpDelta[6]; + + /* The offset by which QP is incremented for non-referenced inter-frames before a scenecut when bEnableSceneCutAwareQp is 2 or 3. */ + double bwdNonRefQpDelta[6]; + + /* Specify combinations of color primaries, transfer characteristics, color matrix, + * range of luma and chroma signals, and chroma sample location. This has higher + * precedence than individual VUI parameters. If any individual VUI option is specified + * together with this, which changes the values set corresponding to the system-id + * or color-volume, it will be discarded. */ + const char* videoSignalTypePreset; + + /* Flag indicating whether the encoder should emit an End of Bitstream + * NAL at the end of bitstream. Default false */ + int bEnableEndOfBitstream; + + /* Flag indicating whether the encoder should emit an End of Sequence + * NAL at the end of every Coded Video Sequence. Default false */ + int bEnableEndOfSequence; + + /* Film Grain Characteristic file */ + char* filmGrain; + + /*Motion compensated temporal filter*/ + int bEnableTemporalFilter; + double temporalFilterStrength; + + /*SBRC*/ + int bEnableSBRC; +} x265_param; + +/* x265_param_alloc: + * Allocates an x265_param instance. The returned param structure is not + * special in any way, but using this method together with x265_param_free() + * and x265_param_parse() to set values by name allows the application to treat + * x265_param as an opaque data struct for version safety */ +x265_param *x265_param_alloc(void); + +/* x265_param_free: + * Use x265_param_free() to release storage for an x265_param instance + * allocated by x265_param_alloc() */ +void x265_param_free(x265_param *); + +/* x265_param_default: + * Initialize an x265_param structure to default values */ +void x265_param_default(x265_param *param); + +/* x265_param_parse: + * set one parameter by name. + * returns 0 on success, or returns one of the following errors. + * note: BAD_VALUE occurs only if it can't even parse the value, + * numerical range is not checked until x265_encoder_open(). + * value=NULL means "true" for boolean options, but is a BAD_VALUE for non-booleans. */ +#define X265_PARAM_BAD_NAME (-1) +#define X265_PARAM_BAD_VALUE (-2) +int x265_param_parse(x265_param *p, const char *name, const char *value); + +x265_zone *x265_zone_alloc(int zoneCount, int isZoneFile); + +void x265_zone_free(x265_param *param); + +int x265_zone_param_parse(x265_param* p, const char* name, const char* value); + +int x265_scenecut_aware_qp_param_parse(x265_param* p, const char* name, const char* value); + +static const char * const x265_profile_names[] = { + /* HEVC v1 */ + "main", "main10", "mainstillpicture", /* alias */ "msp", + + /* HEVC v2 (Range Extensions) */ + "main-intra", "main10-intra", + "main444-8", "main444-intra", "main444-stillpicture", + + "main422-10", "main422-10-intra", + "main444-10", "main444-10-intra", + + "main12", "main12-intra", + "main422-12", "main422-12-intra", + "main444-12", "main444-12-intra", + + "main444-16-intra", "main444-16-stillpicture", /* Not Supported! */ + 0 +}; + +/* x265_param_apply_profile: + * Applies the restrictions of the given profile. (one of x265_profile_names) + * (can be NULL, in which case the function will do nothing) + * Note: the detected profile can be lower than the one specified to this + * function. This function will force the encoder parameters to fit within + * the specified profile, or fail if that is impossible. + * returns 0 on success, negative on failure (e.g. invalid profile name). */ +int x265_param_apply_profile(x265_param *, const char *profile); + +/* x265_param_default_preset: + * The same as x265_param_default, but also use the passed preset and tune + * to modify the default settings. + * (either can be NULL, which implies no preset or no tune, respectively) + * + * Currently available presets are, ordered from fastest to slowest: */ +static const char * const x265_preset_names[] = { "ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo", 0 }; + +/* The presets can also be indexed numerically, as in: + * x265_param_default_preset( ¶m, "3", ... ) + * with ultrafast mapping to "0" and placebo mapping to "9". This mapping may + * of course change if new presets are added in between, but will always be + * ordered from fastest to slowest. + * + * Warning: the speed of these presets scales dramatically. Ultrafast is a full + * 100 times faster than placebo! + * + * Currently available tunings are: */ +static const char * const x265_tune_names[] = { "psnr", "ssim", "grain", "zerolatency", "fastdecode", "animation", 0 }; + +/* returns 0 on success, negative on failure (e.g. invalid preset/tune name). */ +int x265_param_default_preset(x265_param *, const char *preset, const char *tune); + +/* x265_picture_alloc: + * Allocates an x265_picture instance. The returned picture structure is not + * special in any way, but using this method together with x265_picture_free() + * and x265_picture_init() allows some version safety. New picture fields will + * always be added to the end of x265_picture */ +x265_picture *x265_picture_alloc(void); + +/* x265_picture_free: + * Use x265_picture_free() to release storage for an x265_picture instance + * allocated by x265_picture_alloc() */ +void x265_picture_free(x265_picture *); + +/* x265_picture_init: + * Initialize an x265_picture structure to default values. It sets the pixel + * depth and color space to the encoder's internal values and sets the slice + * type to auto - so the lookahead will determine slice type. */ +void x265_picture_init(x265_param *param, x265_picture *pic); + +/* x265_max_bit_depth: + * Specifies the numer of bits per pixel that x265 uses internally to + * represent a pixel, and the bit depth of the output bitstream. + * param->internalBitDepth must be set to this value. x265_max_bit_depth + * will be 8 for default builds, 10 for HIGH_BIT_DEPTH builds. */ +X265_API extern const int x265_max_bit_depth; + +/* x265_version_str: + * A static string containing the version of this compiled x265 library */ +X265_API extern const char *x265_version_str; + +/* x265_build_info: + * A static string describing the compiler and target architecture */ +X265_API extern const char *x265_build_info_str; + +/* x265_alloc_analysis_data: +* Allocate memory for the x265_analysis_data object's internal structures. */ +void x265_alloc_analysis_data(x265_param *param, x265_analysis_data* analysis); + +/* +* Free the allocated memory for x265_analysis_data object's internal structures. */ +void x265_free_analysis_data(x265_param *param, x265_analysis_data* analysis); + +/* Force a link error in the case of linking against an incompatible API version. + * Glue #defines exist to force correct macro expansion; the final output of the macro + * is x265_encoder_open_##X265_BUILD (for purposes of dlopen). */ +#define x265_encoder_glue1(x, y) x ## y +#define x265_encoder_glue2(x, y) x265_encoder_glue1(x, y) +#define x265_encoder_open x265_encoder_glue2(x265_encoder_open_, X265_BUILD) + +/* x265_encoder_open: + * create a new encoder handler, all parameters from x265_param are copied */ +x265_encoder* x265_encoder_open(x265_param *); + +/* x265_encoder_parameters: + * copies the current internal set of parameters to the pointer provided + * by the caller. useful when the calling application needs to know + * how x265_encoder_open has changed the parameters. + * note that the data accessible through pointers in the returned param struct + * (e.g. filenames) should not be modified by the calling application. */ +void x265_encoder_parameters(x265_encoder *, x265_param *); + +/* x265_encoder_headers: + * return the SPS and PPS that will be used for the whole stream. + * *pi_nal is the number of NAL units outputted in pp_nal. + * returns negative on error, total byte size of payload data on success + * the payloads of all output NALs are guaranteed to be sequential in memory. */ +int x265_encoder_headers(x265_encoder *, x265_nal **pp_nal, uint32_t *pi_nal); + +/* x265_encoder_encode: + * encode one picture. + * *pi_nal is the number of NAL units outputted in pp_nal. + * returns negative on error, 1 if a picture and access unit were output, + * or zero if the encoder pipeline is still filling or is empty after flushing. + * the payloads of all output NALs are guaranteed to be sequential in memory. + * To flush the encoder and retrieve delayed output pictures, pass pic_in as NULL. + * Once flushing has begun, all subsequent calls must pass pic_in as NULL. */ +int x265_encoder_encode(x265_encoder *encoder, x265_nal **pp_nal, uint32_t *pi_nal, x265_picture *pic_in, x265_picture *pic_out); + +/* x265_encoder_reconfig: + * various parameters from x265_param are copied. + * this takes effect immediately, on whichever frame is encoded next; + * returns 0 on success, negative on parameter validation error. + * + * not all parameters can be changed; see the actual function for a + * detailed breakdown. since not all parameters can be changed, moving + * from preset to preset may not always fully copy all relevant parameters, + * but should still work usably in practice. however, more so than for + * other presets, many of the speed shortcuts used in ultrafast cannot be + * switched out of; using reconfig to switch between ultrafast and other + * presets is not recommended without a more fine-grained breakdown of + * parameters to take this into account. */ +int x265_encoder_reconfig(x265_encoder *, x265_param *); + +/* x265_encoder_reconfig_zone: +* zone settings are copied to the encoder's param. +* Properties of the zone will be used only to re-configure rate-control settings +* of the zone mid-encode. Returns 0 on success on successful copy, negative on failure.*/ +int x265_encoder_reconfig_zone(x265_encoder *, x265_zone *); + +/* x265_encoder_get_stats: + * returns encoder statistics */ +void x265_encoder_get_stats(x265_encoder *encoder, x265_stats *, uint32_t statsSizeBytes); + +/* x265_encoder_log: + * write a line to the configured CSV file. If a CSV filename was not + * configured, or file open failed, this function will perform no write. */ +void x265_encoder_log(x265_encoder *encoder, int argc, char **argv); + +/* x265_encoder_close: + * close an encoder handler */ +void x265_encoder_close(x265_encoder *); + +/* x265_encoder_intra_refresh: + * If an intra refresh is not in progress, begin one with the next P-frame. + * If an intra refresh is in progress, begin one as soon as the current one finishes. + * Requires bIntraRefresh to be set. + * + * Useful for interactive streaming where the client can tell the server that packet loss has + * occurred. In this case, keyint can be set to an extremely high value so that intra refreshes + * occur only when calling x265_encoder_intra_refresh. + * + * In multi-pass encoding, if x265_encoder_intra_refresh is called differently in each pass, + * behavior is undefined. + * + * Should not be called during an x265_encoder_encode. */ + +int x265_encoder_intra_refresh(x265_encoder *); + +/* x265_encoder_ctu_info: + * Copy CTU information such as ctu address and ctu partition structure of all + * CTUs in each frame. The function is invoked only if "--ctu-info" is enabled and + * the encoder will wait for this copy to complete if enabled. + */ +int x265_encoder_ctu_info(x265_encoder *, int poc, x265_ctu_info_t** ctu); + +/* x265_get_slicetype_poc_and_scenecut: + * get the slice type, poc and scene cut information for the current frame, + * returns negative on error, 0 when access unit were output. + * This API must be called after(poc >= lookaheadDepth + bframes + 2) condition check */ +int x265_get_slicetype_poc_and_scenecut(x265_encoder *encoder, int *slicetype, int *poc, int* sceneCut); + +/* x265_get_ref_frame_list: + * returns negative on error, 0 when access unit were output. + * This API must be called after(poc >= lookaheadDepth + bframes + 2) condition check */ +int x265_get_ref_frame_list(x265_encoder *encoder, x265_picyuv**, x265_picyuv**, int, int, int*, int*); + +/* x265_set_analysis_data: + * set the analysis data. The incoming analysis_data structure is assumed to be AVC-sized blocks. + * returns negative on error, 0 access unit were output. */ +int x265_set_analysis_data(x265_encoder *encoder, x265_analysis_data *analysis_data, int poc, uint32_t cuBytes); + +/* x265_cleanup: + * release library static allocations, reset configured CTU size */ +void x265_cleanup(void); + +/* Open a CSV log file. On success it returns a file handle which must be passed + * to x265_csvlog_frame() and/or x265_csvlog_encode(). The file handle must be + * closed by the caller using fclose(). If csv-loglevel is 0, then no frame logging + * header is written to the file. This function will return NULL if it is unable + * to open the file for write or if it detects a structure size skew */ +FILE* x265_csvlog_open(const x265_param *); + +/* Log frame statistics to the CSV file handle. csv-loglevel should have been non-zero + * in the call to x265_csvlog_open() if this function is called. */ +void x265_csvlog_frame(const x265_param *, const x265_picture *); + +/* Log final encode statistics to the CSV file handle. 'argc' and 'argv' are + * intended to be command line arguments passed to the encoder. padx and pady are + * padding offsets for conformance and can be given from sps settings. Encode + * statistics should be queried from the encoder just prior to closing it. */ +void x265_csvlog_encode(const x265_param*, const x265_stats *, int padx, int pady, int argc, char** argv); + +/* In-place downshift from a bit-depth greater than 8 to a bit-depth of 8, using + * the residual bits to dither each row. */ +void x265_dither_image(x265_picture *, int picWidth, int picHeight, int16_t *errorBuf, int bitDepth); +#if ENABLE_LIBVMAF +/* x265_calculate_vmafScore: + * returns VMAF score for the input video. + * This api must be called only after encoding was done. */ +double x265_calculate_vmafscore(x265_param*, x265_vmaf_data*); + +/* x265_calculate_vmaf_framelevelscore: + * returns VMAF score for each frame in a given input video. */ +double x265_calculate_vmaf_framelevelscore(x265_vmaf_framedata*); +/* x265_vmaf_encoder_log: + * write a line to the configured CSV file. If a CSV filename was not + * configured, or file open failed, this function will perform no write. + * This api will be called only when ENABLE_LIBVMAF cmake option is set */ +void x265_vmaf_encoder_log(x265_encoder *encoder, int argc, char **argv, x265_param*, x265_vmaf_data*); + +#endif + +#define X265_MAJOR_VERSION 1 + +/* === Multi-lib API === + * By using this method to gain access to the libx265 interfaces, you allow run- + * time selection between various available libx265 libraries based on the + * encoder parameters. The most likely use case is to choose between Main and + * Main10 builds of libx265. */ + +typedef struct x265_api +{ + int api_major_version; /* X265_MAJOR_VERSION */ + int api_build_number; /* X265_BUILD (soname) */ + int sizeof_param; /* sizeof(x265_param) */ + int sizeof_picture; /* sizeof(x265_picture) */ + int sizeof_analysis_data; /* sizeof(x265_analysis_data) */ + int sizeof_zone; /* sizeof(x265_zone) */ + int sizeof_stats; /* sizeof(x265_stats) */ + + int bit_depth; + const char* version_str; + const char* build_info_str; + + /* libx265 public API functions, documented above with x265_ prefixes */ + x265_param* (*param_alloc)(void); + void (*param_free)(x265_param*); + void (*param_default)(x265_param*); + int (*param_parse)(x265_param*, const char*, const char*); + int (*scenecut_aware_qp_param_parse)(x265_param*, const char*, const char*); + int (*param_apply_profile)(x265_param*, const char*); + int (*param_default_preset)(x265_param*, const char*, const char *); + x265_picture* (*picture_alloc)(void); + void (*picture_free)(x265_picture*); + void (*picture_init)(x265_param*, x265_picture*); + x265_encoder* (*encoder_open)(x265_param*); + void (*encoder_parameters)(x265_encoder*, x265_param*); + int (*encoder_reconfig)(x265_encoder*, x265_param*); + int (*encoder_reconfig_zone)(x265_encoder*, x265_zone*); + int (*encoder_headers)(x265_encoder*, x265_nal**, uint32_t*); + int (*encoder_encode)(x265_encoder*, x265_nal**, uint32_t*, x265_picture*, x265_picture*); + void (*encoder_get_stats)(x265_encoder*, x265_stats*, uint32_t); + void (*encoder_log)(x265_encoder*, int, char**); + void (*encoder_close)(x265_encoder*); + void (*cleanup)(void); + + int sizeof_frame_stats; /* sizeof(x265_frame_stats) */ + int (*encoder_intra_refresh)(x265_encoder*); + int (*encoder_ctu_info)(x265_encoder*, int, x265_ctu_info_t**); + int (*get_slicetype_poc_and_scenecut)(x265_encoder*, int*, int*, int*); + int (*get_ref_frame_list)(x265_encoder*, x265_picyuv**, x265_picyuv**, int, int, int*, int*); + FILE* (*csvlog_open)(const x265_param*); + void (*csvlog_frame)(const x265_param*, const x265_picture*); + void (*csvlog_encode)(const x265_param*, const x265_stats *, int, int, int, char**); + void (*dither_image)(x265_picture*, int, int, int16_t*, int); + int (*set_analysis_data)(x265_encoder *encoder, x265_analysis_data *analysis_data, int poc, uint32_t cuBytes); +#if ENABLE_LIBVMAF + double (*calculate_vmafscore)(x265_param *, x265_vmaf_data *); + double (*calculate_vmaf_framelevelscore)(x265_vmaf_framedata *); + void (*vmaf_encoder_log)(x265_encoder*, int, char**, x265_param *, x265_vmaf_data *); +#endif + int (*zone_param_parse)(x265_param*, const char*, const char*); + /* add new pointers to the end, or increment X265_MAJOR_VERSION */ +} x265_api; + +/* Force a link error in the case of linking against an incompatible API version. + * Glue #defines exist to force correct macro expansion; the final output of the macro + * is x265_api_get_##X265_BUILD (for purposes of dlopen). */ +#define x265_api_glue1(x, y) x ## y +#define x265_api_glue2(x, y) x265_api_glue1(x, y) +#define x265_api_get x265_api_glue2(x265_api_get_, X265_BUILD) + +/* x265_api_get: + * Retrieve the programming interface for a linked x265 library. + * May return NULL if no library is available that supports the + * requested bit depth. If bitDepth is 0 the function is guarunteed + * to return a non-NULL x265_api pointer, from the linked libx265. + * + * If the requested bitDepth is not supported by the linked libx265, + * it will attempt to dynamically bind x265_api_get() from a shared + * library with an appropriate name: + * 8bit: libx265_main.so + * 10bit: libx265_main10.so + * Obviously the shared library file extension is platform specific */ +const x265_api* x265_api_get(int bitDepth); + +/* x265_api_query: + * Retrieve the programming interface for a linked x265 library, like + * x265_api_get(), except this function accepts X265_BUILD as the second + * argument rather than using the build number as part of the function name. + * Applications which dynamically link to libx265 can use this interface to + * query the library API and achieve a relative amount of version skew + * flexibility. The function may return NULL if the library determines that + * the apiVersion that your application was compiled against is not compatible + * with the library you have linked with. + * + * api_major_version will be incremented any time non-backward compatible + * changes are made to any public structures or functions. If + * api_major_version does not match X265_MAJOR_VERSION from the x265.h your + * application compiled against, your application must not use the returned + * x265_api pointer. + * + * Users of this API *must* also validate the sizes of any structures which + * are not treated as opaque in application code. For instance, if your + * application dereferences a x265_param pointer, then it must check that + * api->sizeof_param matches the sizeof(x265_param) that your application + * compiled with. */ +const x265_api* x265_api_query(int bitDepth, int apiVersion, int* err); + +#define X265_API_QUERY_ERR_NONE 0 /* returned API pointer is non-NULL */ +#define X265_API_QUERY_ERR_VER_REFUSED 1 /* incompatible version skew */ +#define X265_API_QUERY_ERR_LIB_NOT_FOUND 2 /* libx265_main10 not found, for ex */ +#define X265_API_QUERY_ERR_FUNC_NOT_FOUND 3 /* unable to bind x265_api_query */ +#define X265_API_QUERY_ERR_WRONG_BITDEPTH 4 /* libx265_main10 not 10bit, for ex */ + +static const char * const x265_api_query_errnames[] = { + "api queried from libx265", + "libx265 version is not compatible with this application", + "unable to bind a libx265 with requested bit depth", + "unable to bind x265_api_query from libx265", + "libx265 has an invalid bitdepth" +}; + +#ifdef __cplusplus +} +#endif + +#endif // X265_H diff --git a/vcpkg/installed/x64-osx/include/x265_config.h b/vcpkg/installed/x64-osx/include/x265_config.h new file mode 100644 index 0000000..1800393 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/x265_config.h @@ -0,0 +1,34 @@ +/***************************************************************************** + * Copyright (C) 2013-2020 MulticoreWare, Inc + * + * Authors: Steve Borho + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. + * + * This program is also available under a commercial proprietary license. + * For more information, contact us at license @ x265.com. + *****************************************************************************/ + +#ifndef X265_CONFIG_H +#define X265_CONFIG_H + +/* Defines generated at build time */ + +/* Incremented each time public API is changed, X265_BUILD is used as + * the shared library SONAME on platforms which support it. It also + * prevents linking against a different version of the static lib */ +#define X265_BUILD 209 + +#endif diff --git a/vcpkg/installed/x64-osx/include/zconf.h b/vcpkg/installed/x64-osx/include/zconf.h new file mode 100644 index 0000000..7e9c73f --- /dev/null +++ b/vcpkg/installed/x64-osx/include/zconf.h @@ -0,0 +1,553 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#ifndef ZCONF_H +#define ZCONF_H +/* #undef Z_PREFIX */ +#define Z_HAVE_UNISTD_H + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + * Even better than compiling with -DZ_PREFIX would be to use configure to set + * this permanently in zconf.h using "./configure --zprefix". + */ +#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ +# define Z_PREFIX_SET + +/* all linked symbols and init macros */ +# define _dist_code z__dist_code +# define _length_code z__length_code +# define _tr_align z__tr_align +# define _tr_flush_bits z__tr_flush_bits +# define _tr_flush_block z__tr_flush_block +# define _tr_init z__tr_init +# define _tr_stored_block z__tr_stored_block +# define _tr_tally z__tr_tally +# define adler32 z_adler32 +# define adler32_combine z_adler32_combine +# define adler32_combine64 z_adler32_combine64 +# define adler32_z z_adler32_z +# ifndef Z_SOLO +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# endif +# define crc32 z_crc32 +# define crc32_combine z_crc32_combine +# define crc32_combine64 z_crc32_combine64 +# define crc32_combine_gen z_crc32_combine_gen +# define crc32_combine_gen64 z_crc32_combine_gen64 +# define crc32_combine_op z_crc32_combine_op +# define crc32_z z_crc32_z +# define deflate z_deflate +# define deflateBound z_deflateBound +# define deflateCopy z_deflateCopy +# define deflateEnd z_deflateEnd +# define deflateGetDictionary z_deflateGetDictionary +# define deflateInit z_deflateInit +# define deflateInit2 z_deflateInit2 +# define deflateInit2_ z_deflateInit2_ +# define deflateInit_ z_deflateInit_ +# define deflateParams z_deflateParams +# define deflatePending z_deflatePending +# define deflatePrime z_deflatePrime +# define deflateReset z_deflateReset +# define deflateResetKeep z_deflateResetKeep +# define deflateSetDictionary z_deflateSetDictionary +# define deflateSetHeader z_deflateSetHeader +# define deflateTune z_deflateTune +# define deflate_copyright z_deflate_copyright +# define get_crc_table z_get_crc_table +# ifndef Z_SOLO +# define gz_error z_gz_error +# define gz_intmax z_gz_intmax +# define gz_strwinerror z_gz_strwinerror +# define gzbuffer z_gzbuffer +# define gzclearerr z_gzclearerr +# define gzclose z_gzclose +# define gzclose_r z_gzclose_r +# define gzclose_w z_gzclose_w +# define gzdirect z_gzdirect +# define gzdopen z_gzdopen +# define gzeof z_gzeof +# define gzerror z_gzerror +# define gzflush z_gzflush +# define gzfread z_gzfread +# define gzfwrite z_gzfwrite +# define gzgetc z_gzgetc +# define gzgetc_ z_gzgetc_ +# define gzgets z_gzgets +# define gzoffset z_gzoffset +# define gzoffset64 z_gzoffset64 +# define gzopen z_gzopen +# define gzopen64 z_gzopen64 +# ifdef _WIN32 +# define gzopen_w z_gzopen_w +# endif +# define gzprintf z_gzprintf +# define gzputc z_gzputc +# define gzputs z_gzputs +# define gzread z_gzread +# define gzrewind z_gzrewind +# define gzseek z_gzseek +# define gzseek64 z_gzseek64 +# define gzsetparams z_gzsetparams +# define gztell z_gztell +# define gztell64 z_gztell64 +# define gzungetc z_gzungetc +# define gzvprintf z_gzvprintf +# define gzwrite z_gzwrite +# endif +# define inflate z_inflate +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define inflateBackInit z_inflateBackInit +# define inflateBackInit_ z_inflateBackInit_ +# define inflateCodesUsed z_inflateCodesUsed +# define inflateCopy z_inflateCopy +# define inflateEnd z_inflateEnd +# define inflateGetDictionary z_inflateGetDictionary +# define inflateGetHeader z_inflateGetHeader +# define inflateInit z_inflateInit +# define inflateInit2 z_inflateInit2 +# define inflateInit2_ z_inflateInit2_ +# define inflateInit_ z_inflateInit_ +# define inflateMark z_inflateMark +# define inflatePrime z_inflatePrime +# define inflateReset z_inflateReset +# define inflateReset2 z_inflateReset2 +# define inflateResetKeep z_inflateResetKeep +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateUndermine z_inflateUndermine +# define inflateValidate z_inflateValidate +# define inflate_copyright z_inflate_copyright +# define inflate_fast z_inflate_fast +# define inflate_table z_inflate_table +# ifndef Z_SOLO +# define uncompress z_uncompress +# define uncompress2 z_uncompress2 +# endif +# define zError z_zError +# ifndef Z_SOLO +# define zcalloc z_zcalloc +# define zcfree z_zcfree +# endif +# define zlibCompileFlags z_zlibCompileFlags +# define zlibVersion z_zlibVersion + +/* all zlib typedefs in zlib.h and zconf.h */ +# define Byte z_Byte +# define Bytef z_Bytef +# define alloc_func z_alloc_func +# define charf z_charf +# define free_func z_free_func +# ifndef Z_SOLO +# define gzFile z_gzFile +# endif +# define gz_header z_gz_header +# define gz_headerp z_gz_headerp +# define in_func z_in_func +# define intf z_intf +# define out_func z_out_func +# define uInt z_uInt +# define uIntf z_uIntf +# define uLong z_uLong +# define uLongf z_uLongf +# define voidp z_voidp +# define voidpc z_voidpc +# define voidpf z_voidpf + +/* all zlib structs in zlib.h and zconf.h */ +# define gz_header_s z_gz_header_s +# define internal_state z_internal_state + +#endif + +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) +# define OS2 +#endif +#if defined(_WINDOWS) && !defined(WINDOWS) +# define WINDOWS +#endif +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) +# ifndef WIN32 +# define WIN32 +# endif +#endif +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) +# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) +# ifndef SYS16BIT +# define SYS16BIT +# endif +# endif +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#ifdef SYS16BIT +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) +# define STDC +#endif +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) +# define STDC +#endif +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) +# define STDC +#endif +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) +# define STDC +#endif + +#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ +# define STDC +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const /* note: need a more gentle solution here */ +# endif +#endif + +#if defined(ZLIB_CONST) && !defined(z_const) +# define z_const const +#else +# define z_const +#endif + +#ifdef Z_SOLO +# ifdef _WIN64 + typedef unsigned long long z_size_t; +# else + typedef unsigned long z_size_t; +# endif +#else +# define z_longlong long long +# if defined(NO_SIZE_T) + typedef unsigned NO_SIZE_T z_size_t; +# elif defined(STDC) +# include + typedef size_t z_size_t; +# else + typedef unsigned long z_size_t; +# endif +# undef z_longlong +#endif + +/* Maximum value for memLevel in deflateInit2 */ +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +# define MAX_MEM_LEVEL 8 +# else +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +# define MAX_WBITS 15 /* 32K LZ77 window */ +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus about 7 kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +# define OF(args) args +# else +# define OF(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#ifdef SYS16BIT +# if defined(M_I86SM) || defined(M_I86MM) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +# endif +# if (defined(__SMALL__) || defined(__MEDIUM__)) + /* Turbo C small or medium model */ +# define SMALL_MEDIUM +# ifdef __BORLANDC__ +# define FAR _far +# else +# define FAR far +# endif +# endif +#endif + +#if defined(WINDOWS) || defined(WIN32) + /* If building or using zlib as a DLL, define ZLIB_DLL. + * This is not mandatory, but it offers a little performance increase. + */ +# if 0 +# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) +# ifdef ZLIB_INTERNAL +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +# endif +# endif /* ZLIB_DLL */ + /* If building or using zlib with the WINAPI/WINAPIV calling convention, + * define ZLIB_WINAPI. + * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. + */ +# ifdef ZLIB_WINAPI +# ifdef FAR +# undef FAR +# endif +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include + /* No need for _export, use ZLIB.DEF instead. */ + /* For complete Windows compatibility, use WINAPI, not __stdcall. */ +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR CDECL +# endif +# endif +#endif + +#if defined (__BEOS__) +# if 0 +# ifdef ZLIB_INTERNAL +# define ZEXPORT __declspec(dllexport) +# define ZEXPORTVA __declspec(dllexport) +# else +# define ZEXPORT __declspec(dllimport) +# define ZEXPORTVA __declspec(dllimport) +# endif +# endif +#endif + +#ifndef ZEXTERN +# define ZEXTERN extern +#endif +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif + +#ifndef FAR +# define FAR +#endif + +#if !defined(__MACTYPES__) +typedef unsigned char Byte; /* 8 bits */ +#endif +typedef unsigned int uInt; /* 16 bits or more */ +typedef unsigned long uLong; /* 32 bits or more */ + +#ifdef SMALL_MEDIUM + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + typedef Byte FAR Bytef; +#endif +typedef char FAR charf; +typedef int FAR intf; +typedef uInt FAR uIntf; +typedef uLong FAR uLongf; + +#ifdef STDC + typedef void const *voidpc; + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte const *voidpc; + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) +# include +# if (UINT_MAX == 0xffffffffUL) +# define Z_U4 unsigned +# elif (ULONG_MAX == 0xffffffffUL) +# define Z_U4 unsigned long +# elif (USHRT_MAX == 0xffffffffUL) +# define Z_U4 unsigned short +# endif +#endif + +#ifdef Z_U4 + typedef Z_U4 z_crc_t; +#else + typedef unsigned long z_crc_t; +#endif + +#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +# if ~(~HAVE_UNISTD_H + 0) == 0 && ~(~HAVE_UNISTD_H + 1) == 1 +# define Z_HAVE_UNISTD_H +# elif HAVE_UNISTD_H != 0 +# define Z_HAVE_UNISTD_H +# endif +#endif + +#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ +# if ~(~HAVE_STDARG_H + 0) == 0 && ~(~HAVE_STDARG_H + 1) == 1 +# define Z_HAVE_STDARG_H +# elif HAVE_STDARG_H != 0 +# define Z_HAVE_STDARG_H +# endif +#endif + +#ifdef STDC +# ifndef Z_SOLO +# include /* for off_t */ +# endif +#endif + +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +# include /* for va_list */ +# endif +#endif + +#ifdef _WIN32 +# ifndef Z_SOLO +# include /* for wchar_t */ +# endif +#endif + +/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and + * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even + * though the former does not conform to the LFS document), but considering + * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as + * equivalently requesting no 64-bit operations + */ +#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 +# undef _LARGEFILE64_SOURCE +#endif + +#ifndef Z_HAVE_UNISTD_H +# ifdef __WATCOMC__ +# define Z_HAVE_UNISTD_H +# endif +#endif +#ifndef Z_HAVE_UNISTD_H +# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32) +# define Z_HAVE_UNISTD_H +# endif +#endif +#ifndef Z_SOLO +# if defined(Z_HAVE_UNISTD_H) +# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ +# ifdef VMS +# include /* for off_t */ +# endif +# ifndef z_off_t +# define z_off_t off_t +# endif +# endif +#endif + +#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 +# define Z_LFS64 +#endif + +#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) +# define Z_LARGE64 +#endif + +#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) +# define Z_WANT64 +#endif + +#if !defined(SEEK_SET) && !defined(Z_SOLO) +# define SEEK_SET 0 /* Seek from beginning of file. */ +# define SEEK_CUR 1 /* Seek from current position. */ +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +#endif + +#ifndef z_off_t +# define z_off_t long +#endif + +#if !defined(_WIN32) && defined(Z_LARGE64) +# define z_off64_t off64_t +#else +# if defined(_WIN32) && !defined(__GNUC__) +# define z_off64_t __int64 +# else +# define z_off64_t z_off_t +# endif +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) + #pragma map(deflateInit_,"DEIN") + #pragma map(deflateInit2_,"DEIN2") + #pragma map(deflateEnd,"DEEND") + #pragma map(deflateBound,"DEBND") + #pragma map(inflateInit_,"ININ") + #pragma map(inflateInit2_,"ININ2") + #pragma map(inflateEnd,"INEND") + #pragma map(inflateSync,"INSY") + #pragma map(inflateSetDictionary,"INSEDI") + #pragma map(compressBound,"CMBND") + #pragma map(inflate_table,"INTABL") + #pragma map(inflate_fast,"INFA") + #pragma map(inflate_copyright,"INCOPY") +#endif + +#endif /* ZCONF_H */ diff --git a/vcpkg/installed/x64-osx/include/zlib.h b/vcpkg/installed/x64-osx/include/zlib.h new file mode 100644 index 0000000..8d4b932 --- /dev/null +++ b/vcpkg/installed/x64-osx/include/zlib.h @@ -0,0 +1,1938 @@ +/* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.3.1, January 22nd, 2024 + + Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + + + The data format used by the zlib library is described by RFCs (Request for + Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 + (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). +*/ + +#ifndef ZLIB_H +#define ZLIB_H + +#include "zconf.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ZLIB_VERSION "1.3.1" +#define ZLIB_VERNUM 0x1310 +#define ZLIB_VER_MAJOR 1 +#define ZLIB_VER_MINOR 3 +#define ZLIB_VER_REVISION 1 +#define ZLIB_VER_SUBREVISION 0 + +/* + The 'zlib' compression library provides in-memory compression and + decompression functions, including integrity checks of the uncompressed data. + This version of the library supports only one compression method (deflation) + but other algorithms will be added later and will have the same stream + interface. + + Compression can be done in a single step if the buffers are large enough, + or can be done by repeated calls of the compression function. In the latter + case, the application must provide more input and/or consume the output + (providing more output space) before each call. + + The compressed data format used by default by the in-memory functions is + the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped + around a deflate stream, which is itself documented in RFC 1951. + + The library also supports reading and writing files in gzip (.gz) format + with an interface similar to that of stdio using the functions that start + with "gz". The gzip format is different from the zlib format. gzip is a + gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. + + This library can optionally read and write gzip and raw deflate streams in + memory as well. + + The zlib format was designed to be compact and fast for use in memory + and on communications channels. The gzip format was designed for single- + file compression on file systems, has a larger header than zlib to maintain + directory information, and uses a different, slower check method than zlib. + + The library does not install any signal handler. The decoder checks + the consistency of the compressed data, so the library should never crash + even in the case of corrupted input. +*/ + +typedef voidpf (*alloc_func)(voidpf opaque, uInt items, uInt size); +typedef void (*free_func)(voidpf opaque, voidpf address); + +struct internal_state; + +typedef struct z_stream_s { + z_const Bytef *next_in; /* next input byte */ + uInt avail_in; /* number of bytes available at next_in */ + uLong total_in; /* total number of input bytes read so far */ + + Bytef *next_out; /* next output byte will go here */ + uInt avail_out; /* remaining free space at next_out */ + uLong total_out; /* total number of bytes output so far */ + + z_const char *msg; /* last error message, NULL if no error */ + struct internal_state FAR *state; /* not visible by applications */ + + alloc_func zalloc; /* used to allocate the internal state */ + free_func zfree; /* used to free the internal state */ + voidpf opaque; /* private data object passed to zalloc and zfree */ + + int data_type; /* best guess about the data type: binary or text + for deflate, or the decoding state for inflate */ + uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */ + uLong reserved; /* reserved for future use */ +} z_stream; + +typedef z_stream FAR *z_streamp; + +/* + gzip header information passed to and from zlib routines. See RFC 1952 + for more details on the meanings of these fields. +*/ +typedef struct gz_header_s { + int text; /* true if compressed data believed to be text */ + uLong time; /* modification time */ + int xflags; /* extra flags (not used when writing a gzip file) */ + int os; /* operating system */ + Bytef *extra; /* pointer to extra field or Z_NULL if none */ + uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ + uInt extra_max; /* space at extra (only when reading header) */ + Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ + uInt name_max; /* space at name (only when reading header) */ + Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ + uInt comm_max; /* space at comment (only when reading header) */ + int hcrc; /* true if there was or will be a header crc */ + int done; /* true when done reading gzip header (not used + when writing a gzip file) */ +} gz_header; + +typedef gz_header FAR *gz_headerp; + +/* + The application must update next_in and avail_in when avail_in has dropped + to zero. It must update next_out and avail_out when avail_out has dropped + to zero. The application must initialize zalloc, zfree and opaque before + calling the init function. All other fields are set by the compression + library and must not be updated by the application. + + The opaque value provided by the application will be passed as the first + parameter for calls of zalloc and zfree. This can be useful for custom + memory management. The compression library attaches no meaning to the + opaque value. + + zalloc must return Z_NULL if there is not enough memory for the object. + If zlib is used in a multi-threaded application, zalloc and zfree must be + thread safe. In that case, zlib is thread-safe. When zalloc and zfree are + Z_NULL on entry to the initialization function, they are set to internal + routines that use the standard library functions malloc() and free(). + + On 16-bit systems, the functions zalloc and zfree must be able to allocate + exactly 65536 bytes, but will not be required to allocate more than this if + the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers + returned by zalloc for objects of exactly 65536 bytes *must* have their + offset normalized to zero. The default allocation function provided by this + library ensures this (see zutil.c). To reduce memory requirements and avoid + any allocation of 64K objects, at the expense of compression ratio, compile + the library with -DMAX_WBITS=14 (see zconf.h). + + The fields total_in and total_out can be used for statistics or progress + reports. After compression, total_in holds the total size of the + uncompressed data and may be saved for use by the decompressor (particularly + if the decompressor wants to decompress everything in a single step). +*/ + + /* constants */ + +#define Z_NO_FLUSH 0 +#define Z_PARTIAL_FLUSH 1 +#define Z_SYNC_FLUSH 2 +#define Z_FULL_FLUSH 3 +#define Z_FINISH 4 +#define Z_BLOCK 5 +#define Z_TREES 6 +/* Allowed flush values; see deflate() and inflate() below for details */ + +#define Z_OK 0 +#define Z_STREAM_END 1 +#define Z_NEED_DICT 2 +#define Z_ERRNO (-1) +#define Z_STREAM_ERROR (-2) +#define Z_DATA_ERROR (-3) +#define Z_MEM_ERROR (-4) +#define Z_BUF_ERROR (-5) +#define Z_VERSION_ERROR (-6) +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + +#define Z_NO_COMPRESSION 0 +#define Z_BEST_SPEED 1 +#define Z_BEST_COMPRESSION 9 +#define Z_DEFAULT_COMPRESSION (-1) +/* compression levels */ + +#define Z_FILTERED 1 +#define Z_HUFFMAN_ONLY 2 +#define Z_RLE 3 +#define Z_FIXED 4 +#define Z_DEFAULT_STRATEGY 0 +/* compression strategy; see deflateInit2() below for details */ + +#define Z_BINARY 0 +#define Z_TEXT 1 +#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ +#define Z_UNKNOWN 2 +/* Possible values of the data_type field for deflate() */ + +#define Z_DEFLATED 8 +/* The deflate compression method (the only one supported in this version) */ + +#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ + +#define zlib_version zlibVersion() +/* for compatibility with versions < 1.0.2 */ + + + /* basic functions */ + +ZEXTERN const char * ZEXPORT zlibVersion(void); +/* The application can compare zlibVersion and ZLIB_VERSION for consistency. + If the first character differs, the library code actually used is not + compatible with the zlib.h header file used by the application. This check + is automatically made by deflateInit and inflateInit. + */ + +/* +ZEXTERN int ZEXPORT deflateInit(z_streamp strm, int level); + + Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. If + zalloc and zfree are set to Z_NULL, deflateInit updates them to use default + allocation functions. total_in, total_out, adler, and msg are initialized. + + The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: + 1 gives best speed, 9 gives best compression, 0 gives no compression at all + (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION + requests a default compromise between speed and compression (currently + equivalent to level 6). + + deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if level is not a valid compression level, or + Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible + with the version assumed by the caller (ZLIB_VERSION). msg is set to null + if there is no error message. deflateInit does not perform any compression: + this will be done by deflate(). +*/ + + +ZEXTERN int ZEXPORT deflate(z_streamp strm, int flush); +/* + deflate compresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. deflate performs one or both of the + following actions: + + - Compress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in and avail_in are updated and + processing will resume at this point for the next call of deflate(). + + - Generate more output starting at next_out and update next_out and avail_out + accordingly. This action is forced if the parameter flush is non zero. + Forcing flush frequently degrades the compression ratio, so this parameter + should be set only when necessary. Some output may be provided even if + flush is zero. + + Before the call of deflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating avail_in or avail_out accordingly; avail_out should + never be zero before the call. The application can consume the compressed + output when it wants, for example when the output buffer is full (avail_out + == 0), or after each call of deflate(). If deflate returns Z_OK and with + zero avail_out, it must be called again after making room in the output + buffer because there might be more output pending. See deflatePending(), + which can be used if desired to determine whether or not there is more output + in that case. + + Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to + decide how much data to accumulate before producing output, in order to + maximize compression. + + If the parameter flush is set to Z_SYNC_FLUSH, all pending output is + flushed to the output buffer and the output is aligned on a byte boundary, so + that the decompressor can get all input data available so far. (In + particular avail_in is zero after the call if enough output space has been + provided before the call.) Flushing may degrade compression for some + compression algorithms and so it should be used only when necessary. This + completes the current deflate block and follows it with an empty stored block + that is three bits plus filler bits to the next byte, followed by four bytes + (00 00 ff ff). + + If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the + output buffer, but the output is not aligned to a byte boundary. All of the + input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. + This completes the current deflate block and follows it with an empty fixed + codes block that is 10 bits long. This assures that enough bytes are output + in order for the decompressor to finish the block before the empty fixed + codes block. + + If flush is set to Z_BLOCK, a deflate block is completed and emitted, as + for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to + seven bits of the current block are held to be written as the next byte after + the next deflate block is completed. In this case, the decompressor may not + be provided enough bits at this point in order to complete decompression of + the data provided so far to the compressor. It may need to wait for the next + block to be emitted. This is for advanced applications that need to control + the emission of deflate blocks. + + If flush is set to Z_FULL_FLUSH, all output is flushed as with + Z_SYNC_FLUSH, and the compression state is reset so that decompression can + restart from this point if previous compressed data has been damaged or if + random access is desired. Using Z_FULL_FLUSH too often can seriously degrade + compression. + + If deflate returns with avail_out == 0, this function must be called again + with the same value of the flush parameter and more output space (updated + avail_out), until the flush is complete (deflate returns with non-zero + avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that + avail_out is greater than six when the flush marker begins, in order to avoid + repeated flush markers upon calling deflate() again when avail_out == 0. + + If the parameter flush is set to Z_FINISH, pending input is processed, + pending output is flushed and deflate returns with Z_STREAM_END if there was + enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this + function must be called again with Z_FINISH and more output space (updated + avail_out) but no more input data, until it returns with Z_STREAM_END or an + error. After deflate has returned Z_STREAM_END, the only possible operations + on the stream are deflateReset or deflateEnd. + + Z_FINISH can be used in the first deflate call after deflateInit if all the + compression is to be done in a single step. In order to complete in one + call, avail_out must be at least the value returned by deflateBound (see + below). Then deflate is guaranteed to return Z_STREAM_END. If not enough + output space is provided, deflate will not return Z_STREAM_END, and it must + be called again as described above. + + deflate() sets strm->adler to the Adler-32 checksum of all input read + so far (that is, total_in bytes). If a gzip stream is being generated, then + strm->adler will be the CRC-32 checksum of the input read so far. (See + deflateInit2 below.) + + deflate() may update strm->data_type if it can make a good guess about + the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is + considered binary. This field is only for information purposes and does not + affect the compression algorithm in any manner. + + deflate() returns Z_OK if some progress has been made (more input + processed or more output produced), Z_STREAM_END if all input has been + consumed and all output has been produced (only when flush is set to + Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example + if next_in or next_out was Z_NULL or the state was inadvertently written over + by the application), or Z_BUF_ERROR if no progress is possible (for example + avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and + deflate() can be called again with more input and more output space to + continue compressing. +*/ + + +ZEXTERN int ZEXPORT deflateEnd(z_streamp strm); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any pending + output. + + deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the + stream state was inconsistent, Z_DATA_ERROR if the stream was freed + prematurely (some input or output was discarded). In the error case, msg + may be set but then points to a static string (which must not be + deallocated). +*/ + + +/* +ZEXTERN int ZEXPORT inflateInit(z_streamp strm); + + Initializes the internal stream state for decompression. The fields + next_in, avail_in, zalloc, zfree and opaque must be initialized before by + the caller. In the current version of inflate, the provided input is not + read or consumed. The allocation of a sliding window will be deferred to + the first call of inflate (if the decompression does not complete on the + first call). If zalloc and zfree are set to Z_NULL, inflateInit updates + them to use default allocation functions. total_in, total_out, adler, and + msg are initialized. + + inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit does not perform any decompression. + Actual decompression will be done by inflate(). So next_in, and avail_in, + next_out, and avail_out are unused and unchanged. The current + implementation of inflateInit() does not process any header information -- + that is deferred until inflate() is called. +*/ + + +ZEXTERN int ZEXPORT inflate(z_streamp strm, int flush); +/* + inflate decompresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. inflate performs one or both of the + following actions: + + - Decompress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), then next_in and avail_in are updated + accordingly, and processing will resume at this point for the next call of + inflate(). + + - Generate more output starting at next_out and update next_out and avail_out + accordingly. inflate() provides as much output as possible, until there is + no more input data or no more space in the output buffer (see below about + the flush parameter). + + Before the call of inflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating the next_* and avail_* values accordingly. If the + caller of inflate() does not provide both available input and available + output space, it is possible that there will be no progress made. The + application can consume the uncompressed output when it wants, for example + when the output buffer is full (avail_out == 0), or after each call of + inflate(). If inflate returns Z_OK and with zero avail_out, it must be + called again after making room in the output buffer because there might be + more output pending. + + The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, + Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much + output as possible to the output buffer. Z_BLOCK requests that inflate() + stop if and when it gets to the next deflate block boundary. When decoding + the zlib or gzip format, this will cause inflate() to return immediately + after the header and before the first block. When doing a raw inflate, + inflate() will go ahead and process the first block, and will return when it + gets to the end of that block, or when it runs out of data. + + The Z_BLOCK option assists in appending to or combining deflate streams. + To assist in this, on return inflate() always sets strm->data_type to the + number of unused bits in the last byte taken from strm->next_in, plus 64 if + inflate() is currently decoding the last block in the deflate stream, plus + 128 if inflate() returned immediately after decoding an end-of-block code or + decoding the complete header up to just before the first byte of the deflate + stream. The end-of-block will not be indicated until all of the uncompressed + data from that block has been written to strm->next_out. The number of + unused bits may in general be greater than seven, except when bit 7 of + data_type is set, in which case the number of unused bits will be less than + eight. data_type is set as noted here every time inflate() returns for all + flush options, and so can be used to determine the amount of currently + consumed input in bits. + + The Z_TREES option behaves as Z_BLOCK does, but it also returns when the + end of each deflate block header is reached, before any actual data in that + block is decoded. This allows the caller to determine the length of the + deflate block header for later use in random access within a deflate block. + 256 is added to the value of strm->data_type when inflate() returns + immediately after reaching the end of the deflate block header. + + inflate() should normally be called until it returns Z_STREAM_END or an + error. However if all decompression is to be performed in a single step (a + single call of inflate), the parameter flush should be set to Z_FINISH. In + this case all pending input is processed and all pending output is flushed; + avail_out must be large enough to hold all of the uncompressed data for the + operation to complete. (The size of the uncompressed data may have been + saved by the compressor for this purpose.) The use of Z_FINISH is not + required to perform an inflation in one step. However it may be used to + inform inflate that a faster approach can be used for the single inflate() + call. Z_FINISH also informs inflate to not maintain a sliding window if the + stream completes, which reduces inflate's memory footprint. If the stream + does not complete, either because not all of the stream is provided or not + enough output space is provided, then a sliding window will be allocated and + inflate() can be called again to continue the operation as if Z_NO_FLUSH had + been used. + + In this implementation, inflate() always flushes as much output as + possible to the output buffer, and always uses the faster approach on the + first call. So the effects of the flush parameter in this implementation are + on the return value of inflate() as noted below, when inflate() returns early + when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of + memory for a sliding window when Z_FINISH is used. + + If a preset dictionary is needed after this call (see inflateSetDictionary + below), inflate sets strm->adler to the Adler-32 checksum of the dictionary + chosen by the compressor and returns Z_NEED_DICT; otherwise it sets + strm->adler to the Adler-32 checksum of all output produced so far (that is, + total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described + below. At the end of the stream, inflate() checks that its computed Adler-32 + checksum is equal to that saved by the compressor and returns Z_STREAM_END + only if the checksum is correct. + + inflate() can decompress and check either zlib-wrapped or gzip-wrapped + deflate data. The header type is detected automatically, if requested when + initializing with inflateInit2(). Any information contained in the gzip + header is not retained unless inflateGetHeader() is used. When processing + gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output + produced so far. The CRC-32 is checked against the gzip trailer, as is the + uncompressed length, modulo 2^32. + + inflate() returns Z_OK if some progress has been made (more input processed + or more output produced), Z_STREAM_END if the end of the compressed data has + been reached and all uncompressed output has been produced, Z_NEED_DICT if a + preset dictionary is needed at this point, Z_DATA_ERROR if the input data was + corrupted (input stream not conforming to the zlib format or incorrect check + value, in which case strm->msg points to a string with a more specific + error), Z_STREAM_ERROR if the stream structure was inconsistent (for example + next_in or next_out was Z_NULL, or the state was inadvertently written over + by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR + if no progress was possible or if there was not enough room in the output + buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and + inflate() can be called again with more input and more output space to + continue decompressing. If Z_DATA_ERROR is returned, the application may + then call inflateSync() to look for a good compression block if a partial + recovery of the data is to be attempted. +*/ + + +ZEXTERN int ZEXPORT inflateEnd(z_streamp strm); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any pending + output. + + inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state + was inconsistent. +*/ + + + /* Advanced functions */ + +/* + The following functions are needed only in some special applications. +*/ + +/* +ZEXTERN int ZEXPORT deflateInit2(z_streamp strm, + int level, + int method, + int windowBits, + int memLevel, + int strategy); + + This is another version of deflateInit with more compression options. The + fields zalloc, zfree and opaque must be initialized before by the caller. + + The method parameter is the compression method. It must be Z_DEFLATED in + this version of the library. + + The windowBits parameter is the base two logarithm of the window size + (the size of the history buffer). It should be in the range 8..15 for this + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if + deflateInit is used instead. + + For the current implementation of deflate(), a windowBits value of 8 (a + window size of 256 bytes) is not supported. As a result, a request for 8 + will result in 9 (a 512-byte window). In that case, providing 8 to + inflateInit2() will result in an error when the zlib header with 9 is + checked against the initialization of inflate(). The remedy is to not use 8 + with deflateInit2() with this initialization, or at least in that case use 9 + with inflateInit2(). + + windowBits can also be -8..-15 for raw deflate. In this case, -windowBits + determines the window size. deflate() will then generate raw deflate data + with no zlib header or trailer, and will not compute a check value. + + windowBits can also be greater than 15 for optional gzip encoding. Add + 16 to windowBits to write a simple gzip header and trailer around the + compressed data instead of a zlib wrapper. The gzip header will have no + file name, no extra data, no comment, no modification time (set to zero), no + header crc, and the operating system will be set to the appropriate value, + if the operating system was determined at compile time. If a gzip stream is + being written, strm->adler is a CRC-32 instead of an Adler-32. + + For raw deflate or gzip encoding, a request for a 256-byte window is + rejected as invalid, since only the zlib header provides a means of + transmitting the window size to the decompressor. + + The memLevel parameter specifies how much memory should be allocated + for the internal compression state. memLevel=1 uses minimum memory but is + slow and reduces compression ratio; memLevel=9 uses maximum memory for + optimal speed. The default value is 8. See zconf.h for total memory usage + as a function of windowBits and memLevel. + + The strategy parameter is used to tune the compression algorithm. Use the + value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a + filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no + string match), or Z_RLE to limit match distances to one (run-length + encoding). Filtered data consists mostly of small values with a somewhat + random distribution. In this case, the compression algorithm is tuned to + compress them better. The effect of Z_FILTERED is to force more Huffman + coding and less string matching; it is somewhat intermediate between + Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as + fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The + strategy parameter only affects the compression ratio but not the + correctness of the compressed output even if it is not set appropriately. + Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler + decoder for special applications. + + deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid + method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is + incompatible with the version assumed by the caller (ZLIB_VERSION). msg is + set to null if there is no error message. deflateInit2 does not perform any + compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateSetDictionary(z_streamp strm, + const Bytef *dictionary, + uInt dictLength); +/* + Initializes the compression dictionary from the given byte sequence + without producing any compressed output. When using the zlib format, this + function must be called immediately after deflateInit, deflateInit2 or + deflateReset, and before any call of deflate. When doing raw deflate, this + function must be called either before any call of deflate, or immediately + after the completion of a deflate block, i.e. after all input has been + consumed and all output has been delivered when using any of the flush + options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The + compressor and decompressor must use exactly the same dictionary (see + inflateSetDictionary). + + The dictionary should consist of strings (byte sequences) that are likely + to be encountered later in the data to be compressed, with the most commonly + used strings preferably put towards the end of the dictionary. Using a + dictionary is most useful when the data to be compressed is short and can be + predicted with good accuracy; the data can then be compressed better than + with the default empty dictionary. + + Depending on the size of the compression data structures selected by + deflateInit or deflateInit2, a part of the dictionary may in effect be + discarded, for example if the dictionary is larger than the window size + provided in deflateInit or deflateInit2. Thus the strings most likely to be + useful should be put at the end of the dictionary, not at the front. In + addition, the current implementation of deflate will use at most the window + size minus 262 bytes of the provided dictionary. + + Upon return of this function, strm->adler is set to the Adler-32 value + of the dictionary; the decompressor may later use this value to determine + which dictionary has been used by the compressor. (The Adler-32 value + applies to the whole dictionary even if only a subset of the dictionary is + actually used by the compressor.) If a raw deflate was requested, then the + Adler-32 value is not computed and strm->adler is not set. + + deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is + inconsistent (for example if deflate has already been called for this stream + or if not at a block boundary for raw deflate). deflateSetDictionary does + not perform any compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateGetDictionary(z_streamp strm, + Bytef *dictionary, + uInt *dictLength); +/* + Returns the sliding dictionary being maintained by deflate. dictLength is + set to the number of bytes in the dictionary, and that many bytes are copied + to dictionary. dictionary must have enough space, where 32768 bytes is + always enough. If deflateGetDictionary() is called with dictionary equal to + Z_NULL, then only the dictionary length is returned, and nothing is copied. + Similarly, if dictLength is Z_NULL, then it is not set. + + deflateGetDictionary() may return a length less than the window size, even + when more than the window size in input has been provided. It may return up + to 258 bytes less in that case, due to how zlib's implementation of deflate + manages the sliding window and lookahead for matches, where matches can be + up to 258 bytes long. If the application needs the last window-size bytes of + input, then that would need to be saved by the application outside of zlib. + + deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the + stream state is inconsistent. +*/ + +ZEXTERN int ZEXPORT deflateCopy(z_streamp dest, + z_streamp source); +/* + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when several compression strategies will be + tried, for example when there are several ways of pre-processing the input + data with a filter. The streams that will be discarded should then be freed + by calling deflateEnd. Note that deflateCopy duplicates the internal + compression state which can be quite large, so this strategy is slow and can + consume lots of memory. + + deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being Z_NULL). msg is left unchanged in both source and + destination. +*/ + +ZEXTERN int ZEXPORT deflateReset(z_streamp strm); +/* + This function is equivalent to deflateEnd followed by deflateInit, but + does not free and reallocate the internal compression state. The stream + will leave the compression level and any other attributes that may have been + set unchanged. total_in, total_out, adler, and msg are initialized. + + deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). +*/ + +ZEXTERN int ZEXPORT deflateParams(z_streamp strm, + int level, + int strategy); +/* + Dynamically update the compression level and compression strategy. The + interpretation of level and strategy is as in deflateInit2(). This can be + used to switch between compression and straight copy of the input data, or + to switch to a different kind of input data requiring a different strategy. + If the compression approach (which is a function of the level) or the + strategy is changed, and if there have been any deflate() calls since the + state was initialized or reset, then the input available so far is + compressed with the old level and strategy using deflate(strm, Z_BLOCK). + There are three approaches for the compression levels 0, 1..3, and 4..9 + respectively. The new level and strategy will take effect at the next call + of deflate(). + + If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does + not have enough output space to complete, then the parameter change will not + take effect. In this case, deflateParams() can be called again with the + same parameters and more output space to try again. + + In order to assure a change in the parameters on the first try, the + deflate stream should be flushed using deflate() with Z_BLOCK or other flush + request until strm.avail_out is not zero, before calling deflateParams(). + Then no more input data should be provided before the deflateParams() call. + If this is done, the old level and strategy will be applied to the data + compressed before deflateParams(), and the new level and strategy will be + applied to the data compressed after deflateParams(). + + deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream + state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if + there was not enough output space to complete the compression of the + available input data before a change in the strategy or approach. Note that + in the case of a Z_BUF_ERROR, the parameters are not changed. A return + value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be + retried with more output space. +*/ + +ZEXTERN int ZEXPORT deflateTune(z_streamp strm, + int good_length, + int max_lazy, + int nice_length, + int max_chain); +/* + Fine tune deflate's internal compression parameters. This should only be + used by someone who understands the algorithm used by zlib's deflate for + searching for the best matching string, and even then only by the most + fanatic optimizer trying to squeeze out the last compressed bit for their + specific input data. Read the deflate.c source code for the meaning of the + max_lazy, good_length, nice_length, and max_chain parameters. + + deflateTune() can be called after deflateInit() or deflateInit2(), and + returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. + */ + +ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm, + uLong sourceLen); +/* + deflateBound() returns an upper bound on the compressed size after + deflation of sourceLen bytes. It must be called after deflateInit() or + deflateInit2(), and after deflateSetHeader(), if used. This would be used + to allocate an output buffer for deflation in a single pass, and so would be + called before deflate(). If that first deflate() call is provided the + sourceLen input bytes, an output buffer allocated to the size returned by + deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed + to return Z_STREAM_END. Note that it is possible for the compressed size to + be larger than the value returned by deflateBound() if flush options other + than Z_FINISH or Z_NO_FLUSH are used. +*/ + +ZEXTERN int ZEXPORT deflatePending(z_streamp strm, + unsigned *pending, + int *bits); +/* + deflatePending() returns the number of bytes and bits of output that have + been generated, but not yet provided in the available output. The bytes not + provided would be due to the available output space having being consumed. + The number of bits of output not provided are between 0 and 7, where they + await more bits to join them in order to fill out a full byte. If pending + or bits are Z_NULL, then those values are not set. + + deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. + */ + +ZEXTERN int ZEXPORT deflatePrime(z_streamp strm, + int bits, + int value); +/* + deflatePrime() inserts bits in the deflate output stream. The intent + is that this function is used to start off the deflate output with the bits + leftover from a previous deflate stream when appending to it. As such, this + function can only be used for raw deflate, and must be used before the first + deflate() call after a deflateInit2() or deflateReset(). bits must be less + than or equal to 16, and that many of the least significant bits of value + will be inserted in the output. + + deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough + room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the + source stream state was inconsistent. +*/ + +ZEXTERN int ZEXPORT deflateSetHeader(z_streamp strm, + gz_headerp head); +/* + deflateSetHeader() provides gzip header information for when a gzip + stream is requested by deflateInit2(). deflateSetHeader() may be called + after deflateInit2() or deflateReset() and before the first call of + deflate(). The text, time, os, extra field, name, and comment information + in the provided gz_header structure are written to the gzip header (xflag is + ignored -- the extra flags are set according to the compression level). The + caller must assure that, if not Z_NULL, name and comment are terminated with + a zero byte, and that if extra is not Z_NULL, that extra_len bytes are + available there. If hcrc is true, a gzip header crc is included. Note that + the current versions of the command-line version of gzip (up through version + 1.3.x) do not support header crc's, and will report that it is a "multi-part + gzip file" and give up. + + If deflateSetHeader is not used, the default gzip header has text false, + the time set to zero, and os set to the current operating system, with no + extra, name, or comment fields. The gzip header is returned to the default + state by deflateReset(). + + deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +/* +ZEXTERN int ZEXPORT inflateInit2(z_streamp strm, + int windowBits); + + This is another version of inflateInit with an extra parameter. The + fields next_in, avail_in, zalloc, zfree and opaque must be initialized + before by the caller. + + The windowBits parameter is the base two logarithm of the maximum window + size (the size of the history buffer). It should be in the range 8..15 for + this version of the library. The default value is 15 if inflateInit is used + instead. windowBits must be greater than or equal to the windowBits value + provided to deflateInit2() while compressing, or it must be equal to 15 if + deflateInit2() was not used. If a compressed stream with a larger window + size is given as input, inflate() will return with the error code + Z_DATA_ERROR instead of trying to allocate a larger window. + + windowBits can also be zero to request that inflate use the window size in + the zlib header of the compressed stream. + + windowBits can also be -8..-15 for raw inflate. In this case, -windowBits + determines the window size. inflate() will then process raw deflate data, + not looking for a zlib or gzip header, not generating a check value, and not + looking for any check values for comparison at the end of the stream. This + is for use with other formats that use the deflate compressed data format + such as zip. Those formats provide their own check values. If a custom + format is developed using the raw deflate format for compressed data, it is + recommended that a check value such as an Adler-32 or a CRC-32 be applied to + the uncompressed data as is done in the zlib, gzip, and zip formats. For + most applications, the zlib format should be used as is. Note that comments + above on the use in deflateInit2() applies to the magnitude of windowBits. + + windowBits can also be greater than 15 for optional gzip decoding. Add + 32 to windowBits to enable zlib and gzip decoding with automatic header + detection, or add 16 to decode only the gzip format (the zlib format will + return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a + CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see + below), inflate() will *not* automatically decode concatenated gzip members. + inflate() will return Z_STREAM_END at the end of the gzip member. The state + would need to be reset to continue decoding a subsequent gzip member. This + *must* be done if there is more data after a gzip member, in order for the + decompression to be compliant with the gzip standard (RFC 1952). + + inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit2 does not perform any decompression + apart from possibly reading the zlib header if present: actual decompression + will be done by inflate(). (So next_in and avail_in may be modified, but + next_out and avail_out are unused and unchanged.) The current implementation + of inflateInit2() does not process any header information -- that is + deferred until inflate() is called. +*/ + +ZEXTERN int ZEXPORT inflateSetDictionary(z_streamp strm, + const Bytef *dictionary, + uInt dictLength); +/* + Initializes the decompression dictionary from the given uncompressed byte + sequence. This function must be called immediately after a call of inflate, + if that call returned Z_NEED_DICT. The dictionary chosen by the compressor + can be determined from the Adler-32 value returned by that call of inflate. + The compressor and decompressor must use exactly the same dictionary (see + deflateSetDictionary). For raw inflate, this function can be called at any + time to set the dictionary. If the provided dictionary is smaller than the + window and there is already data in the window, then the provided dictionary + will amend what's there. The application must insure that the dictionary + that was used for compression is provided. + + inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is + inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the + expected one (incorrect Adler-32 value). inflateSetDictionary does not + perform any decompression: this will be done by subsequent calls of + inflate(). +*/ + +ZEXTERN int ZEXPORT inflateGetDictionary(z_streamp strm, + Bytef *dictionary, + uInt *dictLength); +/* + Returns the sliding dictionary being maintained by inflate. dictLength is + set to the number of bytes in the dictionary, and that many bytes are copied + to dictionary. dictionary must have enough space, where 32768 bytes is + always enough. If inflateGetDictionary() is called with dictionary equal to + Z_NULL, then only the dictionary length is returned, and nothing is copied. + Similarly, if dictLength is Z_NULL, then it is not set. + + inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the + stream state is inconsistent. +*/ + +ZEXTERN int ZEXPORT inflateSync(z_streamp strm); +/* + Skips invalid compressed data until a possible full flush point (see above + for the description of deflate with Z_FULL_FLUSH) can be found, or until all + available input is skipped. No output is provided. + + inflateSync searches for a 00 00 FF FF pattern in the compressed data. + All full flush points have this pattern, but not all occurrences of this + pattern are full flush points. + + inflateSync returns Z_OK if a possible full flush point has been found, + Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point + has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. + In the success case, the application may save the current value of total_in + which indicates where valid compressed data was found. In the error case, + the application may repeatedly call inflateSync, providing more input each + time, until success or end of the input data. +*/ + +ZEXTERN int ZEXPORT inflateCopy(z_streamp dest, + z_streamp source); +/* + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when randomly accessing a large stream. The + first pass through the stream can periodically record the inflate state, + allowing restarting inflate at those points when randomly accessing the + stream. + + inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being Z_NULL). msg is left unchanged in both source and + destination. +*/ + +ZEXTERN int ZEXPORT inflateReset(z_streamp strm); +/* + This function is equivalent to inflateEnd followed by inflateInit, + but does not free and reallocate the internal decompression state. The + stream will keep attributes that may have been set by inflateInit2. + total_in, total_out, adler, and msg are initialized. + + inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). +*/ + +ZEXTERN int ZEXPORT inflateReset2(z_streamp strm, + int windowBits); +/* + This function is the same as inflateReset, but it also permits changing + the wrap and window size requests. The windowBits parameter is interpreted + the same as it is for inflateInit2. If the window size is changed, then the + memory allocated for the window is freed, and the window will be reallocated + by inflate() if needed. + + inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL), or if + the windowBits parameter is invalid. +*/ + +ZEXTERN int ZEXPORT inflatePrime(z_streamp strm, + int bits, + int value); +/* + This function inserts bits in the inflate input stream. The intent is + that this function is used to start inflating at a bit position in the + middle of a byte. The provided bits will be used before any bytes are used + from next_in. This function should only be used with raw inflate, and + should be used before the first inflate() call after inflateInit2() or + inflateReset(). bits must be less than or equal to 16, and that many of the + least significant bits of value will be inserted in the input. + + If bits is negative, then the input stream bit buffer is emptied. Then + inflatePrime() can be called again to put bits in the buffer. This is used + to clear out bits leftover after feeding inflate a block description prior + to feeding inflate codes. + + inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +ZEXTERN long ZEXPORT inflateMark(z_streamp strm); +/* + This function returns two values, one in the lower 16 bits of the return + value, and the other in the remaining upper bits, obtained by shifting the + return value down 16 bits. If the upper value is -1 and the lower value is + zero, then inflate() is currently decoding information outside of a block. + If the upper value is -1 and the lower value is non-zero, then inflate is in + the middle of a stored block, with the lower value equaling the number of + bytes from the input remaining to copy. If the upper value is not -1, then + it is the number of bits back from the current bit position in the input of + the code (literal or length/distance pair) currently being processed. In + that case the lower value is the number of bytes already emitted for that + code. + + A code is being processed if inflate is waiting for more input to complete + decoding of the code, or if it has completed decoding but is waiting for + more output space to write the literal or match data. + + inflateMark() is used to mark locations in the input data for random + access, which may be at bit positions, and to note those cases where the + output of a code may span boundaries of random access blocks. The current + location in the input stream can be determined from avail_in and data_type + as noted in the description for the Z_BLOCK flush parameter for inflate. + + inflateMark returns the value noted above, or -65536 if the provided + source stream state was inconsistent. +*/ + +ZEXTERN int ZEXPORT inflateGetHeader(z_streamp strm, + gz_headerp head); +/* + inflateGetHeader() requests that gzip header information be stored in the + provided gz_header structure. inflateGetHeader() may be called after + inflateInit2() or inflateReset(), and before the first call of inflate(). + As inflate() processes the gzip stream, head->done is zero until the header + is completed, at which time head->done is set to one. If a zlib stream is + being decoded, then head->done is set to -1 to indicate that there will be + no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be + used to force inflate() to return immediately after header processing is + complete and before any actual data is decompressed. + + The text, time, xflags, and os fields are filled in with the gzip header + contents. hcrc is set to true if there is a header CRC. (The header CRC + was valid if done is set to one.) If extra is not Z_NULL, then extra_max + contains the maximum number of bytes to write to extra. Once done is true, + extra_len contains the actual extra field length, and extra contains the + extra field, or that field truncated if extra_max is less than extra_len. + If name is not Z_NULL, then up to name_max characters are written there, + terminated with a zero unless the length is greater than name_max. If + comment is not Z_NULL, then up to comm_max characters are written there, + terminated with a zero unless the length is greater than comm_max. When any + of extra, name, or comment are not Z_NULL and the respective field is not + present in the header, then that field is set to Z_NULL to signal its + absence. This allows the use of deflateSetHeader() with the returned + structure to duplicate the header. However if those fields are set to + allocated memory, then the application will need to save those pointers + elsewhere so that they can be eventually freed. + + If inflateGetHeader is not used, then the header information is simply + discarded. The header is always checked for validity, including the header + CRC if present. inflateReset() will reset the process to discard the header + information. The application would need to call inflateGetHeader() again to + retrieve the header from the next gzip stream. + + inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +/* +ZEXTERN int ZEXPORT inflateBackInit(z_streamp strm, int windowBits, + unsigned char FAR *window); + + Initialize the internal stream state for decompression using inflateBack() + calls. The fields zalloc, zfree and opaque in strm must be initialized + before the call. If zalloc and zfree are Z_NULL, then the default library- + derived memory allocation routines are used. windowBits is the base two + logarithm of the window size, in the range 8..15. window is a caller + supplied buffer of that size. Except for special applications where it is + assured that deflate was used with small window sizes, windowBits must be 15 + and a 32K byte window must be supplied to be able to decompress general + deflate streams. + + See inflateBack() for the usage of these routines. + + inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of + the parameters are invalid, Z_MEM_ERROR if the internal state could not be + allocated, or Z_VERSION_ERROR if the version of the library does not match + the version of the header file. +*/ + +typedef unsigned (*in_func)(void FAR *, + z_const unsigned char FAR * FAR *); +typedef int (*out_func)(void FAR *, unsigned char FAR *, unsigned); + +ZEXTERN int ZEXPORT inflateBack(z_streamp strm, + in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc); +/* + inflateBack() does a raw inflate with a single call using a call-back + interface for input and output. This is potentially more efficient than + inflate() for file i/o applications, in that it avoids copying between the + output and the sliding window by simply making the window itself the output + buffer. inflate() can be faster on modern CPUs when used with large + buffers. inflateBack() trusts the application to not change the output + buffer passed by the output function, at least until inflateBack() returns. + + inflateBackInit() must be called first to allocate the internal state + and to initialize the state with the user-provided window buffer. + inflateBack() may then be used multiple times to inflate a complete, raw + deflate stream with each call. inflateBackEnd() is then called to free the + allocated state. + + A raw deflate stream is one with no zlib or gzip header or trailer. + This routine would normally be used in a utility that reads zip or gzip + files and writes out uncompressed files. The utility would decode the + header and process the trailer on its own, hence this routine expects only + the raw deflate stream to decompress. This is different from the default + behavior of inflate(), which expects a zlib header and trailer around the + deflate stream. + + inflateBack() uses two subroutines supplied by the caller that are then + called by inflateBack() for input and output. inflateBack() calls those + routines until it reads a complete deflate stream and writes out all of the + uncompressed data, or until it encounters an error. The function's + parameters and return types are defined above in the in_func and out_func + typedefs. inflateBack() will call in(in_desc, &buf) which should return the + number of bytes of provided input, and a pointer to that input in buf. If + there is no input available, in() must return zero -- buf is ignored in that + case -- and inflateBack() will return a buffer error. inflateBack() will + call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. + out() should return zero on success, or non-zero on failure. If out() + returns non-zero, inflateBack() will return with an error. Neither in() nor + out() are permitted to change the contents of the window provided to + inflateBackInit(), which is also the buffer that out() uses to write from. + The length written by out() will be at most the window size. Any non-zero + amount of input may be provided by in(). + + For convenience, inflateBack() can be provided input on the first call by + setting strm->next_in and strm->avail_in. If that input is exhausted, then + in() will be called. Therefore strm->next_in must be initialized before + calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called + immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in + must also be initialized, and then if strm->avail_in is not zero, input will + initially be taken from strm->next_in[0 .. strm->avail_in - 1]. + + The in_desc and out_desc parameters of inflateBack() is passed as the + first parameter of in() and out() respectively when they are called. These + descriptors can be optionally used to pass any information that the caller- + supplied in() and out() functions need to do their job. + + On return, inflateBack() will set strm->next_in and strm->avail_in to + pass back any unused input that was provided by the last in() call. The + return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR + if in() or out() returned an error, Z_DATA_ERROR if there was a format error + in the deflate stream (in which case strm->msg is set to indicate the nature + of the error), or Z_STREAM_ERROR if the stream was not properly initialized. + In the case of Z_BUF_ERROR, an input or output error can be distinguished + using strm->next_in which will be Z_NULL only if in() returned an error. If + strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning + non-zero. (in() will always be called before out(), so strm->next_in is + assured to be defined if out() returns non-zero.) Note that inflateBack() + cannot return Z_OK. +*/ + +ZEXTERN int ZEXPORT inflateBackEnd(z_streamp strm); +/* + All memory allocated by inflateBackInit() is freed. + + inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream + state was inconsistent. +*/ + +ZEXTERN uLong ZEXPORT zlibCompileFlags(void); +/* Return flags indicating compile-time options. + + Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: + 1.0: size of uInt + 3.2: size of uLong + 5.4: size of voidpf (pointer) + 7.6: size of z_off_t + + Compiler, assembler, and debug options: + 8: ZLIB_DEBUG + 9: ASMV or ASMINF -- use ASM code + 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention + 11: 0 (reserved) + + One-time table building (smaller code, but not thread-safe if true): + 12: BUILDFIXED -- build static block decoding tables when needed + 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed + 14,15: 0 (reserved) + + Library content (indicates missing functionality): + 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking + deflate code when not needed) + 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect + and decode gzip streams (to avoid linking crc code) + 18-19: 0 (reserved) + + Operation variations (changes in library functionality): + 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate + 21: FASTEST -- deflate algorithm with only one, lowest compression level + 22,23: 0 (reserved) + + The sprintf variant used by gzprintf (zero is best): + 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format + 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! + 26: 0 = returns value, 1 = void -- 1 means inferred string length returned + + Remainder: + 27-31: 0 (reserved) + */ + +#ifndef Z_SOLO + + /* utility functions */ + +/* + The following utility functions are implemented on top of the basic + stream-oriented functions. To simplify the interface, some default options + are assumed (compression level and memory usage, standard memory allocation + functions). The source code of these utility functions can be modified if + you need special options. +*/ + +ZEXTERN int ZEXPORT compress(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen); +/* + Compresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed data. compress() is equivalent to compress2() with a level + parameter of Z_DEFAULT_COMPRESSION. + + compress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer. +*/ + +ZEXTERN int ZEXPORT compress2(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen, + int level); +/* + Compresses the source buffer into the destination buffer. The level + parameter has the same meaning as in deflateInit. sourceLen is the byte + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed data. + + compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, + Z_STREAM_ERROR if the level parameter is invalid. +*/ + +ZEXTERN uLong ZEXPORT compressBound(uLong sourceLen); +/* + compressBound() returns an upper bound on the compressed size after + compress() or compress2() on sourceLen bytes. It would be used before a + compress() or compress2() call to allocate the destination buffer. +*/ + +ZEXTERN int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen); +/* + Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be large enough to hold the entire + uncompressed data. (The size of the uncompressed data must have been saved + previously by the compressor and transmitted to the decompressor by some + mechanism outside the scope of this compression library.) Upon exit, destLen + is the actual size of the uncompressed data. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In + the case where there is not enough room, uncompress() will fill the output + buffer with the uncompressed data up to that point. +*/ + +ZEXTERN int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong *sourceLen); +/* + Same as uncompress, except that sourceLen is a pointer, where the + length of the source is *sourceLen. On return, *sourceLen is the number of + source bytes consumed. +*/ + + /* gzip file access functions */ + +/* + This library supports reading and writing files in gzip (.gz) format with + an interface similar to that of stdio, using the functions that start with + "gz". The gzip format is different from the zlib format. gzip is a gzip + wrapper, documented in RFC 1952, wrapped around a deflate stream. +*/ + +typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ + +/* +ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode); + + Open the gzip (.gz) file at path for reading and decompressing, or + compressing and writing. The mode parameter is as in fopen ("rb" or "wb") + but can also include a compression level ("wb9") or a strategy: 'f' for + filtered data as in "wb6f", 'h' for Huffman-only compression as in "wb1h", + 'R' for run-length encoding as in "wb1R", or 'F' for fixed code compression + as in "wb9F". (See the description of deflateInit2 for more information + about the strategy parameter.) 'T' will request transparent writing or + appending with no compression and not using the gzip format. + + "a" can be used instead of "w" to request that the gzip stream that will + be written be appended to the file. "+" will result in an error, since + reading and writing to the same gzip file is not supported. The addition of + "x" when writing will create the file exclusively, which fails if the file + already exists. On systems that support it, the addition of "e" when + reading or writing will set the flag to close the file on an execve() call. + + These functions, as well as gzip, will read and decode a sequence of gzip + streams in a file. The append function of gzopen() can be used to create + such a file. (Also see gzflush() for another way to do this.) When + appending, gzopen does not test whether the file begins with a gzip stream, + nor does it look for the end of the gzip streams to begin appending. gzopen + will simply append a gzip stream to the existing file. + + gzopen can be used to read a file which is not in gzip format; in this + case gzread will directly read from the file without decompression. When + reading, this will be detected automatically by looking for the magic two- + byte gzip header. + + gzopen returns NULL if the file could not be opened, if there was + insufficient memory to allocate the gzFile state, or if an invalid mode was + specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). + errno can be checked to determine if the reason gzopen failed was that the + file could not be opened. +*/ + +ZEXTERN gzFile ZEXPORT gzdopen(int fd, const char *mode); +/* + Associate a gzFile with the file descriptor fd. File descriptors are + obtained from calls like open, dup, creat, pipe or fileno (if the file has + been previously opened with fopen). The mode parameter is as in gzopen. + + The next call of gzclose on the returned gzFile will also close the file + descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor + fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, + mode);. The duplicated descriptor should be saved to avoid a leak, since + gzdopen does not close fd if it fails. If you are using fileno() to get the + file descriptor from a FILE *, then you will have to use dup() to avoid + double-close()ing the file descriptor. Both gzclose() and fclose() will + close the associated file descriptor, so they need to have different file + descriptors. + + gzdopen returns NULL if there was insufficient memory to allocate the + gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not + provided, or '+' was provided), or if fd is -1. The file descriptor is not + used until the next gz* read, write, seek, or close operation, so gzdopen + will not detect if fd is invalid (unless fd is -1). +*/ + +ZEXTERN int ZEXPORT gzbuffer(gzFile file, unsigned size); +/* + Set the internal buffer size used by this library's functions for file to + size. The default buffer size is 8192 bytes. This function must be called + after gzopen() or gzdopen(), and before any other calls that read or write + the file. The buffer memory allocation is always deferred to the first read + or write. Three times that size in buffer space is allocated. A larger + buffer size of, for example, 64K or 128K bytes will noticeably increase the + speed of decompression (reading). + + The new buffer size also affects the maximum length for gzprintf(). + + gzbuffer() returns 0 on success, or -1 on failure, such as being called + too late. +*/ + +ZEXTERN int ZEXPORT gzsetparams(gzFile file, int level, int strategy); +/* + Dynamically update the compression level and strategy for file. See the + description of deflateInit2 for the meaning of these parameters. Previously + provided data is flushed before applying the parameter changes. + + gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not + opened for writing, Z_ERRNO if there is an error writing the flushed data, + or Z_MEM_ERROR if there is a memory allocation error. +*/ + +ZEXTERN int ZEXPORT gzread(gzFile file, voidp buf, unsigned len); +/* + Read and decompress up to len uncompressed bytes from file into buf. If + the input file is not in gzip format, gzread copies the given number of + bytes into the buffer directly from the file. + + After reaching the end of a gzip stream in the input, gzread will continue + to read, looking for another gzip stream. Any number of gzip streams may be + concatenated in the input file, and will all be decompressed by gzread(). + If something other than a gzip stream is encountered after a gzip stream, + that remaining trailing garbage is ignored (and no error is returned). + + gzread can be used to read a gzip file that is being concurrently written. + Upon reaching the end of the input, gzread will return with the available + data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then + gzclearerr can be used to clear the end of file indicator in order to permit + gzread to be tried again. Z_OK indicates that a gzip stream was completed + on the last gzread. Z_BUF_ERROR indicates that the input file ended in the + middle of a gzip stream. Note that gzread does not return -1 in the event + of an incomplete gzip stream. This error is deferred until gzclose(), which + will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip + stream. Alternatively, gzerror can be used before gzclose to detect this + case. + + gzread returns the number of uncompressed bytes actually read, less than + len for end of file, or -1 for error. If len is too large to fit in an int, + then nothing is read, -1 is returned, and the error state is set to + Z_STREAM_ERROR. +*/ + +ZEXTERN z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems, + gzFile file); +/* + Read and decompress up to nitems items of size size from file into buf, + otherwise operating as gzread() does. This duplicates the interface of + stdio's fread(), with size_t request and return types. If the library + defines size_t, then z_size_t is identical to size_t. If not, then z_size_t + is an unsigned integer type that can contain a pointer. + + gzfread() returns the number of full items read of size size, or zero if + the end of the file was reached and a full item could not be read, or if + there was an error. gzerror() must be consulted if zero is returned in + order to determine if there was an error. If the multiplication of size and + nitems overflows, i.e. the product does not fit in a z_size_t, then nothing + is read, zero is returned, and the error state is set to Z_STREAM_ERROR. + + In the event that the end of file is reached and only a partial item is + available at the end, i.e. the remaining uncompressed data length is not a + multiple of size, then the final partial item is nevertheless read into buf + and the end-of-file flag is set. The length of the partial item read is not + provided, but could be inferred from the result of gztell(). This behavior + is the same as the behavior of fread() implementations in common libraries, + but it prevents the direct use of gzfread() to read a concurrently written + file, resetting and retrying on end-of-file, when size is not 1. +*/ + +ZEXTERN int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len); +/* + Compress and write the len uncompressed bytes at buf to file. gzwrite + returns the number of uncompressed bytes written or 0 in case of error. +*/ + +ZEXTERN z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size, + z_size_t nitems, gzFile file); +/* + Compress and write nitems items of size size from buf to file, duplicating + the interface of stdio's fwrite(), with size_t request and return types. If + the library defines size_t, then z_size_t is identical to size_t. If not, + then z_size_t is an unsigned integer type that can contain a pointer. + + gzfwrite() returns the number of full items written of size size, or zero + if there was an error. If the multiplication of size and nitems overflows, + i.e. the product does not fit in a z_size_t, then nothing is written, zero + is returned, and the error state is set to Z_STREAM_ERROR. +*/ + +ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...); +/* + Convert, format, compress, and write the arguments (...) to file under + control of the string format, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written, or a negative zlib error code in case + of error. The number of uncompressed bytes written is limited to 8191, or + one less than the buffer size given to gzbuffer(). The caller should assure + that this limit is not exceeded. If it is exceeded, then gzprintf() will + return an error (0) with nothing written. In this case, there may also be a + buffer overflow with unpredictable consequences, which is possible only if + zlib was compiled with the insecure functions sprintf() or vsprintf(), + because the secure snprintf() or vsnprintf() functions were not available. + This can be determined using zlibCompileFlags(). +*/ + +ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s); +/* + Compress and write the given null-terminated string s to file, excluding + the terminating null character. + + gzputs returns the number of characters written, or -1 in case of error. +*/ + +ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len); +/* + Read and decompress bytes from file into buf, until len-1 characters are + read, or until a newline character is read and transferred to buf, or an + end-of-file condition is encountered. If any characters are read or if len + is one, the string is terminated with a null character. If no characters + are read due to an end-of-file or len is less than one, then the buffer is + left untouched. + + gzgets returns buf which is a null-terminated string, or it returns NULL + for end-of-file or in case of error. If there was an error, the contents at + buf are indeterminate. +*/ + +ZEXTERN int ZEXPORT gzputc(gzFile file, int c); +/* + Compress and write c, converted to an unsigned char, into file. gzputc + returns the value that was written, or -1 in case of error. +*/ + +ZEXTERN int ZEXPORT gzgetc(gzFile file); +/* + Read and decompress one byte from file. gzgetc returns this byte or -1 + in case of end of file or error. This is implemented as a macro for speed. + As such, it does not do all of the checking the other functions do. I.e. + it does not check to see if file is NULL, nor whether the structure file + points to has been clobbered or not. +*/ + +ZEXTERN int ZEXPORT gzungetc(int c, gzFile file); +/* + Push c back onto the stream for file to be read as the first character on + the next read. At least one character of push-back is always allowed. + gzungetc() returns the character pushed, or -1 on failure. gzungetc() will + fail if c is -1, and may fail if a character has been pushed but not read + yet. If gzungetc is used immediately after gzopen or gzdopen, at least the + output buffer size of pushed characters is allowed. (See gzbuffer above.) + The pushed character will be discarded if the stream is repositioned with + gzseek() or gzrewind(). +*/ + +ZEXTERN int ZEXPORT gzflush(gzFile file, int flush); +/* + Flush all pending output to file. The parameter flush is as in the + deflate() function. The return value is the zlib error number (see function + gzerror below). gzflush is only permitted when writing. + + If the flush parameter is Z_FINISH, the remaining data is written and the + gzip stream is completed in the output. If gzwrite() is called again, a new + gzip stream will be started in the output. gzread() is able to read such + concatenated gzip streams. + + gzflush should be called only when strictly necessary because it will + degrade compression if called too often. +*/ + +/* +ZEXTERN z_off_t ZEXPORT gzseek(gzFile file, + z_off_t offset, int whence); + + Set the starting position to offset relative to whence for the next gzread + or gzwrite on file. The offset represents a number of bytes in the + uncompressed data stream. The whence parameter is defined as in lseek(2); + the value SEEK_END is not supported. + + If the file is opened for reading, this function is emulated but can be + extremely slow. If the file is opened for writing, only forward seeks are + supported; gzseek then compresses a sequence of zeroes up to the new + starting position. + + gzseek returns the resulting offset location as measured in bytes from + the beginning of the uncompressed stream, or -1 in case of error, in + particular if the file is opened for writing and the new starting position + would be before the current position. +*/ + +ZEXTERN int ZEXPORT gzrewind(gzFile file); +/* + Rewind file. This function is supported only for reading. + + gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET). +*/ + +/* +ZEXTERN z_off_t ZEXPORT gztell(gzFile file); + + Return the starting position for the next gzread or gzwrite on file. + This position represents a number of bytes in the uncompressed data stream, + and is zero when starting, even if appending or reading a gzip stream from + the middle of a file using gzdopen(). + + gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) +*/ + +/* +ZEXTERN z_off_t ZEXPORT gzoffset(gzFile file); + + Return the current compressed (actual) read or write offset of file. This + offset includes the count of bytes that precede the gzip stream, for example + when appending or when using gzdopen() for reading. When reading, the + offset does not include as yet unused buffered input. This information can + be used for a progress indicator. On error, gzoffset() returns -1. +*/ + +ZEXTERN int ZEXPORT gzeof(gzFile file); +/* + Return true (1) if the end-of-file indicator for file has been set while + reading, false (0) otherwise. Note that the end-of-file indicator is set + only if the read tried to go past the end of the input, but came up short. + Therefore, just like feof(), gzeof() may return false even if there is no + more data to read, in the event that the last read request was for the exact + number of bytes remaining in the input file. This will happen if the input + file size is an exact multiple of the buffer size. + + If gzeof() returns true, then the read functions will return no more data, + unless the end-of-file indicator is reset by gzclearerr() and the input file + has grown since the previous end of file was detected. +*/ + +ZEXTERN int ZEXPORT gzdirect(gzFile file); +/* + Return true (1) if file is being copied directly while reading, or false + (0) if file is a gzip stream being decompressed. + + If the input file is empty, gzdirect() will return true, since the input + does not contain a gzip stream. + + If gzdirect() is used immediately after gzopen() or gzdopen() it will + cause buffers to be allocated to allow reading the file to determine if it + is a gzip file. Therefore if gzbuffer() is used, it should be called before + gzdirect(). + + When writing, gzdirect() returns true (1) if transparent writing was + requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note: + gzdirect() is not needed when writing. Transparent writing must be + explicitly requested, so the application already knows the answer. When + linking statically, using gzdirect() will include all of the zlib code for + gzip file reading and decompression, which may not be desired.) +*/ + +ZEXTERN int ZEXPORT gzclose(gzFile file); +/* + Flush all pending output for file, if necessary, close file and + deallocate the (de)compression state. Note that once file is closed, you + cannot call gzerror with file, since its structures have been deallocated. + gzclose must not be called more than once on the same file, just as free + must not be called more than once on the same allocation. + + gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a + file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the + last read ended in the middle of a gzip stream, or Z_OK on success. +*/ + +ZEXTERN int ZEXPORT gzclose_r(gzFile file); +ZEXTERN int ZEXPORT gzclose_w(gzFile file); +/* + Same as gzclose(), but gzclose_r() is only for use when reading, and + gzclose_w() is only for use when writing or appending. The advantage to + using these instead of gzclose() is that they avoid linking in zlib + compression or decompression code that is not used when only reading or only + writing respectively. If gzclose() is used, then both compression and + decompression code will be included the application when linking to a static + zlib library. +*/ + +ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum); +/* + Return the error message for the last error which occurred on file. + errnum is set to zlib error number. If an error occurred in the file system + and not in the compression library, errnum is set to Z_ERRNO and the + application may consult errno to get the exact error code. + + The application must not modify the returned string. Future calls to + this function may invalidate the previously returned string. If file is + closed, then the string previously returned by gzerror will no longer be + available. + + gzerror() should be used to distinguish errors from end-of-file for those + functions above that do not distinguish those cases in their return values. +*/ + +ZEXTERN void ZEXPORT gzclearerr(gzFile file); +/* + Clear the error and end-of-file flags for file. This is analogous to the + clearerr() function in stdio. This is useful for continuing to read a gzip + file that is being written concurrently. +*/ + +#endif /* !Z_SOLO */ + + /* checksum functions */ + +/* + These functions are not related to compression but are exported + anyway because they might be useful in applications using the compression + library. +*/ + +ZEXTERN uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len); +/* + Update a running Adler-32 checksum with the bytes buf[0..len-1] and + return the updated checksum. An Adler-32 value is in the range of a 32-bit + unsigned integer. If buf is Z_NULL, this function returns the required + initial value for the checksum. + + An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed + much faster. + + Usage example: + + uLong adler = adler32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + adler = adler32(adler, buffer, length); + } + if (adler != original_adler) error(); +*/ + +ZEXTERN uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, + z_size_t len); +/* + Same as adler32(), but with a size_t length. +*/ + +/* +ZEXTERN uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, + z_off_t len2); + + Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 + and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for + each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of + seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note + that the z_off_t type (like off_t) is a signed integer. If len2 is + negative, the result has no meaning or utility. +*/ + +ZEXTERN uLong ZEXPORT crc32(uLong crc, const Bytef *buf, uInt len); +/* + Update a running CRC-32 with the bytes buf[0..len-1] and return the + updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer. + If buf is Z_NULL, this function returns the required initial value for the + crc. Pre- and post-conditioning (one's complement) is performed within this + function so it shouldn't be done by the application. + + Usage example: + + uLong crc = crc32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + crc = crc32(crc, buffer, length); + } + if (crc != original_crc) error(); +*/ + +ZEXTERN uLong ZEXPORT crc32_z(uLong crc, const Bytef *buf, + z_size_t len); +/* + Same as crc32(), but with a size_t length. +*/ + +/* +ZEXTERN uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2); + + Combine two CRC-32 check values into one. For two sequences of bytes, + seq1 and seq2 with lengths len1 and len2, CRC-32 check values were + calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 + check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and + len2. len2 must be non-negative. +*/ + +/* +ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2); + + Return the operator corresponding to length len2, to be used with + crc32_combine_op(). len2 must be non-negative. +*/ + +ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op); +/* + Give the same result as crc32_combine(), using op in place of len2. op is + is generated from len2 by crc32_combine_gen(). This will be faster than + crc32_combine() if the generated op is used more than once. +*/ + + + /* various hacks, don't look :) */ + +/* deflateInit and inflateInit are macros to allow checking the zlib version + * and the compiler's view of z_stream: + */ +ZEXTERN int ZEXPORT deflateInit_(z_streamp strm, int level, + const char *version, int stream_size); +ZEXTERN int ZEXPORT inflateInit_(z_streamp strm, + const char *version, int stream_size); +ZEXTERN int ZEXPORT deflateInit2_(z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size); +ZEXTERN int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, + const char *version, int stream_size); +ZEXTERN int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits, + unsigned char FAR *window, + const char *version, + int stream_size); +#ifdef Z_PREFIX_SET +# define z_deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) +# define z_inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, (int)sizeof(z_stream)) +#else +# define deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) +# define inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) +# define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) +# define inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) +# define inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, (int)sizeof(z_stream)) +#endif + +#ifndef Z_SOLO + +/* gzgetc() macro and its supporting function and exposed data structure. Note + * that the real internal state is much larger than the exposed structure. + * This abbreviated structure exposes just enough for the gzgetc() macro. The + * user should not mess with these exposed elements, since their names or + * behavior could change in the future, perhaps even capriciously. They can + * only be used by the gzgetc() macro. You have been warned. + */ +struct gzFile_s { + unsigned have; + unsigned char *next; + z_off64_t pos; +}; +ZEXTERN int ZEXPORT gzgetc_(gzFile file); /* backward compatibility */ +#ifdef Z_PREFIX_SET +# undef z_gzgetc +# define z_gzgetc(g) \ + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) +#else +# define gzgetc(g) \ + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) +#endif + +/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or + * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if + * both are true, the application gets the *64 functions, and the regular + * functions are changed to 64 bits) -- in case these are set on systems + * without large file support, _LFS64_LARGEFILE must also be true + */ +#ifdef Z_LARGE64 + ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *); + ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int); + ZEXTERN z_off64_t ZEXPORT gztell64(gzFile); + ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile); + ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t); + ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t); +#endif + +#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) +# ifdef Z_PREFIX_SET +# define z_gzopen z_gzopen64 +# define z_gzseek z_gzseek64 +# define z_gztell z_gztell64 +# define z_gzoffset z_gzoffset64 +# define z_adler32_combine z_adler32_combine64 +# define z_crc32_combine z_crc32_combine64 +# define z_crc32_combine_gen z_crc32_combine_gen64 +# else +# define gzopen gzopen64 +# define gzseek gzseek64 +# define gztell gztell64 +# define gzoffset gzoffset64 +# define adler32_combine adler32_combine64 +# define crc32_combine crc32_combine64 +# define crc32_combine_gen crc32_combine_gen64 +# endif +# ifndef Z_LARGE64 + ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *); + ZEXTERN z_off_t ZEXPORT gzseek64(gzFile, z_off_t, int); + ZEXTERN z_off_t ZEXPORT gztell64(gzFile); + ZEXTERN z_off_t ZEXPORT gzoffset64(gzFile); + ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t); +# endif +#else + ZEXTERN gzFile ZEXPORT gzopen(const char *, const char *); + ZEXTERN z_off_t ZEXPORT gzseek(gzFile, z_off_t, int); + ZEXTERN z_off_t ZEXPORT gztell(gzFile); + ZEXTERN z_off_t ZEXPORT gzoffset(gzFile); + ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t); +#endif + +#else /* Z_SOLO */ + + ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t); + +#endif /* !Z_SOLO */ + +/* undocumented functions */ +ZEXTERN const char * ZEXPORT zError(int); +ZEXTERN int ZEXPORT inflateSyncPoint(z_streamp); +ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table(void); +ZEXTERN int ZEXPORT inflateUndermine(z_streamp, int); +ZEXTERN int ZEXPORT inflateValidate(z_streamp, int); +ZEXTERN unsigned long ZEXPORT inflateCodesUsed(z_streamp); +ZEXTERN int ZEXPORT inflateResetKeep(z_streamp); +ZEXTERN int ZEXPORT deflateResetKeep(z_streamp); +#if defined(_WIN32) && !defined(Z_SOLO) +ZEXTERN gzFile ZEXPORT gzopen_w(const wchar_t *path, + const char *mode); +#endif +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +ZEXTERN int ZEXPORTVA gzvprintf(gzFile file, + const char *format, + va_list va); +# endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* ZLIB_H */ diff --git a/vcpkg/installed/x64-osx/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache b/vcpkg/installed/x64-osx/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache new file mode 100644 index 0000000..b77dfba --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache @@ -0,0 +1,7 @@ +# GdkPixbuf Image Loader Modules file +# Automatically generated file, do not edit +# Created by gdk-pixbuf-query-loaders from gdk-pixbuf-2.42.12 +# +# LoaderDir = /Users/runner/work/heif-converter/heif-converter/vcpkg/packages/gdk-pixbuf_x64-osx/lib/gdk-pixbuf-2.0/2.10.0/loaders +# + diff --git a/vcpkg/installed/x64-osx/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-heif.so b/vcpkg/installed/x64-osx/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-heif.so new file mode 100644 index 0000000..3e89db5 Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-heif.so differ diff --git a/vcpkg/installed/x64-osx/lib/gettext/cldr-plurals b/vcpkg/installed/x64-osx/lib/gettext/cldr-plurals new file mode 100644 index 0000000..257dd2b Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/gettext/cldr-plurals differ diff --git a/vcpkg/installed/x64-osx/lib/gettext/hostname b/vcpkg/installed/x64-osx/lib/gettext/hostname new file mode 100644 index 0000000..4c031d2 Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/gettext/hostname differ diff --git a/vcpkg/installed/x64-osx/lib/gettext/project-id b/vcpkg/installed/x64-osx/lib/gettext/project-id new file mode 100644 index 0000000..e20bf11 --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/gettext/project-id @@ -0,0 +1,86 @@ +#!/bin/sh +# Prints a package's identification PACKAGE VERSION or PACKAGE. +# +# Copyright (C) 2001-2003, 2005, 2014 Free Software Foundation, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +want_version="$1" + +# NLS nuisances: Letter ranges are different in the Estonian locale. +LC_ALL=C + +while true; do + if test -f configure; then + package=`(grep '^PACKAGE_NAME=' configure; grep '^ *PACKAGE=' configure) | grep -v '=[ ]*$' | sed -e '1q' | sed -e 's/^[^=]*=//' | sed -e "s/^'//" -e "s/'$//"` + case "$package" in + *[\"\$\`\{\}]*) + # Some packages (gcal) retrieve the package name dynamically. + package= + ;; + esac + if test -n "$package"; then + is_gnu=`LC_ALL=C grep "GNU $package" * 2>/dev/null | grep -v '^libtool:'` + if test -n "$is_gnu"; then + package="GNU $package" + fi + if test -n "$want_version"; then + version=`(grep '^PACKAGE_VERSION=' configure; grep '^ *VERSION=' configure) | grep -v '=[ ]*$' | sed -e '1q' | sed -e 's/^[^=]*=//' | sed -e "s/^'//" -e "s/'$//"` + case "$version" in + *[\"\$\`\{\}]*) + # Some packages (gcal, gcc, clisp) retrieve the version dynamically. + version= + ;; + esac + if test -n "$version"; then + echo "$package $version" + else + echo "$package" + fi + else + echo "$package" + fi + exit 0 + fi + fi + dir=`basename "\`pwd\`"` + case "$dir" in + i18n) + # This directory name, used in GNU make, is not the top level directory. + ;; + *[A-Za-z]*[0-9]*) + package=`echo "$dir" | sed -e 's/^\([^0-9]*\)[0-9].*$/\1/' -e 's/[-_]$//'` + if test -n "$want_version"; then + version=`echo "$dir" | sed -e 's/^[^0-9]*\([0-9].*\)$/\1/'` + echo "$package $version" + else + echo "$package" + fi + exit 0 + ;; + esac + # Go to parent directory + last=`/bin/pwd` + cd .. + curr=`/bin/pwd` + if test "$last" = "$curr"; then + # Oops, didn't find the package name. + if test -n "$want_version"; then + echo "PACKAGE VERSION" + else + echo "PACKAGE" + fi + exit 0 + fi +done diff --git a/vcpkg/installed/x64-osx/lib/gettext/urlget b/vcpkg/installed/x64-osx/lib/gettext/urlget new file mode 100644 index 0000000..ca09122 Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/gettext/urlget differ diff --git a/vcpkg/installed/x64-osx/lib/gettext/user-email b/vcpkg/installed/x64-osx/lib/gettext/user-email new file mode 100644 index 0000000..17f5bd9 --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/gettext/user-email @@ -0,0 +1,435 @@ +#!/bin/sh +# Prints the user's email address, with confirmation from the user. +# +# Copyright (C) 2001-2003, 2005, 2013 Free Software Foundation, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Prerequisites for using ${prefix}/lib and ${datarootdir}/locale. +prefix="`dirname $0`/../.." +exec_prefix="${prefix}" +datarootdir="${prefix}/share/gettext" +datadir="${datarootdir}" +# Set variables libdir, localedir. +libdir="${prefix}/lib" +localedir="${datarootdir}/locale" + +# Support for relocatability. +if test "yes" = yes; then + orig_installdir="$libdir"/gettext # see Makefile.am's install rule + # Determine curr_installdir without caring for symlinked callers. + curr_installdir=`echo "$0" | sed -e 's,/[^/]*$,,'` + curr_installdir=`cd "$curr_installdir" && pwd` + # Compute the original/current installation prefixes by stripping the + # trailing directories off the original/current installation directories. + while true; do + orig_last=`echo "$orig_installdir" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'` + curr_last=`echo "$curr_installdir" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'` + if test -z "$orig_last" || test -z "$curr_last"; then + break + fi + if test "$orig_last" != "$curr_last"; then + break + fi + orig_installdir=`echo "$orig_installdir" | sed -e 's,/[^/]*$,,'` + curr_installdir=`echo "$curr_installdir" | sed -e 's,/[^/]*$,,'` + done + # Now relocate the directory variables that we use. + libdir=`echo "$libdir/" | sed -e "s%^${orig_installdir}/%${curr_installdir}/%" | sed -e 's,/$,,'` + localedir=`echo "$localedir/" | sed -e "s%^${orig_installdir}/%${curr_installdir}/%" | sed -e 's,/$,,'` +fi + +# Internationalization. +. gettext.sh +TEXTDOMAIN=gettext-tools +export TEXTDOMAIN +TEXTDOMAINDIR="$localedir" +export TEXTDOMAINDIR + +# Redirect fileno 3 to interactive I/O. +exec 3>/dev/tty + +# Output a prompt. +if test $# != 0; then + echo "$1" 1>&3 +fi + +# Find the user name on the local machine. +user=`id -u -n 2>/dev/null` +if test -z "$user"; then + user="$USER" + if test -z "$user"; then + user="$LOGNAME" + if test -z "$user"; then + user=unknown + fi + fi +fi + +# Find the hostname. +# hostname on some systems (SVR3.2, old Linux) returns a bogus exit status, +# so uname gets run too, so we keep only the first line of output. +#host=`(hostname || uname -n) 2>/dev/null | sed 1q` +host=`"$libdir"/gettext/hostname --short 2>/dev/null | sed 1q` + +# Find the hostname. +hostfqdn=`"$libdir"/gettext/hostname --fqdn 2>/dev/null | sed 1q` + +# Find a list of email addresses from various mailer configuration files. +# All mailers use configuration files under $HOME. We handle them in a +# last-modified - first-priority order. +cd $HOME +files="" + +# ----------------------- BEGIN MAILER SPECIFIC CODE ----------------------- + +# Mozilla Thunderbird addresses +files="$files .thunderbird/*/prefs.js" + +# Mozilla addresses +files="$files .mozilla/*/prefs.js" + +# Netscape 4 addresses +files="$files .netscape/liprefs.js .netscape/preferences.js" + +# Netscape 3 addresses +files="$files .netscape/preferences" + +# Emacs/XEmacs rmail, Emacs/XEmacs gnus, XEmacs vm addresses +# XEmacs mew addresses +files="$files .emacs .emacs.el" + +# KDE2 addresses +files="$files .kde2/share/config/emaildefaults" + +# KDE kmail addresses +files="$files .kde2/share/config/kmailrc" + +# GNOME evolution 2 addresses +files="$files .gconf/apps/evolution/mail/%gconf.xml" + +# GNOME evolution 1 addresses +files="$files evolution/config.xmldb" + +# GNOME balsa addresses +files="$files .gnome/balsa" + +# StarOffice and OpenOffice addresses +sed_dos2unix='s/\r$//' +sed_soffice51='s,StarOffice 5\.1=\(.*\)$,\1/sofficerc,p' +sed_soffice52='s,StarOffice 5\.2=\(.*\)$,\1/user/sofficerc,p' +sed_ooffice='s,^OpenOffice[^=]*=\(.*\)$,\1/user/config/registry/instance/org/openoffice/UserProfile.xml,p' +files="$files Office51/sofficerc Office52/user/sofficerc "`sed -n -e "$sed_dos2unix" -e "$sed_soffice51" -e "$sed_soffice52" -e "$sed_ooffice" .sversionrc 2>/dev/null | sed -e 's,^file://*,/,'` + +# mutt addresses +files="$files .muttrc" + +# pine addresses +files="$files .pinerc" + +# xfmail addresses +files="$files .xfmail/.xfmailrc" + +# tkrat addresses +files="$files .ratatosk/ratatoskrc" + +# ----------------------- END MAILER SPECIFIC CODE ----------------------- + +# Expand wildcards and remove nonexistent files from the list. +nfiles="" +for file in $files; do + if test -r "$file" && test ! -d "$file"; then + nfiles="$nfiles $file" + fi +done +files="$nfiles" + +addresses="" + +if test -n "$files"; then + + for file in `ls -t $files`; do + + case "$file" in + +# ----------------------- BEGIN MAILER SPECIFIC CODE ----------------------- + + # Mozilla and Mozilla Thunderbird addresses + .mozilla/*/prefs.js | .thunderbird/*/prefs.js) + addresses="$addresses "`grep -h '^user_pref("mail\.identity\..*\.useremail", ".*");$' $file 2>/dev/null | sed -e 's/^user_pref("mail\.identity\..*\.useremail", "\(.*\)");$/\1/'` + ;; + + # Netscape 4 addresses + .netscape/liprefs.js | .netscape/preferences.js) + addresses="$addresses "`grep -h '^user_pref("mail\.identity\.useremail", ".*");$' $file 2>/dev/null | sed -e 's/^user_pref("mail\.identity\.useremail", "\(.*\)");$/\1/'` + ;; + + # Netscape 3 addresses + .netscape/preferences) + addresses="$addresses "`grep -h '^EMAIL_ADDRESS:' $file 2>/dev/null | sed -e 's/^EMAIL_ADDRESS:[ ]*//'` + ;; + + .emacs | .emacs.el) + # Emacs/XEmacs rmail, Emacs/XEmacs gnus, XEmacs vm addresses + addresses="$addresses "`grep -h '[ (]user-mail-address "[^"]*"' $file 2>/dev/null | sed -e 's/^.*[ (]user-mail-address "\([^"]*\)".*$/\1/'` + # XEmacs mew addresses + domains=`grep -h '[ (]mew-mail-domain "[^"]*"' $file 2>/dev/null | sed -e 's/^.*[ (]mew-mail-domain "\([^"]*\)".*$/\1/'` + if test -n "$domains"; then + for domain in $domains; do + addresses="$addresses ${user}@$domain" + done + fi + ;; + + # KDE2 addresses + .kde2/share/config/emaildefaults) + addresses="$addresses "`grep -h '^EmailAddress=' $file 2>/dev/null | sed -e 's/^EmailAddress=//'` + ;; + + # KDE kmail addresses + .kde2/share/config/kmailrc) + addresses="$addresses "`grep -h '^Email Address=' $file 2>/dev/null | sed -e 's/^Email Address=//'` + ;; + + # GNOME evolution 2 addresses + .gconf/apps/evolution/mail/%gconf.xml) + sedexpr0='s,^.*<addr-spec>\(.*\)</addr-spec>.*$,\1,p' + addresses="$addresses "`sed -n -e "$sedexpr0" < $file` + ;; + + # GNOME evolution 1 addresses + evolution/config.xmldb) + sedexpr0='s/^.*\(.*\).*$,\1,p' $file 2>/dev/null` + ;; + + # StarOffice addresses + # Not a typo. They really write "Adress" with a single d. + # German orthography... + */sofficerc) + addresses="$addresses "`grep -h '^User-Adress=' $file 2>/dev/null | sed -e 's/#[^#]*$//' -e 's/^.*#//'` + ;; + + # mutt addresses + .muttrc) + mutt_addresses=`grep -h '^set from="[^"]*"[ ]*$' $file 2>/dev/null | sed -e 's/^set from="\([^"]*\)"[ ]*$/\1/'` + if test -n "$mutt_addresses"; then + addresses="$addresses $mutt_addresses" + else + # mutt uses $EMAIL as fallback. + if test -n "$EMAIL"; then + addresses="$addresses $EMAIL" + fi + fi + ;; + + # pine addresses + .pinerc) + domains=`grep -h '^user-domain=' $file 2>/dev/null | sed -e 's/^user-domain=//'` + if test -n "$domains"; then + for domain in $domains; do + addresses="$addresses ${user}@$domain" + done + else + # The use-only-domain-name option is only used if the user-domain option is not present. + domains=`grep -h '^use-only-domain-name=' $file 2>/dev/null | sed -e 's/^use-only-domain-name=//'` + if test "Yes" = "$domains"; then + addresses="$addresses ${user}@"`echo "$hostfqdn" | sed -e 's/^[^.]*\.//'` + fi + fi + ;; + + # xfmail addresses + .xfmail/.xfmailrc) + addresses="$addresses "`grep -h '^from=.*<.*>' $file 2>/dev/null | sed -e 's/^.*<\([^<>]*\)>.*$/\1/'` + ;; + + # tkrat addresses + .ratatosk/ratatoskrc) + domains=`grep -h '^set option(masquerade_as) ' $file 2>/dev/null | sed -e 's/^set option(masquerade_as) //'` + if test -n "$domains"; then + for domain in $domains; do + addresses="$addresses ${user}@$domain" + done + else + # The domain option is used only if the masquerade_as option is not present. + domains=`grep -h '^set option(domain) ' $file 2>/dev/null | sed -e 's/^set option(domain) //'` + if test -n "$domains"; then + for domain in $domains; do + addresses="$addresses ${user}@${host}.$domain" + done + fi + fi + ;; + +# ----------------------- END MAILER SPECIFIC CODE ----------------------- + + esac + + done + +fi + +# Some Debian systems have a file /etc/mailname. +if test -r /etc/mailname; then + hostmailname=`cat /etc/mailname` + if test -n "$hostmailname"; then + addresses="$addresses ${user}@$hostmailname" + fi +fi + +# SuSE Linux >= 8.0 systems have a file /etc/sysconfig/mail. +if test -r /etc/sysconfig/mail; then + hostmailname=`. /etc/sysconfig/mail && echo "$FROM_HEADER"` + if test -n "$hostmailname"; then + addresses="$addresses ${user}@$hostmailname" + fi +fi + +# elm has no user-defined addresses. +# mailx has no user-defined addresses. +# mh has no user-defined addresses. +# They use the system default. +addresses="$addresses ${user}@$hostfqdn" + +# Normalize addresses: remove addresses without @, lowercase the part after @, +# and remove duplicates. +lowercase_sed='{ +h +s/^[^@]*@\(.*\)$/\1/ +y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ +x +s/^\([^@]*\)@.*/\1@/ +G +s/\n// +p +}' +naddresses="" +for addr in $addresses; do + case "$addr" in + "<"*">") addr=`echo "$addr" | sed -e 's/^$//'` ;; + esac + case "$addr" in + *@*) + addr=`echo "$addr" | sed -n -e "$lowercase_sed"` + case " $naddresses " in + *" $addr "*) ;; + *) naddresses="$naddresses $addr" ;; + esac + ;; + esac +done +addresses="$naddresses" + +# Now it's time to ask the user. +case "$addresses" in + " "*" "*) + # At least two addresses. + lines="" + i=0 + for addr in $addresses; do + i=`expr $i + 1` + lines="${lines}${i} ${addr} +" + done + while true; do + { gettext "Which is your email address?"; echo; } 1>&3 + echo "$lines" 1>&3 + { gettext "Please choose the number, or enter your email address."; echo; } 1>&3 + read answer < /dev/tty + case "$answer" in + *@*) ;; + [0-9]*) + i=0 + for addr in $addresses; do + i=`expr $i + 1` + if test "$i" = "$answer"; then + break 2 + fi + done + ;; + esac + case "$answer" in + "<"*">") answer=`echo "$answer" | sed -e 's/^$//'` ;; + esac + case "$answer" in + *" "*) { gettext "Invalid email address: invalid character."; echo; echo; } 1>&3 ; continue ;; + *@*.*) ;; + *@*) { gettext "Invalid email address: need a fully qualified host name or domain name."; echo; echo; } 1>&3 ; continue ;; + *) { gettext "Invalid email address: missing @"; echo; echo; } 1>&3 ; continue ;; + esac + addr=`echo "$answer" | sed -n -e "$lowercase_sed"` + break + done + ;; + " "*) + # One address. + while true; do + { gettext "Is the following your email address?"; echo; } 1>&3 + echo " $addresses" 1>&3 + { gettext "Please confirm by pressing Return, or enter your email address."; echo; } 1>&3 + read answer < /dev/tty + if test -z "$answer"; then + addr=`echo "$addresses" | sed -e 's/^ //'` + break + fi + case "$answer" in + "<"*">") answer=`echo "$answer" | sed -e 's/^$//'` ;; + esac + case "$answer" in + *" "*) { gettext "Invalid email address: invalid character."; echo; echo; } 1>&3 ; continue ;; + *@*.*) ;; + *@*) { gettext "Invalid email address: need a fully qualified host name or domain name."; echo; echo; } 1>&3 ; continue ;; + *) { gettext "Invalid email address: missing @"; echo; echo; } 1>&3 ; continue ;; + esac + addr=`echo "$answer" | sed -n -e "$lowercase_sed"` + break + done + ;; + "") + # No address. + { gettext "Couldn't find out about your email address."; echo; } 1>&3 + while true; do + { gettext "Please enter your email address."; echo; } 1>&3 + read answer < /dev/tty + case "$answer" in + "<"*">") answer=`echo "$answer" | sed -e 's/^$//'` ;; + esac + case "$answer" in + *" "*) { gettext "Invalid email address: invalid character."; echo; echo; } 1>&3 ; continue ;; + *@*.*) ;; + *@*) { gettext "Invalid email address: need a fully qualified host name or domain name."; echo; echo; } 1>&3 ; continue ;; + *) { gettext "Invalid email address: missing @"; echo; echo; } 1>&3 ; continue ;; + esac + addr=`echo "$answer" | sed -n -e "$lowercase_sed"` + break + done + ;; + *) echo "internal error" 1>&3 ; exit 1 ;; +esac + +# Print to standard output. +echo "$addr" diff --git a/vcpkg/installed/x64-osx/lib/glib-2.0/include/glibconfig.h b/vcpkg/installed/x64-osx/lib/glib-2.0/include/glibconfig.h new file mode 100644 index 0000000..01fb188 --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/glib-2.0/include/glibconfig.h @@ -0,0 +1,220 @@ +/* glibconfig.h + * + * This is a generated file. Please modify 'glibconfig.h.in' + */ + +#ifndef __GLIBCONFIG_H__ +#define __GLIBCONFIG_H__ + +#include + +#include +#include +#define GLIB_HAVE_ALLOCA_H + +#define GLIB_STATIC_COMPILATION 1 +#define GOBJECT_STATIC_COMPILATION 1 +#define GIO_STATIC_COMPILATION 1 +#define GMODULE_STATIC_COMPILATION 1 +#define G_INTL_STATIC_COMPILATION 1 +#define FFI_STATIC_BUILD 1 + +/* Specifies that GLib's g_print*() functions wrap the + * system printf functions. This is useful to know, for example, + * when using glibc's register_printf_function(). + */ +#define GLIB_USING_SYSTEM_PRINTF + +G_BEGIN_DECLS + +#define G_MINFLOAT FLT_MIN +#define G_MAXFLOAT FLT_MAX +#define G_MINDOUBLE DBL_MIN +#define G_MAXDOUBLE DBL_MAX +#define G_MINSHORT SHRT_MIN +#define G_MAXSHORT SHRT_MAX +#define G_MAXUSHORT USHRT_MAX +#define G_MININT INT_MIN +#define G_MAXINT INT_MAX +#define G_MAXUINT UINT_MAX +#define G_MINLONG LONG_MIN +#define G_MAXLONG LONG_MAX +#define G_MAXULONG ULONG_MAX + +typedef signed char gint8; +typedef unsigned char guint8; + +typedef signed short gint16; +typedef unsigned short guint16; + +#define G_GINT16_MODIFIER "h" +#define G_GINT16_FORMAT "hi" +#define G_GUINT16_FORMAT "hu" + + +typedef signed int gint32; +typedef unsigned int guint32; + +#define G_GINT32_MODIFIER "" +#define G_GINT32_FORMAT "i" +#define G_GUINT32_FORMAT "u" + + +#define G_HAVE_GINT64 1 /* deprecated, always true */ + +G_GNUC_EXTENSION typedef signed long long gint64; +G_GNUC_EXTENSION typedef unsigned long long guint64; + +#define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL)) +#define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL)) + +#define G_GINT64_MODIFIER "ll" +#define G_GINT64_FORMAT "lli" +#define G_GUINT64_FORMAT "llu" + + +#define GLIB_SIZEOF_VOID_P 8 +#define GLIB_SIZEOF_LONG 8 +#define GLIB_SIZEOF_SIZE_T 8 +#define GLIB_SIZEOF_SSIZE_T 8 + +typedef signed long gssize; +typedef unsigned long gsize; +#define G_GSIZE_MODIFIER "l" +#define G_GSSIZE_MODIFIER "l" +#define G_GSIZE_FORMAT "lu" +#define G_GSSIZE_FORMAT "li" + +#define G_MAXSIZE G_MAXULONG +#define G_MINSSIZE G_MINLONG +#define G_MAXSSIZE G_MAXLONG + +typedef gint64 goffset; +#define G_MINOFFSET G_MININT64 +#define G_MAXOFFSET G_MAXINT64 + +#define G_GOFFSET_MODIFIER G_GINT64_MODIFIER +#define G_GOFFSET_FORMAT G_GINT64_FORMAT +#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val) + +#define G_POLLFD_FORMAT "%d" + +#define GPOINTER_TO_INT(p) ((gint) (glong) (p)) +#define GPOINTER_TO_UINT(p) ((guint) (gulong) (p)) + +#define GINT_TO_POINTER(i) ((gpointer) (glong) (i)) +#define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u)) + +typedef signed long gintptr; +typedef unsigned long guintptr; + +#define G_GINTPTR_MODIFIER "l" +#define G_GINTPTR_FORMAT "li" +#define G_GUINTPTR_FORMAT "lu" + +#define GLIB_MAJOR_VERSION 2 +#define GLIB_MINOR_VERSION 78 +#define GLIB_MICRO_VERSION 4 + +#define G_OS_UNIX + +#define G_VA_COPY va_copy + +#define G_VA_COPY_AS_ARRAY 1 + +#define G_HAVE_ISO_VARARGS 1 + +/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi + * is passed ISO vararg support is turned off, and there is no work + * around to turn it on, so we unconditionally turn it off. + */ +#if __GNUC__ == 2 && __GNUC_MINOR__ == 95 +# undef G_HAVE_ISO_VARARGS +#endif + +#define G_HAVE_GROWING_STACK 0 + +#ifndef _MSC_VER +# define G_HAVE_GNUC_VARARGS 1 +#endif + +#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) +#define G_GNUC_INTERNAL __attribute__((visibility("hidden"))) +#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) +#define G_GNUC_INTERNAL __hidden +#elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY) +#define G_GNUC_INTERNAL __attribute__((visibility("hidden"))) +#else +#define G_GNUC_INTERNAL +#endif + +#define G_THREADS_ENABLED +#define G_THREADS_IMPL_POSIX + +#define G_ATOMIC_LOCK_FREE + +#define GINT16_TO_LE(val) ((gint16) (val)) +#define GUINT16_TO_LE(val) ((guint16) (val)) +#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val)) +#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val)) + +#define GINT32_TO_LE(val) ((gint32) (val)) +#define GUINT32_TO_LE(val) ((guint32) (val)) +#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val)) +#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val)) + +#define GINT64_TO_LE(val) ((gint64) (val)) +#define GUINT64_TO_LE(val) ((guint64) (val)) +#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val)) +#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val)) + +#define GLONG_TO_LE(val) ((glong) GINT64_TO_LE (val)) +#define GULONG_TO_LE(val) ((gulong) GUINT64_TO_LE (val)) +#define GLONG_TO_BE(val) ((glong) GINT64_TO_BE (val)) +#define GULONG_TO_BE(val) ((gulong) GUINT64_TO_BE (val)) +#define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val)) +#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val)) +#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val)) +#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val)) +#define GSIZE_TO_LE(val) ((gsize) GUINT64_TO_LE (val)) +#define GSSIZE_TO_LE(val) ((gssize) GINT64_TO_LE (val)) +#define GSIZE_TO_BE(val) ((gsize) GUINT64_TO_BE (val)) +#define GSSIZE_TO_BE(val) ((gssize) GINT64_TO_BE (val)) +#define G_BYTE_ORDER G_LITTLE_ENDIAN + +#define GLIB_SYSDEF_POLLIN =1 +#define GLIB_SYSDEF_POLLOUT =4 +#define GLIB_SYSDEF_POLLPRI =2 +#define GLIB_SYSDEF_POLLHUP =16 +#define GLIB_SYSDEF_POLLERR =8 +#define GLIB_SYSDEF_POLLNVAL =32 + +/* No way to disable deprecation warnings for macros, so only emit deprecation + * warnings on platforms where usage of this macro is broken */ +#if defined(__APPLE__) || defined(_MSC_VER) || defined(__CYGWIN__) +#define G_MODULE_SUFFIX "so" GLIB_DEPRECATED_MACRO_IN_2_76 +#else +#define G_MODULE_SUFFIX "so" +#endif + +typedef int GPid; +#define G_PID_FORMAT "i" + +#define GLIB_SYSDEF_AF_UNIX 1 +#define GLIB_SYSDEF_AF_INET 2 +#define GLIB_SYSDEF_AF_INET6 30 + +#define GLIB_SYSDEF_MSG_OOB 1 +#define GLIB_SYSDEF_MSG_PEEK 2 +#define GLIB_SYSDEF_MSG_DONTROUTE 4 + +#define G_DIR_SEPARATOR '/' +#define G_DIR_SEPARATOR_S "/" +#define G_SEARCHPATH_SEPARATOR ':' +#define G_SEARCHPATH_SEPARATOR_S ":" + +#undef G_HAVE_FREE_SIZED + +G_END_DECLS + +#endif /* __GLIBCONFIG_H__ */ diff --git a/vcpkg/installed/x64-osx/lib/libde265.a b/vcpkg/installed/x64-osx/lib/libde265.a new file mode 100644 index 0000000..6c2e0fe Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libde265.a differ diff --git a/vcpkg/installed/x64-osx/lib/libffi.a b/vcpkg/installed/x64-osx/lib/libffi.a new file mode 100644 index 0000000..22fd52b Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libffi.a differ diff --git a/vcpkg/installed/x64-osx/lib/libgdk_pixbuf-2.0.a b/vcpkg/installed/x64-osx/lib/libgdk_pixbuf-2.0.a new file mode 100644 index 0000000..77d36d6 Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libgdk_pixbuf-2.0.a differ diff --git a/vcpkg/installed/x64-osx/lib/libgio-2.0.a b/vcpkg/installed/x64-osx/lib/libgio-2.0.a new file mode 100644 index 0000000..26d9d5e Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libgio-2.0.a differ diff --git a/vcpkg/installed/x64-osx/lib/libglib-2.0.a b/vcpkg/installed/x64-osx/lib/libglib-2.0.a new file mode 100644 index 0000000..568a483 Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libglib-2.0.a differ diff --git a/vcpkg/installed/x64-osx/lib/libgmodule-2.0.a b/vcpkg/installed/x64-osx/lib/libgmodule-2.0.a new file mode 100644 index 0000000..c3a096d Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libgmodule-2.0.a differ diff --git a/vcpkg/installed/x64-osx/lib/libgobject-2.0.a b/vcpkg/installed/x64-osx/lib/libgobject-2.0.a new file mode 100644 index 0000000..2e97ba2 Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libgobject-2.0.a differ diff --git a/vcpkg/installed/x64-osx/lib/libgthread-2.0.a b/vcpkg/installed/x64-osx/lib/libgthread-2.0.a new file mode 100644 index 0000000..ea01c1c Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libgthread-2.0.a differ diff --git a/vcpkg/installed/x64-osx/lib/libheif.a b/vcpkg/installed/x64-osx/lib/libheif.a new file mode 100644 index 0000000..fc30c37 Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libheif.a differ diff --git a/vcpkg/installed/x64-osx/lib/libintl.a b/vcpkg/installed/x64-osx/lib/libintl.a new file mode 100644 index 0000000..ed5b349 Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libintl.a differ diff --git a/vcpkg/installed/x64-osx/lib/libjpeg.a b/vcpkg/installed/x64-osx/lib/libjpeg.a new file mode 100644 index 0000000..4f8e095 Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libjpeg.a differ diff --git a/vcpkg/installed/x64-osx/lib/liblzma.a b/vcpkg/installed/x64-osx/lib/liblzma.a new file mode 100644 index 0000000..fda037e Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/liblzma.a differ diff --git a/vcpkg/installed/x64-osx/lib/libpcre2-16.a b/vcpkg/installed/x64-osx/lib/libpcre2-16.a new file mode 100644 index 0000000..83e8db0 Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libpcre2-16.a differ diff --git a/vcpkg/installed/x64-osx/lib/libpcre2-32.a b/vcpkg/installed/x64-osx/lib/libpcre2-32.a new file mode 100644 index 0000000..d6c2b6c Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libpcre2-32.a differ diff --git a/vcpkg/installed/x64-osx/lib/libpcre2-8.a b/vcpkg/installed/x64-osx/lib/libpcre2-8.a new file mode 100644 index 0000000..235c488 Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libpcre2-8.a differ diff --git a/vcpkg/installed/x64-osx/lib/libpcre2-posix.a b/vcpkg/installed/x64-osx/lib/libpcre2-posix.a new file mode 100644 index 0000000..e7e4e65 Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libpcre2-posix.a differ diff --git a/vcpkg/installed/x64-osx/lib/libpng.a b/vcpkg/installed/x64-osx/lib/libpng.a new file mode 100644 index 0000000..66e2fbc Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libpng.a differ diff --git a/vcpkg/installed/x64-osx/lib/libpng16.a b/vcpkg/installed/x64-osx/lib/libpng16.a new file mode 100644 index 0000000..66e2fbc Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libpng16.a differ diff --git a/vcpkg/installed/x64-osx/lib/libtiff.a b/vcpkg/installed/x64-osx/lib/libtiff.a new file mode 100644 index 0000000..c16091e Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libtiff.a differ diff --git a/vcpkg/installed/x64-osx/lib/libturbojpeg.a b/vcpkg/installed/x64-osx/lib/libturbojpeg.a new file mode 100644 index 0000000..4b3aa2b Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libturbojpeg.a differ diff --git a/vcpkg/installed/x64-osx/lib/libx265.a b/vcpkg/installed/x64-osx/lib/libx265.a new file mode 100644 index 0000000..6b9034e Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libx265.a differ diff --git a/vcpkg/installed/x64-osx/lib/libz.a b/vcpkg/installed/x64-osx/lib/libz.a new file mode 100644 index 0000000..cbab50c Binary files /dev/null and b/vcpkg/installed/x64-osx/lib/libz.a differ diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/gdk-pixbuf-2.0.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/gdk-pixbuf-2.0.pc new file mode 100644 index 0000000..cd1665c --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/gdk-pixbuf-2.0.pc @@ -0,0 +1,20 @@ +prefix=${pcfiledir}/../.. +includedir=${prefix}/include +libdir=${prefix}/lib + +bindir=${prefix}/bin +gdk_pixbuf_binary_version=2.10.0 +gdk_pixbuf_binarydir=${libdir}/gdk-pixbuf-2.0/2.10.0 +gdk_pixbuf_moduledir=${gdk_pixbuf_binarydir}/loaders +gdk_pixbuf_cache_file=${gdk_pixbuf_binarydir}/loaders.cache +gdk_pixbuf_csource=${prefix}/tools/gdk-pixbuf/gdk-pixbuf-csource +gdk_pixbuf_pixdata=${prefix}/tools/gdk-pixbuf/gdk-pixbuf-pixdata +gdk_pixbuf_query_loaders=${prefix}/tools/gdk-pixbuf/gdk-pixbuf-query-loaders + +Name: GdkPixbuf +Description: Image loading and scaling +Version: 2.42.12 + +Libs: "-L${libdir}" -lgdk_pixbuf-2.0 -lm -lintl +Requires: libpng, libjpeg, libtiff-4, glib-2.0 >= 2.56.0, gobject-2.0 >= 2.56.0, gmodule-no-export-2.0 >= 2.56.0, gio-2.0 >= 2.56.0 +Cflags: "-I${includedir}/gdk-pixbuf-2.0" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/gio-2.0.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/gio-2.0.pc new file mode 100644 index 0000000..6c1303f --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/gio-2.0.pc @@ -0,0 +1,25 @@ +prefix=${pcfiledir}/../.. +includedir=${prefix}/include +libdir=${prefix}/lib + +datadir=${prefix}/share +schemasdir=${datadir}/glib-2.0/schemas +dtdsdir=${datadir}/glib-2.0/dtds +bindir=${prefix}/bin +giomoduledir=${libdir}/gio/modules +gio=${prefix}/tools/glib/gio +gio_querymodules=${prefix}/tools/glib/gio-querymodules +glib_compile_schemas=${prefix}/tools/glib/glib-compile-schemas +glib_compile_resources=${prefix}/tools/glib/glib-compile-resources +gdbus=${prefix}/tools/glib/gdbus +gdbus_codegen=${prefix}/tools/glib/gdbus-codegen +gresource=${prefix}/tools/glib/gresource +gsettings=${prefix}/tools/glib/gsettings + +Name: GIO +Description: glib I/O library +Version: 2.78.4 + +Libs: -L${libdir} -lgio-2.0 -lintl -framework Foundation -framework CoreFoundation -framework AppKit -lresolv +Requires: glib-2.0, gobject-2.0, gmodule-no-export-2.0, zlib +Cflags: -I${includedir} diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/gio-unix-2.0.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/gio-unix-2.0.pc new file mode 100644 index 0000000..734db24 --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/gio-unix-2.0.pc @@ -0,0 +1,9 @@ +prefix=${pcfiledir}/../.. +includedir=${prefix}/include + +Name: GIO unix specific APIs +Description: unix specific headers for glib I/O library +Version: 2.78.4 + +Requires: gobject-2.0, gio-2.0 +Cflags: "-I${includedir}/gio-unix-2.0" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/glib-2.0.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/glib-2.0.pc new file mode 100644 index 0000000..b241883 --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/glib-2.0.pc @@ -0,0 +1,18 @@ +prefix=${pcfiledir}/../.. +includedir=${prefix}/include +libdir=${prefix}/lib + +bindir=${prefix}/bin +datadir=${prefix}/share +glib_genmarshal=${prefix}/tools/glib/glib-genmarshal +gobject_query=${prefix}/tools/glib/gobject-query +glib_mkenums=${prefix}/tools/glib/glib-mkenums +glib_valgrind_suppressions=${datadir}/glib-2.0/valgrind/glib.supp + +Name: GLib +Description: C Utility Library +Version: 2.78.4 + +Libs: -L${libdir} -lglib-2.0 -lintl -liconv -lm -framework Foundation -framework CoreFoundation -framework AppKit -framework Carbon +Requires: libpcre2-8 >= 10.32 +Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/gmodule-2.0.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/gmodule-2.0.pc new file mode 100644 index 0000000..22c920c --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/gmodule-2.0.pc @@ -0,0 +1,11 @@ +prefix=${pcfiledir}/../.. +includedir=${prefix}/include + +gmodule_supported=true + +Name: GModule +Description: Dynamic module loader for GLib +Version: 2.78.4 + +Requires: gmodule-no-export-2.0, glib-2.0 +Cflags: "-I${includedir}" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/gmodule-export-2.0.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/gmodule-export-2.0.pc new file mode 100644 index 0000000..22c920c --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/gmodule-export-2.0.pc @@ -0,0 +1,11 @@ +prefix=${pcfiledir}/../.. +includedir=${prefix}/include + +gmodule_supported=true + +Name: GModule +Description: Dynamic module loader for GLib +Version: 2.78.4 + +Requires: gmodule-no-export-2.0, glib-2.0 +Cflags: "-I${includedir}" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/gmodule-no-export-2.0.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/gmodule-no-export-2.0.pc new file mode 100644 index 0000000..52b72c6 --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/gmodule-no-export-2.0.pc @@ -0,0 +1,13 @@ +prefix=${pcfiledir}/../.. +includedir=${prefix}/include +libdir=${prefix}/lib + +gmodule_supported=true + +Name: GModule +Description: Dynamic module loader for GLib +Version: 2.78.4 + +Libs: -L${libdir} -lgmodule-2.0 -lintl +Requires: glib-2.0 +Cflags: -I${includedir} diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/gobject-2.0.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/gobject-2.0.pc new file mode 100644 index 0000000..e8e2f1f --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/gobject-2.0.pc @@ -0,0 +1,11 @@ +prefix=${pcfiledir}/../.. +includedir=${prefix}/include +libdir=${prefix}/lib + +Name: GObject +Description: GLib Type, Object, Parameter and Signal Library +Version: 2.78.4 + +Libs: -L${libdir} -lgobject-2.0 -lintl +Requires: glib-2.0, libffi >= 3.0.0 +Cflags: -I${includedir} diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/gthread-2.0.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/gthread-2.0.pc new file mode 100644 index 0000000..29db55a --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/gthread-2.0.pc @@ -0,0 +1,11 @@ +prefix=${pcfiledir}/../.. +includedir=${prefix}/include +libdir=${prefix}/lib + +Name: GThread +Description: Thread support for GLib +Version: 2.78.4 + +Libs: -L${libdir} -lgthread-2.0 -lintl +Requires: glib-2.0 +Cflags: -I${includedir} diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/libde265.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/libde265.pc new file mode 100644 index 0000000..b80ba47 --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/libde265.pc @@ -0,0 +1,13 @@ +prefix=${pcfiledir}/../.. +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libde265 +Description: H.265/HEVC video decoder. +URL: https://github.com/strukturag/libde265 +Version: 1.0.15 + +Libs: -lde265 "-L${libdir}" -lc++ +Requires: +Cflags: "-I${includedir}" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/libffi.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/libffi.pc new file mode 100644 index 0000000..4db5389 --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/libffi.pc @@ -0,0 +1,12 @@ +prefix=${pcfiledir}/../.. +exec_prefix=${prefix} +libdir=${prefix}/lib +toolexeclibdir=${libdir} +includedir=${prefix}/include + +Name: libffi +Description: Library supporting Foreign Function Interfaces +Version: 3.4.6 + +Libs: "-L${toolexeclibdir}" -lffi +Cflags: "-I${includedir}" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/libheif.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/libheif.pc new file mode 100644 index 0000000..9375881 --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/libheif.pc @@ -0,0 +1,22 @@ +prefix=${pcfiledir}/../.. +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +# Contrary to older versions of libheif (<= 1.14.2), the available-codec-variables are now all set to 'yes' +# as since 1.14.0, codecs can be dynamically loaded at runtime and it is not possible anymore to determine +# the available codecs at compile-time. You'll get an unknown codec error at runtime if you try to use an +# unavailable codec. +builtin_h265_decoder=yes +builtin_h265_encoder=yes +builtin_avif_decoder=yes +builtin_avif_encoder=yes + +Name: libheif +Description: HEIF image codec. +URL: https://github.com/strukturag/libheif +Version: 1.17.6 + +Libs: "-L${libdir}" -lheif -lc++ +Requires: libde265 x265 aom libsharpyuv +Cflags: "-I${includedir}" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/libjpeg.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/libjpeg.pc new file mode 100644 index 0000000..7b82d03 --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/libjpeg.pc @@ -0,0 +1,11 @@ +prefix=${pcfiledir}/../.. +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: libjpeg +Description: A SIMD-accelerated JPEG codec that provides the libjpeg API +Version: 3.0.3 + +Libs: "-L${libdir}" -ljpeg +Cflags: "-I${includedir}" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/liblzma.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/liblzma.pc new file mode 100644 index 0000000..cdc4815 --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/liblzma.pc @@ -0,0 +1,15 @@ +prefix=${pcfiledir}/../.. +# SPDX-License-Identifier: 0BSD +# Author: Lasse Collin + +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: liblzma +Description: General purpose data compression library +URL: https://tukaani.org/xz/ +Version: 5.6.2 + +Libs: "-L${libdir}" -llzma -pthread +Cflags: "-I${includedir}" -DLZMA_API_STATIC diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/libpcre2-16.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/libpcre2-16.pc new file mode 100644 index 0000000..185b1bb --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/libpcre2-16.pc @@ -0,0 +1,13 @@ +prefix=${pcfiledir}/../.. +# Package Information for pkg-config + +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libpcre2-16 +Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 16 bit character support +Version: 10.43 + +Libs: "-L${libdir}" -lpcre2-16 +Cflags: "-I${includedir}" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/libpcre2-32.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/libpcre2-32.pc new file mode 100644 index 0000000..ef9dd4a --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/libpcre2-32.pc @@ -0,0 +1,13 @@ +prefix=${pcfiledir}/../.. +# Package Information for pkg-config + +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libpcre2-32 +Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 32 bit character support +Version: 10.43 + +Libs: "-L${libdir}" -lpcre2-32 +Cflags: "-I${includedir}" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/libpcre2-8.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/libpcre2-8.pc new file mode 100644 index 0000000..dabb36d --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/libpcre2-8.pc @@ -0,0 +1,13 @@ +prefix=${pcfiledir}/../.. +# Package Information for pkg-config + +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libpcre2-8 +Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 8 bit character support +Version: 10.43 + +Libs: "-L${libdir}" -lpcre2-8 +Cflags: "-I${includedir}" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/libpcre2-posix.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/libpcre2-posix.pc new file mode 100644 index 0000000..122f4de --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/libpcre2-posix.pc @@ -0,0 +1,14 @@ +prefix=${pcfiledir}/../.. +# Package Information for pkg-config + +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libpcre2-posix +Description: Posix compatible interface to libpcre2-8 +Version: 10.43 + +Libs: "-L${libdir}" -lpcre2-posix +Requires: libpcre2-8 +Cflags: "-I${includedir}" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/libpng.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/libpng.pc new file mode 100644 index 0000000..60e2d42 --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/libpng.pc @@ -0,0 +1,12 @@ +prefix=${pcfiledir}/../.. +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include/libpng16 + +Name: libpng +Description: Loads and saves PNG files +Version: 1.6.43 + +Libs: "-L${libdir}" -lpng16 +Requires: zlib +Cflags: "-I${includedir}" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/libpng16.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/libpng16.pc new file mode 100644 index 0000000..60e2d42 --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/libpng16.pc @@ -0,0 +1,12 @@ +prefix=${pcfiledir}/../.. +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include/libpng16 + +Name: libpng +Description: Loads and saves PNG files +Version: 1.6.43 + +Libs: "-L${libdir}" -lpng16 +Requires: zlib +Cflags: "-I${includedir}" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/libtiff-4.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/libtiff-4.pc new file mode 100644 index 0000000..57810f2 --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/libtiff-4.pc @@ -0,0 +1,12 @@ +prefix=${pcfiledir}/../.. +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libtiff +Description: Tag Image File Format (TIFF) library. +Version: 4.6.0 + +Libs: "-L${libdir}" -ltiff -lm +Requires: zlib libjpeg liblzma +Cflags: "-I${includedir}" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/libturbojpeg.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/libturbojpeg.pc new file mode 100644 index 0000000..e3bad26 --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/libturbojpeg.pc @@ -0,0 +1,11 @@ +prefix=${pcfiledir}/../.. +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: libturbojpeg +Description: A SIMD-accelerated JPEG codec that provides the TurboJPEG API +Version: 3.0.3 + +Libs: "-L${libdir}" -lturbojpeg +Cflags: "-I${includedir}" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/x265.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/x265.pc new file mode 100644 index 0000000..835cdae --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/x265.pc @@ -0,0 +1,11 @@ +prefix=${pcfiledir}/../.. +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: x265 +Description: H.265/HEVC video encoder +Version: 3.6 + +Libs: "-L${libdir}" -lx265 -lc++ -ldl +Cflags: "-I${includedir}" diff --git a/vcpkg/installed/x64-osx/lib/pkgconfig/zlib.pc b/vcpkg/installed/x64-osx/lib/pkgconfig/zlib.pc new file mode 100644 index 0000000..17a7e07 --- /dev/null +++ b/vcpkg/installed/x64-osx/lib/pkgconfig/zlib.pc @@ -0,0 +1,14 @@ +prefix=${pcfiledir}/../.. +exec_prefix=${prefix} +libdir=${prefix}/lib +sharedlibdir=${prefix}/lib +includedir=${prefix}/include + +Name: zlib +Description: zlib compression library +Version: 1.3.1 + + +Libs: "-L${libdir}" "-L${sharedlibdir}" -lz +Requires: +Cflags: "-I${includedir}"