YSTest: HostedGUI.h 源文件

YSTest PreAlpha_b800_20170810 The YSLib Test Project

- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件

- 文件列表
- 文件成员

HostedGUI.h
浏览该文件的文档.
1 /*
2 © 2013-2017 FrankHB.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
29 #ifndef YCL_INC_HostedGUI_h_
30 #define YCL_INC_HostedGUI_h_ 1
31
32 #include "YCLib/YModules.h"
33 #include YFM_YCLib_Host // for nptr, map, unique_ptr, ystdex::aligned_storage_t,
34 // ystdex::pun_ref, wstring, wstring_view, string_view, YSLib::recursive_mutex,
35 // YSLib::lock_guard, u16string_view;
36 #include YFM_YSLib_Core_YEvent // for YSLib::GEvent, YSLib::string;
37 #include YFM_YSLib_Core_YGraphics // for YSLib::Drawing::Rect,
38 // YSLib::Drawing::Point, YSLib::Drawing::Size;
39 #include YFM_YSLib_Core_YString // for YSLib::String;
40 #if YCL_HostedUI_XCB
41 # include YFM_YCLib_XCB
42 #elif YCL_Win32
43 # include <atomic> // for std::atomic;
44 #elif YCL_Android
45 #elif YF_Hosted
46 # error "Unknown platform without XCB support found."
47 #endif
48
49 #if YF_Hosted && YCL_HostedUI
50 # if YCL_Win32
51
53 struct HBITMAP__;
54 struct HBRUSH__;
55 struct HDC__;
56 struct HINSTANCE__;
57 struct HWND__;
58 using HBITMAP = ::HBITMAP__*;
59 using HBRUSH = ::HBRUSH__*;
60 using HDC = ::HDC__*;
61 using HINSTANCE = ::HINSTANCE__*;
62 using HWND = ::HWND__*;
63 # if YCL_Win64
64 using LPARAM = long long;
65 # else
66 using LPARAM = long;
67 # endif
68 using LRESULT = ::LPARAM;
69 using WPARAM = std::uintptr_t;
70 using WNDPROC = ::LRESULT(__stdcall*)(::HWND, unsigned, ::WPARAM, ::LPARAM);
72
74 struct tagWNDCLASSW;
75 struct tagWNDCLASSEXW;
76 using WNDCLASSW = ::tagWNDCLASSW;
77 using WNDCLASSEXW = ::tagWNDCLASSEXW;
79 # elif YCL_Android
80 struct ANativeWindow;
81 # endif
82
83 namespace platform_ex
84 {
85
86 # if YCL_HostedUI_XCB
87 using NativeWindowHandle = nptr<XCB::WindowData*>;
89 # elif YCL_Win32
90 using NativeWindowHandle = ::HWND;
93 using WindowStyle = unsigned long;
94 # elif YCL_Android
95 using NativeWindowHandle = ::ANativeWindow*;
97 # endif
98
99
101
102 class YF_API HostWindowDelete
104 {
105 public:
106 using pointer = NativeWindowHandle;
107
108 void
109 operator()(pointer) const ynothrow;
110 };
111
112
113 # if YCL_Win32
114
115 struct YF_API GDIObjectDelete
117 {
118 using pointer = void*;
119
121 void
122 operator()(pointer) const ynothrow;
123 };
125 # endif
126
127
128
130
131
141 # if YCL_HostedUI_XCB
142 using MessageID = std::uint8_t;
143 using MessageHandler = void(void*);
144 # elif YCL_Win32
145 using MessageID = unsigned;
146 using MessageHandler = void(::WPARAM, ::LPARAM, ::LRESULT&);
147 # endif
148
149
150 # if YCL_HostedUI_XCB || YCL_Win32
151
155 using MessageMap = map<MessageID, YSLib::GEvent<MessageHandler>>;
156 # endif
157
158 # if YCL_Win32
159
165 YF_API void
166 BindDefaultWindowProc(NativeWindowHandle, MessageMap&, unsigned,
167 YSLib::EventPriority = 0);
168 # endif
169
170
177 class YF_API WindowReference : private nptr<NativeWindowHandle>
178 {
179 public:
181 DefDeCtor(WindowReference)
183 using nptr::nptr;
185 DefDeCopyMoveCtorAssignment(WindowReference)
186
187 # if YCL_Win32
188 bool
190 IsMaximized() const ynothrow;
192 bool
193 IsMinimized() const ynothrow;
195 bool
196 IsVisible() const ynothrow;
197 # endif
198
199 # if YCL_HostedUI_XCB
200
202 DefGetterMem(const, YSLib::Drawing::Rect, Bounds, Deref())
203 DefGetterMem(const, YSLib::Drawing::Point, Location, Deref())
204 DefGetterMem(const, YSLib::Drawing::Size, Size, Deref())
206 # elif YCL_Win32
207
211 YSLib::Drawing::Rect
212 GetBounds() const;
214
215 YSLib::Drawing::Rect
216 GetClientBounds() const;
217 YSLib::Drawing::Point
218 GetClientLocation() const;
219 YSLib::Drawing::Size
220 GetClientSize() const;
222 YSLib::Drawing::Point
224 GetCursorLocation() const;
225 YSLib::Drawing::Point
226 GetLocation() const;
227 # elif YCL_Android
228 YSLib::SDst
230 GetHeight() const;
231 # endif
232 DefGetter(const ynothrow, NativeWindowHandle, NativeHandle, get())
233 # if YCL_Win32
234
240 YSLib::Drawing::AlphaType
241 GetOpacity() const;
243 WindowReference
244 GetParent() const;
246 YSLib::Drawing::Size
247 GetSize() const;
248 # elif YCL_Android
249 DefGetter(const, YSLib::Drawing::Size, Size, {GetWidth(), GetHeight()})
251 YSLib::SDst
252 GetWidth() const;
253 # endif
254
255 # if YCL_HostedUI_XCB
256
258 DefSetterMem(, const YSLib::Drawing::Rect&, Bounds, Deref())
259
260 PDefH(void, Close, )
261 ImplRet(Deref().Close())
262
267 XCB::WindowData&
268 Deref() const;
269
271 PDefH(void, Hide, )
272 ImplRet(Deref().Hide())
273
274 PDefH(void, Invalidate, )
275 ImplRet(Deref().Invalidate())
276
277 PDefH(void, Move, const YSLib::Drawing::Point& pt)
278 ImplRet(Deref().Move(pt))
279
280 PDefH(void, Resize, const YSLib::Drawing::Size& s)
281 ImplRet(Deref().Resize(s))
283
285 PDefH(void, Show, )
286 ImplRet(Deref().Show())
287 # elif YCL_Win32
288
293 void
294 SetBounds(const YSLib::Drawing::Rect&);
300 void
301 SetClientBounds(const YSLib::Drawing::Rect&);
307 void
308 SetOpacity(YSLib::Drawing::AlphaType);
313 void
314 SetText(const wchar_t*);
315
317 void
318 Close();
319
324 void
325 Invalidate();
326
331 void
332 Move(const YSLib::Drawing::Point&);
337 void
338 MoveClient(const YSLib::Drawing::Point&);
339
344 void
345 Resize(const YSLib::Drawing::Size&);
346
352 void
353 ResizeClient(const YSLib::Drawing::Size&);
354
362 bool
363 Show(int = 1) ynothrow;
364 # endif
365
366 protected:
368 using nptr::get_ref;
369 };
370
371
372 # if YCL_HostedUI_XCB || YCL_Android
373
378 YF_API void
379 UpdateContentTo(NativeWindowHandle, const YSLib::Drawing::Rect&,
380 const YSLib::Drawing::ConstGraphics&);
381 # elif YCL_Win32
382
393 YF_API ::HBITMAP
394 CreateCompatibleDIBSection(const YSLib::Drawing::Size&,
395 YSLib::Drawing::BitmapPtr&);
396
403 YF_API NativeWindowHandle
404 CreateNativeWindow(const wchar_t*, const YSLib::Drawing::Size&, const wchar_t*
405 = L"", WindowStyle = 0x80000000L, WindowStyle = 0x00000000L);
406 # endif
407
408
409 # if YCL_HostedUI_XCB || YCL_Android
410
415 class ScreenBufferData;
416 # endif
417
418
429 class YF_API ScreenBuffer
430 {
431 private:
432 # if YCL_HostedUI_XCB || YCL_Android
433
437 unique_ptr<ScreenBufferData> p_impl;
442 YSLib::SDst width;
443 # elif YCL_Win32
444 YSLib::Drawing::Size size;
447 YSLib::Drawing::BitmapPtr p_buffer;
452 unique_ptr_from<GDIObjectDelete> p_bitmap;
453 # endif
454
455 public:
457 ScreenBuffer(const YSLib::Drawing::Size&);
458 # if YCL_HostedUI_XCB || YCL_Android
459
464 ScreenBuffer(const YSLib::Drawing::Size&, YSLib::SDst);
465 # endif
466 ScreenBuffer(ScreenBuffer&&) ynothrow;
468 ~ScreenBuffer();
469
474 PDefHOp(ScreenBuffer&, =, ScreenBuffer&& sbuf) ynothrow
475 ImplRet(swap(sbuf, *this), *this)
476
477 # if YCL_HostedUI_XCB || YCL_Android
478 YSLib::Drawing::BitmapPtr
480 GetBufferPtr() const ynothrow;
482 YSLib::Drawing::Graphics
483 GetContext() const ynothrow;
485 YSLib::Drawing::Size
486 GetSize() const ynothrow;
488 YSLib::SDst
489 GetStride() const ynothrow;
490 # elif YCL_Win32
491
493 DefGetter(const ynothrow, YSLib::Drawing::BitmapPtr, BufferPtr, p_buffer)
494 DefGetter(const ynothrow, ::HBITMAP, NativeHandle,
495 ::HBITMAP(p_bitmap.get()))
496 DefGetter(const ynothrow, const YSLib::Drawing::Size&, Size, size)
497
505 YB_NONNULL(1) void
506 Premultiply(YSLib::Drawing::ConstBitmapPtr) ynothrow;
507 # endif
508
514 void
515 Resize(const YSLib::Drawing::Size&);
516
527 YB_NONNULL(1) void
528 UpdateFrom(YSLib::Drawing::ConstBitmapPtr) ynothrow;
530
531 # if YCL_Win32
532
540 YB_NONNULL(1) void
541 UpdateFromBounds(YSLib::Drawing::ConstBitmapPtr,
542 const YSLib::Drawing::Rect&) ynothrow;
543
548 void
549 UpdatePremultipliedTo(NativeWindowHandle, YSLib::Drawing::AlphaType = 0xFF,
550 const YSLib::Drawing::Point& = {});
551 # endif
552
557 void
558 UpdateTo(NativeWindowHandle, const YSLib::Drawing::Point& = {}) ynothrow;
559
560 # if YCL_Win32
561
565 void
566 UpdateToBounds(NativeWindowHandle, const YSLib::Drawing::Rect&,
567 const YSLib::Drawing::Point& = {}) ynothrow;
568 # endif
569
574 YF_API friend void
575 swap(ScreenBuffer&, ScreenBuffer&) ynothrow;
576 };
577
578
583 class YF_API ScreenRegionBuffer : private ScreenBuffer
584 {
585 private:
587 YSLib::mutex mtx{};
588
589 public:
591 using ScreenBuffer::ScreenBuffer;
592
593 DefGetter(ynothrow, ScreenBuffer&, ScreenBufferRef, *this)
594
595
596 PDefH(YSLib::locked_ptr<ScreenBuffer>, Lock, )
597 ImplRet({&GetScreenBufferRef(), mtx})
598 };
600
601
602 # if YCL_Win32
603
605
609 class YF_API WindowMemorySurface
610 {
611 private:
612 ::HDC h_owner_dc, h_mem_dc;
613
614 public:
615 WindowMemorySurface(::HDC);
616 ~WindowMemorySurface();
617
618 DefGetter(const ynothrow, ::HDC, OwnerHandle, h_owner_dc)
619 DefGetter(const ynothrow, ::HDC, NativeHandle, h_mem_dc)
620
622 void
623 UpdateBounds(ScreenBuffer&, const YSLib::Drawing::Rect&,
624 const YSLib::Drawing::Point& = {}) ynothrow;
625
627 void
628 UpdatePremultiplied(ScreenBuffer&, NativeWindowHandle,
629 YSLib::Drawing::AlphaType = 0xFF, const YSLib::Drawing::Point& = {})
630 ynothrow;
631 };
632
633
634 class YF_API WindowDeviceContextBase
635 {
636 protected:
637 NativeWindowHandle hWindow;
638 ::HDC hDC;
639
641 WindowDeviceContextBase(NativeWindowHandle h_wnd, ::HDC h_dc) ynothrow
642 : hWindow(h_wnd), hDC(h_dc)
643 {}
644 DefDeDtor(WindowDeviceContextBase)
645
646 public:
647 DefGetter(const ynothrow, ::HDC, DeviceContextHandle, hDC)
648 DefGetter(const ynothrow, NativeWindowHandle, WindowHandle, hWindow)
649 };
650
651
656 class YF_API WindowDeviceContext : public WindowDeviceContextBase
657 {
658 protected:
663 WindowDeviceContext(NativeWindowHandle);
664 ~WindowDeviceContext();
665 };
666
667
673 class PaintStructData
674 {
675 public:
676 struct Data;
677
678 private:
680 #if YCL_Win64
681 ystdex::aligned_storage_t<72, 8> ps;
682 #else
683 ystdex::aligned_storage_t<64, 4> ps;
684 #endif
685 ystdex::pun_ref<Data> pun;
687
688 public:
689 PaintStructData();
690 ~PaintStructData();
691
692 DefGetter(const ynothrow, Data&, , pun.get())
693 };
694
695
700 class YF_API WindowRegionDeviceContext : protected PaintStructData,
701 public WindowDeviceContextBase, private YSLib::noncopyable
702 {
703 protected:
708 WindowRegionDeviceContext(NativeWindowHandle);
709 ~WindowRegionDeviceContext();
710
711 public:
716 bool
717 IsBackgroundValid() const ynothrow;
718
723 YSLib::Drawing::Rect
724 GetInvalidatedArea() const;
725 };
727
728
734 template<typename _type = WindowDeviceContext>
735 class GSurface : public _type, public WindowMemorySurface
736 {
737 public:
742 GSurface(NativeWindowHandle h_wnd)
743 : _type(YSLib::Nonnull(h_wnd)),
744 WindowMemorySurface(_type::GetDeviceContextHandle())
745 {}
746 };
747
748
753 class YF_API WindowClass final : private YSLib::noncopyable
754 {
755 private:
757 wstring name;
759 unsigned short atom;
760 ::HINSTANCE h_instance;
761
762 public:
767
769
777 YB_NONNULL(1)
778 WindowClass(const wchar_t*, ::WNDPROC = {}, unsigned = 0,
779 ::HBRUSH = ::HBRUSH(4 + 1), ::HINSTANCE = {});
780 WindowClass(const ::WNDCLASSW&);
781 WindowClass(const ::WNDCLASSEXW&);
783
791 WindowClass(wstring_view, unsigned short, ::HINSTANCE);
793 ~WindowClass();
794
796
797 DefGetter(const ynothrow, unsigned short, Atom, atom)
798 DefGetter(const ynothrow, ::HINSTANCE, InstanceHandle, h_instance)
800 DefGetter(const ynothrow, const wstring&, Name, name)
802 };
803
804
806 yconstexpr const wchar_t WindowClassName[]{L"YFramework Window"};
807 # endif
808
809
816 class YF_API HostWindow : private WindowReference, private YSLib::noncopyable
817 {
818 public:
819 # if YCL_HostedUI_XCB
820 const XCB::Atom::NativeType WM_PROTOCOLS, WM_DELETE_WINDOW;
822 # endif
823 # if YCL_HostedUI_XCB || YCL_Win32
824
828 platform_ex::MessageMap MessageMap;
829 # endif
830
845 HostWindow(NativeWindowHandle);
846 DefDelMoveCtor(HostWindow)
847 virtual
848 ~HostWindow();
849
850 # if YCL_Win32
851 using WindowReference::IsMaximized;
854 using WindowReference::IsMinimized;
856 using WindowReference::IsVisible;
857 # endif
858
859 # if YCL_HostedUI_XCB
860
862 using WindowReference::GetBounds;
863 using WindowReference::GetLocation;
864
865 using WindowReference::SetBounds;
867 # elif YCL_Win32
868 using WindowReference::GetBounds;
871
872 using WindowReference::GetClientBounds;
873 using WindowReference::GetClientLocation;
874 using WindowReference::GetClientSize;
876 using WindowReference::GetCursorLocation;
879 using WindowReference::GetLocation;
880 # elif YCL_Android
881 using WindowReference::GetHeight;
883 # endif
884
886 using WindowReference::GetNativeHandle;
887 # if YCL_Win32
888 using WindowReference::GetOpacity;
891 using WindowReference::GetParent;
892 # endif
893 using WindowReference::GetSize;
894 # if YCL_Android
895 using WindowReference::GetWidth;
897 # endif
898
899 # if YCL_Win32
900 using WindowReference::SetBounds;
903 using WindowReference::SetClientBounds;
905 using WindowReference::SetOpacity;
907 using WindowReference::SetText;
908 # endif
909
910 # if YCL_HostedUI_XCB || YCL_Win32
911 using WindowReference::Close;
913
915 using WindowReference::Invalidate;
916
917 # if YCL_Win32
918
925 virtual YSLib::Drawing::Point
926 MapPoint(const YSLib::Drawing::Point&) const;
927 # endif
928
930
931 using WindowReference::Move;
932
933 # if YCL_Win32
934 using WindowReference::MoveClient;
936
937 using WindowReference::Resize;
938
939 using WindowReference::ResizeClient;
940 # endif
941
942 using WindowReference::Show;
944 # if YCL_Win32
945
955 static ::LRESULT __stdcall
956 WindowProcedure(::HWND, unsigned, ::WPARAM, ::LPARAM) ynothrowv;
957 # endif
958 # endif
959 };
960
961
967 class YF_API WindowInputHost
968 {
969 public:
970 HostWindow& Window;
971
972 # if YCL_Win32
973 public:
975 std::atomic<short> RawMouseButton{0};
976
977 private:
983 bool has_hosted_caret;
985 YSLib::recursive_mutex input_mutex{};
987 YSLib::String comp_str{};
989 YSLib::Drawing::Point caret_location{YSLib::Drawing::Point::Invalid};
990 # endif
991 public:
993 WindowInputHost(HostWindow&);
994 ~WindowInputHost();
995
996 #if YCL_Win32
997
1001 template<typename _func>
1002 auto
1003 AccessInputString(_func f) -> decltype(f(comp_str))
1004 {
1005 using namespace YSLib;
1006 lock_guard<recursive_mutex> lck(input_mutex);
1007
1008 return f(comp_str);
1009 }
1010
1018
1020 void
1022 UpdateCandidateWindowLocation();
1024 void
1025 UpdateCandidateWindowLocation(const YSLib::Drawing::Point&);
1027
1029 void
1030 UpdateCandidateWindowLocationUnlocked();
1032 #endif
1033 };
1034
1035
1036 # if YCL_Win32
1037
1042 class YF_API Clipboard : private YSLib::noncopyable, private YSLib::nonmovable
1043 {
1044 private:
1046 class Data;
1047
1048 public:
1050 using FormatType = unsigned;
1051
1052 Clipboard(NativeWindowHandle);
1053 ~Clipboard();
1054
1059 static bool
1060 IsAvailable(FormatType) ynothrow;
1061
1067 static void
1068 CheckAvailable(FormatType);
1069
1071 void
1072 Clear() ynothrow;
1073
1075 static NativeWindowHandle
1076 GetOpenWindow() ynothrow;
1077
1078 bool
1079 Receive(YSLib::string&);
1080 bool
1081 Receive(YSLib::String&);
1082
1083 private:
1085 bool
1086 ReceiveRaw(FormatType, std::function<void(const Data&)>);
1087
1088 public:
1094 void
1095 Send(string_view);
1096 void
1097 Send(u16string_view);
1099
1105 void
1107 Send(YSLib::Drawing::ConstBitmapPtr, const YSLib::Drawing::Size&);
1108 PDefH(void, Send, const YSLib::Drawing::ConstGraphics& g)
1109 ImplRet(Send(g.GetBufferPtr(), g.GetSize()))
1111
1112 private:
1113 void
1114 SendRaw(FormatType, void*);
1115 };
1116
1117
1146 YF_API YB_NONNULL(1) void
1147 ExecuteShellCommand(const wchar_t*, const wchar_t* = {}, bool = {},
1148 const wchar_t* = {}, int = 1, NativeWindowHandle = {});
1149 # endif
1150
1151 } // namespace platform_ex;
1152
1153 #endif
1154
1155 #endif
1156
YSLib::Drawing::GetHeight
tr GetHeight())) inline PDefH(void
按字体高度和行距调整文本区域的底边距。
YSLib::UI::Move
移动：位置调整。
Definition: YWidgetEvent.h:382
platform::containers::wstring
basic_string< wchar_t > wstring
Definition: Container.h:108
platform::KeyCategory::Lock
表示锁定键。
Definition: Keys.h:115
DefSetterMem
#define DefSetterMem(_q, _t, _n, _m)
Definition: YBaseMacro.h:268
YSLib::EventPriority
std::uint8_t EventPriority
事件优先级。
Definition: YEvent.hpp:211
YSLib
YSLib 命名空间。
Definition: AndroidHost.h:45
YSLib::Drawing::GGraphics
二维图形接口上下文模板。
Definition: YGraphics.h:62
platform::Deref
yconstfn auto Deref(_type &&p) -> decltype(*p)
断言并解引用非空指针。
Definition: Debug.h:451
YSLib::Drawing::BitmapPtr
Pixel * BitmapPtr
Definition: YGraphics.h:42
ystdex::u16string_view
basic_string_view< char16_t > u16string_view
Definition: string_view.hpp:416
CHRLib::f
f(d, s)
ystdex::pun_ref::get
_type & get() const
Definition: type_pun.hpp:261
YSLib::UI::Close
void Close(IWidget &wgt)
Definition: YWidget.cpp:92
DefDeCopyMoveCtorAssignment
#define DefDeCopyMoveCtorAssignment(_t)
Definition: YBaseMacro.h:202
yconstexpr
#define yconstexpr
指定编译时常量表达式。
Definition: ydef.h:679
YSLib::Drawing::Point
GBinaryGroup< SPos > Point
屏幕二维点（直角坐标表示）。
Definition: YGDIBase.h:278
platform::KeyCodes::DS::L
Definition: Keys.h:227
YSLib::Drawing::ConstGraphics
GGraphics< ConstBitmapPtr > ConstGraphics
Definition: YGraphics.h:160
YSLib::UI::IsVisible
IsVisible
Definition: YWidget.h:101
platform_ex::Windows::unsigned
YF_API unsigned
Definition: NLS.h:52
YSLib::UI::Invalidate
YF_API void Invalidate(IWidget &, const Rect &)
无效化：使相对部件的指定区域在直接和间接的窗口缓冲区中无效。
Definition: YWidget.cpp:108
platform::AlphaType
octet AlphaType
Definition: Video.h:253
ystdex::wstring_view
basic_string_view< wchar_t > wstring_view
Definition: string_view.hpp:418
YSLib::UI::Resize
大小调整。
Definition: YWidgetEvent.h:383
DefDeCtor
#define DefDeCtor(_t)
简单通用成员函数定义。
Definition: YBaseMacro.h:157
platform_ex::ImplRet
const char16_t *s ImplRet(platform::Nonnull(s)) inline PDefH(const u16string &
platform::SDst
std::uint16_t SDst
屏幕坐标距离。
Definition: Video.h:44
YSLib::Drawing::g
The boundary is out of the const Graphics & g
Definition: YDraw.h:161
ynothrow
#define ynothrow
YSLib 无异常抛出保证：若支持 noexcept 关键字， 指定特定的 noexcept 异常规范。
Definition: ydef.h:766
CHRLib::s
_tDst const _tSrc * s
Definition: CharacterProcessing.h:140
NPL::LexemeCategory::Data
数据字面量。
DefDeDtor
#define DefDeDtor(_t)
Definition: YBaseMacro.h:177
YSLib::Drawing::GBinaryGroup< SPos >::Invalid
static const GBinaryGroup Invalid
无效（不在屏幕坐标系中）对象。
Definition: YGDIBase.h:58
DefGetterMem
#define DefGetterMem(_q, _t, _n, _m)
Definition: YBaseMacro.h:247
YSLib::Drawing::Graphics
GGraphics< BitmapPtr > Graphics
Definition: YGraphics.h:163
YF_API
#define YF_API
Definition: Platform.h:56
Drawing
YModules.h
ystdex::pun_ref< Data >
YSLib::UI::Styles::Window
窗口背景。
Definition: YStyle.h:311
YSLib::Drawing::GBinaryGroup< SPos >
ynothrowv
#define ynothrowv
YSLib 无异常抛出保证验证：有条件地使用无异常抛出规范。
Definition: ydef.h:786
YSLib::UI::Show
YF_API void Show(IWidget &)
显示部件。
Definition: YWidget.cpp:202
YSLib::Drawing::Rect
屏幕标准矩形：表示屏幕矩形区域。
Definition: YGDIBase.h:540
ystdex::nonmovable
Definition: base.h:81
ystdex::swap
void swap(container_adaptor< _tSeqCon > &x, container_adaptor< _tSeqCon > &y)
Definition: container.hpp:179
platform_ex::YB_NONNULL
YB_NONNULL(1) PDefH(u16string
构造适合表示路径的 char16_t 字符串。
ystdex::nptr::get_ref
pointer & get_ref()
Definition: pointer.hpp:166
std
Definition: memory.hpp:1183
DefGetter
#define DefGetter(_q, _t, _n,...)
Definition: YBaseMacro.h:241
YSLib::Messaging::MessageID
enum MessageSpace{Null=0x0000, Set=0x0003, Quit=0x0012, Bound=0x0014, Task=0x0016, Paint=0x00AF, Input=0x00FF} MessageID
Definition: ymsgdef.h:54
platform::Nonnull
_type && Nonnull(_type &&p) ynothrowv
断言并返回非空参数。
Definition: Debug.h:422
YSLib::UI::Hide
YF_API void Hide(IWidget &)
隐藏部件。
Definition: YWidget.cpp:100
ystdex::locked_ptr
threading::locked_ptr< _type, _tMutex, _tLock > locked_ptr
独占所有权的锁定指针：默认使用标准库互斥量和锁。
Definition: concurrency.h:61
platform_ex
平台扩展命名空间。
Definition: Android.h:45
YSLib::UI::name
yconstfn const string & name
Definition: Loader.h:130
ystdex::noncopyable
不可复制对象：禁止派生类调用默认原型的复制构造函数和复制赋值操作符。
Definition: base.h:41
YSLib::Drawing::Size
屏幕区域大小。
Definition: YGDIBase.h:293
ystdex::single_thread::recursive_mutex
Definition: pseudo_mutex.h:771
DefDelMoveCtor
#define DefDelMoveCtor(_t)
Definition: YBaseMacro.h:169
ystdex::single_thread::mutex
Definition: pseudo_mutex.h:746
ystdex::size
auto size(const _tRange &c) -> decltype(c.size())
类容器访问。
Definition: range.hpp:233
ystdex::string_view
basic_string_view< char > string_view
Definition: string_view.hpp:415
YSLib::Drawing::ConstBitmapPtr
const Pixel * ConstBitmapPtr
Definition: YGraphics.h:44
YSLib::Text::String
YSLib 标准字符串（使用 UCS-2 作为内部编码）。
Definition: YString.h:46
ystdex::details::get
get())
Definition: cast.hpp:102