Blender
V2.93
source
blender
windowmanager
wm_surface.h
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software Foundation,
14
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
*/
16
25
#pragma once
26
27
struct
bContext
;
28
29
#ifdef __cplusplus
30
extern
"C"
{
31
#endif
32
33
typedef
struct
wmSurface
{
34
struct
wmSurface
*
next
, *
prev
;
35
36
GHOST_ContextHandle
ghost_ctx
;
37
struct
GPUContext
*
gpu_ctx
;
38
39
void
*
customdata
;
40
41
void (*
draw
)(
struct
bContext
*);
43
void (*
free_data
)(
struct
wmSurface
*);
44
46
void (*
activate
)(void);
48
void (*
deactivate
)(void);
49
}
wmSurface
;
50
51
/* Create/Free */
52
void
wm_surface_add
(
wmSurface
*
surface
);
53
void
wm_surface_remove
(
wmSurface
*
surface
);
54
void
wm_surfaces_free
(
void
);
55
56
/* Utils */
57
void
wm_surfaces_iter
(
struct
bContext
*
C
,
void
(*cb)(
struct
bContext
*,
wmSurface
*));
58
59
/* Drawing */
60
void
wm_surface_make_drawable
(
wmSurface
*
surface
);
61
void
wm_surface_clear_drawable
(
void
);
62
void
wm_surface_set_drawable
(
wmSurface
*
surface
,
bool
activate
);
63
void
wm_surface_reset_drawable
(
void
);
64
65
#ifdef __cplusplus
66
}
67
#endif
GPUContext
struct GPUContext GPUContext
Definition:
GPU_context.h:44
C
#define C
Definition:
RandGen.cpp:39
activate
void activate(bool forceActivation=false) const
surface
struct @203::@204 surface
bContext
Definition:
context.c:69
wmSurface
Definition:
wm_surface.h:33
wmSurface::free_data
void(* free_data)(struct wmSurface *)
Definition:
wm_surface.h:43
wmSurface::activate
void(* activate)(void)
Definition:
wm_surface.h:46
wmSurface::ghost_ctx
GHOST_ContextHandle ghost_ctx
Definition:
wm_surface.h:36
wmSurface::customdata
void * customdata
Definition:
wm_surface.h:39
wmSurface::gpu_ctx
struct GPUContext * gpu_ctx
Definition:
wm_surface.h:37
wmSurface::next
struct wmSurface * next
Definition:
wm_surface.h:34
wmSurface::prev
struct wmSurface * prev
Definition:
wm_surface.h:34
wmSurface::draw
void(* draw)(struct bContext *)
Definition:
wm_surface.h:41
wmSurface::deactivate
void(* deactivate)(void)
Definition:
wm_surface.h:48
wm_surface_set_drawable
void wm_surface_set_drawable(wmSurface *surface, bool activate)
Definition:
wm_surface.c:67
wm_surface_clear_drawable
void wm_surface_clear_drawable(void)
Definition:
wm_surface.c:53
wm_surface_reset_drawable
void wm_surface_reset_drawable(void)
Definition:
wm_surface.c:92
wm_surface_add
void wm_surface_add(wmSurface *surface)
Definition:
wm_surface.c:103
wm_surface_remove
void wm_surface_remove(wmSurface *surface)
Definition:
wm_surface.c:108
wm_surface_make_drawable
void wm_surface_make_drawable(wmSurface *surface)
Definition:
wm_surface.c:82
wm_surfaces_free
void wm_surfaces_free(void)
Definition:
wm_surface.c:115
wmSurface
struct wmSurface wmSurface
wm_surfaces_iter
void wm_surfaces_iter(struct bContext *C, void(*cb)(struct bContext *, wmSurface *))
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1