diff options
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index cc8b1bb4882..a886d1440d9 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -64,6 +64,7 @@ struct wmJob; struct wmOperator; struct wmOperatorType; struct wmPaintCursor; +struct wmTabletData; struct wmDragData; struct wmDropTarget; struct wmDropTargetFinder; @@ -106,6 +107,17 @@ void WM_reinit_gizmomap_all(struct Main *bmain); void WM_script_tag_reload(void); +bool WM_window_find_under_cursor(const wmWindowManager *wm, + const wmWindow *win_ignore, + const wmWindow *win, + const int mval[2], + wmWindow **r_win, + int r_mval[2]); +void WM_window_pixel_sample_read(const wmWindowManager *wm, + const wmWindow *win, + const int pos[2], + float r_col[3]); + uint *WM_window_pixels_read(struct wmWindowManager *wm, struct wmWindow *win, int r_size[2]); int WM_window_pixels_x(const struct wmWindow *win); @@ -157,10 +169,6 @@ void *WM_opengl_context_create(void); void WM_opengl_context_dispose(void *context); void WM_opengl_context_activate(void *context); void WM_opengl_context_release(void *context); -#ifdef WIN32 -void *WM_directx_context_create(void); -void WM_directx_context_dispose(void *context); -#endif struct wmWindow *WM_window_open(struct bContext *C, const struct rcti *rect); struct wmWindow *WM_window_open_temp(struct bContext *C, @@ -193,7 +201,7 @@ void WM_lib_reload(struct Library *lib, struct bContext *C, struct ReportList *r /* mouse cursors */ void WM_cursor_set(struct wmWindow *win, int curs); -bool WM_cursor_set_from_tool(struct wmWindow *win, const ScrArea *sa, const ARegion *region); +bool WM_cursor_set_from_tool(struct wmWindow *win, const ScrArea *area, const ARegion *region); void WM_cursor_modal_set(struct wmWindow *win, int curs); void WM_cursor_modal_restore(struct wmWindow *win); void WM_cursor_wait(bool val); @@ -202,14 +210,13 @@ void WM_cursor_grab_disable(struct wmWindow *win, const int mouse_ungrab_xy[2]); void WM_cursor_time(struct wmWindow *win, int nr); struct wmPaintCursor *WM_paint_cursor_activate( - struct wmWindowManager *wm, short space_type, short region_type, bool (*poll)(struct bContext *C), void (*draw)(struct bContext *C, int, int, void *customdata), void *customdata); -bool WM_paint_cursor_end(struct wmWindowManager *wm, struct wmPaintCursor *handle); +bool WM_paint_cursor_end(struct wmPaintCursor *handle); void WM_paint_cursor_tag_redraw(struct wmWindow *win, struct ARegion *region); void WM_cursor_warp(struct wmWindow *win, int x, int y); @@ -621,7 +628,7 @@ int WM_gesture_lasso_modal(struct bContext *C, struct wmOperator *op, const stru void WM_gesture_lasso_cancel(struct bContext *C, struct wmOperator *op); const int (*WM_gesture_lasso_path_to_array(struct bContext *C, struct wmOperator *op, - int *mcords_tot))[2]; + int *mcoords_len))[2]; int WM_gesture_straightline_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); @@ -841,7 +848,7 @@ void WM_draw_region_viewport_bind(struct ARegion *region); void WM_draw_region_viewport_unbind(struct ARegion *region); /* Region drawing */ -void WM_draw_region_free(struct ARegion *region); +void WM_draw_region_free(struct ARegion *region, bool hide); struct GPUViewport *WM_draw_region_get_viewport(struct ARegion *region); struct GPUViewport *WM_draw_region_get_bound_viewport(struct ARegion *region); @@ -853,6 +860,8 @@ bool write_crash_blend(void); /* Lock the interface for any communication */ void WM_set_locked_interface(struct wmWindowManager *wm, bool lock); +void WM_event_tablet_data_default_set(struct wmTabletData *tablet_data); + /* For testing only 'G_FLAG_EVENT_SIMULATE' */ struct wmEvent *WM_event_add_simulate(struct wmWindow *win, const struct wmEvent *event_to_add); @@ -862,7 +871,7 @@ const char *WM_window_cursor_keymap_status_get(const struct wmWindow *win, void WM_window_cursor_keymap_status_refresh(struct bContext *C, struct wmWindow *win); void WM_window_status_area_tag_redraw(struct wmWindow *win); -struct ScrArea *WM_window_status_area_find(struct wmWindow *win, struct bScreen *sc); +struct ScrArea *WM_window_status_area_find(struct wmWindow *win, struct bScreen *screen); bool WM_window_modal_keymap_status_draw(struct bContext *C, struct wmWindow *win, struct uiLayout *layout); @@ -909,18 +918,18 @@ typedef struct ARegion *(*wmTooltipInitFn)(struct bContext *C, void WM_tooltip_immediate_init(struct bContext *C, struct wmWindow *win, - struct ScrArea *sa, + struct ScrArea *area, struct ARegion *region, wmTooltipInitFn init); void WM_tooltip_timer_init_ex(struct bContext *C, struct wmWindow *win, - struct ScrArea *sa, + struct ScrArea *area, struct ARegion *region, wmTooltipInitFn init, double delay); void WM_tooltip_timer_init(struct bContext *C, struct wmWindow *win, - struct ScrArea *sa, + struct ScrArea *area, struct ARegion *region, wmTooltipInitFn init); void WM_tooltip_timer_clear(struct bContext *C, struct wmWindow *win); @@ -935,11 +944,14 @@ void WM_generic_callback_free(struct wmGenericCallback *callback); void WM_generic_user_data_free(struct wmGenericUserData *user_data); +bool WM_region_use_viewport(struct ScrArea *area, struct ARegion *region); + #ifdef WITH_XR_OPENXR /* wm_xr.c */ bool WM_xr_session_exists(const wmXrData *xr); bool WM_xr_session_is_ready(const wmXrData *xr); struct wmXrSessionState *WM_xr_session_state_handle_get(const wmXrData *xr); +void WM_xr_session_base_pose_reset(wmXrData *xr); bool WM_xr_session_state_viewer_pose_location_get(const wmXrData *xr, float r_location[3]); bool WM_xr_session_state_viewer_pose_rotation_get(const wmXrData *xr, float r_rotation[4]); bool WM_xr_session_state_viewer_pose_matrix_info_get(const wmXrData *xr, |