2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2011-10-23 17:52:20 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
2018-06-01 18:19:39 +02:00
|
|
|
* of the License, or (at your option) any later version.
|
2011-10-23 17:52:20 +00:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2005-2007 Blender Foundation
|
|
|
|
* All rights reserved.
|
|
|
|
*/
|
2003-12-26 20:12:42 +00:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
* \ingroup wm
|
2014-01-19 23:14:24 +11:00
|
|
|
*
|
|
|
|
* Cursor pixmap and cursor utility functions to change the cursor.
|
2011-02-25 14:04:21 +00:00
|
|
|
*/
|
|
|
|
|
2003-12-26 20:12:42 +00:00
|
|
|
#include <stdio.h>
|
2008-01-01 18:29:19 +00:00
|
|
|
#include <string.h>
|
2003-12-26 20:12:42 +00:00
|
|
|
|
2007-12-24 18:27:28 +00:00
|
|
|
#include "GHOST_C-api.h"
|
2003-12-26 20:12:42 +00:00
|
|
|
|
2013-03-19 23:17:44 +00:00
|
|
|
#include "BLI_utildefines.h"
|
|
|
|
|
2013-05-28 19:35:26 +00:00
|
|
|
#include "BLI_sys_types.h"
|
2010-08-31 11:31:21 +00:00
|
|
|
|
2003-12-26 20:12:42 +00:00
|
|
|
#include "DNA_listBase.h"
|
2018-06-07 16:43:52 +02:00
|
|
|
#include "DNA_userdef_types.h"
|
2018-05-18 11:44:28 +02:00
|
|
|
#include "DNA_workspace_types.h"
|
2003-12-26 20:12:42 +00:00
|
|
|
|
2008-12-18 02:56:48 +00:00
|
|
|
#include "BKE_context.h"
|
2009-01-29 18:54:22 +00:00
|
|
|
#include "BKE_global.h"
|
|
|
|
#include "BKE_main.h"
|
2003-12-26 20:12:42 +00:00
|
|
|
|
2011-03-07 14:56:19 +00:00
|
|
|
#include "WM_types.h"
|
2013-03-19 23:17:44 +00:00
|
|
|
#include "WM_api.h"
|
2007-12-24 18:27:28 +00:00
|
|
|
#include "wm_cursors.h"
|
2013-08-27 01:30:09 +00:00
|
|
|
#include "wm_window.h"
|
2003-12-26 20:12:42 +00:00
|
|
|
|
2007-12-24 18:27:28 +00:00
|
|
|
/* XXX this still is mess from old code */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Some simple ghost <-> blender conversions */
|
2018-06-07 16:43:52 +02:00
|
|
|
static GHOST_TStandardCursor convert_cursor(int curs)
|
2007-12-24 18:27:28 +00:00
|
|
|
{
|
2012-03-27 01:24:16 +00:00
|
|
|
switch (curs) {
|
2007-12-24 18:27:28 +00:00
|
|
|
default:
|
2012-03-27 01:24:16 +00:00
|
|
|
case CURSOR_STD: return GHOST_kStandardCursorDefault;
|
|
|
|
case CURSOR_FACESEL: return GHOST_kStandardCursorRightArrow;
|
|
|
|
case CURSOR_WAIT: return GHOST_kStandardCursorWait;
|
|
|
|
case CURSOR_EDIT: return GHOST_kStandardCursorCrosshair;
|
2012-10-21 05:46:41 +00:00
|
|
|
case CURSOR_HELP:
|
2009-06-08 20:08:19 +00:00
|
|
|
#ifdef __APPLE__
|
|
|
|
return GHOST_kStandardCursorLeftRight;
|
|
|
|
#else
|
|
|
|
return GHOST_kStandardCursorHelp;
|
|
|
|
#endif
|
2012-03-27 01:24:16 +00:00
|
|
|
case CURSOR_X_MOVE: return GHOST_kStandardCursorLeftRight;
|
|
|
|
case CURSOR_Y_MOVE: return GHOST_kStandardCursorUpDown;
|
|
|
|
case CURSOR_PENCIL: return GHOST_kStandardCursorPencil;
|
|
|
|
case CURSOR_COPY: return GHOST_kStandardCursorCopy;
|
2007-12-24 18:27:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-07 16:43:52 +02:00
|
|
|
static void window_set_custom_cursor(wmWindow *win, unsigned char mask[16][2],
|
2012-03-27 01:24:16 +00:00
|
|
|
unsigned char bitmap[16][2], int hotx, int hoty)
|
2007-12-24 18:27:28 +00:00
|
|
|
{
|
|
|
|
GHOST_SetCustomCursorShape(win->ghostwin, bitmap, mask, hotx, hoty);
|
|
|
|
}
|
|
|
|
|
2018-06-07 16:43:52 +02:00
|
|
|
static void window_set_custom_cursor_ex(wmWindow *win, BCursor *cursor, int useBig)
|
2007-12-24 18:27:28 +00:00
|
|
|
{
|
|
|
|
if (useBig) {
|
2018-06-07 16:43:52 +02:00
|
|
|
GHOST_SetCustomCursorShapeEx(win->ghostwin,
|
2012-03-27 01:24:16 +00:00
|
|
|
(GHOST_TUns8 *)cursor->big_bm, (GHOST_TUns8 *)cursor->big_mask,
|
|
|
|
cursor->big_sizex, cursor->big_sizey,
|
|
|
|
cursor->big_hotx, cursor->big_hoty,
|
|
|
|
cursor->fg_color, cursor->bg_color);
|
2012-03-24 06:24:53 +00:00
|
|
|
}
|
|
|
|
else {
|
2018-06-07 16:43:52 +02:00
|
|
|
GHOST_SetCustomCursorShapeEx(win->ghostwin,
|
2012-03-27 01:24:16 +00:00
|
|
|
(GHOST_TUns8 *)cursor->small_bm, (GHOST_TUns8 *)cursor->small_mask,
|
|
|
|
cursor->small_sizex, cursor->small_sizey,
|
|
|
|
cursor->small_hotx, cursor->small_hoty,
|
|
|
|
cursor->fg_color, cursor->bg_color);
|
2007-12-24 18:27:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Cursor Globals */
|
|
|
|
static BCursor *BlenderCursor[BC_NUMCURSORS]; /*Points to static BCursor Structs */
|
|
|
|
|
2008-12-15 16:54:47 +00:00
|
|
|
void WM_cursor_set(wmWindow *win, int curs)
|
2007-12-24 18:27:28 +00:00
|
|
|
{
|
|
|
|
|
2013-06-28 16:37:39 +00:00
|
|
|
if (win == NULL || G.background) {
|
|
|
|
return; /* Can't set custom cursor before Window init */
|
|
|
|
}
|
2008-12-15 16:54:47 +00:00
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
if (curs == CURSOR_NONE) {
|
2007-12-24 18:27:28 +00:00
|
|
|
GHOST_SetCursorVisibility(win->ghostwin, 0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2009-07-28 18:59:36 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
/* the default win32 cross cursor is barely visible,
|
|
|
|
* only 1 pixel thick, use another one instead */
|
2012-03-27 01:24:16 +00:00
|
|
|
if (curs == CURSOR_EDIT)
|
|
|
|
curs = BC_CROSSCURSOR;
|
2013-12-31 02:00:21 +01:00
|
|
|
#else
|
|
|
|
/* in case of large cursor, also use custom cursor because
|
|
|
|
* large cursors don't work for system cursors */
|
|
|
|
if (U.curssize && curs == CURSOR_EDIT)
|
|
|
|
curs = BC_CROSSCURSOR;
|
2009-07-28 18:59:36 +00:00
|
|
|
#endif
|
|
|
|
|
2007-12-24 18:27:28 +00:00
|
|
|
GHOST_SetCursorVisibility(win->ghostwin, 1);
|
2018-06-07 16:43:52 +02:00
|
|
|
|
2012-03-24 06:24:53 +00:00
|
|
|
if (curs == CURSOR_STD && win->modalcursor)
|
2012-03-27 01:24:16 +00:00
|
|
|
curs = win->modalcursor;
|
2018-06-07 16:43:52 +02:00
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
win->cursor = curs;
|
2018-06-07 16:43:52 +02:00
|
|
|
|
2007-12-24 18:27:28 +00:00
|
|
|
/* detect if we use system cursor or Blender cursor */
|
2012-03-27 01:24:16 +00:00
|
|
|
if (curs >= BC_GHOST_CURSORS) {
|
2007-12-24 18:27:28 +00:00
|
|
|
GHOST_SetCursorShape(win->ghostwin, convert_cursor(curs));
|
|
|
|
}
|
2008-01-01 18:29:19 +00:00
|
|
|
else {
|
2012-03-27 01:24:16 +00:00
|
|
|
if ((curs < SYSCURSOR) || (curs >= BC_NUMCURSORS)) return;
|
2008-01-01 18:29:19 +00:00
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
if (curs == SYSCURSOR) { /* System default Cursor */
|
2008-01-01 18:29:19 +00:00
|
|
|
GHOST_SetCursorShape(win->ghostwin, convert_cursor(CURSOR_STD));
|
|
|
|
}
|
2014-01-16 19:15:53 +11:00
|
|
|
else if ((U.curssize == 0) || (BlenderCursor[curs]->big_bm == NULL)) {
|
2008-01-01 18:29:19 +00:00
|
|
|
window_set_custom_cursor_ex(win, BlenderCursor[curs], 0);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
window_set_custom_cursor_ex(win, BlenderCursor[curs], 1);
|
|
|
|
}
|
2007-12-24 18:27:28 +00:00
|
|
|
}
|
2008-01-01 18:29:19 +00:00
|
|
|
}
|
|
|
|
|
2018-05-18 11:44:28 +02:00
|
|
|
bool WM_cursor_set_from_tool(struct wmWindow *win, const ScrArea *sa, const ARegion *ar)
|
|
|
|
{
|
|
|
|
if (ar && (ar->regiontype != RGN_TYPE_WINDOW)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bToolRef_Runtime *tref_rt = (sa && sa->runtime.tool) ? sa->runtime.tool->runtime : NULL;
|
|
|
|
if (tref_rt && tref_rt->cursor != CURSOR_STD) {
|
|
|
|
if (win->modalcursor == 0) {
|
|
|
|
WM_cursor_set(win, tref_rt->cursor);
|
|
|
|
win->cursor = tref_rt->cursor;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2013-09-06 22:34:29 +00:00
|
|
|
void WM_cursor_modal_set(wmWindow *win, int val)
|
2008-01-01 18:29:19 +00:00
|
|
|
{
|
2012-03-24 06:24:53 +00:00
|
|
|
if (win->lastcursor == 0)
|
2009-01-29 18:54:22 +00:00
|
|
|
win->lastcursor = win->cursor;
|
2011-01-22 18:00:11 +00:00
|
|
|
win->modalcursor = val;
|
2010-12-27 18:54:43 +00:00
|
|
|
WM_cursor_set(win, val);
|
2008-12-15 16:54:47 +00:00
|
|
|
}
|
|
|
|
|
2013-09-06 22:34:29 +00:00
|
|
|
void WM_cursor_modal_restore(wmWindow *win)
|
2008-12-15 16:54:47 +00:00
|
|
|
{
|
2011-01-22 18:00:11 +00:00
|
|
|
win->modalcursor = 0;
|
2012-03-24 06:24:53 +00:00
|
|
|
if (win->lastcursor)
|
2009-01-29 18:54:22 +00:00
|
|
|
WM_cursor_set(win, win->lastcursor);
|
|
|
|
win->lastcursor = 0;
|
2008-12-15 16:54:47 +00:00
|
|
|
}
|
|
|
|
|
2009-01-29 18:54:22 +00:00
|
|
|
/* to allow usage all over, we do entire WM */
|
2013-04-04 02:05:11 +00:00
|
|
|
void WM_cursor_wait(bool val)
|
2008-12-15 16:54:47 +00:00
|
|
|
{
|
2012-03-24 06:24:53 +00:00
|
|
|
if (!G.background) {
|
2018-06-14 12:34:13 +02:00
|
|
|
wmWindowManager *wm = G_MAIN->wm.first;
|
2012-03-27 01:24:16 +00:00
|
|
|
wmWindow *win = wm ? wm->windows.first : NULL;
|
2018-06-07 16:43:52 +02:00
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
for (; win; win = win->next) {
|
2012-03-24 06:24:53 +00:00
|
|
|
if (val) {
|
2013-09-06 22:34:29 +00:00
|
|
|
WM_cursor_modal_set(win, BC_WAITCURSOR);
|
2012-03-24 06:24:53 +00:00
|
|
|
}
|
|
|
|
else {
|
2013-09-06 22:34:29 +00:00
|
|
|
WM_cursor_modal_restore(win);
|
2010-12-11 11:11:32 +00:00
|
|
|
}
|
2009-01-29 18:54:22 +00:00
|
|
|
}
|
2007-12-24 18:27:28 +00:00
|
|
|
}
|
2008-01-01 18:29:19 +00:00
|
|
|
}
|
|
|
|
|
2012-09-22 13:23:12 +00:00
|
|
|
/**
|
2018-12-12 12:50:58 +11:00
|
|
|
* \param bounds: can be NULL
|
2012-09-22 13:23:12 +00:00
|
|
|
*/
|
2013-04-04 15:16:29 +00:00
|
|
|
void WM_cursor_grab_enable(wmWindow *win, bool wrap, bool hide, int bounds[4])
|
2009-07-09 16:05:01 +00:00
|
|
|
{
|
2009-10-15 20:38:35 +00:00
|
|
|
/* Only grab cursor when not running debug.
|
2018-06-07 16:43:52 +02:00
|
|
|
* It helps not to get a stuck WM when hitting a breakpoint
|
2009-10-15 20:38:35 +00:00
|
|
|
* */
|
2009-10-17 14:08:01 +00:00
|
|
|
GHOST_TGrabCursorMode mode = GHOST_kGrabNormal;
|
|
|
|
|
2013-01-17 15:27:58 +00:00
|
|
|
if (bounds) {
|
2015-10-03 03:37:41 +02:00
|
|
|
wm_cursor_position_to_ghost(win, &bounds[0], &bounds[1]);
|
|
|
|
wm_cursor_position_to_ghost(win, &bounds[2], &bounds[3]);
|
2013-01-17 15:27:58 +00:00
|
|
|
}
|
2018-06-07 16:43:52 +02:00
|
|
|
|
2013-01-21 02:30:40 +00:00
|
|
|
if (hide) {
|
|
|
|
mode = GHOST_kGrabHide;
|
|
|
|
}
|
|
|
|
else if (wrap) {
|
|
|
|
mode = GHOST_kGrabWrap;
|
|
|
|
}
|
2012-03-31 00:59:17 +00:00
|
|
|
if ((G.debug & G_DEBUG) == 0) {
|
2013-01-21 02:30:40 +00:00
|
|
|
if (win->ghostwin) {
|
2012-07-07 22:51:57 +00:00
|
|
|
/* Note: There is no tabletdata on Windows if no tablet device is connected. */
|
2018-01-10 12:25:20 +11:00
|
|
|
if (win->eventstate->is_motion_absolute == false) {
|
2012-09-22 13:23:12 +00:00
|
|
|
GHOST_SetCursorGrab(win->ghostwin, mode, bounds, NULL);
|
2018-01-10 12:25:20 +11:00
|
|
|
}
|
2009-12-07 18:05:51 +00:00
|
|
|
|
2009-12-09 04:51:35 +00:00
|
|
|
win->grabcursor = mode;
|
2009-11-18 21:01:04 +00:00
|
|
|
}
|
|
|
|
}
|
2009-10-07 21:19:35 +00:00
|
|
|
}
|
|
|
|
|
2014-06-11 11:27:53 +10:00
|
|
|
void WM_cursor_grab_disable(wmWindow *win, const int mouse_ungrab_xy[2])
|
2009-10-07 21:19:35 +00:00
|
|
|
{
|
2012-03-31 00:59:17 +00:00
|
|
|
if ((G.debug & G_DEBUG) == 0) {
|
2012-03-24 06:24:53 +00:00
|
|
|
if (win && win->ghostwin) {
|
2015-10-03 03:37:41 +02:00
|
|
|
if (mouse_ungrab_xy) {
|
|
|
|
int mouse_xy[2] = {mouse_ungrab_xy[0], mouse_ungrab_xy[1]};
|
|
|
|
wm_cursor_position_to_ghost(win, &mouse_xy[0], &mouse_xy[1]);
|
|
|
|
GHOST_SetCursorGrab(win->ghostwin, GHOST_kGrabDisable, NULL, mouse_xy);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
GHOST_SetCursorGrab(win->ghostwin, GHOST_kGrabDisable, NULL, NULL);
|
|
|
|
}
|
|
|
|
|
2009-12-09 04:51:35 +00:00
|
|
|
win->grabcursor = GHOST_kGrabDisable;
|
2009-12-07 18:05:51 +00:00
|
|
|
}
|
2009-11-18 21:01:04 +00:00
|
|
|
}
|
2009-07-09 16:05:01 +00:00
|
|
|
}
|
|
|
|
|
2013-08-27 01:30:09 +00:00
|
|
|
static void wm_cursor_warp_relative(wmWindow *win, int x, int y)
|
|
|
|
{
|
|
|
|
/* note: don't use wmEvent coords because of continuous grab [#36409] */
|
|
|
|
int cx, cy;
|
|
|
|
wm_get_cursor_position(win, &cx, &cy);
|
|
|
|
WM_cursor_warp(win, cx + x, cy + y);
|
|
|
|
}
|
|
|
|
|
2011-03-07 14:56:19 +00:00
|
|
|
/* give it a modal keymap one day? */
|
2016-04-18 06:20:42 +10:00
|
|
|
bool wm_cursor_arrow_move(wmWindow *win, const wmEvent *event)
|
2011-03-07 14:56:19 +00:00
|
|
|
{
|
2012-03-27 01:24:16 +00:00
|
|
|
if (win && event->val == KM_PRESS) {
|
|
|
|
if (event->type == UPARROWKEY) {
|
2013-08-27 01:30:09 +00:00
|
|
|
wm_cursor_warp_relative(win, 0, 1);
|
2011-03-07 14:56:19 +00:00
|
|
|
return 1;
|
2012-03-24 06:24:53 +00:00
|
|
|
}
|
2012-03-27 01:24:16 +00:00
|
|
|
else if (event->type == DOWNARROWKEY) {
|
2013-08-27 01:30:09 +00:00
|
|
|
wm_cursor_warp_relative(win, 0, -1);
|
2011-03-07 14:56:19 +00:00
|
|
|
return 1;
|
2012-03-24 06:24:53 +00:00
|
|
|
}
|
2012-03-27 01:24:16 +00:00
|
|
|
else if (event->type == LEFTARROWKEY) {
|
2013-08-27 01:30:09 +00:00
|
|
|
wm_cursor_warp_relative(win, -1, 0);
|
2011-03-07 14:56:19 +00:00
|
|
|
return 1;
|
2012-03-24 06:24:53 +00:00
|
|
|
}
|
2012-03-27 01:24:16 +00:00
|
|
|
else if (event->type == RIGHTARROWKEY) {
|
2013-08-27 01:30:09 +00:00
|
|
|
wm_cursor_warp_relative(win, 1, 0);
|
2011-03-07 14:56:19 +00:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-09-24 17:27:41 +02:00
|
|
|
/* after this you can call restore too */
|
2012-08-11 21:35:24 +00:00
|
|
|
void WM_cursor_time(wmWindow *win, int nr)
|
2008-01-01 18:29:19 +00:00
|
|
|
{
|
|
|
|
/* 10 8x8 digits */
|
2014-04-27 07:50:08 +10:00
|
|
|
const char number_bitmaps[10][8] = {
|
2012-03-27 01:24:16 +00:00
|
|
|
{0, 56, 68, 68, 68, 68, 68, 56},
|
|
|
|
{0, 24, 16, 16, 16, 16, 16, 56},
|
|
|
|
{0, 60, 66, 32, 16, 8, 4, 126},
|
|
|
|
{0, 124, 32, 16, 56, 64, 66, 60},
|
|
|
|
{0, 32, 48, 40, 36, 126, 32, 32},
|
|
|
|
{0, 124, 4, 60, 64, 64, 68, 56},
|
|
|
|
{0, 56, 4, 4, 60, 68, 68, 56},
|
|
|
|
{0, 124, 64, 32, 16, 8, 8, 8},
|
|
|
|
{0, 60, 66, 66, 60, 66, 66, 60},
|
2019-02-03 14:01:45 +11:00
|
|
|
{0, 56, 68, 68, 120, 64, 68, 56},
|
2008-01-01 18:29:19 +00:00
|
|
|
};
|
2010-12-03 18:26:42 +00:00
|
|
|
unsigned char mask[16][2];
|
2012-03-27 01:24:16 +00:00
|
|
|
unsigned char bitmap[16][2] = {{0}};
|
2008-01-01 18:29:19 +00:00
|
|
|
int i, idx;
|
2018-06-07 16:43:52 +02:00
|
|
|
|
2012-03-24 06:24:53 +00:00
|
|
|
if (win->lastcursor == 0)
|
2012-03-27 01:24:16 +00:00
|
|
|
win->lastcursor = win->cursor;
|
2018-06-07 16:43:52 +02:00
|
|
|
|
2010-12-03 18:26:42 +00:00
|
|
|
memset(&mask, 0xFF, sizeof(mask));
|
2018-06-07 16:43:52 +02:00
|
|
|
|
2008-01-01 18:29:19 +00:00
|
|
|
/* print number bottom right justified */
|
2012-03-27 01:24:16 +00:00
|
|
|
for (idx = 3; nr && idx >= 0; idx--) {
|
2014-04-27 00:21:43 +10:00
|
|
|
const char *digit = number_bitmaps[nr % 10];
|
2012-03-27 01:24:16 +00:00
|
|
|
int x = idx % 2;
|
|
|
|
int y = idx / 2;
|
|
|
|
|
|
|
|
for (i = 0; i < 8; i++)
|
|
|
|
bitmap[i + y * 8][x] = digit[i];
|
|
|
|
nr /= 10;
|
2007-12-24 18:27:28 +00:00
|
|
|
}
|
2018-06-07 16:43:52 +02:00
|
|
|
|
2008-12-15 16:54:47 +00:00
|
|
|
window_set_custom_cursor(win, mask, bitmap, 7, 7);
|
2007-12-24 18:27:28 +00:00
|
|
|
}
|
2003-12-26 20:12:42 +00:00
|
|
|
|
2008-01-01 18:29:19 +00:00
|
|
|
|
2015-06-01 14:56:07 +10:00
|
|
|
/**
|
|
|
|
* Custom Cursor Description
|
|
|
|
* =========================
|
2012-03-09 18:28:30 +00:00
|
|
|
*
|
|
|
|
* Each bit represents a pixel, so 1 byte = 8 pixels,
|
|
|
|
* the bytes go Left to Right. Top to bottom
|
|
|
|
* the bits in a byte go right to left
|
|
|
|
* (ie; 0x01, 0x80 represents a line of 16 pix with the first and last pix set.)
|
|
|
|
*
|
2015-06-01 14:56:07 +10:00
|
|
|
* - A 0 in the bitmap = bg_color, a 1 fg_color
|
|
|
|
* - a 0 in the mask = transparent pix.
|
2012-03-09 18:28:30 +00:00
|
|
|
*
|
|
|
|
* Until 32x32 cursors are supported on all platforms, the size of the
|
|
|
|
* small cursors MUST be 16x16.
|
|
|
|
*
|
2015-06-01 14:56:07 +10:00
|
|
|
* Large cursors have a maximum size of 32x32.
|
2012-03-09 18:28:30 +00:00
|
|
|
*
|
|
|
|
* Other than that, the specified size of the cursors is just a guideline,
|
|
|
|
* However, the char array that defines the BM and MASK must be byte aligned.
|
|
|
|
* ie a 17x17 cursor needs 3 bytes (cols) * 17 bytes (rows)
|
|
|
|
* (3 bytes = 17 bits rounded up to nearest whole byte). Pad extra bits
|
|
|
|
* in mask with 0's.
|
|
|
|
*
|
2015-06-01 14:56:07 +10:00
|
|
|
* Setting `big_bm = NULL` disables the large version of the cursor.
|
2012-03-09 18:28:30 +00:00
|
|
|
*
|
2015-06-01 14:56:07 +10:00
|
|
|
* ----
|
2012-03-09 18:28:30 +00:00
|
|
|
*
|
|
|
|
* There is a nice Python GUI utility that can be used for drawing cursors in
|
|
|
|
* this format in the Blender source distribution, in
|
2015-06-01 14:56:07 +10:00
|
|
|
* `./source/tools/utils/make_cursor_gui.py` .
|
2012-03-09 18:28:30 +00:00
|
|
|
*
|
2015-06-01 14:56:07 +10:00
|
|
|
* Start it with the command `python3 make_cursor_gui.py`
|
|
|
|
* It will copy its output to the console when you press 'Do it'.
|
2012-03-09 18:28:30 +00:00
|
|
|
*/
|
2003-12-26 20:12:42 +00:00
|
|
|
|
2015-06-01 14:56:07 +10:00
|
|
|
/**
|
|
|
|
* Because defining a cursor mixes declarations and executable code
|
2012-03-09 18:28:30 +00:00
|
|
|
* each cursor needs it's own scoping block or it would be split up
|
|
|
|
* over several hundred lines of code. To enforce/document this better
|
2012-10-20 20:36:51 +00:00
|
|
|
* I define 2 pretty brain-dead macros so it's obvious what the extra "[]"
|
2012-03-09 18:28:30 +00:00
|
|
|
* are for */
|
2003-12-26 20:12:42 +00:00
|
|
|
|
|
|
|
#define BEGIN_CURSOR_BLOCK {
|
|
|
|
#define END_CURSOR_BLOCK }
|
|
|
|
|
2011-09-28 05:53:40 +00:00
|
|
|
void wm_init_cursor_data(void)
|
|
|
|
{
|
2003-12-26 20:12:42 +00:00
|
|
|
/********************** NW_ARROW Cursor **************************/
|
|
|
|
BEGIN_CURSOR_BLOCK
|
2012-03-27 01:24:16 +00:00
|
|
|
static char nw_sbm[] = {
|
|
|
|
0x03, 0x00, 0x05, 0x00, 0x09, 0x00, 0x11, 0x00,
|
|
|
|
0x21, 0x00, 0x41, 0x00, 0x81, 0x00, 0x01, 0x01,
|
|
|
|
0x01, 0x02, 0xc1, 0x03, 0x49, 0x00, 0x8d, 0x00,
|
|
|
|
0x8b, 0x00, 0x10, 0x01, 0x90, 0x01, 0x60, 0x00,
|
|
|
|
};
|
|
|
|
|
|
|
|
static char nw_smsk[] = {
|
|
|
|
0x03, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x1f, 0x00,
|
|
|
|
0x3f, 0x00, 0x7f, 0x00, 0xff, 0x00, 0xff, 0x01,
|
|
|
|
0xff, 0x03, 0xff, 0x03, 0x7f, 0x00, 0xff, 0x00,
|
|
|
|
0xfb, 0x00, 0xf0, 0x01, 0xf0, 0x01, 0x60, 0x00,
|
|
|
|
};
|
|
|
|
|
|
|
|
static BCursor NWArrowCursor = {
|
|
|
|
/*small*/
|
|
|
|
nw_sbm, nw_smsk,
|
|
|
|
16, 16,
|
|
|
|
6, 7,
|
|
|
|
/*big*/
|
|
|
|
NULL, NULL,
|
|
|
|
32, 32,
|
|
|
|
15, 15,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_BLACK, BC_WHITE,
|
2012-03-27 01:24:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
BlenderCursor[BC_NW_ARROWCURSOR] = &NWArrowCursor;
|
2003-12-26 20:12:42 +00:00
|
|
|
END_CURSOR_BLOCK
|
|
|
|
|
|
|
|
///********************** NS_ARROW Cursor *************************/
|
|
|
|
BEGIN_CURSOR_BLOCK
|
2012-03-27 01:24:16 +00:00
|
|
|
static char ns_sbm[] = {
|
|
|
|
0x40, 0x01, 0x20, 0x02, 0x10, 0x04, 0x08, 0x08,
|
|
|
|
0x04, 0x10, 0x3c, 0x1e, 0x20, 0x02, 0x20, 0x02,
|
|
|
|
0x20, 0x02, 0x20, 0x02, 0x3c, 0x1e, 0x04, 0x10,
|
2019-02-03 14:01:45 +11:00
|
|
|
0x08, 0x08, 0x10, 0x04, 0x20, 0x02, 0x40, 0x01,
|
2012-03-27 01:24:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static char ns_smsk[] = {
|
|
|
|
0xc0, 0x01, 0xe0, 0x03, 0xf0, 0x07, 0xf8, 0x0f,
|
|
|
|
0xfc, 0x1f, 0xfc, 0x1f, 0xe0, 0x03, 0xe0, 0x03,
|
|
|
|
0xe0, 0x03, 0xe0, 0x03, 0xfc, 0x1f, 0xfc, 0x1f,
|
2019-02-03 14:01:45 +11:00
|
|
|
0xf8, 0x0f, 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01,
|
2012-03-27 01:24:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static BCursor NSArrowCursor = {
|
|
|
|
/*small*/
|
|
|
|
ns_sbm, ns_smsk,
|
|
|
|
16, 16,
|
|
|
|
6, 7,
|
|
|
|
/*big*/
|
|
|
|
NULL, NULL,
|
|
|
|
32, 32,
|
|
|
|
15, 15,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_BLACK, BC_WHITE,
|
2012-03-27 01:24:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
BlenderCursor[BC_NS_ARROWCURSOR] = &NSArrowCursor;
|
2018-06-07 16:43:52 +02:00
|
|
|
|
2003-12-26 20:12:42 +00:00
|
|
|
END_CURSOR_BLOCK
|
|
|
|
/********************** EW_ARROW Cursor *************************/
|
|
|
|
BEGIN_CURSOR_BLOCK
|
2012-03-27 01:24:16 +00:00
|
|
|
static char ew_sbm[] = {
|
2003-12-26 20:12:42 +00:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x38, 0x1c,
|
|
|
|
0x2c, 0x34, 0xe6, 0x67, 0x03, 0xc0, 0x01, 0x80,
|
|
|
|
0x03, 0xc0, 0xe6, 0x67, 0x2c, 0x34, 0x38, 0x1c,
|
|
|
|
0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char ew_smsk[] = {
|
2003-12-26 20:12:42 +00:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x38, 0x1c,
|
2009-06-17 19:46:39 +00:00
|
|
|
0x3c, 0x3c, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff,
|
2003-12-26 20:12:42 +00:00
|
|
|
0xff, 0xff, 0xfe, 0x7f, 0x3c, 0x3c, 0x38, 0x1c,
|
|
|
|
0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
};
|
|
|
|
|
|
|
|
static BCursor EWArrowCursor = {
|
|
|
|
/*small*/
|
|
|
|
ew_sbm, ew_smsk,
|
2018-06-07 16:43:52 +02:00
|
|
|
16, 16,
|
2003-12-26 20:12:42 +00:00
|
|
|
7, 6,
|
|
|
|
/*big*/
|
|
|
|
NULL, NULL,
|
2012-03-27 01:24:16 +00:00
|
|
|
32, 32,
|
2003-12-26 20:12:42 +00:00
|
|
|
15, 15,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_BLACK, BC_WHITE,
|
2003-12-26 20:12:42 +00:00
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
BlenderCursor[BC_EW_ARROWCURSOR] = &EWArrowCursor;
|
2003-12-26 20:12:42 +00:00
|
|
|
END_CURSOR_BLOCK
|
|
|
|
|
|
|
|
/********************** Wait Cursor *****************************/
|
|
|
|
BEGIN_CURSOR_BLOCK
|
2012-03-27 01:24:16 +00:00
|
|
|
static char wait_sbm[] = {
|
2003-12-26 20:12:42 +00:00
|
|
|
0xfe, 0x7f, 0x02, 0x40, 0x02, 0x40, 0x84, 0x21,
|
|
|
|
0xc8, 0x13, 0xd0, 0x0b, 0xa0, 0x04, 0x20, 0x05,
|
|
|
|
0xa0, 0x04, 0x10, 0x09, 0x88, 0x11, 0xc4, 0x23,
|
|
|
|
0xe2, 0x47, 0xfa, 0x5f, 0x02, 0x40, 0xfe, 0x7f,
|
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char wait_smsk[] = {
|
2003-12-26 20:12:42 +00:00
|
|
|
0xfe, 0x7f, 0xfe, 0x7f, 0x06, 0x60, 0x8c, 0x31,
|
|
|
|
0xd8, 0x1b, 0xf0, 0x0f, 0xe0, 0x06, 0x60, 0x07,
|
|
|
|
0xe0, 0x06, 0x30, 0x0d, 0x98, 0x19, 0xcc, 0x33,
|
|
|
|
0xe6, 0x67, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f,
|
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char wait_lbm[] = {
|
2003-12-26 20:12:42 +00:00
|
|
|
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
|
|
|
|
0x0c, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x30,
|
|
|
|
0x0c, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x18,
|
|
|
|
0x18, 0xc0, 0x03, 0x0c, 0x30, 0x20, 0x07, 0x06,
|
|
|
|
0x60, 0xf0, 0x0f, 0x03, 0xc0, 0xd0, 0x8d, 0x01,
|
|
|
|
0x80, 0x79, 0xcf, 0x00, 0x00, 0xf3, 0x67, 0x00,
|
|
|
|
0x00, 0x66, 0x37, 0x00, 0x00, 0x8c, 0x33, 0x00,
|
|
|
|
0x00, 0x0c, 0x32, 0x00, 0x00, 0xcc, 0x33, 0x00,
|
|
|
|
0x00, 0x8c, 0x30, 0x00, 0x00, 0x46, 0x61, 0x00,
|
|
|
|
0x00, 0x03, 0xc3, 0x00, 0x80, 0x01, 0x83, 0x01,
|
|
|
|
0xc0, 0xc0, 0x03, 0x03, 0x60, 0xa0, 0x05, 0x06,
|
|
|
|
0x30, 0xf0, 0x0f, 0x0c, 0x18, 0xf8, 0x1d, 0x18,
|
|
|
|
0x0c, 0x5c, 0x3f, 0x30, 0x0c, 0xff, 0x5f, 0x30,
|
|
|
|
0x0c, 0xf7, 0xfe, 0x31, 0xcc, 0xfb, 0x9f, 0x33,
|
|
|
|
0x0c, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x30,
|
|
|
|
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
|
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char wait_lmsk[] = {
|
2003-12-26 20:12:42 +00:00
|
|
|
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
|
|
|
|
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
|
|
|
|
0x3c, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 0x1e,
|
|
|
|
0x78, 0xc0, 0x03, 0x0f, 0xf0, 0xa0, 0x87, 0x07,
|
|
|
|
0xe0, 0xf1, 0xcf, 0x03, 0xc0, 0xf3, 0xef, 0x01,
|
|
|
|
0x80, 0xff, 0xff, 0x00, 0x00, 0xff, 0x7f, 0x00,
|
|
|
|
0x00, 0xfe, 0x3f, 0x00, 0x00, 0xfc, 0x3f, 0x00,
|
|
|
|
0x00, 0x3c, 0x3f, 0x00, 0x00, 0xfc, 0x3f, 0x00,
|
|
|
|
0x00, 0xbc, 0x3c, 0x00, 0x00, 0xde, 0x79, 0x00,
|
|
|
|
0x00, 0x0f, 0xf3, 0x00, 0x80, 0x07, 0xe3, 0x01,
|
|
|
|
0xc0, 0xc3, 0xc3, 0x03, 0xe0, 0xe1, 0x87, 0x07,
|
|
|
|
0xf0, 0xf0, 0x0f, 0x0f, 0x78, 0xf8, 0x1f, 0x1e,
|
|
|
|
0x3c, 0x7c, 0x3f, 0x3c, 0x3c, 0xff, 0x7f, 0x3c,
|
|
|
|
0xbc, 0xff, 0xff, 0x3d, 0xfc, 0xfb, 0xbf, 0x3f,
|
|
|
|
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
|
|
|
|
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
|
|
|
|
};
|
|
|
|
|
|
|
|
static BCursor WaitCursor = {
|
|
|
|
/*small*/
|
2012-03-27 01:24:16 +00:00
|
|
|
wait_sbm, wait_smsk,
|
2018-06-07 16:43:52 +02:00
|
|
|
16, 16,
|
2003-12-26 20:12:42 +00:00
|
|
|
7, 7,
|
|
|
|
/*big*/
|
|
|
|
wait_lbm, wait_lmsk,
|
2012-03-27 01:24:16 +00:00
|
|
|
32, 32,
|
2003-12-26 20:12:42 +00:00
|
|
|
15, 15,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_BLACK, BC_WHITE,
|
2003-12-26 20:12:42 +00:00
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
BlenderCursor[BC_WAITCURSOR] = &WaitCursor;
|
2003-12-26 20:12:42 +00:00
|
|
|
END_CURSOR_BLOCK
|
|
|
|
|
|
|
|
/********************** Cross Cursor ***************************/
|
|
|
|
BEGIN_CURSOR_BLOCK
|
2012-03-27 01:24:16 +00:00
|
|
|
static char cross_sbm[] = {
|
2003-12-26 20:12:42 +00:00
|
|
|
0x00, 0x00, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
|
|
|
|
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x7e, 0x7e,
|
|
|
|
0x7e, 0x7e, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
|
|
|
|
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x00, 0x00,
|
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char cross_smsk[] = {
|
2003-12-26 20:12:42 +00:00
|
|
|
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
|
|
|
|
0x80, 0x01, 0x80, 0x01, 0xc0, 0x03, 0x7f, 0xfe,
|
|
|
|
0x7f, 0xfe, 0xc0, 0x03, 0x80, 0x01, 0x80, 0x01,
|
|
|
|
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
|
|
|
|
};
|
2012-03-27 01:24:16 +00:00
|
|
|
static char cross_lbm[] = {
|
2003-12-26 20:12:42 +00:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00,
|
|
|
|
0x00, 0xc0, 0x03, 0x00, 0x00, 0x40, 0x02, 0x00,
|
|
|
|
0x00, 0x78, 0x1e, 0x00, 0xfc, 0x1f, 0xf8, 0x3f,
|
|
|
|
0xfc, 0x1f, 0xf8, 0x3f, 0x00, 0x78, 0x1e, 0x00,
|
|
|
|
0x00, 0x40, 0x02, 0x00, 0x00, 0xc0, 0x03, 0x00,
|
|
|
|
0x00, 0xc0, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char cross_lmsk[] = {
|
2003-12-26 20:12:42 +00:00
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00,
|
|
|
|
0x00, 0xe0, 0x07, 0x00, 0x00, 0x70, 0x0e, 0x00,
|
|
|
|
0x00, 0x78, 0x1e, 0x00, 0xff, 0x1f, 0xf8, 0xff,
|
|
|
|
0xff, 0x1f, 0xf8, 0xff, 0x00, 0x78, 0x1e, 0x00,
|
|
|
|
0x00, 0x70, 0x0e, 0x00, 0x00, 0xe0, 0x07, 0x00,
|
|
|
|
0x00, 0xc0, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
|
|
|
|
};
|
|
|
|
|
|
|
|
static BCursor CrossCursor = {
|
|
|
|
/*small*/
|
|
|
|
cross_sbm, cross_smsk,
|
2018-06-07 16:43:52 +02:00
|
|
|
16, 16,
|
2003-12-26 20:12:42 +00:00
|
|
|
7, 7,
|
|
|
|
/*big*/
|
|
|
|
cross_lbm, cross_lmsk,
|
2012-03-27 01:24:16 +00:00
|
|
|
32, 32,
|
2003-12-26 20:12:42 +00:00
|
|
|
15, 15,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_BLACK, BC_WHITE,
|
2003-12-26 20:12:42 +00:00
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
BlenderCursor[BC_CROSSCURSOR] = &CrossCursor;
|
2003-12-26 20:12:42 +00:00
|
|
|
END_CURSOR_BLOCK
|
|
|
|
|
2012-10-21 05:46:41 +00:00
|
|
|
/********************** EditCross Cursor ***********************/
|
2003-12-26 20:12:42 +00:00
|
|
|
BEGIN_CURSOR_BLOCK
|
2012-03-27 01:24:16 +00:00
|
|
|
static char editcross_sbm[] = {
|
2003-12-26 20:12:42 +00:00
|
|
|
0x0e, 0x00, 0x11, 0x00, 0x1d, 0x00, 0x19, 0x03,
|
|
|
|
0x1d, 0x03, 0x11, 0x03, 0x0e, 0x03, 0x00, 0x03,
|
|
|
|
0xf8, 0x7c, 0xf8, 0x7c, 0x00, 0x03, 0x00, 0x03,
|
|
|
|
0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00,
|
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char editcross_smsk[] = {
|
2003-12-26 20:12:42 +00:00
|
|
|
0x0e, 0x00, 0x1f, 0x00, 0x1f, 0x03, 0x1f, 0x03,
|
|
|
|
0x1f, 0x03, 0x1f, 0x03, 0x0e, 0x03, 0x80, 0x07,
|
|
|
|
0xfc, 0xfc, 0xfc, 0xfc, 0x80, 0x07, 0x00, 0x03,
|
|
|
|
0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03,
|
|
|
|
};
|
|
|
|
|
|
|
|
static BCursor EditCrossCursor = {
|
|
|
|
/*small*/
|
|
|
|
editcross_sbm, editcross_smsk,
|
2018-06-07 16:43:52 +02:00
|
|
|
16, 16,
|
2003-12-26 20:12:42 +00:00
|
|
|
9, 8,
|
|
|
|
/*big*/
|
|
|
|
NULL, NULL,
|
2012-03-27 01:24:16 +00:00
|
|
|
32, 32,
|
2003-12-26 20:12:42 +00:00
|
|
|
15, 15,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_BLACK, BC_WHITE,
|
2003-12-26 20:12:42 +00:00
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
BlenderCursor[BC_EDITCROSSCURSOR] = &EditCrossCursor;
|
2003-12-26 20:12:42 +00:00
|
|
|
END_CURSOR_BLOCK
|
|
|
|
|
|
|
|
/********************** Box Select *************************/
|
|
|
|
BEGIN_CURSOR_BLOCK
|
2012-03-27 01:24:16 +00:00
|
|
|
static char box_sbm[32] = {
|
|
|
|
0x7f, 0x00, 0x41, 0x00, 0x41, 0x00, 0x41, 0x06,
|
2003-12-26 20:12:42 +00:00
|
|
|
0x41, 0x06, 0x41, 0x06, 0x7f, 0x06, 0x00, 0x06,
|
|
|
|
0xe0, 0x79, 0xe0, 0x79, 0x00, 0x06, 0x00, 0x06,
|
|
|
|
0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00,
|
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char box_smsk[32] = {
|
|
|
|
0x7f, 0x00, 0x7f, 0x00, 0x63, 0x06, 0x63, 0x06,
|
2003-12-26 20:12:42 +00:00
|
|
|
0x63, 0x06, 0x7f, 0x06, 0x7f, 0x06, 0x00, 0x0f,
|
|
|
|
0xf0, 0xf9, 0xf0, 0xf9, 0x00, 0x0f, 0x00, 0x06,
|
|
|
|
0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06,
|
|
|
|
};
|
|
|
|
|
|
|
|
static BCursor BoxSelCursor = {
|
|
|
|
/*small*/
|
|
|
|
box_sbm, box_smsk,
|
2018-06-07 16:43:52 +02:00
|
|
|
16, 16,
|
2003-12-26 20:12:42 +00:00
|
|
|
9, 8,
|
|
|
|
/*big*/
|
|
|
|
NULL, NULL,
|
2012-03-27 01:24:16 +00:00
|
|
|
32, 32,
|
2003-12-26 20:12:42 +00:00
|
|
|
15, 15,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_BLACK, BC_WHITE,
|
2003-12-26 20:12:42 +00:00
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
BlenderCursor[BC_BOXSELCURSOR] = &BoxSelCursor;
|
2003-12-26 20:12:42 +00:00
|
|
|
|
|
|
|
END_CURSOR_BLOCK
|
|
|
|
/********************** Knife Cursor ***********************/
|
|
|
|
BEGIN_CURSOR_BLOCK
|
2012-03-27 01:24:16 +00:00
|
|
|
static char knife_sbm[] = {
|
2003-12-26 20:12:42 +00:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x2c,
|
|
|
|
0x00, 0x5a, 0x00, 0x34, 0x00, 0x2a, 0x00, 0x17,
|
|
|
|
0x80, 0x06, 0x40, 0x03, 0xa0, 0x03, 0xd0, 0x01,
|
2019-02-03 14:01:45 +11:00
|
|
|
0x68, 0x00, 0x1c, 0x00, 0x06, 0x00, 0x00, 0x00,
|
2003-12-26 20:12:42 +00:00
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char knife_smsk[] = {
|
2003-12-26 20:12:42 +00:00
|
|
|
0x00, 0x60, 0x00, 0xf0, 0x00, 0xfc, 0x00, 0xfe,
|
|
|
|
0x00, 0xfe, 0x00, 0x7e, 0x00, 0x7f, 0x80, 0x3f,
|
|
|
|
0xc0, 0x0e, 0x60, 0x07, 0xb0, 0x07, 0xd8, 0x03,
|
2019-02-03 14:01:45 +11:00
|
|
|
0xec, 0x01, 0x7e, 0x00, 0x1f, 0x00, 0x07, 0x00,
|
2003-12-26 20:12:42 +00:00
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char knife_lbm[] = {
|
2003-12-26 20:12:42 +00:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1c,
|
|
|
|
0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x7f,
|
|
|
|
0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0xc0, 0x5f,
|
|
|
|
0x00, 0x00, 0xc0, 0x6f, 0x00, 0x00, 0xc0, 0x37,
|
|
|
|
0x00, 0x00, 0xa8, 0x1b, 0x00, 0x00, 0x54, 0x0d,
|
|
|
|
0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x54, 0x00,
|
|
|
|
0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x53, 0x00,
|
|
|
|
0x00, 0xc0, 0x07, 0x00, 0x00, 0xe0, 0x0f, 0x00,
|
|
|
|
0x00, 0xd0, 0x0f, 0x00, 0x00, 0xe8, 0x07, 0x00,
|
|
|
|
0x00, 0xf4, 0x07, 0x00, 0x00, 0xfa, 0x00, 0x00,
|
|
|
|
0x00, 0x3d, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00,
|
|
|
|
0xc0, 0x03, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00,
|
|
|
|
0x30, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char knife_lmsk[] = {
|
2003-12-26 20:12:42 +00:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x7e,
|
|
|
|
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x80, 0xff,
|
|
|
|
0x00, 0x00, 0xc0, 0xbf, 0x00, 0x00, 0xe0, 0xdf,
|
|
|
|
0x00, 0x00, 0xe0, 0xef, 0x00, 0x00, 0xf8, 0x77,
|
|
|
|
0x00, 0x00, 0xfc, 0x3b, 0x00, 0x00, 0xfe, 0x1d,
|
|
|
|
0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0xfe, 0x01,
|
|
|
|
0x00, 0x00, 0xff, 0x01, 0x00, 0xc0, 0xff, 0x00,
|
|
|
|
0x00, 0xe0, 0x7f, 0x00, 0x00, 0xf0, 0x1f, 0x00,
|
|
|
|
0x00, 0xd8, 0x1f, 0x00, 0x00, 0xec, 0x0f, 0x00,
|
|
|
|
0x00, 0xf6, 0x0f, 0x00, 0x00, 0xfb, 0x06, 0x00,
|
|
|
|
0x80, 0xbd, 0x01, 0x00, 0xc0, 0x6e, 0x00, 0x00,
|
|
|
|
0xe0, 0x1b, 0x00, 0x00, 0xf0, 0x06, 0x00, 0x00,
|
|
|
|
0xb8, 0x01, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
|
|
|
|
0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
};
|
|
|
|
|
|
|
|
static BCursor KnifeCursor = {
|
|
|
|
/*small*/
|
2012-03-27 01:24:16 +00:00
|
|
|
knife_sbm, knife_smsk,
|
2018-06-07 16:43:52 +02:00
|
|
|
16, 16,
|
2003-12-26 20:12:42 +00:00
|
|
|
0, 15,
|
|
|
|
/*big*/
|
|
|
|
knife_lbm, knife_lmsk,
|
2012-03-27 01:24:16 +00:00
|
|
|
32, 32,
|
2003-12-26 20:12:42 +00:00
|
|
|
0, 31,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_BLACK, BC_WHITE,
|
2003-12-26 20:12:42 +00:00
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
BlenderCursor[BC_KNIFECURSOR] = &KnifeCursor;
|
2003-12-26 20:12:42 +00:00
|
|
|
|
|
|
|
END_CURSOR_BLOCK
|
2018-06-07 16:43:52 +02:00
|
|
|
|
2004-03-08 02:49:50 +00:00
|
|
|
/********************** Loop Select Cursor ***********************/
|
|
|
|
BEGIN_CURSOR_BLOCK
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char vloop_sbm[] = {
|
2010-03-22 09:30:00 +00:00
|
|
|
0x00, 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x1e, 0x00,
|
|
|
|
0x0e, 0x00, 0x66, 0x60, 0x62, 0x6f, 0x00, 0x00,
|
|
|
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
|
|
|
0x00, 0x00, 0x60, 0x60, 0x60, 0x6f, 0x00, 0x00,
|
2012-03-27 01:24:16 +00:00
|
|
|
};
|
2004-03-08 02:49:50 +00:00
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char vloop_smsk[] = {
|
2010-03-22 09:30:00 +00:00
|
|
|
0xff, 0x01, 0xff, 0x00, 0x7f, 0x00, 0x3f, 0x00,
|
|
|
|
0xff, 0xf0, 0xff, 0xff, 0xf7, 0xff, 0xf3, 0xf0,
|
|
|
|
0x61, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
|
|
|
|
0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xf0,
|
2012-03-27 01:24:16 +00:00
|
|
|
};
|
2004-03-08 02:49:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char vloop_lbm[] = {
|
2010-03-22 09:30:00 +00:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0xfc, 0x3f, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00,
|
|
|
|
0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00,
|
|
|
|
0xfc, 0x03, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00,
|
|
|
|
0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00,
|
|
|
|
0x3c, 0x3c, 0x00, 0x3c, 0x3c, 0x3c, 0x00, 0x3c,
|
|
|
|
0x0c, 0x3c, 0xff, 0x3c, 0x0c, 0x3c, 0xff, 0x3c,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c,
|
|
|
|
0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c,
|
|
|
|
0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c,
|
|
|
|
0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3c,
|
|
|
|
0x00, 0x3c, 0xff, 0x3c, 0x00, 0x3c, 0xff, 0x3c,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2012-03-27 01:24:16 +00:00
|
|
|
};
|
2004-03-08 02:49:50 +00:00
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char vloop_lmsk[] = {
|
2010-03-22 09:30:00 +00:00
|
|
|
0xff, 0xff, 0x03, 0x00, 0xff, 0xff, 0x03, 0x00,
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
|
|
|
|
0xff, 0x3f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00,
|
|
|
|
0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00,
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff,
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
|
|
0x3f, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff,
|
|
|
|
0x0f, 0xff, 0x00, 0xff, 0x0f, 0xff, 0x00, 0xff,
|
|
|
|
0x03, 0x3c, 0x00, 0x3c, 0x03, 0x3c, 0x00, 0x3c,
|
|
|
|
0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3c,
|
|
|
|
0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3c,
|
|
|
|
0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3c,
|
|
|
|
0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff,
|
|
|
|
0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff,
|
|
|
|
0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff,
|
|
|
|
0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff,
|
2012-03-27 01:24:16 +00:00
|
|
|
};
|
2004-03-08 02:49:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static BCursor VLoopCursor = {
|
|
|
|
/*small*/
|
2012-03-27 01:24:16 +00:00
|
|
|
vloop_sbm, vloop_smsk,
|
2018-06-07 16:43:52 +02:00
|
|
|
16, 16,
|
2004-03-08 02:49:50 +00:00
|
|
|
0, 0,
|
|
|
|
/*big*/
|
|
|
|
vloop_lbm, vloop_lmsk,
|
2012-03-27 01:24:16 +00:00
|
|
|
32, 32,
|
2004-03-08 02:49:50 +00:00
|
|
|
0, 0,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_BLACK, BC_WHITE,
|
2004-03-08 02:49:50 +00:00
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
BlenderCursor[BC_VLOOPCURSOR] = &VLoopCursor;
|
2004-03-08 02:49:50 +00:00
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
END_CURSOR_BLOCK
|
2018-06-07 16:43:52 +02:00
|
|
|
|
2006-01-29 22:25:53 +00:00
|
|
|
|
2012-10-21 05:46:41 +00:00
|
|
|
/********************** TextEdit Cursor ***********************/
|
2006-01-29 22:25:53 +00:00
|
|
|
BEGIN_CURSOR_BLOCK
|
2012-03-27 01:24:16 +00:00
|
|
|
static char textedit_sbm[] = {
|
2006-01-29 22:25:53 +00:00
|
|
|
0xe0, 0x03, 0x10, 0x04, 0x60, 0x03, 0x40, 0x01,
|
|
|
|
0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01,
|
|
|
|
0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01,
|
|
|
|
0x40, 0x01, 0x60, 0x03, 0x10, 0x04, 0xe0, 0x03,
|
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char textedit_smsk[] = {
|
2006-01-29 22:25:53 +00:00
|
|
|
0xe0, 0x03, 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01,
|
|
|
|
0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
|
|
|
|
0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
|
|
|
|
0xc0, 0x01, 0xe0, 0x03, 0xf0, 0x07, 0xe0, 0x03,
|
|
|
|
};
|
|
|
|
|
|
|
|
static BCursor TextEditCursor = {
|
|
|
|
/*small*/
|
|
|
|
textedit_sbm, textedit_smsk,
|
2018-06-07 16:43:52 +02:00
|
|
|
16, 16,
|
2006-01-29 22:25:53 +00:00
|
|
|
9, 8,
|
|
|
|
/*big*/
|
|
|
|
NULL, NULL,
|
2012-03-27 01:24:16 +00:00
|
|
|
32, 32,
|
2006-01-29 22:25:53 +00:00
|
|
|
15, 15,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_BLACK, BC_WHITE,
|
2006-01-29 22:25:53 +00:00
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
BlenderCursor[BC_TEXTEDITCURSOR] = &TextEditCursor;
|
2006-01-29 22:25:53 +00:00
|
|
|
END_CURSOR_BLOCK
|
|
|
|
|
|
|
|
|
2012-10-21 05:46:41 +00:00
|
|
|
/********************** Paintbrush Cursor ***********************/
|
2006-01-29 22:25:53 +00:00
|
|
|
BEGIN_CURSOR_BLOCK
|
2012-03-27 01:24:16 +00:00
|
|
|
static char paintbrush_sbm[] = {
|
2006-01-29 22:25:53 +00:00
|
|
|
|
|
|
|
0x00, 0xe0, 0x00, 0x98, 0x00, 0x44, 0x00, 0x42,
|
|
|
|
0x00, 0x21, 0x80, 0x20, 0x40, 0x13, 0x40, 0x17,
|
|
|
|
0xa0, 0x0b, 0x98, 0x05, 0x04, 0x02, 0x02, 0x01,
|
|
|
|
0x02, 0x01, 0x02, 0x01, 0x81, 0x00, 0x7f, 0x00,
|
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char paintbrush_smsk[] = {
|
2006-01-29 22:25:53 +00:00
|
|
|
0x00, 0xe0, 0x00, 0xf8, 0x00, 0x7c, 0x00, 0x7e,
|
|
|
|
0x00, 0x3f, 0x80, 0x3f, 0xc0, 0x1f, 0xc0, 0x1f,
|
|
|
|
0xe0, 0x0f, 0xf8, 0x07, 0xfc, 0x03, 0xfe, 0x01,
|
|
|
|
0xfe, 0x01, 0xfe, 0x01, 0xff, 0x00, 0x7f, 0x00,
|
|
|
|
};
|
|
|
|
|
|
|
|
static BCursor PaintBrushCursor = {
|
|
|
|
/*small*/
|
|
|
|
paintbrush_sbm, paintbrush_smsk,
|
2018-06-07 16:43:52 +02:00
|
|
|
16, 16,
|
2006-02-23 04:38:33 +00:00
|
|
|
0, 15,
|
2006-01-29 22:25:53 +00:00
|
|
|
/*big*/
|
|
|
|
NULL, NULL,
|
2012-03-27 01:24:16 +00:00
|
|
|
32, 32,
|
2006-01-29 22:25:53 +00:00
|
|
|
15, 15,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_BLACK, BC_WHITE,
|
2006-01-29 22:25:53 +00:00
|
|
|
};
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
BlenderCursor[BC_PAINTBRUSHCURSOR] = &PaintBrushCursor;
|
2006-01-29 22:25:53 +00:00
|
|
|
END_CURSOR_BLOCK
|
|
|
|
|
2006-06-15 14:22:59 +00:00
|
|
|
|
|
|
|
/********************** Hand Cursor ***********************/
|
|
|
|
BEGIN_CURSOR_BLOCK
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char hand_sbm[] = {
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x80, 0x0d,
|
|
|
|
0x98, 0x6d, 0x98, 0x6d, 0xb0, 0x6d, 0xb0, 0x6d,
|
|
|
|
0xe0, 0x6f, 0xe6, 0x7f, 0xee, 0x7f, 0xfc, 0x3f,
|
|
|
|
0xf8, 0x3f, 0xf0, 0x1f, 0xc0, 0x1f, 0xc0, 0x1f,
|
|
|
|
};
|
|
|
|
|
|
|
|
static char hand_smsk[] = {
|
|
|
|
0x00, 0x00, 0x80, 0x01, 0xc0, 0x0f, 0xd8, 0x7f,
|
|
|
|
0xfc, 0xff, 0xfc, 0xff, 0xf8, 0xff, 0xf8, 0xff,
|
|
|
|
0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f,
|
|
|
|
0xfc, 0x7f, 0xf8, 0x3f, 0xf0, 0x3f, 0xe0, 0x3f,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static BCursor HandCursor = {
|
|
|
|
/*small*/
|
|
|
|
hand_sbm, hand_smsk,
|
|
|
|
16, 16,
|
|
|
|
8, 8,
|
|
|
|
/*big*/
|
|
|
|
NULL, NULL,
|
|
|
|
32, 32,
|
|
|
|
15, 15,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_BLACK, BC_WHITE,
|
2012-03-27 01:24:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
BlenderCursor[BC_HANDCURSOR] = &HandCursor;
|
2006-06-15 14:22:59 +00:00
|
|
|
|
|
|
|
END_CURSOR_BLOCK
|
|
|
|
|
|
|
|
/********************** NSEW Scroll Cursor ***********************/
|
|
|
|
BEGIN_CURSOR_BLOCK
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char nsewscroll_sbm[] = {
|
|
|
|
0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xc0, 0x03,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x0e, 0x70,
|
|
|
|
0x0e, 0x70, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0xc0, 0x03, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00,
|
|
|
|
};
|
|
|
|
|
|
|
|
static char nsewscroll_smsk[] = {
|
|
|
|
0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xe0, 0x07,
|
|
|
|
0xc0, 0x03, 0x0c, 0x30, 0x1e, 0x78, 0x1f, 0xf8,
|
|
|
|
0x1f, 0xf8, 0x1e, 0x78, 0x0c, 0x30, 0xc0, 0x03,
|
|
|
|
0xe0, 0x07, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static BCursor NSEWScrollCursor = {
|
|
|
|
/*small*/
|
|
|
|
nsewscroll_sbm, nsewscroll_smsk,
|
|
|
|
16, 16,
|
|
|
|
8, 8,
|
|
|
|
/*big*/
|
|
|
|
NULL, NULL,
|
|
|
|
32, 32,
|
|
|
|
15, 15,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_BLACK, BC_WHITE,
|
2012-03-27 01:24:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
BlenderCursor[BC_NSEW_SCROLLCURSOR] = &NSEWScrollCursor;
|
2006-06-15 14:22:59 +00:00
|
|
|
|
|
|
|
END_CURSOR_BLOCK
|
|
|
|
|
|
|
|
|
|
|
|
/********************** NS Scroll Cursor ***********************/
|
|
|
|
BEGIN_CURSOR_BLOCK
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char nsscroll_sbm[] = {
|
|
|
|
0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xc0, 0x03,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0xc0, 0x03, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00,
|
|
|
|
};
|
|
|
|
|
|
|
|
static char nsscroll_smsk[] = {
|
|
|
|
0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xe0, 0x07,
|
|
|
|
0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03,
|
|
|
|
0xe0, 0x07, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static BCursor NSScrollCursor = {
|
|
|
|
/*small*/
|
|
|
|
nsscroll_sbm, nsscroll_smsk,
|
|
|
|
16, 16,
|
|
|
|
8, 8,
|
|
|
|
/*big*/
|
|
|
|
NULL, NULL,
|
|
|
|
32, 32,
|
|
|
|
15, 15,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_BLACK, BC_WHITE,
|
2012-03-27 01:24:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
BlenderCursor[BC_NS_SCROLLCURSOR] = &NSScrollCursor;
|
2006-06-15 14:22:59 +00:00
|
|
|
|
|
|
|
END_CURSOR_BLOCK
|
|
|
|
|
|
|
|
|
|
|
|
/********************** EW Scroll Cursor ***********************/
|
|
|
|
BEGIN_CURSOR_BLOCK
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char ewscroll_sbm[] = {
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x0e, 0x70,
|
|
|
|
0x0e, 0x70, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
};
|
|
|
|
|
|
|
|
static char ewscroll_smsk[] = {
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x0c, 0x30, 0x1e, 0x78, 0x1f, 0xf8,
|
|
|
|
0x1f, 0xf8, 0x1e, 0x78, 0x0c, 0x30, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static BCursor EWScrollCursor = {
|
|
|
|
/*small*/
|
|
|
|
ewscroll_sbm, ewscroll_smsk,
|
|
|
|
16, 16,
|
|
|
|
8, 8,
|
|
|
|
/*big*/
|
|
|
|
NULL, NULL,
|
|
|
|
32, 32,
|
|
|
|
15, 15,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_BLACK, BC_WHITE,
|
2012-03-27 01:24:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
BlenderCursor[BC_EW_SCROLLCURSOR] = &EWScrollCursor;
|
2006-06-15 14:22:59 +00:00
|
|
|
|
|
|
|
END_CURSOR_BLOCK
|
|
|
|
|
|
|
|
/********************** Eyedropper Cursor ***********************/
|
|
|
|
BEGIN_CURSOR_BLOCK
|
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char eyedropper_sbm[] = {
|
|
|
|
0x00, 0x30, 0x00, 0x48, 0x00, 0x85, 0x80, 0x82,
|
|
|
|
0x40, 0x40, 0x80, 0x20, 0x40, 0x11, 0xa0, 0x23,
|
|
|
|
0xd0, 0x15, 0xe8, 0x0a, 0x74, 0x01, 0xb4, 0x00,
|
|
|
|
0x4a, 0x00, 0x35, 0x00, 0x08, 0x00, 0x04, 0x00,
|
|
|
|
};
|
|
|
|
|
|
|
|
static char eyedropper_smsk[] = {
|
|
|
|
0x00, 0x30, 0x00, 0x78, 0x00, 0xfd, 0x80, 0xff,
|
|
|
|
0xc0, 0x7f, 0x80, 0x3f, 0xc0, 0x1f, 0xe0, 0x3f,
|
|
|
|
0xf0, 0x1f, 0xf8, 0x0b, 0xfc, 0x01, 0xfc, 0x00,
|
|
|
|
0x7e, 0x00, 0x3f, 0x00, 0x0c, 0x00, 0x04, 0x00,
|
|
|
|
};
|
|
|
|
|
2018-06-07 16:43:52 +02:00
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static BCursor EyedropperCursor = {
|
|
|
|
/*small*/
|
|
|
|
eyedropper_sbm, eyedropper_smsk,
|
|
|
|
16, 16,
|
|
|
|
1, 15,
|
|
|
|
/*big*/
|
|
|
|
NULL, NULL,
|
|
|
|
32, 32,
|
|
|
|
15, 15,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_BLACK, BC_WHITE,
|
2012-03-27 01:24:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
BlenderCursor[BC_EYEDROPPER_CURSOR] = &EyedropperCursor;
|
2006-06-15 14:22:59 +00:00
|
|
|
|
|
|
|
END_CURSOR_BLOCK
|
|
|
|
|
2009-03-11 20:22:06 +00:00
|
|
|
/********************** Swap Area Cursor ***********************/
|
|
|
|
BEGIN_CURSOR_BLOCK
|
2012-03-27 01:24:16 +00:00
|
|
|
static char swap_sbm[] = {
|
|
|
|
0xc0, 0xff, 0x40, 0x80, 0x40, 0x80, 0x40, 0x9c,
|
|
|
|
0x40, 0x98, 0x40, 0x94, 0x00, 0x82, 0xfe, 0x80,
|
|
|
|
0x7e, 0xfd, 0xbe, 0x01, 0xda, 0x01, 0xe2, 0x01,
|
|
|
|
0xe2, 0x01, 0xc2, 0x01, 0xfe, 0x01, 0x00, 0x00,
|
|
|
|
};
|
2006-06-15 14:22:59 +00:00
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static char swap_smsk[] = {
|
|
|
|
0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xff,
|
|
|
|
0xc0, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
|
|
0xff, 0xff, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03,
|
|
|
|
0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03,
|
|
|
|
};
|
2006-06-15 14:22:59 +00:00
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
static BCursor SwapCursor = {
|
|
|
|
/*small*/
|
|
|
|
swap_sbm, swap_smsk,
|
|
|
|
16, 16,
|
|
|
|
8, 8,
|
|
|
|
/*big*/
|
|
|
|
NULL, NULL,
|
|
|
|
32, 32,
|
|
|
|
15, 15,
|
|
|
|
/*color*/
|
2019-02-03 14:01:45 +11:00
|
|
|
BC_YELLOW, BC_BLUE,
|
2012-03-27 01:24:16 +00:00
|
|
|
};
|
2003-12-26 20:12:42 +00:00
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
BlenderCursor[BC_SWAPAREA_CURSOR] = &SwapCursor;
|
2003-12-26 20:12:42 +00:00
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
END_CURSOR_BLOCK
|
|
|
|
/********************** Put the cursors in the array ***********************/
|
2003-12-26 20:12:42 +00:00
|
|
|
|
2012-03-27 01:24:16 +00:00
|
|
|
}
|