当前位置: 首页>>代码示例>>C++>>正文


C++ HostWindow类代码示例

本文整理汇总了C++中HostWindow的典型用法代码示例。如果您正苦于以下问题:C++ HostWindow类的具体用法?C++ HostWindow怎么用?C++ HostWindow使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了HostWindow类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: screenDepthPerComponent

int screenDepthPerComponent(Widget* widget)
{
    HostWindow* hostWindow = toHostWindow(widget);
    if (!hostWindow)
        return 0;
    return hostWindow->screenInfo().depthPerComponent;
}
开发者ID:kjthegod,项目名称:WebKit,代码行数:7,代码来源:PlatformScreen.cpp

示例2: getPangoLayoutForAtk

static PangoLayout* getPangoLayoutForAtk(AtkText* textObject)
{
    AccessibilityObject* coreObject = core(textObject);

    HostWindow* hostWindow = coreObject->document()->view()->hostWindow();
    if (!hostWindow)
        return 0;
    PlatformPageClient webView = hostWindow->platformPageClient();
    if (!webView)
        return 0;

    GString* str = g_string_new(NULL);

    AccessibilityRenderObject* accObject = static_cast<AccessibilityRenderObject*>(coreObject);
    if (!accObject)
        return 0;
    RenderText* renderText = toRenderText(accObject->renderer());
    if (!renderText)
        return 0;

    // Create a string with the layout as it appears on the screen
    InlineTextBox* box = renderText->firstTextBox();
    while (box) {
        gchar *text = convertUniCharToUTF8(renderText->characters(), renderText->textLength(), box->start(), box->end());
        g_string_append(str, text);
        g_string_append(str, "\n");
        box = box->nextTextBox();
    }

    PangoLayout* layout = gtk_widget_create_pango_layout(static_cast<GtkWidget*>(webView), g_string_free(str, FALSE));
    g_object_set_data_full(G_OBJECT(textObject), "webkit-accessible-pango-layout", layout, g_object_unref);
    return layout;
}
开发者ID:Androtos,项目名称:toolchain_benchmark,代码行数:33,代码来源:AccessibilityObjectWrapperAtk.cpp

示例3: screenOrientationType

WebScreenOrientationType screenOrientationType(Widget* widget)
{
    HostWindow* hostWindow = toHostWindow(widget);
    if (!hostWindow)
        return WebScreenOrientationUndefined;
    return hostWindow->screenInfo().orientationType;
}
开发者ID:kjthegod,项目名称:WebKit,代码行数:7,代码来源:PlatformScreen.cpp

示例4: screenOrientationAngle

uint16_t screenOrientationAngle(Widget* widget)
{
    HostWindow* hostWindow = toHostWindow(widget);
    if (!hostWindow)
        return 0;
    return hostWindow->screenInfo().orientationAngle;
}
开发者ID:kjthegod,项目名称:WebKit,代码行数:7,代码来源:PlatformScreen.cpp

示例5: screenAvailableRect

FloatRect screenAvailableRect(Widget* widget)
{
    HostWindow* hostWindow = toHostWindow(widget);
    if (!hostWindow)
        return FloatRect();
    return IntRect(hostWindow->screenInfo().availableRect);
}
开发者ID:kjthegod,项目名称:WebKit,代码行数:7,代码来源:PlatformScreen.cpp

示例6: screenIsMonochrome

bool screenIsMonochrome(Widget* widget)
{
    HostWindow* hostWindow = toHostWindow(widget);
    if (!hostWindow)
        return false;
    return hostWindow->screenInfo().isMonochrome;
}
开发者ID:kjthegod,项目名称:WebKit,代码行数:7,代码来源:PlatformScreen.cpp

示例7: onMessageReceived

void IpcClientHost::onMessageReceived(const PIpcMessage& msg)
{
	if (msg.routing_id() != MSG_ROUTING_CONTROL) {
		// ROUTED MESSAGE, forward it to the correct host window
		HostWindow* win = static_cast<HostWindow*>(findWindow(msg.routing_id()));
		if (!win) {
			return;
		}
		win->onMessageReceived(msg);
	} else {
		// CONTROL MESSAGE, Handle it here
		bool msgIsOk;

		IPC_BEGIN_MESSAGE_MAP(IpcClientHost, msg, msgIsOk)
			IPC_MESSAGE_HANDLER(View_Host_ReturnedKeyEvent, onReturnedInputEvent)
			IPC_MESSAGE_HANDLER(ViewHost_PrepareAddWindow, onPrepareAddWindow)
			IPC_MESSAGE_HANDLER(ViewHost_AddWindow, onAddWindow)
			IPC_MESSAGE_HANDLER(ViewHost_RemoveWindow, onRemoveWindow)
			IPC_MESSAGE_HANDLER(ViewHost_SetWindowProperties, onSetWindowProperties)
			IPC_MESSAGE_HANDLER(ViewHost_FocusWindow, onFocusWindow)
			IPC_MESSAGE_HANDLER(ViewHost_UnfocusWindow, onUnfocusWindow)
			IPC_MESSAGE_UNHANDLED( g_critical("%s (%d). IPC Message Not Handled: (0x%x : 0x%x : 0x%x)",
											  __PRETTY_FUNCTION__, __LINE__, msg.routing_id(), msg.type(), msg.message_id()));
		IPC_END_MESSAGE_MAP()
	}
}
开发者ID:ctbrowser,项目名称:luna-sysmgr,代码行数:26,代码来源:IpcClientHost.cpp

示例8: screenDepth

int screenDepth(Widget* widget)
{
    HostWindow* hostWindow = toHostWindow(widget);
    if (!hostWindow)
        return 0;
    return hostWindow->screenInfo().depth;
}
开发者ID:kjthegod,项目名称:WebKit,代码行数:7,代码来源:PlatformScreen.cpp

示例9: GetHostWindow

void Sprite::TrackMouseLeave()
{
	HostWindow *wnd = GetHostWindow();
	if (wnd)
	{
		wnd->TrackMouseLeave(this);
	}
}
开发者ID:magic8421,项目名称:LuaUI2,代码行数:8,代码来源:Sprite.cpp

示例10: platformPageClient

QWebPageClient* PluginView::platformPageClient() const
{
    FrameView* view = m_parentFrame->view();
    if (!view)
        return 0;
    HostWindow* hostWindow = view->hostWindow();
    if (!hostWindow)
        return 0;
    return hostWindow->platformPageClient();
}
开发者ID:webOS-ports,项目名称:webkit,代码行数:10,代码来源:PluginViewQt.cpp

示例11: TEST

TEST(WebViewDestruction, DestroyHostWindow)
{
    COMPtr<IWebView> webView;
    HostWindow window;
    HWND viewWindow;
    createAndInitializeWebView(webView, window, viewWindow);

    DestroyWindow(window.window());

    finishWebViewDestructionTest(webView, viewWindow);
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:11,代码来源:WebViewDestruction.cpp

示例12: EXPECT_TRUE

void WebViewDestructionWithHostWindow::SetUp()
{
    WebViewDestruction::SetUp();

    EXPECT_TRUE(m_window.initialize());
    EXPECT_HRESULT_SUCCEEDED(m_webView->setHostWindow(reinterpret_cast<OLE_HANDLE>(m_window.window())));
    EXPECT_HRESULT_SUCCEEDED(m_webView->initWithFrame(m_window.clientRect(), 0, 0));

    COMPtr<IWebViewPrivate> viewPrivate(Query, m_webView);
    ASSERT_NOT_NULL(viewPrivate);
    EXPECT_HRESULT_SUCCEEDED(viewPrivate->viewWindow(reinterpret_cast<OLE_HANDLE*>(&m_viewWindow)));
    EXPECT_TRUE(::IsWindow(m_viewWindow));
}
开发者ID:3163504123,项目名称:phantomjs,代码行数:13,代码来源:WebViewDestruction.cpp

示例13: shouldCreateMainFrameScrollbar

static bool shouldCreateMainFrameScrollbar(const ScrollView* scrollView)
{
    // Interior frame ScrollViews never have MainFrameScrollbars.
    if (scrollView->parent())
        return false;

    // If we don't have a host window or a containing widget (ala WebKit2).
    HostWindow* hostWindow = scrollView->hostWindow();
    if (!hostWindow || !hostWindow->platformPageClient())
        return false;

    gboolean selfScrolling = FALSE;
    g_object_get(hostWindow->platformPageClient(), "self-scrolling", &selfScrolling, NULL);
    return !selfScrolling;
}
开发者ID:1833183060,项目名称:wke,代码行数:15,代码来源:ScrollViewGtk.cpp

示例14: createAndInitializeWebView

static void createAndInitializeWebView(COMPtr<IWebView>& outWebView, HostWindow& window, HWND& viewWindow)
{
    COMPtr<IWebView> webView;
    TEST_ASSERT(SUCCEEDED(WebKitCreateInstance(__uuidof(WebView), &webView)));

    TEST_ASSERT(window.initialize());
    TEST_ASSERT(SUCCEEDED(webView->setHostWindow(reinterpret_cast<OLE_HANDLE>(window.window()))));
    TEST_ASSERT(SUCCEEDED(webView->initWithFrame(window.clientRect(), 0, 0)));

    COMPtr<IWebViewPrivate> viewPrivate(Query, webView);
    TEST_ASSERT(viewPrivate);
    TEST_ASSERT(SUCCEEDED(viewPrivate->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow))));
    TEST_ASSERT(IsWindow(viewWindow));

    outWebView.adoptRef(webView.releaseRef());
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:16,代码来源:WebViewDestruction.cpp

示例15: getPangoLayoutForAtk

static PangoLayout* getPangoLayoutForAtk(AtkText* textObject)
{
    AccessibilityObject* coreObject = core(textObject);

    Document* document = coreObject->document();
    if (!document)
        return 0;

    HostWindow* hostWindow = document->view()->hostWindow();
    if (!hostWindow)
        return 0;
    PlatformPageClient webView = hostWindow->platformPageClient();
    if (!webView)
        return 0;

    // Create a string with the layout as it appears on the screen
    PangoLayout* layout = gtk_widget_create_pango_layout(static_cast<GtkWidget*>(webView), textForObject(coreObject));
    return layout;
}
开发者ID:Moondee,项目名称:Artemis,代码行数:19,代码来源:WebKitAccessibleInterfaceText.cpp


注:本文中的HostWindow类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。