BRL-CAD
defines.h
Go to the documentation of this file.
1
/* D E F I N E S . H
2
* BRL-CAD
3
*
4
* Copyright (c) 1993-2023 United States Government as represented by
5
* the U.S. Army Research Laboratory.
6
*
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Lesser General Public License
9
* version 2.1 as published by the Free Software Foundation.
10
*
11
* This library is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this file; see the file named COPYING for more
18
* information.
19
*/
20
/** @addtogroup libdm */
21
/** @{ */
22
/** @file dm/defines.h
23
*
24
*/
25
26
#ifndef DM_DEFINES_H
27
#define DM_DEFINES_H
28
29
#include "
common.h
"
30
31
#ifndef DM_EXPORT
32
# if defined(DM_DLL_EXPORTS) && defined(DM_DLL_IMPORTS)
33
# error "Only DM_DLL_EXPORTS or DM_DLL_IMPORTS can be defined, not both."
34
# elif defined(DM_DLL_EXPORTS)
35
# define DM_EXPORT COMPILER_DLLEXPORT
36
# elif defined(DM_DLL_IMPORTS)
37
# define DM_EXPORT COMPILER_DLLIMPORT
38
# else
39
# define DM_EXPORT
40
# endif
41
#endif
42
43
#ifndef FB_EXPORT
44
# if defined(FB_DLL_EXPORTS) && defined(FB_DLL_IMPORTS)
45
# error "Only FB_DLL_EXPORTS or FB_DLL_IMPORTS can be defined, not both."
46
# elif defined(FB_DLL_EXPORTS)
47
# define FB_EXPORT COMPILER_DLLEXPORT
48
# elif defined(FB_DLL_IMPORTS)
49
# define FB_EXPORT COMPILER_DLLIMPORT
50
# else
51
# define FB_EXPORT
52
# endif
53
#endif
54
55
/* The internals of the dm structure are hidden using the PImpl pattern*/
56
struct
dm_impl;
57
struct
dm
{
58
uint32_t
magic
;
59
struct
dm_impl *
i
;
60
int64_t
start_time
;
// time of last dm_draw_begin call
61
};
62
63
struct
dm_plugin
{
64
uint32_t
api_version
;
/* must be first in struct */
65
const
struct
dm
*
const
p
;
66
};
67
68
/* The internals of the framebuffer structure are hidden using the PImpl pattern */
69
struct
fb_impl;
70
struct
fb
{
71
struct
fb_impl *
i
;
72
};
73
74
struct
fb_plugin
{
75
const
struct
fb
*
const
p
;
76
};
77
78
#endif
/* DM_DEFINES_H */
79
80
/** @} */
81
/*
82
* Local Variables:
83
* mode: C
84
* tab-width: 8
85
* indent-tabs-mode: t
86
* c-file-style: "stroustrup"
87
* End:
88
* ex: shiftwidth=4 tabstop=8
89
*/
common.h
Header file for the BRL-CAD common definitions.
dm_plugin
Definition:
defines.h:63
dm_plugin::api_version
uint32_t api_version
Definition:
defines.h:64
dm_plugin::p
const struct dm *const p
Definition:
defines.h:65
dm
Definition:
defines.h:57
dm::magic
uint32_t magic
Definition:
defines.h:58
dm::i
struct dm_impl * i
Definition:
defines.h:59
dm::start_time
int64_t start_time
Definition:
defines.h:60
fb_plugin
Definition:
defines.h:74
fb_plugin::p
const struct fb *const p
Definition:
defines.h:75
fb
Definition:
defines.h:70
fb::i
struct fb_impl * i
Definition:
defines.h:71
include
dm
defines.h
Generated on Tue Mar 7 2023 23:41:50 for BRL-CAD by
1.9.3