|
Blender V4.3
|
#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_DisplayManagerWin32.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 * | 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 102 of file GHOST_SystemWin32.cc.
| #define DEVICE_COUNT 1 |
Referenced by initRawInput().
| #define VK_BACK_QUOTE 0xC0 |
Definition at line 71 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_BACK_SLASH 0xDC |
Definition at line 77 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_CLOSE_BRACKET 0xDD |
Definition at line 86 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_COMMA 0xBC |
Definition at line 68 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_EQUALS 0xBB |
Definition at line 80 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_GR_LESS 0xE2 |
Definition at line 89 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_MINUS 0xBD |
Definition at line 59 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_OPEN_BRACKET 0xDB |
Definition at line 83 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_PERIOD 0xBE |
Definition at line 65 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_SEMICOLON 0xBA |
Definition at line 62 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| #define VK_SLASH 0xBF |
Definition at line 74 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::convertKey().
| typedef BOOL(API * GHOST_WIN32_EnableNonClientDpiScaling) (HWND) |
Definition at line 164 of file GHOST_SystemWin32.cc.
Definition at line 2407 of file GHOST_SystemWin32.cc.
References quad, triple(), and w().
Referenced by GHOST_SystemWin32::getClipboardImage().
Definition at line 2493 of file GHOST_SystemWin32.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, IB_rect, IMB_freeImBuf(), IMB_ibImageFromMemory(), 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 233 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::processWheelEvent(), GHOST_SystemWin32::processWindowEvent(), GHOST_SystemWin32::processWindowSizeEvent(), GHOST_SystemWin32::processWintabEvent(), and GHOST_SystemWin32::pushDragDropEvent().
|
static |
Definition at line 2714 of file GHOST_SystemWin32.cc.
Referenced by isStartedFromCommandPrompt().
Definition at line 2738 of file GHOST_SystemWin32.cc.
Referenced by isStartedFromCommandPrompt().
|
static |
Definition at line 133 of file GHOST_SystemWin32.cc.
References DEVICE_COUNT, and GHOST_PRINTF.
Referenced by GHOST_SystemWin32::init().
|
static |
Definition at line 2750 of file GHOST_SystemWin32.cc.
References GetParentProcessID(), and getProcessName().
Referenced by GHOST_SystemWin32::setConsoleWindowState(), and GHOST_SystemWin32::~GHOST_SystemWin32().
Definition at line 2558 of file GHOST_SystemWin32.cc.
Referenced by GHOST_SystemWin32::putClipboardImage().
Definition at line 2607 of file GHOST_SystemWin32.cc.
References ImBufByteBuffer::data, ImBuf::encoded_buffer, ImBuf::encoded_buffer_size, ImBuf::foptions, ImBuf::ftype, IB_mem, IB_rect, IMB_allocFromBuffer(), IMB_freeImBuf(), IMB_FTYPE_PNG, IMB_saveiff(), and ImbFormatOptions::quality.
Referenced by GHOST_SystemWin32::putClipboardImage().
|
static |
Definition at line 124 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 111 of file GHOST_SystemWin32.cc.
Referenced by translateLongButtonToNDOFButton().