4 @SuppressWarnings public class QCefConfig{
22 LOGSEVERITY_DISABLE = 99
31 while (args.
has(key)){
38 while (args.
has(key)){
45 setProperty(
"agent", agent);
49 setProperty(
"loglevel", lev.value());
53 setProperty(
"bridge", value);
57 setProperty(
"port", port);
61 setProperty(
"background", color);
74 args.
put(
"cmd", cmds);
75 args.
put(
"cmdsw", cmdv);
76 QtXnl.widget_slot_string(0, Constant.INITCEF, args.
toString(
false));
82 @SuppressWarnings
public class QCefView : QWidget{
83 public static class onCefListener{
85 public void loadStart(
int browserId,
long frameId,
bool isMainFrame,
int transition_type){}
86 public void loadEnd(
int browserId,
long frameId,
bool isMainFrame,
int httpStatusCode){}
106 int targetDisposition,
107 QCefSetting settings,
108 bool [] DisableJavascriptAccess)
116 private onCefListener _ceflistener = nilptr;
121 public enum CefWindowOpenDisposition
132 CefWindowOpenDispositionIgnoreAction
159 public bool create(@NotNilptr QWidget parent)
override {
161 if (nativehandle == 0){
169 if (nativehandle == 0){
175 public bool create(QCefSetting setting, @NotNilptr QWidget parent) {
177 if (nativehandle == 0){
183 public bool create(QCefSetting setting, @NotNilptr
String url, @NotNilptr QWidget parent) {
185 if (nativehandle == 0){
192 if (_ceflistener != nilptr){
193 _ceflistener.loadingStateChanged(browserId, isLoading, canGoBack, canGoForward);
196 public void loadStart(
int browserId,
long frameId,
bool isMainFrame,
int transition_type){
197 if (_ceflistener != nilptr){
198 _ceflistener.loadStart(browserId, frameId, isMainFrame, transition_type);
201 public void loadEnd(
int browserId,
long frameId,
bool isMainFrame,
int httpStatusCode){
202 if (_ceflistener != nilptr){
203 _ceflistener.loadEnd(browserId, frameId, isMainFrame, httpStatusCode);
213 if (_ceflistener != nilptr){
214 _ceflistener.loadError(browserId,frameId,isMainFrame,errorCode,errorMsg,failedUrl);
220 if (_ceflistener != nilptr){
221 _ceflistener.addressChanged(frameId, url);
225 if (_ceflistener != nilptr){
226 _ceflistener.titleChanged(title);
231 if (_ceflistener != nilptr){
232 _ceflistener.fullscreenModeChanged(fullscreen);
236 if (_ceflistener != nilptr){
237 _ceflistener.statusMessage(message);
241 if (_ceflistener != nilptr){
242 _ceflistener.consoleMessage(message, level);
246 if (_ceflistener != nilptr){
247 _ceflistener.loadingProgressChanged(progress);
251 QCefQuery _query =
new QCefQuery(query);
252 if (_ceflistener != nilptr){
253 _ceflistener.cefQueryRequest(browserId, frameId, _query);
257 if (_ceflistener != nilptr){
258 _ceflistener.invokeMethod(browserId, frameId, method, arguments);
262 if (_ceflistener != nilptr){
263 _ceflistener.reportJavascriptResult(browserId, frameId, context, result);
267 if (_ceflistener != nilptr){
268 _ceflistener.onBrowserWindowCreated(win);
276 int targetDisposition,
278 bool [] DisableJavascriptAccess)
280 QCefSetting setting =
new QCefSetting(settings);
281 if (_ceflistener != nilptr){
282 return _ceflistener.onBeforePopup(frameId, targetUrl, targetFrameName, targetDisposition, setting, DisableJavascriptAccess);
288 if (_ceflistener != nilptr){
289 _ceflistener.onPopupCreated(wnd);
JsonObject put(String, int)
void setLogLevel(LogLevel lev)
void addCommandLineSwitchWithValue(String key, String val)
void addCommandLineSwitch(String value)
void setBackgroundColor(int color)
void setUserAgent(String agent)
void setRemoteDebuggingPort(int port)
void setBridgeObjectName(String value)
void setProperty(String key, String val)
void setProperty(String key, int val)
void statusMessage(String message)
void reportJavascriptResult(int browserId, long frameId, long context, String result)
void loadStart(int browserId, long frameId, bool isMainFrame, int transition_type)
void loadingProgressChanged(double progress)
void loadError(int browserId, long frameId, bool isMainFrame, int errorCode, String errorMsg, String failedUrl)
void onBrowserWindowCreated(QWindow win)
void loadingStateChanged(int browserId, bool isLoading, bool canGoBack, bool canGoForward)
void cefQueryRequest(int browserId, long frameId, QCefQuery query)
void addressChanged(long frameId, String url)
bool onBeforePopup(long frameId, String targetUrl, String targetFrameName, int targetDisposition, QCefSetting settings, bool [] DisableJavascriptAccess)
void titleChanged(String title)
void consoleMessage(String message, int level)
void fullscreenModeChanged(bool fullscreen)
void loadEnd(int browserId, long frameId, bool isMainFrame, int httpStatusCode)
void invokeMethod(int browserId, long frameId, String method, String [] arguments)
void onPopupCreated(QWindow wnd)
void statusMessage(String message)
bool onBeforePopup(long frameId, String targetUrl, String targetFrameName, int targetDisposition, long settings, bool [] DisableJavascriptAccess)
void navigateToString(String content)
void reportJavascriptResult(int browserId, long frameId, long context, String result)
void loadStart(int browserId, long frameId, bool isMainFrame, int transition_type)
void navigateToUrl(String url)
void loadingProgressChanged(double progress)
void setOnCefListener(onCefListener _l)
void onBrowserWindowCreated(QWindow win)
void loadingStateChanged(int browserId, bool isLoading, bool canGoBack, bool canGoForward)
void addLocalFolderResource(String url, String local)
void addressChanged(long frameId, String url)
bool create(@NotNilptr QWidget parent) override
bool create(QCefSetting setting, @NotNilptr String url, @NotNilptr QWidget parent)
void titleChanged(String title)
void consoleMessage(String message, int level)
void fullscreenModeChanged(bool fullscreen)
void loadEnd(int browserId, long frameId, bool isMainFrame, int httpStatusCode)
bool create(@NotNilptr String url, @NotNilptr QWidget parent)
bool create(QCefSetting setting, @NotNilptr QWidget parent)
void loadError(int browserId, long frameId, bool isMainFrame, int errorCode, String errorMsg, String failedUrl)
void invokeMethod(int browserId, long frameId, String method, String [] arguments)
static void addLocalResourceDir(String url, String local)
void onPopupCreated(QWindow wnd)
void cefQueryRequest(int browserId, long frameId, long query)
static const int qtCefView
long cdecl createQLLSObject(int type, Object xobj, long parent, long lparam, String param)
void cdecl widget_slot_string(long h, int proid, String value)
long cdecl createQSObject(int type, Object xobj, long parent, String param)
long cdecl long_string2(long handle,int proid, String v1, String v2)
CefWindowOpenDispositionUnknown
CefWindowOpenDispositionSingletonTab
CefWindowOpenDispositionNewBackgroundTab
CefWindowOpenDispositionCurrentTab
CefWindowOpenDispositionSaveToDisk
CefWindowOpenDispositionNewForeGroundTab
CefWindowOpenDispositionNewWindow
CefWindowOpenDispositionOffTheRecord
CefWindowOpenDispositionNewPopup