24 #define _USE_MATH_DEFINES
35 #if defined(WITH_GL_EGL)
40 #ifdef WIN32_COMPOSITING
49 #ifndef GET_POINTERID_WPARAM
50 # define GET_POINTERID_WPARAM(wParam) (LOWORD(wParam))
53 const wchar_t *GHOST_WindowWin32::s_windowClassName =
L"GHOST_WindowClass";
54 const int GHOST_WindowWin32::s_maxTitleLength = 128;
58 __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
69 bool wantStereoVisual,
75 m_tabletInRange(false),
76 m_inLiveResize(false),
80 m_hasMouseCaptured(false),
81 m_hasGrabMouse(false),
84 m_wantAlphaBackground(alphaBackground),
87 m_fpGetPointerInfoHistory(
NULL),
88 m_fpGetPointerPenInfoHistory(
NULL),
89 m_fpGetPointerTouchInfoHistory(
NULL),
90 m_parentWindowHwnd(parentwindow ? parentwindow->m_hWnd : HWND_DESKTOP),
91 m_debug_context(is_debug)
97 memset(&m_wintab, 0,
sizeof(m_wintab));
100 DWORD style = parentwindow ?
101 WS_POPUPWINDOW | WS_CAPTION | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SIZEBOX :
105 style |= WS_MAXIMIZE;
109 DWORD extended_style = parentwindow ? WS_EX_APPWINDOW : 0;
119 MONITORINFOEX monitor;
120 monitor.cbSize =
sizeof(MONITORINFOEX);
122 GetMonitorInfo(MonitorFromRect(&win_rect, MONITOR_DEFAULTTONEAREST), &monitor);
125 AdjustWindowRectEx(&win_rect, WS_CAPTION,
FALSE, 0);
126 width =
min(monitor.rcWork.right - monitor.rcWork.left, win_rect.right - win_rect.left);
127 left =
min(
max(monitor.rcWork.left, win_rect.left), monitor.rcWork.right -
width);
128 height =
min(monitor.rcWork.bottom - monitor.rcWork.top, win_rect.bottom - win_rect.top);
129 top =
min(
max(monitor.rcWork.top, win_rect.top), monitor.rcWork.bottom -
height);
131 m_hWnd = ::CreateWindowExW(extended_style,
141 ::GetModuleHandle(0),
145 m_user32 = ::LoadLibrary(
"user32.dll");
156 GetProcAddress(m_user32,
"RegisterTouchWindow");
157 if (pRegisterTouchWindow) {
158 pRegisterTouchWindow(m_hWnd, 0);
166 ::RegisterDragDrop(m_hWnd, m_dropTarget);
170 ::SetWindowLongPtr(m_hWnd, GWLP_USERDATA, (LONG_PTR)
this);
174 ::SetWindowPos(m_hWnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
178 m_hDC = ::GetDC(m_hWnd);
187 nCmdShow = SW_SHOWMAXIMIZED;
190 nCmdShow = (m_system->
m_windowFocus) ? SW_SHOWMINIMIZED : SW_SHOWMINNOACTIVE;
194 nCmdShow = (m_system->
m_windowFocus) ? SW_SHOWNORMAL : SW_SHOWNOACTIVATE;
198 ::ShowWindow(m_hWnd, nCmdShow);
199 #ifdef WIN32_COMPOSITING
200 if (alphaBackground && parentwindowhwnd == 0) {
205 DWM_BLURBEHIND bb = {0};
208 bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION;
210 bb.hRgnBlur = CreateRectRgn(0, 0, -1, -1);
213 hr = DwmEnableBlurBehindWindow(m_hWnd, &bb);
214 DeleteObject(bb.hRgnBlur);
218 ::UpdateWindow(m_hWnd);
222 ::DestroyWindow(m_hWnd);
230 m_user32,
"GetPointerInfoHistory");
232 m_user32,
"GetPointerPenInfoHistory");
234 m_user32,
"GetPointerTouchInfoHistory");
238 m_wintab.handle = ::LoadLibrary(
"Wintab32.dll");
241 m_wintab.info = (GHOST_WIN32_WTInfo)::GetProcAddress(m_wintab.handle,
"WTInfoA");
251 lc.lcOptions |= CXO_SYSTEM;
252 if (m_wintab.open && m_wintab.info && m_wintab.info(WTI_DEFSYSCTX, 0, &lc)) {
255 AXIS TabletX, TabletY, Pressure, Orientation[3];
262 lc.lcOptions |= CXO_MESSAGES;
266 m_wintab.info(WTI_DEVICES, DVC_X, &TabletX);
267 m_wintab.info(WTI_DEVICES, DVC_Y, &TabletY);
270 BOOL pressureSupport = m_wintab.info(WTI_DEVICES, DVC_NPRESSURE, &Pressure);
272 m_wintab.maxPressure = Pressure.axMax;
274 m_wintab.maxPressure = 0;
277 BOOL tiltSupport = m_wintab.info(WTI_DEVICES, DVC_ORIENTATION, &Orientation);
280 if (Orientation[0].axResolution && Orientation[1].axResolution) {
282 m_wintab.maxAzimuth = Orientation[0].axMax;
283 m_wintab.maxAltitude = Orientation[1].axMax;
286 m_wintab.maxAzimuth = m_wintab.maxAltitude = 0;
291 m_wintab.tablet = m_wintab.open(m_hWnd, &lc,
FALSE);
292 if (m_wintab.enable && m_wintab.tablet) {
293 m_wintab.enable(m_wintab.tablet, TRUE);
309 if (m_wintab.handle) {
310 if (m_wintab.close && m_wintab.tablet) {
311 m_wintab.close(m_wintab.tablet);
314 FreeLibrary(m_wintab.handle);
315 memset(&m_wintab, 0,
sizeof(m_wintab));
319 FreeLibrary(m_user32);
321 m_fpGetPointerInfoHistory =
NULL;
322 m_fpGetPointerPenInfoHistory =
NULL;
323 m_fpGetPointerTouchInfoHistory =
NULL;
326 if (m_customCursor) {
327 DestroyCursor(m_customCursor);
328 m_customCursor =
NULL;
332 ::ReleaseDC(m_hWnd, m_hDC);
341 if (iter_winwin->m_parentWindowHwnd == m_hWnd) {
342 ::SetWindowLongPtr(iter_winwin->m_hWnd, GWLP_HWNDPARENT,
NULL);
343 iter_winwin->m_parentWindowHwnd = 0;
349 RevokeDragDrop(m_hWnd);
354 ::SetWindowLongPtr(m_hWnd, GWLP_USERDATA,
NULL);
355 ::DestroyWindow(m_hWnd);
373 ::SetWindowTextW(m_hWnd, (
wchar_t *)title_16);
379 std::wstring wtitle(::GetWindowTextLengthW(m_hWnd) + 1,
L'\0');
380 ::GetWindowTextW(m_hWnd, &wtitle[0], wtitle.capacity());
391 ::GetWindowRect(m_hWnd, &rect);
402 if (!IsIconic(m_hWnd)) {
403 ::GetClientRect(m_hWnd, &rect);
407 ::ClientToScreen(m_hWnd, &coord);
412 coord.x = rect.right;
413 coord.y = rect.bottom;
414 ::ClientToScreen(m_hWnd, &coord);
436 success = ::SetWindowPos(m_hWnd, HWND_TOP, 0, 0, cx, cy, SWP_NOMOVE | SWP_NOZORDER) ?
455 success = ::SetWindowPos(m_hWnd, HWND_TOP, 0, 0, cx, cy, SWP_NOMOVE | SWP_NOZORDER) ?
474 success = ::SetWindowPos(m_hWnd, HWND_TOP, 0, 0, cx, cy, SWP_NOMOVE | SWP_NOZORDER) ?
486 if (::IsIconic(m_hWnd)) {
489 else if (::IsZoomed(m_hWnd)) {
490 LONG_PTR
result = ::GetWindowLongPtr(m_hWnd, GWL_STYLE);
501 POINT point = {inX, inY};
502 ::ScreenToClient(m_hWnd, &point);
512 POINT point = {inX, inY};
513 ::ClientToScreen(m_hWnd, &point);
521 LONG_PTR style = GetWindowLongPtr(m_hWnd, GWL_STYLE) | WS_CAPTION;
523 wp.length =
sizeof(WINDOWPLACEMENT);
524 ::GetWindowPlacement(m_hWnd, &wp);
528 wp.showCmd = SW_MINIMIZE;
531 wp.showCmd = SW_SHOWMAXIMIZED;
535 m_normal_state = curstate;
537 wp.showCmd = SW_SHOWMAXIMIZED;
538 wp.ptMaxPosition.x = 0;
539 wp.ptMaxPosition.y = 0;
540 style &= ~(WS_CAPTION | WS_MAXIMIZE);
546 wp.showCmd = SW_SHOWMAXIMIZED;
550 wp.showCmd = SW_SHOWNORMAL;
554 ::SetWindowLongPtr(m_hWnd, GWL_STYLE, style);
556 ::SetWindowPos(m_hWnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
562 HWND hWndInsertAfter, hWndToRaise;
565 hWndInsertAfter = HWND_BOTTOM;
566 hWndToRaise = ::GetWindow(m_hWnd, GW_HWNDNEXT);
572 hWndInsertAfter = HWND_TOP;
576 if (::SetWindowPos(m_hWnd, hWndInsertAfter, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE) ==
FALSE) {
581 ::SetWindowPos(hWndToRaise, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE) ==
FALSE) {
604 #if defined(WITH_GL_PROFILE_CORE)
609 for (
int minor = 5; minor >= 0; --minor) {
611 m_wantAlphaBackground,
614 WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
617 (m_debug_context ? WGL_CONTEXT_DEBUG_BIT_ARB : 0),
620 if (
context->initializeDrawingContext()) {
628 m_wantAlphaBackground,
631 WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
634 (m_debug_context ? WGL_CONTEXT_DEBUG_BIT_ARB : 0),
637 if (
context->initializeDrawingContext()) {
642 "A graphics card and driver with support for OpenGL 3.3 or higher is required.\n"
643 "Installing the latest driver for your graphics card may resolve the issue.\n\n"
644 "The program will now close.",
645 "Blender - Unsupported Graphics Card or Driver",
646 MB_OK | MB_ICONERROR);
651 #elif defined(WITH_GL_PROFILE_COMPAT)
656 m_wantAlphaBackground,
662 (m_debug_context ? WGL_CONTEXT_DEBUG_BIT_ARB : 0),
665 if (
context->initializeDrawingContext()) {
675 else if (
type == GHOST_kDrawingContextTypeD3D) {
679 if (
context->initializeDrawingContext()) {
694 if (m_hasMouseCaptured) {
695 m_hasGrabMouse =
false;
696 m_nPressedButtons = 0;
697 m_hasMouseCaptured =
false;
713 if (m_nPressedButtons)
717 m_hasGrabMouse =
true;
720 m_hasGrabMouse =
false;
724 if (!m_nPressedButtons && !m_hasGrabMouse && m_hasMouseCaptured) {
726 m_hasMouseCaptured =
false;
728 else if ((m_nPressedButtons || m_hasGrabMouse) && !m_hasMouseCaptured) {
729 ::SetCapture(m_hWnd);
730 m_hasMouseCaptured =
true;
737 HANDLE cursor =
NULL;
738 HMODULE
module = ::GetModuleHandle(0);
744 if (m_customCursor) {
745 return m_customCursor;
751 cursor = ::LoadImage(
module,
"arrowright_cursor", IMAGE_CURSOR, cx, cy, flags);
754 cursor = ::LoadImage(
module,
"arrowleft_cursor", IMAGE_CURSOR, cx, cy, flags);
757 cursor = ::LoadImage(
module,
"arrowup_cursor", IMAGE_CURSOR, cx, cy, flags);
760 cursor = ::LoadImage(
module,
"arrowdown_cursor", IMAGE_CURSOR, cx, cy, flags);
763 cursor = ::LoadImage(
module,
"splitv_cursor", IMAGE_CURSOR, cx, cy, flags);
766 cursor = ::LoadImage(
module,
"splith_cursor", IMAGE_CURSOR, cx, cy, flags);
769 cursor = ::LoadImage(
module,
"knife_cursor", IMAGE_CURSOR, cx, cy, flags);
772 cursor = ::LoadImage(
module,
"eyedropper_cursor", IMAGE_CURSOR, cx, cy, flags);
775 cursor = ::LoadImage(
module,
"zoomin_cursor", IMAGE_CURSOR, cx, cy, flags);
778 cursor = ::LoadImage(
module,
"zoomout_cursor", IMAGE_CURSOR, cx, cy, flags);
781 cursor = ::LoadImage(
module,
"handopen_cursor", IMAGE_CURSOR, cx, cy, flags);
784 cursor = ::LoadImage(
module,
"scrollnsew_cursor", IMAGE_CURSOR, cx, cy, flags);
787 cursor = ::LoadImage(
module,
"scrollns_cursor", IMAGE_CURSOR, cx, cy, flags);
790 cursor = ::LoadImage(
module,
"scrollew_cursor", IMAGE_CURSOR, cx, cy, flags);
793 cursor = ::LoadImage(
NULL, IDC_HELP, IMAGE_CURSOR, cx, cy, flags);
796 cursor = ::LoadImage(
NULL, IDC_WAIT, IMAGE_CURSOR, cx, cy, flags);
799 cursor = ::LoadImage(
NULL, IDC_IBEAM, IMAGE_CURSOR, cx, cy, flags);
802 cursor = ::LoadImage(
module,
"cross_cursor", IMAGE_CURSOR, cx, cy, flags);
805 cursor = ::LoadImage(
module,
"crossA_cursor", IMAGE_CURSOR, cx, cy, flags);
808 cursor = ::LoadImage(
module,
"crossB_cursor", IMAGE_CURSOR, cx, cy, flags);
811 cursor = ::LoadImage(
module,
"crossC_cursor", IMAGE_CURSOR, cx, cy, flags);
815 cursor = ::LoadImage(
module,
"movens_cursor", IMAGE_CURSOR, cx, cy, flags);
819 cursor = ::LoadImage(
module,
"moveew_cursor", IMAGE_CURSOR, cx, cy, flags);
822 cursor = ::LoadImage(
NULL, IDC_UPARROW, IMAGE_CURSOR, cx, cy, flags);
825 cursor = ::LoadImage(
NULL, IDC_SIZENWSE, IMAGE_CURSOR, cx, cy, flags);
828 cursor = ::LoadImage(
NULL, IDC_SIZENESW, IMAGE_CURSOR, cx, cy, flags);
831 cursor = ::LoadImage(
NULL, IDC_SIZENWSE, IMAGE_CURSOR, cx, cy, flags);
834 cursor = ::LoadImage(
NULL, IDC_SIZENESW, IMAGE_CURSOR, cx, cy, flags);
837 cursor = ::LoadImage(
module,
"pencil_cursor", IMAGE_CURSOR, cx, cy, flags);
840 cursor = ::LoadImage(
module,
"eraser_cursor", IMAGE_CURSOR, cx, cy, flags);
844 cursor = ::LoadImage(
module,
"forbidden_cursor", IMAGE_CURSOR, cx, cy, flags);
853 if (cursor ==
NULL) {
854 cursor = ::LoadImage(
NULL, IDC_ARROW, IMAGE_CURSOR, cx, cy, flags);
857 return (HCURSOR)cursor;
863 while (::ShowCursor(
FALSE) >= 0)
867 while (::ShowCursor(TRUE) < 0)
872 if (cursor ==
NULL) {
878 GHOST_TSuccess GHOST_WindowWin32::setWindowCursorVisibility(
bool visible)
880 if (::GetForegroundWindow() == m_hWnd) {
895 setWindowCursorVisibility(
false);
902 setWindowCursorVisibility(
true);
925 if (::GetForegroundWindow() == m_hWnd) {
938 std::vector<GHOST_PointerInfoWin32> &outPointerInfo, WPARAM wParam, LPARAM lParam)
949 if (!(m_fpGetPointerInfoHistory && m_fpGetPointerInfoHistory(pointerId, &outCount,
NULL))) {
953 auto pointerPenInfo = std::vector<POINTER_PEN_INFO>(outCount);
954 outPointerInfo.resize(outCount);
956 if (!(m_fpGetPointerPenInfoHistory &&
957 m_fpGetPointerPenInfoHistory(pointerId, &outCount, pointerPenInfo.data()))) {
962 POINTER_INFO pointerApiInfo = pointerPenInfo[i].pointerInfo;
965 outPointerInfo[i].isPrimary = isPrimary;
994 outPointerInfo[i].tabletData.Pressure = 1.0f;
995 outPointerInfo[i].tabletData.Xtilt = 0.0f;
996 outPointerInfo[i].tabletData.Ytilt = 0.0f;
1000 outPointerInfo[i].tabletData.Pressure = pointerPenInfo[i].pressure / 1024.0f;
1008 outPointerInfo[i].tabletData.Xtilt = fmin(
fabs(pointerPenInfo[i].tiltX / 90.0f), 1.0f);
1012 outPointerInfo[i].tabletData.Ytilt = fmin(
fabs(pointerPenInfo[i].tiltY / 90.0f), 1.0f);
1025 if (m_wintab.enable && m_wintab.tablet) {
1026 m_wintab.enable(m_wintab.tablet,
state);
1028 if (m_wintab.overlap &&
state) {
1029 m_wintab.overlap(m_wintab.tablet, TRUE);
1040 if (m_wintab.tablet)
1057 if (m_wintab.info && m_wintab.tablet) {
1058 AXIS Pressure, Orientation[3];
1060 BOOL pressureSupport = m_wintab.info(WTI_DEVICES, DVC_NPRESSURE, &Pressure);
1061 if (pressureSupport)
1062 m_wintab.maxPressure = Pressure.axMax;
1064 m_wintab.maxPressure = 0;
1066 BOOL tiltSupport = m_wintab.info(WTI_DEVICES, DVC_ORIENTATION, &Orientation);
1069 if (Orientation[0].axResolution && Orientation[1].axResolution) {
1070 m_wintab.maxAzimuth = Orientation[0].axMax;
1071 m_wintab.maxAltitude = Orientation[1].axMax;
1074 m_wintab.maxAzimuth = m_wintab.maxAltitude = 0;
1088 if (m_wintab.packet && m_wintab.tablet) {
1090 if (m_wintab.packet((HCTX)lParam, wParam, &pkt)) {
1091 switch (pkt.pkCursor % 3) {
1103 if (m_wintab.maxPressure > 0) {
1104 m_tabletData.
Pressure = (
float)pkt.pkNormalPressure / (
float)m_wintab.maxPressure;
1110 if ((m_wintab.maxAzimuth > 0) && (m_wintab.maxAltitude > 0)) {
1111 ORIENTATION ort = pkt.pkOrientation;
1113 float altRad, azmRad;
1132 altRad = (
float)((
fabs((
float)ort.orAltitude) / (
float)m_wintab.maxAltitude) *
M_PI / 2.0);
1133 azmRad = (
float)(((
float)ort.orAzimuth / (
float)m_wintab.maxAzimuth) *
M_PI * 2.0);
1136 vecLen =
cos(altRad);
1139 m_tabletData.
Xtilt =
sin(azmRad) * vecLen;
1143 m_tabletData.
Xtilt = 0.0f;
1144 m_tabletData.
Ytilt = 0.0f;
1156 if (m_wintab.overlap && m_wintab.tablet) {
1157 m_wintab.overlap(m_wintab.tablet, TRUE);
1165 m_user32,
"GetDpiForWindow");
1167 if (fpGetDpiForWindow) {
1168 return fpGetDpiForWindow(this->m_hWnd);
1178 ch = ((ch >> 1) & 0x55) | ((ch << 1) & 0xAA);
1179 ch = ((ch >> 2) & 0x33) | ((ch << 2) & 0xCC);
1180 ch = ((ch >> 4) & 0x0F) | ((ch << 4) & 0xF0);
1188 shrt = ((shrt >> 1) & 0x5555) | ((shrt << 1) & 0xAAAA);
1189 shrt = ((shrt >> 2) & 0x3333) | ((shrt << 2) & 0xCCCC);
1190 shrt = ((shrt >> 4) & 0x0F0F) | ((shrt << 4) & 0xF0F0);
1191 shrt = ((shrt >> 8) & 0x00FF) | ((shrt << 8) & 0xFF00);
1202 bool canInvertColor)
1213 if (m_customCursor) {
1214 DestroyCursor(m_customCursor);
1215 m_customCursor =
NULL;
1218 memset(&andData, 0xFF,
sizeof(andData));
1219 memset(&xorData, 0,
sizeof(xorData));
1221 for (
y = 0;
y < sizeY;
y++) {
1224 for (
x = cols - 1;
x >= 0;
x--) {
1230 xorData[
y] = fullBitRow & fullMaskRow;
1231 andData[
y] = ~fullMaskRow;
1234 m_customCursor = ::CreateCursor(::GetModuleHandle(0), hotX, hotY, 32, 32, andData, xorData);
1235 if (!m_customCursor) {
1239 if (::GetForegroundWindow() == m_hWnd) {
1249 if (m_Bar && S_OK == m_Bar->
SetProgressValue(m_hWnd, 10000 * progress, 10000))
1263 #ifdef WITH_INPUT_IME
1264 void GHOST_WindowWin32::beginIME(
1267 m_imeInput.BeginIME(m_hWnd,
GHOST_Rect(
x,
y - h,
x,
y), (
bool)completed);
1270 void GHOST_WindowWin32::endIME()
1272 m_imeInput.EndIME(m_hWnd);
typedef float(TangentPoint)[2]
void BLI_kdtree_nd_() free(KDTree *tree)
#define GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY
#define USER_DEFAULT_SCREEN_DPI
const GUID CLSID_TaskbarList
@ GHOST_kWindowStateMinimized
@ GHOST_kWindowStateMaximized
@ GHOST_kWindowStateNormal
@ GHOST_kWindowStateFullScreen
@ GHOST_kStandardCursorBottomLeftCorner
@ GHOST_kStandardCursorZoomIn
@ GHOST_kStandardCursorVerticalSplit
@ GHOST_kStandardCursorHelp
@ GHOST_kStandardCursorWait
@ GHOST_kStandardCursorHorizontalSplit
@ GHOST_kStandardCursorTopSide
@ GHOST_kStandardCursorStop
@ GHOST_kStandardCursorCrosshair
@ GHOST_kStandardCursorCustom
@ GHOST_kStandardCursorNSEWScroll
@ GHOST_kStandardCursorLeftRight
@ GHOST_kStandardCursorPencil
@ GHOST_kStandardCursorNSScroll
@ GHOST_kStandardCursorCrosshairA
@ GHOST_kStandardCursorUpDown
@ GHOST_kStandardCursorUpArrow
@ GHOST_kStandardCursorBottomSide
@ GHOST_kStandardCursorTopLeftCorner
@ GHOST_kStandardCursorEyedropper
@ GHOST_kStandardCursorKnife
@ GHOST_kStandardCursorMove
@ GHOST_kStandardCursorCrosshairB
@ GHOST_kStandardCursorBottomRightCorner
@ GHOST_kStandardCursorDownArrow
@ GHOST_kStandardCursorEraser
@ GHOST_kStandardCursorDefault
@ GHOST_kStandardCursorEWScroll
@ GHOST_kStandardCursorRightArrow
@ GHOST_kStandardCursorTopRightCorner
@ GHOST_kStandardCursorDestroy
@ GHOST_kStandardCursorCrosshairC
@ GHOST_kStandardCursorZoomOut
@ GHOST_kStandardCursorLeftSide
@ GHOST_kStandardCursorText
@ GHOST_kStandardCursorLeftArrow
unsigned int GHOST_TUns32
static const GHOST_TabletData GHOST_TABLET_DATA_NONE
@ GHOST_kTabletModeEraser
@ GHOST_kTabletModeStylus
unsigned short GHOST_TUns16
GHOST_TDrawingContextType
@ GHOST_kDrawingContextTypeOpenGL
@ GHOST_kButtonMaskButton4
@ GHOST_kButtonMaskButton5
@ GHOST_kButtonMaskMiddle
@ GHOST_kWindowOrderBottom
unsigned char GHOST_TUns8
static GHOST_TUns16 uns16ReverseBits(GHOST_TUns16 shrt)
static GHOST_TUns8 uns8ReverseBits(GHOST_TUns8 ch)
__declspec(dllexport) DWORD NvOptimusEnablement=0x00000001
BOOL(API * GHOST_WIN32_WTOverlap)(HCTX, BOOL)
BOOL(API * GHOST_WIN32_WTEnable)(HCTX, BOOL)
UINT(API * GHOST_WIN32_GetDpiForWindow)(HWND)
#define IS_POINTER_PRIMARY_WPARAM(wParam)
HCTX(API * GHOST_WIN32_WTOpen)(HWND, LPLOGCONTEXTA, BOOL)
BOOL(API * GHOST_WIN32_WTClose)(HCTX)
#define GET_POINTERID_WPARAM(wParam)
@ POINTER_CHANGE_THIRDBUTTON_UP
@ POINTER_CHANGE_FIFTHBUTTON_UP
@ POINTER_CHANGE_FIRSTBUTTON_DOWN
@ POINTER_CHANGE_SECONDBUTTON_DOWN
@ POINTER_CHANGE_FOURTHBUTTON_DOWN
@ POINTER_CHANGE_FIFTHBUTTON_DOWN
@ POINTER_CHANGE_FOURTHBUTTON_UP
@ POINTER_CHANGE_THIRDBUTTON_DOWN
@ POINTER_CHANGE_SECONDBUTTON_UP
@ POINTER_CHANGE_FIRSTBUTTON_UP
BOOL(WINAPI * GHOST_WIN32_GetPointerPenInfoHistory)(UINT32 pointerId, UINT32 *entriesCount, POINTER_PEN_INFO *penInfo)
BOOL(WINAPI * GHOST_WIN32_GetPointerInfoHistory)(UINT32 pointerId, UINT32 *entriesCount, POINTER_INFO *pointerInfo)
BOOL(API * GHOST_WIN32_RegisterTouchWindow)(HWND hwnd, ULONG ulFlags)
GHOST_MouseCaptureEventWin32
#define PEN_MASK_PRESSURE
BOOL(API * GHOST_WIN32_WTPacket)(HCTX, UINT, LPVOID)
BOOL(WINAPI * GHOST_WIN32_GetPointerTouchInfoHistory)(UINT32 pointerId, UINT32 *entriesCount, POINTER_TOUCH_INFO *touchInfo)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble top
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint order
static struct PyModuleDef module
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
ULONG __stdcall Release(void)
static GHOST_ISystem * getSystem()
virtual GHOST_TInt32 getWidth() const
virtual GHOST_TInt32 getHeight() const
GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y)
GHOST_TSuccess getCursorPosition(GHOST_TInt32 &x, GHOST_TInt32 &y) const
GHOST_TUns64 performanceCounterToMillis(__int64 perf_ticks) const
GHOST_WindowManager * getWindowManager() const
GHOST_TTabletAPI getTabletAPI(void)
const std::vector< GHOST_IWindow * > & getWindows() const
GHOST_TSuccess invalidate()
GHOST_TUns16 getDPIHint() override
GHOST_WindowWin32(GHOST_SystemWin32 *system, const char *title, GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height, GHOST_TWindowState state, GHOST_TDrawingContextType type=GHOST_kDrawingContextTypeNone, bool wantStereoVisual=false, bool alphaBackground=false, GHOST_WindowWin32 *parentWindow=0, bool is_debug=false, bool dialog=false)
void processWin32TabletActivateEvent(WORD state)
GHOST_TSuccess setOrder(GHOST_TWindowOrder order)
GHOST_TSuccess setProgressBar(float progress)
void processWin32TabletInitEvent()
void setTitle(const char *title)
std::string getTitle() const
void loadCursor(bool visible, GHOST_TStandardCursor cursorShape) const
GHOST_TSuccess getPointerInfo(std::vector< GHOST_PointerInfoWin32 > &outPointerInfo, WPARAM wParam, LPARAM lParam)
GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height)
void bringTabletContextToFront()
void processWin32TabletEvent(WPARAM wParam, LPARAM lParam)
HCURSOR getStandardCursor(GHOST_TStandardCursor shape) const
void updateMouseCapture(GHOST_MouseCaptureEventWin32 event)
GHOST_TSuccess setState(GHOST_TWindowState state)
void getWindowBounds(GHOST_Rect &bounds) const
void getClientBounds(GHOST_Rect &bounds) const
void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const
GHOST_TSuccess setClientHeight(GHOST_TUns32 height)
GHOST_TSuccess endProgressBar()
GHOST_TWindowState getState() const
void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const
bool useTabletAPI(GHOST_TTabletAPI api) const
GHOST_TSuccess setClientWidth(GHOST_TUns32 width)
GHOST_Rect m_cursorGrabBounds
bool getCursorVisibility() const
GHOST_TGrabCursorMode m_cursorGrab
GHOST_TSuccess setDrawingContextType(GHOST_TDrawingContextType type)
GHOST_TSuccess releaseNativeHandles()
GHOST_TInt32 m_cursorGrabInitPos[2]
virtual bool getValid() const
void setCursorGrabAccum(GHOST_TInt32 x, GHOST_TInt32 y)
GHOST_TStandardCursor getCursorShape() const
virtual HRESULT STDMETHODCALLTYPE SetProgressState(HWND hwnd, TBPFLAG tbpFlags)=0
virtual HRESULT STDMETHODCALLTYPE SetProgressValue(HWND hwnd, ULONGLONG ullCompleted, ULONGLONG ullTotal)=0
static const VertexNature POINT
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
struct SELECTID_Context context
POINTER_BUTTON_CHANGE_TYPE ButtonChangeType
size_t count_utf_8_from_16(const wchar_t *string16)
wchar_t * alloc_utf16_from_8(const char *in8, size_t add)
int conv_utf_16_to_8(const wchar_t *in16, char *out8, size_t size8)
ccl_device_inline float2 fabs(const float2 &a)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)