Blender V5.3
wm_window_private.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2019 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8#pragma once
9
10#include "GHOST_Types.hh"
11
13
14struct GHOST_CSD_Layout;
15
16namespace blender {
17
18struct bContext;
19struct bScreen;
20struct wmWindow;
21
22/* *************** Message box *************** */
23/* `WM_ghost_show_message_box` is implemented in `wm_windows.c` it is
24 * defined here as it was implemented to be used for showing
25 * a message to the user when the platform is not (fully) supported.
26 *
27 * In all other cases this message box should not be used. */
28void WM_ghost_show_message_box(const char *title,
29 const char *message,
30 const char *help_label,
31 const char *continue_label,
32 const char *link,
33 GHOST_DialogOptions dialog_options);
34
36
38
46void wm_window_titlebar_theme_context_set(const wmWindow *win, const bScreen *screen);
47
48/* wm_window_csd_draw.cc */
49
63void WM_window_csd_draw_titlebar_ex(const int win_size[2],
64 char win_state,
65 const GHOST_CSD_Layout *csd_layout,
66 bool is_active,
67 const uint16_t dpi,
68 const char *title,
69 int font_id,
70 int font_size,
71 const uchar border_color[3],
72 const uchar text_color[3],
73 float alpha);
75
87
98void WM_window_csd_clear_alpha(const wmWindow *win);
99
100/* wm_window_csd_layout.cc */
101
106#define WM_WINDOW_CSD_RESIZE_MARGIN_SIZE 10
107
115#define WM_WINDOW_CSD_CORNER_RADIUS 12
116
120int WM_window_csd_fractional_scale_apply(int value, const int fractional_scale[2]);
128int WM_window_csd_layout_callback(const int window_size[2],
129 const int fractional_scale[2],
130 char window_state,
131 const GHOST_CSD_Layout *csd_layout,
132 GHOST_CSD_Elem *csd_elems);
133
135
136} // namespace blender
GHOST_TDrawingContextType
GHOST_DialogOptions
#define C
Definition RandGen.cpp:29
BMesh Iterators.
void WM_window_csd_draw_titlebar_ex(const int win_size[2], const char win_state, const GHOST_CSD_Layout *csd_layout, const bool is_active, const uint16_t dpi, const char *title, const int font_id, const int font_size, const uchar border_color[3], const uchar text_color[3], const float alpha)
int WM_window_csd_layout_callback(const int window_size[2], const int fractional_scale[2], const char window_state, const GHOST_CSD_Layout *csd_layout, GHOST_CSD_Elem *csd_elems)
int WM_window_csd_fractional_scale_apply(int value, const int fractional_scale[2])
unsigned short uint16_t
Definition BKE_text.h:80
unsigned char uchar
Definition BKE_text.h:58
const GHOST_CSD_Layout * WM_window_csd_layout_get()
void WM_window_csd_draw_corner_mask(const wmWindow *win)
void wm_window_titlebar_theme_context_set(const wmWindow *win, const bScreen *screen)
Definition wm_window.cc:835
void WM_window_csd_draw_titlebar(const wmWindow *win)
void wm_test_gpu_backend_fallback(bContext *C)
GHOST_TDrawingContextType wm_ghost_drawing_context_type(const GPUBackendType gpu_backend)
void WM_ghost_show_message_box(const char *title, const char *message, const char *help_label, const char *continue_label, const char *link, GHOST_DialogOptions dialog_options)
void WM_window_csd_clear_alpha(const wmWindow *win)