Cleanup: use 'u' prefixed unsigned types for GHOST
This commit is contained in:
parent
5b320e5a24
commit
3a7dc572dc
Notes:
blender-bot
2023-06-07 10:31:13 +02:00
Referenced by issue #101864, Regression: Crash when lasso masking in sculpt mode Referenced by issue #101754, Geometry Nodes 3.4 is crashing on joining empty geometry Referenced by issue #101314, Sudden slow down in sculpt/edit mode after using UV project Referenced by issue #101045, Deleting a baked action results in an error Referenced by issue #105711, Regression: Clone Tool in Image Editor not showing the Clone Source Overlay
|
@ -11,6 +11,12 @@
|
|||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
# include "MEM_guardedalloc.h"
|
||||
#else
|
||||
/* Convenience unsigned abbreviations (#WITH_CXX_GUARDEDALLOC defines these). */
|
||||
typedef unsigned int uint;
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned long ulong;
|
||||
typedef unsigned char uchar;
|
||||
#endif
|
||||
|
||||
#if defined(WITH_CXX_GUARDEDALLOC) && defined(__cplusplus)
|
||||
|
|
|
@ -722,14 +722,14 @@ GHOST_TSuccess GHOST_ReleaseOpenGLContext(GHOST_ContextHandle contexthandle)
|
|||
return context->releaseDrawingContext();
|
||||
}
|
||||
|
||||
unsigned int GHOST_GetContextDefaultOpenGLFramebuffer(GHOST_ContextHandle contexthandle)
|
||||
uint GHOST_GetContextDefaultOpenGLFramebuffer(GHOST_ContextHandle contexthandle)
|
||||
{
|
||||
GHOST_IContext *context = (GHOST_IContext *)contexthandle;
|
||||
|
||||
return context->getDefaultFramebuffer();
|
||||
}
|
||||
|
||||
unsigned int GHOST_GetDefaultOpenGLFramebuffer(GHOST_WindowHandle windowhandle)
|
||||
uint GHOST_GetDefaultOpenGLFramebuffer(GHOST_WindowHandle windowhandle)
|
||||
{
|
||||
GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
|
||||
|
||||
|
@ -1125,8 +1125,7 @@ void *GHOST_XrGetActionCustomdata(GHOST_XrContextHandle xr_contexthandle,
|
|||
return 0;
|
||||
}
|
||||
|
||||
unsigned int GHOST_XrGetActionCount(GHOST_XrContextHandle xr_contexthandle,
|
||||
const char *action_set_name)
|
||||
uint GHOST_XrGetActionCount(GHOST_XrContextHandle xr_contexthandle, const char *action_set_name)
|
||||
{
|
||||
GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
|
||||
GHOST_XrSession *xr_session = xr_context->getSession();
|
||||
|
|
|
@ -100,15 +100,10 @@ bool win32_chk(bool result, const char *file, int line, const char *text)
|
|||
}
|
||||
|
||||
# ifndef NDEBUG
|
||||
_ftprintf(stderr,
|
||||
"%s(%d):[%s] -> Win32 Error# (%lu): %s",
|
||||
file,
|
||||
line,
|
||||
text,
|
||||
(unsigned long)error,
|
||||
msg);
|
||||
_ftprintf(
|
||||
stderr, "%s(%d):[%s] -> Win32 Error# (%lu): %s", file, line, text, ulong(error), msg);
|
||||
# else
|
||||
_ftprintf(stderr, "Win32 Error# (%lu): %s", (unsigned long)error, msg);
|
||||
_ftprintf(stderr, "Win32 Error# (%lu): %s", ulong(error), msg);
|
||||
# endif
|
||||
|
||||
SetLastError(NO_ERROR);
|
||||
|
|
|
@ -127,13 +127,13 @@ static bool egl_chk(bool result,
|
|||
file,
|
||||
line,
|
||||
text,
|
||||
static_cast<unsigned int>(error),
|
||||
uint(error),
|
||||
code ? code : "<Unknown>",
|
||||
msg ? msg : "<Unknown>");
|
||||
#else
|
||||
fprintf(stderr,
|
||||
"EGL Error (0x%04X): %s: %s\n",
|
||||
static_cast<unsigned int>(error),
|
||||
uint(error),
|
||||
code ? code : "<Unknown>",
|
||||
msg ? msg : "<Unknown>");
|
||||
(void)(file);
|
||||
|
|
|
@ -264,7 +264,7 @@ GHOST_TSuccess GHOST_ContextGLX::initializeDrawingContext()
|
|||
GHOST_TSuccess success;
|
||||
|
||||
if (m_context != nullptr) {
|
||||
const unsigned char *version;
|
||||
const uchar *version;
|
||||
|
||||
if (!s_sharedContext) {
|
||||
s_sharedContext = m_context;
|
||||
|
@ -316,7 +316,7 @@ GHOST_TSuccess GHOST_ContextGLX::setSwapInterval(int interval)
|
|||
GHOST_TSuccess GHOST_ContextGLX::getSwapInterval(int &intervalOut)
|
||||
{
|
||||
if (epoxy_has_glx_extension(m_display, DefaultScreen(m_display), "GLX_EXT_swap_control")) {
|
||||
unsigned int interval = 0;
|
||||
uint interval = 0;
|
||||
|
||||
::glXQueryDrawable(m_display, m_window, GLX_SWAP_INTERVAL_EXT, &interval);
|
||||
|
||||
|
|
|
@ -437,7 +437,7 @@ int GHOST_ContextWGL::_choose_pixel_format_arb_1(bool stereoVisual, bool needAlp
|
|||
|
||||
makeAttribList(iAttributes, stereoVisual, needAlpha);
|
||||
|
||||
UINT nNumFormats;
|
||||
uint nNumFormats;
|
||||
WIN32_CHK(wglChoosePixelFormatARB(
|
||||
m_hDC, &(iAttributes[0]), NULL, _MAX_PIXEL_FORMATS, iPixelFormats, &nNumFormats));
|
||||
|
||||
|
|
|
@ -212,13 +212,13 @@ void *GHOST_DropTargetWin32::getDropDataAsFilenames(IDataObject *p_data_object)
|
|||
if (p_data_object->GetData(&fmtetc, &stgmed) == S_OK) {
|
||||
const HDROP hdrop = (HDROP)::GlobalLock(stgmed.hGlobal);
|
||||
|
||||
const UINT totfiles = ::DragQueryFileW(hdrop, -1, NULL, 0);
|
||||
const uint totfiles = ::DragQueryFileW(hdrop, -1, NULL, 0);
|
||||
if (totfiles) {
|
||||
str_array = (GHOST_TStringArray *)::malloc(sizeof(GHOST_TStringArray));
|
||||
str_array->count = 0;
|
||||
str_array->strings = (uint8_t **)::malloc(totfiles * sizeof(uint8_t *));
|
||||
|
||||
for (UINT nfile = 0; nfile < totfiles; nfile++) {
|
||||
for (uint nfile = 0; nfile < totfiles; nfile++) {
|
||||
WCHAR fpath[MAX_PATH];
|
||||
if (::DragQueryFileW(hdrop, nfile, fpath, MAX_PATH) > 0) {
|
||||
char *temp_path;
|
||||
|
|
|
@ -107,7 +107,7 @@ char *GHOST_DropTargetX11::FileUrlDecode(char *fileUrl)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
void *GHOST_DropTargetX11::getURIListGhostData(unsigned char *dropBuffer, int dropBufferSize)
|
||||
void *GHOST_DropTargetX11::getURIListGhostData(uchar *dropBuffer, int dropBufferSize)
|
||||
{
|
||||
GHOST_TStringArray *strArray = nullptr;
|
||||
int totPaths = 0, curLength = 0;
|
||||
|
@ -157,12 +157,10 @@ void *GHOST_DropTargetX11::getURIListGhostData(unsigned char *dropBuffer, int dr
|
|||
return strArray;
|
||||
}
|
||||
|
||||
void *GHOST_DropTargetX11::getGhostData(Atom dropType,
|
||||
unsigned char *dropBuffer,
|
||||
int dropBufferSize)
|
||||
void *GHOST_DropTargetX11::getGhostData(Atom dropType, uchar *dropBuffer, int dropBufferSize)
|
||||
{
|
||||
void *data = nullptr;
|
||||
unsigned char *tmpBuffer = (unsigned char *)malloc(dropBufferSize + 1);
|
||||
uchar *tmpBuffer = (uchar *)malloc(dropBufferSize + 1);
|
||||
bool needsFree = true;
|
||||
|
||||
/* Ensure nil-terminator. */
|
||||
|
@ -201,7 +199,7 @@ void *GHOST_DropTargetX11::getGhostData(Atom dropType,
|
|||
bool GHOST_DropTargetX11::GHOST_HandleClientMessage(XEvent *event)
|
||||
{
|
||||
Atom dropType;
|
||||
unsigned char *dropBuffer;
|
||||
uchar *dropBuffer;
|
||||
int dropBufferSize, dropX, dropY;
|
||||
|
||||
if (xdnd_get_drop(m_system->getXDisplay(),
|
||||
|
|
|
@ -270,7 +270,7 @@ void GHOST_ImeWin32::GetCaret(HIMC imm_context, LPARAM lparam, ImeComposition *c
|
|||
else if (IsLanguage(IMELANG_CHINESE)) {
|
||||
int clause_size = ImmGetCompositionStringW(imm_context, GCS_COMPCLAUSE, NULL, 0);
|
||||
if (clause_size) {
|
||||
static std::vector<unsigned long> clauses;
|
||||
static std::vector<ulong> clauses;
|
||||
clause_size = clause_size / sizeof(clauses[0]);
|
||||
clauses.resize(clause_size);
|
||||
ImmGetCompositionStringW(
|
||||
|
|
|
@ -150,7 +150,7 @@ GHOST_NDOFManager::GHOST_NDOFManager(GHOST_System &sys)
|
|||
memset(m_rotation, 0, sizeof(m_rotation));
|
||||
}
|
||||
|
||||
bool GHOST_NDOFManager::setDevice(unsigned short vendor_id, unsigned short product_id)
|
||||
bool GHOST_NDOFManager::setDevice(ushort vendor_id, ushort product_id)
|
||||
{
|
||||
/* Call this function until it returns true
|
||||
* it's a good idea to stop calling it after that, as it will "forget"
|
||||
|
|
|
@ -31,7 +31,7 @@ GHOST_NDOFManagerUnix::GHOST_NDOFManagerUnix(GHOST_System &sys)
|
|||
if (command_output) {
|
||||
char line[MAX_LINE_LENGTH] = {0};
|
||||
while (fgets(line, MAX_LINE_LENGTH, command_output)) {
|
||||
unsigned short vendor_id = 0, product_id = 0;
|
||||
ushort vendor_id = 0, product_id = 0;
|
||||
if (sscanf(line, "Bus %*d Device %*d: ID %hx:%hx", &vendor_id, &product_id) == 2) {
|
||||
if (setDevice(vendor_id, product_id)) {
|
||||
break; /* stop looking once the first 3D mouse is found */
|
||||
|
|
|
@ -25,14 +25,14 @@ using DecodeState_e = enum DecodeState_e {
|
|||
|
||||
void GHOST_URL_decode(char *buf_dst, int buf_dst_size, const char *buf_src)
|
||||
{
|
||||
const unsigned int buf_src_len = strlen(buf_src);
|
||||
const uint buf_src_len = strlen(buf_src);
|
||||
DecodeState_e state = STATE_SEARCH;
|
||||
unsigned int ascii_character;
|
||||
uint ascii_character;
|
||||
char temp_num_buf[3] = {0};
|
||||
|
||||
memset(buf_dst, 0, buf_dst_size);
|
||||
|
||||
for (unsigned int i = 0; i < buf_src_len; i++) {
|
||||
for (uint i = 0; i < buf_src_len; i++) {
|
||||
switch (state) {
|
||||
case STATE_SEARCH: {
|
||||
if (buf_src[i] != '%') {
|
||||
|
|
|
@ -540,7 +540,7 @@ GHOST_TSuccess GHOST_SystemWin32::exit()
|
|||
GHOST_TKey GHOST_SystemWin32::hardKey(RAWINPUT const &raw, bool *r_key_down)
|
||||
{
|
||||
/* #RI_KEY_BREAK doesn't work for sticky keys release, so we also check for the up message. */
|
||||
unsigned int msg = raw.data.keyboard.Message;
|
||||
uint msg = raw.data.keyboard.Message;
|
||||
*r_key_down = !(raw.data.keyboard.Flags & RI_KEY_BREAK) && msg != WM_KEYUP && msg != WM_SYSKEYUP;
|
||||
|
||||
return this->convertKey(raw.data.keyboard.VKey,
|
||||
|
@ -855,7 +855,7 @@ void GHOST_SystemWin32::processWintabEvent(GHOST_WindowWin32 *window)
|
|||
case GHOST_kEventButtonDown: {
|
||||
WINTAB_PRINTF("HWND %p Wintab button down", window->getHWND());
|
||||
|
||||
UINT message;
|
||||
uint message;
|
||||
switch (info.button) {
|
||||
case GHOST_kButtonMaskLeft:
|
||||
message = WM_LBUTTONDOWN;
|
||||
|
@ -913,7 +913,7 @@ void GHOST_SystemWin32::processWintabEvent(GHOST_WindowWin32 *window)
|
|||
continue;
|
||||
}
|
||||
|
||||
UINT message;
|
||||
uint message;
|
||||
switch (info.button) {
|
||||
case GHOST_kButtonMaskLeft:
|
||||
message = WM_LBUTTONUP;
|
||||
|
@ -963,7 +963,7 @@ void GHOST_SystemWin32::processWintabEvent(GHOST_WindowWin32 *window)
|
|||
}
|
||||
|
||||
void GHOST_SystemWin32::processPointerEvent(
|
||||
UINT type, GHOST_WindowWin32 *window, WPARAM wParam, LPARAM lParam, bool &eventHandled)
|
||||
uint type, GHOST_WindowWin32 *window, WPARAM wParam, LPARAM lParam, bool &eventHandled)
|
||||
{
|
||||
/* Pointer events might fire when changing windows for a device which is set to use Wintab,
|
||||
* even when Wintab is left enabled but set to the bottom of Wintab overlap order. */
|
||||
|
@ -1416,7 +1416,7 @@ void GHOST_SystemWin32::processTrackpad()
|
|||
}
|
||||
}
|
||||
|
||||
LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, uint msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
GHOST_Event *event = NULL;
|
||||
bool eventHandled = false;
|
||||
|
@ -1462,7 +1462,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
|||
case WM_INPUT: {
|
||||
RAWINPUT raw;
|
||||
RAWINPUT *raw_ptr = &raw;
|
||||
UINT rawSize = sizeof(RAWINPUT);
|
||||
uint rawSize = sizeof(RAWINPUT);
|
||||
|
||||
GetRawInputData((HRAWINPUT)lParam, RID_INPUT, raw_ptr, &rawSize, sizeof(RAWINPUTHEADER));
|
||||
|
||||
|
|
|
@ -1038,8 +1038,8 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
|
|||
KeySym key_sym_str;
|
||||
/* Mode_switch 'modifier' is `AltGr` - when this one or Shift are enabled,
|
||||
* we do not want to apply that 'forced number' hack. */
|
||||
const unsigned int mode_switch_mask = XkbKeysymToModifiers(xke->display, XK_Mode_switch);
|
||||
const unsigned int number_hack_forbidden_kmods_mask = mode_switch_mask | ShiftMask;
|
||||
const uint mode_switch_mask = XkbKeysymToModifiers(xke->display, XK_Mode_switch);
|
||||
const uint number_hack_forbidden_kmods_mask = mode_switch_mask | ShiftMask;
|
||||
if ((xke->keycode >= 10 && xke->keycode < 20) &&
|
||||
((xke->state & number_hack_forbidden_kmods_mask) == 0)) {
|
||||
key_sym = XLookupKeysym(xke, ShiftMask);
|
||||
|
@ -1189,7 +1189,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
|
|||
/* when using IM for some languages such as Japanese,
|
||||
* one event inserts multiple utf8 characters */
|
||||
if (xke->type == KeyPress && xic) {
|
||||
unsigned char c;
|
||||
uchar c;
|
||||
int i = 0;
|
||||
while (true) {
|
||||
/* Search character boundary. */
|
||||
|
@ -1452,7 +1452,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
|
|||
xse->target,
|
||||
8,
|
||||
PropModeReplace,
|
||||
(unsigned char *)txt_select_buffer,
|
||||
(uchar *)txt_select_buffer,
|
||||
strlen(txt_select_buffer));
|
||||
}
|
||||
else if (xse->selection == XInternAtom(m_display, "CLIPBOARD", False)) {
|
||||
|
@ -1462,7 +1462,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
|
|||
xse->target,
|
||||
8,
|
||||
PropModeReplace,
|
||||
(unsigned char *)txt_cut_buffer,
|
||||
(uchar *)txt_cut_buffer,
|
||||
strlen(txt_cut_buffer));
|
||||
}
|
||||
}
|
||||
|
@ -1479,7 +1479,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
|
|||
xse->target,
|
||||
32,
|
||||
PropModeReplace,
|
||||
(unsigned char *)alist,
|
||||
(uchar *)alist,
|
||||
5);
|
||||
XFlush(m_display);
|
||||
}
|
||||
|
@ -1503,8 +1503,8 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
|
|||
continue;
|
||||
}
|
||||
|
||||
const unsigned char axis_first = data->first_axis;
|
||||
const unsigned char axes_end = axis_first + data->axes_count; /* after the last */
|
||||
const uchar axis_first = data->first_axis;
|
||||
const uchar axes_end = axis_first + data->axes_count; /* after the last */
|
||||
int axis_value;
|
||||
|
||||
/* stroke might begin without leading ProxyIn event,
|
||||
|
@ -1613,7 +1613,7 @@ GHOST_TSuccess GHOST_SystemX11::getButtons(GHOST_Buttons &buttons) const
|
|||
{
|
||||
Window root_return, child_return;
|
||||
int rx, ry, wx, wy;
|
||||
unsigned int mask_return;
|
||||
uint mask_return;
|
||||
|
||||
if (XQueryPointer(m_display,
|
||||
RootWindow(m_display, DefaultScreen(m_display)),
|
||||
|
@ -1643,7 +1643,7 @@ static GHOST_TSuccess getCursorPosition_impl(Display *display,
|
|||
Window *child_return)
|
||||
{
|
||||
int rx, ry, wx, wy;
|
||||
unsigned int mask_return;
|
||||
uint mask_return;
|
||||
Window root_return;
|
||||
|
||||
if (XQueryPointer(display,
|
||||
|
@ -1934,18 +1934,14 @@ static GHOST_TKey ghost_key_from_keycode(const XkbDescPtr xkb_descr, const KeyCo
|
|||
#define XCLIB_XCOUT_FALLBACK_TEXT 6
|
||||
|
||||
/* Retrieves the contents of a selections. */
|
||||
void GHOST_SystemX11::getClipboard_xcout(const XEvent *evt,
|
||||
Atom sel,
|
||||
Atom target,
|
||||
unsigned char **txt,
|
||||
unsigned long *len,
|
||||
unsigned int *context) const
|
||||
void GHOST_SystemX11::getClipboard_xcout(
|
||||
const XEvent *evt, Atom sel, Atom target, uchar **txt, ulong *len, uint *context) const
|
||||
{
|
||||
Atom pty_type;
|
||||
int pty_format;
|
||||
unsigned char *buffer;
|
||||
unsigned long pty_size, pty_items;
|
||||
unsigned char *ltxt = *txt;
|
||||
uchar *buffer;
|
||||
ulong pty_size, pty_items;
|
||||
uchar *ltxt = *txt;
|
||||
|
||||
const vector<GHOST_IWindow *> &win_vec = m_windowManager->getWindows();
|
||||
vector<GHOST_IWindow *>::const_iterator win_it = win_vec.begin();
|
||||
|
@ -2033,7 +2029,7 @@ void GHOST_SystemX11::getClipboard_xcout(const XEvent *evt,
|
|||
XDeleteProperty(m_display, win, m_atom.XCLIP_OUT);
|
||||
|
||||
/* copy the buffer to the pointer for returned data */
|
||||
ltxt = (unsigned char *)malloc(pty_items);
|
||||
ltxt = (uchar *)malloc(pty_items);
|
||||
memcpy(ltxt, buffer, pty_items);
|
||||
|
||||
/* set the length of the returned data */
|
||||
|
@ -2118,11 +2114,11 @@ void GHOST_SystemX11::getClipboard_xcout(const XEvent *evt,
|
|||
/* allocate memory to accommodate data in *txt */
|
||||
if (*len == 0) {
|
||||
*len = pty_items;
|
||||
ltxt = (unsigned char *)malloc(*len);
|
||||
ltxt = (uchar *)malloc(*len);
|
||||
}
|
||||
else {
|
||||
*len += pty_items;
|
||||
ltxt = (unsigned char *)realloc(ltxt, *len);
|
||||
ltxt = (uchar *)realloc(ltxt, *len);
|
||||
}
|
||||
|
||||
/* add data to ltxt */
|
||||
|
@ -2146,9 +2142,9 @@ char *GHOST_SystemX11::getClipboard(bool selection) const
|
|||
|
||||
/* from xclip.c doOut() v0.11 */
|
||||
char *sel_buf;
|
||||
unsigned long sel_len = 0;
|
||||
ulong sel_len = 0;
|
||||
XEvent evt;
|
||||
unsigned int context = XCLIB_XCOUT_NONE;
|
||||
uint context = XCLIB_XCOUT_NONE;
|
||||
|
||||
if (selection == True) {
|
||||
sseln = m_atom.PRIMARY;
|
||||
|
@ -2190,7 +2186,7 @@ char *GHOST_SystemX11::getClipboard(bool selection) const
|
|||
}
|
||||
|
||||
/* fetch the selection, or part of it */
|
||||
getClipboard_xcout(&evt, sseln, target, (unsigned char **)&sel_buf, &sel_len, &context);
|
||||
getClipboard_xcout(&evt, sseln, target, (uchar **)&sel_buf, &sel_len, &context);
|
||||
|
||||
if (restore_this_event) {
|
||||
restore_events.push_back(evt);
|
||||
|
|
|
@ -97,7 +97,7 @@ GHOST_Context *GHOST_Window::getContext()
|
|||
return m_context;
|
||||
}
|
||||
|
||||
unsigned int GHOST_Window::getDefaultFramebuffer()
|
||||
uint GHOST_Window::getDefaultFramebuffer()
|
||||
{
|
||||
return (m_context) ? m_context->getDefaultFramebuffer() : 0;
|
||||
}
|
||||
|
|
|
@ -205,11 +205,11 @@ void GHOST_WindowSDL::clientToScreen(int32_t inX, int32_t inY, int32_t &outX, in
|
|||
}
|
||||
|
||||
/* mouse cursor */
|
||||
static unsigned char sdl_std_cursor_mask_xterm[] = {
|
||||
static uchar sdl_std_cursor_mask_xterm[] = {
|
||||
0xef, 0x01, 0xff, 0x01, 0xff, 0x01, 0x7c, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00,
|
||||
0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x7c, 0x00, 0xff, 0x01, 0xff, 0x01, 0xef, 0x01,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_xterm[] = {
|
||||
static uchar sdl_std_cursor_xterm[] = {
|
||||
0x00, 0x77, 0x00, 0x1c, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08,
|
||||
0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x1c, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
@ -218,11 +218,11 @@ static unsigned char sdl_std_cursor_xterm[] = {
|
|||
#define sdl_std_cursor_HOT_X_xterm -3
|
||||
#define sdl_std_cursor_HOT_Y_xterm -7
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_watch[] = {
|
||||
static uchar sdl_std_cursor_mask_watch[] = {
|
||||
0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f, 0xfe, 0x1f, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfe, 0x1f, 0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_watch[] = {
|
||||
static uchar sdl_std_cursor_watch[] = {
|
||||
0xf8, 0x07, 0xf8, 0x07, 0xf8, 0x07, 0xfc, 0x0f, 0x86, 0x18, 0x83, 0x30, 0x81, 0xe0, 0xc1, 0xe1,
|
||||
0xc1, 0xe1, 0x21, 0xe0, 0x13, 0x30, 0x06, 0x18, 0xfc, 0x0f, 0xf8, 0x07, 0xf8, 0x07, 0xf8, 0x07,
|
||||
};
|
||||
|
@ -231,11 +231,11 @@ static unsigned char sdl_std_cursor_watch[] = {
|
|||
#define sdl_std_cursor_HOT_X_watch -15
|
||||
#define sdl_std_cursor_HOT_Y_watch -7
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_umbrella[] = {
|
||||
static uchar sdl_std_cursor_mask_umbrella[] = {
|
||||
0xe8, 0x76, 0xfb, 0xdf, 0xfd, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xcf, 0x79, 0xc0, 0x01,
|
||||
0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x07, 0xc0, 0x07, 0xc0, 0x07, 0xc0, 0x07, 0x80, 0x03,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_umbrella[] = {
|
||||
static uchar sdl_std_cursor_umbrella[] = {
|
||||
0x88, 0x04, 0x20, 0x0a, 0xc9, 0x32, 0xf2, 0x09, 0x4c, 0x06, 0x43, 0x18, 0x40, 0x00, 0x40, 0x00,
|
||||
0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x01, 0x40, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
@ -244,11 +244,11 @@ static unsigned char sdl_std_cursor_umbrella[] = {
|
|||
#define sdl_std_cursor_HOT_X_umbrella -7
|
||||
#define sdl_std_cursor_HOT_Y_umbrella -12
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_top_side[] = {
|
||||
static uchar sdl_std_cursor_mask_top_side[] = {
|
||||
0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xc0, 0x01, 0xe0, 0x03, 0xf0, 0x07, 0xf8, 0x0f,
|
||||
0xdc, 0x1d, 0xcc, 0x19, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_top_side[] = {
|
||||
static uchar sdl_std_cursor_top_side[] = {
|
||||
0xff, 0x1f, 0xff, 0x1f, 0x00, 0x00, 0x40, 0x00, 0xe0, 0x00, 0x50, 0x01, 0x48, 0x02, 0x44, 0x04,
|
||||
0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
@ -257,11 +257,11 @@ static unsigned char sdl_std_cursor_top_side[] = {
|
|||
#define sdl_std_cursor_HOT_X_top_side -6
|
||||
#define sdl_std_cursor_HOT_Y_top_side -14
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_top_right_corner[] = {
|
||||
static uchar sdl_std_cursor_mask_top_right_corner[] = {
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0xfc, 0xf7, 0xfc, 0xf7, 0xfc, 0xf7,
|
||||
0xc0, 0xf7, 0xe0, 0xf7, 0x70, 0xf7, 0x38, 0xf7, 0x1c, 0xf7, 0x0c, 0xf7, 0x00, 0xf0, 0x00, 0xf0,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_top_right_corner[] = {
|
||||
static uchar sdl_std_cursor_top_right_corner[] = {
|
||||
0xff, 0x3f, 0xff, 0x3f, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0xfc, 0x31, 0x80, 0x31, 0x40, 0x31,
|
||||
0x20, 0x31, 0x10, 0x31, 0x08, 0x31, 0x04, 0x31, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
@ -270,11 +270,11 @@ static unsigned char sdl_std_cursor_top_right_corner[] = {
|
|||
#define sdl_std_cursor_HOT_X_top_right_corner -13
|
||||
#define sdl_std_cursor_HOT_Y_top_right_corner -14
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_top_left_corner[] = {
|
||||
static uchar sdl_std_cursor_mask_top_left_corner[] = {
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xef, 0x3f, 0xef, 0x3f, 0xef, 0x3f,
|
||||
0xef, 0x03, 0xef, 0x07, 0xef, 0x0e, 0xef, 0x1c, 0xef, 0x38, 0xef, 0x30, 0x0f, 0x00, 0x0f, 0x00,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_top_left_corner[] = {
|
||||
static uchar sdl_std_cursor_top_left_corner[] = {
|
||||
0xff, 0x3f, 0xff, 0x3f, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0xe3, 0x0f, 0x63, 0x00, 0xa3, 0x00,
|
||||
0x23, 0x01, 0x23, 0x02, 0x23, 0x04, 0x23, 0x08, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
@ -283,11 +283,11 @@ static unsigned char sdl_std_cursor_top_left_corner[] = {
|
|||
#define sdl_std_cursor_HOT_X_top_left_corner 0
|
||||
#define sdl_std_cursor_HOT_Y_top_left_corner -14
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_sb_v_double_arrow[] = {
|
||||
static uchar sdl_std_cursor_mask_sb_v_double_arrow[] = {
|
||||
0x38, 0x00, 0x7c, 0x00, 0xfe, 0x00, 0xff, 0x01, 0xff, 0x01, 0x7c, 0x00, 0x7c, 0x00, 0x7c,
|
||||
0x00, 0x7c, 0x00, 0x7c, 0x00, 0xff, 0x01, 0xff, 0x01, 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_sb_v_double_arrow[] = {
|
||||
static uchar sdl_std_cursor_sb_v_double_arrow[] = {
|
||||
0x10, 0x00, 0x38, 0x00, 0x7c, 0x00, 0xfe, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28,
|
||||
0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00, 0x10, 0x00,
|
||||
};
|
||||
|
@ -296,7 +296,7 @@ static unsigned char sdl_std_cursor_sb_v_double_arrow[] = {
|
|||
#define sdl_std_cursor_HOT_X_sb_v_double_arrow -3
|
||||
#define sdl_std_cursor_HOT_Y_sb_v_double_arrow -8
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_sb_h_double_arrow[] = {
|
||||
static uchar sdl_std_cursor_mask_sb_h_double_arrow[] = {
|
||||
0x18,
|
||||
0x0c,
|
||||
0x1c,
|
||||
|
@ -316,7 +316,7 @@ static unsigned char sdl_std_cursor_mask_sb_h_double_arrow[] = {
|
|||
0x18,
|
||||
0x0c,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_sb_h_double_arrow[] = {
|
||||
static uchar sdl_std_cursor_sb_h_double_arrow[] = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x08,
|
||||
|
@ -341,11 +341,11 @@ static unsigned char sdl_std_cursor_sb_h_double_arrow[] = {
|
|||
#define sdl_std_cursor_HOT_X_sb_h_double_arrow -7
|
||||
#define sdl_std_cursor_HOT_Y_sb_h_double_arrow -4
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_right_side[] = {
|
||||
static uchar sdl_std_cursor_mask_right_side[] = {
|
||||
0x00, 0xf0, 0x00, 0xf0, 0xc0, 0xf0, 0xc0, 0xf1, 0x80, 0xf3, 0x00, 0xf7, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0x00, 0xf7, 0x80, 0xf3, 0xc0, 0xf1, 0xc0, 0xf0, 0x00, 0xf0, 0x00, 0xf0,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_right_side[] = {
|
||||
static uchar sdl_std_cursor_right_side[] = {
|
||||
0x00, 0x30, 0x00, 0x30, 0x40, 0x30, 0x80, 0x30, 0x00, 0x31, 0x00, 0x32, 0xff, 0x37, 0x00,
|
||||
0x32, 0x00, 0x31, 0x80, 0x30, 0x40, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
@ -354,11 +354,11 @@ static unsigned char sdl_std_cursor_right_side[] = {
|
|||
#define sdl_std_cursor_HOT_X_right_side -13
|
||||
#define sdl_std_cursor_HOT_Y_right_side -7
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_right_ptr[] = {
|
||||
static uchar sdl_std_cursor_mask_right_ptr[] = {
|
||||
0x00, 0x03, 0x80, 0x03, 0xc0, 0x03, 0xe0, 0x03, 0xf0, 0x03, 0xf8, 0x03, 0xfc, 0x03, 0xfe, 0x03,
|
||||
0xff, 0x03, 0xff, 0x03, 0xf8, 0x03, 0xbc, 0x03, 0x3c, 0x03, 0x1e, 0x00, 0x1e, 0x00, 0x0c, 0x00,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_right_ptr[] = {
|
||||
static uchar sdl_std_cursor_right_ptr[] = {
|
||||
0x00, 0x80, 0x00, 0xc0, 0x00, 0xe0, 0x00, 0xf0, 0x00, 0xf8, 0x00, 0xfc, 0x00, 0xfe, 0x00, 0xff,
|
||||
0x00, 0xf8, 0x00, 0xd8, 0x00, 0x8c, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
@ -367,11 +367,11 @@ static unsigned char sdl_std_cursor_right_ptr[] = {
|
|||
#define sdl_std_cursor_HOT_X_right_ptr -7
|
||||
#define sdl_std_cursor_HOT_Y_right_ptr -14
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_question_arrow[] = {
|
||||
static uchar sdl_std_cursor_mask_question_arrow[] = {
|
||||
0xf8, 0x00, 0xfc, 0x01, 0xfe, 0x03, 0xff, 0x07, 0x8f, 0x07, 0x9f, 0x07, 0xde, 0x07, 0xfc, 0x03,
|
||||
0xf8, 0x01, 0xf8, 0x00, 0xf8, 0x00, 0xfc, 0x01, 0xfe, 0x03, 0xfc, 0x01, 0xf8, 0x00, 0x70, 0x00,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_question_arrow[] = {
|
||||
static uchar sdl_std_cursor_question_arrow[] = {
|
||||
0x7c, 0x00, 0xfe, 0x00, 0xc7, 0x01, 0x83, 0x01, 0x87, 0x01, 0xc6, 0x01, 0xe0, 0x00, 0x78, 0x00,
|
||||
0x38, 0x00, 0x28, 0x00, 0x28, 0x00, 0xee, 0x00, 0x6c, 0x00, 0x38, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
@ -380,11 +380,11 @@ static unsigned char sdl_std_cursor_question_arrow[] = {
|
|||
#define sdl_std_cursor_HOT_X_question_arrow -4
|
||||
#define sdl_std_cursor_HOT_Y_question_arrow -8
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_pirate[] = {
|
||||
static uchar sdl_std_cursor_mask_pirate[] = {
|
||||
0xf0, 0x03, 0xf8, 0x07, 0xfc, 0x0f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfc, 0x0f, 0xf8, 0x07, 0xf1, 0x83,
|
||||
0xf1, 0xe3, 0xf3, 0xf3, 0xef, 0x39, 0x1e, 0x1e, 0xe0, 0x01, 0xfe, 0xc7, 0xff, 0xff, 0x0f, 0x7c,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_pirate[] = {
|
||||
static uchar sdl_std_cursor_pirate[] = {
|
||||
0xe0, 0x01, 0xf0, 0x03, 0xf8, 0x07, 0xcc, 0x0c, 0xcc, 0x0c, 0xf8, 0x07, 0xf0, 0x03, 0xe0, 0x01,
|
||||
0xe1, 0x21, 0xe1, 0x61, 0xc2, 0x10, 0x1c, 0x0e, 0xe0, 0x01, 0xf8, 0x47, 0x0f, 0x7c, 0x01, 0x20,
|
||||
};
|
||||
|
@ -393,11 +393,11 @@ static unsigned char sdl_std_cursor_pirate[] = {
|
|||
#define sdl_std_cursor_HOT_X_pirate -7
|
||||
#define sdl_std_cursor_HOT_Y_pirate -4
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_left_side[] = {
|
||||
static uchar sdl_std_cursor_mask_left_side[] = {
|
||||
0x0f, 0x00, 0x0f, 0x00, 0x0f, 0x03, 0x8f, 0x03, 0xcf, 0x01, 0xef, 0x00, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xef, 0x00, 0xcf, 0x01, 0x8f, 0x03, 0x0f, 0x03, 0x0f, 0x00, 0x0f, 0x00,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_left_side[] = {
|
||||
static uchar sdl_std_cursor_left_side[] = {
|
||||
0x03, 0x00, 0x03, 0x00, 0x83, 0x00, 0x43, 0x00, 0x23, 0x00, 0x13, 0x00, 0xfb, 0x3f, 0x13,
|
||||
0x00, 0x23, 0x00, 0x43, 0x00, 0x83, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
@ -406,11 +406,11 @@ static unsigned char sdl_std_cursor_left_side[] = {
|
|||
#define sdl_std_cursor_HOT_X_left_side 0
|
||||
#define sdl_std_cursor_HOT_Y_left_side -7
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_left_ptr[] = {
|
||||
static uchar sdl_std_cursor_mask_left_ptr[] = {
|
||||
0x03, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x1f, 0x00, 0x3f, 0x00, 0x7f, 0x00, 0xff, 0x00, 0xff, 0x01,
|
||||
0xff, 0x03, 0xff, 0x03, 0x7f, 0x00, 0xf7, 0x00, 0xf3, 0x00, 0xe0, 0x01, 0xe0, 0x01, 0xc0, 0x00,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_left_ptr[] = {
|
||||
static uchar sdl_std_cursor_left_ptr[] = {
|
||||
0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x3e, 0x00, 0x7e, 0x00, 0xfe, 0x00,
|
||||
0xfe, 0x00, 0x3e, 0x00, 0x36, 0x00, 0x62, 0x00, 0x60, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
@ -419,11 +419,11 @@ static unsigned char sdl_std_cursor_left_ptr[] = {
|
|||
#define sdl_std_cursor_HOT_X_left_ptr -8
|
||||
#define sdl_std_cursor_HOT_Y_left_ptr -14
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_crosshair[] = {
|
||||
static uchar sdl_std_cursor_mask_crosshair[] = {
|
||||
0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_crosshair[] = {
|
||||
static uchar sdl_std_cursor_crosshair[] = {
|
||||
0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x7f, 0xff,
|
||||
0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
@ -432,11 +432,11 @@ static unsigned char sdl_std_cursor_crosshair[] = {
|
|||
#define sdl_std_cursor_HOT_X_crosshair -7
|
||||
#define sdl_std_cursor_HOT_Y_crosshair -8
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_bottom_side[] = {
|
||||
static uchar sdl_std_cursor_mask_bottom_side[] = {
|
||||
0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xcc, 0x19, 0xdc, 0x1d,
|
||||
0xf8, 0x0f, 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_bottom_side[] = {
|
||||
static uchar sdl_std_cursor_bottom_side[] = {
|
||||
0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x44, 0x04, 0x48, 0x02,
|
||||
0x50, 0x01, 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00, 0xff, 0x1f, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
@ -445,11 +445,11 @@ static unsigned char sdl_std_cursor_bottom_side[] = {
|
|||
#define sdl_std_cursor_HOT_X_bottom_side -6
|
||||
#define sdl_std_cursor_HOT_Y_bottom_side -1
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_bottom_right_corner[] = {
|
||||
static uchar sdl_std_cursor_mask_bottom_right_corner[] = {
|
||||
0x00, 0xf0, 0x00, 0xf0, 0x0c, 0xf7, 0x1c, 0xf7, 0x38, 0xf7, 0x70, 0xf7, 0xe0, 0xf7, 0xc0, 0xf7,
|
||||
0xfc, 0xf7, 0xfc, 0xf7, 0xfc, 0xf7, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_bottom_right_corner[] = {
|
||||
static uchar sdl_std_cursor_bottom_right_corner[] = {
|
||||
0x00, 0x30, 0x00, 0x30, 0x04, 0x31, 0x08, 0x31, 0x10, 0x31, 0x20, 0x31, 0x40, 0x31, 0x80, 0x31,
|
||||
0xfc, 0x31, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0xff, 0x3f, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
@ -458,11 +458,11 @@ static unsigned char sdl_std_cursor_bottom_right_corner[] = {
|
|||
#define sdl_std_cursor_HOT_X_bottom_right_corner -13
|
||||
#define sdl_std_cursor_HOT_Y_bottom_right_corner -1
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_bottom_left_corner[] = {
|
||||
static uchar sdl_std_cursor_mask_bottom_left_corner[] = {
|
||||
0x0f, 0x00, 0x0f, 0x00, 0xef, 0x30, 0xef, 0x38, 0xef, 0x1c, 0xef, 0x0e, 0xef, 0x07, 0xef, 0x03,
|
||||
0xef, 0x3f, 0xef, 0x3f, 0xef, 0x3f, 0x0f, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_bottom_left_corner[] = {
|
||||
static uchar sdl_std_cursor_bottom_left_corner[] = {
|
||||
0x03, 0x00, 0x03, 0x00, 0x23, 0x08, 0x23, 0x04, 0x23, 0x02, 0x23, 0x01, 0xa3, 0x00, 0x63, 0x00,
|
||||
0xe3, 0x0f, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0xff, 0x3f, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
@ -471,11 +471,11 @@ static unsigned char sdl_std_cursor_bottom_left_corner[] = {
|
|||
#define sdl_std_cursor_HOT_X_bottom_left_corner 0
|
||||
#define sdl_std_cursor_HOT_Y_bottom_left_corner -1
|
||||
|
||||
static unsigned char sdl_std_cursor_mask_arrow[] = {
|
||||
static uchar sdl_std_cursor_mask_arrow[] = {
|
||||
0x00, 0xe0, 0x00, 0xf8, 0x00, 0xfe, 0x80, 0x7f, 0xe0, 0x7f, 0xf8, 0x3f, 0xfc, 0x3f, 0xfc, 0x1f,
|
||||
0xe0, 0x1f, 0xf0, 0x0f, 0xf8, 0x0f, 0x7c, 0x07, 0x3e, 0x07, 0x1f, 0x02, 0x0e, 0x00, 0x04, 0x00,
|
||||
};
|
||||
static unsigned char sdl_std_cursor_arrow[] = {
|
||||
static uchar sdl_std_cursor_arrow[] = {
|
||||
0x00, 0x30, 0x00, 0x3c, 0x00, 0x1f, 0xc0, 0x1f, 0xf0, 0x0f, 0xfc, 0x0f, 0xc0, 0x07, 0xe0, 0x07,
|
||||
0x70, 0x03, 0x38, 0x03, 0x1c, 0x01, 0x0e, 0x01, 0x07, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "GHOST_Debug.h"
|
||||
#include "GHOST_IconX11.h"
|
||||
#include "GHOST_SystemX11.h"
|
||||
#include "GHOST_Types.h"
|
||||
#include "GHOST_WindowX11.h"
|
||||
#include "GHOST_utildefines.h"
|
||||
|
||||
|
@ -140,7 +141,7 @@ GHOST_WindowX11::GHOST_WindowX11(GHOST_SystemX11 *system,
|
|||
return;
|
||||
}
|
||||
|
||||
unsigned int xattributes_valuemask = 0;
|
||||
uint xattributes_valuemask = 0;
|
||||
|
||||
XSetWindowAttributes xattributes;
|
||||
memset(&xattributes, 0, sizeof(xattributes));
|
||||
|
@ -202,7 +203,7 @@ GHOST_WindowX11::GHOST_WindowX11(GHOST_SystemX11 *system,
|
|||
XA_ATOM,
|
||||
32,
|
||||
PropModeReplace,
|
||||
(unsigned char *)atoms,
|
||||
(uchar *)atoms,
|
||||
count);
|
||||
m_post_init = False;
|
||||
}
|
||||
|
@ -300,7 +301,7 @@ GHOST_WindowX11::GHOST_WindowX11(GHOST_SystemX11 *system,
|
|||
XA_CARDINAL,
|
||||
32,
|
||||
PropModeReplace,
|
||||
(unsigned char *)BLENDER_ICONS_WM_X11,
|
||||
(uchar *)BLENDER_ICONS_WM_X11,
|
||||
ARRAY_SIZE(BLENDER_ICONS_WM_X11));
|
||||
}
|
||||
|
||||
|
@ -308,14 +309,8 @@ GHOST_WindowX11::GHOST_WindowX11(GHOST_SystemX11 *system,
|
|||
{
|
||||
Atom _NET_WM_PID = XInternAtom(m_display, "_NET_WM_PID", False);
|
||||
pid_t pid = getpid();
|
||||
XChangeProperty(m_display,
|
||||
m_window,
|
||||
_NET_WM_PID,
|
||||
XA_CARDINAL,
|
||||
32,
|
||||
PropModeReplace,
|
||||
(unsigned char *)&pid,
|
||||
1);
|
||||
XChangeProperty(
|
||||
m_display, m_window, _NET_WM_PID, XA_CARDINAL, 32, PropModeReplace, (uchar *)&pid, 1);
|
||||
}
|
||||
|
||||
/* set the hostname (WM_CLIENT_MACHINE) */
|
||||
|
@ -399,7 +394,7 @@ bool GHOST_WindowX11::createX11_XIC()
|
|||
if (!m_xic)
|
||||
return false;
|
||||
|
||||
unsigned long fevent;
|
||||
ulong fevent;
|
||||
XGetICValues(m_xic, XNFilterEvents, &fevent, nullptr);
|
||||
XSelectInput(m_display,
|
||||
m_window,
|
||||
|
@ -462,14 +457,8 @@ void GHOST_WindowX11::setTitle(const char *title)
|
|||
{
|
||||
Atom name = XInternAtom(m_display, "_NET_WM_NAME", 0);
|
||||
Atom utf8str = XInternAtom(m_display, "UTF8_STRING", 0);
|
||||
XChangeProperty(m_display,
|
||||
m_window,
|
||||
name,
|
||||
utf8str,
|
||||
8,
|
||||
PropModeReplace,
|
||||
(const unsigned char *)title,
|
||||
strlen(title));
|
||||
XChangeProperty(
|
||||
m_display, m_window, name, utf8str, 8, PropModeReplace, (const uchar *)title, strlen(title));
|
||||
|
||||
/* This should convert to valid x11 string
|
||||
* and getTitle would need matching change */
|
||||
|
@ -499,7 +488,7 @@ void GHOST_WindowX11::getClientBounds(GHOST_Rect &bounds) const
|
|||
{
|
||||
Window root_return;
|
||||
int x_return, y_return;
|
||||
unsigned int w_return, h_return, border_w_return, depth_return;
|
||||
uint w_return, h_return, border_w_return, depth_return;
|
||||
int32_t screen_x, screen_y;
|
||||
|
||||
XGetGeometry(m_display,
|
||||
|
@ -523,7 +512,7 @@ void GHOST_WindowX11::getClientBounds(GHOST_Rect &bounds) const
|
|||
GHOST_TSuccess GHOST_WindowX11::setClientWidth(uint32_t width)
|
||||
{
|
||||
XWindowChanges values;
|
||||
unsigned int value_mask = CWWidth;
|
||||
uint value_mask = CWWidth;
|
||||
values.width = width;
|
||||
XConfigureWindow(m_display, m_window, value_mask, &values);
|
||||
|
||||
|
@ -533,7 +522,7 @@ GHOST_TSuccess GHOST_WindowX11::setClientWidth(uint32_t width)
|
|||
GHOST_TSuccess GHOST_WindowX11::setClientHeight(uint32_t height)
|
||||
{
|
||||
XWindowChanges values;
|
||||
unsigned int value_mask = CWHeight;
|
||||
uint value_mask = CWHeight;
|
||||
values.height = height;
|
||||
XConfigureWindow(m_display, m_window, value_mask, &values);
|
||||
return GHOST_kSuccess;
|
||||
|
@ -542,7 +531,7 @@ GHOST_TSuccess GHOST_WindowX11::setClientHeight(uint32_t height)
|
|||
GHOST_TSuccess GHOST_WindowX11::setClientSize(uint32_t width, uint32_t height)
|
||||
{
|
||||
XWindowChanges values;
|
||||
unsigned int value_mask = CWWidth | CWHeight;
|
||||
uint value_mask = CWWidth | CWHeight;
|
||||
values.width = width;
|
||||
values.height = height;
|
||||
XConfigureWindow(m_display, m_window, value_mask, &values);
|
||||
|
@ -586,7 +575,7 @@ GHOST_TSuccess GHOST_WindowX11::setDialogHints(GHOST_WindowX11 *parentWindow)
|
|||
XA_ATOM,
|
||||
32,
|
||||
PropModeReplace,
|
||||
(unsigned char *)&atom_dialog,
|
||||
(uchar *)&atom_dialog,
|
||||
1);
|
||||
XSetTransientForHint(m_display, m_window, parentWindow->m_window);
|
||||
|
||||
|
@ -603,7 +592,7 @@ GHOST_TSuccess GHOST_WindowX11::setDialogHints(GHOST_WindowX11 *parentWindow)
|
|||
m_system->m_atom._MOTIF_WM_HINTS,
|
||||
32,
|
||||
PropModeReplace,
|
||||
(unsigned char *)&hints,
|
||||
(uchar *)&hints,
|
||||
4);
|
||||
|
||||
return GHOST_kSuccess;
|
||||
|
@ -638,7 +627,7 @@ int GHOST_WindowX11::icccmGetState() const
|
|||
CARD32 state;
|
||||
XID icon;
|
||||
} * prop_ret;
|
||||
unsigned long bytes_after, num_ret;
|
||||
ulong bytes_after, num_ret;
|
||||
Atom type_ret;
|
||||
int ret, format_ret;
|
||||
CARD32 st;
|
||||
|
@ -655,7 +644,7 @@ int GHOST_WindowX11::icccmGetState() const
|
|||
&format_ret,
|
||||
&num_ret,
|
||||
&bytes_after,
|
||||
((unsigned char **)&prop_ret));
|
||||
((uchar **)&prop_ret));
|
||||
if ((ret == Success) && (prop_ret != nullptr) && (num_ret == 2)) {
|
||||
st = prop_ret->state;
|
||||
}
|
||||
|
@ -702,7 +691,7 @@ void GHOST_WindowX11::netwmMaximized(bool set)
|
|||
bool GHOST_WindowX11::netwmIsMaximized() const
|
||||
{
|
||||
Atom *prop_ret;
|
||||
unsigned long bytes_after, num_ret, i;
|
||||
ulong bytes_after, num_ret, i;
|
||||
Atom type_ret;
|
||||
bool st;
|
||||
int format_ret, ret, count;
|
||||
|
@ -720,7 +709,7 @@ bool GHOST_WindowX11::netwmIsMaximized() const
|
|||
&format_ret,
|
||||
&num_ret,
|
||||
&bytes_after,
|
||||
(unsigned char **)&prop_ret);
|
||||
(uchar **)&prop_ret);
|
||||
if ((ret == Success) && (prop_ret) && (format_ret == 32)) {
|
||||
count = 0;
|
||||
for (i = 0; i < num_ret; i++) {
|
||||
|
@ -775,7 +764,7 @@ void GHOST_WindowX11::netwmFullScreen(bool set)
|
|||
bool GHOST_WindowX11::netwmIsFullScreen() const
|
||||
{
|
||||
Atom *prop_ret;
|
||||
unsigned long bytes_after, num_ret, i;
|
||||
ulong bytes_after, num_ret, i;
|
||||
Atom type_ret;
|
||||
bool st;
|
||||
int format_ret, ret;
|
||||
|
@ -793,7 +782,7 @@ bool GHOST_WindowX11::netwmIsFullScreen() const
|
|||
&format_ret,
|
||||
&num_ret,
|
||||
&bytes_after,
|
||||
(unsigned char **)&prop_ret);
|
||||
(uchar **)&prop_ret);
|
||||
if ((ret == Success) && (prop_ret) && (format_ret == 32)) {
|
||||
for (i = 0; i < num_ret; i++) {
|
||||
if (prop_ret[i] == m_system->m_atom._NET_WM_STATE_FULLSCREEN) {
|
||||
|
@ -827,14 +816,14 @@ void GHOST_WindowX11::motifFullScreen(bool set)
|
|||
m_system->m_atom._MOTIF_WM_HINTS,
|
||||
32,
|
||||
PropModeReplace,
|
||||
(unsigned char *)&hints,
|
||||
(uchar *)&hints,
|
||||
4);
|
||||
}
|
||||
|
||||
bool GHOST_WindowX11::motifIsFullScreen() const
|
||||
{
|
||||
MotifWmHints *prop_ret;
|
||||
unsigned long bytes_after, num_ret;
|
||||
ulong bytes_after, num_ret;
|
||||
Atom type_ret;
|
||||
bool state;
|
||||
int format_ret, st;
|
||||
|
@ -852,7 +841,7 @@ bool GHOST_WindowX11::motifIsFullScreen() const
|
|||
&format_ret,
|
||||
&num_ret,
|
||||
&bytes_after,
|
||||
(unsigned char **)&prop_ret);
|
||||
(uchar **)&prop_ret);
|
||||
if ((st == Success) && prop_ret) {
|
||||
if (prop_ret->flags & MWM_HINTS_DECORATIONS) {
|
||||
if (!prop_ret->decorations) {
|
||||
|
@ -1055,7 +1044,7 @@ bool GHOST_WindowX11::isDialog() const
|
|||
Atom atom_dialog = XInternAtom(m_display, "_NET_WM_WINDOW_TYPE_DIALOG", False);
|
||||
|
||||
Atom *prop_ret;
|
||||
unsigned long bytes_after, num_ret;
|
||||
ulong bytes_after, num_ret;
|
||||
Atom type_ret;
|
||||
bool st;
|
||||
int format_ret, ret;
|
||||
|
@ -1073,7 +1062,7 @@ bool GHOST_WindowX11::isDialog() const
|
|||
&format_ret,
|
||||
&num_ret,
|
||||
&bytes_after,
|
||||
(unsigned char **)&prop_ret);
|
||||
(uchar **)&prop_ret);
|
||||
if ((ret == Success) && (prop_ret) && (format_ret == 32)) {
|
||||
if (prop_ret[0] == atom_dialog) {
|
||||
st = True;
|
||||
|
@ -1127,7 +1116,7 @@ void GHOST_WindowX11::validate()
|
|||
|
||||
GHOST_WindowX11::~GHOST_WindowX11()
|
||||
{
|
||||
std::map<unsigned int, Cursor>::iterator it = m_standard_cursors.begin();
|
||||
std::map<uint, Cursor>::iterator it = m_standard_cursors.begin();
|
||||
for (; it != m_standard_cursors.end(); ++it) {
|
||||
XFreeCursor(m_display, it->second);
|
||||
}
|
||||
|
@ -1308,7 +1297,7 @@ GHOST_Context *GHOST_WindowX11::newDrawingContext(GHOST_TDrawingContextType type
|
|||
|
||||
GHOST_TSuccess GHOST_WindowX11::getStandardCursor(GHOST_TStandardCursor g_cursor, Cursor &xcursor)
|
||||
{
|
||||
unsigned int xcursor_id;
|
||||
uint xcursor_id;
|
||||
|
||||
switch (g_cursor) {
|
||||
case GHOST_kStandardCursorHelp:
|
||||
|
@ -1546,7 +1535,7 @@ GHOST_TSuccess GHOST_WindowX11::beginFullScreen() const
|
|||
{
|
||||
Window root_return;
|
||||
int x_return, y_return;
|
||||
unsigned int w_return, h_return, border_w_return, depth_return;
|
||||
uint w_return, h_return, border_w_return, depth_return;
|
||||
|
||||
XGetGeometry(m_display,
|
||||
m_window,
|
||||
|
|
|
@ -234,7 +234,7 @@ class GHOST_WindowX11 : public GHOST_Window {
|
|||
Cursor m_visible_cursor;
|
||||
|
||||
/** Cache of XC_* ID's to XCursor structures */
|
||||
std::map<unsigned int, Cursor> m_standard_cursors;
|
||||
std::map<uint, Cursor> m_standard_cursors;
|
||||
|
||||
GHOST_TaskBarX11 m_taskbar;
|
||||
|
||||
|
|
|
@ -342,7 +342,7 @@ void GHOST_Wintab::getInput(std::vector<GHOST_WintabInfoWin32> &outWintabInfo)
|
|||
* Positive values specify an angle upward toward the positive z axis; negative values
|
||||
* specify an angle downward toward the negative z axis.
|
||||
*
|
||||
* wintab.h defines orAltitude as a UINT but documents orAltitude as positive for upward
|
||||
* wintab.h defines orAltitude as a `uint` but documents orAltitude as positive for upward
|
||||
* angles and negative for downward angles. WACOM uses negative altitude values to show that
|
||||
* the pen is inverted; therefore we cast orAltitude as an (int) and then use the absolute
|
||||
* value.
|
||||
|
@ -397,7 +397,7 @@ void GHOST_Wintab::getInput(std::vector<GHOST_WintabInfoWin32> &outWintabInfo)
|
|||
}
|
||||
}
|
||||
|
||||
GHOST_TButton GHOST_Wintab::mapWintabToGhostButton(UINT cursor, WORD physicalButton)
|
||||
GHOST_TButton GHOST_Wintab::mapWintabToGhostButton(uint cursor, WORD physicalButton)
|
||||
{
|
||||
const WORD numButtons = 32;
|
||||
BYTE logicalButtons[numButtons] = {0};
|
||||
|
@ -502,7 +502,7 @@ void GHOST_Wintab::printContextDebugInfo()
|
|||
BYTE systemButtons[32] = {0};
|
||||
for (int i = 0; i < 3; i++) {
|
||||
printf("initializeWintab cursor %d buttons\n", i);
|
||||
UINT lbut = m_fpInfo(WTI_CURSORS + i, CSR_BUTTONMAP, &logicalButtons);
|
||||
uint lbut = m_fpInfo(WTI_CURSORS + i, CSR_BUTTONMAP, &logicalButtons);
|
||||
if (lbut) {
|
||||
printf("%d", logicalButtons[0]);
|
||||
for (int j = 1; j < lbut; j++) {
|
||||
|
@ -513,7 +513,7 @@ void GHOST_Wintab::printContextDebugInfo()
|
|||
else {
|
||||
printf("logical button error\n");
|
||||
}
|
||||
UINT sbut = m_fpInfo(WTI_CURSORS + i, CSR_SYSBTNMAP, &systemButtons);
|
||||
uint sbut = m_fpInfo(WTI_CURSORS + i, CSR_SYSBTNMAP, &systemButtons);
|
||||
if (sbut) {
|
||||
printf("%d", systemButtons[0]);
|
||||
for (int j = 1; j < sbut; j++) {
|
||||
|
@ -529,7 +529,7 @@ void GHOST_Wintab::printContextDebugInfo()
|
|||
/* Print context information. */
|
||||
|
||||
/* Print open context constraints. */
|
||||
UINT maxcontexts, opencontexts;
|
||||
uint maxcontexts, opencontexts;
|
||||
m_fpInfo(WTI_INTERFACE, IFC_NCONTEXTS, &maxcontexts);
|
||||
m_fpInfo(WTI_STATUS, STA_CONTEXTS, &opencontexts);
|
||||
printf("%u max contexts, %u open contexts\n", maxcontexts, opencontexts);
|
||||
|
@ -582,7 +582,7 @@ void GHOST_Wintab::printContextDebugInfo()
|
|||
printf("WTI_DEFSYSCTX CTX_*\n");
|
||||
printContextRanges(lc);
|
||||
|
||||
for (unsigned int i = 0; i < m_numDevices; i++) {
|
||||
for (uint i = 0; i < m_numDevices; i++) {
|
||||
/* Print individual device system context. */
|
||||
m_fpInfo(WTI_DSCTXS + i, 0, &lc);
|
||||
printf("WTI_DSCTXS %u\n", i);
|
||||
|
|
|
@ -467,7 +467,7 @@ void GHOST_XrControllerModel::loadControllerModel(XrSession session)
|
|||
std::string *p2,
|
||||
int p3,
|
||||
int p4,
|
||||
const unsigned char *p5,
|
||||
const uchar *p5,
|
||||
int p6,
|
||||
void *user_pointer) -> bool {
|
||||
(void)img;
|
||||
|
|
Loading…
Reference in New Issue