Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 32ecf18a1025097dc3a987a8a80d4e056da0b4fc (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
105
106
107
108
109
110
111
112
/*******************************************************************************
 * Copyright (c) 2000, 2017 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *    IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.swt.internal.cocoa;

public class WebView extends NSView {

public WebView() {
	super();
}

public WebView(long /*int*/ id) {
	super(id);
}

public WebView(id id) {
	super(id);
}

public boolean canGoBack() {
	return OS.objc_msgSend_bool(this.id, OS.sel_canGoBack);
}

public boolean canGoForward() {
	return OS.objc_msgSend_bool(this.id, OS.sel_canGoForward);
}

public static boolean canShowMIMEType(NSString MIMEType) {
	return OS.objc_msgSend_bool(OS.class_WebView, OS.sel_canShowMIMEType_, MIMEType != null ? MIMEType.id : 0);
}

public void copy(id sender) {
	OS.objc_msgSend(this.id, OS.sel_copy_, sender != null ? sender.id : 0);
}

public void cut(id sender) {
	OS.objc_msgSend(this.id, OS.sel_cut_, sender != null ? sender.id : 0);
}

public boolean goBack() {
	return OS.objc_msgSend_bool(this.id, OS.sel_goBack);
}

public boolean goForward() {
	return OS.objc_msgSend_bool(this.id, OS.sel_goForward);
}

public WebView initWithFrame(NSRect frame, NSString frameName, NSString groupName) {
	long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithFrame_frameName_groupName_, frame, frameName != null ? frameName.id : 0, groupName != null ? groupName.id : 0);
	return result == this.id ? this : (result != 0 ? new WebView(result) : null);
}

public WebFrame mainFrame() {
	long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_mainFrame);
	return result != 0 ? new WebFrame(result) : null;
}

public void paste(id sender) {
	OS.objc_msgSend(this.id, OS.sel_paste_, sender != null ? sender.id : 0);
}

public void reload(id sender) {
	OS.objc_msgSend(this.id, OS.sel_reload_, sender != null ? sender.id : 0);
}

public void setApplicationNameForUserAgent(NSString applicationNameForUserAgent) {
	OS.objc_msgSend(this.id, OS.sel_setApplicationNameForUserAgent_, applicationNameForUserAgent != null ? applicationNameForUserAgent.id : 0);
}

public void setCustomUserAgent(NSString customUserAgent) {
	OS.objc_msgSend(this.id, OS.sel_setCustomUserAgent_, customUserAgent != null ? customUserAgent.id : 0);
}

public void setDownloadDelegate(id downloadDelegate) {
	OS.objc_msgSend(this.id, OS.sel_setDownloadDelegate_, downloadDelegate != null ? downloadDelegate.id : 0);
}

public void setFrameLoadDelegate(id frameLoadDelegate) {
	OS.objc_msgSend(this.id, OS.sel_setFrameLoadDelegate_, frameLoadDelegate != null ? frameLoadDelegate.id : 0);
}

public void setPolicyDelegate(id policyDelegate) {
	OS.objc_msgSend(this.id, OS.sel_setPolicyDelegate_, policyDelegate != null ? policyDelegate.id : 0);
}

public void setPreferences(WebPreferences preferences) {
	OS.objc_msgSend(this.id, OS.sel_setPreferences_, preferences != null ? preferences.id : 0);
}

public void setResourceLoadDelegate(id resourceLoadDelegate) {
	OS.objc_msgSend(this.id, OS.sel_setResourceLoadDelegate_, resourceLoadDelegate != null ? resourceLoadDelegate.id : 0);
}

public void setUIDelegate(id UIDelegate) {
	OS.objc_msgSend(this.id, OS.sel_setUIDelegate_, UIDelegate != null ? UIDelegate.id : 0);
}

public void stopLoading(id sender) {
	OS.objc_msgSend(this.id, OS.sel_stopLoading_, sender != null ? sender.id : 0);
}

}

Back to the top