Blender V2.61 - r43446
|
#include <stdio.h>
#include <string.h>
#include "GHOST_C-api.h"
#include "BLO_sys_types.h"
#include "DNA_listBase.h"
#include "DNA_userdef_types.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "WM_api.h"
#include "WM_types.h"
#include "wm_cursors.h"
Go to the source code of this file.
Defines | |
#define | BEGIN_CURSOR_BLOCK { |
#define | END_CURSOR_BLOCK } |
Functions | |
static GHOST_TStandardCursor | convert_cursor (int curs) |
static void | window_set_custom_cursor (wmWindow *win, unsigned char mask[16][2], unsigned char bitmap[16][2], int hotx, int hoty) |
static void | window_set_custom_cursor_ex (wmWindow *win, BCursor *cursor, int useBig) |
void | WM_cursor_set (wmWindow *win, int curs) |
void | WM_cursor_modal (wmWindow *win, int val) |
void | WM_cursor_restore (wmWindow *win) |
void | WM_cursor_wait (int val) |
void | WM_cursor_grab (wmWindow *win, int wrap, int hide, int *bounds) |
void | WM_cursor_ungrab (wmWindow *win) |
int | wm_cursor_arrow_move (wmWindow *win, wmEvent *event) |
void | WM_timecursor (wmWindow *win, int nr) |
void | wm_init_cursor_data (void) |
Variables | |
static BCursor * | BlenderCursor [BC_NUMCURSORS] |
Definition in file wm_cursors.c.
#define BEGIN_CURSOR_BLOCK { |
Definition at line 315 of file wm_cursors.c.
Referenced by wm_init_cursor_data().
#define END_CURSOR_BLOCK } |
Definition at line 316 of file wm_cursors.c.
Referenced by wm_init_cursor_data().
static GHOST_TStandardCursor convert_cursor | ( | int | curs | ) | [static] |
Definition at line 56 of file wm_cursors.c.
References CURSOR_COPY, CURSOR_EDIT, CURSOR_FACESEL, CURSOR_HELP, CURSOR_PENCIL, CURSOR_STD, CURSOR_WAIT, CURSOR_X_MOVE, CURSOR_Y_MOVE, GHOST_kStandardCursorCopy, GHOST_kStandardCursorCrosshair, GHOST_kStandardCursorDefault, GHOST_kStandardCursorHelp, GHOST_kStandardCursorLeftRight, GHOST_kStandardCursorPencil, GHOST_kStandardCursorRightArrow, GHOST_kStandardCursorUpDown, and GHOST_kStandardCursorWait.
Referenced by WM_cursor_set().
static void window_set_custom_cursor | ( | wmWindow * | win, |
unsigned char | mask[16][2], | ||
unsigned char | bitmap[16][2], | ||
int | hotx, | ||
int | hoty | ||
) | [static] |
Definition at line 77 of file wm_cursors.c.
References GHOST_SetCustomCursorShape(), and wmWindow::ghostwin.
Referenced by WM_timecursor().
Definition at line 83 of file wm_cursors.c.
References BCursor::bg_color, BCursor::big_bm, BCursor::big_hotx, BCursor::big_hoty, BCursor::big_mask, BCursor::big_sizex, BCursor::big_sizey, BCursor::fg_color, GHOST_SetCustomCursorShapeEx(), wmWindow::ghostwin, BCursor::small_bm, BCursor::small_hotx, BCursor::small_hoty, BCursor::small_mask, BCursor::small_sizex, and BCursor::small_sizey.
Referenced by WM_cursor_set().
Definition at line 214 of file wm_cursors.c.
References DOWNARROWKEY, KM_PRESS, LEFTARROWKEY, RIGHTARROWKEY, wmEvent::type, UPARROWKEY, wmEvent::val, WM_cursor_warp(), wmEvent::x, and wmEvent::y.
Referenced by wm_handlers_do().
void WM_cursor_grab | ( | wmWindow * | win, |
int | wrap, | ||
int | hide, | ||
int * | bounds | ||
) |
Definition at line 180 of file wm_cursors.c.
References GHOST_TabletData::Active, G, G_DEBUG, GHOST_GetTabletData(), GHOST_kGrabHide, GHOST_kGrabNormal, GHOST_kGrabWrap, GHOST_kTabletModeNone, GHOST_SetCursorGrab(), wmWindow::ghostwin, and wmWindow::grabcursor.
Referenced by button_activate_state(), wm_macro_modal(), and wm_operator_invoke().
void WM_cursor_modal | ( | wmWindow * | win, |
int | val | ||
) |
Definition at line 147 of file wm_cursors.c.
References wmWindow::cursor, wmWindow::lastcursor, wmWindow::modalcursor, simple_enum_gen::val, and WM_cursor_set().
Referenced by area_swap_invoke(), eyedropper_invoke(), gpencil_draw_invoke(), image_view_pan_init(), image_view_zoom_init(), pose_slide_invoke_common(), ui_textedit_begin(), view_pan_init(), view_pan_invoke(), view_zoom_init(), view_zoomdrag_invoke(), WM_cursor_wait(), WM_gesture_lasso_invoke(), WM_gesture_lines_invoke(), and WM_gesture_straightline_invoke().
void WM_cursor_restore | ( | wmWindow * | win | ) |
Definition at line 155 of file wm_cursors.c.
References wmWindow::lastcursor, wmWindow::modalcursor, and WM_cursor_set().
Referenced by area_split_exit(), area_swap_exit(), dynamicPaint_initBake(), eyedropper_exit(), gpencil_draw_exit(), image_record_composite_exit(), image_view_pan_exit(), image_view_zoom_exit(), pose_slide_modal(), ptcache_bake_all_exec(), ptcache_bake_exec(), ui_textedit_end(), view_pan_exit(), view_pan_modal(), view_zoom_exit(), view_zoomdrag_modal(), WM_cursor_wait(), and wm_gesture_end().
void WM_cursor_set | ( | wmWindow * | win, |
int | curs | ||
) |
Definition at line 104 of file wm_cursors.c.
References BC_CROSSCURSOR, BC_GHOST_CURSORS, BC_NUMCURSORS, BCursor::big_bm, convert_cursor(), wmWindow::cursor, CURSOR_EDIT, CURSOR_NONE, CURSOR_STD, UserDef::curssize, GHOST_SetCursorShape(), GHOST_SetCursorVisibility(), wmWindow::ghostwin, wmWindow::modalcursor, NULL, SYSCURSOR, U, and window_set_custom_cursor_ex().
Referenced by area_split_modal(), BL_HideMouse(), BL_NormalMouse(), BL_WaitMouse(), hide_cursor(), region_cursor_set(), screen_cursor_set(), show_cursor(), text_cursor(), view3d_main_area_cursor(), WM_cursor_modal(), and WM_cursor_restore().
void WM_cursor_ungrab | ( | wmWindow * | win | ) |
Definition at line 203 of file wm_cursors.c.
References G, G_DEBUG, GHOST_kGrabDisable, GHOST_SetCursorGrab(), wmWindow::ghostwin, wmWindow::grabcursor, and NULL.
Referenced by button_activate_state(), WM_event_remove_handlers(), and wm_handler_operator_call().
void WM_cursor_wait | ( | int | val | ) |
Definition at line 164 of file wm_cursors.c.
References BC_WAITCURSOR, ListBase::first, G, wmWindow::next, NULL, wmJob::win, wmWindowManager::windows, WM_cursor_modal(), and WM_cursor_restore().
Referenced by BKE_ptcache_bake(), envmap_save_exec(), fill_mesh(), mesh_duplicate_invoke(), multiresbake_image_exec(), node_read_fullsamplelayers_exec(), objects_bake_render_invoke(), parent_set_exec(), redraw_timer_exec(), save_image_doit(), screen_opengl_render_end(), screen_opengl_render_init(), screen_render_invoke(), script_reload_exec(), separate_armature_exec(), separate_exec(), solve_camera_invoke(), split_mesh(), touch_seq_files(), track_markers_invoke(), WM_read_file(), and WM_write_file().
void wm_init_cursor_data | ( | void | ) |
********************** NS_ARROW Cursor *************************/
Definition at line 318 of file wm_cursors.c.
References BC_BLACK, BC_BLUE, BC_BOXSELCURSOR, BC_CROSSCURSOR, BC_EDITCROSSCURSOR, BC_EW_ARROWCURSOR, BC_EW_SCROLLCURSOR, BC_EYEDROPPER_CURSOR, BC_HANDCURSOR, BC_KNIFECURSOR, BC_NS_ARROWCURSOR, BC_NS_SCROLLCURSOR, BC_NSEW_SCROLLCURSOR, BC_NW_ARROWCURSOR, BC_PAINTBRUSHCURSOR, BC_SWAPAREA_CURSOR, BC_TEXTEDITCURSOR, BC_VLOOPCURSOR, BC_WAITCURSOR, BC_WHITE, BC_YELLOW, BEGIN_CURSOR_BLOCK, END_CURSOR_BLOCK, and NULL.
Referenced by WM_init().
void WM_timecursor | ( | wmWindow * | win, |
int | nr | ||
) |
Definition at line 237 of file wm_cursors.c.
References wmWindow::cursor, i, wmWindow::lastcursor, and window_set_custom_cursor().
Referenced by dynamicPaint_bakeImageSequence(), image_record_composite_apply(), ptcache_bake_all_exec(), and ptcache_bake_exec().
BCursor* BlenderCursor[BC_NUMCURSORS] [static] |
Definition at line 102 of file wm_cursors.c.