pax_global_header00006660000000000000000000000064142613254030014512gustar00rootroot0000000000000052 comment=cb623a42554eac8115e30d667c085d9c3f36860f framework-2.3.0/000077500000000000000000000000001426132540300135115ustar00rootroot00000000000000framework-2.3.0/.github/000077500000000000000000000000001426132540300150515ustar00rootroot00000000000000framework-2.3.0/.github/workflows/000077500000000000000000000000001426132540300171065ustar00rootroot00000000000000framework-2.3.0/.github/workflows/main.yaml000066400000000000000000000016601426132540300207210ustar00rootroot00000000000000name: CI on: push: branches: '*' pull_request: branches: '*' jobs: build-debian-testing: name: Debian Testing runs-on: ubuntu-latest container: debian:testing steps: - name: Checkout uses: actions/checkout@v2 - name: Install deps run: | apt-get update apt-get dist-upgrade --purge -y apt-get -y install build-essential cmake doxygen graphviz libdbus-1-dev libglib2.0-dev libgtk-3-dev libmtdev-dev libudev-dev libwayland-dev libxcb-composite0-dev libxcb-damage0-dev libxcb-xfixes0-dev libxext-dev libxkbcommon-dev pkg-config qml-module-qtquick2 qtbase5-dev qtbase5-private-dev qtdeclarative5-dev qtwayland5-dev-tools qtwayland5-private-dev - name: Build run: | cmake -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=/usr . make -j8 - name: Test run: | make ARGS+="-j8 --output-on-failure" test framework-2.3.0/.gitignore000066400000000000000000000002171426132540300155010ustar00rootroot00000000000000core *-stamp Makefile doxygen.log* .moc .obj *.a *.so *.so.* *.o moc_* gen_* *.swp *~ *.pro.user *.gcov *.gcda *.gcno *.tar.* *.md5 .idea buildframework-2.3.0/CMakeLists.txt000066400000000000000000000566541426132540300162710ustar00rootroot00000000000000cmake_minimum_required(VERSION 3.5) project(maliit-framework VERSION 2.3.0) # Build options option(enable-docs "Build documentation" ON) option(enable-tests "Build tests" ON) option(install-tests "Install unit tests" OFF) option(enable-examples "Build examples" OFF) option(enable-glib "Build GLib support" ON) option(enable-xcb "Compile with xcb support" ON) option(enable-wayland "Compile with support for wayland" ON) option(enable-qt5-inputcontext "Compile with Qt 5 input context" ON) option(enable-hwkeyboard "Enable support for the hardware keyboard" ON) option(enable-dbus-activation "Enable dbus activation support for maliit-server" OFF) # Install paths include(GNUInstallDirs) if(NOT DEFINED QT5_PLUGINS_INSTALL_DIR) set(QT5_PLUGINS_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/qt5/plugins" CACHE PATH "Installation directory for Qt 5 plugins [LIB_INSTALL_DIR/qt5/plugins]") endif() if(NOT DEFINED QT5_MKSPECS_INSTALL_DIR) set(QT5_MKSPECS_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/qt5/mkspecs" CACHE PATH "Installation directory for Qt 5 mkspecs files [LIB_INSTALL_DIR/qt5/mkspecs]") endif() list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) find_package(PkgConfig REQUIRED) find_package(Qt5Core) find_package(Qt5DBus) find_package(Qt5Gui REQUIRED PRIVATE) find_package(Qt5Quick) if(enable-wayland) find_package(WaylandProtocols REQUIRED PRIVATE) find_package(QtWaylandScanner REQUIRED) find_package(Wayland REQUIRED) find_package(Qt5WaylandClient 5.14 REQUIRED PRIVATE) find_package(Qt5XkbCommonSupport REQUIRED PRIVATE) pkg_check_modules(XKBCOMMON REQUIRED IMPORTED_TARGET xkbcommon) endif() include_directories(src common) add_library(maliit-common STATIC common/maliit/namespace.h common/maliit/namespaceinternal.h common/maliit/settingdata.cpp common/maliit/settingdata.h) target_link_libraries(maliit-common Qt5::Core) target_include_directories(maliit-common PUBLIC common) set(CONNECTION_SOURCES connection/connectionfactory.cpp connection/connectionfactory.h connection/dbuscustomarguments.cpp connection/dbuscustomarguments.h connection/dbusinputcontextconnection.cpp connection/dbusinputcontextconnection.h connection/dbusserverconnection.cpp connection/dbusserverconnection.h connection/inputcontextdbusaddress.cpp connection/inputcontextdbusaddress.h connection/mimserverconnection.cpp connection/mimserverconnection.h connection/minputcontextconnection.cpp connection/minputcontextconnection.h connection/serverdbusaddress.cpp connection/serverdbusaddress.h) if(enable-wayland) list(APPEND CONNECTION_SOURCES connection/waylandinputmethodconnection.cpp connection/waylandinputmethodconnection.h) ecm_add_qtwayland_client_protocol(CONNECTION_SOURCES PROTOCOL ${WAYLANDPROTOCOLS_PATH}/unstable/input-method/input-method-unstable-v1.xml BASENAME input-method-unstable-v1) add_definitions(-DHAVE_WAYLAND) endif() set_source_files_properties(dbus_interfaces/minputmethodcontext1interface.xml dbus_interfaces/minputmethodserver1interface.xml PROPERTIES INCLUDE maliit/settingdata.h) qt5_add_dbus_adaptor(CONNECTION_SOURCES dbus_interfaces/minputmethodcontext1interface.xml dbusserverconnection.h DBusServerConnection) qt5_add_dbus_adaptor(CONNECTION_SOURCES dbus_interfaces/minputmethodserver1interface.xml dbusinputcontextconnection.h DBusInputContextConnection) qt5_add_dbus_interface(CONNECTION_SOURCES dbus_interfaces/minputmethodcontext1interface.xml minputmethodcontext1interface_interface) qt5_add_dbus_interface(CONNECTION_SOURCES dbus_interfaces/minputmethodserver1interface.xml minputmethodserver1interface_interface) add_library(maliit-connection STATIC ${CONNECTION_SOURCES}) target_link_libraries(maliit-connection Qt5::Core Qt5::DBus Qt5::Gui maliit-common) if(enable-wayland) target_link_libraries(maliit-connection Wayland::Client PkgConfig::XKBCOMMON) target_include_directories(maliit-connection PRIVATE ${Qt5WaylandClient_PRIVATE_INCLUDE_DIRS}) endif() target_include_directories(maliit-connection PUBLIC connection) include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) set(PLUGINS_SOURCES src/maliit/plugins/abstractinputmethod.cpp src/maliit/plugins/abstractinputmethod.h src/maliit/plugins/abstractinputmethodhost.cpp src/maliit/plugins/abstractinputmethodhost.h src/maliit/plugins/abstractpluginsetting.h src/maliit/plugins/attributeextension.cpp src/maliit/plugins/attributeextension.h src/maliit/plugins/attributeextension_p.h src/maliit/plugins/extensionevent.cpp src/maliit/plugins/extensionevent.h src/maliit/plugins/extensionevent_p.h src/maliit/plugins/inputmethodplugin.h src/maliit/plugins/keyoverride.cpp src/maliit/plugins/keyoverride.h src/maliit/plugins/keyoverride_p.h src/maliit/plugins/keyoverridedata.cpp src/maliit/plugins/keyoverridedata.h src/maliit/plugins/plugindescription.cpp src/maliit/plugins/plugindescription.h src/maliit/plugins/subviewdescription.cpp src/maliit/plugins/subviewdescription.h src/maliit/plugins/updateevent.cpp src/maliit/plugins/updateevent.h src/maliit/plugins/updateevent_p.h src/maliit/plugins/updatereceiver.cpp src/maliit/plugins/updatereceiver.h src/maliit/standaloneinputmethod.cpp src/maliit/standaloneinputmethod.h src/maliit/standaloneinputmethodhost.cpp src/maliit/standaloneinputmethodhost.h src/quick/inputmethodquick.cpp src/quick/inputmethodquick.h src/quick/inputmethodquickplugin.cpp src/quick/inputmethodquickplugin.h src/quick/keyoverridequick.cpp src/quick/keyoverridequick.h src/quick/keyoverridequick_p.h src/quick/maliitquick.h src/abstractplatform.cpp src/abstractplatform.h src/logging.cpp src/logging.h src/mattributeextensionid.cpp src/mattributeextensionid.h src/mattributeextensionmanager.cpp src/mattributeextensionmanager.h src/mimhwkeyboardtracker.h src/mimonscreenplugins.cpp src/mimonscreenplugins.h src/mimpluginmanager.cpp src/mimpluginmanager.h src/mimpluginmanager_p.h src/mimserver.cpp src/mimserver.h src/mimserveroptions.cpp src/mimserveroptions.h src/mimsettings.cpp src/mimsettings.h src/mimsettingsqsettings.cpp src/mimsettingsqsettings.h src/mimsubviewoverride.cpp src/mimsubviewoverride.h src/minputmethodhost.cpp src/minputmethodhost.h src/msharedattributeextensionmanager.cpp src/msharedattributeextensionmanager.h src/unknownplatform.cpp src/unknownplatform.h src/windowdata.cpp src/windowdata.h src/windowgroup.cpp src/windowgroup.h) if(enable-xcb) list(APPEND PLUGINS_SOURCES src/xcbplatform.cpp src/xcbplatform.h) find_package(XCB REQUIRED xfixes) list(APPEND PLUGINS_INCLUDE_DIRS ${XCB_INCLUDE_DIRS}) list(APPEND PLUGINS_LIBRARIES ${XCB_LIBRARIES}) add_definitions(-DHAVE_XCB) endif() if(enable-wayland) list(APPEND PLUGINS_SOURCES src/waylandplatform.cpp src/waylandplatform.h) endif() if(enable-hwkeyboard) list(APPEND PLUGINS_SOURCES src/mimhwkeyboardtracker.cpp src/mimhwkeyboardtracker_p.h) find_package(UDev REQUIRED) list(APPEND PLUGINS_LIBRARIES UDev::UDev) else() list(APPEND PLUGINS_SOURCES src/mimhwkeyboardtracker_stub.cpp) endif() add_library(maliit-plugins SHARED ${PLUGINS_SOURCES} ${PLUGINS_HEADER}) target_link_libraries(maliit-plugins PRIVATE maliit-common maliit-connection ${PLUGINS_LIBRARIES}) target_link_libraries(maliit-plugins PUBLIC Qt5::Core Qt5::Gui Qt5::Quick) target_include_directories(maliit-plugins PRIVATE ${PLUGINS_INCLUDE_DIRS}) set_target_properties(maliit-plugins PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR} VERSION ${PROJECT_VERSION} EXPORT_NAME Maliit::Plugins) if(enable-glib) find_package(GLib2) find_package(GIO) set(GLIB_SOURCES maliit-glib/maliitattributeextension.c maliit-glib/maliitattributeextension.h maliit-glib/maliitattributeextensionprivate.h maliit-glib/maliitattributeextensionregistry.c maliit-glib/maliitattributeextensionregistry.h maliit-glib/maliitbus.c maliit-glib/maliitbus.h maliit-glib/maliitbusprivate.h maliit-glib/maliitinputmethod.c maliit-glib/maliitinputmethod.h maliit-glib/maliitpluginsettings.c maliit-glib/maliitpluginsettings.h maliit-glib/maliitpluginsettingsprivate.h maliit-glib/maliitsettingdata.c maliit-glib/maliitsettingdata.h maliit-glib/maliitsettingsentry.c maliit-glib/maliitsettingsentry.h maliit-glib/maliitsettingsentryprivate.h maliit-glib/maliitsettingsmanager.c maliit-glib/maliitsettingsmanager.h) set_source_files_properties(maliit-glib/maliitmarshallers.list PROPERTIES PREFIX maliit_marshal) glib2_add_marshal(GLIB_SOURCES maliit-glib/maliitmarshallers.list) set_source_files_properties(dbus_interfaces/minputmethodcontext1interface.xml PROPERTIES INTERFACE_PREFIX com.meego NAMESPACE Maliit OUTPUT_NAME maliit-glib/maliitcontext) set_property(SOURCE dbus_interfaces/minputmethodcontext1interface.xml PROPERTY ANNOTATE com.meego.inputmethod.inputcontext1 org.gtk.GDBus.C.Name Context) gdbus_add_code(GLIB_SOURCES dbus_interfaces/minputmethodcontext1interface.xml) set_source_files_properties(dbus_interfaces/minputmethodserver1interface.xml PROPERTIES INTERFACE_PREFIX com.meego NAMESPACE Maliit OUTPUT_NAME maliit-glib/maliitserver) set_property(SOURCE dbus_interfaces/minputmethodserver1interface.xml PROPERTY ANNOTATE com.meego.inputmethod.uiserver1 org.gtk.GDBus.C.Name Server) gdbus_add_code(GLIB_SOURCES dbus_interfaces/minputmethodserver1interface.xml) add_library(maliit-glib SHARED ${GLIB_SOURCES} ${GLIB_HEADER}) target_include_directories(maliit-glib PUBLIC ${GIO_INCLUDE_DIRS}) target_link_libraries(maliit-glib ${GIO_LIBRARIES}) set_target_properties(maliit-glib PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR} VERSION ${PROJECT_VERSION} EXPORT_NAME Maliit::GLib) endif() add_definitions(-DMALIIT_FRAMEWORK_USE_INTERNAL_API -DMALIIT_PLUGINS_DATA_DIR="${CMAKE_INSTALL_FULL_DATADIR}/maliit/plugins" -DMALIIT_EXTENSIONS_DIR="${CMAKE_INSTALL_FULL_DATADIR}/maliit-framework/extensions" -DMALIIT_CONFIG_ROOT="/maliit/" -DMALIIT_PLUGINS_DIR="${CMAKE_INSTALL_FULL_LIBDIR}/maliit/plugins" -DMALIIT_DEFAULT_HW_PLUGIN="libmaliit-keyboard-plugin.so" -DMALIIT_ENABLE_MULTITOUCH=true -DMALIIT_DEFAULT_PLUGIN="libmaliit-keyboard-plugin.so" -DMALIIT_DEFAULT_SUBVIEW="") add_executable(maliit-server passthroughserver/main.cpp) target_link_libraries(maliit-server maliit-plugins maliit-connection) if(enable-qt5-inputcontext) set(INPUT_CONTEXT_SOURCES input-context/main.cpp input-context/minputcontext.cpp input-context/minputcontext.h) add_library(maliitplatforminputcontextplugin MODULE ${INPUT_CONTEXT_SOURCES}) target_link_libraries(maliitplatforminputcontextplugin maliit-connection Qt5::Quick) endif() if(enable-wayland) set(INPUT_PANEL_SHELL_SOURCES src/qt/plugins/shellintegration/inputpanelshellplugin.cpp src/qt/plugins/shellintegration/qwaylandinputpanelshellintegration.cpp src/qt/plugins/shellintegration/qwaylandinputpanelshellintegration.h src/qt/plugins/shellintegration/qwaylandinputpanelsurface.cpp src/qt/plugins/shellintegration/qwaylandinputpanelsurface.h) ecm_add_qtwayland_client_protocol(INPUT_PANEL_SHELL_SOURCES PROTOCOL ${WAYLANDPROTOCOLS_PATH}/unstable/input-method/input-method-unstable-v1.xml BASENAME input-method-unstable-v1) add_library(inputpanel-shell MODULE ${INPUT_PANEL_SHELL_SOURCES}) target_link_libraries(inputpanel-shell Qt5::WaylandClient PkgConfig::XKBCOMMON Wayland::Client) target_include_directories(inputpanel-shell PRIVATE ${Qt5WaylandClient_PRIVATE_INCLUDE_DIRS} ${Qt5XkbCommonSupport_PRIVATE_INCLUDE_DIRS}) endif() if(enable-examples) find_package(Qt5Widgets) add_executable(maliit-exampleapp-plainqt examples/apps/plainqt/mainwindow.cpp examples/apps/plainqt/mainwindow.h examples/apps/plainqt/plainqt.cpp) target_link_libraries(maliit-exampleapp-plainqt Qt5::Gui Qt5::Widgets) add_library(cxxhelloworldplugin MODULE examples/plugins/cxx/helloworld/helloworldinputmethod.cpp examples/plugins/cxx/helloworld/helloworldinputmethod.h examples/plugins/cxx/helloworld/helloworldplugin.cpp examples/plugins/cxx/helloworld/helloworldplugin.h) target_link_libraries(cxxhelloworldplugin maliit-plugins Qt5::Widgets) add_library(cxxoverrideplugin MODULE examples/plugins/cxx/override/overrideinputmethod.cpp examples/plugins/cxx/override/overrideinputmethod.h examples/plugins/cxx/override/overrideplugin.cpp examples/plugins/cxx/override/overrideplugin.h) target_link_libraries(cxxoverrideplugin maliit-plugins Qt5::Widgets) endif() # Documentation if(enable-docs) find_package(Doxygen REQUIRED) configure_file(doc/Doxyfile.in Doxyfile @ONLY) add_custom_target(doc ALL ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generating API documentation with Doxygen" VERBATIM) endif() # Package files configure_file(common/maliit-framework.pc.in maliit-framework.pc @ONLY) configure_file(src/maliit-plugins.pc.in maliit-plugins.pc @ONLY) configure_file(src/maliit-server.pc.in maliit-server.pc @ONLY) configure_file(common/maliit-framework.prf.in maliit-framework.prf @ONLY) configure_file(src/maliit-plugins.prf.in maliit-plugins.prf @ONLY) configure_file(src/maliit-defines.prf.in maliit-defines.prf @ONLY) include(CMakePackageConfigHelpers) configure_package_config_file(src/MaliitPluginsConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/MaliitPluginsConfig.cmake INSTALL_DESTINATION ${LIB_INSTALL_DIR}/cmake/MaliitPlugins PATH_VARS CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_DATADIR) write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/MaliitPluginsConfigVersion.cmake VERSION ${PACKAGE_VERSION} COMPATIBILITY AnyNewerVersion) # Installation install(TARGETS maliit-plugins EXPORT MaliitPluginsTargets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/maliit-2) install(TARGETS maliit-server RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) if(enable-examples) install(TARGETS maliit-exampleapp-plainqt RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() install(DIRECTORY common/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/maliit-2 FILES_MATCHING PATTERN "*.h" PATTERN "*internal.h" EXCLUDE) install(DIRECTORY src/maliit DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/maliit-2 FILES_MATCHING PATTERN "*.h" PATTERN "*_p.h" EXCLUDE) install(FILES src/mimserver.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/maliit-2/maliit) install(FILES ${CMAKE_BINARY_DIR}/maliit-framework.pc ${CMAKE_BINARY_DIR}/maliit-plugins.pc ${CMAKE_BINARY_DIR}/maliit-server.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) install(FILES ${CMAKE_BINARY_DIR}/maliit-framework.prf ${CMAKE_BINARY_DIR}/maliit-plugins.prf ${CMAKE_BINARY_DIR}/maliit-defines.prf DESTINATION ${QT5_MKSPECS_INSTALL_DIR}/features) install(EXPORT MaliitPluginsTargets FILE MaliitPluginsTargets.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MaliitPlugins) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/MaliitPluginsConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/MaliitPluginsConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MaliitPlugins) install(FILES INSTALL.local LICENSE.LGPL NEWS README.md DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/maliit-framework) if(enable-glib) configure_package_config_file(maliit-glib/MaliitGLibConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/MaliitGLibConfig.cmake INSTALL_DESTINATION ${LIB_INSTALL_DIR}/cmake/MaliitGLib PATH_VARS CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_DATADIR) write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/MaliitGLibConfigVersion.cmake VERSION ${PACKAGE_VERSION} COMPATIBILITY AnyNewerVersion) configure_file(maliit-glib/maliit-glib.pc.in maliit-glib.pc @ONLY) install(TARGETS maliit-glib EXPORT MaliitGLibTargets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/maliit-2) install(DIRECTORY maliit-glib DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/maliit-2 FILES_MATCHING PATTERN "*.h" PATTERN "*private.h" EXCLUDE) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/maliit-glib DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/maliit-2 FILES_MATCHING PATTERN "*.h") install(EXPORT MaliitGLibTargets FILE MaliitGLibTargets.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MaliitGLib) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/MaliitGLibConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/MaliitGLibConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MaliitGLib) install(FILES ${CMAKE_BINARY_DIR}/maliit-glib.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) endif() if(enable-qt5-inputcontext) install(TARGETS maliitplatforminputcontextplugin LIBRARY DESTINATION ${QT5_PLUGINS_INSTALL_DIR}/platforminputcontexts) endif() if(enable-wayland) install(TARGETS inputpanel-shell LIBRARY DESTINATION ${QT5_PLUGINS_INSTALL_DIR}/wayland-shell-integration) endif() if(enable-dbus-activation) configure_file(connection/org.maliit.server.service.in org.maliit.server.service @ONLY) install(FILES ${CMAKE_BINARY_DIR}/org.maliit.server.service DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/services) endif() if(enable-docs) install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/html/ DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/maliit-framework-doc) endif() # Tests if(enable-tests) enable_testing() find_package(Qt5Test) set(TEST_PLUGINS_DIR ${CMAKE_BINARY_DIR}/tests/plugins) add_library(dummyimplugin SHARED tests/dummyimplugin/dummyimplugin.cpp tests/dummyimplugin/dummyimplugin.h tests/dummyimplugin/dummyinputmethod.cpp tests/dummyimplugin/dummyinputmethod.h) target_link_libraries(dummyimplugin maliit-plugins) target_include_directories(dummyimplugin INTERFACE tests/dummyimplugin) add_library(dummyimplugin2 SHARED tests/dummyimplugin2/dummyimplugin2.cpp tests/dummyimplugin2/dummyimplugin2.h) target_link_libraries(dummyimplugin2 maliit-plugins) target_include_directories(dummyimplugin2 INTERFACE tests/dummyimplugin2) add_library(dummyimplugin3 SHARED tests/dummyimplugin3/dummyimplugin3.cpp tests/dummyimplugin3/dummyimplugin3.h tests/dummyimplugin3/dummyinputmethod3.cpp tests/dummyimplugin3/dummyinputmethod3.h) target_link_libraries(dummyimplugin3 maliit-plugins) target_include_directories(dummyimplugin3 INTERFACE tests/dummyimplugin3) add_library(dummyplugin SHARED tests/dummyplugin/dummyplugin.cpp tests/dummyplugin/dummyplugin.h) target_link_libraries(dummyplugin maliit-plugins) target_include_directories(dummyplugin INTERFACE tests/dummyplugin) set(DUMMY_PLUGINS dummyimplugin dummyimplugin2 dummyimplugin3 dummyplugin) set_property(TARGET ${DUMMY_PLUGINS} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${TEST_PLUGINS_DIR}) add_library(test-utils STATIC tests/utils/core-utils.cpp tests/utils/core-utils.h tests/utils/gui-utils.cpp tests/utils/gui-utils.h) target_link_libraries(test-utils PUBLIC Qt5::Core Qt5::Gui Qt5::Test maliit-connection) target_include_directories(test-utils INTERFACE tests/utils) target_compile_definitions(test-utils PUBLIC -DMALIIT_TEST_PLUGINS_DIR="${CMAKE_INSTALL_FULL_LIBDIR}/maliit-framework-tests/plugins" -DMALIIT_TEST_DATA_PATH="${CMAKE_INSTALL_FULL_LIBDIR}/maliit-framework-tests" -DIN_TREE_TEST_PLUGIN_DIR="${CMAKE_SOURCE_DIR}/examples/plugins") add_library(test-stubs STATIC tests/stubs/mkeyboardstatetracker_stub.h tests/stubs/fakeproperty.cpp tests/stubs/fakeproperty.h) target_link_libraries(test-stubs PUBLIC Qt5::Core) target_include_directories(test-stubs INTERFACE tests/stubs) function(create_test name) add_executable(${name} tests/${name}/${name}.cpp tests/${name}/${name}.h) set(_libs ${ARGV}) list(REMOVE_AT _libs 0) target_link_libraries(${name} test-utils maliit-plugins ${_libs}) add_test(${name} ${name}) set(test_targets ${test_targets} ${name} PARENT_SCOPE) if(install-tests) install(TARGETS ${name} DESTINATION ${CMAKE_INSTALL_LIBDIR}/maliit-framework-tests/${name}) endif() endfunction() create_test(sanitychecks) create_test(ut_mattributeextensionmanager) create_test(ut_mimonscreenplugins) create_test(ut_mimpluginmanager ${DUMMY_PLUGINS}) create_test(ut_mimpluginmanagerconfig) create_test(ut_mimserveroptions) create_test(ut_mimsettings) create_test(ut_minputmethodquickplugin) create_test(ut_mkeyoverride) create_test(ft_exampleplugin) create_test(ft_mimpluginmanager test-stubs ${DUMMY_PLUGINS}) file(COPY tests/qmlplugin/helloworld.qml DESTINATION ${CMAKE_BINARY_DIR}/examples/plugins/qml/helloworld) set_property(TEST ${test_targets} PROPERTY ENVIRONMENT TESTING_IN_SANDBOX=1 TESTPLUGIN_PATH=${CMAKE_BINARY_DIR}/tests/plugins TESTDATA_PATH=${CMAKE_SOURCE_DIR}/tests QT_QPA_PLATFORM=minimal) if(enable-glib) add_executable(ut_maliit_glib_settings tests/ut_maliit_glib_settings/ut_maliit_glib_settings.c tests/ut_maliit_glib_settings/mockmaliitserver.c tests/ut_maliit_glib_settings/mockmaliitserver.h) target_link_libraries(ut_maliit_glib_settings GLib2::GLib GLib2::GIO maliit-glib) add_test(ut_maliit_glib_settings ut_maliit_glib_settings) if(install-tests) install(TARGETS ut_maliit_glib_settings DESTINATION ${CMAKE_INSTALL_LIBDIR}/maliit-framework-tests/ut_maliit_glib_settings) endif() endif() if(install-tests) install(FILES tests/qmlplugin/helloworld.qml DESTINATION ${CMAKE_INSTALL_LIBDIR}/maliit-framework-tests/plugins/qml/helloworld) install(TARGETS ${DUMMY_PLUGINS} DESTINATION ${CMAKE_INSTALL_LIBDIR}/maliit-framework-tests/plugins) install(DIRECTORY tests/ut_mattributeextensionmanager/ DESTINATION ${CMAKE_INSTALL_LIBDIR}/maliit-framework-tests/ut_mattributeextensionmanager FILES_MATCHING PATTERN "*.xml") install(DIRECTORY tests/ut_mimpluginmanager/ DESTINATION ${CMAKE_INSTALL_LIBDIR}/maliit-framework-tests/ut_mimpluginmanager FILES_MATCHING PATTERN "*.xml") endif() endif() framework-2.3.0/INSTALL.local000066400000000000000000000030011426132540300156250ustar00rootroot00000000000000LOCAL BUILD, INSTALL AND RUN Gtk+ paths and executable names may differ between distros and architectures, check them on your own. The description below was tested on Fedora 15 (Lovelock) 64-bit. # framework build 1. export GCONF_CONFIG_SOURCE="xml:merged:$HOME/.gconf/gconf.xml.defaults" 2. cd maliit-framework 3. qmake-qt4 -r CONFIG+=local-install PREFIX="$HOME/maliit-local" LIBDIR="$HOME/maliit-local/lib64" CONFIG+=disable-gtk-cache-update 4. make -j4 # framework install 5. make install 6. export LD_LIBRARY_PATH="$HOME/maliit-local/lib64" 7. GTK_PATH="$HOME/maliit-local/lib64/gtk-2.0" /usr/bin/gtk-query-immodules-2.0-64 >"$HOME/maliit-local/lib64/gtk-2.0/2.10.0/gtk.immodules" 8. GTK_PATH="$HOME/maliit-local/lib64/gtk-3.0" /usr/bin/gtk-query-immodules-3.0-64 >"$HOME/maliit-local/lib64/gtk-3.0/3.0.0/gtk.immodules" # plugins build 9. cd ../maliit-plugins 10. export QMAKEFEATURES="$HOME/maliit-local/mkspecs/features" 11. qmake-qt4 -r 12. make -j4 # plugins install 13. make install # server run 14. "$HOME/maliit-local/bin/maliit-server" & # qt app run 15. export QT_PLUGIN_PATH="$HOME/maliit-local/plugins" 16. QT_IM_MODULE=Maliit "$HOME/maliit-local/bin/maliit-exampleapp-plainqt" # gtk2 app run 17. GTK_IM_MODULE_FILE="$HOME/maliit-local/lib64/gtk-2.0/2.10.0/gtk.immodules" GTK_IM_MODULE=Maliit "$HOME/maliit-local/bin/maliit-exampleapp-gtk2" # gtk3 app run 18. GTK_IM_MODULE_FILE="$HOME/maliit-local/lib64/gtk-3.0/3.0.0/gtk.immodules" GTK_IM_MODULE=Maliit "$HOME/maliit-local/bin/maliit-exampleapp-gtk3" framework-2.3.0/LICENSE.LGPL000066400000000000000000000622331426132540300152610ustar00rootroot00000000000000GNU Lesser General Public License Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. signature of Ty Coon, 1 April 1990 Ty Coon, President of Vice framework-2.3.0/NEWS000066400000000000000000001135501426132540300142150ustar00rootroot000000000000002.3.0 ===== CHANGES SINCE 2.2.1 * Fix paths in maliit-defines.prf * Use compose input plugin fallback only if key redirection is disabled * Remove leftover code from Qt 4 times * Enable installing unit tests again * Remove legacy unused Maemo-specific code * Use QLoggingCategory for logging * Fix application orientation angle back to clockwise * Add the Mir input panel window type flag * Use CMAKE_INSTALL_FULL_* paths in pkgconfig files * Remove the unused and unnecessary gtk3 wayland input context plugin * Remove unused and useless install target 2.2.1 ===== CHANGES SINCE 2.2.0 * Re-show the keyboard on Wayland surrounding text changes 2.2.0 ===== CHANGES SINCE 2.1.1 * Fix sending of modifiers and keysyms on Wayland * Fix Qt and glib deprecation warnings * Update the Doxyfile * Use text-input-unstable-v2 protocol * Enable GitHub Actions CI and fix tests * Fix build failure when XCB is disabled * Lower CMake requirement to 3.5 2.1.1 ===== CHANGES SINCE 2.1.0 * Fix installing README 2.1.0 ===== CHANGES SINCE 2.0.0 * Add cmake option to build examples and do not build them by default * Fix search for qtwaylandscanner on 32-bit architectures * Show the panel as the keyboard interface is reset * Ensure orientation updates are always sent when valid * Only allow focus removal from input items * Clean up FindGIO.cmake to allow working with older cmake * Stop client crashing when QGuiApplication::focusObject is null * Load compose inputcontext plugin for physical keyboard handling * Update input method area when activation is lost * input_method_v1: Treat content_purpose_digits just like content_purpose_number * Update or remove outdated and broken links 2.0.0 ===== CHANGES SINCE 0.99.2 * Minor changes around pkgconfig * Align version number with Maliit Keyboard 0.99.2 ====== CHANGES SINCE 0.99.1 * Use cmake instad of qmake as the buildsystem. * Some bugs fixed 0.99.1 ====== CHANGES SINCE 0.99.0 * Introduced Qt5 input context, replacing the one provided by Qt. Can be enabled by CONFIG+=qt5-inputcontext * Move maliit-glib from GTK+ input context package back into frameowrk * Use GDBus in maliit-glib * Allow plugin window reactive area and input method area reported to application differ * Fix window state to have transient hint and window type as with Maliit 0.8x * Made the dependency from xcb optional * Added a CONFIG option to disable the hardware keyboard BUG FIXES * Clear preedit state on input context reset * Reshow virtual keyboard when hardware keyboard disappears * Fix bugs with Qt 5.3, Qt 5.4 and Qt 5.5 0.99.0 ====== CHANGES SINCE 0.94.0 * Requires Qt 5 * GTK+ and Qt 4 input context are moved into a separate rpository/package * Do not use debug config for unit tests * Do not abort if there are no plugins. * Improvements for QML plugins - Notify qml keyboard when editor target focus changes - Expose editor state better to QML input methods - Replace correctionEnabled with predictionEnabled in qml interface - Enhanced QML interface event sending * Use QScreen::availableSize to calculate screenSize * Add window group class managing plugins' QWindows - Replaces surface abstraction * Remove CONFIG options - disable-background-translucency - disable-dbus - enable-qdbus - noqml * Remove MIndicatorServiceClient * Use QDBus instead of glib-dbus * Remove unused code * Update Wayland support to latest protocol changes * Add support for input region also on wayland * Add a proper Platform class * Remove unneeded plugin factories BUG FIXES * Fix some quick input method docs a bit. * Fix build when building without CONFIG+=wayland * Fix build with CONFIG+=wayland. * Fix unused parameter warning. * Fix minputmethodquickplugin test for Qt 5 * Fix private include and use QT+=gui-private * Fix some QDBus issues. * Fix plugins windows are never added to WindowGroup * Fix showing of nemo-keyboard * Fix qdbus interface and adaptor generation 0.94.0 ====== CHANGES SINCE 0.93.1 * Add Wayland input method support * Auto-detect subviews based on system locale - If no configuration exists, Maliit uses LANGUAGE to guess plugin's subview(s). * Don't write user configuration to disk for default values - Only write *actual* user configuration that's different from factory defaults. * Remove version suffix from libraries and install directories - Affects packaging & {header, .pc , .prf} install directories * Adjust to Qt 5.0.0 API changes * Add surface support for QtQuick2 * Remove SDK - It was pretty much unmaintained. 0.93.1 ====== CHANGES SINCE 0.93.0 * Use QtQtuick2 when compiling against Qt5 - Only affects QML plugins such as Nemo Keyboard. BUG FIXES * Fixes: MALIIT#194 - Maliit can not input when QML viewer is set to full screen on QWS without x11 * Fixes: MALIIT#197 - Read initial SW_TABLET_MODE state correctly * Fix qmake warnings about using CONFIG+=qdbus * Fix qmake warnings about using deprecated IN_PWD variables 0.93.0 ====== CHANGES SINCE 0.92.5 * Monitor SW_TABLET_MODE to determine hardware keyboard presence - A new, default implementation for MImHwKeyboardTracker: we look for a readable evdev device which has a SW_TABLET_MODE switch. If found, we use that device for determining the presence/availability of the hardware keyboard. * Allow QML plugins to send key events: - Use MInputMethodQuick.sendKey() BUG FIXES * Fix focus handling for Qt5 * Fix the build when disabling GTK+ support * Fix QML plugin loading for Qt5 * Fix "fullscreen" surfaces (required by QtQuick still): - Events can be passed through to application again even if input method with a semi-translucent "fullscreen" surface is shown. 0.92.5 ====== CHANGES SINCE 0.92.4 * Allow to disable GTK+ support: - Use qmake CONFIG+=nogtk to disable building the GTK+ input context module and the glib-based application support libraries. * New "disable-background-translucency" option to workaround VKB's garbled visuals on non-compositing WMs. Use CONFIG+=disable-background-translucency. * Make maliit-framework compile against Qt 5 beta release. BUG FIXES * Fixes: MALIIT#188 - maliit-server forgets active subview * Fixes: MALIIT#183 - Can not rotate the keyboard 0.92.4 ====== CHANGES SINCE 0.92.3 * GConf settings backend removed. This backend was deprecated in previous release, 0.92.3. Settings applications and other wishing to manipulate Maliit setting entries should use the libmaliit (Qt) or maliit-glib APIs. * There is a change in the DBus interfaces to support invoking actions on application side (beside just copy and paste). A invokeAction was added to the com.meego.inputmethod.uiserver1 interface. The copy and paste methods were removed from the com.meego.inputmethod.inputcontext1 interface. BUG FIXES * Fixes: Extensions overrides are not registered for the first time. * Fixes: Input context plugin does not load. 0.92.3 ====== CHANGES SINCE 0.92.2.1 * GConf settings backend deprecated. The default backend is now QSettings. GConf backend can be enabled using CONFIG+=enable-gconf, but will be removed in 0.92.4 * Add maliit-exampleapp-settings-python3, a Python + maliit-glib based command-line application for settings. Is also useful while developing to configure settings. 0.92.2.1 ======== CHANGES SINCE 0.92.2 * Revert to old install prefix behavior (<=0.92.1). By default the install prefix for files extending GTK+, Qt, gconf follows what the respective system component reports. For installing not system-wide, use CONFIG+=local-install. See INSTALL.local for details. This is equivalent to the old CONFIG+=enforce-install-prefix option. 0.92.2 ====== CHANGES SINCE 0.92.1 * Use common environment variables to configure install behaviour of framework files. - Use PREFIX to specify install prefix and LIBDIR ($PREFIX/lib, by default) to specify library install directory (for example /usr/lib64 on x64, for Fedora systems). All other M_IM_INSTALL_SOMETHING variables have been changed to SOMETHINGDIR. Use qmake HELP=1 to see the configure options. * Rename M_IM_DEFAULT_* environment variables for default plugin configuration to MALIIT_DEFAULT_*. * Add settings API to maliit-glib, too. * Add plugin settings API: - Plugins can export their settings to applications via the settings API, see the settings example for more. BUG FIXES * Fixes: Some examples and tests fail to link. * Fixes: Settings are not propagated to plugins in some cases. * Fixes: MALIIT#169 - Custom install prefix not respected for GTK, QT input context plugins * Fixes: MALIIT#57 - Remove prefix from M_IM_* configure variables 0.92.1 ====== CHANGES SINCE 0.92.0 * Added settings API - Added client API in libmaliit to enumarate and update settings - Allow changing enabled/active Maliit plugins * Changed the format for onscreen/enabled and onscreen/active settings: onscreen/active is a single string with format : (es. "libmaliit-keyboard-plugin.so:en_gb") and onscreen/enabled is a list of strings in the same format as onscreen/active * Added libmaliit-glib - Allows GTK+ applications to control certain features of the input method directly (currently show/hide, but feature parity with libmaliit is the goal). - Uses gtk-doc instead of doxygen (which is normally used in framework), but will also be disabled when using CONFIG+=nodoc. - Comes with GObject instrospection. As a proof-of-concept, there's a GTK+ Python demo app that can explicitly show and hide the virtual keyboard. See examples/apps/gtk3-python for more. BUG FIXES * Fixes: MALIIT#127 - Add settings API, as an integration point for settings applets * Fixes library dependencies for tests linked to plugins * Fix commit-string signal in connection-glib * Fixes: MALIIT#140 - Add method to explicit show/hide the keyboard to libmaliit-glib * Fixes OOT build by using extra compilers instead of targets * Add maliit-glib to PKG_CONFIG path of sdk * Fixes: MALIIT#144 - Empty region reported by inputMethodAreaChanged * Remove INSTALLs from tests.pro * Fixes: MALIIT#67 - Keyboard does not auto-show after a few auto hides * Fixes: warning during qmake's run about unknown quick1. * Fix position of overlay surfaces after rotation * Fix geometry of surfaces after screen size change * Fix WindowedSurface::relativePosition() * Fix AbstractSurfaceFactory's screen size API 0.92.0 ====== CHANGES SINCE 0.91.0 * Update maliit plugin interface from 0.80 to 1.0 * Add surfaces API for abstracting window/widget management for plugins - Add surfaces implementation for windowed widgets * Removed legacy support for MeeGo Harmattan: - Remove Toolbar API - Remove legacy minputmethodnamespace.h * Cleanup plugin API: - Rename MInputMethodPlugin to InputMethodPlugin - Remove MAbstractInputMethodSettings - Remove InputMethodPlugin::languages() - Remove MImWidget and MImGraphicsView - Move plugin headers and sources to maliit/plugins - Remove unused parameter from MAbstractInputMethod - Remove unused widget parameters from InputMethods * Add config switch to enable QtDBus implementation - Use qmake CONFIG+=enable-qdbus to enable the QtDBus based DBus connection backend * Add backend for QSettings backed by temporary file BUG FIXES * Fixes: MALIIT#118 - Child surfaces need to be working correctly * Fixes: MALIIT#117 - Window surfaces need to be transient to the application window * Fixes: MALIIT#101 - Allow to build without QtDbus (for non-*nix platforms) * Fixes: MALIIT#23 - Maliit should work without a compositing window manager under X11 * Fixes: MALIIT#20 - Ubuntu's login screen (lightdm) is completely black apart from the Maliit keyboard * Fix unused parameter warning * Fix clipping bug * Fix compile error on Arch Linux current * Fix warning when creating sdk * Fix MAttributeExtensionId module * Explicitly link to libmaliit-connection * Add dependency in maliit-plugins pkg-config file * Use .pri files in ut_minputmethodquickplugin * Fix maliit-plugins pkg-config dependencies * Fix include path in maliit-plugins.prf 0.91.0 ====== CHANGES SINCE 0.90.0 * Removed legacy support for MeeGo Harmattan: - CONFIG+=enable-legacy removed, - No longer uses MeeGo graphics system, - No longer reads GConf configuration under /meegotouch/inputmethods, - No longer installs meego-im-uiserver, - No longer uses /usr/lib/meego-im-plugins for Maliit plugins * Allow to run Maliit server and plugins in application process: - See examples/apps/embedded or examples/apps/server-embedded. The former uses a special input context that will load the server, MaliitDirect, whereas the second example shows how to load the server directly, without the special input context. * Clean up tests to use minimal dependencies: - Same as with maliit-keyboard in plugins repo, most tests should be able to run without QtGui or QWidget dependencies. * Experimental QtDBus support * Add preedit supoprt for GTK+ applications * Improve Windows build BUG FIXES * Fix ft_exampleplugin on Qt 5 * Fix ut_minputcontextplugin not finding libmaliit-qt4.so * Fix dependency issues for make check * Fixed build error caused by commit "Split the DBus and direct Qt4 input context plugins.". 0.90.0 ====== CHANGES SINCE 0.81.3 * Allow pluggable backends to store maliit-server settings. * Added a compilation option to disable the GConf settings backend, using QSettings as a fallback. * Notify applications when attribute extensions are changed by Maliit plugins - Typical use case would be buttons in an input method toolbar, where the application needs to know about the button state. * New connection directory to isolate all D-Bus dependend code - This will make it easier to use other IPCs (or no IPC at all, in case the application hosts the input method system) in the future. * Introduce -h/--help parameter to maliit-server - When giving invalid parameters to maliit-server, it will complain and print a useful help message. BUG FIXES * Fixes: MALIIT#88 - Remove hard dependency on GConf * Fixes: NB#298678 - (Regression): Alphabetical VKB shown automatically in "Change security code"-view * Fixes: Maliit#92 - maliit-server does not take a -help/-h argument * Fixes: NB#298276 - Observed im-ui-server crashes on CITA * Fixes: NB#298229 - PIN query appears black for several seconds during startup * Fixes: NB#296576 Vkb is not shown in text field, when swype keyboard is enabled & disabled in a scenario * Fixes: Maliit#68 - maliit-server does not always notify IC about InputMethodArea changes * Fixes: NB#295883 - All input methods are still installed after tapping the emergency keyboard button in the device lock screen and typing the lock code on system startup 0.81.3 ====== CHANGES SINCE 0.81.2 * DBus activation for maliit-server now optional. Pass CONFIG+=disable-dbus-activation to qmake to disable. Use this option when using a system/session manager (like systemd) to start and keep maliit-server alive * Improved support for Qt Embedded (QWS) * Make framework compile on older platforms - With the fix of MALIIT#14, latest version of framework will now compile on Maemo Fremantle again (might require skipping the tests still). BUG FIXES * Fixes: MALIIT#14 - Maliit requires glib/gio 2.26+ * Fixes: MALIIT#73 - Make dbus-x11 an optional dependency * Fixes: Use the QPA platform implementation when compiling for Qt Embedded (QWS). * Fixes: do not use X11 plugin host implementation for Qt Embedded (QWS). * Fixes: Use correct qmake binary when creating SDK 0.81.2 ====== CHANGES SINCE 0.81.1 * M_IM_DEFAULT[_HW]_PLUGIN configuration variables available to set default plugins (and also plugin subview) at configure time. See qmake HELP=1 for more. BUG FIXES * Fixes: Add missing header to plainqt example application for Qt 4.8 * Fixes: SDK creation fails if libmaliit is not installed * Fixes: Docs/SDK installed to wrong location if destination directory exists * Fixes: SDK example applications fails in legacy-mode * Fixes: NEMO#14 - VKB opens even if HWKB is already open * Fixes: Crash happening during initiated hide in Gtk+ app. * Fixes: enforce-install-prefix for legacy mode * Fixes: Copy/paste error in GTK+ 2 im cache update for Fedora 0.81.1 ====== CHANGES SINCE 0.81.0 * Plugins can store plugin data such as graphical assets in /usr/share/maliit/plugins/. The prefix can be queried through "$ pkg-config --variable pluginsdatadir maliit-plugins-0.80". * Standardized logging output on Maliit server and Qt and Gtk+ input contexts. - Debug output is enabled with setting the environment variable MALIIT_DEBUG to enabled (MALIIT_DEBUG=enabled). - Old environment variable MIC_ENABLE_DEBUG is not supported any longer. * Use a static, non-installed lib for common GTK+ IC code. * Framework and examples can be compiled with Qt 5. BUG FIXES * Fixes: MALIIT#48 - It is possible to have more than one maliit-server per session * Fixes: MALIIT#31 - On closing IM with GTK+ applications, user has to unfocus manually to be able to invoke IM again * Fixes: MALIIT#33 - maliit-sdk make clean fix and .obj/.moc removal * Fixes: MALIIT#16 - root owned directory ./sdk/build/maliit-sdk is created on make install * Fixes: NB#286366 - libmeegoimframework-dev package is incomplete * Fixes: QML helloworld plugin build failure * Fixes: ut_selfcompositing fails on buildbot * Fix GTK+ IC build for out-of-tree builds * Fixes: Ut_MInputContext::testCopyPasteState() failing if clipboard has text at test start * Fixes: MALIIT#17 - Qt input-context crashes if using GtkStyle and have GTK+ input-context enabled * Fix build for MImQPAPlatform * Fix missing QApplication include in case of non X11 platform. * Fixes: Missing linker directory in ut_minputmethodquickplugin 0.81.0 ====== CHANGES SINCE 0.80.8 * D-Bus activation for maliit-server - An application can launch a maliit-server instance via D-Bus activation; use MALIIT_SERVER_ARGUMENTS when building maliit-server to specify additional arguments. Check src/org.maliit.server.service for currently configured arguments. - Each user session can run its own maliit-server now. * Plain QML file loading support for QML-based input methods - Install main QML file into plugins directory and set the GConf keys in /maliit/onscreen/[active,enabled] to that file. * Improved documentation - Stand-alone application and plugins examples are installed by default - A maliit-sdk executable can be used to extract examples and to view documentation. BUG FIXES * Fixes: Building example applications stand-alone * Fixes: NB#291062 - Regression: QML Components Gallery, Text Input, Sip Attributes Example failed. 0.80.8 ====== CHANGES SINCE 0.80.7 * Merge GTK+ input context bridge from https://gitorious.org/meegotouch-inputmethodbridges into Maliit - Use GTK_IM_MODULE=Maliit to activate the input context. * Improved GTK+ support - GTK+ applications now properly reconnect when the connection to the Maliit server was lost or when the Maliit server was started after the application. - By default, update GTK+ inputmethod module cache. Packagers might want to override this at configure time via qmake CONFIG+=disable-gtk-cache-update * Forward all Qt inputmethod hints to Maliit plugins, via MImUpdateEvent::hints(). * Allow applications to control whether symbol view or QWERTY view should be shown when a text entry gains focus (check widgetproperties example): - Set the Qt::ImPreferNumbers inputmethod hint. * Add a translucent inputmethod mode (check widgetproperties example): - Use QObject::setProperty(Maliit::InputMethodQuery::translucentInputMethod, true|false) * New MImUpdateReceiver class demonstrates a Qt property technique for plugins to cleanly process MImUpdateEvents. BUG FIXES * Fixes: Compilation warnings in GTK+ IC * Fixes: Wrong upchaining in meego_imcontext_finalize * Fixes: GTK+ IC crashes if server is not started on app startup * Fixes: NB#284151 - [TASK] ImhPreferNumbers does not open page 2 on virtual keyboard * Fixes: GTK+ input context not showing plugin * Fixes: MPreeditInjectionEvent compatibility * Fixes: activeConnection uninitialized in MInputContextConnection * Fixes: Crash in Server->IC connection due to wrong upchaining * Fixes: Wrong values are shown when both label and icon are overriden. 0.80.7 ====== CHANGES SINCE 0.80.6 * Improved QPA (Qt Lighthouse) support * New MImUpdateEvent: Instead of forcing plugins to poll data from MAbstractInputMethodHost after each update, they can now choose to handle this MImExtensionEvent. MImUpdateEvent informs about the changes (through its propertiesChanged list) and allows extraction of updates through its value method. * More dynamic key override examples. * Bring dynamic key overrides to QML plugins. * Let QObject properties override input method queries. This allows more consistent integration with QML Componeents and plain Qt apps. BUG FIXES * Fixes: Let IM properties on QObjects override IM queries * Fixes: Label and icons are both shown at the same time. * Fixes: LD_LIBRARY_PATH for tests does not contain input-method-quick * Fixes: Lookup of data files causes make check to fail in out-of-tree build * Fixes: Plugins get an empty map when focus is switched. * Fixes: Action key label does not change back in QtQuick override plugin. * Fixes: Action key label does not change back in C++ override plugin. * Fixes: Documentation was not installed. * Fixes: Extension attributes are not registered after input context creation. * Fix unredirecting in self-compositing mode * Fixes: Server sometimes crashes in dbus connection 0.80.6 ====== CHANGES SINCE 0.80.5 * Server can build against Qt 4.8 with Lighthouse and run under Wayland * Legacy mode config option changed to enable-legacy instead of enable-meegotouch. Enable with: $ qmake -r CONFIG+=enable-legacy* Support hardware keyboard handling for Qt Quick plugins * Removed deprecated support for integrating with input methods via LMT/meegotouch directly. LMT/meegotouch uses libmaliit for that now. * Track hardware keyboard status on Fremantle (N900) * New MAbstractInputMethodHost::setLanguage(QString) API - New method setLanguage added to D-Bus interface. Through this method plugins can give applications a hint of the language user is going to write. * qmake HELP=1 will now output a list of build options * Input context <-> server communication is more generic, and allows implementation of other IPC/transport mechanisms * Legacy mode and non-legacy mode now parallel installable. BUG FIXES * Fixes: Install gconf schemas on make install * Fixes: Failure to generate dbus glue files in out-of-tree build * Fixes: NB#277853 - Meego-im-uiserver crash on invalid plugin name 0.80.5 ====== CHANGES SINCE 0.80.4 * PySide bindings for Maliit Plugin API - Python plugins can now make use of the generic plugin loader found at https://github.com/renatofilho/maliit-python - together with the new plugin factory MImAbstractPluginFactory, the requirement for a Qt/C++ wrapper in the case of Python plugins has been eliminated. * New plugin switch handling - SwitchPreparationBackward, SwitchPreparationForward and SwitchCanceled, required for new panning gesture to change between plugins/subviews. * New MAbstractInputMethodHost::preeditClickPos() API: - Forwards the preedit-local coordinate to input method plugins. BUG FIXES * Fixes: NB#277834 - libmaliit seg. fault in libmeegotouch unit tests: ut_mtextedit and ut_minputmethodstate * Fixes: BMC#19298 - [FEA] Provide PySide bindings for Maliit Plugin API 0.80.4 ====== CHANGES SINCE 0.80.3 * Improved legacy support: - Applications that want to integrate with input methods can freely choose whether to use MTF/libmeegotouch or libmaliit * Improved unit tests: - Added tests for Maliit::AttributeExtension{, Registry} API - Fixed skipped unit tests - Fix tests for plugin examples * Build system: - Fix out-of-tree builds BUG FIXES * None 0.80.3 ====== CHANGES SINCE 0.80.2 * Remove Harmattan-specific settings applet * Add support for ContextKit keyboard tracker BUG FIXES * Fixes: AttributeExtensions with libmaliit 0.80.2 ====== CHANGES SINCE 0.80.1 * New libmaliit contains additional API for application developers to interact with input methods (besides Qt's input context API): - Maliit::InputMethod: Query input method area and control input method orientation, - Maliit::AttributeExtension: Allows to control input method toolbar and customization of certain virtual keyboard keys, - Maliit::PreeditInjectionEvent: Used by text entries to inject a new preedit into the input context, - Maliit namespace for all input method related enums, superseds MInputMethod namespace. * New input context name: - Use QT_IM_MODULE=Maliit for regular builds and QT_IM_MODULE=MInputContext for legacy builds. * Script for making Maliit Plugin SDK tarball. * Enabled all unit tests again. BUG FIXES * Fixes: Settings applet does not compile with enable-meegotouch * Fixes: NB#268826 0.80.1 ====== CHANGES SINCE 0.80.0 * Support for QML plugins to let user hide plugin * Legacy mode can be enabled through: $ qmake -r CONFIG+=enable-meegotouch BUG FIXES * Fixes: NB#254635, meego-im-uiserver is missing capabilities * Fixes: BMC#15415 - corrupt text-input-settings.qm * Fixes: NB#265488 - Word tracker is shown empty when the device is rotated. * Fixes: MAbstractInputMethodHost's dependency to MIMApplication * Fixes: NB#259910, CommonComboBoxIcons missing from Text input settings * Fixes: NB#259600, Order of layout information, non-tapable area and line to be removed from settings. 0.80.0 ====== CHANGES SINCE 0.20.20 * Maliit rebranding: - Libraries: - libmeegoimframework => libmaliit-plugins - libmeegoimquick => libmaliit-plugins-quick - Binaries: - meego-im-uiserver => maliit-server - Plugins install paths: - /usr/lib/meego-im-plugins => /usr/lib/maliit/plugins-x.y * Added library versioning - Allows for parallel installation of different versions * Removed internal libmeegotouch dependency - MPreeditInjectionEvent, MInputMethodState added to new experimental libmaliit * Improved build infrastructure: - Common defines for install paths, names, etc. - Better pkg-config support (whilst deprecating prf files) - Better install prefix handling through M_IM_PREFIX BUG FIXES * Fixes: BMC#18772 - meego-im-uiserver is changing the window type after it's window is mapped 0.20.11 ======= * Added support for enabling/disabling plguins and subviews. - MAbstractInputMethod::subViews() should return all subviews instead of just the enabled ones now - The new GConf keys : - /meegotouch/inputmethods/onscreen/enabled - /meegotouch/inputmethods/onscreen/active replace the old ones: - /meegotouch/inputmethods/plugins/onscreen - /meegotouch/inputmethods/virtualkeyboard/layouts - /meegotouch/inputmethods/virtualkeyboard/lastactivesubview 0.20.10 ======= * Added basic framework support for QML-based plugins: - MInputMethodQuick: A MInputMethod implementation that sets up a QML environment and exposes a MInputMethodQuick context to the QML side. - MInputMethodQuickPlugin: A ready-made plugin wrapper, to use it reimplement MInputMethodQuickPlugin::qmlFileName and MInputMethodPlugin::name. 0.20.0 ======= * Removed MeeGo Touch from public API. * Allow to build framework without MeeGo Touch (optional) - Use "$ qmake CONFIG=+nomeegotouch -r ." or "DEB_BUILD_OPTIONS=nomeegotouch". * New helper classes: - MImGraphicsView: Use this widget if your input method plugin uses QGraphicsView (or QDeclarative*). - MImWidget: Use this widget if your input method offers a tradtional QWidget-based UI. - Both widgets boost render performance of input method plugins by using the framework's latest self-compositing feature. Check their documentation for subclassing advice. Also, in case you cannot reuse these classes, you need to use MAbstractInputMethodHost::background - if null, it can be ignored. Otherwise, it needs to be drawn into the background of your central widget (assuming full-screen widgets). For QWidgets, this can be done in QWidget::paintEvent. For QGraphicsView, it is required to override QGraphicsView::drawBackground instead. - MImHwKeyboardTracker: Tracks state (open/closed) of HW keyboard (does not provide any functionality yet when framework is build without MeeGo Touch support). - MImSettings: Currently a wrapper for GConf, but supposed to be extended for GConf-less platforms. * API changes: - Removed MIMSettingsDialog (use settings applet instead). - Removed MAbstractInputMethodHost::showSettings, too. This means that IM plugins can no longer request the settings dialog. - Removed MPlainWindow. - MAbstractInputMethod: - c'tor now takes an additional QWidget parameter, the main window (top level widget) supplied by the framework. This frees plugins from using MPlainWindow. Plugins can now choose between traditonal QWidget UI's or QGraphicsView UI's (including MeeGo Touch and QML). Make sure to reparent your central widget to the main window. - centralWidget: Returns central widget of your plugin. - setCentralWidget: Sets central widget of your plugin. Important if you want to take advantage of self-composting by using MImGraphicsView or MImWidget. - MInputMethodPlugin: - createInputMethod: Takes an additional QWidget parameter, the main window. Parameter is supplied by framework. - MInputMethod namespace: - added OrientationAngle, Orientation, TextContentType (copied from MeeGo Touch) 0.19.41 ======= * API changes - MAbstractInputMethod was changed. The method handleAppOrientationChange() was renamed as handleAppOrientationChanged(), which means target application already finish changing orientation. And there was a new method handleAppOrientationAboutToChange() says target application is about to change orientation. - Added X key event time parameter to MAbstractInputMethod::processKeyEvent(). 0.19.39 ====== * API changes - New entry setOrientationAngleLocked added to input-context D-Bus interface and similar method added also to MInputContextConnection and MAbstractInputMethodHost. - Added MAbstractInputMethodHost::hiddenText() 0.19.37 ======= * API changes - MInputContextConnection was changed. Add new parameters replaceStart and replaceLength in sendPreeditString(). Add new parameters replaceStart, replaceLength and cursorPos in sendCommitString(). Add new pure virtual method setSelection(). - MAbstractInputMethodHost was changed. Add new parameters replaceStart and replaceLength in sendPreeditString(). Add new parameters replaceStart, replaceLength and cursorPos in sendCommitString(). Add new pure virtual method setSelection(). 0.19.32 ======= * API changes - Toolbar specification was changed. Add a new attibute "visible" for button. Check latest version of the specification in the file doc/src/toolbarxml.dox. - new variant of MToolbarItem::setVisible() with explicit visibility flag was added. 0.19.31 ======= * API changes - Parameters in MInputContext::updatePreedit() are changed to accept definitions of different formats for each part of preedit, and support to show cursor inside preedit. - A parameter cursorPos is added to MAbstractInputMethod::setPreedit(). - Parameters in MInputMethodHost::sendPreeditString() are changed to accept definitions of different formats for each part of preedit, and support to show cursor inside preedit. - new struct PreeditTextFormat in namespace MInputMethod which defines the text format for the preedit string. - MAbstractInputMethodHost was changed. Add a new pure virtual method cursorRectangle(). 0.19.30 ======= * API changes - Toolbar specification was changed. Add a new attibute "enabled" for button. Check latest version of the specification in the file doc/src/toolbarxml.dox. 0.19.27 ======= * API changes - MInputMethodBase was renamed to MAbstractInputMethod - MInputMethodSettingsBase was renamed to MAbstractInputMethodSettings - Removed region signal from MAbstractInputMethod and replaced them with setScreenRegion() and setInputMethodArea() in MAbstractInputMethodHost. - renamed in MAbstractInputMethod: - mouseClickedOnPreedit() -> handleMouseClickOnPreedit( - focusChanged() -> handleFocusChange() - visualizationPriorityChanged() -> handleVisualizationPriorityChange - appOrientationChanged() -> handleAppOrientationChange() - clientChanged -> handleClientChange() 0.19.26 ======== * API changes - A request type parameter was added to MInputContext::keyEvent to allow signal only and event only key events. - Similar change to MInputContextConnection::sendKeyEvent and the "keyEvent" method in DBUS interface "com.meego.inputmethod.inputcontext1". - Removed MInputContextConnection from public API and replaced it with MAbstractInputMethodHost for MInputMethodBase. - Removed some ...Requsted() signals from MInputMethodBase and replaced with methods in MAbstractInputMethodHost - Removed indicator setting from MInputMethodBase and replaced with method on MAbstractInputMethodHost. Moved the indicator enum to MInputMethod namespace. - Changed the D-Bus interface of MIMPluginManager to use meego prefix. 0.19.24 ======== * API changes - Toolbar specification was changed. Check latest version of the specification in the file doc/src/toolbarxml.dox - class MToolbarRow was removed 0.19.22 ======== * API changes - moved contents from mpreeditface.h, mimdirection.h and mimhandlerstate.h to minputmethodnamespace.h using "MInputMethod" namespace. Also renamed MInputMethodSwitchDirection -> SwitchDirection. - Moved headers out of meegotouch dir to /usr/include/meegoimframework/ 0.19.21 ======== * API changes - MInputContext::keyEvent will always emit a signal, additional parameter "signalOnly" is used to suppress delivering the KeyEvent to focused widget. - D-BUS message "keyEvent" in interface "com.meego.inputmethod.inputcontext1" has new boolean parameter to match the new parameter in MInputContext::keyEvent 0.19.20 ======== * Uses MInputMethodState signals for notifying application for real hw keyboard signals 0.19.19 ======== * API changes - Public API of MToolbarData and MToolbarRow was changed, most of methods are private now. - Source code of MToolbarRow and MToolbarLayout was moved to dedicated files, so you need to include mtoolbarrow.h and mtoolbarlayout.h if you want to use that classes. = 0.18/0.1.22 = == New == * New RPC setComposingTextInput, composingTextInput, and setModifierState to support hardware keyboard key event filtering == Changed == * Region given to DuiPassThruWindow::inputPassthrough() is not translated anymore * dui-im-context is now moved back to here * Window's properties are set during the construction of the passtrough window = 0.1.21 = == New == * DuiIMPluginManager handles different kind of input method * Selective painting is enabled == Changed == * DuiIMPluginLoader is renamed into DuiIMPluginManager with new features * DuiIMPluginManager no longer needs scene argument = 0.1.20 = == Changed == * Compilation in passthroughserver now using the library created in src, and no longer look in /usr/lib * By default now using -software, even for device usage = 0.1.19 = == New == * Unit tests are now packaged * Server is now launched from a helper script in order to "guarantee" a correct connection with DBus * XSession script is now removed and rely on the DBus service = 0.1.18 = == New == * inputMethodAreaUpdated signal to announce the changes to the input method area. This is now separated from the area sent to passthrough server. == Changed == * Further changes to reaction maps API = 0.1.17 = == Changed == * Haptics related class name changed * Support for quering pre-edit rectangle from input-context * No longer use software rendering == Fixed == * NB#141431 candidate list rotation is broken = 0.1.16 = == Changed == * Rendering method (software/hardware accelerated) is now determined in runtime (using -software argument) = 0.1.15 = == Fixed == * NB#137201 Virtual keyboard is getting closed when typing the first character = 0.1.14 = == new == * Depends on libdui 0.11 * Direct mode input is now supported * Input method server is now also a dbus service * DuiInputContext::WidgetInfo sets default values * Input-context notifies input method when it's application's orientation changes == Changed == * input-context is moved to libdui, starting on libdui 0.11 * Passthrough window is no longer shown/hidden during the region update, it is always shown all the time. == Removed == * Old unused files (css, input-context unit tests) == Fixed == * NB#130249 Virtual keyboard uses local instance of theme daemon * NB#137201 Virtual keyboard is getting closed when typing the first character = 0.1.13 = == new == * imInitiatedHide() to notify that im server wants the IM to be hidden. * Remove focus when input method is hidden. == Changed == * inputMethodShown() and inputMethodHidden are removed in favor of imInitiatedHide() * QSettings are deprecated in favor of DuiGConfItem. = 0.1.11 = == New == * inputMethodShown() to hide the navigation bar == Changed == * mouseClickedOnPreedit() now includes the rectangle of the preedit = 0.1.9 = == Changed == * Make dui-im-uiserver have its own reaction map = 0.1.8 = == New == * content type support * error correction information support * word prediction hint support * support for notifying inputmethodbase about widget visualization priority * support for enabling/disabling error correction in input context via dbus * Initial support for selective compositing. == Changed == * preedit style depends on parameters of DuiInputContext::updatePreedit = 0.1.6 = == New == * send preedit (also with attribute) on preeditinjection event = 0.1.4 = == New == * Plugin framework now use settings for specifying driver location, activated plugins and blacklisted plugins * Input context supports plain Qt application * Input context supports focus out == Changed == * Passthrough server now receives all region updates from the plugins = 0.1.3 : 2009.02.17 = == Changed == * Input method plugin is refactored * Package now contains the framework, Qt input context, and the UI server framework-2.3.0/README.md000066400000000000000000000035211426132540300147710ustar00rootroot00000000000000Maliit ====== Maliit provides a flexible and cross-platform input method framework. It has a plugin-based client-server architecture where applications act as clients and communicate with the Maliit server via input context plugins. The communication link currently uses D-Bus. Maliit is an open source framework (LGPL 2.1) with a production-quality [keyboard plugin](https://github.com/maliit/keyboard) (LGPL 3.0). Installing ---------- Qt 5 must be installed to build the Maliit framework. At a terminal, run: ``` mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=/usr .. make make install ``` Running ------- Set Maliit as the Qt and GTK+ input context: ``` export QT_IM_MODULE=Maliit export GTK_IM_MODULE=Maliit ``` Start the server: ``` maliit-server ``` Note that a compositing window manager and a D-Bus session bus are required to use Maliit. Test with the provided example applications: ``` maliit-exampleapp-plainqt # for Qt maliit-exampleapp-gtk2 # for Gtk2 maliit-exampleapp-gtk3 # for Gtk3 ``` Double-tap on the input field, and an input method (usually a virtual keyboard) should be shown. Note that an input method plugin, such as the Maliit keyboard from the maliit-plugins package, must be installed for the example applications to work. NETWORK TRANSPARENCY On one computer run: ``` maliit-server -allow-anonymous -override-address tcp:host=xxx.xxx.xxx.xxx,port=yyyyy ``` Any valid dbus address is supported. Using -allow-anonymous must only be done on a trusted network. If using a method with authentication, the -allow-anonymous flag may be dropped. On another computer: ``` MALIIT_SERVER_ADDRESS=tcp:host=xxx.xxx.xxx.xxx,port=yyyyy export MALIIT_SERVER_ADDRESS maliit-exampleapp-plainqt (or maliit-exampleapp-gtk{2,3}) ``` Where xxx.xxx.xxx.xxx is IP address of computer where maliit-server is ran and yyyyy is port number < 65536. framework-2.3.0/cmake/000077500000000000000000000000001426132540300145715ustar00rootroot00000000000000framework-2.3.0/cmake/ECMFindModuleHelpers.cmake000066400000000000000000000300141426132540300214670ustar00rootroot00000000000000#.rst: # ECMFindModuleHelpers # -------------------- # # Helper macros for find modules: ecm_find_package_version_check(), # ecm_find_package_parse_components() and # ecm_find_package_handle_library_components(). # # :: # # ecm_find_package_version_check() # # Prints warnings if the CMake version or the project's required CMake version # is older than that required by extra-cmake-modules. # # :: # # ecm_find_package_parse_components( # RESULT_VAR # KNOWN_COMPONENTS [ [...]] # [SKIP_DEPENDENCY_HANDLING]) # # This macro will populate with a list of components found in # _FIND_COMPONENTS, after checking that all those components are in the # list of KNOWN_COMPONENTS; if there are any unknown components, it will print # an error or warning (depending on the value of _FIND_REQUIRED) and call # return(). # # The order of components in is guaranteed to match the order they # are listed in the KNOWN_COMPONENTS argument. # # If SKIP_DEPENDENCY_HANDLING is not set, for each component the variable # __component_deps will be checked for dependent components. # If is listed in _FIND_COMPONENTS, then all its (transitive) # dependencies will also be added to . # # :: # # ecm_find_package_handle_library_components( # COMPONENTS [ [...]] # [SKIP_DEPENDENCY_HANDLING]) # [SKIP_PKG_CONFIG]) # # Creates an imported library target for each component. The operation of this # macro depends on the presence of a number of CMake variables. # # The __lib variable should contain the name of this library, # and __header variable should contain the name of a header # file associated with it (whatever relative path is normally passed to # '#include'). __header_subdir variable can be used to specify # which subdirectory of the include path the headers will be found in. # ecm_find_package_components() will then search for the library # and include directory (creating appropriate cache variables) and create an # imported library target named ::. # # Additional variables can be used to provide additional information: # # If SKIP_PKG_CONFIG, the __pkg_config variable is set, and # pkg-config is found, the pkg-config module given by # __pkg_config will be searched for and used to help locate the # library and header file. It will also be used to set # __VERSION. # # Note that if version information is found via pkg-config, # __FIND_VERSION can be set to require a particular version # for each component. # # If SKIP_DEPENDENCY_HANDLING is not set, the INTERFACE_LINK_LIBRARIES property # of the imported target for will be set to contain the imported # targets for the components listed in __component_deps. # _FOUND will also be set to false if any of the compoments in # __component_deps are not found. This requires the components # in __component_deps to be listed before in the # COMPONENTS argument. # # The following variables will be set: # # ``_TARGETS`` # the imported targets # ``_LIBRARIES`` # the found libraries # ``_INCLUDE_DIRS`` # the combined required include directories for the components # ``_DEFINITIONS`` # the "other" CFLAGS provided by pkg-config, if any # ``_VERSION`` # the value of ``__VERSION`` for the first component that # has this variable set (note that components are searched for in the order # they are passed to the macro), although if it is already set, it will not # be altered # # Note that these variables are never cleared, so if # ecm_find_package_handle_library_components() is called multiple times with # different components (typically because of multiple find_package() calls) then # ``_TARGETS``, for example, will contain all the targets found in any # call (although no duplicates). # # Since pre-1.0.0. #============================================================================= # SPDX-FileCopyrightText: 2014 Alex Merry # # SPDX-License-Identifier: BSD-3-Clause include(CMakeParseArguments) macro(ecm_find_package_version_check module_name) if(CMAKE_VERSION VERSION_LESS 2.8.12) message(FATAL_ERROR "CMake 2.8.12 is required by Find${module_name}.cmake") endif() if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12) message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use Find${module_name}.cmake") endif() endmacro() macro(ecm_find_package_parse_components module_name) set(ecm_fppc_options SKIP_DEPENDENCY_HANDLING) set(ecm_fppc_oneValueArgs RESULT_VAR) set(ecm_fppc_multiValueArgs KNOWN_COMPONENTS DEFAULT_COMPONENTS) cmake_parse_arguments(ECM_FPPC "${ecm_fppc_options}" "${ecm_fppc_oneValueArgs}" "${ecm_fppc_multiValueArgs}" ${ARGN}) if(ECM_FPPC_UNPARSED_ARGUMENTS) message(FATAL_ERROR "Unexpected arguments to ecm_find_package_parse_components: ${ECM_FPPC_UNPARSED_ARGUMENTS}") endif() if(NOT ECM_FPPC_RESULT_VAR) message(FATAL_ERROR "Missing RESULT_VAR argument to ecm_find_package_parse_components") endif() if(NOT ECM_FPPC_KNOWN_COMPONENTS) message(FATAL_ERROR "Missing KNOWN_COMPONENTS argument to ecm_find_package_parse_components") endif() if(NOT ECM_FPPC_DEFAULT_COMPONENTS) set(ECM_FPPC_DEFAULT_COMPONENTS ${ECM_FPPC_KNOWN_COMPONENTS}) endif() if(${module_name}_FIND_COMPONENTS) set(ecm_fppc_requestedComps ${${module_name}_FIND_COMPONENTS}) if(NOT ECM_FPPC_SKIP_DEPENDENCY_HANDLING) # Make sure deps are included foreach(ecm_fppc_comp ${ecm_fppc_requestedComps}) foreach(ecm_fppc_dep_comp ${${module_name}_${ecm_fppc_comp}_component_deps}) list(FIND ecm_fppc_requestedComps "${ecm_fppc_dep_comp}" ecm_fppc_index) if("${ecm_fppc_index}" STREQUAL "-1") if(NOT ${module_name}_FIND_QUIETLY) message(STATUS "${module_name}: ${ecm_fppc_comp} requires ${${module_name}_${ecm_fppc_comp}_component_deps}") endif() list(APPEND ecm_fppc_requestedComps "${ecm_fppc_dep_comp}") endif() endforeach() endforeach() else() message(STATUS "Skipping dependency handling for ${module_name}") endif() list(REMOVE_DUPLICATES ecm_fppc_requestedComps) # This makes sure components are listed in the same order as # KNOWN_COMPONENTS (potentially important for inter-dependencies) set(${ECM_FPPC_RESULT_VAR}) foreach(ecm_fppc_comp ${ECM_FPPC_KNOWN_COMPONENTS}) list(FIND ecm_fppc_requestedComps "${ecm_fppc_comp}" ecm_fppc_index) if(NOT "${ecm_fppc_index}" STREQUAL "-1") list(APPEND ${ECM_FPPC_RESULT_VAR} "${ecm_fppc_comp}") list(REMOVE_AT ecm_fppc_requestedComps ${ecm_fppc_index}) endif() endforeach() # if there are any left, they are unknown components if(ecm_fppc_requestedComps) set(ecm_fppc_msgType STATUS) if(${module_name}_FIND_REQUIRED) set(ecm_fppc_msgType FATAL_ERROR) endif() if(NOT ${module_name}_FIND_QUIETLY) message(${ecm_fppc_msgType} "${module_name}: requested unknown components ${ecm_fppc_requestedComps}") endif() return() endif() else() set(${ECM_FPPC_RESULT_VAR} ${ECM_FPPC_DEFAULT_COMPONENTS}) endif() endmacro() macro(ecm_find_package_handle_library_components module_name) set(ecm_fpwc_options SKIP_PKG_CONFIG SKIP_DEPENDENCY_HANDLING) set(ecm_fpwc_oneValueArgs) set(ecm_fpwc_multiValueArgs COMPONENTS) cmake_parse_arguments(ECM_FPWC "${ecm_fpwc_options}" "${ecm_fpwc_oneValueArgs}" "${ecm_fpwc_multiValueArgs}" ${ARGN}) if(ECM_FPWC_UNPARSED_ARGUMENTS) message(FATAL_ERROR "Unexpected arguments to ecm_find_package_handle_components: ${ECM_FPWC_UNPARSED_ARGUMENTS}") endif() if(NOT ECM_FPWC_COMPONENTS) message(FATAL_ERROR "Missing COMPONENTS argument to ecm_find_package_handle_components") endif() include(FindPackageHandleStandardArgs) find_package(PkgConfig) foreach(ecm_fpwc_comp ${ECM_FPWC_COMPONENTS}) set(ecm_fpwc_dep_vars) set(ecm_fpwc_dep_targets) if(NOT SKIP_DEPENDENCY_HANDLING) foreach(ecm_fpwc_dep ${${module_name}_${ecm_fpwc_comp}_component_deps}) list(APPEND ecm_fpwc_dep_vars "${module_name}_${ecm_fpwc_dep}_FOUND") list(APPEND ecm_fpwc_dep_targets "${module_name}::${ecm_fpwc_dep}") endforeach() endif() if(NOT ECM_FPWC_SKIP_PKG_CONFIG AND ${module_name}_${ecm_fpwc_comp}_pkg_config) pkg_check_modules(PKG_${module_name}_${ecm_fpwc_comp} QUIET ${${module_name}_${ecm_fpwc_comp}_pkg_config}) endif() find_path(${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR NAMES ${${module_name}_${ecm_fpwc_comp}_header} HINTS ${PKG_${module_name}_${ecm_fpwc_comp}_INCLUDE_DIRS} PATH_SUFFIXES ${${module_name}_${ecm_fpwc_comp}_header_subdir} ) find_library(${module_name}_${ecm_fpwc_comp}_LIBRARY NAMES ${${module_name}_${ecm_fpwc_comp}_lib} HINTS ${PKG_${module_name}_${ecm_fpwc_comp}_LIBRARY_DIRS} ) set(${module_name}_${ecm_fpwc_comp}_VERSION "${PKG_${module_name}_${ecm_fpwc_comp}_VERSION}") if(NOT ${module_name}_VERSION) set(${module_name}_VERSION ${${module_name}_${ecm_fpwc_comp}_VERSION}) endif() set(FPHSA_NAME_MISMATCHED 1) find_package_handle_standard_args(${module_name}_${ecm_fpwc_comp} FOUND_VAR ${module_name}_${ecm_fpwc_comp}_FOUND REQUIRED_VARS ${module_name}_${ecm_fpwc_comp}_LIBRARY ${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR ${ecm_fpwc_dep_vars} VERSION_VAR ${module_name}_${ecm_fpwc_comp}_VERSION ) unset(FPHSA_NAME_MISMATCHED) mark_as_advanced( ${module_name}_${ecm_fpwc_comp}_LIBRARY ${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR ) if(${module_name}_${ecm_fpwc_comp}_FOUND) list(APPEND ${module_name}_LIBRARIES "${${module_name}_${ecm_fpwc_comp}_LIBRARY}") list(APPEND ${module_name}_INCLUDE_DIRS "${${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR}") set(${module_name}_DEFINITIONS ${${module_name}_DEFINITIONS} ${PKG_${module_name}_${ecm_fpwc_comp}_DEFINITIONS}) if(NOT TARGET ${module_name}::${ecm_fpwc_comp}) add_library(${module_name}::${ecm_fpwc_comp} UNKNOWN IMPORTED) set_target_properties(${module_name}::${ecm_fpwc_comp} PROPERTIES IMPORTED_LOCATION "${${module_name}_${ecm_fpwc_comp}_LIBRARY}" INTERFACE_COMPILE_OPTIONS "${PKG_${module_name}_${ecm_fpwc_comp}_DEFINITIONS}" INTERFACE_INCLUDE_DIRECTORIES "${${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR}" INTERFACE_LINK_LIBRARIES "${ecm_fpwc_dep_targets}" ) endif() list(APPEND ${module_name}_TARGETS "${module_name}::${ecm_fpwc_comp}") endif() endforeach() if(${module_name}_LIBRARIES) list(REMOVE_DUPLICATES ${module_name}_LIBRARIES) endif() if(${module_name}_INCLUDE_DIRS) list(REMOVE_DUPLICATES ${module_name}_INCLUDE_DIRS) endif() if(${module_name}_DEFINITIONS) list(REMOVE_DUPLICATES ${module_name}_DEFINITIONS) endif() if(${module_name}_TARGETS) list(REMOVE_DUPLICATES ${module_name}_TARGETS) endif() endmacro() framework-2.3.0/cmake/FindGIO.cmake000066400000000000000000000051721426132540300170170ustar00rootroot00000000000000find_package(PkgConfig) pkg_check_modules(PC_GIO gio-2.0 gio-unix-2.0 QUIET) set(GIO_INCLUDE_DIRS ${PC_GIO_INCLUDE_DIRS}) foreach(COMP ${PC_GIO_LIBRARIES}) find_library(GIO_${COMP} NAMES ${COMP} HINTS ${PC_GIO_LIBRARY_DIRS}) list(APPEND GIO_LIBRARIES ${GIO_${COMP}}) endforeach() execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable gdbus_codegen gio-2.0 OUTPUT_VARIABLE GDBUS_CODEGEN_EXECUTABLE) string(REGEX REPLACE "[\r\n]" " " GDBUS_CODEGEN_EXECUTABLE "${GDBUS_CODEGEN_EXECUTABLE}") string(REGEX REPLACE " +$" "" GDBUS_CODEGEN_EXECUTABLE "${GDBUS_CODEGEN_EXECUTABLE}") # handle the QUIETLY and REQUIRED arguments and set GLIB2_FOUND to TRUE if # all listed variables are TRUE include(FindPackageHandleStandardArgs) find_package_handle_standard_args(GIO DEFAULT_MSG GIO_LIBRARIES GIO_INCLUDE_DIRS) mark_as_advanced(GIO_INCLUDE_DIRS GIO_LIBRARIES) if(PC_GIO_FOUND AND NOT TARGET GLib2::GIO) add_library(GLib2::GIO INTERFACE IMPORTED) set_property(TARGET GLib2::GIO PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GIO_INCLUDE_DIRS}) set_property(TARGET GLib2::GIO PROPERTY INTERFACE_LINK_LIBRARIES ${GIO_LIBRARIES}) endif() function(GDBUS_ADD_CODE _sources _interface) get_filename_component(_infile ${_interface} ABSOLUTE) get_filename_component(_basename ${_interface} NAME_WE) set(_output "${CMAKE_CURRENT_BINARY_DIR}/${_basename}") get_source_file_property(_interface_prefix ${_interface} INTERFACE_PREFIX) if(_interface_prefix) set(_params ${_params} --interface-prefix ${_interface_prefix}) endif() get_source_file_property(_output_name ${_interface} OUTPUT_NAME) if(_output_name) set(_output "${_output_name}") endif() get_filename_component(_output_directory ${_output} DIRECTORY) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_output_directory}) get_source_file_property(_namespace ${_interface} NAMESPACE) if(_namespace) set(_params ${_params} --c-namespace ${_namespace}) endif() get_source_file_property(_annotate ${_interface} ANNOTATE) if(_annotate) set(_params ${_params} --annotate ${_annotate}) endif() add_custom_command(OUTPUT "${_output}.c" "${_output}.h" COMMAND ${GDBUS_CODEGEN_EXECUTABLE} ${_params} --generate-c-code ${_output} ${_infile} DEPENDS ${_infile} VERBATIM) set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/${_output}.c" "${CMAKE_CURRENT_BINARY_DIR}/${_output}.h" PROPERTY SKIP_AUTOMOC ON) list(APPEND ${_sources} "${CMAKE_CURRENT_BINARY_DIR}/${_output}.c" "${CMAKE_CURRENT_BINARY_DIR}/${_output}.h") set(${_sources} ${${_sources}} PARENT_SCOPE) endfunction() framework-2.3.0/cmake/FindGLib2.cmake000066400000000000000000000045671426132540300173070ustar00rootroot00000000000000include(FeatureSummary) set_package_properties(GLib2 PROPERTIES URL "https://wiki.gnome.org/Projects/GLib" DESCRIPTION "GLib provides the core application building blocks for libraries and applications written in C") find_package(PkgConfig) pkg_check_modules(PC_GLib2 glib-2.0>=2.38 QUIET) set(GLib2_INCLUDE_DIRS ${PC_GLib2_INCLUDE_DIRS}) foreach(COMP ${PC_GLib2_LIBRARIES}) find_library(GLib2_${COMP} NAMES ${COMP} HINTS ${PC_GLib2_LIBRARY_DIRS}) list(APPEND GLib2_LIBRARIES ${GLib2_${COMP}}) endforeach() execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable glib_genmarshal glib-2.0 OUTPUT_VARIABLE GLib2_GENMARHSAL_EXECUTABLE) string(REGEX REPLACE "[\r\n]" " " GLib2_GENMARHSAL_EXECUTABLE "${GLib2_GENMARHSAL_EXECUTABLE}") string(REGEX REPLACE " +$" "" GLib2_GENMARHSAL_EXECUTABLE "${GLib2_GENMARHSAL_EXECUTABLE}") # handle the QUIETLY and REQUIRED arguments and set GLib2_FOUND to TRUE if # all listed variables are TRUE include(FindPackageHandleStandardArgs) find_package_handle_standard_args(GLib2 DEFAULT_MSG GLib2_LIBRARIES GLib2_INCLUDE_DIRS) mark_as_advanced(GLib2_INCLUDE_DIRS GLib2_LIBRARIES) if(PC_GLib2_FOUND AND NOT TARGET GLib2::GLib) add_library(GLib2::GLib INTERFACE IMPORTED) set_property(TARGET GLib2::GLib PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GLib2_INCLUDE_DIRS}) set_property(TARGET GLib2::GLib PROPERTY INTERFACE_LINK_LIBRARIES ${GLib2_LIBRARIES}) endif() function(GLib2_ADD_MARSHAL _sources _marshallist) get_filename_component(_infile ${_marshallist} ABSOLUTE) get_filename_component(_basename ${_marshallist} NAME_WE) set(_header "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h") set(_body "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.c") get_source_file_property(_prefix ${_marshallist} PREFIX) if(_prefix) set(_params ${_params} --prefix ${_prefix}) endif() add_custom_command(OUTPUT "${_header}" COMMAND ${GLib2_GENMARHSAL_EXECUTABLE} --header ${_params} ${_infile} > ${_header} DEPENDS ${_infile} VERBATIM) add_custom_command(OUTPUT "${_body}" COMMAND ${GLib2_GENMARHSAL_EXECUTABLE} --body ${_params} ${_infile} > ${_body} DEPENDS ${_infile} VERBATIM) set_property(SOURCE ${_body} ${_header} PROPERTY SKIP_AUTOMOC ON) list(APPEND ${_sources} "${_body}" "${_header}") set(${_sources} ${${_sources}} PARENT_SCOPE) endfunction() framework-2.3.0/cmake/FindQtWaylandScanner.cmake000066400000000000000000000141731426132540300216200ustar00rootroot00000000000000#.rst: # FindQtWaylandScanner # -------------------- # # Try to find qtwaylandscanner. # # If the qtwaylandscanner executable is not in your PATH, you can provide # an alternative name or full path location with the ``QtWaylandScanner_EXECUTABLE`` # variable. # # This will define the following variables: # # ``QtWaylandScanner_FOUND`` # True if qtwaylandscanner is available # # ``QtWaylandScanner_EXECUTABLE`` # The qtwaylandscanner executable. # # If ``QtWaylandScanner_FOUND`` is TRUE, it will also define the following imported # target: # # ``Wayland::QtScanner`` # The qtwaylandscanner executable. # # This module provides the following functions to generate C++ protocol # implementations: # # - ``ecm_add_qtwayland_client_protocol`` # - ``ecm_add_qtwayland_server_protocol`` # # :: # # ecm_add_qtwayland_client_protocol( # PROTOCOL # BASENAME # [PREFIX ]) # # Generate C++ wrapper to Wayland client protocol files from ```` # XML definition for the ```` interface and append those files # to ````. Pass the ```` argument if the interface # names don't start with ``qt_`` or ``wl_``. # # WaylandScanner is required and will be searched for. # # :: # # ecm_add_qtwayland_server_protocol( # PROTOCOL # BASENAME # [PREFIX ]) # # Generate C++ wrapper to Wayland server protocol files from ```` # XML definition for the ```` interface and append those files # to ````. Pass the ```` argument if the interface # names don't start with ``qt_`` or ``wl_``. # # WaylandScanner is required and will be searched for. # # Since 1.4.0. #============================================================================= # SPDX-FileCopyrightText: 2012-2014 Pier Luigi Fiorini # # SPDX-License-Identifier: BSD-3-Clause #============================================================================= include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpers.cmake) ecm_find_package_version_check(QtWaylandScanner) # Find qtwaylandscanner find_program(QtWaylandScanner_EXECUTABLE NAMES qtwaylandscanner HINTS /usr/lib64/qt5/bin/ /usr/lib/qt5/bin/) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(QtWaylandScanner FOUND_VAR QtWaylandScanner_FOUND REQUIRED_VARS QtWaylandScanner_EXECUTABLE ) mark_as_advanced(QtWaylandScanner_EXECUTABLE) if(NOT TARGET Wayland::QtScanner AND QtWaylandScanner_FOUND) add_executable(Wayland::QtScanner IMPORTED) set_target_properties(Wayland::QtScanner PROPERTIES IMPORTED_LOCATION "${QtWaylandScanner_EXECUTABLE}" ) endif() include(FeatureSummary) set_package_properties(QtWaylandScanner PROPERTIES URL "https://qt.io/" DESCRIPTION "Executable that converts XML protocol files to C++ code" ) include(CMakeParseArguments) function(ecm_add_qtwayland_client_protocol out_var) # Parse arguments set(oneValueArgs PROTOCOL BASENAME PREFIX) cmake_parse_arguments(ARGS "" "${oneValueArgs}" "" ${ARGN}) if(ARGS_UNPARSED_ARGUMENTS) message(FATAL_ERROR "Unknown keywords given to ecm_add_qtwayland_client_protocol(): \"${ARGS_UNPARSED_ARGUMENTS}\"") endif() set(_prefix "${ARGS_PREFIX}") find_package(WaylandScanner REQUIRED QUIET) ecm_add_wayland_client_protocol(${out_var} PROTOCOL ${ARGS_PROTOCOL} BASENAME ${ARGS_BASENAME}) get_filename_component(_infile ${ARGS_PROTOCOL} ABSOLUTE) set(_ccode "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-client-protocol.c") set(_cheader "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-client-protocol.h") set(_header "${CMAKE_CURRENT_BINARY_DIR}/qwayland-${ARGS_BASENAME}.h") set(_code "${CMAKE_CURRENT_BINARY_DIR}/qwayland-${ARGS_BASENAME}.cpp") set_source_files_properties(${_header} ${_code} GENERATED) add_custom_command(OUTPUT "${_header}" COMMAND ${QtWaylandScanner_EXECUTABLE} client-header ${_infile} "" ${_prefix} > ${_header} DEPENDS ${_infile} ${_cheader} VERBATIM) add_custom_command(OUTPUT "${_code}" COMMAND ${QtWaylandScanner_EXECUTABLE} client-code ${_infile} "" ${_prefix} > ${_code} DEPENDS ${_infile} ${_header} VERBATIM) set_property(SOURCE ${_header} ${_code} ${_cheader} ${_ccode} PROPERTY SKIP_AUTOMOC ON) list(APPEND ${out_var} "${_code}") set(${out_var} ${${out_var}} PARENT_SCOPE) endfunction() function(ecm_add_qtwayland_server_protocol out_var) # Parse arguments set(oneValueArgs PROTOCOL BASENAME PREFIX) cmake_parse_arguments(ARGS "" "${oneValueArgs}" "" ${ARGN}) if(ARGS_UNPARSED_ARGUMENTS) message(FATAL_ERROR "Unknown keywords given to ecm_add_qtwayland_server_protocol(): \"${ARGS_UNPARSED_ARGUMENTS}\"") endif() set(_prefix "${ARGS_PREFIX}") find_package(WaylandScanner REQUIRED QUIET) ecm_add_wayland_server_protocol(${out_var} PROTOCOL ${ARGS_PROTOCOL} BASENAME ${ARGS_BASENAME}) get_filename_component(_infile ${ARGS_PROTOCOL} ABSOLUTE) set(_header "${CMAKE_CURRENT_BINARY_DIR}/qwayland-server-${ARGS_BASENAME}.h") set(_code "${CMAKE_CURRENT_BINARY_DIR}/qwayland-server-${ARGS_BASENAME}.cpp") set_source_files_properties(${_header} ${_code} GENERATED) add_custom_command(OUTPUT "${_header}" COMMAND ${QtWaylandScanner_EXECUTABLE} server-header ${_infile} "" ${_prefix} > ${_header} DEPENDS ${_infile} VERBATIM) add_custom_command(OUTPUT "${_code}" COMMAND ${QtWaylandScanner_EXECUTABLE} server-code ${_infile} "" ${_prefix} > ${_code} DEPENDS ${_infile} ${_header} VERBATIM) set_property(SOURCE ${_header} ${_code} PROPERTY SKIP_AUTOMOC ON) list(APPEND ${out_var} "${_code}") set(${out_var} ${${out_var}} PARENT_SCOPE) endfunction() framework-2.3.0/cmake/FindUDev.cmake000066400000000000000000000037561426132540300172520ustar00rootroot00000000000000#.rst: # FindUDev # -------- # # Try to find the UDev library. # # This will define the following variables: # # ``UDev_FOUND`` # System has UDev. # # ``UDev_INCLUDE_DIRS`` # The libudev include directory. # # ``UDev_LIBRARIES`` # The libudev libraries. # # ``UDev_VERSION`` # The libudev version. # # If ``UDev_FOUND`` is TRUE, it will also define the following imported # target: # # ``UDev::UDev`` # The UDev library # # Since 5.57.0. #============================================================================= # SPDX-FileCopyrightText: 2010 Rafael Fernández López # SPDX-FileCopyrightText: 2019 Volker Krause # # SPDX-License-Identifier: BSD-3-Clause #============================================================================= find_package(PkgConfig QUIET) pkg_check_modules(PC_UDEV QUIET libudev) find_path(UDev_INCLUDE_DIRS NAMES libudev.h HINTS ${PC_UDEV_INCLUDE_DIRS}) find_library(UDev_LIBRARIES NAMES udev HINTS ${PC_UDEV_LIBRARY_DIRS}) set(UDev_VERSION ${PC_UDEV_VERSION}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(UDev FOUND_VAR UDev_FOUND REQUIRED_VARS UDev_INCLUDE_DIRS UDev_LIBRARIES VERSION_VAR UDev_VERSION ) mark_as_advanced(UDev_INCLUDE_DIRS UDev_LIBRARIES) if(UDev_FOUND AND NOT TARGET UDev::UDev) add_library(UDev::UDev UNKNOWN IMPORTED) set_target_properties(UDev::UDev PROPERTIES IMPORTED_LOCATION "${UDev_LIBRARIES}" INTERFACE_INCLUDE_DIRECTORIES "${UDev_INCLUDE_DIRS}" INTERFACE_COMPILE_DEFINITIONS "${PC_UDEV_CFLAGS_OTHER}" ) endif() # backward compat variables, remove for KF6 set(UDEV_FOUND ${UDev_FOUND}) set(UDEV_LIBS ${UDev_LIBRARIES}) set(UDEV_INCLUDE_DIR ${UDev_INCLUDE_DIRS}) mark_as_advanced(UDEV_FOUND UDEV_LIBS UDEV_INCLUDE_DIR) include(FeatureSummary) set_package_properties(UDev PROPERTIES DESCRIPTION "API for enumerating and introspecting local devices (part of systemd)" URL "https://freedesktop.org/wiki/Software/systemd/" ) framework-2.3.0/cmake/FindWayland.cmake000066400000000000000000000104161426132540300177750ustar00rootroot00000000000000#.rst: # FindWayland # ----------- # # Try to find Wayland. # # This is a component-based find module, which makes use of the COMPONENTS # and OPTIONAL_COMPONENTS arguments to find_module. The following components # are available:: # # Client Server Cursor Egl # # If no components are specified, this module will act as though all components # were passed to OPTIONAL_COMPONENTS. # # This module will define the following variables, independently of the # components searched for or found: # # ``Wayland_FOUND`` # TRUE if (the requested version of) Wayland is available # ``Wayland_VERSION`` # Found Wayland version # ``Wayland_TARGETS`` # A list of all targets imported by this module (note that there may be more # than the components that were requested) # ``Wayland_LIBRARIES`` # This can be passed to target_link_libraries() instead of the imported # targets # ``Wayland_INCLUDE_DIRS`` # This should be passed to target_include_directories() if the targets are # not used for linking # ``Wayland_DEFINITIONS`` # This should be passed to target_compile_options() if the targets are not # used for linking # ``Wayland_DATADIR`` # The core wayland protocols data directory # Since 5.73.0 # # For each searched-for components, ``Wayland__FOUND`` will be set to # TRUE if the corresponding Wayland library was found, and FALSE otherwise. If # ``Wayland__FOUND`` is TRUE, the imported target # ``Wayland::`` will be defined. This module will also attempt to # determine ``Wayland_*_VERSION`` variables for each imported target, although # ``Wayland_VERSION`` should normally be sufficient. # # In general we recommend using the imported targets, as they are easier to use # and provide more control. Bear in mind, however, that if any target is in the # link interface of an exported library, it must be made available by the # package config file. # # Since pre-1.0.0. #============================================================================= # SPDX-FileCopyrightText: 2014 Alex Merry # SPDX-FileCopyrightText: 2014 Martin Gräßlin # # SPDX-License-Identifier: BSD-3-Clause #============================================================================= include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpers.cmake) ecm_find_package_version_check(Wayland) set(Wayland_known_components Client Server Cursor Egl ) foreach(_comp ${Wayland_known_components}) string(TOLOWER "${_comp}" _lc_comp) set(Wayland_${_comp}_component_deps) set(Wayland_${_comp}_pkg_config "wayland-${_lc_comp}") set(Wayland_${_comp}_lib "wayland-${_lc_comp}") set(Wayland_${_comp}_header "wayland-${_lc_comp}.h") endforeach() set(Wayland_Egl_component_deps Client) ecm_find_package_parse_components(Wayland RESULT_VAR Wayland_components KNOWN_COMPONENTS ${Wayland_known_components} ) ecm_find_package_handle_library_components(Wayland COMPONENTS ${Wayland_components} ) # If pkg-config didn't provide us with version information, # try to extract it from wayland-version.h # (Note that the version from wayland-egl.pc will probably be # the Mesa version, rather than the Wayland version, but that # version will be ignored as we always find wayland-client.pc # first). if(NOT Wayland_VERSION) find_file(Wayland_VERSION_HEADER NAMES wayland-version.h HINTS ${Wayland_INCLUDE_DIRS} ) mark_as_advanced(Wayland_VERSION_HEADER) if(Wayland_VERSION_HEADER) file(READ ${Wayland_VERSION_HEADER} _wayland_version_header_contents) string(REGEX REPLACE "^.*[ \t]+WAYLAND_VERSION[ \t]+\"([0-9.]*)\".*$" "\\1" Wayland_VERSION "${_wayland_version_header_contents}" ) unset(_wayland_version_header_contents) endif() endif() find_package_handle_standard_args(Wayland FOUND_VAR Wayland_FOUND REQUIRED_VARS Wayland_LIBRARIES VERSION_VAR Wayland_VERSION HANDLE_COMPONENTS ) pkg_get_variable(Wayland_DATADIR wayland-server pkgdatadir) include(FeatureSummary) set_package_properties(Wayland PROPERTIES URL "https://wayland.freedesktop.org/" DESCRIPTION "C library implementation of the Wayland protocol: a protocol for a compositor to talk to its clients" ) framework-2.3.0/cmake/FindWaylandProtocols.cmake000066400000000000000000000025601426132540300217030ustar00rootroot00000000000000#.rst: # FindWaylandProtocols # ------- # # Find wayland protocol description files # # Try to find wayland protocol files. The following values are defined # # :: # # WAYLANDPROTOCOLS_FOUND - True if wayland protocol files are available # WAYLANDPROTOCOLS_PATH - Path to wayland protocol files # #============================================================================= # Copyright (c) 2015 Jari Vetoniemi # # Distributed under the OSI-approved BSD License (the "License"); # # This software is distributed WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the License for more information. #============================================================================= include(FeatureSummary) set_package_properties(WaylandProtocols PROPERTIES URL "https://cgit.freedesktop.org/wayland/wayland-protocols" DESCRIPTION "Wayland protocol development") unset(WAYLANDPROTOCOLS_PATH) find_package(PkgConfig) if (PKG_CONFIG_FOUND) execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-protocols OUTPUT_VARIABLE WAYLANDPROTOCOLS_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) endif () include(FindPackageHandleStandardArgs) find_package_handle_standard_args(WaylandProtocols DEFAULT_MSG WAYLANDPROTOCOLS_PATH) mark_as_advanced(WAYLANDPROTOCOLS_PATH)framework-2.3.0/cmake/FindWaylandScanner.cmake000066400000000000000000000115561426132540300213150ustar00rootroot00000000000000#.rst: # FindWaylandScanner # ------------------ # # Try to find wayland-scanner. # # If the wayland-scanner executable is not in your PATH, you can provide # an alternative name or full path location with the ``WaylandScanner_EXECUTABLE`` # variable. # # This will define the following variables: # # ``WaylandScanner_FOUND`` # True if wayland-scanner is available. # # ``WaylandScanner_EXECUTABLE`` # The wayland-scanner executable. # # If ``WaylandScanner_FOUND`` is TRUE, it will also define the following imported # target: # # ``Wayland::Scanner`` # The wayland-scanner executable. # # This module provides the following functions to generate C protocol # implementations: # # - ``ecm_add_wayland_client_protocol`` # - ``ecm_add_wayland_server_protocol`` # # :: # # ecm_add_wayland_client_protocol( # PROTOCOL # BASENAME ) # # Generate Wayland client protocol files from ```` XML # definition for the ```` interface and append those files # to ````. # # :: # # ecm_add_wayland_server_protocol( # PROTOCOL # BASENAME ) # # Generate Wayland server protocol files from ```` XML # definition for the ```` interface and append those files # to ````. # # Since 1.4.0. #============================================================================= # SPDX-FileCopyrightText: 2012-2014 Pier Luigi Fiorini # # SPDX-License-Identifier: BSD-3-Clause #============================================================================= include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpers.cmake) ecm_find_package_version_check(WaylandScanner) # Find wayland-scanner find_program(WaylandScanner_EXECUTABLE NAMES wayland-scanner) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(WaylandScanner FOUND_VAR WaylandScanner_FOUND REQUIRED_VARS WaylandScanner_EXECUTABLE ) mark_as_advanced(WaylandScanner_EXECUTABLE) if(NOT TARGET Wayland::Scanner AND WaylandScanner_FOUND) add_executable(Wayland::Scanner IMPORTED) set_target_properties(Wayland::Scanner PROPERTIES IMPORTED_LOCATION "${WaylandScanner_EXECUTABLE}" ) endif() include(FeatureSummary) set_package_properties(WaylandScanner PROPERTIES URL "https://wayland.freedesktop.org/" DESCRIPTION "Executable that converts XML protocol files to C code" ) include(CMakeParseArguments) function(ecm_add_wayland_client_protocol out_var) # Parse arguments set(oneValueArgs PROTOCOL BASENAME) cmake_parse_arguments(ARGS "" "${oneValueArgs}" "" ${ARGN}) if(ARGS_UNPARSED_ARGUMENTS) message(FATAL_ERROR "Unknown keywords given to ecm_add_wayland_client_protocol(): \"${ARGS_UNPARSED_ARGUMENTS}\"") endif() get_filename_component(_infile ${ARGS_PROTOCOL} ABSOLUTE) set(_client_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-client-protocol.h") set(_code "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-protocol.c") set_source_files_properties(${_client_header} GENERATED) set_source_files_properties(${_code} GENERATED) set_property(SOURCE ${_client_header} ${_code} PROPERTY SKIP_AUTOMOC ON) add_custom_command(OUTPUT "${_client_header}" COMMAND ${WaylandScanner_EXECUTABLE} client-header ${_infile} ${_client_header} DEPENDS ${_infile} VERBATIM) add_custom_command(OUTPUT "${_code}" COMMAND ${WaylandScanner_EXECUTABLE} code ${_infile} ${_code} DEPENDS ${_infile} ${_client_header} VERBATIM) list(APPEND ${out_var} "${_client_header}" "${_code}") set(${out_var} ${${out_var}} PARENT_SCOPE) endfunction() function(ecm_add_wayland_server_protocol out_var) # Parse arguments set(oneValueArgs PROTOCOL BASENAME) cmake_parse_arguments(ARGS "" "${oneValueArgs}" "" ${ARGN}) if(ARGS_UNPARSED_ARGUMENTS) message(FATAL_ERROR "Unknown keywords given to ecm_add_wayland_server_protocol(): \"${ARGS_UNPARSED_ARGUMENTS}\"") endif() ecm_add_wayland_client_protocol(${out_var} PROTOCOL ${ARGS_PROTOCOL} BASENAME ${ARGS_BASENAME}) get_filename_component(_infile ${ARGS_PROTOCOL} ABSOLUTE) set(_server_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-server-protocol.h") set_property(SOURCE ${_server_header} PROPERTY SKIP_AUTOMOC ON) set_source_files_properties(${_server_header} GENERATED) add_custom_command(OUTPUT "${_server_header}" COMMAND ${WaylandScanner_EXECUTABLE} server-header ${_infile} ${_server_header} DEPENDS ${_infile} VERBATIM) list(APPEND ${out_var} "${_server_header}") set(${out_var} ${${out_var}} PARENT_SCOPE) endfunction() framework-2.3.0/cmake/FindXCB.cmake000066400000000000000000000035721426132540300170170ustar00rootroot00000000000000#.rst: # FindXCB # ------- # # Find XCB libraries # # Tries to find xcb libraries on unix systems. # # - Be sure to set the COMPONENTS to the components you want to link to # - The XCB_LIBRARIES variable is set ONLY to your COMPONENTS list # - To use only a specific component check the XCB_LIBRARIES_${COMPONENT} variable # # The following values are defined # # :: # # XCB_FOUND - True if xcb is available # XCB_INCLUDE_DIRS - Include directories for xcb # XCB_LIBRARIES - List of libraries for xcb # XCB_DEFINITIONS - List of definitions for xcb # #============================================================================= # Copyright (c) 2015 Jari Vetoniemi # # Distributed under the OSI-approved BSD License (the "License"); # # This software is distributed WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the License for more information. #============================================================================= include(FeatureSummary) set_package_properties(XCB PROPERTIES URL "http://xcb.freedesktop.org/" DESCRIPTION "X protocol C-language Binding") find_package(PkgConfig) pkg_check_modules(PC_XCB QUIET xcb ${XCB_FIND_COMPONENTS}) find_library(XCB_LIBRARIES xcb HINTS ${PC_XCB_LIBRARY_DIRS}) find_path(XCB_INCLUDE_DIRS xcb/xcb.h PATH_SUFFIXES xcb HINTS ${PC_XCB_INCLUDE_DIRS}) foreach(COMPONENT ${XCB_FIND_COMPONENTS}) find_library(XCB_LIBRARIES_${COMPONENT} xcb-${COMPONENT} HINTS ${PC_XCB_LIBRARY_DIRS}) list(APPEND XCB_LIBRARIES ${XCB_LIBRARIES_${COMPONENT}}) mark_as_advanced(XCB_LIBRARIES_${COMPONENT}) endforeach(COMPONENT ${XCB_FIND_COMPONENTS}) set(XCB_DEFINITIONS ${PC_XCB_CFLAGS_OTHER}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(XCB DEFAULT_MSG XCB_LIBRARIES XCB_INCLUDE_DIRS) mark_as_advanced(XCB_INCLUDE_DIRS XCB_LIBRARIES XCB_DEFINITIONS) framework-2.3.0/common/000077500000000000000000000000001426132540300150015ustar00rootroot00000000000000framework-2.3.0/common/.gitignore000066400000000000000000000000131426132540300167630ustar00rootroot00000000000000*.pc *.prf framework-2.3.0/common/maliit-framework.pc.in000066400000000000000000000005171426132540300212070ustar00rootroot00000000000000libdir=@CMAKE_INSTALL_FULL_LIBDIR@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ Name: Maliit Framework Description: Maliit provides a flexible and cross platform input method framework. It is usable on all MeeGo user experiences, and in other GNU/Linux distributions as well. Version: @PROJECT_VERSION@ Cflags: -I${includedir}/maliit-2 framework-2.3.0/common/maliit-framework.prf.in000066400000000000000000000001601426132540300213660ustar00rootroot00000000000000DEFINES *= @MALIIT_FRAMEWORK_FEATURE@ INCLUDEPATH *= @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@/maliit-2 framework-2.3.0/common/maliit/000077500000000000000000000000001426132540300162605ustar00rootroot00000000000000framework-2.3.0/common/maliit/namespace.h000066400000000000000000000137431426132540300203750ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef MALIIT_NAMESPACE_H #define MALIIT_NAMESPACE_H #include #include //! \ingroup common namespace Maliit { /*! * \brief Position of the window on the screen. */ enum Position { PositionOverlay, PositionCenterBottom, PositionLeftBottom, PositionRightBottom, }; /*! * \brief Content type for text entries. * * Content type of the text in the text edit widget, which can be used by * input method plugins to offer more specific input methods, such as a * numeric keypad for a number content type. Plugins may also adjust their * word prediction and error correction accordingly. */ enum TextContentType { //! all characters allowed FreeTextContentType, //! only integer numbers allowed NumberContentType, //! allows numbers and certain other characters used in phone numbers PhoneNumberContentType, //! allows only characters permitted in email address EmailContentType, //! allows only character permitted in URL address UrlContentType, //! allows content with user defined format CustomContentType }; /*! * \brief State of Copy/Paste button. */ enum CopyPasteState { //! Copy/Paste button is hidden InputMethodNoCopyPaste, //! Copy button is accessible InputMethodCopy, //! Paste button is accessible InputMethodPaste }; /*! * \brief Direction of plugin switching */ enum SwitchDirection { SwitchUndefined, //!< Special value for uninitialized variables SwitchForward, //!< Activate next plugin SwitchBackward //!< Activate previous plugin }; enum PreeditFace { PreeditDefault, PreeditNoCandidates, PreeditKeyPress, //!< Used for displaying the hwkbd key just pressed PreeditUnconvertible, //!< Inactive preedit region, not clickable PreeditActive //!< Preedit region with active suggestions }; enum HandlerState { OnScreen, Hardware, Accessory }; //! \brief Key event request type for \a MInputContext::keyEvent(). enum EventRequestType { EventRequestBoth, //!< Both a Qt::KeyEvent and a signal EventRequestSignalOnly, //!< Only a signal EventRequestEventOnly //!< Only a Qt::KeyEvent }; /*! * \brief The text format for part of the preedit string, specified by * start and length. * * \sa PreeditFace. */ struct PreeditTextFormat { int start; int length; PreeditFace preeditFace; PreeditTextFormat() : start(0), length(0), preeditFace(PreeditDefault) {}; PreeditTextFormat(int s, int l, const PreeditFace &face) : start(s), length(l), preeditFace(face) {}; }; namespace InputMethodQuery { //! Name of property which tells whether correction is enabled. //! \sa Maliit::ImCorrectionEnabledQuery. const char* const correctionEnabledQuery = "maliit-correction-enabled"; //! Name of property which holds ID of attribute extension. //! \sa Maliit::InputMethodAttributeExtensionIdQuery. const char* const attributeExtensionId = "maliit-attribute-extension-id"; //! Name of property which holds attribute extension. //! \sa Maliit::InputMethodAttributeExtensionQuery. const char* const attributeExtension = "maliit-attribute-extension"; //! Name of the property which overrides localized numeric input with western numeric input. //! \sa Maliit::WesternNumericInputEnforcedQuery. const char* const westernNumericInputEnforced = "maliit-western-numeric-input-enforced"; //! Name of the property which controls translucent VKB mode. const char* const translucentInputMethod = "maliit-translucent-input-method"; //! Name of the property which can suppress VKB even if focused. //! \sa Maliit::VisualizationPriorityQuery const char* const suppressInputMethod = "maliit-suppress-input-method"; } enum SettingEntryType { StringType = 1, IntType = 2, BoolType = 3, StringListType = 4, IntListType = 5 }; namespace SettingEntryAttributes { //! Name of setting entry attribute which holds the list of values that can be assigned to the entry. //! \sa Maliit::SettingsEntry const char* const valueDomain = "valueDomain"; //! Name of setting entry attribute which holds the descriptions for the values in valueDomain. //! \sa Maliit::SettingsEntry const char* const valueDomainDescriptions = "valueDomainDescriptions"; //! Name of setting entry attribute which holds the minimum valid value (inclusive) for an integer property. //! \sa Maliit::SettingsEntry const char* const valueRangeMin = "valueRangeMin"; //! Name of setting entry attribute which holds the maximum valid value (inclusive) for an integer property. //! \sa Maliit::SettingsEntry const char* const valueRangeMax = "valueRangeMax"; //! Name of setting entry attribute which holds the default value for a setting entry. //! \sa Maliit::SettingsEntry const char* const defaultValue = "defaultValue"; } } Q_DECLARE_METATYPE(Maliit::TextContentType) Q_DECLARE_METATYPE(Maliit::PreeditTextFormat) Q_DECLARE_METATYPE(QList) #endif framework-2.3.0/common/maliit/namespaceinternal.h000066400000000000000000000013471426132540300221270ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef NAMESPACEINTERNAL_H #define NAMESPACEINTERNAL_H //! \internal namespace Maliit { namespace Internal { //! Name of the input method hints stored in our update map. const char* const inputMethodHints = "maliit-inputmethod-hints"; }} // namespace Internal, Maliit #endif // NAMESPACEINTERNAL_H framework-2.3.0/common/maliit/settingdata.cpp000066400000000000000000000100001426132540300212620ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2012 Mattia Barbon * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #include "maliit/settingdata.h" namespace { bool checkValueDomain(const QVariant &value, const QVariant &domain) { if (!domain.isValid()) return true; if (!domain.canConvert(QVariant::List)) return false; QVariantList domain_values = domain.toList(); return domain_values.contains(value); } bool checkValueRange(const QVariant &value, const QVariant &range_min, const QVariant &range_max) { if (!range_min.isValid() && !range_max.isValid()) return true; if (range_min.isValid()) { if (!range_min.canConvert(QVariant::Int)) return false; if (range_min.toInt() > value.toInt()) return false; } if (range_max.isValid()) { if (!range_max.canConvert(QVariant::Int)) return false; if (range_max.toInt() < value.toInt()) return false; } return true; } bool checkValueDomain(const QVariantList &values, const QVariant &domain) { if (!domain.isValid()) return true; if (!domain.canConvert(QVariant::List)) return false; const QVariantList &domain_values = domain.toList(); Q_FOREACH (const QVariant &v, values) if (!domain_values.contains(v)) return false; return true; } bool checkValueRange(const QVariantList &values, const QVariant &range_min, const QVariant &range_max) { if (!range_min.isValid() && !range_max.isValid()) return true; Q_FOREACH (const QVariant &v, values) if (!checkValueRange(v, range_min, range_max)) return false; return true; } bool checkIntList(const QVariant &value) { if (!value.canConvert()) return false; const QVariantList &values = value.toList(); Q_FOREACH (const QVariant &v, values) { QVariant copy = v; if (!v.canConvert() || !copy.convert(QVariant::Int)) return false; } return true; } } bool validateSettingValue(Maliit::SettingEntryType type, const QVariantMap attributes, const QVariant &value) { QVariant domain = attributes[Maliit::SettingEntryAttributes::valueDomain]; QVariant range_min = attributes[Maliit::SettingEntryAttributes::valueRangeMin]; QVariant range_max = attributes[Maliit::SettingEntryAttributes::valueRangeMax]; QVariant copy = value; switch (type) { case Maliit::StringType: if (!value.canConvert()) return false; if (!checkValueDomain(value, domain)) return false; break; case Maliit::IntType: if (!value.canConvert() || !copy.convert(QVariant::Int)) return false; if (!checkValueDomain(value, domain)) return false; if (!checkValueRange(value, range_min, range_max)) return false; break; case Maliit::BoolType: if (!value.canConvert()) return false; break; case Maliit::StringListType: if (!value.canConvert()) return false; if (!checkValueDomain(value.toList(), domain)) return false; break; case Maliit::IntListType: if (!checkIntList(value)) return false; if (!checkValueDomain(value.toList(), domain)) return false; if (!checkValueRange(value.toList(), range_min, range_max)) return false; break; } return true; } framework-2.3.0/common/maliit/settingdata.h000066400000000000000000000036441426132540300207470ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2012 Mattia Barbon * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef MALIIT_SETTINGDATA_H #define MALIIT_SETTINGDATA_H #include #include #include #include /*! * \brief Single configuration entry for Maliit input method plugin * * \sa Maliit::SettingsEntry */ struct MImPluginSettingsEntry { //! Human-readable description QString description; //! The attribute extension key attribute for this entry QString extension_key; //! Entry value type Maliit::SettingEntryType type; //! Current value for the configuration entry QVariant value; //! Attributes, including domain values and descriptions QVariantMap attributes; }; /*! * \brief Settings for a Maliit input method plugin */ struct MImPluginSettingsInfo { //! The language used for human-readable descriptions QString description_language; //! Internal plugin name; "server" for global configuration entries QString plugin_name; //! Human-readable plugin description QString plugin_description; //! Attribute extension id; multiple MImPluginSettingsInfo instances might share the same extension id int extension_id; //! List of configuration entries for this plugin QList entries; }; /*! * \brief Validate the value for a plugin setting entry */ bool validateSettingValue(Maliit::SettingEntryType type, const QVariantMap attributes, const QVariant &value); Q_DECLARE_METATYPE(MImPluginSettingsEntry) Q_DECLARE_METATYPE(MImPluginSettingsInfo) Q_DECLARE_METATYPE(QList) #endif framework-2.3.0/connection/000077500000000000000000000000001426132540300156505ustar00rootroot00000000000000framework-2.3.0/connection/.gitignore000066400000000000000000000006011426132540300176350ustar00rootroot00000000000000org.maliit.server.service minputmethodserver.service minputmethodcontext1interface_adaptor.cpp minputmethodcontext1interface_adaptor.h minputmethodcontext1interface_interface.cpp minputmethodcontext1interface_interface.h minputmethodserver1interface_adaptor.cpp minputmethodserver1interface_adaptor.h minputmethodserver1interface_interface.cpp minputmethodserver1interface_interface.h framework-2.3.0/connection/README.weston000066400000000000000000000006511426132540300200500ustar00rootroot00000000000000Things not yet implemented in Weston, but used by Maliit Keyboard: 1. IM initiated hiding notifications. 2. Action invoking. By action we mean "copy", "paste" and such. For completness we could also pass a key sequences like Ctrl+c for copying or Ctrl+v for pasting. 3. Make putting a cursor before commited text possible. For now Weston takes an unsigned int which is relative to the beginning of commited text. framework-2.3.0/connection/connectionfactory.cpp000066400000000000000000000025451426132540300221110ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #include "connectionfactory.h" #include "minputcontextconnection.h" #include "dbusinputcontextconnection.h" #ifdef HAVE_WAYLAND #include "waylandinputmethodconnection.h" #endif namespace Maliit { namespace DBus { MInputContextConnection *createInputContextConnectionWithDynamicAddress() { QSharedPointer address(new Maliit::Server::DBus::DynamicAddress); return new DBusInputContextConnection(address); } MInputContextConnection *createInputContextConnectionWithFixedAddress(const QString &fixedAddress, bool allowAnonymous) { Q_UNUSED(allowAnonymous); QSharedPointer address(new Maliit::Server::DBus::FixedAddress(fixedAddress)); return new DBusInputContextConnection(address); } } // namespace DBus #ifdef HAVE_WAYLAND MInputContextConnection *createWestonIMProtocolConnection() { return new WaylandInputMethodConnection; } #endif } // namespace Maliit framework-2.3.0/connection/connectionfactory.h000066400000000000000000000017161426132540300215550ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef MALIIT_DBUS_CONNECTIONFACTORY_H #define MALIIT_DBUS_CONNECTIONFACTORY_H #include class MInputContextConnection; namespace Maliit { namespace DBus { MInputContextConnection *createInputContextConnectionWithDynamicAddress(); MInputContextConnection *createInputContextConnectionWithFixedAddress(const QString &fixedAddress, bool allowAnonymous); } // namespace DBus #ifdef HAVE_WAYLAND MInputContextConnection *createWestonIMProtocolConnection(); #endif } // namespace Maliit #endif // MALIIT_DBUS_CONNECTIONFACTORY_H framework-2.3.0/connection/dbuscustomarguments.cpp000066400000000000000000000057051426132540300225010ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2012 Mattia Barbon * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #include "dbuscustomarguments.h" #include #include QT_BEGIN_NAMESPACE QDBusArgument &operator<<(QDBusArgument &argument, const MImPluginSettingsEntry &entry) { argument.beginStructure(); argument << entry.description; argument << entry.extension_key; argument << static_cast(entry.type); // DBus does not have an "invalid variant" value, so we encode the validity as // a separate boolean field argument << entry.value.isValid(); if (entry.value.isValid()) argument << QDBusVariant(entry.value); else argument << QDBusVariant(QVariant(0)); argument << entry.attributes; argument.endStructure(); return argument; } const QDBusArgument &operator>>(const QDBusArgument &argument, MImPluginSettingsEntry &entry) { bool valid_value; int type; argument.beginStructure(); argument >> entry.description; argument >> entry.extension_key; argument >> type; // see comment in operator<< argument >> valid_value; argument >> entry.value; if (!valid_value) entry.value = QVariant(); argument >> entry.attributes; argument.endStructure(); entry.type = static_cast(type); return argument; } QDBusArgument &operator<<(QDBusArgument &argument, const MImPluginSettingsInfo &info) { argument.beginStructure(); argument << info.description_language; argument << info.plugin_name; argument << info.plugin_description; argument << info.extension_id; argument << info.entries; argument.endStructure(); return argument; } const QDBusArgument &operator>>(const QDBusArgument &argument, MImPluginSettingsInfo &info) { argument.beginStructure(); argument >> info.description_language; argument >> info.plugin_name; argument >> info.plugin_description; argument >> info.extension_id; argument >> info.entries; argument.endStructure(); return argument; } QDBusArgument &operator<<(QDBusArgument &arg, const Maliit::PreeditTextFormat &format) { arg.beginStructure(); arg << format.start << format.length << static_cast(format.preeditFace); arg.endStructure(); return arg; } const QDBusArgument &operator>>(const QDBusArgument &arg, Maliit::PreeditTextFormat &format) { int preedit_face(0); arg.beginStructure(); arg >> format.start >> format.length >> preedit_face; arg.endStructure(); format.preeditFace = static_cast (preedit_face); return arg; } QT_END_NAMESPACE framework-2.3.0/connection/dbuscustomarguments.h000066400000000000000000000024351426132540300221430ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2012 Mattia Barbon * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef DBUSCUSTOMARGUMENTS_H #define DBUSCUSTOMARGUMENTS_H class MImPluginSettingsEntry; class MImPluginSettingsInfo; #include #include QT_BEGIN_NAMESPACE class QDBusArgument; class QVariant; // MImPluginSettingsEntry marshalling QDBusArgument &operator<<(QDBusArgument &argument, const MImPluginSettingsEntry &entry); const QDBusArgument &operator>>(const QDBusArgument &argument, MImPluginSettingsEntry &entry); // MImPluginSettingsInfo marshalling QDBusArgument &operator<<(QDBusArgument &argument, const MImPluginSettingsInfo &info); const QDBusArgument &operator>>(const QDBusArgument &argument, MImPluginSettingsInfo &info); QDBusArgument &operator<<(QDBusArgument &arg, const Maliit::PreeditTextFormat &format); const QDBusArgument &operator>>(const QDBusArgument &arg, Maliit::PreeditTextFormat &format); QT_END_NAMESPACE #endif // DBUSCUSTOMARGUMENTS_H framework-2.3.0/connection/dbusinputcontextconnection.cpp000066400000000000000000000320451426132540300240620ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #include "dbusinputcontextconnection.h" #include "minputmethodserver1interfaceadaptor.h" #include "minputmethodcontext1interface_interface.h" #include "dbuscustomarguments.h" #include #include #include #include namespace { const char * const DBusPath = "/com/meego/inputmethod/uiserver1"; const char * const DBusInterface = "com.meego.inputmethod.uiserver1"; const char * const DBusClientPath = "/com/meego/inputmethod/inputcontext"; const char * const DBusClientInterface = "com.meego.inputmethod.inputcontext1"; const char * const DBusLocalPath("/org/freedesktop/DBus/Local"); const char * const DBusLocalInterface("org.freedesktop.DBus.Local"); const char * const DisconnectedSignal("Disconnected"); } DBusInputContextConnection::DBusInputContextConnection(const QSharedPointer &address) : MInputContextConnection(0) , mAddress(address) , mServer(mAddress->connect()) , mConnectionNumbers() , mProxys() , lastLanguage() { connect(mServer.data(), SIGNAL(newConnection(QDBusConnection)), this, SLOT(newConnection(QDBusConnection))); qDBusRegisterMetaType(); qDBusRegisterMetaType(); qDBusRegisterMetaType >(); qDBusRegisterMetaType(); qDBusRegisterMetaType >(); new Uiserver1Adaptor(this); } DBusInputContextConnection::~DBusInputContextConnection() { } void DBusInputContextConnection::newConnection(const QDBusConnection &connection) { ComMeegoInputmethodInputcontext1Interface *proxy = new ComMeegoInputmethodInputcontext1Interface(QString(), QString::fromLatin1(DBusClientPath), connection, this); static unsigned int connectionCounter = 1; // Start at 1 so 0 can be used as a sentinel value unsigned int connectionNumber = connectionCounter++; mConnectionNumbers.insert(connection.name(), connectionNumber); mProxys.insert(connectionNumber, proxy); mConnections.insert(connectionNumber, connection.name()); QDBusConnection c(connection); c.connect(QString(), QString::fromLatin1(DBusLocalPath), QString::fromLatin1(DBusLocalInterface), QString::fromLatin1(DisconnectedSignal), this, SLOT(onDisconnection())); c.registerObject(QString::fromLatin1(DBusPath), this); proxy->setLanguage(lastLanguage); } void DBusInputContextConnection::onDisconnection() { const QString &name = connection().name(); unsigned int connectionNumber = mConnectionNumbers.take(name); ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.take(connectionNumber); mConnections.remove(connectionNumber); delete proxy; handleDisconnection(connectionNumber); QDBusConnection::disconnectFromPeer(name); } void DBusInputContextConnection::sendPreeditString(const QString &string, const QList &preeditFormats, int replacementStart, int replacementLength, int cursorPos) { if (activeConnection) { MInputContextConnection::sendPreeditString(string, preeditFormats, replacementStart, replacementLength, cursorPos); ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(activeConnection); if (proxy) { proxy->updatePreedit(string, preeditFormats, replacementStart, replacementLength, cursorPos); } } } void DBusInputContextConnection::sendCommitString(const QString &string, int replaceStart, int replaceLength, int cursorPos) { if (activeConnection) { MInputContextConnection::sendCommitString(string, replaceStart, replaceLength, cursorPos); ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(activeConnection); if (proxy) { proxy->commitString(string, replaceStart, replaceLength, cursorPos); } } } void DBusInputContextConnection::sendKeyEvent(const QKeyEvent &keyEvent, Maliit::EventRequestType requestType) { if (activeConnection) { MInputContextConnection::sendKeyEvent(keyEvent, requestType); ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(activeConnection); if (proxy) { proxy->keyEvent(keyEvent.type(), keyEvent.key(), keyEvent.modifiers(), keyEvent.text(), keyEvent.isAutoRepeat(), keyEvent.count(), requestType); } } } void DBusInputContextConnection::notifyImInitiatedHiding() { ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(activeConnection); if (proxy) { proxy->imInitiatedHide(); } } void DBusInputContextConnection::setGlobalCorrectionEnabled(bool enabled) { ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(activeConnection); if ((enabled != globalCorrectionEnabled()) && proxy) { proxy->setGlobalCorrectionEnabled(enabled); MInputContextConnection::setGlobalCorrectionEnabled(enabled); } } QRect DBusInputContextConnection::preeditRectangle(bool &valid) { ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(activeConnection); if (proxy) { int x, y, width, height; if (proxy->preeditRectangle(x, y, width, height)) { valid = true; return QRect(x, y, width, height); } } valid = false; return QRect(); } void DBusInputContextConnection::setRedirectKeys(bool enabled) { ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(activeConnection); if ((enabled != redirectKeysEnabled()) && proxy) { proxy->setRedirectKeys(enabled); MInputContextConnection::setRedirectKeys(enabled); } } void DBusInputContextConnection::setDetectableAutoRepeat(bool enabled) { ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(activeConnection); if ((enabled != detectableAutoRepeat()) && proxy) { proxy->setDetectableAutoRepeat(enabled); MInputContextConnection::setDetectableAutoRepeat(enabled); } } void DBusInputContextConnection::invokeAction(const QString &action, const QKeySequence &sequence) { if (activeConnection) { QDBusMessage message = QDBusMessage::createSignal(DBusPath, DBusInterface, "invokeAction"); QList arguments; arguments << action << sequence.toString(); message.setArguments(arguments); QDBusConnection(mConnections.value(activeConnection)).send(message); } } void DBusInputContextConnection::setSelection(int start, int length) { ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(activeConnection); if (proxy) { proxy->setSelection(start, length); } } QString DBusInputContextConnection::selection(bool &valid) { ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(activeConnection); if (proxy) { QString selectionText; if (proxy->selection(selectionText)) { valid = true; return selectionText; } } valid = false; return QString(); } void DBusInputContextConnection::setLanguage(const QString &language) { lastLanguage = language; ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(activeConnection); if (proxy) { proxy->setLanguage(language); } } void DBusInputContextConnection::sendActivationLostEvent() { ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(activeConnection); if (proxy) { proxy->activationLostEvent(); } } void DBusInputContextConnection::updateInputMethodArea(const QRegion ®ion) { ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(activeConnection); if (proxy) { QRect rect = region.boundingRect(); proxy->updateInputMethodArea(rect.x(), rect.y(), rect.width(), rect.height()); } } void DBusInputContextConnection::notifyExtendedAttributeChanged(int id, const QString &target, const QString &targetItem, const QString &attribute, const QVariant &value) { ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(activeConnection); if (proxy) { proxy->notifyExtendedAttributeChanged(id, target, targetItem, attribute, QDBusVariant(value)); } } void DBusInputContextConnection::notifyExtendedAttributeChanged(const QList &clientIds, int id, const QString &target, const QString &targetItem, const QString &attribute, const QVariant &value) { Q_FOREACH (int clientId, clientIds) { ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(clientId); if (proxy) { proxy->notifyExtendedAttributeChanged(id, target, targetItem, attribute, QDBusVariant(value)); } } } void DBusInputContextConnection::pluginSettingsLoaded(int clientId, const QList &info) { ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(clientId); if (proxy) { proxy->pluginSettingsLoaded(info); } } unsigned int DBusInputContextConnection::connectionNumber() { return mConnectionNumbers.value(connection().name()); } void DBusInputContextConnection::activateContext() { MInputContextConnection::activateContext(connectionNumber()); } void DBusInputContextConnection::showInputMethod() { MInputContextConnection::showInputMethod(connectionNumber()); } void DBusInputContextConnection::hideInputMethod() { MInputContextConnection::hideInputMethod(connectionNumber()); } void DBusInputContextConnection::mouseClickedOnPreedit(int posX, int posY, int preeditRectX, int preeditRectY, int preeditRectWidth, int preeditRectHeight) { MInputContextConnection::mouseClickedOnPreedit(connectionNumber(), QPoint(posX, posY), QRect(preeditRectX, preeditRectY, preeditRectWidth, preeditRectHeight)); } void DBusInputContextConnection::setPreedit(const QString &text, int cursorPos) { MInputContextConnection::setPreedit(connectionNumber(), text, cursorPos); } void DBusInputContextConnection::updateWidgetInformation(const QVariantMap &stateInformation, bool focusChanged) { MInputContextConnection::updateWidgetInformation(connectionNumber(), stateInformation, focusChanged); } void DBusInputContextConnection::reset() { MInputContextConnection::reset(connectionNumber()); } void DBusInputContextConnection::appOrientationAboutToChange(int angle) { MInputContextConnection::receivedAppOrientationAboutToChange(connectionNumber(), angle); } void DBusInputContextConnection::appOrientationChanged(int angle) { MInputContextConnection::receivedAppOrientationChanged(connectionNumber(), angle); } void DBusInputContextConnection::setCopyPasteState(bool copyAvailable, bool pasteAvailable) { MInputContextConnection::setCopyPasteState(connectionNumber(), copyAvailable, pasteAvailable); } void DBusInputContextConnection::processKeyEvent(int keyType, int keyCode, int modifiers, const QString &text, bool autoRepeat, int count, uint nativeScanCode, uint nativeModifiers, uint time) { MInputContextConnection::processKeyEvent(connectionNumber(), static_cast(keyType), static_cast(keyCode), static_cast(modifiers), text, autoRepeat, count, nativeScanCode, nativeModifiers, time); } void DBusInputContextConnection::registerAttributeExtension(int id, const QString &fileName) { MInputContextConnection::registerAttributeExtension(connectionNumber(), id, fileName); } void DBusInputContextConnection::unregisterAttributeExtension(int id) { MInputContextConnection::unregisterAttributeExtension(connectionNumber(), id); } void DBusInputContextConnection::setExtendedAttribute(int id, const QString &target, const QString &targetItem, const QString &attribute, const QDBusVariant &value) { MInputContextConnection::setExtendedAttribute(connectionNumber(), id, target, targetItem, attribute, value.variant()); } void DBusInputContextConnection::loadPluginSettings(const QString &descriptionLanguage) { MInputContextConnection::loadPluginSettings(connectionNumber(), descriptionLanguage); } framework-2.3.0/connection/dbusinputcontextconnection.h000066400000000000000000000110211426132540300235160ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef DBUSINPUTCONTEXTCONNECTION_H #define DBUSINPUTCONTEXTCONNECTION_H #include "minputcontextconnection.h" #include "serverdbusaddress.h" #include #include #include class ComMeegoInputmethodInputcontext1Interface; class DBusInputContextConnection : public MInputContextConnection, protected QDBusContext { Q_OBJECT public: explicit DBusInputContextConnection(const QSharedPointer &address); ~DBusInputContextConnection(); //! \reimp virtual void sendPreeditString(const QString &string, const QList &preeditFormats, int replacementStart = 0, int replacementLength = 0, int cursorPos = -1); virtual void sendCommitString(const QString &string, int replaceStart = 0, int replaceLength = 0, int cursorPos = -1); virtual void sendKeyEvent(const QKeyEvent &keyEvent, Maliit::EventRequestType requestType); virtual void notifyImInitiatedHiding(); virtual void setGlobalCorrectionEnabled(bool); virtual QRect preeditRectangle(bool &valid); virtual void setRedirectKeys(bool enabled); virtual void setDetectableAutoRepeat(bool enabled); virtual void invokeAction(const QString &action, const QKeySequence &sequence); virtual void setSelection(int start, int length); virtual QString selection(bool &valid); virtual void setLanguage(const QString &language); virtual void sendActivationLostEvent(); virtual void updateInputMethodArea(const QRegion ®ion); virtual void notifyExtendedAttributeChanged(int id, const QString &target, const QString &targetItem, const QString &attribute, const QVariant &value); virtual void notifyExtendedAttributeChanged(const QList &clientIds, int id, const QString &target, const QString &targetItem, const QString &attribute, const QVariant &value); virtual void pluginSettingsLoaded(int clientId, const QList &info); //! \reimp_end void activateContext(); void showInputMethod(); void hideInputMethod(); void mouseClickedOnPreedit(int posX, int posY, int preeditRectX, int preeditRectY, int preeditRectWidth, int preeditRectHeight); void setPreedit(const QString &text, int cursorPos); void updateWidgetInformation(const QVariantMap &stateInformation, bool focusChanged); void reset(); void appOrientationAboutToChange(int angle); void appOrientationChanged(int angle); void setCopyPasteState(bool copyAvailable, bool pasteAvailable); void processKeyEvent(int keyType, int keyCode, int modifiers, const QString &text, bool autoRepeat, int count, uint nativeScanCode, uint nativeModifiers, uint time); void registerAttributeExtension(int id, const QString &fileName); void unregisterAttributeExtension(int id); void setExtendedAttribute(int id, const QString &target, const QString &targetItem, const QString &attribute, const QDBusVariant &value); void loadPluginSettings(const QString &descriptionLanguage); private Q_SLOTS: void newConnection(const QDBusConnection &connection); void onDisconnection(); private: unsigned int connectionNumber(); const QSharedPointer mAddress; QScopedPointer mServer; QHash mConnectionNumbers; QHash mProxys; QHash mConnections; QString lastLanguage; }; #endif // DBUSINPUTCONTEXTCONNECTION_H framework-2.3.0/connection/dbusserverconnection.cpp000066400000000000000000000211711426132540300226220ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #include "dbusserverconnection.h" #include #include #include "minputmethodcontext1interfaceadaptor.h" #include "minputmethodserver1interface_interface.h" #include "dbuscustomarguments.h" #include #include namespace { const char * const IMServerPath("/com/meego/inputmethod/uiserver1"); const char * const IMServerConnection("Maliit::IMServerConnection"); const char * const InputContextAdaptorPath("/com/meego/inputmethod/inputcontext"); const char * const DBusLocalPath("/org/freedesktop/DBus/Local"); const char * const DBusLocalInterface("org.freedesktop.DBus.Local"); const char * const DisconnectedSignal("Disconnected"); const int ConnectionRetryInterval(6*1000); // in ms } DBusServerConnection::DBusServerConnection(const QSharedPointer &address) : MImServerConnection(0) , mAddress(address) , mProxy(0) , mActive(true) , pendingResetCalls() { qDBusRegisterMetaType(); qDBusRegisterMetaType(); qDBusRegisterMetaType >(); qDBusRegisterMetaType(); qDBusRegisterMetaType >(); new Inputcontext1Adaptor(this); connect(mAddress.data(), SIGNAL(addressReceived(QString)), this, SLOT(openDBusConnection(QString))); connect(mAddress.data(), SIGNAL(addressFetchError(QString)), this, SLOT(connectToDBusFailed(QString))); QTimer::singleShot(0, this, SLOT(connectToDBus())); } DBusServerConnection::~DBusServerConnection() { mActive = false; Q_FOREACH (QDBusPendingCallWatcher *watcher, pendingResetCalls) { disconnect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(resetCallFinished(QDBusPendingCallWatcher*))); } } void DBusServerConnection::connectToDBus() { mAddress->get(); } void DBusServerConnection::openDBusConnection(const QString &addressString) { if (addressString.isEmpty()) { QTimer::singleShot(ConnectionRetryInterval, this, SLOT(connectToDBus())); return; } QDBusConnection connection = QDBusConnection::connectToPeer(addressString, QString::fromLatin1(IMServerConnection)); if (!connection.isConnected()) { QTimer::singleShot(ConnectionRetryInterval, this, SLOT(connectToDBus())); return; } mProxy = new ComMeegoInputmethodUiserver1Interface(QString(), QString::fromLatin1(IMServerPath), connection, this); connection.connect(QString(), QString::fromLatin1(DBusLocalPath), QString::fromLatin1(DBusLocalInterface), QString::fromLatin1(DisconnectedSignal), this, SLOT(onDisconnection())); connection.registerObject(QString::fromLatin1(InputContextAdaptorPath), this); #if 0 connect(mProxy, SIGNAL(invokeAction(QString,QKeySequence)), this, SIGNAL(invokeAction(QString,QKeySequence))); #endif Q_EMIT connected(); } void DBusServerConnection::connectToDBusFailed(const QString &) { QTimer::singleShot(ConnectionRetryInterval, this, SLOT(connectToDBus())); } void DBusServerConnection::onDisconnection() { delete mProxy; mProxy = 0; QDBusConnection::disconnectFromPeer(QString::fromLatin1(IMServerConnection)); Q_EMIT disconnected(); if (mActive) QTimer::singleShot(ConnectionRetryInterval, this, SLOT(connectToDBus())); } void DBusServerConnection::resetCallFinished(QDBusPendingCallWatcher *watcher) { pendingResetCalls.remove(watcher); watcher->deleteLater(); } bool DBusServerConnection::pendingResets() { return !pendingResetCalls.empty(); } void DBusServerConnection::activateContext() { if (!mProxy) return; mProxy->activateContext(); } void DBusServerConnection::showInputMethod() { if (!mProxy) return; mProxy->showInputMethod(); } void DBusServerConnection::hideInputMethod() { if (!mProxy) return; mProxy->hideInputMethod(); } void DBusServerConnection::mouseClickedOnPreedit(const QPoint &pos, const QRect &preeditRect) { if (!mProxy) return; mProxy->mouseClickedOnPreedit(pos.x(), pos.y(), preeditRect.x(), preeditRect.y(), preeditRect.width(), preeditRect.height()); } void DBusServerConnection::setPreedit(const QString &text, int cursorPos) { if (!mProxy) return; mProxy->setPreedit(text, cursorPos); } void DBusServerConnection::updateWidgetInformation(const QMap &stateInformation, bool focusChanged) { if (!mProxy) return; mProxy->updateWidgetInformation(stateInformation, focusChanged); } void DBusServerConnection::reset(bool requireSynchronization) { if (!mProxy) return; QDBusPendingCall resetCall = mProxy->reset(); if (requireSynchronization) { QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(resetCall, this); pendingResetCalls.insert(watcher); QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(resetCallFinished(QDBusPendingCallWatcher*))); } } void DBusServerConnection::appOrientationAboutToChange(int angle) { if (!mProxy) return; mProxy->appOrientationAboutToChange(angle); } void DBusServerConnection::appOrientationChanged(int angle) { if (!mProxy) return; mProxy->appOrientationChanged(angle); } void DBusServerConnection::setCopyPasteState(bool copyAvailable, bool pasteAvailable) { if (!mProxy) return; mProxy->setCopyPasteState(copyAvailable, pasteAvailable); } void DBusServerConnection::processKeyEvent(QEvent::Type keyType, Qt::Key keyCode, Qt::KeyboardModifiers modifiers, const QString &text, bool autoRepeat, int count, quint32 nativeScanCode, quint32 nativeModifiers, unsigned long time) { if (!mProxy) return; mProxy->processKeyEvent(keyType, keyCode, modifiers, text, autoRepeat, count, nativeScanCode, nativeModifiers, time); } void DBusServerConnection::registerAttributeExtension(int id, const QString &fileName) { if (!mProxy) return; mProxy->registerAttributeExtension(id, fileName); } void DBusServerConnection::unregisterAttributeExtension(int id) { if (!mProxy) return; mProxy->unregisterAttributeExtension(id); } void DBusServerConnection::setExtendedAttribute(int id, const QString &target, const QString &targetItem, const QString &attribute, const QVariant &value) { if (!mProxy) return; mProxy->setExtendedAttribute(id, target, targetItem, attribute, QDBusVariant(value)); } void DBusServerConnection::loadPluginSettings(const QString &descriptionLanguage) { if (!mProxy) return; mProxy->loadPluginSettings(descriptionLanguage); } void DBusServerConnection::pluginSettingsLoaded(const QList &info) { pluginSettingsReceived(info); } void DBusServerConnection::keyEvent(int type, int key, int modifiers, const QString &text, bool autoRepeat, int count, uchar requestType) { keyEvent(type, key, modifiers, text, autoRepeat, count, static_cast(requestType)); } void DBusServerConnection::notifyExtendedAttributeChanged(int id, const QString &target, const QString &targetItem, const QString &attribute, const QDBusVariant &value) { extendedAttributeChanged(id, target, targetItem, attribute, value.variant()); } bool DBusServerConnection::preeditRectangle(int &x, int &y, int &width, int &height) const { bool valid; QRect result; getPreeditRectangle(result, valid); x = result.x(); y = result.y(); width = result.width(); height = result.height(); return valid; } bool DBusServerConnection::selection(QString &selection) const { bool valid; getSelection(selection, valid); return valid; } void DBusServerConnection::updateInputMethodArea(int x, int y, int width, int height) { updateInputMethodArea(QRect(x, y, width, height)); } framework-2.3.0/connection/dbusserverconnection.h000066400000000000000000000071111426132540300222650ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef DBUSSERVERCONNECTION_H #define DBUSSERVERCONNECTION_H #include "mimserverconnection.h" #include "inputcontextdbusaddress.h" #include #include class ComMeegoInputmethodUiserver1Interface; class DBusServerConnection : public MImServerConnection { Q_OBJECT public: explicit DBusServerConnection(const QSharedPointer &address); ~DBusServerConnection(); //! reimpl virtual bool pendingResets(); virtual void activateContext(); virtual void showInputMethod(); virtual void hideInputMethod(); virtual void mouseClickedOnPreedit(const QPoint &pos, const QRect &preeditRect); virtual void setPreedit(const QString &text, int cursorPos); virtual void updateWidgetInformation(const QMap &stateInformation, bool focusChanged); virtual void reset(bool requireSynchronization); virtual void appOrientationAboutToChange(int angle); virtual void appOrientationChanged(int angle); virtual void setCopyPasteState(bool copyAvailable, bool pasteAvailable); virtual void processKeyEvent(QEvent::Type keyType, Qt::Key keyCode, Qt::KeyboardModifiers modifiers, const QString &text, bool autoRepeat, int count, quint32 nativeScanCode, quint32 nativeModifiers, unsigned long time); virtual void registerAttributeExtension(int id, const QString &fileName); virtual void unregisterAttributeExtension(int id); virtual void setExtendedAttribute(int id, const QString &target, const QString &targetItem, const QString &attribute, const QVariant &value); virtual void loadPluginSettings(const QString &descriptionLanguage); //! reimpl end //! forwarding methods for InputContextAdaptor using MImServerConnection::keyEvent; void keyEvent(int type, int key, int modifiers, const QString &text, bool autoRepeat, int count, uchar requestType); void notifyExtendedAttributeChanged(int id, const QString &target, const QString &targetItem, const QString &attribute, const QDBusVariant &value); void pluginSettingsLoaded(const QList &info); bool preeditRectangle(int &x, int &y, int &width, int &height) const; bool selection(QString &selection) const; using MImServerConnection::updateInputMethodArea; void updateInputMethodArea(int x, int y, int width, int height); private Q_SLOTS: void connectToDBus(); void openDBusConnection(const QString &addressString); void connectToDBusFailed(const QString &errorMessage); void onDisconnection(); void resetCallFinished(QDBusPendingCallWatcher*); private: QSharedPointer mAddress; ComMeegoInputmethodUiserver1Interface *mProxy; bool mActive; QSet pendingResetCalls; }; #endif // DBUSSERVERCONNECTION_H framework-2.3.0/connection/inputcontextdbusaddress.cpp000066400000000000000000000043671426132540300233560ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #include "inputcontextdbusaddress.h" #include #include #include #include namespace { const char * const MaliitServerName = "org.maliit.server"; const char * const MaliitServerObjectPath = "/org/maliit/server/address"; const char * const MaliitServerInterface = "org.maliit.Server.Address"; const char * const MaliitServerAddressProperty = "address"; const char * const DBusPropertiesInterface = "org.freedesktop.DBus.Properties"; const char * const DBusPropertiesGetMethod = "Get"; } namespace Maliit { namespace InputContext { namespace DBus { Address::Address() { } Address::~Address() { } void DynamicAddress::get() { QList arguments; arguments.push_back(QVariant(QString::fromLatin1(MaliitServerInterface))); arguments.push_back(QVariant(QString::fromLatin1(MaliitServerAddressProperty))); QDBusMessage message = QDBusMessage::createMethodCall(MaliitServerName, MaliitServerObjectPath, DBusPropertiesInterface, DBusPropertiesGetMethod); message.setArguments(arguments); QDBusConnection::sessionBus().callWithCallback(message, this, SLOT(successCallback(QDBusVariant)), SLOT(errorCallback(QDBusError))); } void DynamicAddress::successCallback(const QDBusVariant &address) { Q_EMIT addressReceived(address.variant().toString()); } void DynamicAddress::errorCallback(const QDBusError &error) { Q_EMIT addressFetchError(error.message()); } FixedAddress::FixedAddress(const QString &address) : mAddress(address) { } void FixedAddress::get() { Q_EMIT this->addressReceived(mAddress); } } // namespace DBus } // namespace InputContext } // namespace Maliit framework-2.3.0/connection/inputcontextdbusaddress.h000066400000000000000000000026451426132540300230200ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef MALIIT_INPUTCONTEXT_DBUS_INPUTCONTEXTDBUSADDRESS_H #define MALIIT_INPUTCONTEXT_DBUS_INPUTCONTEXTDBUSADDRESS_H #include QT_BEGIN_NAMESPACE class QDBusVariant; class QDBusError; QT_END_NAMESPACE namespace Maliit { namespace InputContext { namespace DBus { class Address : public QObject { Q_OBJECT public: Address(); virtual ~Address(); virtual void get() = 0; Q_SIGNALS: void addressReceived(const QString &address); void addressFetchError(const QString &errorMessage); }; class DynamicAddress : public Address { Q_OBJECT public: void get(); private Q_SLOTS: void successCallback(const QDBusVariant &address); void errorCallback(const QDBusError &error); }; class FixedAddress : public Address { Q_OBJECT public: FixedAddress(const QString &address); void get(); private: QString mAddress; }; } // namespace DBus } // namespace InputContext } // namespace Maliit #endif // MALIIT_INPUTCONTEXT_DBUS_INPUTCONTEXTDBUSADDRESS_H framework-2.3.0/connection/mimserverconnection.cpp000066400000000000000000000056561426132540300224610ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #include "mimserverconnection.h" /* Dummy class that does nothing. */ MImServerConnection::MImServerConnection(QObject *parent) : QObject(parent) , d(0) { Q_UNUSED(parent); } void MImServerConnection::activateContext() {} void MImServerConnection::showInputMethod() {} void MImServerConnection::hideInputMethod() {} void MImServerConnection::mouseClickedOnPreedit(const QPoint &pos, const QRect &preeditRect) { Q_UNUSED(pos); Q_UNUSED(preeditRect); } void MImServerConnection::setPreedit(const QString &text, int cursorPos) { Q_UNUSED(text); Q_UNUSED(cursorPos); } void MImServerConnection::updateWidgetInformation(const QMap &stateInformation, bool focusChanged) { Q_UNUSED(stateInformation); Q_UNUSED(focusChanged); } void MImServerConnection::reset(bool requireSynchronization) { Q_UNUSED(requireSynchronization); } bool MImServerConnection::pendingResets() { return false; } void MImServerConnection::appOrientationAboutToChange(int angle) { Q_UNUSED(angle); } void MImServerConnection::appOrientationChanged(int angle) { Q_UNUSED(angle); } void MImServerConnection::setCopyPasteState(bool copyAvailable, bool pasteAvailable) { Q_UNUSED(copyAvailable); Q_UNUSED(pasteAvailable); } void MImServerConnection::processKeyEvent(QEvent::Type keyType, Qt::Key keyCode, Qt::KeyboardModifiers modifiers, const QString &text, bool autoRepeat, int count, quint32 nativeScanCode, quint32 nativeModifiers, unsigned long time) { Q_UNUSED(keyType); Q_UNUSED(keyCode); Q_UNUSED(modifiers); Q_UNUSED(text); Q_UNUSED(autoRepeat); Q_UNUSED(count); Q_UNUSED(nativeScanCode); Q_UNUSED(nativeModifiers); Q_UNUSED(time); } void MImServerConnection::registerAttributeExtension(int id, const QString &fileName) { Q_UNUSED(id); Q_UNUSED(fileName); } void MImServerConnection::unregisterAttributeExtension(int id) { Q_UNUSED(id); } void MImServerConnection::setExtendedAttribute(int id, const QString &target, const QString &targetItem, const QString &attribute, const QVariant &value) { Q_UNUSED(id); Q_UNUSED(target); Q_UNUSED(targetItem); Q_UNUSED(attribute); Q_UNUSED(value); } void MImServerConnection::loadPluginSettings(const QString &descriptionLanguage) { Q_UNUSED(descriptionLanguage); } framework-2.3.0/connection/mimserverconnection.h000066400000000000000000000205631426132540300221200ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef MIMSERVERCONNECTION_H #define MIMSERVERCONNECTION_H #include #include class MImServerConnectionPrivate; class MImPluginSettingsInfo; class MImServerConnection : public QObject { Q_OBJECT public: //! \brief Constructor explicit MImServerConnection(QObject *parent = 0); virtual bool pendingResets(); /* Outgoing communication */ virtual void activateContext(); virtual void showInputMethod(); virtual void hideInputMethod(); virtual void mouseClickedOnPreedit(const QPoint &pos, const QRect &preeditRect); virtual void setPreedit(const QString &text, int cursorPos); virtual void updateWidgetInformation(const QMap &stateInformation, bool focusChanged); virtual void reset(bool requireSynchronization); virtual void appOrientationAboutToChange(int angle); virtual void appOrientationChanged(int angle); virtual void setCopyPasteState(bool copyAvailable, bool pasteAvailable); virtual void processKeyEvent(QEvent::Type keyType, Qt::Key keyCode, Qt::KeyboardModifiers modifiers, const QString &text, bool autoRepeat, int count, quint32 nativeScanCode, quint32 nativeModifiers, unsigned long time); virtual void registerAttributeExtension(int id, const QString &fileName); virtual void unregisterAttributeExtension(int id); virtual void setExtendedAttribute(int id, const QString &target, const QString &targetItem, const QString &attribute, const QVariant &value); virtual void loadPluginSettings(const QString &descriptionLanguage); public: /*! \brief Notifies about connection to server being established. * * Note: Creating connection to server and thus emission of this signal * have to be deferred to the mainloop. */ Q_SIGNAL void connected(); Q_SIGNAL void disconnected(); /* Incoming communication */ Q_SIGNAL void activationLostEvent(); //! \brief Notifies about hiding initiated by the input method server side Q_SIGNAL void imInitiatedHide(); /*! * \brief Commits a string to current focus widget, and set cursor position. * \param string The new string committed * \param replacementStart The position at which characters are to be replaced relative * from the start of the preedit string. * \param replacementLength The number of characters to be replaced in the preedit string. * \param cursorPos The cursor position to be set. the cursorPos is the position relative * to commit string start. Negative values are used as commit string end position * * Note: If \a replacementLength is 0, \a replacementStart gives the insertion position * for the inserted \a string. * For example, if the replacement starting at -1 with a length of 2, then application will * remove the last character before the preedit string and the first character afterwards, * and insert the commit string directly before the preedit string. */ Q_SIGNAL void commitString(const QString &string, int replacementStart = 0, int replacementLength = 0, int cursorPos = -1); /*! * \brief Updates preedit string of the current focus widget * \param string The new string * \param preeditFormats The formats for each part of preedit. * \param replacementStart The position at which characters are to be replaced relative * from the start of the preedit string. * \param replacementLength The number of characters to be replaced in the preedit string. * \param cursorPos Cursor position. If it is less than 0, then the cursor will be hidden. * */ Q_SIGNAL void updatePreedit(const QString &string, const QList &preeditFormats, int replacementStart = 0, int replacementLength = 0, int cursorPos = -1); //! \brief Sends a non-printable key event. Parameters as in QKeyEvent constructor Q_SIGNAL void keyEvent(int type, int key, int modifiers, const QString &text, bool autoRepeat, int count, Maliit::EventRequestType requestType = Maliit::EventRequestBoth); //! // \brief Updates the input method window area // \param rect Bounding rectangle of the input method area Q_SIGNAL void updateInputMethodArea(const QRect &rect); /*! * \brief set global correction option enable/disable */ Q_SIGNAL void setGlobalCorrectionEnabled(bool); /*! \brief Get rectangle covering preedit * \param valid validity for the return value * \param rectangle the preedit rectangle. * * Warning: If multiple slots are connected to this signal, the last slot to be * called will be able to overwrite value set by previously called slots. */ Q_SIGNAL void getPreeditRectangle(QRect &rectangle, bool &valid) const; /*! * \brief Sends command action to text editor. * This method tries to call action slot in the focused widget * and sends QKeyEvent corresponding to sequence if slot can not be called. */ Q_SIGNAL void invokeAction(const QString &action, const QKeySequence &sequence); /*! * \brief Set if the input method wants to process all raw key events * from hardware keyboard (via \a processKeyEvent calls). */ Q_SIGNAL void setRedirectKeys(bool enabled); /*! * \brief Set detectable autorepeat for X on/off * * Detectable autorepeat means that instead of press, release, press, release, press, * release... sequence of key events you get press, press, press, release key events * when a key is repeated. The setting is X client specific. This is intended to be * used when key event redirection is enabled with \a setRedirectKeys. */ Q_SIGNAL void setDetectableAutoRepeat(bool enabled); /*! * \brief Sets selection which start from \start with \a length in the focus widget. * * \param start the start index * \param length the length of selection * Note: The cursor will be moved after the commit string has been committed, and the * preedit string will be located at the new edit position. */ Q_SIGNAL void setSelection(int start, int length); /*! * \brief get selecting text * \param valid validity for the return value * \param selection the current selection * * Warning: If multiple slots are connected to this signal, the last slot to be * called will be able to overwrite value set by previously called slots. */ Q_SIGNAL void getSelection(QString &selection, bool &valid) const; /*! * \brief Updates current language of active input method in input context. * \param language ICU format locale ID string * \sa QInputContext::language() */ Q_SIGNAL void setLanguage(const QString &language); /*! *\brief Informs application that input method server has changed the \a attribute of the \a targetItem * in the attribute extension \a target which has unique \a id to \a value. */ Q_SIGNAL void extendedAttributeChanged(int id, const QString &target, const QString &targetItem, const QString &attribute, const QVariant &value); /*! * \brief Updates the list of server settings known to the application. * \param info list of server and plugin settings * * Sent in response to \a loadPluginSettings(). Might be sent spontaneously by * the server in response to external events (plugin loaded/unloaded, ...). */ Q_SIGNAL void pluginSettingsReceived(const QList &info); private: Q_DISABLE_COPY(MImServerConnection) MImServerConnectionPrivate *d; }; #endif framework-2.3.0/connection/minputcontextconnection.cpp000066400000000000000000000424651426132540300233700ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #include "minputcontextconnection.h" #include namespace { // attribute names for updateWidgetInformation() map const char * const FocusStateAttribute = "focusState"; const char * const ContentTypeAttribute = "contentType"; const char * const CorrectionAttribute = "correctionEnabled"; const char * const PredictionAttribute = "predictionEnabled"; const char * const AutoCapitalizationAttribute = "autocapitalizationEnabled"; const char * const SurroundingTextAttribute = "surroundingText"; const char * const AnchorPositionAttribute = "anchorPosition"; const char * const CursorPositionAttribute = "cursorPosition"; const char * const HasSelectionAttribute = "hasSelection"; const char * const InputMethodModeAttribute = "inputMethodMode"; const char * const WinId = "winId"; const char * const CursorRectAttribute = "cursorRectangle"; const char * const HiddenTextAttribute = "hiddenText"; const char * const PreeditClickPosAttribute = "preeditClickPos"; } class MInputContextConnectionPrivate { public: MInputContextConnectionPrivate(); ~MInputContextConnectionPrivate(); }; MInputContextConnectionPrivate::MInputContextConnectionPrivate() { // nothing } MInputContextConnectionPrivate::~MInputContextConnectionPrivate() { // nothing } //////////////////////// // actual class MInputContextConnection::MInputContextConnection(QObject *parent) : activeConnection(0) , d(new MInputContextConnectionPrivate) , lastOrientation(0) , mGlobalCorrectionEnabled(false) , mRedirectionEnabled(false) , mDetectableAutoRepeat(false) { Q_UNUSED(parent); } MInputContextConnection::~MInputContextConnection() { delete d; } /* Accessors to widgetState */ bool MInputContextConnection::focusState(bool &valid) { QVariant focusStateVariant = mWidgetState[FocusStateAttribute]; valid = focusStateVariant.isValid(); return focusStateVariant.toBool(); } int MInputContextConnection::contentType(bool &valid) { QVariant contentTypeVariant = mWidgetState[ContentTypeAttribute]; return contentTypeVariant.toInt(&valid); } bool MInputContextConnection::correctionEnabled(bool &valid) { QVariant correctionVariant = mWidgetState[CorrectionAttribute]; valid = correctionVariant.isValid(); return correctionVariant.toBool(); } bool MInputContextConnection::predictionEnabled(bool &valid) { QVariant predictionVariant = mWidgetState[PredictionAttribute]; valid = predictionVariant.isValid(); return predictionVariant.toBool(); } bool MInputContextConnection::autoCapitalizationEnabled(bool &valid) { QVariant capitalizationVariant = mWidgetState[AutoCapitalizationAttribute]; valid = capitalizationVariant.isValid(); return capitalizationVariant.toBool(); } QRect MInputContextConnection::cursorRectangle(bool &valid) { QVariant cursorRectVariant = mWidgetState[CursorRectAttribute]; valid = cursorRectVariant.isValid(); return cursorRectVariant.toRect(); } bool MInputContextConnection::hiddenText(bool &valid) { QVariant hiddenTextVariant = mWidgetState[HiddenTextAttribute]; valid = hiddenTextVariant.isValid(); return hiddenTextVariant.toBool(); } bool MInputContextConnection::surroundingText(QString &text, int &cursorPosition) { QVariant textVariant = mWidgetState[SurroundingTextAttribute]; QVariant posVariant = mWidgetState[CursorPositionAttribute]; if (textVariant.isValid() && posVariant.isValid()) { text = textVariant.toString(); cursorPosition = posVariant.toInt(); return true; } return false; } bool MInputContextConnection::hasSelection(bool &valid) { QVariant selectionVariant = mWidgetState[HasSelectionAttribute]; valid = selectionVariant.isValid(); return selectionVariant.toBool(); } int MInputContextConnection::inputMethodMode(bool &valid) { QVariant modeVariant = mWidgetState[InputMethodModeAttribute]; return modeVariant.toInt(&valid); } QRect MInputContextConnection::preeditRectangle(bool &valid) { valid = false; return QRect(); } WId MInputContextConnection::winId() { #ifdef Q_WS_WIN WId result = 0; return result; #else QVariant winIdVariant = mWidgetState[WinId]; // after transfer by dbus type can change switch (winIdVariant.type()) { case QVariant::UInt: if (sizeof(uint) >= sizeof(WId)) return winIdVariant.toUInt(); break; case QVariant::ULongLong: if (sizeof(qulonglong) >= sizeof(WId)) return winIdVariant.toULongLong(); break; default: if (winIdVariant.canConvert()) return winIdVariant.value(); } return 0; #endif } int MInputContextConnection::anchorPosition(bool &valid) { QVariant posVariant = mWidgetState[AnchorPositionAttribute]; valid = posVariant.isValid(); return posVariant.toInt(); } int MInputContextConnection::preeditClickPos(bool &valid) const { QVariant selectionVariant = mWidgetState[PreeditClickPosAttribute]; valid = selectionVariant.isValid(); return selectionVariant.toInt(); } /* End accessors to widget state */ /* Handlers for inbound communication */ void MInputContextConnection::showInputMethod(unsigned int connectionId) { if (activeConnection != connectionId) return; Q_EMIT showInputMethodRequest(); } void MInputContextConnection::hideInputMethod(unsigned int connectionId) { // Only allow this call for current active connection. if (activeConnection != connectionId) return; Q_EMIT hideInputMethodRequest(); } void MInputContextConnection::mouseClickedOnPreedit(unsigned int connectionId, const QPoint &pos, const QRect &preeditRect) { if (activeConnection != connectionId) return; Q_EMIT mouseClickedOnPreedit(pos, preeditRect); } void MInputContextConnection::setPreedit(unsigned int connectionId, const QString &text, int cursorPos) { if (activeConnection != connectionId) return; preedit = text; Q_EMIT preeditChanged(text, cursorPos); } void MInputContextConnection::reset(unsigned int connectionId) { if (activeConnection != connectionId) return; preedit.clear(); Q_EMIT resetInputMethodRequest(); if (!preedit.isEmpty()) { qWarning("Preedit set from InputMethod::reset()!"); preedit.clear(); } } void MInputContextConnection::updateWidgetInformation( unsigned int connectionId, const QMap &stateInfo, bool handleFocusChange) { if (activeConnection != connectionId) return; QMap oldState = mWidgetState; mWidgetState = stateInfo; #ifndef Q_WS_WIN if (handleFocusChange) { Q_EMIT focusChanged(winId()); } #endif Q_EMIT widgetStateChanged(connectionId, mWidgetState, oldState, handleFocusChange); } void MInputContextConnection::receivedAppOrientationAboutToChange(unsigned int connectionId, int angle) { if (activeConnection != connectionId) return; // Needs to be passed to the MImRotationAnimation listening // to this signal first before the plugins. This ensures // that the rotation animation can be painted sufficiently early. Q_EMIT contentOrientationAboutToChange(angle); Q_EMIT contentOrientationAboutToChangeCompleted(angle); } void MInputContextConnection::receivedAppOrientationChanged(unsigned int connectionId, int angle) { if (activeConnection != connectionId) return; // Handle orientation changes through MImRotationAnimation with priority. // That's needed for getting the correct rotated pixmap buffers. Q_EMIT contentOrientationChanged(angle); Q_EMIT contentOrientationChangeCompleted(angle); } void MInputContextConnection::setCopyPasteState(unsigned int connectionId, bool copyAvailable, bool pasteAvailable) { if (activeConnection != connectionId) return; Q_EMIT copyPasteStateChanged(copyAvailable, pasteAvailable); } void MInputContextConnection::processKeyEvent( unsigned int connectionId, QEvent::Type keyType, Qt::Key keyCode, Qt::KeyboardModifiers modifiers, const QString &text, bool autoRepeat, int count, quint32 nativeScanCode, quint32 nativeModifiers, unsigned long time) { if (activeConnection != connectionId) return; Q_EMIT receivedKeyEvent(keyType, keyCode, modifiers, text, autoRepeat, count, nativeScanCode, nativeModifiers, time); } void MInputContextConnection::registerAttributeExtension(unsigned int connectionId, int id, const QString &attributeExtension) { Q_EMIT attributeExtensionRegistered(connectionId, id, attributeExtension); } void MInputContextConnection::unregisterAttributeExtension(unsigned int connectionId, int id) { Q_EMIT attributeExtensionUnregistered(connectionId, id); } void MInputContextConnection::setExtendedAttribute( unsigned int connectionId, int id, const QString &target, const QString &targetName, const QString &attribute, const QVariant &value) { Q_EMIT extendedAttributeChanged(connectionId, id, target, targetName, attribute, value); } void MInputContextConnection::loadPluginSettings(int connectionId, const QString &descriptionLanguage) { Q_EMIT pluginSettingsRequested(connectionId, descriptionLanguage); } /* End handlers for inbound communication */ bool MInputContextConnection::detectableAutoRepeat() { return mDetectableAutoRepeat; } void MInputContextConnection::setDetectableAutoRepeat(bool enabled) { mDetectableAutoRepeat = enabled; } void MInputContextConnection::setGlobalCorrectionEnabled(bool enabled) { mGlobalCorrectionEnabled = enabled; } bool MInputContextConnection::globalCorrectionEnabled() { return mGlobalCorrectionEnabled; } void MInputContextConnection::setRedirectKeys(bool enabled) { mRedirectionEnabled = enabled; } bool MInputContextConnection::redirectKeysEnabled() { return mRedirectionEnabled; } /* */ void MInputContextConnection::sendCommitString(const QString &string, int replaceStart, int replaceLength, int cursorPos) { const int cursorPosition(mWidgetState[CursorPositionAttribute].toInt()); bool validAnchor(false); preedit.clear(); if (replaceLength == 0 // we don't support replacement // we don't support selections && anchorPosition(validAnchor) == cursorPosition && validAnchor) { const int insertPosition(cursorPosition + replaceStart); if (insertPosition >= 0) { mWidgetState[SurroundingTextAttribute] = mWidgetState[SurroundingTextAttribute].toString().insert(insertPosition, string); mWidgetState[CursorPositionAttribute] = cursorPos < 0 ? (insertPosition + string.length()) : cursorPos; mWidgetState[AnchorPositionAttribute] = mWidgetState[CursorPositionAttribute]; } } } void MInputContextConnection::sendKeyEvent(const QKeyEvent &keyEvent, Maliit::EventRequestType requestType) { if (requestType != Maliit::EventRequestSignalOnly && preedit.isEmpty() && keyEvent.key() == Qt::Key_Backspace && keyEvent.type() == QEvent::KeyPress) { QString surrString(mWidgetState[SurroundingTextAttribute].toString()); const int cursorPosition(mWidgetState[CursorPositionAttribute].toInt()); bool validAnchor(false); if (!surrString.isEmpty() && cursorPosition > 0 // we don't support selections && anchorPosition(validAnchor) == cursorPosition && validAnchor) { mWidgetState[SurroundingTextAttribute] = surrString.remove(cursorPosition - 1, 1); mWidgetState[CursorPositionAttribute] = cursorPosition - 1; mWidgetState[AnchorPositionAttribute] = cursorPosition - 1; } } } /* */ /* */ void MInputContextConnection::handleDisconnection(unsigned int connectionId) { Q_EMIT clientDisconnected(connectionId); if (activeConnection != connectionId) { return; } activeConnection = 0; Q_EMIT activeClientDisconnected(); } void MInputContextConnection::activateContext(unsigned int connectionId) { if (connectionId == activeConnection) { return; } /* Notify current/previously active context that it is no longer active */ sendActivationLostEvent(); activeConnection = connectionId; /* Notify new input context about state/settings stored in the IM server */ if (activeConnection) { /* Hack: Circumvent if(newValue == oldValue) return; guards */ mGlobalCorrectionEnabled = !mGlobalCorrectionEnabled; setGlobalCorrectionEnabled(!mGlobalCorrectionEnabled); mRedirectionEnabled = !mRedirectionEnabled; setRedirectKeys(!mRedirectionEnabled); mDetectableAutoRepeat = !mDetectableAutoRepeat; setDetectableAutoRepeat(!mDetectableAutoRepeat); } Q_EMIT clientActivated(connectionId); } /* */ void MInputContextConnection::sendPreeditString(const QString &string, const QList &preeditFormats, int replaceStart, int replaceLength, int cursorPos) { Q_UNUSED(preeditFormats); Q_UNUSED(replaceStart); Q_UNUSED(replaceLength); Q_UNUSED(cursorPos); if (activeConnection) { preedit = string; } } /* */ void MInputContextConnection::setSelection(int start, int length) { Q_UNUSED(start); Q_UNUSED(length); } void MInputContextConnection::notifyImInitiatedHiding() {} void MInputContextConnection::invokeAction(const QString &action, const QKeySequence &sequence) { Q_UNUSED(action); Q_UNUSED(sequence); } QString MInputContextConnection::selection(bool &valid) { valid = false; return QString(); } void MInputContextConnection::setLanguage(const QString &language) { Q_UNUSED(language); } void MInputContextConnection::sendActivationLostEvent() {} void MInputContextConnection::updateInputMethodArea(const QRegion ®ion) { Q_UNUSED(region); } void MInputContextConnection::notifyExtendedAttributeChanged(int , const QString &, const QString &, const QString &, const QVariant &) { // empty default implementation } void MInputContextConnection::notifyExtendedAttributeChanged(const QList &, int , const QString &, const QString &, const QString &, const QVariant &) { // empty default implementation } void MInputContextConnection::pluginSettingsLoaded(int clientId, const QList &info) { Q_UNUSED(clientId); Q_UNUSED(info); // empty default implementation } QVariantMap MInputContextConnection::widgetState() const { return mWidgetState; } QVariant MInputContextConnection::inputMethodQuery(Qt::InputMethodQuery query, const QVariant &argument) const { switch (query) { case Qt::ImEnabled: return mWidgetState.value(QStringLiteral("focusState")); case Qt::ImCursorRectangle: return mWidgetState.value(QStringLiteral("cursorRectangle")); // case Qt::ImFont: // return QVariant(); case Qt::ImCursorPosition: return mWidgetState.value(QStringLiteral("cursorPosition")); case Qt::ImSurroundingText: return mWidgetState.value(QStringLiteral("surroundingText")); case Qt::ImCurrentSelection: return QVariant(); // TODO implement // case Qt::ImMaximumTextLength: case Qt::ImAnchorPosition: return mWidgetState.value(QStringLiteral("anchorPosition")); case Qt::ImHints: return mWidgetState.value(QStringLiteral("maliit-inputmethod-hints")); // case Qt::ImPreferredLanguage: // case Qt::ImAbsolutePosition: // case Qt::ImTextBeforeCursor: // case Qt::ImTextAfterCursor: case Qt::ImEnterKeyType: return mWidgetState.value(QStringLiteral("enterKeyType")); // case Qt::ImAnchorRectangle: // case Qt::ImInputItemClipRectangle: // return QVariant(); } return QVariant(); } framework-2.3.0/connection/minputcontextconnection.h000066400000000000000000000354161426132540300230330ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef MINPUTCONTEXTCONNECTION_H #define MINPUTCONTEXTCONNECTION_H #include #include #include QT_BEGIN_NAMESPACE class QKeyEvent; QT_END_NAMESPACE class MInputContextConnectionPrivate; class MAbstractInputMethod; class MAttributeExtensionId; class MImPluginSettingsInfo; /*! \internal * \ingroup maliitserver * \brief Base class of the input method communication implementation between * the input context and the input method server. */ class MInputContextConnection: public QObject { Q_OBJECT Q_DISABLE_COPY(MInputContextConnection) public: explicit MInputContextConnection(QObject *parent = 0); virtual ~MInputContextConnection(); /*! * \brief Returns focus state if output parameter \a valid is \c true. * * By focus state it is meant to be focus state of an input widget * on application side. If returned value is valid and is \c true then this * means that input widget is focused. Otherwise, if returned value is * \c false then no input widget is focused. * * \param valid An output parameter stating whether return value is valid. */ virtual bool focusState(bool &valid); /*! * \brief returns content type for focused widget if output parameter valid is true, * value matches enum M::TextContentType */ virtual int contentType(bool &valid); /*! * \brief returns input method correction hint if output parameter valid is true. */ virtual bool correctionEnabled(bool &valid); /*! * \brief returns input methoContextd word prediction hint if output parameter valid is true. */ virtual bool predictionEnabled(bool &valid); /*! * \brief returns input method auto-capitalization hint if output parameter valid is true. */ virtual bool autoCapitalizationEnabled(bool &valid); /*! * \brief get surrounding text and cursor position information */ virtual bool surroundingText(QString &text, int &cursorPosition); /*! * \brief returns true if there is selecting text */ virtual bool hasSelection(bool &valid); /*! * \brief get input method mode */ virtual int inputMethodMode(bool &valid); /*! * \brief get preedit rectangle */ virtual QRect preeditRectangle(bool &valid); /*! * \brief get cursor rectangle */ virtual QRect cursorRectangle(bool &valid); /*! * \brief true if text input is being made hidden, e.g. with password fields */ virtual bool hiddenText(bool &valid); /*! * \brief Updates pre-edit string in the application widget * * Implement this method to update the pre-edit string * \param string The new pre-edit string * \param preeditFormats Selects visual stylings for each part of preedit * \param replacementStart The position at which characters are to be replaced relative * from the start of the preedit string. * \param replacementLength The number of characters to be replaced in the preedit string. * \param cursorPos The cursor position inside preedit */ virtual void sendPreeditString(const QString &string, const QList &preeditFormats, int replacementStart = 0, int replacementLength = 0, int cursorPos = -1); /*! * \brief Updates commit string in the application widget, and set cursor position. * * Implement this method to update the commit string * \param string The string to be committed * \param replaceStart The position at which characters are to be replaced relative * from the start of the preedit string. * \param replaceLength The number of characters to be replaced in the preedit string. * \param cursorPos The cursor position to be set. the cursorPos is the position relative * to commit string start. Negative values are used as commit string end position */ virtual void sendCommitString(const QString &string, int replaceStart = 0, int replaceLength = 0, int cursorPos = -1); /*! * \brief Sends key event to the application * * This method is used to deliver the key event to active widget. * A \a MInputMethodState::keyPress or \a MInputMethodState::keyRelease * event is also emitted. Depending on the value of \a requestType * parameter, a Qt::KeyEvent and/or a signal is emitted. * \param keyEvent The event to send * \param requestType The type of the request: event, signal, or both. */ virtual void sendKeyEvent(const QKeyEvent &keyEvent, Maliit::EventRequestType requestType = Maliit::EventRequestBoth); /*! * \brief notifies about hiding initiated by the input method server side */ virtual void notifyImInitiatedHiding(); /*! * \brief calls actions like "copy" or "paste" on the focused text entry. * * \param action The action to call * \param sequence The fall-back key sequence when action is not available */ virtual void invokeAction(const QString &action, const QKeySequence &sequence); /*! * \brief Set if the input method wants to process all raw key events * from hardware keyboard (via \a processKeyEvent calls). */ virtual void setRedirectKeys(bool enabled); /*! * \brief Set detectable autorepeat for X on/off * * Detectable autorepeat means that instead of press, release, press, release, press, * release... sequence of key events you get press, press, press, release key events * when a key is repeated. The setting is X client specific. This is intended to be * used when key event redirection is enabled with \a setRedirectKeys. */ virtual void setDetectableAutoRepeat(bool enabled); /*! * \brief set global correction option enable/disable */ virtual void setGlobalCorrectionEnabled(bool); /*! *\brief Sets selection text start from \a start with \a length in the application widget. */ virtual void setSelection(int start, int length); /*! * \brief returns the position of the selection anchor. * * This may be less or greater than cursor position, depending on which side of selection * the cursor is. If there is no selection, it returns the same as cursor position. */ virtual int anchorPosition(bool &valid); /*! * \brief returns the current cursor position within the preedit region */ virtual int preeditClickPos(bool &valid) const; /*! * \brief returns the selecting text */ virtual QString selection(bool &valid); /*! * \brief Sets current language of active input method. * \param language ICU format locale ID string */ virtual void setLanguage(const QString &language); virtual void sendActivationLostEvent(); QVariant inputMethodQuery(Qt::InputMethodQuery query, const QVariant &argument) const; public: // Inbound communication handlers //! ipc method provided to application, makes the application the active one void activateContext(unsigned int connectionId); //! ipc method provided to the application, shows input method void showInputMethod(unsigned int clientId); //! ipc method provided to the application, hides input method void hideInputMethod(unsigned int clientId); //! ipc method provided to the application, signals mouse click on preedit void mouseClickedOnPreedit(unsigned int clientId, const QPoint &pos, const QRect &preeditRect); //! ipc method provided to the application, sets preedit void setPreedit(unsigned int clientId, const QString &text, int cursorPos); void updateWidgetInformation(unsigned int clientId, const QMap &stateInformation, bool focusChanged); //! ipc method provided to the application, resets the input method void reset(unsigned int clientId); /*! * \brief Target application is changing orientation */ void receivedAppOrientationAboutToChange(unsigned int clientId, int angle); /*! * \brief Target application changed orientation (already finished) */ void receivedAppOrientationChanged(unsigned int clientId, int angle); /*! \brief Set copy/paste state for appropriate UI elements in the input method server * \param copyAvailable bool TRUE if text is selected * \param pasteAvailable bool TRUE if clipboard content is not empty */ void setCopyPasteState(unsigned int clientId, bool copyAvailable, bool pasteAvailable); /*! * \brief Process a key event redirected from hardware keyboard to input method plugin(s). * * This is called only if one has enabled redirection by calling \a setRedirectKeys. */ void processKeyEvent(unsigned int clientId, QEvent::Type keyType, Qt::Key keyCode, Qt::KeyboardModifiers modifiers, const QString &text, bool autoRepeat, int count, quint32 nativeScanCode, quint32 nativeModifiers, unsigned long time); /*! * \brief Register an input method attribute extension which is defined in \a fileName with the * unique identifier \a id. * * The \a id should be unique, and the \a fileName is the absolute file name of the * attribute extension. */ void registerAttributeExtension(unsigned int clientId, int id, const QString &fileName); /*! * \brief Unregister an input method attribute extension which unique identifier is \a id. */ void unregisterAttributeExtension(unsigned int clientId, int id); /*! * \brief Sets the \a attribute for the \a target in the extended attribute which has unique \a id to \a value. */ void setExtendedAttribute(unsigned int clientId, int id, const QString &target, const QString &targetItem, const QString &attribute, const QVariant &value); /*! * \brief Requests information about plugin/server settings. */ void loadPluginSettings(int connectionId, const QString &descriptionLanguage); public Q_SLOTS: //! Update \a region covered by virtual keyboard virtual void updateInputMethodArea(const QRegion ®ion); /*! * \brief Informs current application that input method servers has changed the \a attribute of the \a targetItem * in the attribute extension \a target which has unique \a id to \a value. */ virtual void notifyExtendedAttributeChanged(int id, const QString &target, const QString &targetItem, const QString &attribute, const QVariant &value); /*! * \brief Informs a list of clients that input method servers has changed the \a attribute of the \a targetItem * in the attribute extension \a target which has unique \a id to \a value. */ virtual void notifyExtendedAttributeChanged(const QList &clientIds, int id, const QString &target, const QString &targetItem, const QString &attribute, const QVariant &value); /*! * \brief Sends the list of plugin/server settings to the specified client. */ virtual void pluginSettingsLoaded(int clientId, const QList &info); Q_SIGNALS: /* Emitted first */ void contentOrientationAboutToChange(int angle); void contentOrientationChanged(int angle); /* Emitted later */ void contentOrientationAboutToChangeCompleted(int angle); void contentOrientationChangeCompleted(int angle); void focusChanged(WId id); //! Emitted when input method request to be shown. void showInputMethodRequest(); //! Emitted when input method request to be hidden. void hideInputMethodRequest(); void resetInputMethodRequest(); void copyPasteStateChanged(bool copyAvailable, bool pasteAvailable); void widgetStateChanged(unsigned int clientId, const QMap &newState, const QMap &oldState, bool focusChanged); void attributeExtensionRegistered(unsigned int connectionId, int id, const QString &attributeExtension); void attributeExtensionUnregistered(unsigned int connectionId, int id); void extendedAttributeChanged(unsigned int connectionId, int id, const QString &target, const QString &targetName,const QString &attribute, const QVariant &value); void pluginSettingsRequested(int connectionId, const QString &descriptionLanguage); void clientActivated(unsigned int connectionId); void clientDisconnected(unsigned int connectionId); void activeClientDisconnected(); void preeditChanged(const QString &text, int cursorPos); void mouseClickedOnPreedit(const QPoint &pos, const QRect &preeditRect); void receivedKeyEvent(QEvent::Type keyType, Qt::Key keyCode, Qt::KeyboardModifiers modifiers, const QString &text, bool autoRepeat, int count, quint32 nativeScanCode, quint32 nativeModifiers, unsigned long time); protected: unsigned int activeConnection; // 0 means no active connection bool detectableAutoRepeat(); bool globalCorrectionEnabled(); bool redirectKeysEnabled(); void handleActivation(unsigned int connectionId); QVariantMap widgetState() const; public: void handleDisconnection(unsigned int connectionId); private: /*! * \brief get the X window id of the active app window. Warning: Undefined on non-X11 platforms */ WId winId(); private: MInputContextConnectionPrivate *d; int lastOrientation; /* FIXME: rename with m prefix, and provide protected accessors for derived classes */ QMap mWidgetState; bool mGlobalCorrectionEnabled; bool mRedirectionEnabled; bool mDetectableAutoRepeat; QString preedit; }; //! \internal_end #endif framework-2.3.0/connection/org.maliit.server.service.in000066400000000000000000000001601426132540300232060ustar00rootroot00000000000000[D-BUS Service] Name=org.maliit.server Exec=@CMAKE_INSTALL_PREFIX@/bin/maliit-server @MALIIT_SERVER_ARGUMENTS@ framework-2.3.0/connection/serverdbusaddress.cpp000066400000000000000000000036041426132540300221110ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #include "serverdbusaddress.h" #include #include #include #include namespace { const char * const MaliitServerName = "org.maliit.server"; const char * const MaliitServerObjectPath = "/org/maliit/server/address"; } namespace Maliit { namespace Server { namespace DBus { AddressPublisher::AddressPublisher(const QString &address) : QObject() , mAddress(address) { QDBusConnection::sessionBus().registerObject(MaliitServerObjectPath, this, QDBusConnection::ExportAllProperties); if (!QDBusConnection::sessionBus().registerService(MaliitServerName)) { qWarning("maliit-server is already running"); std::exit(0); } } AddressPublisher::~AddressPublisher() { QDBusConnection::sessionBus().unregisterObject(MaliitServerObjectPath); } QString AddressPublisher::address() const { return mAddress; } Address::Address() {} Address::~Address() {} DynamicAddress::DynamicAddress() {} QDBusServer* DynamicAddress::connect() { QLatin1String dbusAddress("unix:tmpdir=/tmp/maliit-server"); QDBusServer *server = new QDBusServer(dbusAddress); publisher.reset(new AddressPublisher(server->address())); return server; } QDBusServer* FixedAddress::connect() { QDBusServer *server = new QDBusServer(mAddress); return server; } FixedAddress::FixedAddress(const QString &address) : mAddress(address) {} } // namespace DBus } // namespace Server } // namespace Maliit framework-2.3.0/connection/serverdbusaddress.h000066400000000000000000000031161426132540300215540ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef MALIIT_SERVER_DBUS_SERVERDBUSADDRESS_H #define MALIIT_SERVER_DBUS_SERVERDBUSADDRESS_H #include #include QT_BEGIN_NAMESPACE class QDBusServer; QT_END_NAMESPACE namespace Maliit { namespace Server { namespace DBus { class AddressPublisher : public QObject { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.maliit.Server.Address") Q_PROPERTY(QString address READ address) public: explicit AddressPublisher(const QString &address); ~AddressPublisher(); QString address() const; private: const QString mAddress; }; class Address { public: explicit Address(); virtual ~Address(); virtual QDBusServer* connect() = 0; }; class DynamicAddress : public Address { public: explicit DynamicAddress(); //! reimpl virtual QDBusServer* connect(); private: QScopedPointer publisher; }; class FixedAddress : public Address { public: explicit FixedAddress(const QString &address); //! reimpl virtual QDBusServer* connect(); private: QString mAddress; }; } // namespace DBus } // namespace Server } // namespace Maliit #endif // MALIIT_SERVER_DBUS_SERVERDBUSADDRESS_H framework-2.3.0/connection/waylandinputmethodconnection.cpp000066400000000000000000000472221426132540300243630ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2012 Canonical Ltd * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #include // for errno #include // for strerror #include #include #include #include "wayland-client.h" #include #include #include #include "waylandinputmethodconnection.h" Q_LOGGING_CATEGORY(lcWaylandConnection, "maliit.connection.wayland") namespace { // TODO: Deduplicate it. Those values are used in // minputcontextconnection, mimpluginmanager, // mattributeextensionmanager and in input context implementations. const char * const FocusStateAttribute = "focusState"; const char * const ContentTypeAttribute = "contentType"; const char * const CorrectionAttribute = "correctionEnabled"; const char * const PredictionAttribute = "predictionEnabled"; const char * const AutoCapitalizationAttribute = "autocapitalizationEnabled"; const char * const SurroundingTextAttribute = "surroundingText"; const char * const AnchorPositionAttribute = "anchorPosition"; const char * const CursorPositionAttribute = "cursorPosition"; const char * const HasSelectionAttribute = "hasSelection"; const char * const HiddenTextAttribute = "hiddenText"; typedef QPair Modifier; const Modifier modifiers[] = { Modifier(Qt::ShiftModifier, XKB_MOD_NAME_SHIFT), Modifier(Qt::ControlModifier, XKB_MOD_NAME_CTRL), Modifier(Qt::AltModifier, XKB_MOD_NAME_ALT), Modifier(Qt::MetaModifier, XKB_MOD_NAME_LOGO), Modifier(Qt::KeypadModifier, XKB_LED_NAME_NUM) }; QByteArray modifiersMap() { QByteArray mod_map; for (unsigned int iter(0); iter < (sizeof(modifiers) / sizeof(modifiers[0])); ++iter) { mod_map.append(modifiers[iter].second); mod_map.append('\0'); } return mod_map; } xkb_mod_mask_t modifiersFromQt(const Qt::KeyboardModifiers qt_mods) { xkb_mod_mask_t mod_mask(0); if (qt_mods == Qt::NoModifier) { return mod_mask; } for (unsigned int iter(0); iter < (sizeof(modifiers) / sizeof(modifiers[0])); ++iter) { if ((qt_mods & modifiers[iter].first) == modifiers[iter].first) { mod_mask |= 1 << iter; } } return mod_mask; } xkb_keysym_t keyFromQt(int qt_key) { switch (qt_key) { case Qt::Key_Escape: return XKB_KEY_Escape; case Qt::Key_Tab: return XKB_KEY_Tab; case Qt::Key_Backspace: return XKB_KEY_BackSpace; case Qt::Key_Return: return XKB_KEY_Return; case Qt::Key_Home: return XKB_KEY_Home; case Qt::Key_End: return XKB_KEY_End; case Qt::Key_Left: return XKB_KEY_Left; case Qt::Key_Up: return XKB_KEY_Up; case Qt::Key_Right: return XKB_KEY_Right; case Qt::Key_Down: return XKB_KEY_Down; case Qt::Key_PageUp: return XKB_KEY_Prior; case Qt::Key_PageDown: return XKB_KEY_Next; default: if (qt_key >= Qt::Key_Space && qt_key <= Qt::Key_ydiaeresis) { return qt_key; } return XKB_KEY_NoSymbol; } } QtWayland::zwp_text_input_v2::preedit_style preeditStyleFromMaliit(Maliit::PreeditFace face) { switch (face) { case Maliit::PreeditDefault: return QtWayland::zwp_text_input_v2::preedit_style_default; case Maliit::PreeditNoCandidates: return QtWayland::zwp_text_input_v2::preedit_style_incorrect; case Maliit::PreeditKeyPress: return QtWayland::zwp_text_input_v2::preedit_style_highlight; case Maliit::PreeditUnconvertible: return QtWayland::zwp_text_input_v2::preedit_style_inactive; case Maliit::PreeditActive: return QtWayland::zwp_text_input_v2::preedit_style_active; default: return QtWayland::zwp_text_input_v2::preedit_style_none; } } Maliit::TextContentType contentTypeFromWayland(uint32_t purpose) { switch (purpose) { case QtWayland::zwp_text_input_v2::content_purpose_normal: return Maliit::FreeTextContentType; case QtWayland::zwp_text_input_v2::content_purpose_digits: case QtWayland::zwp_text_input_v2::content_purpose_number: return Maliit::NumberContentType; case QtWayland::zwp_text_input_v2::content_purpose_phone: return Maliit::PhoneNumberContentType; case QtWayland::zwp_text_input_v2::content_purpose_url: return Maliit::UrlContentType; case QtWayland::zwp_text_input_v2::content_purpose_email: return Maliit::EmailContentType; default: return Maliit::CustomContentType; } } bool matchesFlag(int value, int flag) { return ((value & flag) == flag); } const unsigned int wayland_connection_id(1); } // unnamed namespace namespace Maliit { namespace Wayland { class InputMethodContext; class InputMethod : public QtWayland::zwp_input_method_v1 { public: InputMethod(MInputContextConnection *connection, struct wl_registry *registry, int id); ~InputMethod(); InputMethodContext *context() const; protected: void zwp_input_method_v1_activate(struct ::zwp_input_method_context_v1 *id) Q_DECL_OVERRIDE; void zwp_input_method_v1_deactivate(struct ::zwp_input_method_context_v1 *context) Q_DECL_OVERRIDE; private: MInputContextConnection *m_connection; QScopedPointer m_context; }; class InputMethodContext : public QtWayland::zwp_input_method_context_v1 { public: InputMethodContext(MInputContextConnection *connection, struct ::zwp_input_method_context_v1 *object); ~InputMethodContext(); QString selection() const; uint32_t serial() const; protected: void zwp_input_method_context_v1_commit_state(uint32_t serial) Q_DECL_OVERRIDE; void zwp_input_method_context_v1_content_type(uint32_t hint, uint32_t purpose) Q_DECL_OVERRIDE; void zwp_input_method_context_v1_invoke_action(uint32_t button, uint32_t index) Q_DECL_OVERRIDE; void zwp_input_method_context_v1_preferred_language(const QString &language) Q_DECL_OVERRIDE; void zwp_input_method_context_v1_reset() Q_DECL_OVERRIDE; void zwp_input_method_context_v1_surrounding_text(const QString &text, uint32_t cursor, uint32_t anchor) Q_DECL_OVERRIDE; private: MInputContextConnection *m_connection; QVariantMap m_stateInfo; uint32_t m_serial; QString m_selection; }; } } struct WaylandInputMethodConnectionPrivate { Q_DECLARE_PUBLIC(WaylandInputMethodConnection) WaylandInputMethodConnectionPrivate(WaylandInputMethodConnection *connection); ~WaylandInputMethodConnectionPrivate(); void handleRegistryGlobal(uint32_t name, const char *interface, uint32_t version); void handleRegistryGlobalRemove(uint32_t name); Maliit::Wayland::InputMethodContext *context(); WaylandInputMethodConnection *q_ptr; wl_display *display; wl_registry *registry; QScopedPointer input_method; }; namespace { void registryGlobal(void *data, wl_registry *registry, uint32_t name, const char *interface, uint32_t version) { WaylandInputMethodConnectionPrivate *d = static_cast(data); Q_UNUSED(registry); d->handleRegistryGlobal(name, interface, version); } void registryGlobalRemove(void *data, wl_registry *registry, uint32_t name) { WaylandInputMethodConnectionPrivate *d = static_cast(data); Q_UNUSED(registry); d->handleRegistryGlobalRemove(name); } const wl_registry_listener maliit_registry_listener = { registryGlobal, registryGlobalRemove }; } // unnamed namespace WaylandInputMethodConnectionPrivate::WaylandInputMethodConnectionPrivate(WaylandInputMethodConnection *connection) : q_ptr(connection), display(0), registry(0), input_method() { display = static_cast(QGuiApplication::platformNativeInterface()->nativeResourceForIntegration("display")); if (!display) { qCritical() << Q_FUNC_INFO << "Failed to get a display."; return; } registry = wl_display_get_registry(display); wl_registry_add_listener(registry, &maliit_registry_listener, this); } WaylandInputMethodConnectionPrivate::~WaylandInputMethodConnectionPrivate() { input_method.reset(); if (registry) { wl_registry_destroy(registry); } } void WaylandInputMethodConnectionPrivate::handleRegistryGlobal(uint32_t name, const char *interface, uint32_t version) { Q_UNUSED(version); Q_Q(WaylandInputMethodConnection); if (!strcmp(interface, "zwp_input_method_v1")) { input_method.reset(new Maliit::Wayland::InputMethod(q, registry, name)); } } void WaylandInputMethodConnectionPrivate::handleRegistryGlobalRemove(uint32_t name) { qCDebug(lcWaylandConnection) << Q_FUNC_INFO << name; } Maliit::Wayland::InputMethodContext *WaylandInputMethodConnectionPrivate::context() { return input_method ? input_method->context() : 0; } // MInputContextWestonIMProtocolConnection WaylandInputMethodConnection::WaylandInputMethodConnection() : d_ptr(new WaylandInputMethodConnectionPrivate(this)) { } WaylandInputMethodConnection::~WaylandInputMethodConnection() { } void WaylandInputMethodConnection::sendPreeditString(const QString &string, const QList &preedit_formats, int replace_start, int replace_length, int cursor_pos) { Q_D(WaylandInputMethodConnection); qCDebug(lcWaylandConnection) << Q_FUNC_INFO << string << replace_start << replace_length << cursor_pos; if (!d->context()) return; MInputContextConnection::sendPreeditString(string, preedit_formats, replace_start, replace_length, cursor_pos); if (replace_length > 0) { int cursor = widgetState().value(CursorPositionAttribute).toInt(); uint32_t index = string.midRef(qMin(cursor + replace_start, cursor), qAbs(replace_start)).toUtf8().size(); uint32_t length = string.midRef(cursor + replace_start, replace_length).toUtf8().size(); d->context()->delete_surrounding_text(index, length); } Q_FOREACH (const Maliit::PreeditTextFormat& format, preedit_formats) { QtWayland::zwp_text_input_v2::preedit_style style = preeditStyleFromMaliit(format.preeditFace); uint32_t index = string.leftRef(format.start).toUtf8().size(); uint32_t length = string.leftRef(format.start + format.length).toUtf8().size() - index; qCDebug(lcWaylandConnection) << Q_FUNC_INFO << "preedit_styling" << index << length; d->context()->preedit_styling(index, length, style); } // TODO check if defined like that/required if (cursor_pos < 0) { cursor_pos = string.size() + 1 - cursor_pos; } qCDebug(lcWaylandConnection) << Q_FUNC_INFO << "preedit_cursor" << string.leftRef(cursor_pos).toUtf8().size(); d->context()->preedit_cursor(string.leftRef(cursor_pos).toUtf8().size()); qCDebug(lcWaylandConnection) << Q_FUNC_INFO << "preedit_string" << string; d->context()->preedit_string(d->context()->serial(), string, string); } void WaylandInputMethodConnection::sendCommitString(const QString &string, int replace_start, int replace_length, int cursor_pos) { Q_D(WaylandInputMethodConnection); qCDebug(lcWaylandConnection) << Q_FUNC_INFO << string << replace_start << replace_length << cursor_pos; if (!d->context()) return; MInputContextConnection::sendCommitString(string, replace_start, replace_length, cursor_pos); if (cursor_pos != 0) { qCWarning(lcWaylandConnection) << Q_FUNC_INFO << "cursor_pos:" << cursor_pos << "!= 0 not supported yet"; cursor_pos = 0; } if (replace_length > 0) { int cursor = widgetState().value(CursorPositionAttribute).toInt(); uint32_t index = string.midRef(qMin(cursor + replace_start, cursor), qAbs(replace_start)).toUtf8().size(); uint32_t length = string.midRef(cursor + replace_start, replace_length).toUtf8().size(); d->context()->delete_surrounding_text(index, length); } cursor_pos = string.leftRef(cursor_pos).toUtf8().size(); d->context()->cursor_position(cursor_pos, cursor_pos); d->context()->commit_string(d->context()->serial(), string); } void WaylandInputMethodConnection::sendKeyEvent(const QKeyEvent &keyEvent, Maliit::EventRequestType requestType) { Q_D(WaylandInputMethodConnection); qCDebug(lcWaylandConnection) << Q_FUNC_INFO; if (!d->context()) return; xkb_keysym_t sym(keyFromQt(keyEvent.key())); if (sym == XKB_KEY_NoSymbol) { qCWarning(lcWaylandConnection) << "No conversion from Qt::Key:" << keyEvent.key() << "to XKB key. Update the keyFromQt() function."; return; } wl_keyboard_key_state state; switch (keyEvent.type()) { case QEvent::KeyPress: state = WL_KEYBOARD_KEY_STATE_PRESSED; break; case QEvent::KeyRelease: state = WL_KEYBOARD_KEY_STATE_RELEASED; break; default: qCWarning(lcWaylandConnection) << "Unknown QKeyEvent type:" << keyEvent.type(); return; } xkb_mod_mask_t modifiers(modifiersFromQt(keyEvent.modifiers())); MInputContextConnection::sendKeyEvent(keyEvent, requestType); d->context()->keysym(d->context()->serial(), keyEvent.timestamp(), sym, state, modifiers); } QString WaylandInputMethodConnection::selection(bool &valid) { Q_D(WaylandInputMethodConnection); qCDebug(lcWaylandConnection) << Q_FUNC_INFO; Maliit::Wayland::InputMethodContext *context = d->input_method->context(); valid = context && !context->selection().isEmpty(); return context ? context->selection() : QString(); } void WaylandInputMethodConnection::setLanguage(const QString &language) { Q_D(WaylandInputMethodConnection); qCDebug(lcWaylandConnection) << Q_FUNC_INFO; if (!d->context()) return; d->context()->language(d->context()->serial(), language); } void WaylandInputMethodConnection::setSelection(int start, int length) { Q_D (WaylandInputMethodConnection); qCDebug(lcWaylandConnection) << Q_FUNC_INFO; if (!d->context()) return; QString surrounding = widgetState().value(SurroundingTextAttribute).toString(); uint32_t index(surrounding.leftRef(start + length).toUtf8().size()); uint32_t anchor(surrounding.leftRef(start).toUtf8().size()); d->context()->cursor_position(index, anchor); d->context()->commit_string(d->context()->serial(), QString()); } namespace Maliit { namespace Wayland { InputMethod::InputMethod(MInputContextConnection *connection, struct wl_registry *registry, int id) : QtWayland::zwp_input_method_v1(registry, id, 1) , m_connection(connection) , m_context() { qCDebug(lcWaylandConnection) << Q_FUNC_INFO; } InputMethod::~InputMethod() { } InputMethodContext *InputMethod::context() const { return m_context.data(); } void InputMethod::zwp_input_method_v1_activate(struct ::zwp_input_method_context_v1 *id) { qCDebug(lcWaylandConnection) << Q_FUNC_INFO; m_context.reset(new InputMethodContext(m_connection, id)); m_context->modifiers_map(modifiersMap()); } void InputMethod::zwp_input_method_v1_deactivate(struct zwp_input_method_context_v1 *) { qCDebug(lcWaylandConnection) << Q_FUNC_INFO; m_context.reset(); m_connection->handleDisconnection(wayland_connection_id); } InputMethodContext::InputMethodContext(MInputContextConnection *connection, struct ::zwp_input_method_context_v1 *object) : QtWayland::zwp_input_method_context_v1(object) , m_connection(connection) , m_stateInfo() , m_serial(0) , m_selection() { qCDebug(lcWaylandConnection) << Q_FUNC_INFO; m_stateInfo[FocusStateAttribute] = true; m_connection->activateContext(wayland_connection_id); m_connection->showInputMethod(wayland_connection_id); } InputMethodContext::~InputMethodContext() { qCDebug(lcWaylandConnection) << Q_FUNC_INFO; m_stateInfo.clear(); m_stateInfo[FocusStateAttribute] = false; m_connection->updateWidgetInformation(wayland_connection_id, m_stateInfo, true); m_connection->hideInputMethod(wayland_connection_id); } QString InputMethodContext::selection() const { return m_selection; } uint32_t InputMethodContext::serial() const { return m_serial; } void InputMethodContext::zwp_input_method_context_v1_commit_state(uint32_t serial) { qCDebug(lcWaylandConnection) << Q_FUNC_INFO; m_serial = serial; m_connection->updateWidgetInformation(wayland_connection_id, m_stateInfo, false); } void InputMethodContext::zwp_input_method_context_v1_content_type(uint32_t hint, uint32_t purpose) { qCDebug(lcWaylandConnection) << Q_FUNC_INFO; m_stateInfo[ContentTypeAttribute] = contentTypeFromWayland(purpose); m_stateInfo[AutoCapitalizationAttribute] = matchesFlag(hint, QtWayland::zwp_text_input_v2::content_hint_auto_capitalization); m_stateInfo[CorrectionAttribute] = matchesFlag(hint, QtWayland::zwp_text_input_v2::content_hint_auto_correction); m_stateInfo[PredictionAttribute] = matchesFlag(hint, QtWayland::zwp_text_input_v2::content_hint_auto_completion); m_stateInfo[HiddenTextAttribute] = matchesFlag(hint, QtWayland::zwp_text_input_v2::content_hint_hidden_text); } void InputMethodContext::zwp_input_method_context_v1_invoke_action(uint32_t button, uint32_t index) { qCDebug(lcWaylandConnection) << Q_FUNC_INFO << button << index; } void InputMethodContext::zwp_input_method_context_v1_preferred_language(const QString &language) { qCDebug(lcWaylandConnection) << Q_FUNC_INFO << language; } void InputMethodContext::zwp_input_method_context_v1_reset() { qCDebug(lcWaylandConnection) << Q_FUNC_INFO; m_connection->reset(wayland_connection_id); m_connection->showInputMethod(wayland_connection_id); } void InputMethodContext::zwp_input_method_context_v1_surrounding_text(const QString &text, uint32_t cursor, uint32_t anchor) { qCDebug(lcWaylandConnection) << Q_FUNC_INFO; // Re-show the keyboard if it was hidden without changing focus. m_connection->showInputMethod(wayland_connection_id); const QByteArray &utf8_text(text.toUtf8()); m_stateInfo[SurroundingTextAttribute] = text; m_stateInfo[CursorPositionAttribute] = QString::fromUtf8(utf8_text.constData(), cursor).size(); m_stateInfo[AnchorPositionAttribute] = QString::fromUtf8(utf8_text.constData(), anchor).size(); if (cursor == anchor) { m_stateInfo[HasSelectionAttribute] = false; m_selection.clear(); } else { m_stateInfo[HasSelectionAttribute] = true; uint32_t begin = qMin(anchor, cursor); uint32_t end = qMax(anchor, cursor); m_selection = QString::fromUtf8(utf8_text.constData() + begin, end - begin); } } } } framework-2.3.0/connection/waylandinputmethodconnection.h000066400000000000000000000037731426132540300240330ustar00rootroot00000000000000/* * This file is part of Maliit framework * * * Copyright (C) 2012 Canonical Ltd * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef WAYLANDINPUTMETHODCONNECTION_H #define WAYLANDINPUTMETHODCONNECTION_H #include #include "minputcontextconnection.h" #include Q_DECLARE_LOGGING_CATEGORY(lcWaylandConnection) class WaylandInputMethodConnectionPrivate; /*! \internal * \ingroup maliitserver * \brief Input method communication implementation between the Weston * and the input method server. */ class WaylandInputMethodConnection : public MInputContextConnection { Q_OBJECT Q_DISABLE_COPY(WaylandInputMethodConnection) Q_DECLARE_PRIVATE(WaylandInputMethodConnection) public: explicit WaylandInputMethodConnection(); virtual ~WaylandInputMethodConnection(); virtual void sendPreeditString(const QString &string, const QList &preedit_formats, int replacement_start = 0, int replacement_length = 0, int cursor_pos = -1); virtual void sendCommitString(const QString &string, int replace_start = 0, int replace_length = 0, int cursor_pos = -1); virtual void sendKeyEvent(const QKeyEvent &key_event, Maliit::EventRequestType request_type); virtual void setSelection(int start, int length); virtual QString selection(bool &valid); virtual void setLanguage(const QString &language); private: const QScopedPointer d_ptr; }; //! \internal_end #endif framework-2.3.0/dbus_interfaces/000077500000000000000000000000001426132540300166515ustar00rootroot00000000000000framework-2.3.0/dbus_interfaces/minputmethodcontext1interface.xml000066400000000000000000000042551426132540300254650ustar00rootroot00000000000000 framework-2.3.0/dbus_interfaces/minputmethodserver1interface.xml000066400000000000000000000046331426132540300253070ustar00rootroot00000000000000 framework-2.3.0/doc/000077500000000000000000000000001426132540300142565ustar00rootroot00000000000000framework-2.3.0/doc/.gitignore000066400000000000000000000000201426132540300162360ustar00rootroot00000000000000html/ mdoxy.cfg framework-2.3.0/doc/Doxyfile.in000066400000000000000000003417471426132540300164110ustar00rootroot00000000000000# Doxyfile 1.9.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the configuration # file that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # https://www.gnu.org/software/libiconv/ for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = "Maliit Framework" # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/doc # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. # The default value is: NO. CREATE_SUBDIRS = NO # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. # The default value is: NO. ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, # Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all generated output in the proper direction. # Possible values are: None, LTR, RTL and Context. # The default value is: None. OUTPUT_TEXT_DIRECTION = None # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = NO # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = NO # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = YES # If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line # such as # /*************** # as being the beginning of a Javadoc-style comment "banner". If set to NO, the # Javadoc-style will behave just like regular comments and it will not be # interpreted by doxygen. # The default value is: NO. JAVADOC_BANNER = NO # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # By default Python docstrings are displayed as preformatted text and doxygen's # special commands cannot be used. By setting PYTHON_DOCSTRING to NO the # doxygen's special commands can be used and the contents of the docstring # documentation blocks is shown as doxygen documentation. # The default value is: YES. PYTHON_DOCSTRING = YES # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new # page for each member. If set to NO, the documentation of a member will be part # of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:\n" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines (in the resulting output). You can put ^^ in the value part of an # alias to insert a newline as if a physical newline was in the original file. # When you need a literal { or } or , in the value part of an alias you have to # escape them by means of a backslash (\), this can lead to conflicts with the # commands \{ and \} for these it is advised to use the version @{ and @} or use # a double escape (\\{ and \\}) ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice # sources only. Doxygen will then generate output that is more tailored for that # language. For instance, namespaces will be presented as modules, types will be # separated into more groups, etc. # The default value is: NO. OPTIMIZE_OUTPUT_SLICE = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, JavaScript, # Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL, # Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: # FortranFree, unknown formatted Fortran: Fortran. In the later case the parser # tries to guess whether the code is fixed or free formatted code, this is the # default for Fortran type files). For instance to make doxygen treat .inc files # as Fortran files (default is PHP), and .f files as C (default is Fortran), # use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. When specifying no_extension you should add # * to the FILE_PATTERNS. # # Note see also the list of default file extension mappings. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See https://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up # to that level are automatically included in the table of contents, even if # they do not have an id attribute. # Note: This feature currently applies only to Markdown headings. # Minimum value: 0, maximum value: 99, default value: 5. # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. TOC_INCLUDE_HEADINGS = 5 # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # If one adds a struct or class to a group and this option is enabled, then also # any nested class or struct is added to the same group. By default this option # is disabled and one has to add nested compounds explicitly via \ingroup. # The default value is: NO. GROUP_NESTED_COMPOUNDS = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 # The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use # during processing. When set to 0 doxygen will based this on the number of # cores available in the system. You can set it explicitly to a value larger # than 0 to get more control over the balance between CPU load and processing # speed. At this moment only the input processing can be done using multiple # threads. Since this is still an experimental feature the default is set to 1, # which efficively disables parallel processing. Please report any issues you # encounter. Generating dot graphs in parallel is controlled by the # DOT_NUM_THREADS setting. # Minimum value: 0, maximum value: 32, default value: 1. NUM_PROC_THREADS = 1 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO # If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual # methods of a class will be included in the documentation. # The default value is: NO. EXTRACT_PRIV_VIRTUAL = NO # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined # locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If this flag is set to YES, the name of an unnamed parameter in a declaration # will be determined by the corresponding definition. By default unnamed # parameters remain unnamed in the output. # The default value is: YES. RESOLVE_UNNAMED_PARAMS = YES # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO, these classes will be included in the various overviews. This option # has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # declarations. If set to NO, these declarations will be included in the # documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = YES # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # With the correct setting of option CASE_SENSE_NAMES doxygen will better be # able to match the capabilities of the underlying filesystem. In case the # filesystem is case sensitive (i.e. it supports files in the same directory # whose names only differ in casing), the option must be set to YES to properly # deal with such files in case they appear in the input. For filesystems that # are not case sensitive the option should be be set to NO to properly deal with # output files written for symbols that only differ in casing, such as for two # classes, one named CLASS and the other named Class, and to also support # references to files without having to specify the exact matching casing. On # Windows (including Cygwin) and MacOS, users should typically set this option # to NO, whereas on Linux or other Unix flavors it should typically be set to # YES. # The default value is: system dependent. CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will # append additional text to a page's title, such as Class Reference. If set to # YES the compound reference will be hidden. # The default value is: NO. HIDE_COMPOUND_REFERENCE= NO # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = NO # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo # list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test # list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = NO # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = "echo @PROJECT_VERSION@" # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some parameters # in a documented function, or documenting parameters that don't exist or using # markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong or incomplete # parameter documentation, but not about the absence of documentation. If # EXTRACT_ALL is set to YES then this flag will automatically be disabled. # The default value is: NO. WARN_NO_PARAMDOC = NO # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when # a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS # then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but # at the end of the doxygen process doxygen will return with a non-zero status. # Possible values are: NO, YES and FAIL_ON_WARNINGS. # The default value is: NO. WARN_AS_ERROR = NO # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # The default value is: $file:$line: $text. WARN_FORMAT = "File: $file (row: $line) $text" # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). WARN_LOGFILE = doxygen.log #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = @CMAKE_SOURCE_DIR@/src/ \ @CMAKE_SOURCE_DIR@/common/maliit/ \ @CMAKE_SOURCE_DIR@/doc/src/ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: # https://www.gnu.org/software/libiconv/) for the list of possible encodings. # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # read by doxygen. # # Note the list of default checked file patterns might differ from the list of # default file extension mappings. # # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, # *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), # *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl, # *.ucf, *.qsf and *.ice. FILE_PATTERNS = *.cpp \ *.h \ *.dox # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = moc_*.cpp \ *_p.h \ *_p.cpp # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = *Private \ *View \ *Draft \ *Daemon* # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). EXAMPLE_PATH = @CMAKE_SOURCE_DIR@/examples/apps/ # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = * # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = @CMAKE_SOURCE_DIR@/doc/images # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. INPUT_FILTER = "sed -f @CMAKE_SOURCE_DIR@/doc/aliases.sed <" # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # entity all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = NO # If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: # http://clang.llvm.org/) for more accurate parsing at the cost of reduced # performance. This can be particularly helpful with template rich C++ code for # which doxygen's built-in parser lacks the necessary type information. # Note: The availability of this option depends on whether or not doxygen was # generated with the -Duse_libclang=ON option for CMake. # The default value is: NO. CLANG_ASSISTED_PARSING = NO # If clang assisted parsing is enabled and the CLANG_ADD_INC_PATHS tag is set to # YES then doxygen will add the directory of each input to the include path. # The default value is: YES. CLANG_ADD_INC_PATHS = YES # If clang assisted parsing is enabled you can provide the compiler with command # line options that you would normally use when invoking the compiler. Note that # the include paths will already be set by doxygen for the files and directories # specified with INPUT and INCLUDE_PATH. # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. CLANG_OPTIONS = # If clang assisted parsing is enabled you can provide the clang parser with the # path to the directory containing a file called compile_commands.json. This # file is the compilation database (see: # http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the # options used when the source files were built. This is equivalent to # specifying the -p option to a clang tool, such as clang-check. These options # will then be passed to the parser. Any options specified with CLANG_OPTIONS # will be added as well. # Note: The availability of this option depends on whether or not doxygen was # generated with the -Duse_libclang=ON option for CMake. CLANG_DATABASE_PATH = #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = YES # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = M #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = @CMAKE_SOURCE_DIR@/doc/src/header.html # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = @CMAKE_SOURCE_DIR@/doc/src/footer.html # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = @CMAKE_SOURCE_DIR@/doc/src/meego-im.css # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use grayscales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to YES can help to show when doxygen was last run and thus if the # documentation is up to date. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = NO # If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML # documentation will contain a main index with vertical navigation menus that # are dynamically created via JavaScript. If disabled, the navigation index will # consists of multiple levels of tabs that are statically embedded in every HTML # page. Disable this option to support browsers that do not have JavaScript, # like the Qt help browser. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_MENUS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: # https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To # create a documentation set, doxygen will generate a Makefile in the HTML # output directory. Running make will produce the docset in that directory and # running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy # genXcode/_index.html for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # (see: # https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the main .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location (absolute path # including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to # run qhelpgenerator on the generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = YES # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has # the same information as the tab index, you could consider setting # DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 0 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg # tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see # https://inkscape.org) to generate formulas as SVG images instead of PNGs for # the HTML output. These images will generally look nicer at scaled resolutions. # Possible values are: png (the default) and svg (looks nicer but requires the # pdf2svg or inkscape tool). # The default value is: png. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FORMULA_FORMAT = png # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANSPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES # The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands # to create new LaTeX commands to be used in formulas as building blocks. See # the section "Including formulas" for details. FORMULA_MACROFILE = # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # https://www.mathjax.org) which uses client side JavaScript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: # http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from https://www.mathjax.org before deployment. # The default value is: https://cdn.jsdelivr.net/npm/mathjax@2. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = https://cdn.jsdelivr.net/npm/mathjax@2 # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: # http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /