-
This commit is contained in:
@@ -424,7 +424,7 @@ result_t Rktwebview_qt::rktSetHtml(rktwebview_t wv, const char *html)
|
||||
|
||||
bool r = c.result.toBool();
|
||||
|
||||
return r ? result_t::oke : result_t::set_navigate_failed;
|
||||
return r ? result_t::oke : result_t::set_html_failed;
|
||||
}
|
||||
|
||||
rkt_js_result_t *Rktwebview_qt::rktCallJs(rktwebview_t wv, const char *js)
|
||||
@@ -481,32 +481,32 @@ result_t Rktwebview_qt::rktResize(rktwebview_t wv, int w, int h)
|
||||
|
||||
result_t Rktwebview_qt::rktHideWindow(rktwebview_t w)
|
||||
{
|
||||
return doWindow(w, COMMAND_HIDE_WIN);
|
||||
return doWindow(w, COMMAND_HIDE_WIN, result_t::failed);
|
||||
}
|
||||
|
||||
result_t Rktwebview_qt::rktShowWindow(rktwebview_t w)
|
||||
{
|
||||
return doWindow(w, COMMAND_SHOW_WIN);
|
||||
return doWindow(w, COMMAND_SHOW_WIN, result_t::failed);
|
||||
}
|
||||
|
||||
result_t Rktwebview_qt::rktPresentWindow(rktwebview_t w)
|
||||
{
|
||||
return doWindow(w, COMMAND_PRESENT_WIN);
|
||||
return doWindow(w, COMMAND_PRESENT_WIN, result_t::failed);
|
||||
}
|
||||
|
||||
result_t Rktwebview_qt::rktMaximizeWindow(rktwebview_t w)
|
||||
{
|
||||
return doWindow(w, COMMAND_MAX_WIN);
|
||||
return doWindow(w, COMMAND_MAX_WIN, result_t::failed);
|
||||
}
|
||||
|
||||
result_t Rktwebview_qt::rktMinimizeWindow(rktwebview_t w)
|
||||
{
|
||||
return doWindow(w, COMMAND_MIN_WIN);
|
||||
return doWindow(w, COMMAND_MIN_WIN, result_t::failed);
|
||||
}
|
||||
|
||||
result_t Rktwebview_qt::rktShowNormalWindow(rktwebview_t w)
|
||||
{
|
||||
return doWindow(w, COMMAND_SHOW_NORMAL_WIN);
|
||||
return doWindow(w, COMMAND_SHOW_NORMAL_WIN, result_t::failed);
|
||||
}
|
||||
|
||||
window_state_t Rktwebview_qt::rktWindowState(rktwebview_t w)
|
||||
@@ -609,17 +609,17 @@ result_t Rktwebview_qt::rktWindowSetTitle(rktwebview_t wv, const char *title)
|
||||
postCommand(&c);
|
||||
while(!c.done) { doEvents(); }
|
||||
bool r = c.result.toBool();
|
||||
return r ? result_t::oke : result_t::resize_failed;
|
||||
return r ? result_t::oke : result_t::failed;
|
||||
}
|
||||
|
||||
result_t Rktwebview_qt::doWindow(rktwebview_t w, int cmd)
|
||||
result_t Rktwebview_qt::doWindow(rktwebview_t w, int cmd, result_t on_error)
|
||||
{
|
||||
Command c(cmd);
|
||||
c.args.push_back(w);
|
||||
postCommand(&c);
|
||||
while(!c.done) { doEvents(); }
|
||||
bool r = c.result.toBool();
|
||||
return r ? result_t::oke : result_t::resize_failed;
|
||||
return r ? result_t::oke : on_error;
|
||||
}
|
||||
|
||||
bool Rktwebview_qt::rktValid(rktwebview_t wv)
|
||||
|
||||
Reference in New Issue
Block a user