Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
WindowsPlatform.cs
Go to the documentation of this file.
1
using
System
;
2
using
ReLogic.Localization.IME
;
3
using
SDL2;
4
5
namespace
ReLogic.OS.Windows
;
6
7
internal
class
WindowsPlatform
:
Platform
8
{
9
private
WindowsMessageHook
_wndProcHook
;
10
11
private
bool
_disposedValue
;
12
13
public
WindowsPlatform
()
14
: base(
PlatformType
.Windows)
15
{
16
RegisterService((
IClipboard
)
new
Clipboard
());
17
RegisterService((
IPathService
)
new
PathService
());
18
RegisterService((
IWindowService
)
new
WindowService
());
19
RegisterService((
IImeService
)
new
UnsupportedPlatformIme
());
20
}
21
22
public
override
void
InitializeClientServices
(
IntPtr
windowHandle)
23
{
24
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
25
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
26
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
27
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
28
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
29
SDL_SysWMinfo
info
=
default
(SDL_SysWMinfo);
30
SDL.SDL_VERSION(ref
info
.version);
31
SDL.SDL_GetWindowWMInfo(windowHandle, ref
info
);
32
windowHandle =
info
.info.win.window;
33
if
(
_wndProcHook
==
null
)
34
{
35
_wndProcHook
=
new
WindowsMessageHook
(windowHandle);
36
}
37
RegisterService((
IImeService
)
new
WinImm32Ime
(
_wndProcHook
, windowHandle));
38
}
39
40
protected
override
void
Dispose
(
bool
disposing)
41
{
42
if
(!
_disposedValue
)
43
{
44
if
(disposing &&
_wndProcHook
!=
null
)
45
{
46
_wndProcHook
.
Dispose
();
47
_wndProcHook
=
null
;
48
}
49
_disposedValue
=
true
;
50
base.Dispose(disposing);
51
}
52
}
53
}
ReLogic.Localization.IME.UnsupportedPlatformIme
Definition
UnsupportedPlatformIme.cs:4
ReLogic.Localization.IME.WinImm32Ime
Definition
WinImm32Ime.cs:10
ReLogic.OS.Platform
Definition
Platform.cs:10
ReLogic.OS.Windows.Clipboard
Definition
Clipboard.cs:8
ReLogic.OS.Windows.PathService
Definition
PathService.cs:9
ReLogic.OS.Windows.WindowService
Definition
WindowService.cs:8
ReLogic.OS.Windows.WindowsMessageHook.Dispose
virtual void Dispose(bool disposing)
Definition
WindowsMessageHook.cs:62
ReLogic.OS.Windows.WindowsMessageHook
Definition
WindowsMessageHook.cs:8
ReLogic.OS.Windows.WindowsPlatform.InitializeClientServices
override void InitializeClientServices(IntPtr windowHandle)
Definition
WindowsPlatform.cs:22
ReLogic.OS.Windows.WindowsPlatform._disposedValue
bool _disposedValue
Definition
WindowsPlatform.cs:11
ReLogic.OS.Windows.WindowsPlatform.WindowsPlatform
WindowsPlatform()
Definition
WindowsPlatform.cs:13
ReLogic.OS.Windows.WindowsPlatform._wndProcHook
WindowsMessageHook _wndProcHook
Definition
WindowsPlatform.cs:9
ReLogic.OS.Windows.WindowsPlatform.Dispose
override void Dispose(bool disposing)
Definition
WindowsPlatform.cs:40
ReLogic.OS.Windows.WindowsPlatform
Definition
WindowsPlatform.cs:8
ReLogic.Localization.IME.IImeService
Definition
IImeService.cs:6
ReLogic.OS.IClipboard
Definition
IClipboard.cs:4
ReLogic.OS.IPathService
Definition
IPathService.cs:4
ReLogic.OS.IWindowService
Definition
IWindowService.cs:8
ReLogic.Localization.IME
Definition
CandidateList.cs:1
ReLogic.OS.Windows
Definition
Clipboard.cs:5
ReLogic.OS.PlatformType
PlatformType
Definition
PlatformType.cs:4
System.ExceptionArgument.info
@ info
System
Definition
BlockingCollection.cs:8
System.IntPtr
Definition
IntPtr.cs:14
source
ReLogic
ReLogic.OS.Windows
WindowsPlatform.cs
Generated by
1.10.0