|
Blender V5.0
|
#include <limits>#include <map>#include "GHOST_EventDragnDrop.hh"#include "GHOST_EventTrackpad.hh"#include "GHOST_SystemWin32.hh"#include <commctrl.h>#include <dwmapi.h>#include <psapi.h>#include <shellapi.h>#include <shellscalingapi.h>#include <shlobj.h>#include <tlhelp32.h>#include <windowsx.h>#include "utf_winfunc.hh"#include "utfconv.hh"#include "IMB_imbuf.hh"#include "IMB_imbuf_types.hh"#include "GHOST_EventButton.hh"#include "GHOST_EventCursor.hh"#include "GHOST_EventKey.hh"#include "GHOST_EventWheel.hh"#include "GHOST_TimerManager.hh"#include "GHOST_TimerTask.hh"#include "GHOST_WindowManager.hh"#include "GHOST_WindowWin32.hh"#include "GHOST_ContextD3D.hh"Go to the source code of this file.
Macros | |
| #define | _WIN32_IE 0x0501 /* shipped before XP, so doesn't impose additional requirements */ |
| #define | VK_MINUS 0xBD |
| #define | VK_SEMICOLON 0xBA |
| #define | VK_PERIOD 0xBE |
| #define | VK_COMMA 0xBC |
| #define | VK_BACK_QUOTE 0xC0 |
| #define | VK_SLASH 0xBF |
| #define | VK_BACK_SLASH 0xDC |
| #define | VK_EQUALS 0xBB |
| #define | VK_OPEN_BRACKET 0xDB |
| #define | VK_CLOSE_BRACKET 0xDD |
| #define | VK_GR_LESS 0xE2 |
| #define | BROKEN_PEEK_TOUCHPAD |
| #define | DEVICE_COUNT 1 |
Typedefs | |
| typedef BOOL(API * | GHOST_WIN32_EnableNonClientDpiScaling) (HWND) |
Functions | |
| static bool | isStartedFromCommandPrompt () |
| static GHOST_NDOF_ButtonT | translateLongButtonToNDOFButton (uint16_t longKey) |
| static void | initRawInput () |
| static uint64_t | getMessageTime (GHOST_SystemWin32 *system) |
| static uint * | getClipboardImageFilepath (int *r_width, int *r_height) |
| static uint * | getClipboardImageDibV5 (int *r_width, int *r_height) |
| static uint * | getClipboardImageImBuf (int *r_width, int *r_height, UINT format) |
| static bool | putClipboardImageDibV5 (uint *rgba, int width, int height) |
| static bool | putClipboardImagePNG (uint *rgba, int width, int height) |
| static DWORD | GetParentProcessID (void) |
| static bool | getProcessName (int pid, char *buffer, int max_len) |
Variables | |
| static const std::map< uint16_t, GHOST_NDOF_ButtonT > | longButtonHIDsToGHOST_NDOFButtons |
| #define _WIN32_IE 0x0501 /* shipped before XP, so doesn't impose additional requirements */ |
Definition at line 17 of file GHOST_SystemWin32.cc.
| #define BROKEN_PEEK_TOUCHPAD |
Workaround for some laptop touch-pads, some of which seems to have driver issues which makes it so window function receives the message, but #PeekMessage doesn't pick those messages for some reason.
We send a dummy WM_USER message to force #PeekMessage to receive something, making it so blender's window manager sees the new messages coming in.
Definition at line 101 of file GHOST_SystemWin32.cc.
| #define DEVICE_COUNT 1 |
Referenced by initRawInput().
| #define VK_BACK_QUOTE 0xC0 |
Definition at line 70 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_BACK_SLASH 0xDC |
Definition at line 76 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_CLOSE_BRACKET 0xDD |
Definition at line 85 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_COMMA 0xBC |
Definition at line 67 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_EQUALS 0xBB |
Definition at line 79 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_GR_LESS 0xE2 |
Definition at line 88 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_MINUS 0xBD |
Definition at line 58 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_OPEN_BRACKET 0xDB |
Definition at line 82 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_PERIOD 0xBE |
Definition at line 64 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_SEMICOLON 0xBA |
Definition at line 61 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_SLASH 0xBF |
Definition at line 73 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| typedef BOOL(API * GHOST_WIN32_EnableNonClientDpiScaling) (HWND) |
Definition at line 163 of file GHOST_SystemWin32.cc.
|
static |
Definition at line 2581 of file GHOST_SystemWin32.cc.
References i, quad, triple(), and w().
Referenced by GHOST_SystemWin32::getClipboardImage().
|
static |
Definition at line 2543 of file GHOST_SystemWin32.cc.
References alloc_utf_8_from_16(), ImBuf::byte_buffer, ImBufByteBuffer::data, free(), IB_byte_data, IB_multilayer, IMB_freeImBuf(), IMB_load_image_from_filepath(), ImBuf::x, and ImBuf::y.
Referenced by GHOST_SystemWin32::getClipboardImage().
|
static |
Definition at line 2667 of file GHOST_SystemWin32.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, IB_byte_data, IMB_freeImBuf(), IMB_load_image_from_memory(), ImBuf::x, and ImBuf::y.
Referenced by GHOST_SystemWin32::getClipboardImage().
|
static |
Returns the message time, compatible with the time value from #getMilliSeconds. This should be used instead of #getMilliSeconds when you need the time a message was delivered versus collected, so for all event creation that are in response to receiving a Windows message.
Definition at line 232 of file GHOST_SystemWin32.cc.
References GHOST_SystemWin32::getMilliSeconds(), and UINT32_MAX.
Referenced by GHOST_SystemWin32::processButtonEvent(), GHOST_SystemWin32::processCursorEvent(), GHOST_SystemWin32::processKeyEvent(), GHOST_SystemWin32::processTrackpad(), GHOST_SystemWin32::processWheelEventHorizontal(), GHOST_SystemWin32::processWheelEventVertical(), GHOST_SystemWin32::processWindowEvent(), GHOST_SystemWin32::processWindowSizeEvent(), GHOST_SystemWin32::processWintabEvent(), and GHOST_SystemWin32::pushDragDropEvent().
|
static |
Definition at line 2892 of file GHOST_SystemWin32.cc.
Referenced by isStartedFromCommandPrompt().
|
static |
Definition at line 2916 of file GHOST_SystemWin32.cc.
Referenced by isStartedFromCommandPrompt().
|
static |
Definition at line 132 of file GHOST_SystemWin32.cc.
References DEVICE_COUNT, and GHOST_PRINTF.
Referenced by GHOST_SystemWin32::init().
|
static |
Definition at line 2928 of file GHOST_SystemWin32.cc.
References GetParentProcessID(), and getProcessName().
Referenced by GHOST_SystemWin32::setConsoleWindowState(), and GHOST_SystemWin32::~GHOST_SystemWin32().
|
static |
Definition at line 2736 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::putClipboardImage().
|
static |
Definition at line 2785 of file GHOST_SystemWin32.cc.
References ImBufByteBuffer::data, ImBuf::encoded_buffer, ImBuf::encoded_buffer_size, ImBuf::foptions, ImBuf::ftype, IB_byte_data, IB_mem, IMB_allocFromBuffer(), IMB_freeImBuf(), IMB_FTYPE_PNG, IMB_save_image(), and ImbFormatOptions::quality.
Referenced by GHOST_SystemWin32::putClipboardImage().
|
static |
Definition at line 123 of file GHOST_SystemWin32.cc.
References longButtonHIDsToGHOST_NDOFButtons.
|
static |
SpaceMouse devices ship with an internal identifier number for each long press event. These values can be found in <3DxWare installation path>/3DxWinCore/Cfg/Base.xml. For input processing purposes these identifiers have to be mapped to particular button events.
Definition at line 110 of file GHOST_SystemWin32.cc.
Referenced by translateLongButtonToNDOFButton().