Blender V5.0
window.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#pragma once
6
7/* Functions to display a simple OpenGL window using SDL, simplified to the
8 * bare minimum we need to reduce boilerplate code in tests apps. */
9
11
12using WindowInitFunc = void (*)();
13using WindowExitFunc = void (*)();
14using WindowResizeFunc = void (*)(int, int);
15using WindowDisplayFunc = void (*)();
16using WindowKeyboardFunc = void (*)(unsigned char);
17using WindowMotionFunc = void (*)(int, int, int);
18
19void window_main_loop(const char *title,
20 const int width,
21 const int height,
23 WindowExitFunc exitf,
24 WindowResizeFunc resize,
25 WindowDisplayFunc display,
26 WindowKeyboardFunc keyboard,
27 WindowMotionFunc motion);
28
29void window_display_info(const char *info);
31void window_redraw();
32
35
#define CCL_NAMESPACE_END
static int initf
void window_opengl_context_disable()
Definition window.cpp:258
bool window_opengl_context_enable()
Definition window.cpp:251
void window_display_info(const char *info)
Definition window.cpp:76
void(*)(unsigned char) WindowKeyboardFunc
Definition window.h:16
void window_main_loop(const char *title, const int width, const int height, WindowInitFunc initf, WindowExitFunc exitf, WindowResizeFunc resize, WindowDisplayFunc display, WindowKeyboardFunc keyboard, WindowMotionFunc motion)
Definition window.cpp:264
void(*)() WindowInitFunc
Definition window.h:12
void(*)() WindowExitFunc
Definition window.h:13
void(*)(int, int, int) WindowMotionFunc
Definition window.h:17
void(*)() WindowDisplayFunc
Definition window.h:15
void window_redraw()
Definition window.cpp:352
void window_display_help()
Definition window.cpp:97
void(*)(int, int) WindowResizeFunc
Definition window.h:14