Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2021-02-22 22:37:25 +0300
committerHarley Acheson <harley.acheson@gmail.com>2021-02-22 22:38:21 +0300
commitbe9842f65b85d64ab8b7baa686ded9c79c31227e (patch)
tree14d7dee027992adc5907162c809084eda381a46e /source/blender/windowmanager/WM_api.h
parent3d2d8a1aab0f0141a1a55d1cc93de60815c26946 (diff)
UI: Simplify Window Creation
Refactoring: WM_window_open() that can open different types of windows. 'New Window' with simplified layout. Differential Revision: https://developer.blender.org/D10419 Reviewed by Brecht Van Lommel
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r--source/blender/windowmanager/WM_api.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index d5de45c74fd..9eb4dd832cb 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -171,15 +171,24 @@ void WM_opengl_context_dispose(void *context);
void WM_opengl_context_activate(void *context);
void WM_opengl_context_release(void *context);
-struct wmWindow *WM_window_open(struct bContext *C, const struct rcti *rect);
-struct wmWindow *WM_window_open_temp(struct bContext *C,
- const char *title,
- int x,
- int y,
- int sizex,
- int sizey,
- int space_type,
- bool dialog);
+/* WM_window_open alignment */
+typedef enum WindowAlignment {
+ WIN_ALIGN_ABSOLUTE = 0,
+ WIN_ALIGN_LOCATION_CENTER,
+ WIN_ALIGN_PARENT_CENTER,
+} WindowAlignment;
+
+struct wmWindow *WM_window_open(struct bContext *C,
+ const char *title,
+ int x,
+ int y,
+ int sizex,
+ int sizey,
+ int space_type,
+ bool dialog,
+ bool temp,
+ WindowAlignment alignment);
+
void WM_window_set_dpi(const wmWindow *win);
bool WM_stereo3d_enabled(struct wmWindow *win, bool only_fullscreen_test);