Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


Hi!, i have a question about how to emebed libreoffice into gtk3 GtkWidget
in Linux.
code is here:
// create a gtk3 GtkWidget
GtkWidget* pWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size(GTK_WINDOW(m_pWindow), 1024, 768);
gtk_container_set_border_width(GTK_CONTAINER(m_pWindow), 0);
gtk_window_set_position(GTK_WINDOW(m_pWindow), GTK_WIN_POS_CENTER);

m_socketWnd = gtk_socket_new();
m_nSocketWndId = gtk_socket_get_id(GTK_SOCKET(m_socketWnd));

//then create libreoffice window
uno::Sequence<beans::NamedValue> aProps(2);
aProps[0].Name = OUString("WINDOW");
aProps[0].Value = uno::Any(m_nSocketWndId );
aProps[1].Name = OUString("XEMBED");
aProps[1].Value = uno::Any(true);

uno::Reference<awt::XWindowPeer> xPeer =
uno::Reference<awt::XWindowPeer>(xSystemChildFactory->createSystemChild(
uno::Any(aProps), uno::Sequence<sal_Int8>(4), SYSTEM_XWINDOW), uno::UNO_QUERY);
...

the problem is libreoffice can't capture keypress but
event, when i embed it into gtk3 GtkWidget.
waiting for your help thankyou!

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.