41 , env(Host::FetchEnvironment())
46 # define YCL_KEY_Touch KeyCodes::Touch
47 # define YCL_CURSOR_VALID
49 # define YCL_KEY_Touch VK_LBUTTON
50 # define YCL_CURSOR_VALID if(cursor_state != Point::Invalid)
52 # error Unsupported platform found!
60 if(keyset[YCL_KEY_Touch] || keyset[VK_RBUTTON])
62 if(keyset[YCL_KEY_Touch])
67 TouchEventArgs e(wgt, keyset, cursor_state);
69 GUI_state.get().ResponseTouch(e, touch_evt);
74 KeyEventArgs e(wgt, keyset);
76 GUI_state.get().ResponseKey(e, key_evt);
91 const auto p_wnd(env.get().GetForegroundWindow());
97 using namespace platform::KeyCodes;
108 if(key_st[YCL_KEY_Touch] || key_st[VK_RBUTTON])
113 using namespace Drawing;
119 cursor_state = cursor.operator
Point();
121 ::ScreenToClient(p_wnd->GetNativeHandle(), &cursor);
123 const auto& pr(p_wnd->GetInputBounds());
125 if(!(IsInInterval< ::LONG>(cursor.x, pr.first.X, pr.second.X)
126 && IsInInterval< ::LONG>(cursor.y, pr.first.Y, pr.second.Y)))
128 if(GUI_state.get().GetTouchDownPtr())
136 yunseq(cursor_state.X = cursor.x - pr.first.X,
137 cursor_state.Y = cursor.y - pr.first.Y);
141 if(
auto p_render_wnd = dynamic_cast<Host::RenderWindow*>(p_wnd))
142 return &p_render_wnd->GetRenderer().GetWidgetRef();
146 #undef YCL_CURSOR_VALID