Add Chromium-only Blender WebEngine parity work
This commit is contained in:
149
blender-5.2.0/source/blender/windowmanager/wm.hh
Normal file
149
blender-5.2.0/source/blender/windowmanager/wm.hh
Normal file
@@ -0,0 +1,149 @@
|
||||
/* SPDX-FileCopyrightText: 2007 Blender Authors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/** \file
|
||||
* \ingroup wm
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include "BLI_compiler_attrs.h"
|
||||
|
||||
#include "BLI_math_vector_types.hh"
|
||||
|
||||
#include "DNA_windowmanager_enums.h"
|
||||
|
||||
#include "gizmo/wm_gizmo_wmapi.hh"
|
||||
|
||||
namespace blender {
|
||||
|
||||
struct wmDrag;
|
||||
struct wmOperator;
|
||||
struct wmTimer;
|
||||
struct wmWindow;
|
||||
struct wmWindowManager;
|
||||
struct Main;
|
||||
|
||||
struct wmPaintCursor {
|
||||
wmPaintCursor *next, *prev;
|
||||
|
||||
void *customdata;
|
||||
|
||||
bool (*poll)(bContext *C);
|
||||
void (*draw)(bContext *C, const int2 &xy, const float2 &tilt, void *customdata);
|
||||
|
||||
short space_type;
|
||||
short region_type;
|
||||
};
|
||||
|
||||
/**
|
||||
* Cause a delayed #WM_exit()
|
||||
* call to avoid leaking memory when trying to exit from within operators.
|
||||
*/
|
||||
void wm_exit_schedule_delayed(const bContext *C);
|
||||
|
||||
/**
|
||||
* Context is allowed to be NULL, do not free wm itself `lib_id.cc`.
|
||||
*/
|
||||
extern void wm_close_and_free(bContext *C, wmWindowManager *);
|
||||
|
||||
/**
|
||||
* On startup, it adds all data, for matching.
|
||||
*/
|
||||
extern void wm_add_default(Main *bmain, bContext *C);
|
||||
extern void wm_clear_default_size(bContext *C);
|
||||
|
||||
/* Register to window-manager for redo or macro. */
|
||||
|
||||
/**
|
||||
* Called on event handling by `event_system.c`.
|
||||
*
|
||||
* All operations get registered in the window-manager here.
|
||||
*/
|
||||
void wm_operator_register(bContext *C, wmOperator *op);
|
||||
|
||||
/* `wm_operator.cc`, for init/exit. */
|
||||
|
||||
void wm_operatortype_free();
|
||||
/**
|
||||
* Default key-map for windows and screens, only call once per WM.
|
||||
*/
|
||||
void wm_window_keymap(wmKeyConfig *keyconf);
|
||||
void wm_operatortypes_register();
|
||||
|
||||
/**
|
||||
* Check if any of the dragged assets points to an existing file on disk.
|
||||
*
|
||||
* Checks the file system, so don't call too often.
|
||||
*/
|
||||
std::optional<bool> wm_drag_asset_path_exists(const wmDrag *drag);
|
||||
|
||||
/* `wm_gesture.cc` */
|
||||
|
||||
/* Called in `wm_draw.cc`. */
|
||||
|
||||
void wm_gesture_draw(wmWindow *win);
|
||||
/**
|
||||
* Use for line gesture.
|
||||
*/
|
||||
void wm_gesture_tag_redraw(wmWindow *win);
|
||||
|
||||
/* `wm_jobs.cc` */
|
||||
|
||||
/**
|
||||
* Hard-coded to event #TIMERJOBS.
|
||||
*/
|
||||
void wm_jobs_timer(wmWindowManager *wm, wmTimer *wt);
|
||||
/**
|
||||
* Handle jobs that are ready and finished.
|
||||
*/
|
||||
void wm_jobs_handle_finished(const bContext *C);
|
||||
/**
|
||||
* Kill job entirely, also removes timer itself.
|
||||
*/
|
||||
void wm_jobs_timer_end(wmWindowManager *wm, wmTimer *wt);
|
||||
|
||||
/* `wm_files.cc`. */
|
||||
|
||||
/**
|
||||
* Run the auto-save timer action.
|
||||
*/
|
||||
void wm_autosave_timer(Main *bmain, wmWindowManager *wm, wmTimer *wt);
|
||||
void wm_autosave_timer_begin(wmWindowManager *wm);
|
||||
void wm_autosave_timer_end(wmWindowManager *wm);
|
||||
void wm_autosave_delete();
|
||||
|
||||
/* `wm_splash_screen.cc` */
|
||||
|
||||
void WM_OT_splash(wmOperatorType *ot);
|
||||
void WM_OT_splash_about(wmOperatorType *ot);
|
||||
|
||||
/* `wm_stereo.cc` */
|
||||
|
||||
void wm_stereo3d_draw_sidebyside(wmWindow *win, int view);
|
||||
void wm_stereo3d_draw_topbottom(wmWindow *win, int view);
|
||||
|
||||
/**
|
||||
* If needed, adjust \a r_mouse_xy
|
||||
* so that drawn cursor and handled mouse position are matching visually.
|
||||
*/
|
||||
void wm_stereo3d_mouse_offset_apply(wmWindow *win, int r_mouse_xy[2]);
|
||||
wmOperatorStatus wm_stereo3d_set_exec(bContext *C, wmOperator *op);
|
||||
wmOperatorStatus wm_stereo3d_set_invoke(bContext *C, wmOperator *op, const wmEvent *event);
|
||||
void wm_stereo3d_set_draw(bContext *C, wmOperator *op);
|
||||
bool wm_stereo3d_set_check(bContext *C, wmOperator *op);
|
||||
void wm_stereo3d_set_cancel(bContext *C, wmOperator *op);
|
||||
|
||||
/**
|
||||
* Initialize operator properties.
|
||||
*/
|
||||
void wm_open_init_load_ui(wmOperator *op, bool use_prefs);
|
||||
/**
|
||||
* Return true if the script auto-execution should be cleared based on #WM_file_autoexec_init.
|
||||
*/
|
||||
bool wm_open_init_use_scripts(wmOperator *op, bool use_prefs) ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
} // namespace blender
|
||||
Reference in New Issue
Block a user