1 ! Copyright (C) 2018 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors alien.c-types alien.data alien.syntax
4 classes.struct kernel multiline namespaces ui windows.com
5 windows.com.syntax windows.com.wrapper windows.ole32
7 IN: windows.surface-dial
11 TYPEDEF: HSTRING__* HSTRING
18 COM-INTERFACE: IInspectable IUnknown {AF86E2E0-B12D-4c6a-9C5A-D7AA65101E90}
19 HRESULT GetIids ( ULONG* iidCount, IID** iids )
20 HRESULT GetRuntimeClassName ( HSTRING* className )
21 HRESULT GetTrustLevel ( TrustLevel* trustLevel )
25 COM-INTERFACE: IRadialControllerConfigurationInterop IInspectable {787cdaac-3186-476d-87e4-b9374a7b9970}
26 HRESULT GetForWindow ( HWND hwnd, REFIID riid, void** ppv )
29 COM-INTERFACE: IRadialControllerInterop IInspectable {1B0535C9-57AD-45C1-9D79-AD5C34360513}
30 HRESULT CreateForWindow ( HWND hwnd, REFIID riid, void** ppv )
34 SYMBOL: +radial-controller-configuration-wrapper+
35 SYMBOL: +radial-controller-wrapper+
41 IRadialControllerConfigurationInterop
43 ! HRESULT GetIids ( this, ULONG* iidCount, IID** iids )
46 ! HRESULT GetRuntimeClassName ( this, HSTRING* className )
49 ! HRESULT GetTrustLevel ( this, TrustLevel* trustLevel )
52 ! HRESULT GetForWindow ( this, HWND hwnd, REFIID riid, void** ppv )
58 } <com-wrapper> +radial-controller-configuration-wrapper+ set-global
64 IRadialControllerInterop
66 ! HRESULT GetIids ( this, ULONG* iidCount, IID** iids )
69 ! HRESULT GetRuntimeClassName ( this, HSTRING* className )
72 ! HRESULT GetTrustLevel ( this, TrustLevel* trustLevel )
75 ! HRESULT CreateForWindow ( this, HWND hwnd, REFIID riid, void** ppv )
81 } <com-wrapper> +radial-controller-wrapper+ set-global
86 C: <surface-dial> surface-dial
88 : make-radial-controller-configuration ( -- obj )
89 <surface-dial> +radial-controller-configuration-wrapper+ get com-wrap
90 IRadialControllerConfigurationInterop-iid com-query-interface [
91 topmost-window handle>> hWnd>>
92 IRadialControllerConfigurationInterop-iid
94 IRadialControllerConfigurationInterop::GetForWindow check-ole32-error
96 ] with-com-interface ;
98 : make-radial-controller ( -- obj )
99 <surface-dial> +radial-controller-wrapper+ get com-wrap
100 IRadialControllerInterop-iid com-query-interface [
101 topmost-window handle>> hWnd>>
102 IRadialControllerInterop-iid
104 IRadialControllerInterop::CreateForWindow check-ole32-error
105 ] with-out-parameters
106 ] with-com-interface ;