wxMaxima
Loading...
Searching...
No Matches
pdfdocdef.h
Go to the documentation of this file.
1/*
2** Name: pdfdocdef.h
3** Purpose: Compile time definitions and documentation
4** Author: Ulrich Telle
5** Created: 2005-08-04
6** Copyright: (c) 2005-2026 Ulrich Telle
7** Licence: wxWindows licence
8** SPDX-License-Identifier: LGPL-3.0+ WITH wxWindows-exception-3.1
9*/
10
12
1502#ifndef _PDFDOC_DEF_H_
1503#define _PDFDOC_DEF_H_
1504
1505// Unfortunately we can't always just rely on WXEXPORT because it wasn't
1506// defined correctly when using ELF visibility for symbol hiding in wx 2.8 that
1507// we still support, so we have to use our own symbol. This part, as well as
1508// the definition of WXPDFDOC_HAVE_VISIBILITY in configure, should be dropped
1509// when wx 2.8 is not supported any longer.
1510#ifdef WXPDFDOC_HAVE_VISIBILITY
1511 #define WXPDFDOC_EXPORT __attribute__ ((visibility("default")))
1512#else
1513 #define WXPDFDOC_EXPORT WXEXPORT
1514#endif
1515
1516#if defined(WXMAKINGDLL_PDFDOC)
1517 #define WXDLLIMPEXP_PDFDOC WXPDFDOC_EXPORT
1518 #define WXDLLIMPEXP_DATA_PDFDOC(type) WXPDFDOC_EXPORT type
1519#elif defined(WXUSINGDLL_PDFDOC)
1520 #define WXDLLIMPEXP_PDFDOC WXIMPORT
1521 #define WXDLLIMPEXP_DATA_PDFDOC(type) WXIMPORT type
1522#else // not making nor using DLL
1523 #define WXDLLIMPEXP_PDFDOC
1524 #define WXDLLIMPEXP_DATA_PDFDOC(type) type
1525#endif
1526
1527// Setting inheritance of wxPdfDocument
1528// 0 = do not derive wxPdfDocument from wxObject (default)
1529// 1 = derive wxPdfDocumentinherit from wxObject
1530#ifndef WXPDFDOC_INHERIT_WXOBJECT
1531#define WXPDFDOC_INHERIT_WXOBJECT 0
1532#endif
1533
1534/*
1535 GCC warns about using __declspec on forward declarations
1536 while MSVC complains about forward declarations without
1537 __declspec for the classes later declared with it. To hide this
1538 difference a separate macro for forward declarations is defined:
1539 */
1540#if defined(HAVE_VISIBILITY) || (defined(__WINDOWS__) && defined(__GNUC__))
1541 #define WXDLLIMPEXP_FWD_PDFDOC
1542#else
1543 #define WXDLLIMPEXP_FWD_PDFDOC WXDLLIMPEXP_PDFDOC
1544#endif
1545
1546// Support for intentional fallthrough in switch statements
1547#ifndef wxFALLTHROUGH
1548 #if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
1549 #define wxFALLTHROUGH [[fallthrough]]
1550 #elif defined(__GNUC__) && (__GNUC__ >= 7)
1551 #define wxFALLTHROUGH __attribute__ ((fallthrough))
1552 #elif defined(__clang__) && __has_attribute(fallthrough)
1553 #define wxFALLTHROUGH __attribute__ ((fallthrough))
1554 #else
1555 #define wxFALLTHROUGH ((void)0)
1556 #endif
1557#endif
1558
1559#endif // _PDFDOC_DEF_H_