Ultralight C++ API 1.3.0
Loading...
Searching...
No Matches
Defines.h
Go to the documentation of this file.
1/******************************************************************************
2 * This file is a part of Ultralight, an ultra-portable web-browser engine. *
3 * *
4 * See <https://ultralig.ht> for licensing and more. *
5 * *
6 * (C) 2023 Ultralight, Inc. *
7 *****************************************************************************/
8#pragma once
9
10// Needed for limit defines, like INTMAX_MAX, which is used by the std C++ library
11#ifndef __STDC_LIMIT_MACROS
12#define __STDC_LIMIT_MACROS
13#endif
14
15#include <cstdint>
16#include <cstddef>
17#include <limits.h>
18
19#ifdef SWIG
20#define UExport
21#else
22
23// Require C++11 Support
24#if defined(_MSC_VER)
25# if _MSC_VER < 1800
26# error This project needs at least Visual Studio 2013 to build
27# endif
28#elif __cplusplus <= 199711L
29# error This project can only be compiled with a compiler that supports C++11
30#endif
31
32#if INTPTR_MAX == INT32_MAX
33#define UL_ARCH_32_BIT
34#elif INTPTR_MAX == INT64_MAX
35#define UL_ARCH_64_BIT
36#else
37#error "Unknown CPU architecture: environment not 32 or 64-bit."
38#endif
39
40#if defined(__aarch64__)
41# define UL_ARCH_ARM64
42# if defined(__APPLE__)
43# define UL_ARCH_ARM64_APPLE_SILICON
44# endif
45#endif
46
47#if defined(__WIN32__) || defined(_WIN32)
48# if defined(ULTRALIGHT_STATIC_BUILD)
49# define UExport
50# else
51# if defined(ULTRALIGHT_IMPLEMENTATION)
52# define UExport __declspec(dllexport)
53# else
54# define UExport __declspec(dllimport)
55# endif
56# endif
57#define _thread_local __declspec(thread)
58#ifndef _NATIVE_WCHAR_T_DEFINED
59#define DISABLE_NATIVE_WCHAR_T
60#endif
61#else
62# if defined(ULTRALIGHT_STATIC_BUILD)
63# define UExport
64# else
65# define UExport __attribute__((visibility("default")))
66# endif
67#define _thread_local __thread
68#endif
69
70#endif
71
72#define ULTRALIGHT_VERSION "1.3.0"
73#define ULTRALIGHT_VERSION_MAJOR 1
74#define ULTRALIGHT_VERSION_MINOR 3
75#define ULTRALIGHT_VERSION_PATCH 0
76
77#define WEBKIT_VERSION "610.4.3.1.4"
78#define WEBKIT_VERSION_MAJOR 610
79#define WEBKIT_VERSION_MINOR 4
80#define WEBKIT_VERSION_TINY 3
81#define WEBKIT_VERSION_MICRO 1
82#define WEBKIT_VERSION_NANO 4
83
84#ifdef __cplusplus
85extern "C" {
86#endif
87
88///
89/// Full library version string (corresponds to ULTRALIGHT_VERSION)
90///
92
96
97///
98/// Full WebKit version string (corresponds to WEBKIT_VERSION)
99///
101
107
108#ifdef __cplusplus
109}
110#endif
uint32_t UltralightVersionMinor()
uint32_t UltralightVersionPatch()
uint32_t WebKitVersionMinor()
uint32_t WebKitVersionNano()
uint32_t WebKitVersionMicro()
uint32_t WebKitVersionMajor()
uint32_t UltralightVersionMajor()
const char * WebKitVersionString()
Full WebKit version string (corresponds to WEBKIT_VERSION)
#define UExport
Definition Defines.h:65
uint32_t WebKitVersionTiny()
const char * UltralightVersionString()
Full library version string (corresponds to ULTRALIGHT_VERSION)