Skip to content

Commit

Permalink
Update release
Browse files Browse the repository at this point in the history
  • Loading branch information
vczh committed Oct 27, 2021
1 parent d239be3 commit 0f571d5
Show file tree
Hide file tree
Showing 22 changed files with 447 additions and 759 deletions.
202 changes: 101 additions & 101 deletions Import/GacUI.cpp

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions Import/GacUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -978,10 +978,10 @@ ITEM(BACKSLASH, 0xDC) /* OEM_5 */ \
ITEM(LEFT_BRACKET, 0xDD) /* OEM_6 */ \
ITEM(APOSTROPHE, 0xDE) /* OEM_7 */ \

#define GUI_DEFINE_KEYBOARD_CODE_ENUM_ITEM(NAME, CODE) _##NAME = CODE,
#define GUI_DEFINE_KEYBOARD_CODE_ENUM_ITEM(NAME, CODE) KEY_##NAME = CODE,
enum class VKEY
{
_UNKNOWN = -1,
KEY_UNKNOWN = -1,
GUI_DEFINE_KEYBOARD_CODE(GUI_DEFINE_KEYBOARD_CODE_ENUM_ITEM)
};
#undef GUI_DEFINE_KEYBOARD_CODE_ENUM_ITEM
Expand Down Expand Up @@ -5905,7 +5905,7 @@ Alt-Combined Shortcut Key Interfaces Helpers
AltActionMap currentActiveAltActions;
AltControlMap currentActiveAltTitles;
WString currentAltPrefix;
VKEY supressAltKey = VKEY::_UNKNOWN;
VKEY supressAltKey = VKEY::KEY_UNKNOWN;

void EnterAltHost(IGuiAltActionHost* host);
void LeaveAltHost();
Expand Down Expand Up @@ -9838,11 +9838,11 @@ namespace vl

namespace controls
{
template<typename T, typename Enabled = YesType>
template<typename T, typename=void>
struct QueryServiceHelper;

template<typename T>
struct QueryServiceHelper<T, typename PointerConvertable<decltype(T::Identifier), const wchar_t* const>::YesNoType>
struct QueryServiceHelper<T, std::enable_if_t<std::is_convertible_v<decltype(T::Identifier), const wchar_t* const>>>
{
static WString GetIdentifier()
{
Expand All @@ -9851,7 +9851,7 @@ namespace vl
};

template<typename T>
struct QueryServiceHelper<T, typename PointerConvertable<decltype(T::GetIdentifier()), WString>::YesNoType>
struct QueryServiceHelper<T, std::enable_if_t<std::is_convertible_v<decltype(T::GetIdentifier()), WString>>>
{
static WString GetIdentifier()
{
Expand Down
2 changes: 1 addition & 1 deletion Import/GacUICompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9705,7 +9705,7 @@ FindInstanceLoadingSource

template<typename TCallback>
auto FindByTag(Ptr<GuiInstanceContext> context, GlobalStringKey namespaceName, const WString& typeName, TCallback callback)
-> typename RemoveCVR<decltype(callback({}).Value())>::Type
-> std::remove_cvref_t<decltype(callback({}).Value())>
{
vint index = context->namespaces.Keys().IndexOf(namespaceName);
if (index != -1)
Expand Down
4 changes: 2 additions & 2 deletions Import/GacUIReflection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,9 @@ Type Declaration
STRUCT_MEMBER(verticalAntialias)
END_STRUCT_MEMBER(FontProperties)

#define GUI_DEFINE_KEYBOARD_CODE_ENUM_ITEM(NAME, CODE) ENUM_CLASS_ITEM(_##NAME)
#define GUI_DEFINE_KEYBOARD_CODE_ENUM_ITEM(NAME, CODE) ENUM_CLASS_ITEM(KEY_##NAME)
BEGIN_ENUM_ITEM(VKEY)
ENUM_CLASS_ITEM(_UNKNOWN)
ENUM_CLASS_ITEM(KEY_UNKNOWN)
GUI_DEFINE_KEYBOARD_CODE(GUI_DEFINE_KEYBOARD_CODE_ENUM_ITEM)
END_ENUM_ITEM(VKEY)
#undef GUI_DEFINE_KEYBOARD_CODE_ENUM_ITEM
Expand Down
42 changes: 21 additions & 21 deletions Import/GacUIWindows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8282,11 +8282,11 @@ WindowsForm

if (nonClient)
{
info.ctrl = WinIsKeyPressing(VKEY::_CONTROL);
info.shift = WinIsKeyPressing(VKEY::_SHIFT);
info.left= WinIsKeyPressing(VKEY::_LBUTTON);
info.middle= WinIsKeyPressing(VKEY::_MBUTTON);
info.right = WinIsKeyPressing(VKEY::_RBUTTON);
info.ctrl = WinIsKeyPressing(VKEY::KEY_CONTROL);
info.shift = WinIsKeyPressing(VKEY::KEY_SHIFT);
info.left= WinIsKeyPressing(VKEY::KEY_LBUTTON);
info.middle= WinIsKeyPressing(VKEY::KEY_MBUTTON);
info.right = WinIsKeyPressing(VKEY::KEY_RBUTTON);

POINTS point = MAKEPOINTS(lParam);
NativePoint offset = GetClientBoundsInScreen().LeftTop();
Expand All @@ -8295,11 +8295,11 @@ WindowsForm
}
else
{
info.ctrl=((VKEY)wParam & VKEY::_CONTROL)!=(VKEY)0;
info.shift=((VKEY)wParam & VKEY::_SHIFT)!= (VKEY)0;
info.left=((VKEY)wParam & VKEY::_LBUTTON)!= (VKEY)0;
info.middle=((VKEY)wParam & VKEY::_MBUTTON)!= (VKEY)0;
info.right=((VKEY)wParam & VKEY::_RBUTTON)!= (VKEY)0;
info.ctrl=((VKEY)wParam & VKEY::KEY_CONTROL)!=(VKEY)0;
info.shift=((VKEY)wParam & VKEY::KEY_SHIFT)!= (VKEY)0;
info.left=((VKEY)wParam & VKEY::KEY_LBUTTON)!= (VKEY)0;
info.middle=((VKEY)wParam & VKEY::KEY_MBUTTON)!= (VKEY)0;
info.right=((VKEY)wParam & VKEY::KEY_RBUTTON)!= (VKEY)0;

POINTS point = MAKEPOINTS(lParam);

Expand All @@ -8322,10 +8322,10 @@ WindowsForm
{
NativeWindowKeyInfo info;
info.code=(VKEY)wParam;
info.ctrl=WinIsKeyPressing(VKEY::_CONTROL);
info.shift=WinIsKeyPressing(VKEY::_SHIFT);
info.alt=WinIsKeyPressing(VKEY::_MENU);
info.capslock=WinIsKeyToggled(VKEY::_CAPITAL);
info.ctrl=WinIsKeyPressing(VKEY::KEY_CONTROL);
info.shift=WinIsKeyPressing(VKEY::KEY_SHIFT);
info.alt=WinIsKeyPressing(VKEY::KEY_MENU);
info.capslock=WinIsKeyToggled(VKEY::KEY_CAPITAL);
info.autoRepeatKeyDown = (((vuint32_t)lParam) >> 30) % 2 == 1;
return info;
}
Expand All @@ -8334,10 +8334,10 @@ WindowsForm
{
NativeWindowCharInfo info;
info.code=(wchar_t)wParam;
info.ctrl=WinIsKeyPressing(VKEY::_CONTROL);
info.shift=WinIsKeyPressing(VKEY::_SHIFT);
info.alt=WinIsKeyPressing(VKEY::_MENU);
info.capslock=WinIsKeyToggled(VKEY::_CAPITAL);
info.ctrl=WinIsKeyPressing(VKEY::KEY_CONTROL);
info.shift=WinIsKeyPressing(VKEY::KEY_SHIFT);
info.alt=WinIsKeyPressing(VKEY::KEY_MENU);
info.capslock=WinIsKeyToggled(VKEY::KEY_CAPITAL);
return info;
}
#pragma pop_macro("_CONTROL")
Expand Down Expand Up @@ -8772,7 +8772,7 @@ WindowsForm
{
NativeWindowKeyInfo info=ConvertKey(wParam, lParam);
info.autoRepeatKeyDown = false;
if (supressingAlt && !info.ctrl && !info.shift && info.code == VKEY::_MENU)
if (supressingAlt && !info.ctrl && !info.shift && info.code == VKEY::KEY_MENU)
{
supressingAlt = false;
break;
Expand All @@ -8786,7 +8786,7 @@ WindowsForm
case WM_SYSKEYDOWN:
{
NativeWindowKeyInfo info=ConvertKey(wParam, lParam);
if (supressingAlt && !info.ctrl && !info.shift && info.code == VKEY::_MENU)
if (supressingAlt && !info.ctrl && !info.shift && info.code == VKEY::KEY_MENU)
{
break;
}
Expand Down Expand Up @@ -14610,7 +14610,7 @@ WindowsInputService
VKEY WindowsInputService::GetKey(const WString& name)
{
vint index = keys.Keys().IndexOf(name);
return index == -1 ? VKEY::_UNKNOWN : keys.Values()[index];
return index == -1 ? VKEY::KEY_UNKNOWN : keys.Values()[index];
}
}
}
Expand Down
12 changes: 0 additions & 12 deletions Import/GacUIWindows.h
Original file line number Diff line number Diff line change
Expand Up @@ -1453,18 +1453,6 @@ UniscribeColor
}
}

template<>
struct POD<presentation::elements_windows_gdi::UniscribeColorRange>
{
static const bool Result=true;
};

template<>
struct POD<presentation::elements_windows_gdi::UniscribeColor>
{
static const bool Result=true;
};

namespace presentation
{
namespace elements_windows_gdi
Expand Down
Loading

0 comments on commit 0f571d5

Please sign in to comment.