本文整理汇总了C++中WebPageProxy::mainFrame方法的典型用法代码示例。如果您正苦于以下问题:C++ WebPageProxy::mainFrame方法的具体用法?C++ WebPageProxy::mainFrame怎么用?C++ WebPageProxy::mainFrame使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebPageProxy
的用法示例。
在下文中一共展示了WebPageProxy::mainFrame方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: webkit_print_operation_run_dialog
/**
* webkit_print_operation_run_dialog:
* @print_operation: a #WebKitPrintOperation
* @parent: (allow-none): transient parent of the print dialog
*
* Run the print dialog and start printing using the options selected by
* the user. This method returns when the print dialog is closed.
* If the print dialog is cancelled %WEBKIT_PRINT_OPERATION_RESPONSE_CANCEL
* is returned. If the user clicks on the print button, %WEBKIT_PRINT_OPERATION_RESPONSE_PRINT
* is returned and the print operation starts. In this case, the #WebKitPrintOperation::finished
* signal is emitted when the operation finishes. If an error occurs while printing, the signal
* #WebKitPrintOperation::failed is emitted before #WebKitPrintOperation::finished.
* If the print dialog is not cancelled current print settings and page setup of @print_operation
* are updated with options selected by the user when Print button is pressed in print dialog.
* You can get the updated print settings and page setup by calling
* webkit_print_operation_get_print_settings() and webkit_print_operation_get_page_setup()
* after this method.
*
* Returns: the #WebKitPrintOperationResponse of the print dialog
*/
WebKitPrintOperationResponse webkit_print_operation_run_dialog(WebKitPrintOperation* printOperation, GtkWindow* parent)
{
g_return_val_if_fail(WEBKIT_IS_PRINT_OPERATION(printOperation), WEBKIT_PRINT_OPERATION_RESPONSE_CANCEL);
WebPageProxy* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(printOperation->priv->webView));
return webkitPrintOperationRunDialogForFrame(printOperation, parent, page->mainFrame());
}
示例2: webkit_print_operation_print
/**
* webkit_print_operation_print:
* @print_operation: a #WebKitPrintOperation
*
* Start a print operation using current print settings and page setup
* without showing the print dialog. If either print settings or page setup
* are not set with webkit_print_operation_set_print_settings() and
* webkit_print_operation_set_page_setup(), the default options will be used
* and the print job will be sent to the default printer.
* The #WebKitPrintOperation::finished signal is emitted when the printing
* operation finishes. If an error occurs while printing the signal
* #WebKitPrintOperation::failed is emitted before #WebKitPrintOperation::finished.
*/
void webkit_print_operation_print(WebKitPrintOperation* printOperation)
{
g_return_if_fail(WEBKIT_IS_PRINT_OPERATION(printOperation));
WebKitPrintOperationPrivate* priv = printOperation->priv;
GRefPtr<GtkPrintSettings> printSettings = priv->printSettings ? priv->printSettings : adoptGRef(gtk_print_settings_new());
GRefPtr<GtkPageSetup> pageSetup = priv->pageSetup ? priv->pageSetup : adoptGRef(gtk_page_setup_new());
WebPageProxy* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(printOperation->priv->webView));
webkitPrintOperationPrintPagesForFrame(printOperation, page->mainFrame(), printSettings.get(), pageSetup.get());
}
示例3: ewk_view_intent_deliver
Eina_Bool ewk_view_intent_deliver(Evas_Object* ewkView, Ewk_Intent* intent)
{
#if ENABLE(WEB_INTENTS)
EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
EINA_SAFETY_ON_NULL_RETURN_VAL(intent, false);
WebPageProxy* page = impl->page();
page->deliverIntentToFrame(page->mainFrame(), intent->webIntentData());
return true;
#else
return false;
#endif
}