summaryrefslogtreecommitdiffstatshomepage
path: root/webview_ioleinplaceframe.go
blob: e5685571c31f2ce7963fea1d62228d180a07b35f (plain) (blame)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// Copyright 2010 The Walk Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build windows

package walk

import (
	"syscall"
)

import (
	"github.com/lxn/win"
)

var webViewIOleInPlaceFrameVtbl *win.IOleInPlaceFrameVtbl

func init() {
	webViewIOleInPlaceFrameVtbl = &win.IOleInPlaceFrameVtbl{
		syscall.NewCallback(webView_IOleInPlaceFrame_QueryInterface),
		syscall.NewCallback(webView_IOleInPlaceFrame_AddRef),
		syscall.NewCallback(webView_IOleInPlaceFrame_Release),
		syscall.NewCallback(webView_IOleInPlaceFrame_GetWindow),
		syscall.NewCallback(webView_IOleInPlaceFrame_ContextSensitiveHelp),
		syscall.NewCallback(webView_IOleInPlaceFrame_GetBorder),
		syscall.NewCallback(webView_IOleInPlaceFrame_RequestBorderSpace),
		syscall.NewCallback(webView_IOleInPlaceFrame_SetBorderSpace),
		syscall.NewCallback(webView_IOleInPlaceFrame_SetActiveObject),
		syscall.NewCallback(webView_IOleInPlaceFrame_InsertMenus),
		syscall.NewCallback(webView_IOleInPlaceFrame_SetMenu),
		syscall.NewCallback(webView_IOleInPlaceFrame_RemoveMenus),
		syscall.NewCallback(webView_IOleInPlaceFrame_SetStatusText),
		syscall.NewCallback(webView_IOleInPlaceFrame_EnableModeless),
		syscall.NewCallback(webView_IOleInPlaceFrame_TranslateAccelerator),
	}
}

type webViewIOleInPlaceFrame struct {
	win.IOleInPlaceFrame
	webView *WebView
}

func webView_IOleInPlaceFrame_QueryInterface(inPlaceFrame *webViewIOleInPlaceFrame, riid win.REFIID, ppvObj *uintptr) uintptr {
	return win.E_NOTIMPL
}

func webView_IOleInPlaceFrame_AddRef(inPlaceFrame *webViewIOleInPlaceFrame) uintptr {
	return 1
}

func webView_IOleInPlaceFrame_Release(inPlaceFrame *webViewIOleInPlaceFrame) uintptr {
	return 1
}

func webView_IOleInPlaceFrame_GetWindow(inPlaceFrame *webViewIOleInPlaceFrame, lphwnd *win.HWND) uintptr {
	*lphwnd = inPlaceFrame.webView.hWnd

	return win.S_OK
}

func webView_IOleInPlaceFrame_ContextSensitiveHelp(inPlaceFrame *webViewIOleInPlaceFrame, fEnterMode win.BOOL) uintptr {
	return win.E_NOTIMPL
}

func webView_IOleInPlaceFrame_GetBorder(inPlaceFrame *webViewIOleInPlaceFrame, lprectBorder *win.RECT) uintptr {
	return win.E_NOTIMPL
}

func webView_IOleInPlaceFrame_RequestBorderSpace(inPlaceFrame *webViewIOleInPlaceFrame, pborderwidths uintptr) uintptr {
	return win.E_NOTIMPL
}

func webView_IOleInPlaceFrame_SetBorderSpace(inPlaceFrame *webViewIOleInPlaceFrame, pborderwidths uintptr) uintptr {
	return win.E_NOTIMPL
}

func webView_IOleInPlaceFrame_SetActiveObject(inPlaceFrame *webViewIOleInPlaceFrame, pActiveObject uintptr, pszObjName *uint16) uintptr {
	return win.S_OK
}

func webView_IOleInPlaceFrame_InsertMenus(inPlaceFrame *webViewIOleInPlaceFrame, hmenuShared win.HMENU, lpMenuWidths uintptr) uintptr {
	return win.E_NOTIMPL
}

func webView_IOleInPlaceFrame_SetMenu(inPlaceFrame *webViewIOleInPlaceFrame, hmenuShared win.HMENU, holemenu win.HMENU, hwndActiveObject win.HWND) uintptr {
	return win.S_OK
}

func webView_IOleInPlaceFrame_RemoveMenus(inPlaceFrame *webViewIOleInPlaceFrame, hmenuShared win.HMENU) uintptr {
	return win.E_NOTIMPL
}

func webView_IOleInPlaceFrame_SetStatusText(inPlaceFrame *webViewIOleInPlaceFrame, pszStatusText *uint16) uintptr {
	return win.S_OK
}

func webView_IOleInPlaceFrame_EnableModeless(inPlaceFrame *webViewIOleInPlaceFrame, fEnable win.BOOL) uintptr {
	return win.S_OK
}

func webView_IOleInPlaceFrame_TranslateAccelerator(inPlaceFrame *webViewIOleInPlaceFrame, lpmsg *win.MSG, wID uint32) uintptr {
	return win.E_NOTIMPL
}