|
Blender V5.0
|
#include <cstring>#include "GHOST_C-api.h"#include "BLI_string_utf8.h"#include "BLI_utildefines.h"#include "DNA_listBase.h"#include "DNA_userdef_types.h"#include "DNA_workspace_types.h"#include "BKE_global.hh"#include "BKE_main.hh"#include "BLF_api.hh"#include "nanosvgrast.h"#include "svg_cursors.h"#include "WM_api.hh"#include "WM_types.hh"#include "wm_cursors.hh"#include "wm_window.hh"Go to the source code of this file.
Classes | |
| struct | BCursor |
Macros | |
| #define | CURSOR_TEXT_BUFFER_SIZE 24 |
Functions | |
| static GHOST_TStandardCursor | convert_to_ghost_standard_cursor (WMCursorType curs) |
| static int | wm_cursor_size (const wmWindow *win) |
| static void | cursor_bitmap_rgba_flip_y (uint8_t *buffer, const size_t size[2]) |
| static uint8_t * | cursor_bitmap_from_svg (const char *svg, const int cursor_size, uint8_t *(*alloc_fn)(size_t size), int r_bitmap_size[2]) |
| static void | cursor_rgba_to_xbm_32 (const uint8_t *rgba, const int bitmap_size[2], uint8_t *bitmap, uint8_t *mask) |
| static bool | window_set_custom_cursor_generator (wmWindow *win, const BCursor &cursor) |
| static bool | window_set_custom_cursor_pixmap (wmWindow *win, const BCursor &cursor) |
| static bool | window_set_custom_cursor (wmWindow *win, const BCursor &cursor) |
| void | WM_cursor_set (wmWindow *win, int curs) |
| bool | WM_cursor_set_from_tool (wmWindow *win, const ScrArea *area, const ARegion *region) |
| bool | WM_cursor_modal_is_set_ok (const wmWindow *win) |
| void | WM_cursor_modal_set (wmWindow *win, int val) |
| void | WM_cursor_modal_restore (wmWindow *win) |
| void | WM_cursor_wait (bool val) |
| void | WM_cursor_grab_enable (wmWindow *win, const eWM_CursorWrapAxis wrap, const rcti *wrap_region, const bool hide) |
| void | WM_cursor_grab_disable (wmWindow *win, const int mouse_ungrab_xy[2]) |
| static void | wm_cursor_warp_relative (wmWindow *win, int x, int y) |
| bool | wm_cursor_arrow_move (wmWindow *win, const wmEvent *event) |
| static bool | wm_cursor_time_large (wmWindow *win, uint32_t nr) |
| static void | wm_cursor_time_small (wmWindow *win, uint32_t nr) |
| static uint8_t * | cursor_bitmap_from_text (const char *text, const int cursor_size, const int cursor_size_max, int font_id, uint8_t *(*alloc_fn)(size_t size), int r_bitmap_size[2]) |
| static bool | wm_cursor_text_generator (wmWindow *win, const char *text, int font_id) |
| static bool | wm_cursor_text_pixmap (wmWindow *win, const char *text, int font_id) |
| static bool | wm_cursor_text (wmWindow *win, const char *text, int font_id) |
| static void | wm_cursor_number_impl (wmWindow *win, int nr, bool is_percentage) |
| void | WM_cursor_time (wmWindow *win, int nr) |
| void | WM_cursor_progress (wmWindow *win, float progress_factor) |
| static void | wm_add_cursor (WMCursorType cursor, const char *svg_source, const blender::float2 &hotspot, bool can_invert=true) |
| void | wm_init_cursor_data () |
Variables | |
| constexpr int | CURSOR_HARDWARE_SIZE_MAX = 255 |
| static BCursor | g_cursors [WM_CURSOR_NUM] = {{nullptr}} |
Cursor pixmap and cursor utility functions to change the cursor.
Multiple types of mouse cursors are supported. Cursors provided by the OS are preferred. The availability of these are checked with GHOST_HasCursorShape(). These cursors can include platform-specific custom cursors. For example, on MacOS we provide vector PDF files.
If the OS cannot provide a built-in or custom platform cursor, then we use our own internal custom cursors. These are defined in SVG files. The hot-spot for these are set during definition in wm_init_cursor_data.
Definition in file wm_cursors.cc.
| #define CURSOR_TEXT_BUFFER_SIZE 24 |
The maximum size of cursor text (in bytes). Can remain small as it's unlikely we can ever show much text in a cursor.
Definition at line 59 of file wm_cursors.cc.
Referenced by wm_cursor_number_impl(), and wm_cursor_text_generator().
|
static |
Blender cursor to GHOST standard cursor conversion.
Definition at line 84 of file wm_cursors.cc.
References GHOST_kStandardCursorBlade, GHOST_kStandardCursorBothHandles, GHOST_kStandardCursorCopy, GHOST_kStandardCursorCrosshair, GHOST_kStandardCursorCrosshairA, GHOST_kStandardCursorCrosshairB, GHOST_kStandardCursorCrosshairC, GHOST_kStandardCursorCustom, GHOST_kStandardCursorDefault, GHOST_kStandardCursorDownArrow, GHOST_kStandardCursorEraser, GHOST_kStandardCursorEWScroll, GHOST_kStandardCursorEyedropper, GHOST_kStandardCursorHandClosed, GHOST_kStandardCursorHandOpen, GHOST_kStandardCursorHandPoint, GHOST_kStandardCursorHorizontalSplit, GHOST_kStandardCursorKnife, GHOST_kStandardCursorLeftArrow, GHOST_kStandardCursorLeftHandle, GHOST_kStandardCursorLeftRight, GHOST_kStandardCursorMove, GHOST_kStandardCursorNSEWScroll, GHOST_kStandardCursorNSScroll, GHOST_kStandardCursorPencil, GHOST_kStandardCursorRightArrow, GHOST_kStandardCursorRightHandle, GHOST_kStandardCursorSlip, GHOST_kStandardCursorStop, GHOST_kStandardCursorText, GHOST_kStandardCursorUpArrow, GHOST_kStandardCursorUpDown, GHOST_kStandardCursorVerticalSplit, GHOST_kStandardCursorWait, GHOST_kStandardCursorZoomIn, GHOST_kStandardCursorZoomOut, WM_CURSOR_BLADE, WM_CURSOR_BOTH_HANDLES, WM_CURSOR_COPY, WM_CURSOR_CROSS, WM_CURSOR_CROSSC, WM_CURSOR_DEFAULT, WM_CURSOR_DOT, WM_CURSOR_E_ARROW, WM_CURSOR_EDIT, WM_CURSOR_ERASER, WM_CURSOR_EW_SCROLL, WM_CURSOR_EYEDROPPER, WM_CURSOR_H_SPLIT, WM_CURSOR_HAND, WM_CURSOR_HAND_CLOSED, WM_CURSOR_HAND_POINT, WM_CURSOR_KNIFE, WM_CURSOR_LEFT_HANDLE, WM_CURSOR_MOVE, WM_CURSOR_N_ARROW, WM_CURSOR_NS_SCROLL, WM_CURSOR_NSEW_SCROLL, WM_CURSOR_PAINT, WM_CURSOR_PAINT_BRUSH, WM_CURSOR_RIGHT_HANDLE, WM_CURSOR_S_ARROW, WM_CURSOR_SLIP, WM_CURSOR_STOP, WM_CURSOR_TEXT_EDIT, WM_CURSOR_V_SPLIT, WM_CURSOR_W_ARROW, WM_CURSOR_WAIT, WM_CURSOR_X_MOVE, WM_CURSOR_Y_MOVE, WM_CURSOR_ZOOM_IN, and WM_CURSOR_ZOOM_OUT.
Referenced by WM_cursor_set().
|
static |
| svg | The contents of an SVG file. |
| cursor_size | The maximum dimension in pixels for the resulting cursors width or height. |
| alloc_fn | A caller defined allocation functions. |
| r_bitmap_size | The width & height of the cursor data (never exceeding cursor_size). |
Definition at line 219 of file wm_cursors.cc.
References ceil, float, size(), and UNUSED_VARS.
Referenced by window_set_custom_cursor_generator(), and window_set_custom_cursor_pixmap().
|
static |
| text | The text display in the cursor. |
| cursor_size | The maximum dimension in pixels for the resulting cursors width or height. |
| alloc_fn | A caller defined allocation functions. |
| r_bitmap_size | The width & height of the cursor data (never exceeding cursor_size). |
Definition at line 740 of file wm_cursors.cc.
References BLF_buffer(), BLF_buffer_col(), BLF_descender(), BLF_draw_buffer(), BLF_fixed_width(), BLF_height_max(), BLF_position(), BLF_size(), BLI_str_utf8_column_count(), cursor_bitmap_rgba_flip_y(), and size().
Referenced by wm_cursor_text_generator(), and wm_cursor_text_pixmap().
|
static |
Flip an RGBA byte buffer in-place.
Definition at line 188 of file wm_cursors.cc.
References MEM_freeN(), MEM_malloc_arrayN(), size(), and top.
Referenced by cursor_bitmap_from_text().
|
static |
Convert 32-bit RGBA bitmap (1-32 x 1-32) to 32x32 1bpp XBitMap bitmap and mask.
Definition at line 272 of file wm_cursors.cc.
References i, mask(), x, and y.
Referenced by window_set_custom_cursor_pixmap().
Definition at line 389 of file wm_cursors.cc.
References window_set_custom_cursor_generator(), window_set_custom_cursor_pixmap(), WM_capabilities_flag(), and WM_CAPABILITY_CURSOR_GENERATOR.
Referenced by WM_cursor_set().
Definition at line 292 of file wm_cursors.cc.
References BCursor::can_invert, cursor_bitmap_from_svg(), GHOST_CursorGenerator::free_fn, GHOST_CursorGenerator::generate_fn, GHOST_kSuccess, GHOST_SetCustomCursorGenerator(), wmWindow::ghostwin, BCursor::hotspot, MEM_callocN(), MEM_freeN(), size(), BCursor::svg_source, true, UNLIKELY, UNUSED_VARS, and GHOST_CursorGenerator::user_data.
Referenced by window_set_custom_cursor().
Definition at line 336 of file wm_cursors.cc.
References BCursor::can_invert, cursor_bitmap_from_svg(), CURSOR_HARDWARE_SIZE_MAX, cursor_rgba_to_xbm_32(), GHOST_kSuccess, GHOST_SetCustomCursorShape(), wmWindow::ghostwin, BCursor::hotspot, mask(), MEM_freeN(), size(), BCursor::svg_source, true, UNLIKELY, WM_capabilities_flag(), WM_CAPABILITY_CURSOR_RGBA, and wm_cursor_size().
Referenced by window_set_custom_cursor().
|
static |
Definition at line 966 of file wm_cursors.cc.
References g_cursors.
Referenced by wm_init_cursor_data().
Definition at line 595 of file wm_cursors.cc.
References EVT_DOWNARROWKEY, EVT_LEFTARROWKEY, EVT_RIGHTARROWKEY, EVT_UPARROWKEY, GHOST_GetNativePixelSize(), wmWindow::ghostwin, KM_PRESS, wmEvent::type, wmEvent::val, and wm_cursor_warp_relative().
Referenced by wm_handlers_do_intern().
| void WM_cursor_grab_disable | ( | wmWindow * | win, |
| const int | mouse_ungrab_xy[2] ) |
Definition at line 560 of file wm_cursors.cc.
References G, G_DEBUG, GHOST_kAxisNone, GHOST_kGrabDisable, GHOST_SetCursorGrab(), wmWindow::ghostwin, wmWindow::grabcursor, and wm_cursor_position_to_ghost_screen_coords().
Referenced by button_activate_state(), walkEnd(), WM_event_remove_handlers(), wm_gizmomap_modal_set(), and wm_handler_operator_call().
| void WM_cursor_grab_enable | ( | wmWindow * | win, |
| eWM_CursorWrapAxis | wrap, | ||
| const rcti * | wrap_region, | ||
| bool | hide ) |
Enable cursor grabbing, optionally hiding the cursor and wrapping cursor-motion within a sub-region of the window.
| wrap | an enum (WM_CURSOR_WRAP_NONE, WM_CURSOR_WRAP_XY... etc). |
| wrap_region | Window-relative region for cursor wrapping (when wrap is WM_CURSOR_WRAP_XY). When NULL, the window bounds are used for wrapping. |
Definition at line 508 of file wm_cursors.cc.
References wmWindow::eventstate, G, G_DEBUG, GHOST_kAxisX, GHOST_kAxisY, GHOST_kGrabHide, GHOST_kGrabNormal, GHOST_kGrabWrap, GHOST_SetCursorGrab(), wmWindow::ghostwin, wmWindow::grabcursor, wmTabletData::is_motion_absolute, wmEvent::tablet, wm_cursor_position_to_ghost_screen_coords(), WM_CURSOR_WRAP_NONE, WM_CURSOR_WRAP_X, WM_CURSOR_WRAP_Y, wrap(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by button_activate_state(), initWalkInfo(), wm_gizmomap_modal_set(), wm_macro_modal(), and wm_operator_invoke().
| bool WM_cursor_modal_is_set_ok | ( | const wmWindow * | win | ) |
Check the cursor isn't set elsewhere. When false setting the modal cursor can be done but may overwrite an existing cursor.
Use this check for modal navigation operators that may be activated while other modal operators are running.
Definition at line 468 of file wm_cursors.cc.
References wmWindow::grabcursor, and wmWindow::modalcursor.
Referenced by image_view_pan_init(), image_view_zoom_init(), view_pan_init(), view_pan_invoke(), view_zoom_init(), and view_zoomdrag_invoke().
| void WM_cursor_modal_restore | ( | wmWindow * | win | ) |
Definition at line 482 of file wm_cursors.cc.
References wmWindow::lastcursor, wmWindow::modalcursor, and WM_cursor_set().
Referenced by annotation_draw_exit(), area_split_exit(), area_swap_exit(), blender::ui::bonedropper_exit(), button_activate_exit(), blender::ed::curves::curve_draw_exit(), curve_draw_exit(), blender::ed::curves::pen_tool::curves_pen_exit(), datadropper_exit(), depthdropper_exit(), driverdropper_exit(), blender::ui::eyedropper_colorband_exit(), eyedropper_exit(), gesture_modal_end(), graph_slider_exit(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::sculpt_paint::grease_pencil_fill_exit(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_modal(), blender::ed::greasepencil::grease_pencil_pen_exit(), blender::ed::greasepencil::grease_pencil_primitive_exit(), image_view_pan_exit(), image_view_zoom_exit(), knifetool_exit_ex(), blender::ed::space_node::node_resize_exit(), pose_slide_modal(), poselib_blend_exit(), blender::ed::transform::postTrans(), sample_color_modal(), screen_opengl_render_end(), blender::ed::asset::screenshot_preview_exit(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_modal(), blender::ed::sculpt_paint::dyntopo::sculpt_sample_detail_size_modal(), ui_do_button(), ui_handler_wait_for_input(), ui_numedit_set_active(), ui_textedit_end(), view_pan_exit(), view_pan_modal(), view_zoom_exit(), view_zoomdrag_modal(), WM_cursor_wait(), and wm_drags_exit().
| void WM_cursor_modal_set | ( | wmWindow * | win, |
| int | val ) |
Definition at line 473 of file wm_cursors.cc.
References wmWindow::cursor, wmWindow::lastcursor, wmWindow::modalcursor, and WM_cursor_set().
Referenced by annotation_draw_cursor_set(), area_swap_invoke(), blender::ui::bonedropper_invoke(), button_activate_init(), curve_draw_invoke(), blender::ed::curves::curves_draw_invoke(), datadropper_invoke(), depthdropper_invoke(), driverdropper_invoke(), blender::ui::eyedropper_colorband_invoke(), eyedropper_invoke(), graph_slider_invoke(), blender::ed::sculpt_paint::grease_pencil_fill_event_modal_map(), blender::ed::sculpt_paint::grease_pencil_fill_invoke(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_invoke(), blender::ed::greasepencil::grease_pencil_primitive_cursor_update(), blender::ed::greasepencil::grease_pencil_primitive_invoke(), image_view_pan_init(), image_view_zoom_init(), blender::ed::transform::initMouseInputMode(), blender::ed::curves::pen_tool::PenToolOperation::invoke(), knifetool_invoke(), blender::ed::space_node::node_resize_init(), pose_slide_invoke_common(), poselib_blend_invoke(), sample_color_invoke(), blender::ed::asset::screenshot_preview_invoke(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_modal(), blender::ed::sculpt_paint::dyntopo::sculpt_sample_detail_size_invoke(), ui_numedit_set_active(), ui_textedit_begin(), view_pan_init(), view_pan_invoke(), view_zoom_init(), view_zoomdrag_invoke(), WM_cursor_wait(), wm_drags_check_ops(), WM_gesture_lasso_invoke(), WM_gesture_lines_invoke(), WM_gesture_polyline_invoke(), WM_gesture_straightline_invoke(), and WM_operator_name_call_ptr_with_depends_on_cursor().
|
static |
| is_percentage | When true, nr represents a percentage multiplied by 100 so the percentage with two decimal places can be shown. |
Definition at line 923 of file wm_cursors.cc.
References blf_mono_font, wmWindow::cursor, CURSOR_TEXT_BUFFER_SIZE, wmWindow::lastcursor, SNPRINTF_UTF8, WM_capabilities_flag(), WM_CAPABILITY_CURSOR_RGBA, wm_cursor_size(), wm_cursor_text(), wm_cursor_time_large(), and wm_cursor_time_small().
Referenced by WM_cursor_progress(), and WM_cursor_time().
Show progress in the cursor (0.0..1.0 when complete).
Definition at line 958 of file wm_cursors.cc.
References wm_cursor_number_impl().
| void WM_cursor_set | ( | wmWindow * | win, |
| int | curs ) |
Definition at line 397 of file wm_cursors.cc.
References BLI_assert_msg, convert_to_ghost_standard_cursor(), wmWindow::cursor, G, g_cursors, GHOST_HasCursorShape(), GHOST_kStandardCursorCustom, GHOST_kStandardCursorDefault, GHOST_SetCursorShape(), GHOST_SetCursorVisibility(), wmWindow::ghostwin, wmWindow::modalcursor, BCursor::svg_source, window_set_custom_cursor(), WM_CURSOR_DEFAULT, WM_CURSOR_NONE, and WM_CURSOR_NUM.
Referenced by actionzone_modal(), area_join_cancel(), area_join_invoke(), area_join_modal(), area_split_preview_update_cursor(), area_swap_modal(), clip_tracking_hide_cursor(), clip_tracking_show_cursor(), console_cursor(), ED_region_cursor_set(), file_external_operation_exec(), blender::ed::sculpt_paint::grease_pencil_fill_event_modal_map(), blender::ed::space_node::node_set_cursor(), blender::ed::sculpt_paint::paint_draw_cursor(), blender::ed::sculpt_paint::paint_update_mouse_cursor(), region_scale_modal(), blender::ed::spreadsheet::reorder_columns_invoke(), blender::ed::spreadsheet::reorder_columns_modal(), screen_cursor_set(), blender::ed::vse::sequencer_main_cursor(), blender::ed::spreadsheet::spreadsheet_cursor(), text_cursor(), ui_handle_menu_event(), ui_popup_block_create(), view3d_main_region_cursor(), WM_cursor_modal_restore(), WM_cursor_modal_set(), WM_cursor_set_from_tool(), WM_gizmomap_cursor_set(), and wm_gizmomap_highlight_set().
Definition at line 451 of file wm_cursors.cc.
References bToolRef_Runtime::cursor, wmWindow::cursor, ELEM, wmWindow::modalcursor, ARegion::regiontype, RGN_TYPE_PREVIEW, RGN_TYPE_WINDOW, bToolRef::runtime, ScrArea::runtime, ScrArea_Runtime::tool, WM_CURSOR_DEFAULT, and WM_cursor_set().
Referenced by ED_region_cursor_set(), and view3d_main_region_cursor().
|
static |
Calculate the cursor in pixels to use when setting the cursor.
Definition at line 166 of file wm_cursors.cc.
References OS_MAC, UI_SCALE_FAC, WM_cursor_preferred_logical_size(), and WM_window_dpi_get_scale().
Referenced by window_set_custom_cursor_pixmap(), wm_cursor_number_impl(), and wm_cursor_text_pixmap().
|
static |
Definition at line 911 of file wm_cursors.cc.
References WM_capabilities_flag(), WM_CAPABILITY_CURSOR_GENERATOR, wm_cursor_text_generator(), and wm_cursor_text_pixmap().
Referenced by wm_cursor_number_impl().
|
static |
Definition at line 815 of file wm_cursors.cc.
References cursor_bitmap_from_text(), CURSOR_TEXT_BUFFER_SIZE, GHOST_CursorGenerator::free_fn, GHOST_CursorGenerator::generate_fn, GHOST_kSuccess, GHOST_SetCustomCursorGenerator(), wmWindow::ghostwin, MEM_callocN(), MEM_freeN(), size(), STRNCPY_UTF8, true, UNLIKELY, and GHOST_CursorGenerator::user_data.
Referenced by wm_cursor_text().
|
static |
Definition at line 873 of file wm_cursors.cc.
References cursor_bitmap_from_text(), CURSOR_HARDWARE_SIZE_MAX, GHOST_kSuccess, GHOST_SetCustomCursorShape(), wmWindow::ghostwin, MEM_freeN(), MEM_malloc_arrayN(), size(), true, and wm_cursor_size().
Referenced by wm_cursor_text().
| void WM_cursor_time | ( | wmWindow * | win, |
| int | nr ) |
After this you can call restore too.
Definition at line 953 of file wm_cursors.cc.
References wm_cursor_number_impl().
Referenced by screen_opengl_render_anim_step().
|
static |
Definition at line 623 of file wm_cursors.cc.
References GHOST_kSuccess, GHOST_SetCustomCursorShape(), wmWindow::ghostwin, i, mask(), size(), x, and y.
Referenced by wm_cursor_number_impl().
|
static |
Definition at line 689 of file wm_cursors.cc.
References GHOST_SetCustomCursorShape(), wmWindow::ghostwin, i, mask(), size(), x, and y.
Referenced by wm_cursor_number_impl().
| void WM_cursor_wait | ( | bool | val | ) |
To allow usage all over, we do entire WM.
Definition at line 491 of file wm_cursors.cc.
References ListBase::first, G, G_MAIN, wmWindow::next, wmWindowManager::windows, WM_cursor_modal_restore(), WM_cursor_modal_set(), and WM_CURSOR_WAIT.
Referenced by blender::ed::object::apply_grease_pencil_for_modifier_all_keyframes(), blender::ed::asset::asset_bundle_install_exec(), associate_blend_exec(), blender::ed::greasepencil::bake_grease_pencil_animation_exec(), blender::ed::object::bake_invoke(), edbm_duplicate_invoke(), blender::ed::greasepencil::grease_pencil_separate_exec(), image_clipboard_copy_exec(), image_clipboard_paste_exec(), lightprobe_cache_bake_invoke(), blender::ed::object::multiresbake_image_exec(), pack_islands_exec(), pack_islands_freejob(), blender::ed::object::parent_set_with_depsgraph(), redraw_timer_exec(), save_image_op(), screen_render_invoke(), script_reload_exec(), blender::ed::sculpt_paint::dyntopo::sculpt_dynamic_topology_toggle_exec(), separate_armature_exec(), separate_exec(), solve_camera_invoke(), track_markers(), unassociate_blend_exec(), unpack_all_exec(), unpack_item_exec(), unpack_libraries_exec(), WM_file_read(), and wm_file_write().
|
static |
Definition at line 586 of file wm_cursors.cc.
References wm_cursor_position_get(), WM_cursor_warp(), x, and y.
Referenced by wm_cursor_arrow_move().
| void wm_init_cursor_data | ( | ) |
Definition at line 977 of file wm_cursors.cc.
References wm_add_cursor(), WM_CURSOR_BLADE, WM_CURSOR_BOTH_HANDLES, WM_CURSOR_COPY, WM_CURSOR_CROSS, WM_CURSOR_CROSSC, WM_CURSOR_DEFAULT, WM_CURSOR_DOT, WM_CURSOR_E_ARROW, WM_CURSOR_EDIT, WM_CURSOR_ERASER, WM_CURSOR_EW_ARROW, WM_CURSOR_EW_SCROLL, WM_CURSOR_EYEDROPPER, WM_CURSOR_H_SPLIT, WM_CURSOR_HAND, WM_CURSOR_HAND_CLOSED, WM_CURSOR_HAND_POINT, WM_CURSOR_KNIFE, WM_CURSOR_LEFT_HANDLE, WM_CURSOR_MOVE, WM_CURSOR_MUTE, WM_CURSOR_N_ARROW, WM_CURSOR_NS_ARROW, WM_CURSOR_NS_SCROLL, WM_CURSOR_NSEW_SCROLL, WM_CURSOR_NW_ARROW, WM_CURSOR_PAINT, WM_CURSOR_PAINT_BRUSH, WM_CURSOR_PICK_AREA, WM_CURSOR_RIGHT_HANDLE, WM_CURSOR_S_ARROW, WM_CURSOR_SLIP, WM_CURSOR_STOP, WM_CURSOR_SWAP_AREA, WM_CURSOR_TEXT_EDIT, WM_CURSOR_V_SPLIT, WM_CURSOR_VERTEX_LOOP, WM_CURSOR_W_ARROW, WM_CURSOR_WAIT, WM_CURSOR_X_MOVE, WM_CURSOR_Y_MOVE, WM_CURSOR_ZOOM_IN, and WM_CURSOR_ZOOM_OUT.
Referenced by WM_init().
|
constexpr |
Currently using the WIN32 limit of 255 for RGBA cursors, Wayland has a similar limit.
While other systems can be tested this seems like a reasonably large limit.
Definition at line 53 of file wm_cursors.cc.
Referenced by window_set_custom_cursor_pixmap(), and wm_cursor_text_pixmap().
|
static |
A static array aligned with WMCursorType for simple lookups.
Definition at line 81 of file wm_cursors.cc.
Referenced by wm_add_cursor(), and WM_cursor_set().