/
SDLWindowsPlatform.class.st
63 lines (51 loc) · 1.93 KB
/
SDLWindowsPlatform.class.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
"
Specific SDL initialization for Windows
"
Class {
#name : #SDLWindowsPlatform,
#superclass : #SDLAbstractPlatform,
#category : #'OSWindow-SDL2-Bindings'
}
{ #category : #'as yet unclassified' }
SDLWindowsPlatform class >> enableDebugWindowMenu: hwnd [
self ffiCall: #(int enableDebugWindowMenu(void* hwnd)) module: 'PharoVMCore.dll'
]
{ #category : #operations }
SDLWindowsPlatform >> afterMainPharoWindowCreated: aOSSDLWindow [
| sdlWindowInfo handle |
[ sdlWindowInfo := aOSSDLWindow backendWindow getWMInfo.
handle := sdlWindowInfo info win window.
self class enableDebugWindowMenu: handle ]
onErrorDo: [
"There was an error installing the support for debug Window, the VM is not new enough." ].
]
{ #category : #operations }
SDLWindowsPlatform >> afterSetWindowTitle: aString onWindow: aOSSDLWindow [
]
{ #category : #initialization }
SDLWindowsPlatform >> initPlatformSpecific [
"For windows and Unix, we activate linearization.
This does not work properly on OSX with retina display, blurrying the rendering"
SDL2 setHint: SDL_HINT_RENDER_SCALE_QUALITY value: '1'
]
{ #category : #initialization }
SDLWindowsPlatform >> systemCursorConversionTable [
^ {
#normal -> #SDL_SYSTEM_CURSOR_ARROW.
#overEditableText -> #SDL_SYSTEM_CURSOR_IBEAM.
#wait -> #SDL_SYSTEM_CURSOR_WAIT.
#crossHair -> #SDL_SYSTEM_CURSOR_CROSSHAIR.
"#SDL_SYSTEM_CURSOR_WAITARROW."
#resizeTopLeft -> #SDL_SYSTEM_CURSOR_SIZENWSE.
#resizeBottomRight -> #SDL_SYSTEM_CURSOR_SIZENWSE.
#resizeBottomLeft -> #SDL_SYSTEM_CURSOR_SIZENESW.
#resizeTopRight -> #SDL_SYSTEM_CURSOR_SIZENESW.
#resizeLeft -> #SDL_SYSTEM_CURSOR_SIZEWE.
#resizeRight -> #SDL_SYSTEM_CURSOR_SIZEWE.
#resizeBottom -> #SDL_SYSTEM_CURSOR_SIZENS.
#resizeTop -> #SDL_SYSTEM_CURSOR_SIZENS.
#move -> #SDL_SYSTEM_CURSOR_SIZEALL.
"SDL_SYSTEM_CURSOR_NO."
#webLink -> #SDL_SYSTEM_CURSOR_HAND.
}
]