Merge lp:~thomas-moenicke/phablet-extras/maliit-framework-0.99-server into lp:phablet-extras/maliit-framework

Proposed by Thomas Moenicke
Status: Merged
Merged at revision: 1558
Proposed branch: lp:~thomas-moenicke/phablet-extras/maliit-framework-0.99-server
Merge into: lp:phablet-extras/maliit-framework
Diff against target: 70264 lines (+5263/-45361)
542 files modified
NEWS (+75/-2)
README (+2/-2)
VERSION (+1/-1)
common/maliit/namespace.h (+8/-132)
config.pri (+8/-28)
connection-glib/.gitignore (+0/-2)
connection-glib/connection-glib.pro (+0/-98)
connection-glib/debug.c (+0/-21)
connection-glib/debug.h (+0/-18)
connection-glib/libmaliit-connection-glib.pri (+0/-12)
connection-glib/maliitmarshalers.list (+0/-9)
connection-glib/meego-im-connector-private.h (+0/-25)
connection-glib/meego-im-connector.c (+0/-260)
connection-glib/meego-im-connector.h (+0/-28)
connection-glib/meego-im-proxy.c (+0/-468)
connection-glib/meego-im-proxy.h (+0/-109)
connection-glib/meego-imcontext-dbus-private.h (+0/-56)
connection-glib/meego-imcontext-dbus.c (+0/-443)
connection-glib/meego-imcontext-dbus.h (+0/-55)
connection-glib/qt-keysym-map.cpp (+0/-542)
connection-glib/qt-keysym-map.h (+0/-14)
connection/.gitignore (+0/-5)
connection/connection.pro (+32/-216)
connection/connectionfactory.cpp (+4/-87)
connection/connectionfactory.h (+0/-17)
connection/dbuscustomarguments.cpp (+26/-0)
connection/dbuscustomarguments.h (+5/-0)
connection/dbusinputcontextconnection.cpp (+15/-9)
connection/dbusserverconnection.cpp (+16/-10)
connection/dbusserverconnection.h (+5/-5)
connection/glibdbusimserverproxy.cpp (+0/-461)
connection/glibdbusimserverproxy.h (+0/-104)
connection/glibdbusimserverproxy_p.h (+0/-57)
connection/input-method.xml (+0/-160)
connection/inputcontextdbusaddress.cpp (+2/-2)
connection/inputcontextdbusaddress.h (+1/-1)
connection/libmaliit-connection.pri (+11/-3)
connection/maliit-connection.pc.in (+0/-15)
connection/maliitmarshalers.list (+0/-1)
connection/mdbusglibinputcontextadaptor.cpp (+0/-250)
connection/mdbusglibinputcontextadaptor.h (+0/-47)
connection/mimdirectserverconnection.cpp (+0/-140)
connection/mimdirectserverconnection.h (+0/-80)
connection/miminputcontextdirectconnection.cpp (+0/-142)
connection/miminputcontextdirectconnection.h (+0/-71)
connection/mimserverconnection.cpp (+6/-7)
connection/mimserverconnection.h (+9/-24)
connection/minputcontextconnection.cpp (+33/-29)
connection/minputcontextconnection.h (+6/-6)
connection/minputcontextglibdbusconnection.cpp (+0/-851)
connection/minputcontextglibdbusconnection.h (+0/-112)
connection/minputcontextwestonimprotocolconnection.cpp (+0/-830)
connection/minputcontextwestonimprotocolconnection.h (+0/-97)
connection/org.maliit.server.service.in (+0/-4)
connection/serverdbusaddress.cpp (+1/-41)
connection/serverdbusaddress.h (+1/-17)
connection/text.xml (+0/-266)
connection/variantmarshalling.cpp (+0/-231)
connection/variantmarshalling.h (+0/-58)
connection/waylandinputmethodconnection.cpp (+593/-0)
connection/waylandinputmethodconnection.h (+61/-0)
dbus_interfaces/dbus_interfaces.pri (+1/-1)
dbus_interfaces/minputmethodcontext1interface.xml (+3/-3)
dbus_interfaces/minputmethodserver1interface.xml (+1/-1)
debian/changelog (+0/-278)
debian/compat (+0/-1)
debian/control (+0/-84)
debian/copyright (+0/-17)
debian/gir1.2-maliit-glib1.install (+0/-2)
debian/libmaliit-glib1-dev.install (+0/-6)
debian/libmaliit-glib1-doc.install (+0/-4)
debian/libmaliit-glib1.install (+0/-1)
debian/libmaliit1-dev.install (+0/-5)
debian/libmaliit1.install (+0/-2)
debian/maliit-framework-dev.install (+0/-12)
debian/maliit-framework-doc.install (+0/-5)
debian/maliit-framework-examples.install (+0/-1)
debian/maliit-framework-tests.install (+0/-2)
debian/maliit-framework.install (+0/-7)
debian/maliit-framework.postinst (+0/-21)
debian/maliit-framework.prerm (+0/-18)
debian/maliit-inputcontext-gtk2.install (+0/-1)
debian/maliit-inputcontext-gtk3.install (+0/-1)
debian/rules (+0/-97)
debian/server.conf (+0/-20)
debian/source/format (+0/-1)
debian/xinput/maliit (+0/-8)
defines.pri (+0/-4)
doc/doc.pro (+3/-3)
examples/README (+0/-11)
examples/apps/allinputmethods/.gitignore (+0/-1)
examples/apps/allinputmethods/allinputmethods.cpp (+0/-25)
examples/apps/allinputmethods/allinputmethods.pro (+0/-44)
examples/apps/allinputmethods/mainwindow.cpp (+0/-71)
examples/apps/allinputmethods/mainwindow.h (+0/-22)
examples/apps/apps.pro (+0/-32)
examples/apps/embedded/.gitignore (+0/-1)
examples/apps/embedded/embedded.cpp (+0/-51)
examples/apps/embedded/embedded.h (+0/-22)
examples/apps/embedded/embedded.pro (+0/-47)
examples/apps/embedded/main.cpp (+0/-32)
examples/apps/gtk2-overrides/.gitignore (+0/-1)
examples/apps/gtk2-overrides/actionkeyfilter.c (+0/-190)
examples/apps/gtk2-overrides/actionkeyfilter.h (+0/-55)
examples/apps/gtk2-overrides/gtk2-overrides.pro (+0/-30)
examples/apps/gtk2-overrides/main.c (+0/-247)
examples/apps/gtk2/.gitignore (+0/-1)
examples/apps/gtk2/exampleapp-gtk.c (+0/-106)
examples/apps/gtk2/gtk2.pro (+0/-29)
examples/apps/gtk3-overrides/.gitignore (+0/-1)
examples/apps/gtk3-overrides/gtk3-overrides.pro (+0/-30)
examples/apps/gtk3-python/gtk3-python.pro (+0/-14)
examples/apps/gtk3-python/maliit-exampleapp-gtk3-python.py (+0/-34)
examples/apps/gtk3/.gitignore (+0/-1)
examples/apps/gtk3/gtk3.pro (+0/-29)
examples/apps/plainqt/.gitignore (+0/-2)
examples/apps/plainqt/mainwindow.cpp (+0/-249)
examples/apps/plainqt/mainwindow.h (+0/-50)
examples/apps/plainqt/plainqt.cpp (+0/-32)
examples/apps/plainqt/plainqt.pro (+0/-46)
examples/apps/qml/enterKeyCustomization.qml (+18/-0)
examples/apps/server-embedded/.gitignore (+0/-1)
examples/apps/server-embedded/main.cpp (+0/-78)
examples/apps/server-embedded/server-embedded.pro (+0/-40)
examples/apps/settings-python3/maliit-exampleapp-settings-python3.py (+0/-361)
examples/apps/settings-python3/settings-python3.pro (+0/-16)
examples/apps/settings/.gitignore (+0/-1)
examples/apps/settings/boolentrycheckbox.cpp (+0/-55)
examples/apps/settings/boolentrycheckbox.h (+0/-42)
examples/apps/settings/main.cpp (+0/-42)
examples/apps/settings/mainwindow.cpp (+0/-295)
examples/apps/settings/mainwindow.h (+0/-67)
examples/apps/settings/selectentrycombobox.cpp (+0/-60)
examples/apps/settings/selectentrycombobox.h (+0/-43)
examples/apps/settings/settings.pro (+0/-50)
examples/apps/settings/stringentryedit.cpp (+0/-46)
examples/apps/settings/stringentryedit.h (+0/-42)
examples/apps/twofields/.gitignore (+0/-1)
examples/apps/twofields/actionkeyfilter.cpp (+0/-77)
examples/apps/twofields/actionkeyfilter.h (+0/-31)
examples/apps/twofields/mainwindow.cpp (+0/-93)
examples/apps/twofields/mainwindow.h (+0/-22)
examples/apps/twofields/myextension.cpp (+0/-26)
examples/apps/twofields/myextension.h (+0/-26)
examples/apps/twofields/twofields.cpp (+0/-25)
examples/apps/twofields/twofields.pro (+0/-46)
examples/apps/widgetproperties/.gitignore (+0/-1)
examples/apps/widgetproperties/mainwindow.cpp (+0/-137)
examples/apps/widgetproperties/mainwindow.h (+0/-24)
examples/apps/widgetproperties/widgetproperties.cpp (+0/-25)
examples/apps/widgetproperties/widgetproperties.pro (+0/-42)
examples/examples.pro (+0/-2)
examples/plugins/cxx/cxx.pro (+0/-2)
examples/plugins/cxx/helloworld/helloworld.pro (+0/-50)
examples/plugins/cxx/helloworld/helloworldinputmethod.cpp (+0/-210)
examples/plugins/cxx/helloworld/helloworldinputmethod.h (+0/-85)
examples/plugins/cxx/helloworld/helloworldplugin.cpp (+0/-45)
examples/plugins/cxx/helloworld/helloworldplugin.h (+0/-51)
examples/plugins/cxx/override/override.pro (+0/-50)
examples/plugins/cxx/override/overrideinputmethod.cpp (+0/-259)
examples/plugins/cxx/override/overrideinputmethod.h (+0/-91)
examples/plugins/cxx/override/overrideplugin.cpp (+0/-45)
examples/plugins/cxx/override/overrideplugin.h (+0/-51)
examples/plugins/plugins.pro (+0/-11)
examples/plugins/qml/.gitignore (+0/-1)
examples/plugins/qml/cyclekeys/CycleKey.qml (+0/-123)
examples/plugins/qml/cyclekeys/cyclekeys.pro (+0/-50)
examples/plugins/qml/cyclekeys/cyclekeys.qrc (+0/-6)
examples/plugins/qml/cyclekeys/cyclekeysplugin.cpp (+0/-41)
examples/plugins/qml/cyclekeys/cyclekeysplugin.h (+0/-35)
examples/plugins/qml/cyclekeys/main.qml (+0/-65)
examples/plugins/qml/helloworld/helloworld.pro (+0/-44)
examples/plugins/qml/helloworld/helloworld.qml (+0/-54)
examples/plugins/qml/override/override.pro (+0/-48)
examples/plugins/qml/override/override.qml (+0/-89)
examples/plugins/qml/override/override.qrc (+0/-5)
examples/plugins/qml/override/overrideplugin.cpp (+0/-43)
examples/plugins/qml/override/overrideplugin.h (+0/-34)
examples/plugins/qml/qml.pro (+0/-2)
gtk-input-context/.gitignore (+0/-28)
gtk-input-context/AUTHORS (+0/-3)
gtk-input-context/COPYING (+0/-505)
gtk-input-context/client-gtk/client-gtk.pro (+0/-71)
gtk-input-context/client-gtk/client-imcontext-gtk.c (+0/-924)
gtk-input-context/client-gtk/client-imcontext-gtk.h (+0/-81)
gtk-input-context/client-gtk/gtk-imcontext-plugin.c (+0/-87)
gtk-input-context/client-gtk/qt-gtk-translate.cpp (+0/-155)
gtk-input-context/client-gtk/qt-gtk-translate.h (+0/-34)
gtk-input-context/client-gtk3/client-gtk3.pro (+0/-75)
gtk-input-context/gtk-input-context.pro (+0/-11)
input-context/.gitignore (+0/-1)
input-context/direct-input-context-plugin/direct-input-context-plugin.pro (+0/-18)
input-context/direct-input-context-plugin/mdirectinputcontextplugin.cpp (+0/-104)
input-context/direct-input-context-plugin/mdirectinputcontextplugin.h (+0/-37)
input-context/input-context-plugin/input-context-plugin.pro (+0/-18)
input-context/input-context-plugin/libmaliit-qt4.pri (+0/-9)
input-context/input-context-plugin/minputcontextplugin.cpp (+0/-84)
input-context/input-context-plugin/minputcontextplugin.h (+0/-37)
input-context/input-context.pri (+0/-32)
input-context/input-context.pro (+0/-19)
input-context/libmaliit-inputcontext-qt4.pri (+0/-7)
input-context/main.cpp (+41/-0)
input-context/maliit-input-context/maliit-input-context.pro (+0/-13)
input-context/maliit-input-context/minputcontext.cpp (+0/-1275)
input-context/maliit-input-context/minputcontext.h (+0/-224)
input-context/maliit.json (+3/-0)
input-context/minputcontext.cpp (+789/-0)
input-context/minputcontext.h (+143/-0)
maliit-framework.pro (+17/-47)
maliit-glib/.gitignore (+0/-9)
maliit-glib/libmaliit-glib.pri (+0/-10)
maliit-glib/maliit-docs.xml (+0/-41)
maliit-glib/maliit-glib-docs.pro (+0/-87)
maliit-glib/maliit-glib.pc.in (+0/-11)
maliit-glib/maliit-glib.pro (+0/-96)
maliit-glib/maliit-sections.txt (+0/-174)
maliit-glib/maliitattributeextension.c (+0/-462)
maliit-glib/maliitattributeextension.h (+0/-93)
maliit-glib/maliitattributeextensionprivate.h (+0/-36)
maliit-glib/maliitattributeextensionregistry.c (+0/-347)
maliit-glib/maliitattributeextensionregistry.h (+0/-94)
maliit-glib/maliitinputmethod.c (+0/-214)
maliit-glib/maliitinputmethod.h (+0/-78)
maliit-glib/maliitmarshallers.list (+0/-4)
maliit-glib/maliitpluginsettings.c (+0/-370)
maliit-glib/maliitpluginsettings.h (+0/-76)
maliit-glib/maliitpluginsettingsprivate.h (+0/-37)
maliit-glib/maliitsettingdata.c (+0/-252)
maliit-glib/maliitsettingdata.h (+0/-88)
maliit-glib/maliitsettingsentry.c (+0/-677)
maliit-glib/maliitsettingsentry.h (+0/-92)
maliit-glib/maliitsettingsentryprivate.h (+0/-37)
maliit-glib/maliitsettingsmanager.c (+0/-383)
maliit-glib/maliitsettingsmanager.h (+0/-76)
maliit-plugins-quick/input-method/.gitignore (+0/-2)
maliit-plugins-quick/input-method/input-method.pro (+0/-66)
maliit-plugins-quick/input-method/maliit-plugins-quick.pc.in (+0/-12)
maliit-plugins-quick/input-method/maliitquick.h (+0/-37)
maliit-plugins-quick/input-method/minputmethodquick.cpp (+0/-491)
maliit-plugins-quick/input-method/minputmethodquick.h (+0/-154)
maliit-plugins-quick/input-method/minputmethodquickplugin.cpp (+0/-78)
maliit-plugins-quick/input-method/minputmethodquickplugin.h (+0/-72)
maliit-plugins-quick/input-method/mkeyoverridequick.cpp (+0/-351)
maliit-plugins-quick/input-method/mkeyoverridequick.h (+0/-158)
maliit-plugins-quick/input-method/mkeyoverridequick_p.h (+0/-44)
maliit-plugins-quick/libmaliit-plugins-quick.pri (+0/-7)
maliit-plugins-quick/maliit-plugins-quick.pro (+0/-5)
maliit-plugins-quick/plugin-factory/libmaliit-plugins-quick-factory.pri (+0/-8)
maliit-plugins-quick/plugin-factory/maliitquickpluginfactory.cpp (+0/-65)
maliit-plugins-quick/plugin-factory/maliitquickpluginfactory.h (+0/-43)
maliit-plugins-quick/plugin-factory/plugin-factory.pro (+0/-47)
maliit-settings/.gitignore (+0/-1)
maliit-settings/libmaliit-settings.pri (+0/-10)
maliit-settings/maliit-settings.pc.in (+0/-11)
maliit-settings/maliit-settings.pro (+0/-61)
maliit-settings/pluginsettings.cpp (+0/-77)
maliit-settings/pluginsettings.h (+0/-67)
maliit-settings/settingsentry.cpp (+0/-112)
maliit-settings/settingsentry.h (+0/-93)
maliit-settings/settingsmanager.cpp (+0/-114)
maliit-settings/settingsmanager.h (+0/-79)
maliit/.gitignore (+0/-1)
maliit/attributeextension.cpp (+0/-150)
maliit/attributeextension.h (+0/-124)
maliit/attributeextension_p.h (+0/-48)
maliit/attributeextensionregistry.cpp (+0/-205)
maliit/attributeextensionregistry.h (+0/-85)
maliit/attributeextensionregistry_p.h (+0/-38)
maliit/inputmethod.cpp (+0/-179)
maliit/inputmethod.h (+0/-165)
maliit/inputmethod_p.h (+0/-50)
maliit/libmaliit.pri (+0/-9)
maliit/maliit.pc.in (+0/-11)
maliit/maliit.pro (+0/-65)
maliit/preeditinjectionevent.cpp (+0/-117)
maliit/preeditinjectionevent.h (+0/-96)
maliit/preeditinjectionevent_p.h (+0/-36)
passthroughserver/main.cpp (+78/-119)
passthroughserver/passthroughserver.pro (+1/-1)
src/.gitignore (+0/-7)
src/abstractplatform.cpp (+28/-0)
src/abstractplatform.h (+40/-0)
src/abstractsurfacegroup.cpp (+0/-28)
src/abstractsurfacegroup.h (+0/-47)
src/abstractsurfacegroupfactory.cpp (+0/-24)
src/abstractsurfacegroupfactory.h (+0/-35)
src/config.h.in (+0/-25)
src/desktop-shell.xml (+0/-131)
src/libmaliit-plugins.pri (+0/-7)
src/maliit-defines.prf.in (+0/-7)
src/maliit-plugins.pc.in (+0/-15)
src/maliit-plugins.prf.in (+0/-3)
src/maliit-server.pc.in (+0/-15)
src/maliit/plugins/abstractinputmethod.cpp (+0/-190)
src/maliit/plugins/abstractinputmethod.h (+0/-272)
src/maliit/plugins/abstractinputmethodhost.cpp (+0/-81)
src/maliit/plugins/abstractinputmethodhost.h (+0/-325)
src/maliit/plugins/abstractpluginfactory.cpp (+0/-25)
src/maliit/plugins/abstractpluginfactory.h (+0/-58)
src/maliit/plugins/abstractpluginsetting.h (+0/-70)
src/maliit/plugins/abstractsurface.cpp (+0/-25)
src/maliit/plugins/abstractsurface.h (+0/-111)
src/maliit/plugins/abstractsurfacefactory.cpp (+0/-32)
src/maliit/plugins/abstractsurfacefactory.h (+0/-71)
src/maliit/plugins/abstractwidgetssurface.cpp (+0/-29)
src/maliit/plugins/abstractwidgetssurface.h (+0/-78)
src/maliit/plugins/attributeextension.cpp (+0/-51)
src/maliit/plugins/attributeextension.h (+0/-62)
src/maliit/plugins/attributeextension_p.h (+0/-37)
src/maliit/plugins/extensionevent.cpp (+0/-44)
src/maliit/plugins/extensionevent.h (+0/-56)
src/maliit/plugins/extensionevent_p.h (+0/-27)
src/maliit/plugins/inputmethodplugin.h (+0/-66)
src/maliit/plugins/keyoverride.cpp (+0/-142)
src/maliit/plugins/keyoverride.h (+0/-153)
src/maliit/plugins/keyoverride_p.h (+0/-40)
src/maliit/plugins/keyoverridedata.cpp (+0/-56)
src/maliit/plugins/keyoverridedata.h (+0/-68)
src/maliit/plugins/plugindescription.cpp (+0/-82)
src/maliit/plugins/plugindescription.h (+0/-65)
src/maliit/plugins/quickviewsurface.cpp (+0/-11)
src/maliit/plugins/quickviewsurface.h (+0/-22)
src/maliit/plugins/subviewdescription.cpp (+0/-89)
src/maliit/plugins/subviewdescription.h (+0/-63)
src/maliit/plugins/testsurfacefactory.cpp (+0/-80)
src/maliit/plugins/testsurfacefactory.h (+0/-33)
src/maliit/plugins/updateevent.cpp (+0/-112)
src/maliit/plugins/updateevent.h (+0/-82)
src/maliit/plugins/updateevent_p.h (+0/-43)
src/maliit/plugins/updatereceiver.cpp (+0/-91)
src/maliit/plugins/updatereceiver.h (+0/-75)
src/mattributeextensionid.cpp (+0/-70)
src/mattributeextensionid.h (+0/-72)
src/mattributeextensionmanager.cpp (+0/-294)
src/mattributeextensionmanager.h (+0/-171)
src/mimabstractserverlogic.cpp (+0/-52)
src/mimabstractserverlogic.h (+0/-59)
src/mimapphostedserverlogic.cpp (+0/-99)
src/mimapphostedserverlogic.h (+0/-48)
src/mimdummyinputcontext.cpp (+0/-39)
src/mimdummyinputcontext.h (+0/-40)
src/mimhwkeyboardtracker.cpp (+0/-234)
src/mimhwkeyboardtracker.h (+0/-62)
src/mimhwkeyboardtracker_p.h (+0/-65)
src/mimhwkeyboardtracker_stub.cpp (+48/-0)
src/mimonscreenplugins.cpp (+0/-247)
src/mimonscreenplugins.h (+0/-90)
src/mimpluginmanager.cpp (+0/-1790)
src/mimpluginmanager.h (+0/-197)
src/mimpluginmanager_p.h (+0/-231)
src/mimpluginsproxywidget.cpp (+0/-41)
src/mimpluginsproxywidget.h (+0/-35)
src/mimremotewindow.cpp (+0/-293)
src/mimremotewindow.h (+0/-111)
src/mimrotationanimation.cpp (+0/-497)
src/mimrotationanimation.h (+0/-178)
src/mimserver.cpp (+0/-104)
src/mimserver.h (+0/-61)
src/mimserveroptions.cpp (+0/-495)
src/mimserveroptions.h (+0/-91)
src/mimsettings.cpp (+0/-142)
src/mimsettings.h (+0/-260)
src/mimsettingsqsettings.cpp (+0/-200)
src/mimsettingsqsettings.h (+0/-78)
src/mimstandaloneserverlogic.cpp (+0/-76)
src/mimstandaloneserverlogic.h (+0/-58)
src/mimsubviewoverride.cpp (+0/-31)
src/mimsubviewoverride.h (+0/-40)
src/mimxapplication.cpp (+0/-39)
src/mimxapplication.h (+0/-30)
src/mimxerrortrap.cpp (+0/-79)
src/mimxerrortrap.h (+0/-56)
src/mimxextension.cpp (+0/-68)
src/mimxextension.h (+0/-80)
src/mimxserverlogic.cpp (+0/-263)
src/mimxserverlogic.h (+0/-103)
src/mindicatorserviceclient.cpp (+0/-27)
src/mindicatorserviceclient.h (+0/-46)
src/minputmethodhost.cpp (+0/-266)
src/minputmethodhost.h (+0/-116)
src/mpassthruwindow.cpp (+0/-238)
src/mpassthruwindow.h (+0/-74)
src/msharedattributeextensionmanager.cpp (+0/-112)
src/msharedattributeextensionmanager.h (+0/-85)
src/quick/inputmethodquick.cpp (+644/-0)
src/quick/inputmethodquick.h (+229/-0)
src/quick/inputmethodquickplugin.cpp (+84/-0)
src/quick/inputmethodquickplugin.h (+65/-0)
src/quick/keyoverridequick.cpp (+350/-0)
src/quick/keyoverridequick.h (+164/-0)
src/quick/keyoverridequick_p.h (+49/-0)
src/quick/maliitquick.h (+60/-0)
src/quickviewsurfacefactory.cpp (+0/-204)
src/quickviewsurfacefactory.h (+0/-34)
src/quickviewsurfacefactory_p.h (+0/-63)
src/quickviewsurfacegroup.cpp (+0/-56)
src/quickviewsurfacegroup.h (+0/-43)
src/src.pro (+0/-248)
src/unknownplatform.cpp (+35/-0)
src/unknownplatform.h (+33/-0)
src/waylandplatform.cpp (+222/-0)
src/waylandplatform.h (+44/-0)
src/windowdata.cpp (+29/-0)
src/windowdata.h (+39/-0)
src/windowedsurface.cpp (+0/-693)
src/windowedsurface.h (+0/-75)
src/windowedsurface_p.h (+0/-93)
src/windowedsurfacefactory_p.h (+0/-78)
src/windowedsurfacegroup.cpp (+0/-99)
src/windowedsurfacegroup.h (+0/-54)
src/windowgroup.cpp (+176/-0)
src/windowgroup.h (+78/-0)
src/xcbplatform.cpp (+129/-0)
src/xcbplatform.h (+34/-0)
tests/.gitignore (+0/-4)
tests/bbt_connection/.gitignore (+0/-1)
tests/bbt_connection/bbt_connection.cpp (+0/-299)
tests/bbt_connection/bbt_connection.h (+0/-77)
tests/bbt_connection/bbt_connection.pro (+0/-16)
tests/common_check.pri (+0/-32)
tests/common_top.pri (+0/-39)
tests/dummyimplugin/dummyimplugin.cpp (+0/-30)
tests/dummyimplugin/dummyimplugin.h (+0/-36)
tests/dummyimplugin/dummyimplugin.pro (+0/-47)
tests/dummyimplugin/dummyinputmethod.cpp (+0/-99)
tests/dummyimplugin/dummyinputmethod.h (+0/-50)
tests/dummyimplugin2/dummyimplugin2.cpp (+0/-27)
tests/dummyimplugin2/dummyimplugin2.h (+0/-30)
tests/dummyimplugin2/dummyimplugin2.pro (+0/-36)
tests/dummyimplugin3/dummyimplugin3.cpp (+0/-31)
tests/dummyimplugin3/dummyimplugin3.h (+0/-37)
tests/dummyimplugin3/dummyimplugin3.pro (+0/-43)
tests/dummyimplugin3/dummyinputmethod3.cpp (+0/-98)
tests/dummyimplugin3/dummyinputmethod3.h (+0/-52)
tests/dummyimplugins.pri (+0/-11)
tests/dummyplugin/dummyplugin.cpp (+0/-13)
tests/dummyplugin/dummyplugin.h (+0/-31)
tests/dummyplugin/dummyplugin.pro (+0/-36)
tests/ft_exampleplugin/.gitignore (+0/-1)
tests/ft_exampleplugin/ft_exampleplugin.cpp (+0/-81)
tests/ft_exampleplugin/ft_exampleplugin.h (+0/-37)
tests/ft_exampleplugin/ft_exampleplugin.pro (+0/-20)
tests/ft_mimpluginmanager/.gitignore (+0/-1)
tests/ft_mimpluginmanager/ft_mimpluginmanager.cpp (+0/-336)
tests/ft_mimpluginmanager/ft_mimpluginmanager.h (+0/-33)
tests/ft_mimpluginmanager/ft_mimpluginmanager.pro (+0/-25)
tests/qtestlib2junitxml.xsl (+0/-82)
tests/sanitychecks/.gitignore (+0/-1)
tests/sanitychecks/sanitychecks.cpp (+0/-56)
tests/sanitychecks/sanitychecks.h (+0/-46)
tests/sanitychecks/sanitychecks.pro (+0/-10)
tests/stubs/fakeproperty.cpp (+0/-46)
tests/stubs/fakeproperty.h (+0/-52)
tests/stubs/mkeyboardstatetracker_stub.h (+0/-100)
tests/tests.pro (+0/-74)
tests/ut_maliit_attributeextension/.gitignore (+0/-1)
tests/ut_maliit_attributeextension/ut_maliit_attributeextension.cpp (+0/-157)
tests/ut_maliit_attributeextension/ut_maliit_attributeextension.pro (+0/-7)
tests/ut_maliit_attributeextensionregistry/.gitignore (+0/-1)
tests/ut_maliit_attributeextensionregistry/ut_maliit_attributeextensionregistry.cpp (+0/-104)
tests/ut_maliit_attributeextensionregistry/ut_maliit_attributeextensionregistry.pro (+0/-7)
tests/ut_maliit_glib_settings/.gitignore (+0/-1)
tests/ut_maliit_glib_settings/mockmaliitserver.c (+0/-90)
tests/ut_maliit_glib_settings/mockmaliitserver.h (+0/-42)
tests/ut_maliit_glib_settings/ut_maliit_glib_settings.c (+0/-205)
tests/ut_maliit_glib_settings/ut_maliit_glib_settings.pro (+0/-12)
tests/ut_maliit_inputmethod/.gitignore (+0/-1)
tests/ut_maliit_inputmethod/ut_maliit_inputmethod.cpp (+0/-211)
tests/ut_maliit_inputmethod/ut_maliit_inputmethod.pro (+0/-9)
tests/ut_maliit_settings/.gitignore (+0/-1)
tests/ut_maliit_settings/ut_maliit_settings.cpp (+0/-218)
tests/ut_maliit_settings/ut_maliit_settings.pro (+0/-7)
tests/ut_mattributeextensionmanager/.gitignore (+0/-1)
tests/ut_mattributeextensionmanager/toolbar1.xml (+0/-51)
tests/ut_mattributeextensionmanager/toolbar2.xml (+0/-33)
tests/ut_mattributeextensionmanager/ut_mattributeextensionmanager.cpp (+0/-113)
tests/ut_mattributeextensionmanager/ut_mattributeextensionmanager.h (+0/-38)
tests/ut_mattributeextensionmanager/ut_mattributeextensionmanager.pro (+0/-20)
tests/ut_mimapplication/.gitignore (+0/-1)
tests/ut_mimapplication/ut_mimapplication.cpp (+0/-91)
tests/ut_mimapplication/ut_mimapplication.h (+0/-38)
tests/ut_mimapplication/ut_mimapplication.pro (+0/-19)
tests/ut_mimonscreenplugins/.gitignore (+0/-1)
tests/ut_mimonscreenplugins/ut_mimonscreenplugins.cpp (+0/-126)
tests/ut_mimonscreenplugins/ut_mimonscreenplugins.h (+0/-35)
tests/ut_mimonscreenplugins/ut_mimonscreenplugins.pro (+0/-11)
tests/ut_mimpluginmanager/.gitignore (+0/-1)
tests/ut_mimpluginmanager/toolbar1.xml (+0/-51)
tests/ut_mimpluginmanager/toolbar2.xml (+0/-31)
tests/ut_mimpluginmanager/ut_mimpluginmanager.cpp (+0/-950)
tests/ut_mimpluginmanager/ut_mimpluginmanager.h (+0/-68)
tests/ut_mimpluginmanager/ut_mimpluginmanager.pro (+0/-25)
tests/ut_mimpluginmanagerconfig/.gitignore (+0/-1)
tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.cpp (+0/-189)
tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.h (+0/-53)
tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.pro (+0/-23)
tests/ut_mimrotationanimation/.gitignore (+0/-1)
tests/ut_mimrotationanimation/ut_mimrotationanimation.cpp (+0/-71)
tests/ut_mimrotationanimation/ut_mimrotationanimation.h (+0/-41)
tests/ut_mimrotationanimation/ut_mimrotationanimation.pro (+0/-18)
tests/ut_mimserveroptions/.gitignore (+0/-2)
tests/ut_mimserveroptions/ut_mimserveroptions.cpp (+0/-150)
tests/ut_mimserveroptions/ut_mimserveroptions.h (+0/-43)
tests/ut_mimserveroptions/ut_mimserveroptions.pro (+0/-12)
tests/ut_mimsettings/.gitignore (+0/-1)
tests/ut_mimsettings/ut_mimsettings.cpp (+0/-237)
tests/ut_mimsettings/ut_mimsettings.h (+0/-40)
tests/ut_mimsettings/ut_mimsettings.pro (+0/-13)
tests/ut_minputcontext/.gitignore (+0/-2)
tests/ut_minputcontext/ut_minputcontext.cpp (+0/-899)
tests/ut_minputcontext/ut_minputcontext.h (+0/-185)
tests/ut_minputcontext/ut_minputcontext.pro (+0/-19)
tests/ut_minputcontextplugin/.gitignore (+0/-1)
tests/ut_minputcontextplugin/ut_minputcontextplugin.cpp (+0/-102)
tests/ut_minputcontextplugin/ut_minputcontextplugin.h (+0/-40)
tests/ut_minputcontextplugin/ut_minputcontextplugin.pro (+0/-24)
tests/ut_minputmethodquickplugin/.gitignore (+0/-2)
tests/ut_minputmethodquickplugin/ut_minputmethodquickplugin.cpp (+0/-98)
tests/ut_minputmethodquickplugin/ut_minputmethodquickplugin.h (+0/-42)
tests/ut_minputmethodquickplugin/ut_minputmethodquickplugin.pro (+0/-30)
tests/ut_mkeyoverride/.gitignore (+0/-1)
tests/ut_mkeyoverride/ut_mkeyoverride.cpp (+0/-79)
tests/ut_mkeyoverride/ut_mkeyoverride.h (+0/-28)
tests/ut_mkeyoverride/ut_mkeyoverride.pro (+0/-17)
tests/ut_passthroughserver/.gitignore (+0/-1)
tests/ut_passthroughserver/ut_passthroughserver.cpp (+0/-68)
tests/ut_passthroughserver/ut_passthroughserver.h (+0/-38)
tests/ut_passthroughserver/ut_passthroughserver.pro (+0/-16)
tests/ut_selfcompositing/.gitignore (+0/-1)
tests/ut_selfcompositing/ut_selfcompositing.cpp (+0/-53)
tests/ut_selfcompositing/ut_selfcompositing.h (+0/-44)
tests/ut_selfcompositing/ut_selfcompositing.pro (+0/-19)
tests/utils/core-utils.cpp (+0/-138)
tests/utils/core-utils.h (+0/-55)
tests/utils/gui-utils.cpp (+0/-43)
tests/utils/gui-utils.h (+0/-226)
weston-protocols/.gitignore (+4/-0)
weston-protocols/dummy.cpp (+2/-0)
weston-protocols/input-method.xml (+273/-0)
weston-protocols/libmaliit-weston-protocols.pri (+12/-0)
weston-protocols/text.xml (+346/-0)
weston-protocols/weston-protocols.pro (+27/-0)
To merge this branch: bzr merge lp:~thomas-moenicke/phablet-extras/maliit-framework-0.99-server
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+171802@code.launchpad.net

Commit message

server update

Description of the change

server update

To post a comment you must log in.
1561. By Thomas Moenicke

updated files in root dir

1562. By Thomas Moenicke

cleanup

1563. By Thomas Moenicke

cleanup

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2013-03-21 13:59:07 +0000
3+++ NEWS 2013-06-27 13:54:25 +0000
4@@ -1,7 +1,54 @@
5-{NEXT}
6+{NEXT]
7+======
8+
9+CHANGES SINCE 0.99.0
10+* Introduced Qt5 input context, replacing the one provided by Qt. Can
11+ be enabled by CONFIG+=qt5-inputcontext
12+* Allow plugin window reactive area and input method area reported to
13+ application differ
14+* Fix window state to have transient hint and window type as with
15+ Maliit 0.8x
16+
17+0.99.0
18 ======
19
20 CHANGES SINCE 0.94.0
21+* Requires Qt 5
22+* GTK+ and Qt 4 input context are moved into a separate rpository/package
23+* Do not use debug config for unit tests
24+* Do not abort if there are no plugins.
25+* Improvements for QML plugins
26+ - Notify qml keyboard when editor target focus changes
27+ - Expose editor state better to QML input methods
28+ - Replace correctionEnabled with predictionEnabled in qml interface
29+ - Enhanced QML interface event sending
30+* Use QScreen::availableSize to calculate screenSize
31+* Add window group class managing plugins' QWindows
32+ - Replaces surface abstraction
33+* Remove CONFIG options
34+ - disable-background-translucency
35+ - disable-dbus
36+ - enable-qdbus
37+ - noqml
38+* Remove MIndicatorServiceClient
39+* Use QDBus instead of glib-dbus
40+* Remove unused code
41+* Update Wayland support to latest protocol changes
42+* Add support for input region also on wayland
43+* Add a proper Platform class
44+* Remove unneeded plugin factories
45+
46+BUG FIXES
47+* Fix some quick input method docs a bit.
48+* Fix build when building without CONFIG+=wayland
49+* Fix build with CONFIG+=wayland.
50+* Fix unused parameter warning.
51+* Fix minputmethodquickplugin test for Qt 5
52+* Fix private include and use QT+=gui-private
53+* Fix some QDBus issues.
54+* Fix plugins windows are never added to WindowGroup
55+* Fix showing of nemo-keyboard
56+* Fix qdbus interface and adaptor generation
57
58 0.94.0
59 ======
60@@ -21,13 +68,39 @@
61 * Remove SDK
62 - It was pretty much unmaintained.
63
64+0.93.1
65+======
66+
67+CHANGES SINCE 0.93.0
68+* Use QtQtuick2 when compiling against Qt5
69+ - Only affects QML plugins such as Nemo Keyboard.
70+
71+BUG FIXES
72+* Fixes: MALIIT#194 - Maliit can not input when QML viewer is set to full
73+ screen on QWS without x11
74+* Fixes: MALIIT#197 - Read initial SW_TABLET_MODE state correctly
75+* Fix qmake warnings about using CONFIG+=qdbus
76+* Fix qmake warnings about using deprecated IN_PWD variables
77+
78+0.93.0
79+======
80+
81 CHANGES SINCE 0.92.5
82-* Fix the build when disabling GTK+ support
83 * Monitor SW_TABLET_MODE to determine hardware keyboard presence
84 - A new, default implementation for MImHwKeyboardTracker: we look for a
85 readable evdev device which has a SW_TABLET_MODE switch. If found, we use
86 that device for determining the presence/availability of the hardware
87 keyboard.
88+* Allow QML plugins to send key events:
89+ - Use MInputMethodQuick.sendKey()
90+
91+BUG FIXES
92+* Fix focus handling for Qt5
93+* Fix the build when disabling GTK+ support
94+* Fix QML plugin loading for Qt5
95+* Fix "fullscreen" surfaces (required by QtQuick still):
96+ - Events can be passed through to application again even if input method with
97+ a semi-translucent "fullscreen" surface is shown.
98
99 0.92.5
100 ======
101
102=== modified file 'README'
103--- README 2012-02-29 14:10:25 +0000
104+++ README 2013-06-27 13:54:25 +0000
105@@ -12,7 +12,7 @@
106
107 Installing
108
109-Qt 4.7 must be installed to build the Maliit framework. At a terminal, run:
110+Qt5 must be installed to build the Maliit framework. At a terminal, run:
111
112 qmake
113 make
114@@ -30,7 +30,7 @@
115
116 Start the server:
117
118-maliit-server -software -bypass-wm-hint
119+maliit-server
120
121 Note that a compositing window manager and a D-Bus session bus are required to
122 use Maliit.
123
124=== modified file 'VERSION'
125--- VERSION 2013-03-21 13:59:07 +0000
126+++ VERSION 2013-06-27 13:54:25 +0000
127@@ -1,1 +1,1 @@
128-0.94.0
129+0.99.0
130
131=== modified file 'common/maliit/namespace.h'
132--- common/maliit/namespace.h 2012-07-10 09:00:33 +0000
133+++ common/maliit/namespace.h 2013-06-27 13:54:25 +0000
134@@ -21,25 +21,13 @@
135 //! \ingroup common
136 namespace Maliit {
137 /*!
138- * \brief Orientation angle of windows in the application.
139- *
140- * \sa Orientation
141- */
142- enum OrientationAngle {
143- Angle0 = 0,
144- Angle90 = 90,
145- Angle180 = 180,
146- Angle270 = 270
147- };
148-
149- /*!
150- * \brief Possible orientations of windows in the application.
151- *
152- * \sa OrientationAngle
153- */
154- enum Orientation {
155- Portrait, //!< equal to either Maliit::Angle90 or Maliit::Angle270 orientation angles
156- Landscape //!< equal to either Maliit::Angle0 or Maliit::Angle180 orientation angles
157+ * \brief Position of the window on the screen.
158+ */
159+ enum Position {
160+ PositionOverlay,
161+ PositionCenterBottom,
162+ PositionLeftBottom,
163+ PositionRightBottom,
164 };
165
166 /*!
167@@ -70,63 +58,6 @@
168 CustomContentType
169 };
170
171- //! \brief Type of toolbar widget
172- enum ItemType {
173- //! Undefined item type
174- ItemUndefined,
175-
176- //! Item should be visualized as button
177- ItemButton,
178-
179- //! Item should be visualized as label
180- ItemLabel
181- };
182-
183- //! \brief Type of visible premiss for toolbar button
184- enum VisibleType {
185- //! Item's visibility will not be changed automatically
186- VisibleUndefined,
187-
188- //! Item's visibility depends on text selection
189- VisibleWhenSelectingText,
190-
191- //! Item is always visible
192- VisibleAlways
193- };
194-
195- //! \brief Type of action
196- enum ActionType {
197- //! Do nothing
198- ActionUndefined,
199-
200- //! Send key sequence like Ctrl+D
201- ActionSendKeySequence,
202-
203- //! Send string
204- ActionSendString,
205-
206- //! Send command (not implemented yet)
207- ActionSendCommand,
208-
209- //! Copy selected text
210- ActionCopy,
211-
212- //! Paste text from clipboard
213- ActionPaste,
214-
215- //! Show some group of items
216- ActionShowGroup,
217-
218- //! Hide some group of items
219- ActionHideGroup,
220-
221- //! Close virtual keyboard
222- ActionClose,
223-
224- //! Standard copy/paste button
225- ActionCopyPaste
226- };
227-
228 /*!
229 * \brief State of Copy/Paste button.
230 */
231@@ -171,43 +102,6 @@
232 EventRequestEventOnly //!< Only a Qt::KeyEvent
233 };
234
235- /*!
236- * \brief Possible values for all the modes that are shown in the Input
237- * mode indicator.
238- */
239- enum InputModeIndicator {
240- NoIndicator, //!< No indicator should be shown
241- LatinLowerIndicator, //!< Latin lower case mode
242- LatinUpperIndicator, //!< Latin upper case mode
243- LatinLockedIndicator, //!< Latin caps locked mode
244- CyrillicLowerIndicator, //!< Cyrillic lower case mode
245- CyrillicUpperIndicator, //!< Cyrillic upper case mode
246- CyrillicLockedIndicator, //!< Cyrillic caps locked mode
247- ArabicIndicator, //!< Arabic mode
248- PinyinIndicator, //!< Pinyin mode
249- ZhuyinIndicator, //!< Zhuyin mode
250- CangjieIndicator, //!< Cangjie mode
251- NumAndSymLatchedIndicator, //!< Number and Symbol latched mode
252- NumAndSymLockedIndicator, //!< Number and Symbol locked mode
253- DeadKeyAcuteIndicator, //!< Dead key acute mode
254- DeadKeyCaronIndicator, //!< Dead key caron mode
255- DeadKeyCircumflexIndicator, //!< Dead key circumflex mode
256- DeadKeyDiaeresisIndicator, //!< Dead key diaeresis mode
257- DeadKeyGraveIndicator, //!< Dead key grave mode
258- DeadKeyTildeIndicator //!< Dead key tilde mode
259- };
260-
261- enum InputMethodMode {
262- //! Normal mode allows to use preedit and error correction
263- InputMethodModeNormal,
264-
265- //! Virtual keyboard sends QKeyEvent for every key press or release
266- InputMethodModeDirect,
267-
268- //! Used with proxy widget
269- InputMethodModeProxy
270- };
271-
272 /*!
273 * \brief The text format for part of the preedit string, specified by
274 * start and length.
275@@ -228,21 +122,6 @@
276 {};
277 };
278
279- /*! \brief Extensions for Qt::inputMethodQuery
280- * \note the inputMethodQuery interface may change or be removed in Qt 5!
281- */
282- enum InputMethodQueryExtensions {
283- VisualizationPriorityQuery = 10001, //!< Tells if input method widget wants to have high
284- //!< priority for visualization. Input method should
285- //!< honor this and stay out of widgets space.
286- PreeditRectangleQuery, //!< Retrieve bounding rectangle for current preedit text.
287- ImCorrectionEnabledQuery, //!< Explicit correction enabling for text entries.
288- ImModeQuery, //!< Retrieve mode: normal, direct or proxy.
289- InputMethodAttributeExtensionIdQuery, //!< Attribute extension identifier for text entry.
290- InputMethodAttributeExtensionQuery, //!< Attribute extension file name for text entry.
291- WesternNumericInputEnforcedQuery //!< Overrides localized numeric input with western numeric input.
292- };
293-
294 namespace InputMethodQuery
295 {
296 //! Name of property which tells whether correction is enabled.
297@@ -294,10 +173,7 @@
298 }
299
300 Q_DECLARE_METATYPE(Maliit::TextContentType)
301-Q_DECLARE_METATYPE(Maliit::Orientation)
302-Q_DECLARE_METATYPE(Maliit::OrientationAngle)
303-Q_DECLARE_METATYPE(Maliit::InputMethodMode)
304-Q_DECLARE_METATYPE(Maliit::InputMethodQueryExtensions)
305+Q_DECLARE_METATYPE(Maliit::PreeditTextFormat)
306 Q_DECLARE_METATYPE(QList<Maliit::PreeditTextFormat>)
307
308 #endif
309
310=== modified file 'config.pri'
311--- config.pri 2013-03-21 13:59:07 +0000
312+++ config.pri 2013-06-27 13:54:25 +0000
313@@ -1,11 +1,5 @@
314-MALIIT_VERSION = $$system(cat $$IN_PWD/VERSION)
315+MALIIT_VERSION = $$system(cat $$PWD/VERSION)
316
317-MALIIT_INTERFACE_VERSION = 1.0
318-MALIIT_PLUGINS_INTERFACE_VERSION = 1.0
319-MALIIT_PLUGINS_QUICK_INTERFACE_VERSION = 0.80
320-MALIIT_FRAMEWORK_INTERFACE_VERSION = 0.80
321-MALIIT_CONNECTION_INTERFACE_VERSION = 0.80
322-MALIIT_SERVER_INTERFACE_VERSION = 0.80
323 MALIIT_ABI_VERSION = $$MALIIT_VERSION
324
325 # For libmaliit
326@@ -13,19 +7,14 @@
327 MALIIT_SETTINGS_LIB = maliit-settings
328 MALIIT_HEADER = maliit
329 MALIIT_FRAMEWORK_HEADER = maliit/framework
330-# For libmaliit-glib
331-MALIIT_CONNECTION_GLIB_LIB = maliit-connection-glib
332-MALIIT_GLIB_LIB = maliit-glib
333
334 include(defines.pri)
335
336 # Linker optimization for release build
337 QMAKE_LFLAGS_RELEASE+=-Wl,--as-needed
338 # Compiler warnings are error if the build type is debug
339-#QMAKE_CXXFLAGS_DEBUG+=-Werror -O0
340-QMAKE_CXXFLAGS_DEBUG+= -O0
341-#QMAKE_CFLAGS_DEBUG+=-Werror -O0
342-QMAKE_CFLAGS_DEBUG+=-O0
343+QMAKE_CXXFLAGS_DEBUG+=-Werror -O0
344+QMAKE_CFLAGS_DEBUG+=-Werror -O0
345
346 OBJECTS_DIR = .obj
347 MOC_DIR = .moc
348@@ -145,19 +134,12 @@
349 CONFIG += qws
350 }
351
352-# Use x11 on unix systems without lighthouse (qpa) or QWS (qws)
353-unix:!qpa:!qws {
354- CONFIG += x11
355+wayland {
356+ DEFINES += HAVE_WAYLAND
357 }
358
359-contains(QT_MAJOR_VERSION, 4) {
360- QT_WIDGETS = gui
361-} else {
362- QT_WIDGETS = gui widgets
363-
364- wayland {
365- DEFINES += HAVE_WAYLAND
366- }
367+noxcb {
368+ DEFINES += NOXCB
369 }
370
371 MALIIT_INSTALL_PRF = $$[QT_INSTALL_DATA]/mkspecs/features
372@@ -174,7 +156,7 @@
373 return(false)
374 }
375
376- MALIIT_IN_DIR = $$IN_PWD
377+ MALIIT_IN_DIR = $$PWD
378 MALIIT_OUT_DIR = $$OUT_PWD
379
380 variables = MALIIT_FRAMEWORK_FEATURE \
381@@ -209,11 +191,9 @@
382 MALIIT_PACKAGE_BRIEF \
383 MALIIT_FRAMEWORK_HEADER \
384 MALIIT_SERVER_ARGUMENTS \
385- MALIIT_CONNECTION_HEADER \
386 MALIIT_CONNECTION_LIB \
387 MALIIT_SERVER_HEADER \
388 MALIIT_ABI_VERSION_MAJOR \
389- MALIIT_GLIB_LIB \
390
391 command = "sed"
392 for(var, variables) {
393
394=== removed directory 'connection-glib'
395=== removed file 'connection-glib/.gitignore'
396--- connection-glib/.gitignore 2012-05-22 06:12:09 +0000
397+++ connection-glib/.gitignore 1970-01-01 00:00:00 +0000
398@@ -1,2 +0,0 @@
399-*-glue.h
400-maliitmarshalers.*
401
402=== removed file 'connection-glib/connection-glib.pro'
403--- connection-glib/connection-glib.pro 2012-11-16 14:29:44 +0000
404+++ connection-glib/connection-glib.pro 1970-01-01 00:00:00 +0000
405@@ -1,98 +0,0 @@
406-TOP_DIR = ..
407-
408-include($$TOP_DIR/config.pri)
409-
410-TEMPLATE = lib
411-TARGET = $$TOP_DIR/lib/$$MALIIT_CONNECTION_GLIB_LIB
412-CONFIG += staticlib
413-
414-CONFIG += link_pkgconfig
415-
416-PKGCONFIG += glib-2.0 gthread-2.0 dbus-glib-1
417-
418-system(pkg-config gio-2.0 --atleast-version 2.26) {
419- DEFINES += MALIIT_USE_GIO_API
420- PKGCONFIG += gio-2.0
421-}
422-
423-debug{
424- DEFINES += ENABLE_DEBUG
425-}
426-
427-!enable-dbus-activation {
428- DEFINES += NO_DBUS_ACTIVATION
429-}
430-
431-DEFINES += G_LOG_DOMAIN=\\\"Maliit\\\"
432-
433-# Generated dbus glue code has warnings of this type, so disable them
434-QMAKE_CFLAGS_DEBUG += -Wno-unused-parameter
435-QMAKE_CFLAGS_RELEASE += -Wno-unused-parameter
436-
437-HEADERS += \
438- meego-im-proxy.h \
439- meego-imcontext-dbus.h \
440- meego-im-connector.h \
441- qt-keysym-map.h \
442- debug.h \
443- meego-imcontext-dbus-private.h \
444- meego-im-connector-private.h \
445-
446-SOURCES += \
447- meego-im-proxy.c \
448- meego-imcontext-dbus.c \
449- meego-im-connector.c \
450- qt-keysym-map.cpp \
451- debug.c \
452-
453-include($$TOP_DIR/dbus_interfaces/dbus_interfaces.pri)
454-
455-# improxy
456-# Generate dbus glue
457-QMAKE_EXTRA_TARGETS += dbus_glue_improxy
458-dbus_glue_improxy.target = $$OUT_PWD/meego-im-proxy-glue.h
459-dbus_glue_improxy.output = $$OUT_PWD/meego-im-proxy-glue.h
460-dbus_glue_improxy.depends = $$DBUS_SERVER_XML
461-dbus_glue_improxy.commands = \
462- dbus-binding-tool --prefix=meego_im_proxy --mode=glib-client \
463- --output=$$OUT_PWD/meego-im-proxy-glue.h \
464- $$DBUS_SERVER_XML
465-
466-# Use to work around the fact that qmake looks up the target for the generated header wrong
467-QMAKE_EXTRA_TARGETS += fake_dbus_glue_improxy
468-fake_dbus_glue_improxy.target = meego-im-proxy-glue.h
469-fake_dbus_glue_improxy.depends = dbus_glue_improxy
470-
471-# imcontext
472-# Generate dbus glue
473-QMAKE_EXTRA_TARGETS += dbus_glue_imcontext
474-dbus_glue_imcontext.target = $$OUT_PWD/meego-imcontext-dbus-glue.h
475-dbus_glue_imcontext.output = $$OUT_PWD/meego-imcontext-dbus-glue.h
476-dbus_glue_imcontext.depends = $$DBUS_CONTEXT_XML
477-dbus_glue_imcontext.commands = \
478- dbus-binding-tool --prefix=meego_imcontext_dbus --mode=glib-server \
479- --output=$$OUT_PWD/meego-imcontext-dbus-glue.h \
480- $$DBUS_CONTEXT_XML
481-
482-# Use to work around the fact that qmake looks up the target for the generated header wrong
483-QMAKE_EXTRA_TARGETS += fake_dbus_glue_imcontext
484-fake_dbus_glue_imcontext.target = meego-imcontext-dbus-glue.h
485-fake_dbus_glue_imcontext.depends = dbus_glue_imcontext
486-
487-GLIB_GENMARSHAL_LIST += maliitmarshalers.list
488-
489-OTHER_FILES += maliitmarshalers.list
490-
491-glib_genmarshal_header.name = glib-genmarshal header ${QMAKE_FILE_IN}
492-glib_genmarshal_header.commands = glib-genmarshal --prefix=_maliit_marshal --header --g-fatal-warnings ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
493-glib_genmarshal_header.output = ${QMAKE_FILE_IN_BASE}.h
494-glib_genmarshal_header.variable_out = HEADERS
495-glib_genmarshal_header.input = GLIB_GENMARSHAL_LIST
496-
497-glib_genmarshal_source.name = glib-genmarshal source ${QMAKE_FILE_IN}
498-glib_genmarshal_source.commands = glib-genmarshal --prefix=_maliit_marshal --body --g-fatal-warnings ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
499-glib_genmarshal_source.output = ${QMAKE_FILE_IN_BASE}.c
500-glib_genmarshal_source.variable_out = SOURCES
501-glib_genmarshal_source.input = GLIB_GENMARSHAL_LIST
502-
503-QMAKE_EXTRA_COMPILERS += glib_genmarshal_header glib_genmarshal_source
504
505=== removed file 'connection-glib/debug.c'
506--- connection-glib/debug.c 2012-09-17 14:41:52 +0000
507+++ connection-glib/debug.c 1970-01-01 00:00:00 +0000
508@@ -1,21 +0,0 @@
509-#include "debug.h"
510-
511-#include <string.h>
512-
513-gboolean
514-maliit_is_debug_enabled(void)
515-{
516- static gint debug_enabled = -1;
517-
518- if (debug_enabled == -1) {
519- const char *enabled_debug_var = g_getenv("MALIIT_DEBUG");
520- if (enabled_debug_var && strlen(enabled_debug_var) > 0
521- && strcmp(enabled_debug_var, "0") != 0) {
522- debug_enabled = 1;
523- } else {
524- debug_enabled = 0;
525- }
526- }
527-
528- return debug_enabled == 1;
529-}
530
531=== removed file 'connection-glib/debug.h'
532--- connection-glib/debug.h 2012-05-22 06:12:09 +0000
533+++ connection-glib/debug.h 1970-01-01 00:00:00 +0000
534@@ -1,18 +0,0 @@
535-#ifndef _DEBUG_H
536-#define _DEBUG_H
537-
538-#include <glib.h>
539-
540-G_BEGIN_DECLS
541-
542-gboolean maliit_is_debug_enabled(void);
543-
544-#define DBG(x, a...) if (maliit_is_debug_enabled()) { g_debug("%s: " x, __FUNCTION__, ##a); }
545-
546-#define STEP() DBG("")
547-
548-#define UNUSED(v) (void)v;
549-
550-G_END_DECLS
551-
552-#endif // _DEBUG_H
553
554=== removed file 'connection-glib/libmaliit-connection-glib.pri'
555--- connection-glib/libmaliit-connection-glib.pri 2012-07-16 20:24:30 +0000
556+++ connection-glib/libmaliit-connection-glib.pri 1970-01-01 00:00:00 +0000
557@@ -1,12 +0,0 @@
558-# Use when a .pro file requires libmaliit-connection-glib
559-# The .pro file must define TOP_DIR to be a relative path
560-# to the top-level source/build directory, and include config.pri
561-
562-LIBS += $$TOP_DIR/lib/$$maliitStaticLib($${MALIIT_CONNECTION_GLIB_LIB})
563-POST_TARGETDEPS += $$TOP_DIR/lib/$$maliitStaticLib($${MALIIT_CONNECTION_GLIB_LIB})
564-INCLUDEPATH += $$TOP_DIR/connection-glib
565-PKGCONFIG += glib-2.0
566-
567-system(pkg-config gio-2.0 --atleast-version 2.26) {
568- PKGCONFIG += gio-2.0
569-}
570
571=== removed file 'connection-glib/maliitmarshalers.list'
572--- connection-glib/maliitmarshalers.list 2012-08-06 12:48:36 +0000
573+++ connection-glib/maliitmarshalers.list 1970-01-01 00:00:00 +0000
574@@ -1,9 +0,0 @@
575-VOID:STRING,BOXED,INT,INT,INT
576-VOID:STRING,INT,INT,INT
577-VOID:INT,INT,INT,STRING,BOOLEAN,INT
578-BOXED:VOID
579-VOID:INT,INT
580-VOID:INT,INT,INT,INT
581-STRING:VOID
582-VOID:INT,STRING,STRING,STRING,VARIANT
583-VOID:STRING,STRING
584
585=== removed file 'connection-glib/meego-im-connector-private.h'
586--- connection-glib/meego-im-connector-private.h 2012-07-13 19:00:44 +0000
587+++ connection-glib/meego-im-connector-private.h 1970-01-01 00:00:00 +0000
588@@ -1,25 +0,0 @@
589-/* This file is part of Maliit framework
590- *
591- * Copyright (C) 2012 Openismus GmbH
592- *
593- * Contact: maliit-discuss@lists.maliit.org
594- *
595- * This library is free software; you can redistribute it and/or
596- * modify it under the terms of the GNU Lesser General Public
597- * License as published by the Free Software Foundation; either
598- * version 2.1 of the licence, or (at your option) any later version.
599- *
600- * This library is distributed in the hope that it will be useful,
601- * but WITHOUT ANY WARRANTY; without even the implied warranty of
602- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
603- * Lesser General Public License for more details.
604- *
605- * You should have received a copy of the GNU Lesser General Public
606- * License along with this library; if not, write to the
607- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
608- * Boston, MA 02111-1307, USA.
609- */
610-
611-MeegoImConnector *meego_im_connector_new();
612-void meego_im_connector_free(MeegoImConnector *self);
613-void meego_im_connector_set_singleton(MeegoImConnector *self);
614
615=== removed file 'connection-glib/meego-im-connector.c'
616--- connection-glib/meego-im-connector.c 2012-08-06 12:48:49 +0000
617+++ connection-glib/meego-im-connector.c 1970-01-01 00:00:00 +0000
618@@ -1,260 +0,0 @@
619-/* * This file is part of Maliit framework *
620- *
621- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
622- * All rights reserved.
623- *
624- * Contact: maliit-discuss@lists.maliit.org
625- *
626- * This library is free software; you can redistribute it and/or
627- * modify it under the terms of the GNU Lesser General Public
628- * License version 2.1 as published by the Free Software Foundation
629- * and appearing in the file LICENSE.LGPL included in the packaging
630- * of this file.
631- */
632-
633-#include "meego-im-connector.h"
634-#include "debug.h"
635-
636-#include <glib.h>
637-#include <gio/gio.h>
638-
639-#include <dbus/dbus.h>
640-#include <dbus/dbus-glib.h>
641-#include <dbus/dbus-glib-lowlevel.h>
642-
643-#define MALIIT_SERVER_NAME "org.maliit.server"
644-#define MALIIT_SERVER_OBJECT_PATH "/org/maliit/server/address"
645-#define MALIIT_SERVER_INTERFACE "org.maliit.Server.Address"
646-#define MALIIT_SERVER_ADDRESS_PROPERTY "address"
647-
648-#ifndef MALIIT_USE_GIO_API
649-#define DBUS_PROPERTIES_INTERFACE "org.freedesktop.DBus.Properties"
650-#define DBUS_PROPERTIES_GET_METHOD "Get"
651-#endif
652-
653-#define MALIIT_SERVER_ADDRESS_ENV "MALIIT_SERVER_ADDRESS"
654-
655-/* For glib < 2.30 */
656-#ifndef G_VALUE_INIT
657-#define G_VALUE_INIT { 0, { { 0 } } }
658-#endif
659-
660-struct _MeegoImConnectorPrivate {
661- DBusGConnection *connection;
662-};
663-
664-MeegoImConnector *meego_im_connector_new();
665-
666-static gboolean
667-try_reconnect(MeegoImConnector *connector)
668-{
669- if (connector->try_reconnect) {
670- meego_im_connector_run(connector);
671- }
672- return FALSE; // _run is responsible for setting up a new timeout if needed
673-}
674-
675-
676-static void
677-connection_dropped(gpointer instance, MeegoImConnector *connector)
678-{
679- if (connector->priv->connection) {
680- dbus_g_connection_unref(connector->priv->connection);
681- }
682- try_reconnect(connector);
683-}
684-
685-#ifdef MALIIT_USE_GIO_API
686-static char *
687-get_dbus_address()
688-{
689- const char *overridden_address = g_getenv(MALIIT_SERVER_ADDRESS_ENV);
690-
691- if (overridden_address && *overridden_address) {
692- return g_strdup(overridden_address);
693- }
694-
695- GDBusProxyFlags flags = G_DBUS_PROXY_FLAGS_NONE;
696-
697-#if defined(NO_DBUS_ACTIVATION)
698- flags = G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START;
699-#endif
700-
701- GDBusProxy *proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SESSION,
702- flags,
703- 0,
704- MALIIT_SERVER_NAME,
705- MALIIT_SERVER_OBJECT_PATH,
706- MALIIT_SERVER_INTERFACE,
707- 0, 0);
708-
709-
710- if (!proxy)
711- return 0;
712-
713- GVariant *variant = g_dbus_proxy_get_cached_property(proxy, MALIIT_SERVER_ADDRESS_PROPERTY);
714-
715- if (!variant) {
716- g_object_unref(proxy);
717- return 0;
718- }
719-
720- char* address = g_strdup(g_variant_get_string(variant, 0));
721-
722- g_variant_unref(variant);
723- g_object_unref(proxy);
724-
725- return address;
726-}
727-
728-#else
729-static char *
730-get_dbus_address()
731-{
732- const char *overridden_address = g_getenv(MALIIT_SERVER_ADDRESS_ENV);
733-
734- if (overridden_address && *overridden_address) {
735- return g_strdup(overridden_address);
736- }
737-
738- GValue value = G_VALUE_INIT;
739- GError *error = NULL;
740- DBusGConnection *connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
741-
742- if (!connection) {
743- DBG("%s: %s", __PRETTY_FUNCTION__, error->message);
744- g_error_free(error);
745- return NULL;
746- }
747-
748- DBusGProxy *proxy = dbus_g_proxy_new_for_name(connection,
749- MALIIT_SERVER_NAME,
750- MALIIT_SERVER_OBJECT_PATH,
751- DBUS_PROPERTIES_INTERFACE);
752-
753- if (!dbus_g_proxy_call(proxy,
754- DBUS_PROPERTIES_GET_METHOD,
755- &error,
756- G_TYPE_STRING, MALIIT_SERVER_INTERFACE,
757- G_TYPE_STRING, MALIIT_SERVER_ADDRESS_PROPERTY,
758- G_TYPE_INVALID,
759- G_TYPE_VALUE, &value, G_TYPE_INVALID)) {
760-
761- DBG("%s: %s", __PRETTY_FUNCTION__, error->message);
762- g_error_free(error);
763- return NULL;
764- }
765-
766- gchar *result = g_value_dup_string(&value);
767- g_value_unset(&value);
768- g_object_unref(proxy);
769-
770- return result;
771-}
772-#endif
773-
774-/**
775- * MeegoImConnector:
776- *
777- * Connects and maintains the DBusConnection, and the objects
778- * that depend on it. Makes sure that MeegoIMProxy and MeegoIMDbusObj
779- * has the correct DBusConnection by calling _connect on them when
780- * the connection has changed.
781- *
782- * MeegoIMProxy is responsible for letting the connector know that the
783- * connection was dropped by emitting the "connection-dropped signal".
784- */
785-MeegoImConnector *
786-meego_im_connector_new()
787-{
788- MeegoImConnector *self = g_new(MeegoImConnector, 1);
789- self->priv = g_new(MeegoImConnectorPrivate, 1);
790-
791- self->priv->connection = NULL;
792- self->dbusobj = meego_imcontext_dbusobj_new();
793- self->proxy = meego_im_proxy_new();
794- self->try_reconnect = TRUE;
795-
796- g_signal_connect(self->proxy, "connection-dropped",
797- G_CALLBACK(connection_dropped), (gpointer)self);
798-
799- return self;
800-}
801-
802-void
803-meego_im_connector_free(MeegoImConnector *self)
804-{
805- if (self->priv->connection) {
806- dbus_g_connection_unref(self->priv->connection);
807- }
808- g_object_unref(self->dbusobj);
809- g_object_unref(self->proxy);
810-
811- g_free(self->priv);
812- g_free(self);
813-}
814-
815-
816-static MeegoImConnector *meego_im_connector_singleton = NULL;
817-
818-void
819-meego_im_connector_set_singleton(MeegoImConnector *self)
820-{
821- meego_im_connector_singleton = self;
822-}
823-
824-MeegoImConnector *
825-meego_im_connector_get_singleton()
826-{
827- MeegoImConnector *connector = meego_im_connector_singleton;
828- if (!connector) {
829- connector = meego_im_connector_new();
830- meego_im_connector_set_singleton(connector);
831- meego_im_connector_run(connector);
832- }
833- return connector;
834-}
835-
836-void
837-meego_im_connector_run(MeegoImConnector *self)
838-{
839- DBusGConnection *connection = NULL;
840- DBusConnection *dbus_connection;
841- DBusError error;
842- char *address = NULL;
843-
844- g_return_if_fail(self != NULL);
845-
846- address = get_dbus_address();
847- if (!address) {
848- DBG("Couldn't connect to Maliit server. Retrying...");
849-
850- g_timeout_add_seconds(2, (GSourceFunc)try_reconnect, self);
851- return;
852- }
853-
854- dbus_error_init(&error);
855-
856- // Input contexts should not share the connection to the maliit server with
857- // each other (even not when they are in the same application). Therefore,
858- // use private connection for IC to server connection.
859- dbus_connection = dbus_connection_open_private(address, &error);
860- g_free(address);
861-
862- if (!dbus_connection) {
863- DBG("Couldn't connect to Maliit server: %s. Retrying...", error.message);
864-
865- dbus_error_free(&error);
866-
867- g_timeout_add_seconds(2, (GSourceFunc)try_reconnect, self);
868- return;
869- }
870-
871- dbus_connection_setup_with_g_main(dbus_connection, NULL);
872- connection = dbus_connection_get_g_connection(dbus_connection);
873-
874- self->priv->connection = connection;
875-
876- meego_im_proxy_connect(self->proxy, (gpointer)self->priv->connection);
877- meego_imcontext_dbusobj_connect(self->dbusobj, (gpointer)self->priv->connection);
878-}
879
880=== removed file 'connection-glib/meego-im-connector.h'
881--- connection-glib/meego-im-connector.h 2012-07-13 19:00:44 +0000
882+++ connection-glib/meego-im-connector.h 1970-01-01 00:00:00 +0000
883@@ -1,28 +0,0 @@
884-/* * This file is part of Maliit framework *
885- *
886- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
887- * All rights reserved.
888- *
889- * Contact: maliit-discuss@lists.maliit.org
890- *
891- * This library is free software; you can redistribute it and/or
892- * modify it under the terms of the GNU Lesser General Public
893- * License version 2.1 as published by the Free Software Foundation
894- * and appearing in the file LICENSE.LGPL included in the packaging
895- * of this file.
896- */
897-
898-#include "meego-im-proxy.h"
899-#include "meego-imcontext-dbus.h"
900-
901-typedef struct _MeegoImConnectorPrivate MeegoImConnectorPrivate;
902-
903-typedef struct {
904- MeegoIMProxy *proxy;
905- MeegoIMContextDbusObj *dbusobj;
906- MeegoImConnectorPrivate *priv;
907- gboolean try_reconnect;
908-} MeegoImConnector;
909-
910-void meego_im_connector_run(MeegoImConnector *self);
911-MeegoImConnector *meego_im_connector_get_singleton();
912
913=== removed file 'connection-glib/meego-im-proxy.c'
914--- connection-glib/meego-im-proxy.c 2012-08-06 12:48:36 +0000
915+++ connection-glib/meego-im-proxy.c 1970-01-01 00:00:00 +0000
916@@ -1,468 +0,0 @@
917-/*
918- * Copyright (C) 2010, Intel Corporation.
919- *
920- * Author: Raymond Liu <raymond.liu@intel.com>
921- *
922- *
923- * This library is free software; you can redistribute it and/or
924- * modify it under the terms of the GNU Lesser General Public License
925- * version 2.1 as published by the Free Software Foundation.
926- *
927- * This library is distributed in the hope that it will be useful, but
928- * WITHOUT ANY WARRANTY; without even the implied warranty of
929- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
930- * Lesser General Public License for more details.
931- *
932- * You should have received a copy of the GNU Lesser General Public
933- * License along with this library; if not, write to the Free Software
934- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
935- * 02110-1301 USA
936- */
937-
938-#include <string.h>
939-
940-#include "meego-im-proxy.h"
941-#include "meego-im-proxy-glue.h"
942-#include "maliitmarshalers.h"
943-#include "debug.h"
944-
945-#include <dbus/dbus-glib.h>
946-G_DEFINE_TYPE(MeegoIMProxy, meego_im_proxy, G_TYPE_OBJECT);
947-
948-#define MEEGO_IM_OBJECT_PATH "/com/meego/inputmethod/uiserver1"
949-#define MEEGO_IM_SERVICE_INTERFACE "com.meego.inputmethod.uiserver1"
950-
951-static void meego_im_proxy_finalize(GObject *object);
952-static void meego_im_proxy_class_init(MeegoIMProxyClass *klass);
953-static void meego_im_proxy_init(MeegoIMProxy *meego_im_proxy);
954-
955-enum {
956- SIGNAL_CONNECTION_DROPPED = 0,
957- SIGNAL_CONNECTION_ESTABLISHED,
958- SIGNAL_INVOKE_ACTION,
959- N_SIGNALS
960-};
961-
962-static guint meego_im_proxy_signals[N_SIGNALS];
963-
964-/* Private struct */
965-struct _MeegoImProxyPrivate {
966- DBusGProxy *dbusproxy;
967-};
968-
969-static void
970-handle_disconnect(gpointer instance, MeegoIMProxy *im_proxy)
971-{
972- g_return_if_fail(im_proxy);
973-
974- im_proxy->priv->dbusproxy = NULL;
975- g_signal_emit(im_proxy, meego_im_proxy_signals[SIGNAL_CONNECTION_DROPPED], 0, NULL);
976-
977-}
978-
979-static void
980-handle_invoke_action(gpointer instance, const char *action, const char *sequence, MeegoIMProxy *im_proxy)
981-{
982- g_signal_emit(im_proxy, meego_im_proxy_signals[SIGNAL_INVOKE_ACTION], 0, action, sequence);
983-}
984-
985-MeegoIMProxy *
986-meego_im_proxy_new(void)
987-{
988- return g_object_new(MEEGO_TYPE_IM_PROXY, NULL);
989-}
990-
991-
992-static void
993-meego_im_proxy_finalize(GObject *object)
994-{
995- G_OBJECT_CLASS(meego_im_proxy_parent_class)->finalize(object);
996-}
997-
998-
999-static void
1000-meego_im_proxy_class_init(MeegoIMProxyClass *klass)
1001-{
1002- GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
1003-
1004- gobject_class->finalize = meego_im_proxy_finalize;
1005-
1006- meego_im_proxy_signals[SIGNAL_CONNECTION_DROPPED] =
1007- g_signal_new("connection-dropped", G_TYPE_FROM_CLASS(klass),
1008- 0, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
1009-
1010- meego_im_proxy_signals[SIGNAL_CONNECTION_ESTABLISHED] =
1011- g_signal_new("connection-established", G_TYPE_FROM_CLASS(klass),
1012- 0, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
1013-
1014- meego_im_proxy_signals[SIGNAL_INVOKE_ACTION] =
1015- g_signal_new("invoke-action", G_TYPE_FROM_CLASS(klass),
1016- 0, 0, NULL, NULL, _maliit_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
1017-
1018- g_type_class_add_private(klass, sizeof(MeegoImProxyPrivate));
1019-}
1020-
1021-static void
1022-meego_im_proxy_init(MeegoIMProxy *self)
1023-{
1024- MeegoImProxyPrivate *priv = G_TYPE_INSTANCE_GET_PRIVATE (self, MEEGO_TYPE_IM_PROXY, MeegoImProxyPrivate);
1025-
1026- self->load_plugin_settings_observer = NULL;
1027-
1028- priv->dbusproxy = NULL;
1029- self->priv = priv;
1030-}
1031-
1032-void
1033-meego_im_proxy_connect(MeegoIMProxy *proxy, gpointer connection)
1034-{
1035- DBusGProxy *dbusproxy;
1036- DBusGConnection *dbus_connection = (DBusGConnection *)connection;
1037- g_return_if_fail(dbus_connection != NULL);
1038-
1039- if (proxy->priv->dbusproxy) {
1040- g_object_unref(proxy->priv->dbusproxy);
1041- }
1042-
1043- dbusproxy = dbus_g_proxy_new_for_peer(dbus_connection,
1044- MEEGO_IM_OBJECT_PATH, /* obj path */
1045- MEEGO_IM_SERVICE_INTERFACE /* interface */);
1046-
1047- if (dbusproxy == NULL) {
1048- g_warning("could not create dbus_proxy\n");
1049- }
1050-
1051- g_signal_connect(G_OBJECT(dbusproxy), "destroy", G_CALLBACK(handle_disconnect), proxy);
1052-
1053- dbus_g_object_register_marshaller(_maliit_marshal_VOID__STRING_STRING, G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
1054- dbus_g_proxy_add_signal(dbusproxy, "invokeAction", G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
1055- dbus_g_proxy_connect_signal(dbusproxy, "invokeAction", G_CALLBACK(handle_invoke_action), proxy, 0);
1056-
1057- proxy->priv->dbusproxy = dbusproxy;
1058-
1059- g_signal_emit(proxy, meego_im_proxy_signals[SIGNAL_CONNECTION_ESTABLISHED], 0);
1060-}
1061-
1062-gboolean
1063-meego_im_proxy_activate_context(MeegoIMProxy *proxy)
1064-{
1065- GError *error = NULL;
1066- gboolean ret = TRUE;
1067-
1068- STEP();
1069- if (!proxy || proxy->priv->dbusproxy == NULL)
1070- return FALSE;
1071-
1072- ret = com_meego_inputmethod_uiserver1_activate_context(proxy->priv->dbusproxy, &error);
1073-
1074- if (error != NULL) {
1075- g_warning("%s", error->message);
1076- }
1077-
1078- return ret;
1079-}
1080-
1081-gboolean
1082-meego_im_proxy_register_extension (MeegoIMProxy *proxy,
1083- gint id,
1084- const gchar *filename)
1085-{
1086- GError *error = NULL;
1087- gboolean ret = TRUE;
1088-
1089- STEP();
1090-
1091- if (!proxy || proxy->priv->dbusproxy == NULL)
1092- return FALSE;
1093-
1094- ret = com_meego_inputmethod_uiserver1_register_attribute_extension (proxy->priv->dbusproxy,
1095- id,
1096- filename,
1097- &error);
1098-
1099- if (error != NULL) {
1100- g_warning("%s", error->message);
1101- }
1102-
1103- return ret;
1104-}
1105-
1106-gboolean
1107-meego_im_proxy_unregister_extension (MeegoIMProxy *proxy,
1108- gint id)
1109-{
1110- GError *error = NULL;
1111- gboolean ret = TRUE;
1112-
1113- STEP();
1114-
1115- if (!proxy || proxy->priv->dbusproxy == NULL)
1116- return FALSE;
1117-
1118- ret = com_meego_inputmethod_uiserver1_unregister_attribute_extension (proxy->priv->dbusproxy,
1119- id,
1120- &error);
1121-
1122- if (error != NULL) {
1123- g_warning("%s", error->message);
1124- }
1125-
1126- return ret;
1127-}
1128-
1129-gboolean
1130-meego_im_proxy_app_orientation_changed(MeegoIMProxy *proxy, const gint angle)
1131-{
1132- GError *error = NULL;
1133- gboolean ret = TRUE;
1134-
1135- STEP();
1136- if (!proxy || proxy->priv->dbusproxy == NULL)
1137- return FALSE;
1138-
1139- ret = com_meego_inputmethod_uiserver1_app_orientation_changed(proxy->priv->dbusproxy, angle, &error);
1140-
1141- if (error != NULL) {
1142- g_warning("%s", error->message);
1143- }
1144-
1145- return ret;
1146-}
1147-
1148-
1149-gboolean
1150-meego_im_proxy_hide_input_method(MeegoIMProxy *proxy)
1151-{
1152- GError *error = NULL;
1153- gboolean ret = TRUE;
1154-
1155- STEP();
1156- if (!proxy || proxy->priv->dbusproxy == NULL)
1157- return FALSE;
1158-
1159- ret = com_meego_inputmethod_uiserver1_hide_input_method(proxy->priv->dbusproxy, &error);
1160-
1161- if (error != NULL) {
1162- g_warning("%s", error->message);
1163- }
1164-
1165- return ret;
1166-}
1167-
1168-
1169-#if 0
1170-// Not yet really implemented
1171-
1172-gboolean
1173-meego_im_proxy_mouse_clicked_on_preedit(MeegoIMProxy *proxy, const GValueArray *pos,
1174- const GValueArray *preedit_rect)
1175-{
1176- GError *error = NULL;
1177- gboolean ret = TRUE;
1178-
1179- if (!proxy || proxy->priv->dbusproxy == NULL)
1180- return FALSE;
1181-
1182- ret = com_meego_inputmethod_uiserver1_mouse_clicked_on_preedit(proxy->priv->dbusproxy,
1183- pos, preedit_rect, &error);
1184-
1185- if (error != NULL) {
1186- g_warning("%s", error->message);
1187- }
1188-
1189- return ret;
1190-}
1191-#endif
1192-
1193-gboolean
1194-meego_im_proxy_update_widget_info(MeegoIMProxy *proxy, const GHashTable *state_information, gboolean focus_changed)
1195-{
1196- GError *error = NULL;
1197- gboolean ret = TRUE;
1198-
1199- STEP();
1200- if (!proxy || proxy->priv->dbusproxy == NULL)
1201- return FALSE;
1202-
1203- ret = com_meego_inputmethod_uiserver1_update_widget_information(proxy->priv->dbusproxy,
1204- state_information, focus_changed, &error);
1205-
1206- if (error != NULL) {
1207- g_warning("%s", error->message);
1208- }
1209-
1210- return ret;
1211-}
1212-
1213-
1214-
1215-
1216-gboolean
1217-meego_im_proxy_process_key_event(MeegoIMProxy *proxy, const gint type, const gint code,
1218- const gint modifiers, const char *text,
1219- const gboolean auto_repeat, const gint count,
1220- const guint native_scan_code,
1221- const guint native_modifiers,
1222- const guint time)
1223-{
1224- GError *error = NULL;
1225- gboolean ret = TRUE;
1226-
1227- DBG("QT key event type=0x%x, code=0x%x, modifiers=0x%x, text=%s",
1228- type, code, modifiers, text);
1229- if (!proxy || proxy->priv->dbusproxy == NULL)
1230- return FALSE;
1231-
1232- ret = com_meego_inputmethod_uiserver1_process_key_event(proxy->priv->dbusproxy,
1233- type, code, modifiers, text, auto_repeat,
1234- count, native_scan_code, native_modifiers,
1235- time, &error);
1236-
1237- if (error != NULL) {
1238- g_warning("%s", error->message);
1239- }
1240-
1241- return ret;
1242-}
1243-
1244-
1245-gboolean
1246-meego_im_proxy_reset(MeegoIMProxy *proxy)
1247-{
1248- GError *error = NULL;
1249- gboolean ret = TRUE;
1250-
1251- STEP();
1252- if (!proxy || proxy->priv->dbusproxy == NULL)
1253- return FALSE;
1254-
1255- ret = com_meego_inputmethod_uiserver1_reset(proxy->priv->dbusproxy, &error);
1256-
1257- if (error != NULL) {
1258- g_warning("%s", error->message);
1259- }
1260-
1261- return ret;
1262-}
1263-
1264-
1265-gboolean
1266-meego_im_proxy_set_copy_paste_state(MeegoIMProxy *proxy, const gboolean copy_available,
1267- const gboolean paste_available)
1268-{
1269- GError *error = NULL;
1270- gboolean ret = TRUE;
1271-
1272- STEP();
1273- if (!proxy || proxy->priv->dbusproxy == NULL)
1274- return FALSE;
1275-
1276- ret = com_meego_inputmethod_uiserver1_set_copy_paste_state(proxy->priv->dbusproxy,
1277- copy_available, paste_available, &error);
1278-
1279- if (error != NULL) {
1280- g_warning("%s", error->message);
1281- }
1282-
1283- return ret;
1284-}
1285-
1286-
1287-gboolean
1288-meego_im_proxy_set_preedit(MeegoIMProxy *proxy, const char *text, gint cursor_pos)
1289-{
1290- GError *error = NULL;
1291- gboolean ret = TRUE;
1292-
1293- STEP();
1294- if (!proxy || proxy->priv->dbusproxy == NULL)
1295- return FALSE;
1296-
1297- ret = com_meego_inputmethod_uiserver1_set_preedit(proxy->priv->dbusproxy, text, cursor_pos, &error);
1298-
1299- if (error != NULL) {
1300- g_warning("%s", error->message);
1301- }
1302-
1303- return ret;
1304-}
1305-
1306-
1307-gboolean
1308-meego_im_proxy_show_input_method(MeegoIMProxy *proxy)
1309-{
1310- GError *error = NULL;
1311- gboolean ret = TRUE;
1312-
1313- STEP();
1314- if (!proxy || proxy->priv->dbusproxy == NULL)
1315- return FALSE;
1316-
1317- ret = com_meego_inputmethod_uiserver1_show_input_method(proxy->priv->dbusproxy, &error);
1318-
1319- if (error != NULL) {
1320- g_warning("%s", error->message);
1321- }
1322-
1323- return ret;
1324-}
1325-
1326-gboolean
1327-meego_im_proxy_set_extended_attribute (MeegoIMProxy *proxy,
1328- gint id,
1329- const gchar *target,
1330- const gchar *target_item,
1331- const gchar *attribute,
1332- GValue *value)
1333-{
1334- GError *error = NULL;
1335- gboolean ret = TRUE;
1336-
1337- STEP();
1338- if (!proxy || proxy->priv->dbusproxy == NULL)
1339- return FALSE;
1340-
1341- ret = com_meego_inputmethod_uiserver1_set_extended_attribute (proxy->priv->dbusproxy,
1342- id,
1343- target,
1344- target_item,
1345- attribute,
1346- value,
1347- &error);
1348-
1349- if (error != NULL) {
1350- g_warning("%s", error->message);
1351- }
1352-
1353- return ret;
1354-}
1355-
1356-gboolean
1357-meego_im_proxy_load_plugin_settings (MeegoIMProxy *proxy,
1358- const gchar *locale_name)
1359-{
1360- GError *error;
1361- gboolean ret;
1362-
1363- g_return_val_if_fail (MEEGO_IS_IM_PROXY (proxy), FALSE);
1364-
1365- if (proxy->load_plugin_settings_observer) {
1366- proxy->load_plugin_settings_observer(proxy, locale_name);
1367- }
1368-
1369- if (!proxy->priv->dbusproxy) {
1370- return FALSE;
1371- }
1372-
1373- error = NULL;
1374- ret = com_meego_inputmethod_uiserver1_load_plugin_settings (proxy->priv->dbusproxy,
1375- locale_name,
1376- &error);
1377-
1378- if (error) {
1379- g_warning ("%s", error->message);
1380- g_error_free (error);
1381- }
1382-
1383- return ret;
1384-}
1385
1386=== removed file 'connection-glib/meego-im-proxy.h'
1387--- connection-glib/meego-im-proxy.h 2012-07-13 19:02:51 +0000
1388+++ connection-glib/meego-im-proxy.h 1970-01-01 00:00:00 +0000
1389@@ -1,109 +0,0 @@
1390-/*
1391- * Copyright (C) 2010, Intel Corporation.
1392- *
1393- * Author: Raymond Liu <raymond.liu@intel.com>
1394- *
1395- * This library is free software; you can redistribute it and/or
1396- * modify it under the terms of the GNU Lesser General Public License
1397- * version 2.1 as published by the Free Software Foundation.
1398- *
1399- * This library is distributed in the hope that it will be useful, but
1400- * WITHOUT ANY WARRANTY; without even the implied warranty of
1401- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1402- * Lesser General Public License for more details.
1403- *
1404- * You should have received a copy of the GNU Lesser General Public
1405- * License along with this library; if not, write to the Free Software
1406- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
1407- * 02110-1301 USA
1408- */
1409-
1410-#ifndef _MEEGO_IM_PROXY_H
1411-#define _MEEGO_IM_PROXY_H
1412-
1413-#include <glib.h>
1414-#include <glib-object.h>
1415-
1416-G_BEGIN_DECLS
1417-
1418-typedef struct _MeegoIMProxy MeegoIMProxy;
1419-typedef struct _MeegoIMProxyClass MeegoIMProxyClass;
1420-typedef struct _MeegoImProxyPrivate MeegoImProxyPrivate;
1421-
1422-#define MEEGO_TYPE_IM_PROXY (meego_im_proxy_get_type())
1423-#define MEEGO_IM_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), MEEGO_TYPE_IM_PROXY, MeegoIMProxy))
1424-#define MEEGO_IM_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), MEEGO_TYPE_IM_PROXY, MeegoIMProxyClass))
1425-#define MEEGO_IS_IM_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), MEEGO_TYPE_IM_PROXY))
1426-#define MEEGO_IS_IM_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MEEGO_TYPE_IM_PROXY))
1427-#define MEEGO_IM_PROXY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), MEEGO_TYPE_IM_PROXY, MeegoIMProxyClass))
1428-
1429-
1430-typedef gboolean (*MeegoIMProxyLoadPluginSettingsFunction) (MeegoIMProxy *proxy, const gchar *locale_name);
1431-
1432-struct _MeegoIMProxy {
1433- GObject parent;
1434- MeegoImProxyPrivate *priv;
1435-
1436- /* Used to observe calls during testing
1437- * Over time it may make sense to convert all functions into
1438- * c/glib style vfuncs to allow "inheritance" */
1439- MeegoIMProxyLoadPluginSettingsFunction load_plugin_settings_observer;
1440-};
1441-
1442-struct _MeegoIMProxyClass {
1443- GObjectClass parent;
1444-};
1445-
1446-GType meego_im_proxy_get_type(void);
1447-
1448-MeegoIMProxy *meego_im_proxy_new(void);
1449-void meego_im_proxy_connect(MeegoIMProxy *proxy, gpointer connection);
1450-gboolean meego_im_proxy_activate_context(MeegoIMProxy *proxy);
1451-gboolean meego_im_proxy_app_orientation_changed(MeegoIMProxy *proxy, const gint angle);
1452-gboolean meego_im_proxy_hide_input_method(MeegoIMProxy *proxy);
1453-#if 0
1454-// Not yet really implemented
1455-gboolean meego_im_proxy_mouse_clicked_on_preedit(MeegoIMProxy *proxy, const GValueArray *pos,
1456- const GValueArray *preedit_rect);
1457-#endif
1458-
1459-gboolean meego_im_proxy_update_widget_info(MeegoIMProxy *proxy, const GHashTable *state_information, gboolean focus_changed);
1460-
1461-gboolean meego_im_proxy_process_key_event(MeegoIMProxy *proxy, const gint type, const gint code,
1462- const gint modifiers, const char *text,
1463- const gboolean auto_repeat, const gint count,
1464- const guint native_scan_code,
1465- const guint native_modifiers,
1466- const guint time);
1467-
1468-gboolean meego_im_proxy_reset(MeegoIMProxy *proxy);
1469-gboolean meego_im_proxy_set_context_object(MeegoIMProxy *proxy, const char *object_name);
1470-gboolean meego_im_proxy_set_copy_paste_state(MeegoIMProxy *proxy, const gboolean copy_available,
1471- const gboolean paste_available);
1472-gboolean meego_im_proxy_set_preedit(MeegoIMProxy *proxy, const char *text, const gint cursor_pos);
1473-gboolean meego_im_proxy_show_input_method(MeegoIMProxy *proxy);
1474-
1475-gboolean
1476-meego_im_proxy_register_extension (MeegoIMProxy *proxy,
1477- gint id,
1478- const gchar *filename);
1479-
1480-gboolean
1481-meego_im_proxy_unregister_extension (MeegoIMProxy *proxy,
1482- gint id);
1483-
1484-gboolean
1485-meego_im_proxy_set_extended_attribute (MeegoIMProxy *proxy,
1486- gint id,
1487- const gchar *target,
1488- const gchar* target_item,
1489- const gchar *attribute,
1490- GValue *value);
1491-
1492-gboolean
1493-meego_im_proxy_load_plugin_settings (MeegoIMProxy *proxy,
1494- const gchar *locale_name);
1495-
1496-G_END_DECLS
1497-
1498-#endif //_MEEGO_IM_PROXY_H
1499
1500=== removed file 'connection-glib/meego-imcontext-dbus-private.h'
1501--- connection-glib/meego-imcontext-dbus-private.h 2012-08-06 12:48:36 +0000
1502+++ connection-glib/meego-imcontext-dbus-private.h 1970-01-01 00:00:00 +0000
1503@@ -1,56 +0,0 @@
1504-/* This file is part of Maliit framework
1505- *
1506- * Copyright (C) 2012 Openismus GmbH
1507- *
1508- * Contact: maliit-discuss@lists.maliit.org
1509- *
1510- * This library is free software; you can redistribute it and/or
1511- * modify it under the terms of the GNU Lesser General Public
1512- * License as published by the Free Software Foundation; either
1513- * version 2.1 of the licence, or (at your option) any later version.
1514- *
1515- * This library is distributed in the hope that it will be useful,
1516- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1517- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1518- * Lesser General Public License for more details.
1519- *
1520- * You should have received a copy of the GNU Lesser General Public
1521- * License along with this library; if not, write to the
1522- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
1523- * Boston, MA 02111-1307, USA.
1524- */
1525-
1526-#ifndef MEEGOIMCONTEXTDBUSPRIVATE_H
1527-#define MEEGOIMCONTEXTDBUSPRIVATE_H
1528-
1529-gboolean meego_imcontext_dbus_activation_lost_event(MeegoIMContextDbusObj *obj, GError **error);
1530-gboolean meego_imcontext_dbus_im_initiated_hide(MeegoIMContextDbusObj *obj, GError **error);
1531-gboolean meego_imcontext_dbus_commit_string(MeegoIMContextDbusObj *obj, char *string, gint replacement_start,
1532- int replacement_length, int cursor_pos, GError **error);
1533-gboolean meego_imcontext_dbus_update_preedit(MeegoIMContextDbusObj *obj, const char *string, GPtrArray *formatListData, gint32 replaceStart, gint32 replaceLength, gint32 cursorPos, GError** error);
1534-gboolean meego_imcontext_dbus_key_event(MeegoIMContextDbusObj *obj, int type, int key, int modifiers, char *text,
1535- gboolean auto_repeat, int count, GError **error);
1536-gboolean meego_imcontext_dbus_update_input_method_area(MeegoIMContextDbusObj *obj, int x, int y, int width, int height, GError **error);
1537-gboolean meego_imcontext_dbus_set_global_correction_enabled(MeegoIMContextDbusObj *obj, gboolean correction, GError **error);
1538-gboolean meego_imcontext_dbus_set_redirect_keys(MeegoIMContextDbusObj *obj, gboolean enabled, GError **error);
1539-gboolean meego_imcontext_dbus_preedit_rectangle(MeegoIMContextDbusObj *obj, GValueArray **rect, gboolean *valid, GError **error);
1540-gboolean meego_imcontext_dbus_set_language (MeegoIMContextDbusObj *obj,
1541- const gchar *language_id,
1542- GError **error);
1543-gboolean meego_imcontext_dbus_set_detectable_auto_repeat(MeegoIMContextDbusObj *obj, gboolean enabled, GError **error);
1544-gboolean meego_imcontext_dbus_set_selection(MeegoIMContextDbusObj *obj, int start, int length, GError **error);
1545-gboolean meego_imcontext_dbus_selection(MeegoIMContextDbusObj *obj, gboolean *valid, gchar **gdata, GError **error);
1546-
1547-gboolean meego_imcontext_dbus_notify_extended_attribute_changed (MeegoIMContextDbusObj *obj,
1548- gint id,
1549- const gchar *target,
1550- const gchar *target_item,
1551- const gchar *key,
1552- GValue *value,
1553- GError **error);
1554-gboolean
1555-meego_imcontext_dbus_plugin_settings_loaded (MeegoIMContextDbusObj *obj,
1556- GPtrArray *settings_data,
1557- GError **error G_GNUC_UNUSED);
1558-
1559-#endif // MEEGOIMCONTEXTDBUSPRIVATE_H
1560
1561=== removed file 'connection-glib/meego-imcontext-dbus.c'
1562--- connection-glib/meego-imcontext-dbus.c 2012-08-06 12:48:36 +0000
1563+++ connection-glib/meego-imcontext-dbus.c 1970-01-01 00:00:00 +0000
1564@@ -1,443 +0,0 @@
1565-/*
1566- * Copyright (C) 2010 Intel Corporation
1567- * Copyright (C) 2012 One Laptop per Child Association
1568- *
1569- * Author: Raymond Liu <raymond.li@intel.com>
1570- *
1571- * This library is free software; you can redistribute it and/or
1572- * modify it under the terms of the GNU Lesser General Public License
1573- * version 2.1 as published by the Free Software Foundation.
1574- *
1575- * This library is distributed in the hope that it will be useful, but
1576- * WITHOUT ANY WARRANTY; without even the implied warranty of
1577- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1578- * Lesser General Public License for more details.
1579- *
1580- * You should have received a copy of the GNU Lesser General Public
1581- * License along with this library; if not, write to the Free Software
1582- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
1583- * 02110-1301 USA
1584- *
1585- */
1586-
1587-#include <stdlib.h>
1588-#include <glib.h>
1589-
1590-#include "meego-imcontext-dbus.h"
1591-
1592-#include "debug.h"
1593-#include "maliitmarshalers.h"
1594-
1595-#include <dbus/dbus-glib.h>
1596-
1597-#define MEEGO_IMCONTEXT_DBUSOBJ_SERVICE_OBJECT_PATH "/com/meego/inputmethod/inputcontext"
1598-
1599-G_DEFINE_TYPE(MeegoIMContextDbusObj, meego_imcontext_dbusobj, G_TYPE_OBJECT);
1600-
1601-#include "meego-imcontext-dbus-private.h"
1602-
1603-enum {
1604- ACTIVATION_LOST_EVENT,
1605- IM_INITIATED_HIDE,
1606- COMMIT_STRING,
1607- UPDATE_PREEDIT,
1608- KEY_EVENT,
1609- UPDATE_INPUT_METHOD_AREA,
1610- SET_GLOBAL_CORRECTION,
1611- PREEDIT_RECTANGLE,
1612- COPY,
1613- PASTE,
1614- SET_REDIRECT_KEYS,
1615- SET_DETECTABLE_AUTO_REPEAT,
1616- SET_SELECTION,
1617- SELECTION,
1618- SET_LANGUAGE,
1619- NOTIFY_EXTENDED_ATTRIBUTE_CHANGED,
1620- PLUGIN_SETTINGS_LOADED,
1621- LAST_SIGNAL
1622-};
1623-
1624-static guint imcontext_signals[LAST_SIGNAL] = { 0 };
1625-
1626-#include "meego-imcontext-dbus-glue.h"
1627-
1628-
1629-static void
1630-meego_imcontext_dbusobj_init(MeegoIMContextDbusObj *obj)
1631-{
1632- STEP();
1633- g_assert(obj != NULL);
1634-}
1635-
1636-
1637-static void
1638-meego_imcontext_dbusobj_class_init(MeegoIMContextDbusObjClass *klass)
1639-{
1640- g_assert(klass != NULL);
1641-
1642- dbus_g_object_type_install_info(MEEGO_IMCONTEXT_TYPE_DBUSOBJ,
1643- &dbus_glib_meego_imcontext_dbus_object_info);
1644-
1645- imcontext_signals[ACTIVATION_LOST_EVENT] = g_signal_new("activation-lost-event",
1646- G_TYPE_FROM_CLASS(klass),
1647- G_SIGNAL_RUN_FIRST,
1648- 0,
1649- NULL, NULL,
1650- g_cclosure_marshal_VOID__VOID,
1651- G_TYPE_NONE, 0);
1652- imcontext_signals[IM_INITIATED_HIDE] = g_signal_new("im-initiated-hide",
1653- G_TYPE_FROM_CLASS(klass),
1654- G_SIGNAL_RUN_FIRST,
1655- 0,
1656- NULL, NULL,
1657- g_cclosure_marshal_VOID__VOID,
1658- G_TYPE_NONE, 0);
1659- imcontext_signals[COMMIT_STRING] = g_signal_new("commit-string",
1660- G_TYPE_FROM_CLASS(klass),
1661- G_SIGNAL_RUN_FIRST,
1662- 0,
1663- NULL, NULL,
1664- _maliit_marshal_VOID__STRING_INT_INT_INT,
1665- G_TYPE_NONE, 4,
1666- G_TYPE_STRING,
1667- G_TYPE_INT,
1668- G_TYPE_INT,
1669- G_TYPE_INT);
1670- imcontext_signals[UPDATE_PREEDIT] = g_signal_new("update-preedit",
1671- G_TYPE_FROM_CLASS(klass),
1672- G_SIGNAL_RUN_FIRST,
1673- 0,
1674- NULL, NULL,
1675- _maliit_marshal_VOID__STRING_BOXED_INT_INT_INT,
1676- G_TYPE_NONE, 5,
1677- G_TYPE_STRING,
1678- G_TYPE_PTR_ARRAY,
1679- G_TYPE_INT,
1680- G_TYPE_INT,
1681- G_TYPE_INT);
1682- imcontext_signals[KEY_EVENT] = g_signal_new("key-event",
1683- G_TYPE_FROM_CLASS(klass),
1684- G_SIGNAL_RUN_FIRST,
1685- 0,
1686- NULL, NULL,
1687- _maliit_marshal_VOID__INT_INT_INT_STRING_BOOLEAN_INT,
1688- G_TYPE_NONE, 6,
1689- G_TYPE_INT,
1690- G_TYPE_INT,
1691- G_TYPE_INT,
1692- G_TYPE_STRING,
1693- G_TYPE_BOOLEAN,
1694- G_TYPE_INT);
1695- imcontext_signals[UPDATE_INPUT_METHOD_AREA] = g_signal_new("update-input-method-area",
1696- G_TYPE_FROM_CLASS(klass),
1697- G_SIGNAL_RUN_FIRST,
1698- 0,
1699- NULL, NULL,
1700- _maliit_marshal_VOID__INT_INT_INT_INT,
1701- G_TYPE_NONE, 4,
1702- G_TYPE_INT,
1703- G_TYPE_INT,
1704- G_TYPE_INT,
1705- G_TYPE_INT);
1706- imcontext_signals[SET_GLOBAL_CORRECTION] = g_signal_new("set-global-correction",
1707- G_TYPE_FROM_CLASS(klass),
1708- G_SIGNAL_RUN_FIRST,
1709- 0,
1710- NULL, NULL,
1711- g_cclosure_marshal_VOID__BOOLEAN,
1712- G_TYPE_NONE, 1,
1713- G_TYPE_BOOLEAN);
1714- imcontext_signals[PREEDIT_RECTANGLE] = g_signal_new("preedit-rectangle",
1715- G_TYPE_FROM_CLASS(klass),
1716- G_SIGNAL_RUN_LAST,
1717- 0,
1718- NULL, NULL,
1719- _maliit_marshal_BOXED__VOID,
1720- G_TYPE_PTR_ARRAY, 0);
1721- imcontext_signals[COPY] = g_signal_new("copy",
1722- G_TYPE_FROM_CLASS(klass),
1723- G_SIGNAL_RUN_FIRST,
1724- 0,
1725- NULL, NULL,
1726- g_cclosure_marshal_VOID__VOID,
1727- G_TYPE_NONE, 0);
1728- imcontext_signals[PASTE] = g_signal_new("paste",
1729- G_TYPE_FROM_CLASS(klass),
1730- G_SIGNAL_RUN_FIRST,
1731- 0,
1732- NULL, NULL,
1733- g_cclosure_marshal_VOID__VOID,
1734- G_TYPE_NONE, 0);
1735- imcontext_signals[SET_REDIRECT_KEYS] = g_signal_new("set-redirect-keys",
1736- G_TYPE_FROM_CLASS(klass),
1737- G_SIGNAL_RUN_FIRST,
1738- 0,
1739- NULL, NULL,
1740- g_cclosure_marshal_VOID__BOOLEAN,
1741- G_TYPE_NONE, 1,
1742- G_TYPE_BOOLEAN);
1743- imcontext_signals[SET_DETECTABLE_AUTO_REPEAT] = g_signal_new("set-detectable-auto-repeat",
1744- G_TYPE_FROM_CLASS(klass),
1745- G_SIGNAL_RUN_FIRST,
1746- 0,
1747- NULL, NULL,
1748- g_cclosure_marshal_VOID__BOOLEAN,
1749- G_TYPE_NONE, 1,
1750- G_TYPE_BOOLEAN);
1751- imcontext_signals[SET_SELECTION] = g_signal_new("set-selection",
1752- G_TYPE_FROM_CLASS(klass),
1753- G_SIGNAL_RUN_FIRST,
1754- 0,
1755- NULL, NULL,
1756- _maliit_marshal_VOID__INT_INT,
1757- G_TYPE_NONE, 2,
1758- G_TYPE_INT,
1759- G_TYPE_INT);
1760- imcontext_signals[SELECTION] = g_signal_new("selection",
1761- G_TYPE_FROM_CLASS(klass),
1762- G_SIGNAL_RUN_LAST,
1763- 0,
1764- NULL, NULL,
1765- _maliit_marshal_STRING__VOID,
1766- G_TYPE_STRING, 0);
1767- imcontext_signals[SET_LANGUAGE] = g_signal_new("set-language",
1768- G_TYPE_FROM_CLASS(klass),
1769- G_SIGNAL_RUN_FIRST,
1770- 0,
1771- NULL, NULL,
1772- g_cclosure_marshal_VOID__STRING,
1773- G_TYPE_NONE, 1,
1774- G_TYPE_STRING);
1775- imcontext_signals[NOTIFY_EXTENDED_ATTRIBUTE_CHANGED] = g_signal_new("notify-extended-attribute-changed",
1776- G_TYPE_FROM_CLASS(klass),
1777- G_SIGNAL_RUN_FIRST,
1778- 0,
1779- NULL, NULL,
1780- _maliit_marshal_VOID__INT_STRING_STRING_STRING_VARIANT,
1781- G_TYPE_NONE, 5,
1782- G_TYPE_INT,
1783- G_TYPE_STRING,
1784- G_TYPE_STRING,
1785- G_TYPE_STRING,
1786- G_TYPE_VARIANT);
1787-
1788- imcontext_signals[PLUGIN_SETTINGS_LOADED] =
1789- g_signal_new ("plugin-settings-loaded",
1790- G_TYPE_FROM_CLASS(klass),
1791- G_SIGNAL_RUN_FIRST,
1792- 0,
1793- NULL,
1794- NULL,
1795- g_cclosure_marshal_VOID__BOXED,
1796- G_TYPE_NONE,
1797- 1,
1798- G_TYPE_PTR_ARRAY);
1799-}
1800-
1801-void
1802-meego_imcontext_dbusobj_connect(MeegoIMContextDbusObj *obj, gpointer connection)
1803-{
1804- DBusGConnection *dbus_connection = (DBusGConnection *)connection;
1805- g_return_if_fail(dbus_connection != NULL);
1806-
1807- dbus_g_connection_register_g_object(dbus_connection,
1808- MEEGO_IMCONTEXT_DBUSOBJ_SERVICE_OBJECT_PATH,
1809- G_OBJECT(obj));
1810-}
1811-
1812-MeegoIMContextDbusObj *
1813-meego_imcontext_dbusobj_new(void)
1814-{
1815- return g_object_new(MEEGO_IMCONTEXT_TYPE_DBUSOBJ, NULL);
1816-}
1817-
1818-
1819-gboolean
1820-meego_imcontext_dbus_activation_lost_event(MeegoIMContextDbusObj *obj, GError **error)
1821-{
1822- STEP();
1823-
1824- g_signal_emit(obj, imcontext_signals[ACTIVATION_LOST_EVENT], 0);
1825-
1826- return TRUE;
1827-}
1828-
1829-
1830-gboolean
1831-meego_imcontext_dbus_im_initiated_hide(MeegoIMContextDbusObj *obj, GError **error)
1832-{
1833- STEP();
1834-
1835- g_signal_emit(obj, imcontext_signals[IM_INITIATED_HIDE], 0);
1836-
1837- return TRUE;
1838-}
1839-
1840-
1841-gboolean
1842-meego_imcontext_dbus_commit_string(MeegoIMContextDbusObj *obj, char *string, gint replacement_start,
1843- int replacement_length, int cursor_pos, GError **error)
1844-{
1845- UNUSED(error);
1846-
1847- DBG("commit string: %s", string);
1848-
1849- g_signal_emit(obj, imcontext_signals[COMMIT_STRING], 0, string, replacement_start, replacement_length, cursor_pos);
1850-
1851- return TRUE;
1852-}
1853-
1854-
1855-gboolean
1856-meego_imcontext_dbus_update_preedit(MeegoIMContextDbusObj *obj, const char *string, GPtrArray *formatListData, gint32 replaceStart, gint32 replaceLength, gint32 cursorPos, GError **error)
1857-{
1858- UNUSED(error);
1859-
1860- DBG("preedit string: %s", string);
1861-
1862- g_signal_emit(obj, imcontext_signals[UPDATE_PREEDIT], 0, string, formatListData, replaceStart, replaceLength, cursorPos);
1863-
1864- return TRUE;
1865-}
1866-
1867-
1868-gboolean
1869-meego_imcontext_dbus_key_event(MeegoIMContextDbusObj *obj, int type, int key, int modifiers, char *text,
1870- gboolean auto_repeat, int count, GError **error)
1871-{
1872- UNUSED(error);
1873-
1874- DBG("type=0x%x, key=0x%x, modifiers=0x%x, text = %s, auto_repeat=%d, count=%d",
1875- type, key, modifiers, text, auto_repeat, count);
1876-
1877- g_signal_emit(obj, imcontext_signals[KEY_EVENT], 0, type, key, modifiers, text, auto_repeat, count);
1878-
1879- return TRUE;
1880-}
1881-
1882-gboolean
1883-meego_imcontext_dbus_update_input_method_area(MeegoIMContextDbusObj *obj, int x, int y, int width, int height, GError **error G_GNUC_UNUSED)
1884-{
1885- STEP();
1886-
1887- g_signal_emit(obj, imcontext_signals[UPDATE_INPUT_METHOD_AREA], 0, x, y, width, height);
1888-
1889- return TRUE;
1890-}
1891-
1892-
1893-gboolean
1894-meego_imcontext_dbus_set_global_correction_enabled(MeegoIMContextDbusObj *obj, gboolean correction, GError **error)
1895-{
1896- STEP();
1897-
1898- // TODO emit SET_GLOBAL_CORRECTION signal
1899-
1900- return TRUE;
1901-}
1902-
1903-gboolean
1904-meego_imcontext_dbus_set_redirect_keys(MeegoIMContextDbusObj *obj, gboolean enabled, GError **error)
1905-{
1906- UNUSED(error);
1907-
1908- STEP();
1909-
1910- g_signal_emit(obj, imcontext_signals[SET_REDIRECT_KEYS], 0, enabled);
1911-
1912- return TRUE;
1913-}
1914-
1915-
1916-gboolean
1917-meego_imcontext_dbus_preedit_rectangle(MeegoIMContextDbusObj *obj, GValueArray **rect, gboolean *valid, GError **error)
1918-{
1919- STEP();
1920-
1921- // TODO emit PREEDIT_RECTANGLE signal
1922-
1923- return TRUE;
1924-}
1925-
1926-gboolean
1927-meego_imcontext_dbus_set_detectable_auto_repeat(MeegoIMContextDbusObj *obj, gboolean enabled, GError **error)
1928-{
1929- STEP();
1930-
1931- // TODO emit SET_DETECTABLE_AUTO_REPEAT signal
1932-
1933- return TRUE;
1934-}
1935-
1936-gboolean
1937-meego_imcontext_dbus_set_selection(MeegoIMContextDbusObj *obj, int start, int length, GError **error)
1938-{
1939- STEP();
1940-
1941- // TODO emit SET_SELECTION signal
1942-
1943- return TRUE;
1944-}
1945-
1946-gboolean
1947-meego_imcontext_dbus_selection(MeegoIMContextDbusObj *obj, gboolean *valid, gchar **gdata, GError **error)
1948-{
1949- STEP();
1950-
1951- // TODO emit SELECTION signal
1952-
1953- return TRUE;
1954-}
1955-
1956-gboolean
1957-meego_imcontext_dbus_set_language (MeegoIMContextDbusObj *obj,
1958- const gchar *language_id,
1959- GError **error)
1960-{
1961- UNUSED(error);
1962- STEP();
1963-
1964- g_signal_emit(obj, imcontext_signals[SET_LANGUAGE], 0, language_id);
1965-
1966- return TRUE;
1967-}
1968-
1969-gboolean
1970-meego_imcontext_dbus_notify_extended_attribute_changed (MeegoIMContextDbusObj *obj,
1971- gint id,
1972- const gchar *target,
1973- const gchar *target_item,
1974- const gchar *key,
1975- GValue *value,
1976- GError **error)
1977-{
1978- UNUSED(error);
1979- STEP();
1980-
1981- GVariant *variant_value = dbus_g_value_build_g_variant (value);
1982-
1983- if (variant_value) {
1984- if (g_variant_is_floating (variant_value)) {
1985- g_variant_ref_sink (variant_value);
1986- }
1987-
1988- g_signal_emit(obj, imcontext_signals[NOTIFY_EXTENDED_ATTRIBUTE_CHANGED], 0, id, target, target_item, key, variant_value);
1989-
1990- g_variant_unref (variant_value);
1991-
1992- return TRUE;
1993- }
1994-
1995- g_warning ("Unknown data type: %s", G_VALUE_TYPE_NAME (value));
1996-
1997- return TRUE;
1998-}
1999-
2000-gboolean
2001-meego_imcontext_dbus_plugin_settings_loaded (MeegoIMContextDbusObj *obj,
2002- GPtrArray *settings_data,
2003- GError **error G_GNUC_UNUSED)
2004-{
2005- g_signal_emit(obj, imcontext_signals[PLUGIN_SETTINGS_LOADED], 0, settings_data);
2006- return TRUE;
2007-}
2008
2009=== removed file 'connection-glib/meego-imcontext-dbus.h'
2010--- connection-glib/meego-imcontext-dbus.h 2012-07-13 19:02:51 +0000
2011+++ connection-glib/meego-imcontext-dbus.h 1970-01-01 00:00:00 +0000
2012@@ -1,55 +0,0 @@
2013-/*
2014- * Copyright (C) 2010 Intel Corporation
2015- *
2016- * Author: Raymond Liu <raymond.liu@intel.com>
2017- *
2018- * This library is free software; you can redistribute it and/or
2019- * modify it under the terms of the GNU Lesser General Public License
2020- * version 2.1 as published by the Free Software Foundation.
2021- *
2022- * This library is distributed in the hope that it will be useful, but
2023- * WITHOUT ANY WARRANTY; without even the implied warranty of
2024- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2025- * Lesser General Public License for more details.
2026- *
2027- * You should have received a copy of the GNU Lesser General Public
2028- * License along with this library; if not, write to the Free Software
2029- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
2030- * 02110-1301 USA
2031- *
2032- */
2033-
2034-#ifndef _MEEGO_IMCONTEXT_DBUS_H
2035-#define _MEEGO_IMCONTEXT_DBUS_H
2036-
2037-#include <glib.h>
2038-#include <glib-object.h>
2039-
2040-typedef struct {
2041- GObject parent;
2042-
2043-} MeegoIMContextDbusObj;
2044-
2045-typedef struct {
2046- GObjectClass parent;
2047-} MeegoIMContextDbusObjClass;
2048-
2049-GType meego_imcontext_dbusobj_get_type(void);
2050-
2051-#define MEEGO_IMCONTEXT_TYPE_DBUSOBJ (meego_imcontext_dbusobj_get_type())
2052-#define MEEGO_IMCONTEXT_DBUSOBJ(obj) \
2053- (G_TYPE_CHECK_INSTANCE_CAST((obj), MEEGO_IMCONTEXT_TYPE_DBUSOBJ, MeegoIMContextDbusObj))
2054-#define MEEGO_IMCONTEXT_DBUSOBJ_CLASS(klass) \
2055- (G_TYPE_CHECK_CLASS_CAST((klass), MEEGO_IMCONTEXT_TYPE_DBUSOBJ, MeegoIMContextDbusObjClass))
2056-#define MEEGO_IMCONTEXT_IS_DBUSOBJ(obj) \
2057- (G_TYPE_CHECK_INSTANCE_TYPE((obj), MEEGO_IMCONTEXT_TYPE_DBUSOBJ))
2058-#define MEEGO_IMCONTEXT_IS_DBUSOBJ_CLASS(klass) \
2059- (G_TYPE_CHECK_CLASS_TYPE((klass), MEEGO_IMCONTEXT_TYPE_DBUSOBJ))
2060-#define MEEGO_IMCONTEXT_DBUSOBJ_GET_CLASS(obj) \
2061- (G_TYPE_INSTANCE_GET_CLASS((obj), MEEGO_IMCONTEXT_TYPE_DBUSOBJ, MeegoIMContextDbusObjClass))
2062-
2063-
2064-MeegoIMContextDbusObj *meego_imcontext_dbusobj_new(void);
2065-void meego_imcontext_dbusobj_connect(MeegoIMContextDbusObj *obj, gpointer connection);
2066-
2067-#endif /* _MEEGO_IMCONTEXT_DBUS_H */
2068
2069=== removed file 'connection-glib/qt-keysym-map.cpp'
2070--- connection-glib/qt-keysym-map.cpp 2012-05-22 06:12:09 +0000
2071+++ connection-glib/qt-keysym-map.cpp 1970-01-01 00:00:00 +0000
2072@@ -1,542 +0,0 @@
2073-/*
2074- * Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
2075- * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
2076- * Copyright (C) 2010, Intel Corporation.
2077- *
2078- * Author: Raymond Liu <raymond.liu@intel.com>
2079- *
2080- * This library is free software; you can redistribute it and/or
2081- * modify it under the terms of the GNU Lesser General Public License
2082- * version 2.1 as published by the Free Software Foundation.
2083- *
2084- * This library is distributed in the hope that it will be useful, but
2085- * WITHOUT ANY WARRANTY; without even the implied warranty of
2086- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2087- * Lesser General Public License for more details.
2088- *
2089- * You should have received a copy of the GNU Lesser General Public
2090- * License along with this library; if not, write to the Free Software
2091- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
2092- * 02110-1301 USA
2093- */
2094-
2095-
2096-#include <X11/keysym.h>
2097-#include <qstring.h>
2098-
2099-#include "qt-keysym-map.h"
2100-#include "debug.h"
2101-
2102-
2103-#if 0
2104-
2105-typedef struct {
2106- int QtKey;
2107- uint XKeySym;
2108-} KeySymMap;
2109-
2110-static const KeySymMap QtKeyXSymMaps[] =
2111-{
2112- { '/', XK_KP_Divide },
2113- { '*', XK_KP_Multiply },
2114- { '-', XK_KP_Subtract },
2115- { '+', XK_KP_Add },
2116- { Qt::Key_Escape, XK_Escape },
2117- { Qt::Key_Tab, XK_Tab },
2118- { Qt::Key_Backtab, XK_ISO_Left_Tab },
2119- { Qt::Key_Backspace, XK_BackSpace },
2120- { Qt::Key_Return, XK_Return },
2121- { Qt::Key_Enter, XK_KP_Enter },
2122- { Qt::Key_Insert, XK_Insert },
2123- { Qt::Key_Delete, XK_Delete },
2124- { Qt::Key_Pause, XK_Pause },
2125- { Qt::Key_Print, XK_Print },
2126- { Qt::Key_SysReq, XK_Sys_Req },
2127- { Qt::Key_Home, XK_Home },
2128- { Qt::Key_End, XK_End },
2129- { Qt::Key_Left, XK_Left },
2130- { Qt::Key_Up, XK_Up },
2131- { Qt::Key_Right, XK_Right },
2132- { Qt::Key_Down, XK_Down },
2133- { Qt::Key_CapsLock, XK_Caps_Lock },
2134- { Qt::Key_NumLock, XK_Num_Lock },
2135- { Qt::Key_ScrollLock, XK_Scroll_Lock },
2136- { Qt::Key_F1, XK_F1 },
2137- { Qt::Key_F2, XK_F2 },
2138- { Qt::Key_F3, XK_F3 },
2139- { Qt::Key_F4, XK_F4 },
2140- { Qt::Key_F5, XK_F5 },
2141- { Qt::Key_F6, XK_F6 },
2142- { Qt::Key_F7, XK_F7 },
2143- { Qt::Key_F8, XK_F8 },
2144- { Qt::Key_F9, XK_F9 },
2145- { Qt::Key_F10, XK_F10 },
2146- { Qt::Key_F11, XK_F11 },
2147- { Qt::Key_F12, XK_F12 },
2148- { Qt::Key_F13, XK_F13 },
2149- { Qt::Key_F14, XK_F14 },
2150- { Qt::Key_F15, XK_F15 },
2151- { Qt::Key_F16, XK_F16 },
2152- { Qt::Key_F17, XK_F17 },
2153- { Qt::Key_F18, XK_F18 },
2154- { Qt::Key_F19, XK_F19 },
2155- { Qt::Key_F20, XK_F20 },
2156- { Qt::Key_F21, XK_F21 },
2157- { Qt::Key_F22, XK_F22 },
2158- { Qt::Key_F23, XK_F23 },
2159- { Qt::Key_F24, XK_F24 },
2160- { Qt::Key_F25, XK_F25 },
2161- { Qt::Key_F26, XK_F26 },
2162- { Qt::Key_F27, XK_F27 },
2163- { Qt::Key_F28, XK_F28 },
2164- { Qt::Key_F29, XK_F29 },
2165- { Qt::Key_F30, XK_F30 },
2166- { Qt::Key_F31, XK_F31 },
2167- { Qt::Key_F32, XK_F32 },
2168- { Qt::Key_F33, XK_F33 },
2169- { Qt::Key_F34, XK_F34 },
2170- { Qt::Key_F35, XK_F35 },
2171- { Qt::Key_Super_L, XK_Super_L },
2172- { Qt::Key_Super_R, XK_Super_R },
2173- { Qt::Key_Menu, XK_Menu },
2174- { Qt::Key_Hyper_L, XK_Hyper_L },
2175- { Qt::Key_Hyper_R, XK_Hyper_R },
2176- { Qt::Key_Help, XK_Help },
2177- { Qt::Key_Return, XK_KP_Enter },
2178-
2179- { Qt::Key_Multi_key, XK_Multi_key },
2180- { Qt::Key_Codeinput, XK_Codeinput },
2181- { Qt::Key_SingleCandidate, XK_SingleCandidate },
2182- { Qt::Key_MultipleCandidate, XK_MultipleCandidate },
2183- { Qt::Key_PreviousCandidate, XK_PreviousCandidate },
2184- { Qt::Key_Mode_switch, XK_Mode_switch },
2185- { Qt::Key_Kanji, XK_Kanji },
2186- { Qt::Key_Muhenkan, XK_Muhenkan },
2187- { Qt::Key_Henkan, XK_Henkan },
2188- { Qt::Key_Romaji, XK_Romaji },
2189- { Qt::Key_Hiragana, XK_Hiragana },
2190- { Qt::Key_Katakana, XK_Katakana },
2191- { Qt::Key_Hiragana_Katakana, XK_Hiragana_Katakana },
2192- { Qt::Key_Zenkaku, XK_Zenkaku },
2193- { Qt::Key_Hankaku, XK_Hankaku },
2194- { Qt::Key_Zenkaku_Hankaku, XK_Zenkaku_Hankaku },
2195- { Qt::Key_Touroku, XK_Touroku },
2196- { Qt::Key_Massyo, XK_Massyo },
2197- { Qt::Key_Kana_Lock, XK_Kana_Lock },
2198- { Qt::Key_Kana_Shift, XK_Kana_Shift },
2199- { Qt::Key_Eisu_Shift, XK_Eisu_Shift },
2200- { Qt::Key_Eisu_toggle, XK_Eisu_toggle },
2201- { Qt::Key_Hangul, XK_Hangul },
2202- { Qt::Key_Hangul_Start, XK_Hangul_Start },
2203- { Qt::Key_Hangul_End, XK_Hangul_End },
2204- { Qt::Key_Hangul_Hanja, XK_Hangul_Hanja },
2205- { Qt::Key_Hangul_Jamo, XK_Hangul_Jamo },
2206- { Qt::Key_Hangul_Romaja, XK_Hangul_Romaja },
2207- { Qt::Key_Hangul_Jeonja, XK_Hangul_Jeonja },
2208- { Qt::Key_Hangul_Banja, XK_Hangul_Banja },
2209- { Qt::Key_Hangul_PreHanja, XK_Hangul_PreHanja },
2210- { Qt::Key_Hangul_Special, XK_Hangul_Special },
2211-
2212- { 0, 0 }
2213-};
2214-
2215-#else
2216-
2217-typedef struct {
2218- uint XKeySym;
2219- int QtKey;
2220-} KeySymMap;
2221-
2222-// keyboard mapping table, modified from QKeymapper_x11.cpp
2223-static const KeySymMap QtKeyXSymMaps[] = {
2224-
2225-// misc keys
2226-
2227- { XK_Escape, Qt::Key_Escape },
2228- { XK_Tab, Qt::Key_Tab },
2229- { XK_ISO_Left_Tab, Qt::Key_Backtab },
2230- { XK_BackSpace, Qt::Key_Backspace },
2231- { XK_Return, Qt::Key_Return },
2232- { XK_Insert, Qt::Key_Insert },
2233- { XK_Delete, Qt::Key_Delete },
2234- { XK_Clear, Qt::Key_Delete },
2235- { XK_Pause, Qt::Key_Pause },
2236- { XK_Print, Qt::Key_Print },
2237- { 0x1005FF60, Qt::Key_SysReq }, // hardcoded Sun SysReq
2238- { 0x1007ff00, Qt::Key_SysReq }, // hardcoded X386 SysReq
2239-
2240-// cursor movement
2241-
2242- { XK_Home, Qt::Key_Home },
2243- { XK_End, Qt::Key_End },
2244- { XK_Left, Qt::Key_Left },
2245- { XK_Up, Qt::Key_Up },
2246- { XK_Right, Qt::Key_Right },
2247- { XK_Down, Qt::Key_Down },
2248- { XK_Prior, Qt::Key_PageUp },
2249- { XK_Next, Qt::Key_PageDown },
2250-
2251-// modifiers
2252-
2253- { XK_Shift_L, Qt::Key_Shift },
2254- { XK_Shift_R, Qt::Key_Shift },
2255- { XK_Shift_Lock, Qt::Key_Shift },
2256- { XK_Control_L, Qt::Key_Control },
2257- { XK_Control_R, Qt::Key_Control },
2258- { XK_Meta_L, Qt::Key_Meta },
2259- { XK_Meta_R, Qt::Key_Meta },
2260- { XK_Alt_L, Qt::Key_Alt },
2261- { XK_Alt_R, Qt::Key_Alt },
2262- { XK_Caps_Lock, Qt::Key_CapsLock },
2263- { XK_Num_Lock, Qt::Key_NumLock },
2264- { XK_Scroll_Lock, Qt::Key_ScrollLock },
2265- { XK_Super_L, Qt::Key_Super_L },
2266- { XK_Super_R, Qt::Key_Super_R },
2267- { XK_Menu, Qt::Key_Menu },
2268- { XK_Hyper_L, Qt::Key_Hyper_L },
2269- { XK_Hyper_R, Qt::Key_Hyper_R },
2270- { XK_Help, Qt::Key_Help },
2271- { 0x1000FF74, Qt::Key_Backtab }, // hardcoded HP backtab
2272- { 0x1005FF10, Qt::Key_F11 }, // hardcoded Sun F36 (labeled F11)
2273- { 0x1005FF11, Qt::Key_F12 }, // hardcoded Sun F37 (labeled F12)
2274-
2275-// function keys
2276-
2277- { XK_F1, Qt::Key_F1 },
2278- { XK_F2, Qt::Key_F2 },
2279- { XK_F3, Qt::Key_F3 },
2280- { XK_F4, Qt::Key_F4 },
2281- { XK_F5, Qt::Key_F5 },
2282- { XK_F6, Qt::Key_F6 },
2283- { XK_F7, Qt::Key_F7 },
2284- { XK_F8, Qt::Key_F8 },
2285- { XK_F9, Qt::Key_F9 },
2286- { XK_F10, Qt::Key_F10 },
2287- { XK_F11, Qt::Key_F11 },
2288- { XK_F12, Qt::Key_F12 },
2289- { XK_F13, Qt::Key_F13 },
2290- { XK_F14, Qt::Key_F14 },
2291- { XK_F15, Qt::Key_F15 },
2292- { XK_F16, Qt::Key_F16 },
2293- { XK_F17, Qt::Key_F17 },
2294- { XK_F18, Qt::Key_F18 },
2295- { XK_F19, Qt::Key_F19 },
2296- { XK_F20, Qt::Key_F20 },
2297-
2298-// numeric and function keypad keys
2299-
2300- { XK_KP_Space, Qt::Key_Space },
2301- { XK_KP_Tab, Qt::Key_Tab },
2302- { XK_KP_Enter, Qt::Key_Enter },
2303- { XK_KP_F1, Qt::Key_F1 },
2304- { XK_KP_F2, Qt::Key_F2 },
2305- { XK_KP_F3, Qt::Key_F3 },
2306- { XK_KP_F4, Qt::Key_F4 },
2307-
2308- { XK_KP_Home, Qt::Key_Home },
2309- { XK_KP_Left, Qt::Key_Left },
2310- { XK_KP_Up, Qt::Key_Up },
2311- { XK_KP_Right, Qt::Key_Right },
2312- { XK_KP_Down, Qt::Key_Down },
2313- { XK_KP_Prior, Qt::Key_PageUp },
2314- { XK_KP_Next, Qt::Key_PageDown },
2315- { XK_KP_End, Qt::Key_End },
2316- { XK_KP_Begin, Qt::Key_Clear },
2317- { XK_KP_Insert, Qt::Key_Insert },
2318- { XK_KP_Delete, Qt::Key_Delete },
2319- { XK_KP_Equal, Qt::Key_Equal },
2320- { XK_KP_Multiply, Qt::Key_Asterisk },
2321- { XK_KP_Add, Qt::Key_Plus },
2322- { XK_KP_Separator, Qt::Key_Comma },
2323- { XK_KP_Subtract, Qt::Key_Minus },
2324- { XK_KP_Decimal, Qt::Key_Period },
2325- { XK_KP_Divide, Qt::Key_Slash },
2326-
2327- { XK_KP_0, Qt::Key_0 },
2328- { XK_KP_1, Qt::Key_1 },
2329- { XK_KP_2, Qt::Key_2 },
2330- { XK_KP_3, Qt::Key_3 },
2331- { XK_KP_4, Qt::Key_4 },
2332- { XK_KP_5, Qt::Key_5 },
2333- { XK_KP_6, Qt::Key_6 },
2334- { XK_KP_7, Qt::Key_7 },
2335- { XK_KP_8, Qt::Key_8 },
2336- { XK_KP_9, Qt::Key_9 },
2337-
2338-//International input method support keys
2339-//International & multi-key character composition
2340-
2341- { XK_ISO_Level3_Shift, Qt::Key_AltGr },
2342- { XK_Multi_key, Qt::Key_Multi_key },
2343- { XK_Codeinput, Qt::Key_Codeinput },
2344- { XK_SingleCandidate, Qt::Key_SingleCandidate },
2345- { XK_MultipleCandidate, Qt::Key_MultipleCandidate },
2346- { XK_PreviousCandidate, Qt::Key_PreviousCandidate },
2347-
2348-// Misc Functions
2349- { XK_Mode_switch, Qt::Key_Mode_switch },
2350- { XK_script_switch, Qt::Key_Mode_switch },
2351-
2352-// Japanese keyboard support
2353- { XK_Kanji, Qt::Key_Kanji },
2354- { XK_Muhenkan, Qt::Key_Muhenkan },
2355- //{ XK_Henkan_Mode, Qt::Key_Henkan_Mode },
2356- { XK_Henkan_Mode, Qt::Key_Henkan },
2357- { XK_Henkan, Qt::Key_Henkan },
2358- { XK_Romaji, Qt::Key_Romaji },
2359- { XK_Hiragana, Qt::Key_Hiragana },
2360- { XK_Katakana, Qt::Key_Katakana },
2361- { XK_Hiragana_Katakana, Qt::Key_Hiragana_Katakana },
2362- { XK_Zenkaku, Qt::Key_Zenkaku },
2363- { XK_Hankaku, Qt::Key_Hankaku },
2364- { XK_Zenkaku_Hankaku, Qt::Key_Zenkaku_Hankaku },
2365- { XK_Touroku, Qt::Key_Touroku },
2366- { XK_Massyo, Qt::Key_Massyo },
2367- { XK_Kana_Lock, Qt::Key_Kana_Lock },
2368- { XK_Kana_Shift, Qt::Key_Kana_Shift },
2369- { XK_Eisu_Shift, Qt::Key_Eisu_Shift },
2370- { XK_Eisu_toggle, Qt::Key_Eisu_toggle },
2371- //{ XK_Kanji_Bangou, Qt::Key_Kanji_Bangou },
2372- //{ XK_Zen_Koho, Qt::Key_Zen_Koho },
2373- //{ XK_Mae_Koho, Qt::Key_Mae_Koho },
2374- { XK_Kanji_Bangou, Qt::Key_Codeinput },
2375- { XK_Zen_Koho, Qt::Key_MultipleCandidate },
2376- { XK_Mae_Koho, Qt::Key_PreviousCandidate },
2377-
2378-#ifdef XK_KOREAN
2379-// Korean keyboard support
2380- { XK_Hangul, Qt::Key_Hangul },
2381- { XK_Hangul_Start, Qt::Key_Hangul_Start },
2382- { XK_Hangul_End, Qt::Key_Hangul_End },
2383- { XK_Hangul_Hanja, Qt::Key_Hangul_Hanja },
2384- { XK_Hangul_Jamo, Qt::Key_Hangul_Jamo },
2385- { XK_Hangul_Romaja, Qt::Key_Hangul_Romaja },
2386- //{ XK_Hangul_Codeinput, Qt::Key_Hangul_Codeinput },
2387- { XK_Hangul_Codeinput, Qt::Key_Codeinput },
2388- { XK_Hangul_Jeonja, Qt::Key_Hangul_Jeonja },
2389- { XK_Hangul_Banja, Qt::Key_Hangul_Banja },
2390- { XK_Hangul_PreHanja, Qt::Key_Hangul_PreHanja },
2391- { XK_Hangul_PostHanja, Qt::Key_Hangul_PostHanja },
2392- //{ XK_Hangul_SingleCandidate,Qt::Key_Hangul_SingleCandidate },
2393- //{ XK_Hangul_MultipleCandidate,Qt::Key_Hangul_MultipleCandidate },
2394- //{ XK_Hangul_PreviousCandidate,Qt::Key_Hangul_PreviousCandidate },
2395- { XK_Hangul_SingleCandidate, Qt::Key_SingleCandidate },
2396- { XK_Hangul_MultipleCandidate,Qt::Key_MultipleCandidate },
2397- { XK_Hangul_PreviousCandidate,Qt::Key_PreviousCandidate },
2398- { XK_Hangul_Special, Qt::Key_Hangul_Special },
2399- //{ XK_Hangul_switch, Qt::Key_Hangul_switch },
2400- { XK_Hangul_switch, Qt::Key_Mode_switch },
2401-#endif // XK_KOREAN
2402-
2403-// dead keys
2404- { XK_dead_grave, Qt::Key_Dead_Grave },
2405- { XK_dead_acute, Qt::Key_Dead_Acute },
2406- { XK_dead_circumflex, Qt::Key_Dead_Circumflex },
2407- { XK_dead_tilde, Qt::Key_Dead_Tilde },
2408- { XK_dead_macron, Qt::Key_Dead_Macron },
2409- { XK_dead_breve, Qt::Key_Dead_Breve },
2410- { XK_dead_abovedot, Qt::Key_Dead_Abovedot },
2411- { XK_dead_diaeresis, Qt::Key_Dead_Diaeresis },
2412- { XK_dead_abovering, Qt::Key_Dead_Abovering },
2413- { XK_dead_doubleacute, Qt::Key_Dead_Doubleacute },
2414- { XK_dead_caron, Qt::Key_Dead_Caron },
2415- { XK_dead_cedilla, Qt::Key_Dead_Cedilla },
2416- { XK_dead_ogonek, Qt::Key_Dead_Ogonek },
2417- { XK_dead_iota, Qt::Key_Dead_Iota },
2418- { XK_dead_voiced_sound, Qt::Key_Dead_Voiced_Sound },
2419- { XK_dead_semivoiced_sound, Qt::Key_Dead_Semivoiced_Sound },
2420- { XK_dead_belowdot, Qt::Key_Dead_Belowdot },
2421- { XK_dead_hook, Qt::Key_Dead_Hook },
2422- { XK_dead_horn, Qt::Key_Dead_Horn },
2423-
2424-// Special keys from X.org - This include multimedia keys,
2425-// wireless/bluetooth/uwb keys , special launcher keys, etc.
2426-
2427-#if 0
2428- { XF86XK_Back, Qt::Key_Back },
2429- { XF86XK_Forward, Qt::Key_Forward },
2430- { XF86XK_Stop, Qt::Key_Stop },
2431- { XF86XK_Refresh, Qt::Key_Refresh },
2432- { XF86XK_Favorites, Qt::Key_Favorites },
2433- { XF86XK_AudioMedia, Qt::Key_LaunchMedia },
2434- { XF86XK_OpenURL, Qt::Key_OpenUrl },
2435- { XF86XK_HomePage, Qt::Key_HomePage },
2436- { XF86XK_Search, Qt::Key_Search },
2437- { XF86XK_AudioLowerVolume, Qt::Key_VolumeDown },
2438- { XF86XK_AudioMute, Qt::Key_VolumeMute },
2439- { XF86XK_AudioRaiseVolume, Qt::Key_VolumeUp },
2440- { XF86XK_AudioPlay, Qt::Key_MediaPlay },
2441- { XF86XK_AudioStop, Qt::Key_MediaStop },
2442- { XF86XK_AudioPrev, Qt::Key_MediaPrevious },
2443- { XF86XK_AudioNext, Qt::Key_MediaNext },
2444- { XF86XK_AudioRecord, Qt::Key_MediaRecord },
2445- { XF86XK_Mail, Qt::Key_LaunchMail },
2446- { XF86XK_MyComputer, Qt::Key_Launch0 },
2447- { XF86XK_Calculator, Qt::Key_Calculator },
2448- { XF86XK_Memo, Qt::Key_Memo },
2449- { XF86XK_ToDoList, Qt::Key_ToDoList },
2450- { XF86XK_Calendar, Qt::Key_Calendar },
2451- { XF86XK_PowerDown, Qt::Key_PowerDown },
2452- { XF86XK_ContrastAdjust, Qt::Key_ContrastAdjust },
2453- { XF86XK_Standby, Qt::Key_Standby },
2454- { XF86XK_MonBrightnessUp, Qt::Key_MonBrightnessUp },
2455- { XF86XK_MonBrightnessDown, Qt::Key_MonBrightnessDown },
2456- { XF86XK_KbdLightOnOff, Qt::Key_KeyboardLightOnOff },
2457- { XF86XK_KbdBrightnessUp, Qt::Key_KeyboardBrightnessUp },
2458- { XF86XK_KbdBrightnessDown, Qt::Key_KeyboardBrightnessDown },
2459- { XF86XK_PowerOff, Qt::Key_PowerOff },
2460- { XF86XK_WakeUp, Qt::Key_WakeUp },
2461- { XF86XK_Eject, Qt::Key_Eject },
2462- { XF86XK_ScreenSaver, Qt::Key_ScreenSaver },
2463- { XF86XK_WWW, Qt::Key_WWW },
2464- { XF86XK_Sleep, Qt::Key_Sleep },
2465- { XF86XK_LightBulb, Qt::Key_LightBulb },
2466- { XF86XK_Shop, Qt::Key_Shop },
2467- { XF86XK_History, Qt::Key_History },
2468- { XF86XK_AddFavorite, Qt::Key_AddFavorite },
2469- { XF86XK_HotLinks, Qt::Key_HotLinks },
2470- { XF86XK_BrightnessAdjust, Qt::Key_BrightnessAdjust },
2471- { XF86XK_Finance, Qt::Key_Finance },
2472- { XF86XK_Community, Qt::Key_Community },
2473- { XF86XK_AudioRewind, Qt::Key_AudioRewind },
2474- { XF86XK_BackForward, Qt::Key_BackForward },
2475- { XF86XK_ApplicationLeft, Qt::Key_ApplicationLeft },
2476- { XF86XK_ApplicationRight, Qt::Key_ApplicationRight },
2477- { XF86XK_Book, Qt::Key_Book },
2478- { XF86XK_CD, Qt::Key_CD },
2479- { XF86XK_Calculater, Qt::Key_Calculator },
2480- { XF86XK_Clear, Qt::Key_Clear },
2481- { XF86XK_ClearGrab, Qt::Key_ClearGrab },
2482- { XF86XK_Close, Qt::Key_Close },
2483- { XF86XK_Copy, Qt::Key_Copy },
2484- { XF86XK_Cut, Qt::Key_Cut },
2485- { XF86XK_Display, Qt::Key_Display },
2486- { XF86XK_DOS, Qt::Key_DOS },
2487- { XF86XK_Documents, Qt::Key_Documents },
2488- { XF86XK_Excel, Qt::Key_Excel },
2489- { XF86XK_Explorer, Qt::Key_Explorer },
2490- { XF86XK_Game, Qt::Key_Game },
2491- { XF86XK_Go, Qt::Key_Go },
2492- { XF86XK_iTouch, Qt::Key_iTouch },
2493- { XF86XK_LogOff, Qt::Key_LogOff },
2494- { XF86XK_Market, Qt::Key_Market },
2495- { XF86XK_Meeting, Qt::Key_Meeting },
2496- { XF86XK_MenuKB, Qt::Key_MenuKB },
2497- { XF86XK_MenuPB, Qt::Key_MenuPB },
2498- { XF86XK_MySites, Qt::Key_MySites },
2499- { XF86XK_News, Qt::Key_News },
2500- { XF86XK_OfficeHome, Qt::Key_OfficeHome },
2501- { XF86XK_Option, Qt::Key_Option },
2502- { XF86XK_Paste, Qt::Key_Paste },
2503- { XF86XK_Phone, Qt::Key_Phone },
2504- { XF86XK_Reply, Qt::Key_Reply },
2505- { XF86XK_Reload, Qt::Key_Reload },
2506- { XF86XK_RotateWindows, Qt::Key_RotateWindows },
2507- { XF86XK_RotationPB, Qt::Key_RotationPB },
2508- { XF86XK_RotationKB, Qt::Key_RotationKB },
2509- { XF86XK_Save, Qt::Key_Save },
2510- { XF86XK_Send, Qt::Key_Send },
2511- { XF86XK_Spell, Qt::Key_Spell },
2512- { XF86XK_SplitScreen, Qt::Key_SplitScreen },
2513- { XF86XK_Support, Qt::Key_Support },
2514- { XF86XK_TaskPane, Qt::Key_TaskPane },
2515- { XF86XK_Terminal, Qt::Key_Terminal },
2516- { XF86XK_Tools, Qt::Key_Tools },
2517- { XF86XK_Travel, Qt::Key_Travel },
2518- { XF86XK_Video, Qt::Key_Video },
2519- { XF86XK_Word, Qt::Key_Word },
2520- { XF86XK_Xfer, Qt::Key_Xfer },
2521- { XF86XK_ZoomIn, Qt::Key_ZoomIn },
2522- { XF86XK_ZoomOut, Qt::Key_ZoomOut },
2523- { XF86XK_Away, Qt::Key_Away },
2524- { XF86XK_Messenger, Qt::Key_Messenger },
2525- { XF86XK_WebCam, Qt::Key_WebCam },
2526- { XF86XK_MailForward, Qt::Key_MailForward },
2527- { XF86XK_Pictures, Qt::Key_Pictures },
2528- { XF86XK_Music, Qt::Key_Music },
2529- { XF86XK_Battery, Qt::Key_Battery },
2530- { XF86XK_Bluetooth, Qt::Key_Bluetooth },
2531- { XF86XK_WLAN, Qt::Key_WLAN },
2532- { XF86XK_UWB, Qt::Key_UWB },
2533- { XF86XK_AudioForward, Qt::Key_AudioForward },
2534- { XF86XK_AudioRepeat, Qt::Key_AudioRepeat },
2535- { XF86XK_AudioRandomPlay, Qt::Key_AudioRandomPlay },
2536- { XF86XK_Subtitle, Qt::Key_Subtitle },
2537- { XF86XK_AudioCycleTrack, Qt::Key_AudioCycleTrack },
2538- { XF86XK_Time, Qt::Key_Time },
2539- { XF86XK_Select, Qt::Key_Select },
2540- { XF86XK_View, Qt::Key_View },
2541- { XF86XK_TopMenu, Qt::Key_TopMenu },
2542- { XF86XK_Bluetooth, Qt::Key_Bluetooth },
2543- { XF86XK_Suspend, Qt::Key_Suspend },
2544- { XF86XK_Hibernate, Qt::Key_Hibernate },
2545- { XF86XK_Launch0, Qt::Key_Launch2 },
2546- { XF86XK_Launch1, Qt::Key_Launch3 },
2547- { XF86XK_Launch2, Qt::Key_Launch4 },
2548- { XF86XK_Launch3, Qt::Key_Launch5 },
2549- { XF86XK_Launch4, Qt::Key_Launch6 },
2550- { XF86XK_Launch5, Qt::Key_Launch7 },
2551- { XF86XK_Launch6, Qt::Key_Launch8 },
2552- { XF86XK_Launch7, Qt::Key_Launch9 },
2553- { XF86XK_Launch8, Qt::Key_LaunchA },
2554- { XF86XK_Launch9, Qt::Key_LaunchB },
2555- { XF86XK_LaunchA, Qt::Key_LaunchC },
2556- { XF86XK_LaunchB, Qt::Key_LaunchD },
2557- { XF86XK_LaunchC, Qt::Key_LaunchE },
2558- { XF86XK_LaunchD, Qt::Key_LaunchF },
2559-#endif
2560-
2561- { 0, 0}
2562-};
2563-
2564-#endif
2565-
2566-
2567-int
2568-QtKeyToXKeySym(int qtKey) {
2569-
2570- // TODO: Need to complete this function for all scenario.
2571- int i;
2572- int count = sizeof(QtKeyXSymMaps)/sizeof(KeySymMap);
2573-
2574- if (qtKey < 0x1000) {
2575- //return QChar(qtKey).toLower().unicode();
2576- return qtKey;
2577- }
2578-
2579- for(i = 0; i < count; i++ ) {
2580- if( QtKeyXSymMaps[i].QtKey == qtKey ) {
2581- return QtKeyXSymMaps[i].XKeySym;
2582- }
2583- }
2584-
2585- return 0;
2586-}
2587-
2588-
2589-int
2590-XKeySymToQTKey(uint keySym)
2591-{
2592- int i;
2593- int count = sizeof(QtKeyXSymMaps)/sizeof(KeySymMap);
2594-
2595- if ((keySym < 0x1000)) {
2596- //if (keySym >= 'a' && keySym <= 'z')
2597- // return QChar(keySym).toUpper().toAscii();
2598- return keySym;
2599- }
2600-
2601-#ifdef Q_WS_WIN
2602- if(keySym < 0x3000)
2603- return keySym;
2604-#else
2605- if (keySym < 0x3000 )
2606- return keySym | Qt::UNICODE_ACCEL;
2607-
2608- for(i = 0; i < count; i++)
2609- if(QtKeyXSymMaps[i].XKeySym == keySym)
2610- return QtKeyXSymMaps[i].QtKey;
2611-#endif
2612- return Qt::Key_unknown;
2613-}
2614-
2615
2616=== removed file 'connection-glib/qt-keysym-map.h'
2617--- connection-glib/qt-keysym-map.h 2012-05-22 06:12:09 +0000
2618+++ connection-glib/qt-keysym-map.h 1970-01-01 00:00:00 +0000
2619@@ -1,14 +0,0 @@
2620-#ifndef _QT_KEYSYM_MAP_H
2621-#define _QT_KEYSYM_MAP_H
2622-
2623-#include <glib.h>
2624-
2625-G_BEGIN_DECLS
2626-
2627-int QtKeyToXKeySym(int qtKey);
2628-int XKeySymToQTKey(uint keySym);
2629-
2630-
2631-G_END_DECLS
2632-
2633-#endif //_QT_KEYSYM_MAP_H
2634
2635=== modified file 'connection/.gitignore'
2636--- connection/.gitignore 2013-03-21 13:59:07 +0000
2637+++ connection/.gitignore 2013-06-27 13:54:25 +0000
2638@@ -1,8 +1,5 @@
2639 org.maliit.server.service
2640 minputmethodserver.service
2641-mdbusglibicconnectionserviceglue.h
2642-mdbusglibinputcontextadaptorglue.h
2643-maliit-connection.pc
2644 minputmethodcontext1interface_adaptor.cpp
2645 minputmethodcontext1interface_adaptor.h
2646 minputmethodcontext1interface_interface.cpp
2647@@ -11,5 +8,3 @@
2648 minputmethodserver1interface_adaptor.h
2649 minputmethodserver1interface_interface.cpp
2650 minputmethodserver1interface_interface.h
2651-maliitmarshalers.c
2652-maliitmarshalers.h
2653
2654=== modified file 'connection/connection.pro'
2655--- connection/connection.pro 2013-03-21 13:59:07 +0000
2656+++ connection/connection.pro 2013-06-27 13:54:25 +0000
2657@@ -7,236 +7,67 @@
2658 TARGET = $$TOP_DIR/lib/$$MALIIT_CONNECTION_LIB
2659
2660 include($$TOP_DIR/common/libmaliit-common.pri)
2661+include($$TOP_DIR/weston-protocols/libmaliit-weston-protocols.pri)
2662
2663 DEFINES += MALIIT_INPUTCONTEXT_NAME=\\\"$${MALIIT_INPUTCONTEXT_NAME}\\\"
2664-CONFIG += link_pkgconfig
2665+CONFIG += staticlib
2666
2667 # Interface classes
2668 PUBLIC_HEADERS += \
2669 connectionfactory.h \
2670- mimserverconnection.h \
2671 minputcontextconnection.h \
2672
2673 PUBLIC_SOURCES += \
2674 connectionfactory.cpp \
2675- mimserverconnection.cpp \
2676 minputcontextconnection.cpp \
2677
2678-# Default to building direct connection
2679-CONFIG += direct-connection
2680+# Default to building qdbus based connection
2681+CONFIG += qdbus-dbus-connection
2682
2683-direct-connection {
2684+wayland {
2685+ QT += gui-private
2686 PUBLIC_SOURCES += \
2687- miminputcontextdirectconnection.cpp \
2688- mimdirectserverconnection.cpp \
2689-
2690+ waylandinputmethodconnection.cpp
2691 PUBLIC_HEADERS += \
2692- miminputcontextdirectconnection.h \
2693- mimdirectserverconnection.h \
2694-}
2695-
2696-# Default to building glib-dbus based connection
2697-disable-dbus {
2698- DEFINES += MALIIT_DISABLE_DBUS
2699-} else {
2700- enable-qdbus {
2701- CONFIG += qdbus-dbus-connection
2702- } else {
2703- CONFIG += glib-dbus-connection
2704- }
2705-}
2706-
2707-contains(QT_MAJOR_VERSION, 5) {
2708- wayland {
2709- load(wayland-scanner)
2710- PUBLIC_SOURCES += \
2711- minputcontextwestonimprotocolconnection.cpp
2712- PUBLIC_HEADERS += \
2713- minputcontextwestonimprotocolconnection.h
2714- WAYLANDSOURCES += \
2715- $$IN_PWD/input-method.xml \
2716- $$IN_PWD/text.xml
2717- PKGCONFIG += wayland-client
2718- }
2719+ waylandinputmethodconnection.h
2720 }
2721
2722 include($$TOP_DIR/dbus_interfaces/dbus_interfaces.pri)
2723
2724 qdbus-dbus-connection {
2725- INTERFACE_LIST += $$DBUS_SERVER_XML $$DBUS_CONTEXT_XML
2726- SERVER_ADAPTOR_LIST += $$DBUS_SERVER_XML
2727- IC_ADAPTOR_LIST += $$DBUS_CONTEXT_XML
2728+ server_adaptor.files = $$DBUS_SERVER_XML
2729+ server_adaptor.header_flags = -i dbusinputcontextconnection.h -l DBusInputContextConnection
2730+ server_adaptor.source_flags = -l DBusInputContextConnection
2731+
2732+ context_adaptor.files = $$DBUS_CONTEXT_XML
2733+ context_adaptor.header_flags = -i dbusserverconnection.h -l DBusServerConnection
2734+ context_adaptor.source_flags = -l DBusServerConnection
2735+
2736+ DBUS_ADAPTORS = server_adaptor context_adaptor
2737+ DBUS_INTERFACES = $$DBUS_SERVER_XML $$DBUS_CONTEXT_XML
2738+ QDBUSXML2CPP_INTERFACE_HEADER_FLAGS = -i maliit/namespace.h -i maliit/settingdata.h
2739+
2740+ QT += dbus
2741+
2742+ !enable-dbus-activation {
2743+ DEFINES += NO_DBUS_ACTIVATION
2744+ }
2745
2746 PRIVATE_HEADERS += \
2747 dbuscustomarguments.h \
2748- \ # input-context
2749+ dbusinputcontextconnection.h \
2750+ serverdbusaddress.h \
2751+ mimserverconnection.h \
2752 dbusserverconnection.h \
2753- \ # server
2754- dbusinputcontextconnection.h \
2755+ inputcontextdbusaddress.h \
2756
2757 PRIVATE_SOURCES += \
2758 dbuscustomarguments.cpp \
2759- \ # input-context
2760+ dbusinputcontextconnection.cpp \
2761+ serverdbusaddress.cpp \
2762+ mimserverconnection.cpp \
2763 dbusserverconnection.cpp \
2764- \ # server
2765- dbusinputcontextconnection.cpp \
2766-
2767- qtPrepareTool(QMAKE_QDBUSXML2CPP, qdbusxml2cpp)
2768-
2769- server_adaptor_header.commands = $$QMAKE_QDBUSXML2CPP -i dbusinputcontextconnection.h -l DBusInputContextConnection -a ${QMAKE_FILE_OUT}: ${QMAKE_FILE_IN}
2770- server_adaptor_header.output_function = dbus_adaptor_header_output
2771- server_adaptor_header.name = DBUSXML2CPP ADAPTOR HEADER ${QMAKE_FILE_IN}
2772- server_adaptor_header.variable_out = DBUS_ADAPTOR_HEADERS
2773- server_adaptor_header.input = SERVER_ADAPTOR_LIST
2774-
2775- ic_adaptor_header.commands = $$QMAKE_QDBUSXML2CPP -i dbusserverconnection.h -l DBusServerConnection -a ${QMAKE_FILE_OUT}: ${QMAKE_FILE_IN}
2776- ic_adaptor_header.output_function = dbus_adaptor_header_output
2777- ic_adaptor_header.name = DBUSXML2CPP ADAPTOR HEADER ${QMAKE_FILE_IN}
2778- ic_adaptor_header.variable_out = DBUS_ADAPTOR_HEADERS
2779- ic_adaptor_header.input = IC_ADAPTOR_LIST
2780-
2781- defineReplace(dbus_adaptor_header_output) {
2782- return("$$lower($$section($$list($$basename(1)),.,-2,-2))_adaptor.h")
2783- }
2784-
2785- server_adaptor_source.commands = $$QMAKE_QDBUSXML2CPP -i ${QMAKE_FILE_OUT_BASE}.h -l DBusInputContextConnection -a :${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
2786- server_adaptor_source.output_function = dbus_adaptor_source_output
2787- server_adaptor_source.name = DBUSXML2CPP ADAPTOR SOURCE ${QMAKE_FILE_IN}
2788- server_adaptor_source.variable_out = SOURCES
2789- server_adaptor_source.input = SERVER_ADAPTOR_LIST
2790-
2791- ic_adaptor_source.commands = $$QMAKE_QDBUSXML2CPP -i ${QMAKE_FILE_OUT_BASE}.h -l DBusServerConnection -a :${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
2792- ic_adaptor_source.output_function = dbus_adaptor_source_output
2793- ic_adaptor_source.name = DBUSXML2CPP ADAPTOR SOURCE ${QMAKE_FILE_IN}
2794- ic_adaptor_source.variable_out = SOURCES
2795- ic_adaptor_source.input = IC_ADAPTOR_LIST
2796-
2797- adaptor_moc.commands = $$moc_header.commands
2798- adaptor_moc.output = $$moc_header.output
2799- adaptor_moc.depends = $$dbus_adaptor_header.output
2800- adaptor_moc.input = DBUS_ADAPTOR_HEADERS
2801- adaptor_moc.variable_out = GENERATED_SOURCES
2802- adaptor_moc.name = $$moc_header.name
2803-
2804- defineReplace(dbus_adaptor_source_output) {
2805- return("$$lower($$section($$list($$basename(1)),.,-2,-2))_adaptor.cpp")
2806- }
2807-
2808- interface_header.commands = $$QMAKE_QDBUSXML2CPP -i maliit/namespace.h -i maliit/settingdata.h -p ${QMAKE_FILE_OUT}: ${QMAKE_FILE_IN}
2809- interface_header.output_function = dbus_interface_header_output
2810- interface_header.name = DBUSXML2CPP INTERFACE HEADER ${QMAKE_FILE_IN}
2811- interface_header.variable_out = DBUS_INTERFACE_HEADERS
2812- interface_header.input = INTERFACE_LIST
2813-
2814- defineReplace(dbus_interface_header_output) {
2815- return("$$lower($$section($$list($$basename(1)),.,-2,-2))_interface.h")
2816- }
2817-
2818- interface_source.commands = $$QMAKE_QDBUSXML2CPP -i ${QMAKE_FILE_OUT_BASE}.h -p :${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
2819- interface_source.output_function = dbus_interface_source_output
2820- interface_source.name = DBUSXML2CPP INTERFACE SOURCE ${QMAKE_FILE_IN}
2821- interface_source.variable_out = SOURCES
2822- interface_source.input = INTERFACE_LIST
2823-
2824- interface_moc.commands = $$moc_header.commands
2825- interface_moc.output = $$moc_header.output
2826- interface_moc.depends = $$dbus_interface_header.output
2827- interface_moc.input = DBUS_INTERFACE_HEADERS
2828- interface_moc.variable_out = GENERATED_SOURCES
2829- interface_moc.name = $$moc_header.name
2830-
2831- defineReplace(dbus_interface_source_output) {
2832- return("$$lower($$section($$list($$basename(1)),.,-2,-2))_interface.cpp")
2833- }
2834-
2835- QMAKE_EXTRA_COMPILERS += server_adaptor_header ic_adaptor_header server_adaptor_source ic_adaptor_source adaptor_moc interface_header interface_source interface_moc
2836-}
2837-
2838-glib-dbus-connection {
2839- DEFINES += HAVE_GLIB_DBUS
2840-
2841- PRIVATE_HEADERS += \
2842- \ # common
2843- variantmarshalling.h \
2844- \ # input-context
2845- glibdbusimserverproxy.h \
2846- glibdbusimserverproxy_p.h \
2847- mdbusglibinputcontextadaptor.h \
2848- \ # server
2849- minputcontextglibdbusconnection.h \
2850-
2851- PRIVATE_SOURCES += \
2852- \ # common
2853- variantmarshalling.cpp \
2854- \ # input-context
2855- glibdbusimserverproxy.cpp \
2856- mdbusglibinputcontextadaptor.cpp \
2857- \ # server
2858- minputcontextglibdbusconnection.cpp \
2859-
2860- PKGCONFIG += dbus-glib-1
2861-
2862- # Generate dbus glue for server side
2863- QMAKE_EXTRA_TARGETS += dbus_glue_server
2864- dbus_glue_server.target = $$OUT_PWD/mdbusglibicconnectionserviceglue.h
2865- dbus_glue_server.commands = \
2866- dbus-binding-tool --prefix=m_dbus_glib_ic_connection --mode=glib-server \
2867- --output=$$OUT_PWD/mdbusglibicconnectionserviceglue.h $$DBUS_SERVER_XML
2868- dbus_glue_server.output = $$OUT_PWD/mdbusglibicconnectionserviceglue.h
2869- dbus_glue_server.depends = $$DBUS_SERVER_XML
2870-
2871- # Use to work around the fact that qmake looks up the target for the generated header wrong
2872- QMAKE_EXTRA_TARGETS += fake_dbus_glue_server
2873- fake_dbus_glue_server.target = mdbusglibicconnectionserviceglue.h
2874- fake_dbus_glue_server.depends = dbus_glue_server
2875-
2876- # Generate dbus glue for input-context side
2877- QMAKE_EXTRA_TARGETS += dbus_glue_inputcontext
2878- dbus_glue_inputcontext.target = $$OUT_PWD/mdbusglibinputcontextadaptorglue.h
2879- dbus_glue_inputcontext.commands = \
2880- dbus-binding-tool --prefix=m_dbus_glib_input_context_adaptor --mode=glib-server \
2881- --output=$$OUT_PWD/mdbusglibinputcontextadaptorglue.h $$DBUS_CONTEXT_XML
2882- dbus_glue_inputcontext.output = $$OUT_PWD/mdbusglibinputcontextadaptorglue.h
2883- dbus_glue_inputcontext.depends = $$DBUS_CONTEXT_XML
2884-
2885- # Use to work around the fact that qmake looks up the target for the generated header wrong
2886- QMAKE_EXTRA_TARGETS += fake_dbus_glue_inputcontext
2887- fake_dbus_glue_inputcontext.target = mdbusglibinputcontextadaptorglue.h
2888- fake_dbus_glue_inputcontext.depends = dbus_glue_inputcontext
2889-
2890- GLIB_GENMARSHAL_LIST += maliitmarshalers.list
2891-
2892- OTHER_FILES += maliitmarshalers.list
2893-
2894- glib_genmarshal_header.name = glib-genmarshal header ${QMAKE_FILE_IN}
2895- glib_genmarshal_header.commands = glib-genmarshal --prefix=_maliit_marshal --header --g-fatal-warnings ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
2896- glib_genmarshal_header.output = ${QMAKE_FILE_IN_BASE}.h
2897- glib_genmarshal_header.variable_out = PRIVATE_HEADERS
2898- glib_genmarshal_header.input = GLIB_GENMARSHAL_LIST
2899-
2900- glib_genmarshal_source.name = glib-genmarshal source ${QMAKE_FILE_IN}
2901- glib_genmarshal_source.commands = glib-genmarshal --prefix=_maliit_marshal --body --g-fatal-warnings ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
2902- glib_genmarshal_source.output = ${QMAKE_FILE_IN_BASE}.c
2903- glib_genmarshal_source.variable_out = SOURCES
2904- glib_genmarshal_source.input = GLIB_GENMARSHAL_LIST
2905-
2906- QMAKE_EXTRA_COMPILERS += glib_genmarshal_header glib_genmarshal_source
2907-}
2908-
2909-qdbus-dbus-connection|glib-dbus-connection {
2910- QT += dbus
2911-
2912- !enable-dbus-activation {
2913- DEFINES += NO_DBUS_ACTIVATION
2914- }
2915-
2916- PRIVATE_HEADERS += \
2917- inputcontextdbusaddress.h \
2918- serverdbusaddress.h \
2919-
2920- PRIVATE_SOURCES += \
2921 inputcontextdbusaddress.cpp \
2922- serverdbusaddress.cpp \
2923
2924 # DBus activation
2925 enable-dbus-activation {
2926@@ -262,19 +93,4 @@
2927 $$PUBLIC_SOURCES \
2928 $$PRIVATE_SOURCES \
2929
2930-target.path += $$LIBDIR
2931-
2932-public_headers.path += $$INCLUDEDIR/$$MALIIT_CONNECTION_HEADER
2933-public_headers.files += $$PUBLIC_HEADERS
2934-
2935-OTHER_FILES += maliit-connection.pc.in
2936-outputFiles(maliit-connection.pc)
2937-
2938-install_pkgconfig.path = $${LIBDIR}/pkgconfig
2939-install_pkgconfig.files = maliit-connection.pc
2940-
2941-INSTALLS += target \
2942- public_headers \
2943- install_pkgconfig \
2944-
2945 OTHER_FILES += libmaliit-connection.pri
2946
2947=== modified file 'connection/connectionfactory.cpp'
2948--- connection/connectionfactory.cpp 2013-03-21 13:59:07 +0000
2949+++ connection/connectionfactory.cpp 2013-06-27 13:54:25 +0000
2950@@ -14,118 +14,35 @@
2951
2952 #include "connectionfactory.h"
2953
2954-#ifndef MALIIT_DISABLE_DBUS
2955-#ifdef HAVE_GLIB_DBUS
2956-#include "glibdbusimserverproxy.h"
2957-#include "minputcontextglibdbusconnection.h"
2958-#else
2959-#include "dbusserverconnection.h"
2960 #include "dbusinputcontextconnection.h"
2961-#endif
2962-#endif
2963-#include "mimdirectserverconnection.h"
2964
2965 #ifdef HAVE_WAYLAND
2966-#include "minputcontextwestonimprotocolconnection.h"
2967+#include "waylandinputmethodconnection.h"
2968 #endif
2969
2970 namespace Maliit {
2971-#ifndef MALIIT_DISABLE_DBUS
2972 namespace DBus {
2973
2974-MImServerConnection *createServerConnectionWithDynamicAddress()
2975-{
2976- const QSharedPointer<Maliit::InputContext::DBus::Address> address(new Maliit::InputContext::DBus::DynamicAddress);
2977-#ifdef HAVE_GLIB_DBUS
2978- return new GlibDBusIMServerProxy(address);
2979-#else
2980- return new DBusServerConnection(address);
2981-#endif
2982-}
2983-
2984-MImServerConnection *createServerConnectionWithFixedAddress(const QString &fixedAddress)
2985-{
2986- const QSharedPointer<Maliit::InputContext::DBus::Address> address(new Maliit::InputContext::DBus::FixedAddress(fixedAddress));
2987-#ifdef HAVE_GLIB_DBUS
2988- return new GlibDBusIMServerProxy(address);
2989-#else
2990- return new DBusServerConnection(address);
2991-#endif
2992-}
2993-
2994 MInputContextConnection *createInputContextConnectionWithDynamicAddress()
2995 {
2996-#ifdef HAVE_GLIB_DBUS
2997- std::tr1::shared_ptr<Maliit::Server::DBus::Address> address(new Maliit::Server::DBus::DynamicAddress);
2998- return new MInputContextGlibDBusConnection(address, false);
2999-#else
3000 QSharedPointer<Maliit::Server::DBus::Address> address(new Maliit::Server::DBus::DynamicAddress);
3001 return new DBusInputContextConnection(address);
3002-#endif
3003 }
3004
3005 MInputContextConnection *createInputContextConnectionWithFixedAddress(const QString &fixedAddress, bool allowAnonymous)
3006 {
3007-#ifdef HAVE_GLIB_DBUS
3008- std::tr1::shared_ptr<Maliit::Server::DBus::Address> address(new Maliit::Server::DBus::FixedAddress(fixedAddress));
3009- return new MInputContextGlibDBusConnection(address, allowAnonymous);
3010-#else
3011 Q_UNUSED(allowAnonymous);
3012 QSharedPointer<Maliit::Server::DBus::Address> address(new Maliit::Server::DBus::FixedAddress(fixedAddress));
3013 return new DBusInputContextConnection(address);
3014-#endif
3015 }
3016
3017 } // namespace DBus
3018-#endif // MALIIT_DISABLE_DBUS
3019
3020 #ifdef HAVE_WAYLAND
3021 MInputContextConnection *createWestonIMProtocolConnection()
3022 {
3023- return new MInputContextWestonIMProtocolConnection;
3024-}
3025-#endif
3026-
3027-QSharedPointer<MImServerConnection> createServerConnection(const QString &connectionType)
3028-{
3029- typedef QSharedPointer<MImServerConnection> ConnectionPtr;
3030- static QWeakPointer<MImServerConnection> cached_connection;
3031-
3032- if (ConnectionPtr connection = cached_connection.toStrongRef()) {
3033- return connection;
3034- }
3035-
3036- if (connectionType.isEmpty()) {
3037- qCritical() << "Empty connection type name. Refusing to connect to Maliit server."
3038- << "\nHave you checked the environment variables for loading input method"
3039- << "modules ([QT|GTK]_IM_MODULE)?";
3040- return ConnectionPtr();
3041- }
3042-
3043- if (connectionType == MALIIT_INPUTCONTEXT_NAME) {
3044-#ifndef MALIIT_DISABLE_DBUS
3045- const QByteArray overriddenAddress = qgetenv("MALIIT_SERVER_ADDRESS");
3046- ConnectionPtr connection = ConnectionPtr(overriddenAddress.isEmpty()
3047- ? Maliit::DBus::createServerConnectionWithDynamicAddress()
3048- : Maliit::DBus::createServerConnectionWithFixedAddress(overriddenAddress));
3049- cached_connection = connection;
3050-
3051- return connection;
3052-#else
3053- qCritical("This connection type to Maliit server is not available since DBus support is disabled");
3054-#endif
3055- } else if (connectionType == MALIIT_INPUTCONTEXT_NAME"Direct") {
3056- ConnectionPtr connection(new MImDirectServerConnection);
3057-
3058- cached_connection = connection;
3059-
3060- return connection;
3061- } else {
3062- qCritical() << __PRETTY_FUNCTION__
3063- << "Invalid connection type (" + connectionType + "),"
3064- << "unable to create connection to Maliit server";
3065- return ConnectionPtr();
3066- }
3067-}
3068+ return new WaylandInputMethodConnection;
3069+}
3070+#endif
3071
3072 } // namespace Maliit
3073
3074=== modified file 'connection/connectionfactory.h'
3075--- connection/connectionfactory.h 2013-03-21 13:59:07 +0000
3076+++ connection/connectionfactory.h 2013-06-27 13:54:25 +0000
3077@@ -15,37 +15,20 @@
3078 #ifndef MALIIT_DBUS_CONNECTIONFACTORY_H
3079 #define MALIIT_DBUS_CONNECTIONFACTORY_H
3080
3081-#include "mimserverconnection.h"
3082 #include "minputcontextconnection.h"
3083
3084 namespace Maliit {
3085-#ifndef MALIIT_DISABLE_DBUS
3086 namespace DBus {
3087
3088-MImServerConnection *createServerConnectionWithDynamicAddress();
3089-MImServerConnection *createServerConnectionWithFixedAddress(const QString &address);
3090-
3091 MInputContextConnection *createInputContextConnectionWithDynamicAddress();
3092 MInputContextConnection *createInputContextConnectionWithFixedAddress(const QString &fixedAddress, bool allowAnonymous);
3093
3094 } // namespace DBus
3095-#endif
3096
3097 #ifdef HAVE_WAYLAND
3098 MInputContextConnection *createWestonIMProtocolConnection();
3099 #endif
3100
3101-/*!
3102- \brief Create a connection to Maliit server
3103- \param connectionType input context name (same as in QT_IM_MODULE environment variable)
3104-
3105- Might return a cached connection.
3106-
3107- If \a connectionType is "Maliit", and MALIIT_SERVER_ADDRESS environment variable is set,
3108- uses its value as the server address.
3109-*/
3110-QSharedPointer<MImServerConnection> createServerConnection(const QString &connectionType);
3111-
3112 } // namespace Maliit
3113
3114 #endif // MALIIT_DBUS_CONNECTIONFACTORY_H
3115
3116=== modified file 'connection/dbuscustomarguments.cpp'
3117--- connection/dbuscustomarguments.cpp 2012-07-10 09:00:33 +0000
3118+++ connection/dbuscustomarguments.cpp 2013-06-27 13:54:25 +0000
3119@@ -85,3 +85,29 @@
3120
3121 return argument;
3122 }
3123+
3124+QDBusArgument &operator<<(QDBusArgument &arg, const Maliit::PreeditTextFormat &format)
3125+{
3126+ arg.beginStructure();
3127+ arg << format.start
3128+ << format.length
3129+ << static_cast<int>(format.preeditFace);
3130+ arg.endStructure();
3131+
3132+ return arg;
3133+}
3134+
3135+const QDBusArgument &operator>>(const QDBusArgument &arg, Maliit::PreeditTextFormat &format)
3136+{
3137+ int preedit_face(0);
3138+
3139+ arg.beginStructure();
3140+ arg >> format.start
3141+ >> format.length
3142+ >> preedit_face;
3143+ arg.endStructure();
3144+ format.preeditFace = static_cast<Maliit::PreeditFace> (preedit_face);
3145+
3146+ return arg;
3147+}
3148+
3149
3150=== modified file 'connection/dbuscustomarguments.h'
3151--- connection/dbuscustomarguments.h 2012-07-10 09:00:33 +0000
3152+++ connection/dbuscustomarguments.h 2013-06-27 13:54:25 +0000
3153@@ -19,6 +19,8 @@
3154 class QDBusArgument;
3155 class QVariant;
3156
3157+#include <maliit/namespace.h>
3158+
3159
3160 // MImPluginSettingsEntry marshalling
3161 QDBusArgument &operator<<(QDBusArgument &argument, const MImPluginSettingsEntry &entry);
3162@@ -28,4 +30,7 @@
3163 QDBusArgument &operator<<(QDBusArgument &argument, const MImPluginSettingsInfo &info);
3164 const QDBusArgument &operator>>(const QDBusArgument &argument, MImPluginSettingsInfo &info);
3165
3166+QDBusArgument &operator<<(QDBusArgument &arg, const Maliit::PreeditTextFormat &format);
3167+const QDBusArgument &operator>>(const QDBusArgument &arg, Maliit::PreeditTextFormat &format);
3168+
3169 #endif // DBUSCUSTOMARGUMENTS_H
3170
3171=== modified file 'connection/dbusinputcontextconnection.cpp'
3172--- connection/dbusinputcontextconnection.cpp 2012-08-06 12:48:36 +0000
3173+++ connection/dbusinputcontextconnection.cpp 2013-06-27 13:54:25 +0000
3174@@ -26,15 +26,17 @@
3175
3176 namespace
3177 {
3178- const char * const DBusPath = "/com/meego/inputmethod/uiserver1";
3179- const char * const DBusInterface = "com.meego.inputmethod.uiserver1";
3180-
3181- const char * const DBusClientPath = "/com/meego/inputmethod/inputcontext";
3182- const char * const DBusClientInterface = "com.meego.inputmethod.inputcontext1";
3183-
3184- const char * const DBusLocalPath("/org/freedesktop/DBus/Local");
3185- const char * const DBusLocalInterface("org.freedesktop.DBus.Local");
3186- const char * const DisconnectedSignal("Disconnected");
3187+
3188+const char * const DBusPath = "/com/meego/inputmethod/uiserver1";
3189+const char * const DBusInterface = "com.meego.inputmethod.uiserver1";
3190+
3191+const char * const DBusClientPath = "/com/meego/inputmethod/inputcontext";
3192+const char * const DBusClientInterface = "com.meego.inputmethod.inputcontext1";
3193+
3194+const char * const DBusLocalPath("/org/freedesktop/DBus/Local");
3195+const char * const DBusLocalInterface("org.freedesktop.DBus.Local");
3196+const char * const DisconnectedSignal("Disconnected");
3197+
3198 }
3199
3200 DBusInputContextConnection::DBusInputContextConnection(const QSharedPointer<Maliit::Server::DBus::Address> &address)
3201@@ -50,6 +52,8 @@
3202 qDBusRegisterMetaType<MImPluginSettingsEntry>();
3203 qDBusRegisterMetaType<MImPluginSettingsInfo>();
3204 qDBusRegisterMetaType<QList<MImPluginSettingsInfo> >();
3205+ qDBusRegisterMetaType<Maliit::PreeditTextFormat>();
3206+ qDBusRegisterMetaType<QList<Maliit::PreeditTextFormat> >();
3207
3208 new Uiserver1Adaptor(this);
3209 }
3210@@ -89,6 +93,7 @@
3211 ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.take(connectionNumber);
3212 mConnections.remove(connectionNumber);
3213 delete proxy;
3214+ handleDisconnection(connectionNumber);
3215 }
3216
3217 void
3218@@ -249,6 +254,7 @@
3219 void
3220 DBusInputContextConnection::updateInputMethodArea(const QRegion &region)
3221 {
3222+ qDebug() << "Updating input method area to" << region;
3223 ComMeegoInputmethodInputcontext1Interface *proxy = mProxys.value(activeConnection);
3224 if (proxy) {
3225 QRect rect = region.boundingRect();
3226
3227=== modified file 'connection/dbusserverconnection.cpp'
3228--- connection/dbusserverconnection.cpp 2012-08-06 12:48:36 +0000
3229+++ connection/dbusserverconnection.cpp 2013-06-27 13:54:25 +0000
3230@@ -14,6 +14,7 @@
3231
3232 #include "dbusserverconnection.h"
3233
3234+#include <maliit/namespace.h>
3235 #include <maliit/settingdata.h>
3236
3237 #include "minputmethodcontext1interface_adaptor.h"
3238@@ -41,13 +42,15 @@
3239 , mActive(true)
3240 , pendingResetCalls()
3241 {
3242- new Inputcontext1Adaptor(this);
3243-
3244 qDBusRegisterMetaType<MImPluginSettingsEntry>();
3245 qDBusRegisterMetaType<MImPluginSettingsInfo>();
3246 qDBusRegisterMetaType<QList<MImPluginSettingsInfo> >();
3247-
3248- connect(mAddress.data(), SIGNAL(addressRecieved(QString)),
3249+ qDBusRegisterMetaType<Maliit::PreeditTextFormat>();
3250+ qDBusRegisterMetaType<QList<Maliit::PreeditTextFormat> >();
3251+
3252+ new Inputcontext1Adaptor(this);
3253+
3254+ connect(mAddress.data(), SIGNAL(addressReceived(QString)),
3255 this, SLOT(openDBusConnection(QString)));
3256 connect(mAddress.data(), SIGNAL(addressFetchError(QString)),
3257 this, SLOT(connectToDBusFailed(QString)));
3258@@ -90,8 +93,9 @@
3259
3260 connection.registerObject(QString::fromLatin1(InputContextAdaptorPath), this);
3261
3262+#if 0
3263 connect(mProxy, SIGNAL(invokeAction(QString,QKeySequence)), this, SIGNAL(invokeAction(QString,QKeySequence)));
3264-
3265+#endif
3266 Q_EMIT connected();
3267 }
3268
3269@@ -151,7 +155,8 @@
3270 if (!mProxy)
3271 return;
3272
3273- mProxy->mouseClickedOnPreedit(pos.x(), pos.y(), preeditRect.x(), preeditRect.y(), preeditRect.width(), preeditRect.height());
3274+ mProxy->mouseClickedOnPreedit(pos.x(), pos.y(), preeditRect.x(), preeditRect.y(),
3275+ preeditRect.width(), preeditRect.height());
3276 }
3277
3278 void DBusServerConnection::setPreedit(const QString &text, int cursorPos)
3279@@ -162,8 +167,7 @@
3280 mProxy->setPreedit(text, cursorPos);
3281 }
3282
3283-void DBusServerConnection::updateWidgetInformation(const QMap<QString, QVariant> &stateInformation,
3284- bool focusChanged)
3285+void DBusServerConnection::updateWidgetInformation(const QMap<QString, QVariant> &stateInformation, bool focusChanged)
3286 {
3287 if (!mProxy)
3288 return;
3289@@ -259,12 +263,14 @@
3290 pluginSettingsReceived(info);
3291 }
3292
3293-void DBusServerConnection::keyEvent(int type, int key, int modifiers, const QString &text, bool autoRepeat, int count, uchar requestType)
3294+void DBusServerConnection::keyEvent(int type, int key, int modifiers, const QString &text, bool autoRepeat,
3295+ int count, uchar requestType)
3296 {
3297 keyEvent(type, key, modifiers, text, autoRepeat, count, static_cast<Maliit::EventRequestType>(requestType));
3298 }
3299
3300-void DBusServerConnection::notifyExtendedAttributeChanged(int id, const QString &target, const QString &targetItem, const QString &attribute, const QDBusVariant &value)
3301+void DBusServerConnection::notifyExtendedAttributeChanged(int id, const QString &target, const QString &targetItem,
3302+ const QString &attribute, const QDBusVariant &value)
3303 {
3304 extendedAttributeChanged(id, target, targetItem, attribute, value.variant());
3305 }
3306
3307=== modified file 'connection/dbusserverconnection.h'
3308--- connection/dbusserverconnection.h 2012-07-10 09:00:33 +0000
3309+++ connection/dbusserverconnection.h 2013-06-27 13:54:25 +0000
3310@@ -40,19 +40,19 @@
3311 virtual void mouseClickedOnPreedit(const QPoint &pos, const QRect &preeditRect);
3312 virtual void setPreedit(const QString &text, int cursorPos);
3313 virtual void updateWidgetInformation(const QMap<QString, QVariant> &stateInformation,
3314- bool focusChanged);
3315+ bool focusChanged);
3316 virtual void reset(bool requireSynchronization);
3317 virtual void appOrientationAboutToChange(int angle);
3318 virtual void appOrientationChanged(int angle);
3319 virtual void setCopyPasteState(bool copyAvailable, bool pasteAvailable);
3320 virtual void processKeyEvent(QEvent::Type keyType, Qt::Key keyCode,
3321- Qt::KeyboardModifiers modifiers,
3322- const QString &text, bool autoRepeat, int count,
3323- quint32 nativeScanCode, quint32 nativeModifiers, unsigned long time);
3324+ Qt::KeyboardModifiers modifiers,
3325+ const QString &text, bool autoRepeat, int count,
3326+ quint32 nativeScanCode, quint32 nativeModifiers, unsigned long time);
3327 virtual void registerAttributeExtension(int id, const QString &fileName);
3328 virtual void unregisterAttributeExtension(int id);
3329 virtual void setExtendedAttribute(int id, const QString &target, const QString &targetItem,
3330- const QString &attribute, const QVariant &value);
3331+ const QString &attribute, const QVariant &value);
3332 virtual void loadPluginSettings(const QString &descriptionLanguage);
3333 //! reimpl end
3334
3335
3336=== removed file 'connection/glibdbusimserverproxy.cpp'
3337--- connection/glibdbusimserverproxy.cpp 2013-01-30 19:57:49 +0000
3338+++ connection/glibdbusimserverproxy.cpp 1970-01-01 00:00:00 +0000
3339@@ -1,461 +0,0 @@
3340-/* * This file is part of Maliit framework *
3341- *
3342- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3343- * All rights reserved.
3344- *
3345- * Contact: maliit-discuss@lists.maliit.org
3346- *
3347- * This library is free software; you can redistribute it and/or
3348- * modify it under the terms of the GNU Lesser General Public
3349- * License version 2.1 as published by the Free Software Foundation
3350- * and appearing in the file LICENSE.LGPL included in the packaging
3351- * of this file.
3352- */
3353-
3354-#include "glibdbusimserverproxy.h"
3355-#include "mdbusglibinputcontextadaptor.h"
3356-#include "inputcontextdbusaddress.h"
3357-#include "maliitmarshalers.h"
3358-#include <variantmarshalling.h>
3359-
3360-#include "glibdbusimserverproxy_p.h"
3361-
3362-#include <QPoint>
3363-#include <QRect>
3364-#include <QString>
3365-#include <QDataStream>
3366-#include <QVariant>
3367-#include <QTimer>
3368-#include <QDateTime>
3369-#include <QDebug>
3370-#include <QKeySequence>
3371-
3372-#include <unistd.h>
3373-#include <sys/types.h>
3374-
3375-#include <dbus/dbus.h>
3376-
3377-namespace
3378-{
3379- const char * const DBusPath("/com/meego/inputmethod/uiserver1");
3380- const char * const DBusInterface("com.meego.inputmethod.uiserver1");
3381- const int ConnectionRetryInterval(6*1000); // in ms
3382- const QString icAdaptorPath("/com/meego/inputmethod/inputcontext");
3383-
3384- Maliit::DBusGLib::ConnectionRef toRef(DBusGConnection *connection)
3385- {
3386- if (!connection)
3387- return Maliit::DBusGLib::ConnectionRef();
3388-
3389- return Maliit::DBusGLib::ConnectionRef(connection,
3390- dbus_g_connection_unref);
3391- }
3392-
3393- static bool debugEnabled()
3394- {
3395- static bool enabled = false;
3396- static bool initialized = false;
3397-
3398- if (initialized) {
3399- return enabled;
3400- }
3401-
3402- QByteArray debugEnvVar = qgetenv("MIC_ENABLE_DEBUG");
3403- if (!debugEnvVar.isEmpty() && debugEnvVar != "false") {
3404- enabled = true;
3405- }
3406-
3407- initialized = true;
3408- return enabled;
3409- }
3410-
3411- void resetNotifyTrampoline(DBusGProxy *proxy, DBusGProxyCall *callId, gpointer userData)
3412- {
3413- static_cast<GlibDBusIMServerProxyPrivate *>(userData)->resetNotify(proxy, callId);
3414- }
3415-}
3416-
3417-GlibDBusIMServerProxyPrivate::GlibDBusIMServerProxyPrivate(const QSharedPointer<Maliit::InputContext::DBus::Address> &address)
3418- : glibObjectProxy(NULL),
3419- connection(),
3420- active(true),
3421- mAddress(address)
3422-{
3423- g_type_init();
3424-}
3425-
3426-GlibDBusIMServerProxyPrivate::~GlibDBusIMServerProxyPrivate()
3427-{}
3428-
3429-void GlibDBusIMServerProxyPrivate::resetNotify(DBusGProxy *proxy, DBusGProxyCall *callId)
3430-{
3431- if (debugEnabled()) qDebug() << "MInputContext" << __PRETTY_FUNCTION__;
3432-
3433- dbus_g_proxy_end_call(proxy, callId, 0, G_TYPE_INVALID);
3434- pendingResetCalls.remove(callId);
3435-}
3436-
3437-
3438-void GlibDBusIMServerProxy::onDisconnectionTrampoline(void */*proxy*/, void *userData)
3439-{
3440- if (debugEnabled()) qDebug() << "MInputContext" << __PRETTY_FUNCTION__;
3441- static_cast<GlibDBusIMServerProxy *>(userData)->onDisconnection();
3442-}
3443-
3444-void GlibDBusIMServerProxy::onInvokeActionTrampoline(void *proxy, const char *action, const char *sequence, void *userData)
3445-{
3446- Q_UNUSED(proxy);
3447- if (debugEnabled()) qDebug() << "MInputContext" << __PRETTY_FUNCTION__;
3448- static_cast<GlibDBusIMServerProxy *>(userData)->onInvokeAction(QString::fromUtf8(action),
3449- QString::fromUtf8(sequence));
3450-}
3451-
3452-GlibDBusIMServerProxy::GlibDBusIMServerProxy(const QSharedPointer<Maliit::InputContext::DBus::Address> &address, QObject *parent)
3453- : MImServerConnection(parent),
3454- d_ptr(new GlibDBusIMServerProxyPrivate(address))
3455-{
3456- Q_UNUSED(parent);
3457- Q_D(GlibDBusIMServerProxy);
3458-
3459- MDBusGlibInputContextAdaptor *adaptor = M_DBUS_GLIB_INPUT_CONTEXT_ADAPTOR(
3460- g_object_new(M_TYPE_DBUS_GLIB_INPUT_CONTEXT_ADAPTOR, NULL));
3461- adaptor->imServerConnection = this;
3462-
3463- d->inputContextAdaptor = G_OBJECT(adaptor);
3464-
3465- connect(d->mAddress.data(), SIGNAL(addressRecieved(QString)),
3466- this, SLOT(openDBusConnection(QString)));
3467- connect(d->mAddress.data(), SIGNAL(addressFetchError(QString)),
3468- this, SLOT(connectToDBusFailed(QString)));
3469-
3470- dbus_g_thread_init();
3471-
3472- QTimer::singleShot(0, this, SLOT(connectToDBus()));
3473-}
3474-
3475-GlibDBusIMServerProxy::~GlibDBusIMServerProxy()
3476-{
3477- Q_D(GlibDBusIMServerProxy);
3478-
3479- d->active = false;
3480-
3481- Q_FOREACH (DBusGProxyCall *callId, d->pendingResetCalls) {
3482- dbus_g_proxy_cancel_call(d->glibObjectProxy, callId);
3483- }
3484-}
3485-
3486-
3487-// Auxiliary connection handling.............................................
3488-
3489-void GlibDBusIMServerProxy::connectToDBus()
3490-{
3491- Q_D(GlibDBusIMServerProxy);
3492-
3493- if (debugEnabled()) qDebug() << "MInputContext" << __PRETTY_FUNCTION__;
3494-
3495- d->mAddress->get();
3496-}
3497-
3498-void GlibDBusIMServerProxy::openDBusConnection(const QString &addressString)
3499-{
3500- Q_D(GlibDBusIMServerProxy);
3501-
3502- if (debugEnabled()) qDebug() << "MInputContext" << __PRETTY_FUNCTION__ << "Address:" << addressString;
3503-
3504- if (addressString.isEmpty()) {
3505- QTimer::singleShot(ConnectionRetryInterval, this, SLOT(connectToDBus()));
3506- return;
3507- }
3508-
3509- DBusError error;
3510- dbus_error_init(&error);
3511-
3512- // Input contexts should not share the connection to the maliit server with
3513- // each other (even not when they are in the same application). Therefore,
3514- // use private connection for IC to server connection.
3515- DBusConnection *dbusConnection = dbus_connection_open_private(addressString.toLatin1().data(), &error);
3516- if (!dbusConnection) {
3517- qWarning("MInputContext: unable to create D-Bus connection: %s", error.message);
3518- dbus_error_free(&error);
3519- QTimer::singleShot(ConnectionRetryInterval, this, SLOT(connectToDBus()));
3520- return;
3521- }
3522-
3523- dbus_connection_setup_with_g_main(dbusConnection, 0);
3524- d->connection = toRef(dbus_connection_get_g_connection(dbusConnection));
3525-
3526- d->glibObjectProxy = dbus_g_proxy_new_for_peer(d->connection.get(), DBusPath, DBusInterface);
3527- if (!d->glibObjectProxy) {
3528- qWarning("MInputContext: unable to find the D-Bus service.");
3529- d->connection.reset();
3530- QTimer::singleShot(ConnectionRetryInterval, this, SLOT(connectToDBus()));
3531- return;
3532- }
3533- g_signal_connect(G_OBJECT(d->glibObjectProxy), "destroy", G_CALLBACK(onDisconnectionTrampoline),
3534- this);
3535- dbus_g_object_register_marshaller(_maliit_marshal_VOID__STRING_STRING, G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
3536- dbus_g_proxy_add_signal(d->glibObjectProxy, "invokeAction", G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
3537- dbus_g_proxy_connect_signal(d->glibObjectProxy, "invokeAction", G_CALLBACK(onInvokeActionTrampoline), this, 0);
3538-
3539- dbus_g_connection_register_g_object(d->connection.get(), icAdaptorPath.toLatin1().data(), d->inputContextAdaptor);
3540-
3541- Q_EMIT connected();
3542-}
3543-
3544-void GlibDBusIMServerProxy::connectToDBusFailed(const QString &errorMessage)
3545-{
3546- if (debugEnabled()) qDebug() << "MInputContext" << __PRETTY_FUNCTION__ << errorMessage;
3547-
3548- QTimer::singleShot(ConnectionRetryInterval, this, SLOT(connectToDBus()));
3549-}
3550-
3551-void GlibDBusIMServerProxy::onDisconnection()
3552-{
3553- Q_D(GlibDBusIMServerProxy);
3554-
3555- if (debugEnabled()) qDebug() << "MInputContext" << __PRETTY_FUNCTION__;
3556-
3557- d->glibObjectProxy = 0;
3558- d->connection.reset();
3559- Q_EMIT disconnected();
3560-
3561- if (d->active) {
3562- QTimer::singleShot(ConnectionRetryInterval, this, SLOT(connectToDBus()));
3563- }
3564-}
3565-
3566-void GlibDBusIMServerProxy::onInvokeAction(const QString &action,
3567- const QString &sequence)
3568-{
3569- Q_EMIT invokeAction(action, QKeySequence::fromString(sequence));
3570-}
3571-
3572-// Remote methods............................................................
3573-
3574-void GlibDBusIMServerProxy::activateContext()
3575-{
3576- Q_D(GlibDBusIMServerProxy);
3577-
3578- if (!d->glibObjectProxy) {
3579- return;
3580- }
3581- dbus_g_proxy_call_no_reply(d->glibObjectProxy, "activateContext",
3582- G_TYPE_INVALID);
3583-}
3584-
3585-void GlibDBusIMServerProxy::showInputMethod()
3586-{
3587- Q_D(GlibDBusIMServerProxy);
3588-
3589- if (!d->glibObjectProxy) {
3590- return;
3591- }
3592- dbus_g_proxy_call_no_reply(d->glibObjectProxy, "showInputMethod",
3593- G_TYPE_INVALID);
3594-}
3595-
3596-void GlibDBusIMServerProxy::hideInputMethod()
3597-{
3598- Q_D(GlibDBusIMServerProxy);
3599-
3600- if (!d->glibObjectProxy) {
3601- return;
3602- }
3603- dbus_g_proxy_call_no_reply(d->glibObjectProxy, "hideInputMethod",
3604- G_TYPE_INVALID);
3605-}
3606-
3607-void GlibDBusIMServerProxy::mouseClickedOnPreedit(const QPoint &pos, const QRect &preeditRect)
3608-{
3609- Q_D(GlibDBusIMServerProxy);
3610-
3611- if (!d->glibObjectProxy) {
3612- return;
3613- }
3614- dbus_g_proxy_call_no_reply(d->glibObjectProxy, "mouseClickedOnPreedit",
3615- G_TYPE_INT, pos.x(),
3616- G_TYPE_INT, pos.y(),
3617- G_TYPE_INT, preeditRect.x(),
3618- G_TYPE_INT, preeditRect.y(),
3619- G_TYPE_INT, preeditRect.width(),
3620- G_TYPE_INT, preeditRect.height(),
3621- G_TYPE_INVALID);
3622-}
3623-
3624-void GlibDBusIMServerProxy::setPreedit(const QString &text, int cursorPos)
3625-{
3626- Q_D(GlibDBusIMServerProxy);
3627-
3628- if (!d->glibObjectProxy) {
3629- return;
3630- }
3631- dbus_g_proxy_call_no_reply(d->glibObjectProxy, "setPreedit",
3632- G_TYPE_STRING, text.toUtf8().data(),
3633- G_TYPE_INT, cursorPos,
3634- G_TYPE_INVALID);
3635-}
3636-
3637-void GlibDBusIMServerProxy::updateWidgetInformation(const QMap<QString, QVariant> &stateInformation,
3638- bool focusChanged)
3639-{
3640- Q_D(GlibDBusIMServerProxy);
3641-
3642- if (!d->glibObjectProxy) {
3643- return;
3644- }
3645- GHashTable *encodedState = encodeVariantMap(stateInformation);
3646- if (encodedState == 0)
3647- return;
3648-
3649- GType encodedStateType = dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE);
3650- dbus_g_proxy_call_no_reply(d->glibObjectProxy, "updateWidgetInformation",
3651- encodedStateType, encodedState,
3652- G_TYPE_BOOLEAN, focusChanged,
3653- G_TYPE_INVALID);
3654- g_hash_table_unref(encodedState);
3655-}
3656-
3657-void GlibDBusIMServerProxy::reset(bool requireSynchronization)
3658-{
3659- Q_D(GlibDBusIMServerProxy);
3660-
3661- if (!d->glibObjectProxy) {
3662- return;
3663- }
3664-
3665- if (requireSynchronization) {
3666- DBusGProxyCall *resetCall = dbus_g_proxy_begin_call(d->glibObjectProxy, "reset",
3667- resetNotifyTrampoline, d,
3668- 0, G_TYPE_INVALID);
3669- d->pendingResetCalls.insert(resetCall);
3670- } else {
3671- dbus_g_proxy_call_no_reply(d->glibObjectProxy, "reset",
3672- G_TYPE_INVALID);
3673- }
3674-}
3675-
3676-bool GlibDBusIMServerProxy::pendingResets()
3677-{
3678- Q_D(GlibDBusIMServerProxy);
3679-
3680- return (d->pendingResetCalls.size() > 0);
3681-}
3682-
3683-void GlibDBusIMServerProxy::appOrientationAboutToChange(int angle)
3684-{
3685- Q_D(GlibDBusIMServerProxy);
3686-
3687- if (!d->glibObjectProxy) {
3688- return;
3689- }
3690- dbus_g_proxy_call_no_reply(d->glibObjectProxy, "appOrientationAboutToChange",
3691- G_TYPE_INT, angle,
3692- G_TYPE_INVALID);
3693-}
3694-
3695-void GlibDBusIMServerProxy::appOrientationChanged(int angle)
3696-{
3697- Q_D(GlibDBusIMServerProxy);
3698-
3699- if (!d->glibObjectProxy) {
3700- return;
3701- }
3702- dbus_g_proxy_call_no_reply(d->glibObjectProxy, "appOrientationChanged",
3703- G_TYPE_INT, angle,
3704- G_TYPE_INVALID);
3705-}
3706-
3707-void GlibDBusIMServerProxy::setCopyPasteState(bool copyAvailable, bool pasteAvailable)
3708-{
3709- Q_D(GlibDBusIMServerProxy);
3710-
3711- if (!d->glibObjectProxy) {
3712- return;
3713- }
3714- dbus_g_proxy_call_no_reply(d->glibObjectProxy, "setCopyPasteState",
3715- G_TYPE_BOOLEAN, copyAvailable,
3716- G_TYPE_BOOLEAN, pasteAvailable,
3717- G_TYPE_INVALID);
3718-}
3719-
3720-void GlibDBusIMServerProxy::processKeyEvent(QEvent::Type keyType, Qt::Key keyCode,
3721- Qt::KeyboardModifiers modifiers,
3722- const QString &text, bool autoRepeat, int count,
3723- quint32 nativeScanCode, quint32 nativeModifiers,
3724- unsigned long time)
3725-{
3726- Q_D(GlibDBusIMServerProxy);
3727-
3728- if (!d->glibObjectProxy) {
3729- return;
3730- }
3731- dbus_g_proxy_call_no_reply(d->glibObjectProxy, "processKeyEvent",
3732- G_TYPE_INT, static_cast<int>(keyType),
3733- G_TYPE_INT, static_cast<int>(keyCode),
3734- G_TYPE_INT, static_cast<int>(modifiers),
3735- G_TYPE_STRING, text.toUtf8().data(),
3736- G_TYPE_BOOLEAN, autoRepeat, G_TYPE_INT, count,
3737- G_TYPE_UINT, nativeScanCode, G_TYPE_UINT, nativeModifiers,
3738- G_TYPE_ULONG, time,
3739- G_TYPE_INVALID);
3740-}
3741-
3742-void GlibDBusIMServerProxy::registerAttributeExtension(int id, const QString &fileName)
3743-{
3744- Q_D(GlibDBusIMServerProxy);
3745-
3746- if (!d->glibObjectProxy) {
3747- return;
3748- }
3749- dbus_g_proxy_call_no_reply(d->glibObjectProxy, "registerAttributeExtension",
3750- G_TYPE_INT, id,
3751- G_TYPE_STRING, fileName.toUtf8().data(),
3752- G_TYPE_INVALID);
3753-}
3754-
3755-void GlibDBusIMServerProxy::unregisterAttributeExtension(int id)
3756-{
3757- Q_D(GlibDBusIMServerProxy);
3758-
3759- if (!d->glibObjectProxy) {
3760- return;
3761- }
3762- dbus_g_proxy_call_no_reply(d->glibObjectProxy, "unregisterAttributeExtension",
3763- G_TYPE_INT, id,
3764- G_TYPE_INVALID);
3765-}
3766-
3767-void GlibDBusIMServerProxy::setExtendedAttribute(int id, const QString &target, const QString &targetItem,
3768- const QString &attribute, const QVariant &value)
3769-{
3770- Q_D(GlibDBusIMServerProxy);
3771-
3772- if (!d->glibObjectProxy) {
3773- return;
3774- }
3775- GValue valueData = {0, {{0}, {0}}};
3776- if (!encodeVariant(&valueData, value)) {
3777- return;
3778- }
3779-
3780- dbus_g_proxy_call_no_reply(d->glibObjectProxy, "setExtendedAttribute",
3781- G_TYPE_INT, id,
3782- G_TYPE_STRING, target.toUtf8().data(),
3783- G_TYPE_STRING, targetItem.toUtf8().data(),
3784- G_TYPE_STRING, attribute.toUtf8().data(),
3785- G_TYPE_VALUE, &valueData,
3786- G_TYPE_INVALID);
3787- g_value_unset(&valueData);
3788-}
3789-
3790-void GlibDBusIMServerProxy::loadPluginSettings(const QString &descriptionLanguage)
3791-{
3792- Q_D(GlibDBusIMServerProxy);
3793-
3794- if (!d->glibObjectProxy) {
3795- return;
3796- }
3797- dbus_g_proxy_call_no_reply(d->glibObjectProxy, "loadPluginSettings",
3798- G_TYPE_STRING, descriptionLanguage.toUtf8().data(),
3799- G_TYPE_INVALID);
3800-}
3801
3802=== removed file 'connection/glibdbusimserverproxy.h'
3803--- connection/glibdbusimserverproxy.h 2012-08-06 12:48:36 +0000
3804+++ connection/glibdbusimserverproxy.h 1970-01-01 00:00:00 +0000
3805@@ -1,104 +0,0 @@
3806-/* * This file is part of Maliit framework *
3807- *
3808- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3809- * All rights reserved.
3810- *
3811- * Contact: maliit-discuss@lists.maliit.org
3812- *
3813- * This library is free software; you can redistribute it and/or
3814- * modify it under the terms of the GNU Lesser General Public
3815- * License version 2.1 as published by the Free Software Foundation
3816- * and appearing in the file LICENSE.LGPL included in the packaging
3817- * of this file.
3818- */
3819-
3820-#ifndef GLIBDBUSIMSERVERPROXY_H
3821-#define GLIBDBUSIMSERVERPROXY_H
3822-
3823-#include <QObject>
3824-#include <QEvent>
3825-#include <Qt>
3826-#include <QMap>
3827-
3828-#include "mimserverconnection.h"
3829-#include "inputcontextdbusaddress.h"
3830-
3831-#include <QSharedPointer>
3832-
3833-class GlibDBusIMServerProxyPrivate;
3834-
3835-class QDBusError;
3836-class QDBusVariant;
3837-
3838-/* \brief Glib D-Bus implementation of a connection with the input method server.
3839- *
3840- * The input context is exposed over DBus so that the input method server can communicate with it,
3841- * and methods can be called to communicate with the input method server.
3842- */
3843-
3844-// TODO: rename to MImGlibDBusServerConnection, or similar
3845-class GlibDBusIMServerProxy: public MImServerConnection
3846-{
3847- Q_OBJECT
3848-
3849-public:
3850- GlibDBusIMServerProxy(const QSharedPointer<Maliit::InputContext::DBus::Address> &address, QObject *parent = 0);
3851- virtual ~GlibDBusIMServerProxy();
3852-
3853- //! reimpl
3854- virtual bool pendingResets();
3855-
3856- /* Outbound communication */
3857- virtual void activateContext();
3858-
3859- virtual void showInputMethod();
3860-
3861- virtual void hideInputMethod();
3862-
3863- virtual void mouseClickedOnPreedit(const QPoint &pos, const QRect &preeditRect);
3864-
3865- virtual void setPreedit(const QString &text, int cursorPos);
3866-
3867- virtual void updateWidgetInformation(const QMap<QString, QVariant> &stateInformation,
3868- bool focusChanged);
3869-
3870- virtual void reset(bool requireSynchronization);
3871-
3872- virtual void appOrientationAboutToChange(int angle);
3873-
3874- virtual void appOrientationChanged(int angle);
3875-
3876- virtual void setCopyPasteState(bool copyAvailable, bool pasteAvailable);
3877-
3878- virtual void processKeyEvent(QEvent::Type keyType, Qt::Key keyCode,
3879- Qt::KeyboardModifiers modifiers,
3880- const QString &text, bool autoRepeat, int count,
3881- quint32 nativeScanCode, quint32 nativeModifiers, unsigned long time);
3882-
3883- virtual void registerAttributeExtension(int id, const QString &fileName);
3884-
3885- virtual void unregisterAttributeExtension(int id);
3886-
3887- virtual void setExtendedAttribute(int id, const QString &target, const QString &targetItem,
3888- const QString &attribute, const QVariant &value);
3889-
3890- virtual void loadPluginSettings(const QString &descriptionLanguage);
3891- //! reimpl end
3892-
3893- void onInvokeAction(const QString &action, const QString &sequence);
3894-
3895-private Q_SLOTS:
3896- void connectToDBus();
3897- void openDBusConnection(const QString &addressString);
3898- void connectToDBusFailed(const QString &errorMessage);
3899-
3900-private:
3901- void onDisconnection();
3902- static void onDisconnectionTrampoline(void *proxy, void* userData);
3903- static void onInvokeActionTrampoline(void *proxy, const char *action, const char *sequence, void* userData);
3904-
3905- const QScopedPointer<GlibDBusIMServerProxyPrivate> d_ptr;
3906- Q_DECLARE_PRIVATE(GlibDBusIMServerProxy)
3907-};
3908-
3909-#endif
3910
3911=== removed file 'connection/glibdbusimserverproxy_p.h'
3912--- connection/glibdbusimserverproxy_p.h 2012-07-10 09:00:33 +0000
3913+++ connection/glibdbusimserverproxy_p.h 1970-01-01 00:00:00 +0000
3914@@ -1,57 +0,0 @@
3915-/* * This file is part of Maliit framework *
3916- *
3917- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3918- * All rights reserved.
3919- *
3920- * Contact: maliit-discuss@lists.maliit.org
3921- *
3922- * This library is free software; you can redistribute it and/or
3923- * modify it under the terms of the GNU Lesser General Public
3924- * License version 2.1 as published by the Free Software Foundation
3925- * and appearing in the file LICENSE.LGPL included in the packaging
3926- * of this file.
3927- */
3928-
3929-#ifndef GLIBDBUSIMSERVERPROXY_P_H
3930-#define GLIBDBUSIMSERVERPROXY_P_H
3931-
3932-#include <QSet>
3933-#include <QSharedPointer>
3934-#include <dbus/dbus-glib.h>
3935-
3936-#include <tr1/memory>
3937-
3938-#include "inputcontextdbusaddress.h"
3939-
3940-namespace Maliit
3941-{
3942- namespace DBusGLib
3943- {
3944- // std::tr1::shared_ptr allows to specify a deleter. Hiding it behind a typedef,
3945- // as we do not really need all the shared pointer semantics here.
3946- typedef std::tr1::shared_ptr<DBusGConnection> ConnectionRef;
3947- }
3948-}
3949-
3950-class GlibDBusIMServerProxyPrivate
3951-{
3952-
3953-public:
3954- GlibDBusIMServerProxyPrivate(const QSharedPointer<Maliit::InputContext::DBus::Address> &address);
3955- ~GlibDBusIMServerProxyPrivate();
3956-
3957-public:
3958- void resetNotify(DBusGProxy *proxy, DBusGProxyCall *callId);
3959-
3960-public:
3961- DBusGProxy *glibObjectProxy;
3962- Maliit::DBusGLib::ConnectionRef connection;
3963- GObject *inputContextAdaptor;
3964- bool active;
3965- QSet<DBusGProxyCall *> pendingResetCalls;
3966- const QSharedPointer<Maliit::InputContext::DBus::Address> mAddress;
3967-};
3968-
3969-
3970-
3971-#endif // GLIBDBUSIMSERVERPROXY_P_H
3972
3973=== removed file 'connection/input-method.xml'
3974--- connection/input-method.xml 2013-03-21 13:59:07 +0000
3975+++ connection/input-method.xml 1970-01-01 00:00:00 +0000
3976@@ -1,160 +0,0 @@
3977-<?xml version="1.0" encoding="UTF-8"?>
3978-<protocol name="input_method">
3979- <copyright>
3980- Copyright © 2012 Intel Corporation
3981-
3982- Permission to use, copy, modify, distribute, and sell this
3983- software and its documentation for any purpose is hereby granted
3984- without fee, provided that the above copyright notice appear in
3985- all copies and that both that copyright notice and this permission
3986- notice appear in supporting documentation, and that the name of
3987- the copyright holders not be used in advertising or publicity
3988- pertaining to distribution of the software without specific,
3989- written prior permission. The copyright holders make no
3990- representations about the suitability of this software for any
3991- purpose. It is provided "as is" without express or implied
3992- warranty.
3993-
3994- THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
3995- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
3996- FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
3997- SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
3998- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
3999- AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
4000- ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
4001- THIS SOFTWARE.
4002- </copyright>
4003-
4004-
4005- <interface name="input_method_context" version="1">
4006- <description summary="input method context">
4007- Corresponds to a text model on input method side. An input method context
4008- is created on text mode activation on the input method side. It allows to
4009- receive information about the text model from the application via events.
4010- Input method contexts do not keep state after deactivation and should be
4011- destroyed after deactivation is handled.
4012- </description>
4013- <request name="destroy" type="destructor"/>
4014- <request name="commit_string">
4015- <description summary="commit string">
4016- Send the commit string text to the applications text model.
4017- </description>
4018- <arg name="serial" type="uint"/>
4019- <arg name="text" type="string"/>
4020- <arg name="index" type="uint"/>
4021- </request>
4022- <request name="preedit_string">
4023- <description summary="pre-edit string">
4024- Send the pre-edit string text to the applications text model.
4025- </description>
4026- <arg name="serial" type="uint"/>
4027- <arg name="text" type="string"/>
4028- <arg name="commit" type="string"/>
4029- </request>
4030- <request name="preedit_styling">
4031- <arg name="serial" type="uint"/>
4032- <arg name="index" type="uint"/>
4033- <arg name="length" type="uint"/>
4034- <arg name="style" type="uint"/>
4035- </request>
4036- <request name="preedit_cursor">
4037- <description summary="pre-edit cursor">
4038- Sets the cursor position inside the composing text (as byte index)
4039- relative to the start of the composing text.
4040- </description>
4041- <arg name="serial" type="uint"/>
4042- <arg name="index" type="int"/>
4043- </request>
4044- <request name="delete_surrounding_text">
4045- <arg name="serial" type="uint"/>
4046- <arg name="index" type="int"/>
4047- <arg name="length" type="uint"/>
4048- </request>
4049- <request name="modifiers_map">
4050- <arg name="map" type="array"/>
4051- </request>
4052- <request name="keysym">
4053- <description summary="keysym">
4054- Notify when a key event was sent. Key events should not be used
4055- for normal text input operations, which should be done with
4056- commit_string, delete_surrounfing_text, etc. The key event follows
4057- the wl_keyboard key event convention. State is a XKB keysym, state a
4058- wl_keyboard key_state.
4059- </description>
4060- <arg name="serial" type="uint"/>
4061- <arg name="time" type="uint"/>
4062- <arg name="sym" type="uint"/>
4063- <arg name="state" type="uint"/>
4064- <arg name="modifiers" type="uint"/>
4065- </request>
4066- <request name="grab_keyboard">
4067- <description summary="grab hardware keyboard">
4068- Allows an input method to receive hardware keyboard input and process
4069- key events to generate text events (with pre-edit) over the. This allows
4070- input methods which compose multiple key events for inputting text
4071- like it is done for CJK languages.
4072- </description>
4073- <arg name="keyboard" type="new_id" interface="wl_keyboard"/>
4074- </request>
4075- <request name="key">
4076- <arg name="serial" type="uint"/>
4077- <arg name="time" type="uint"/>
4078- <arg name="key" type="uint"/>
4079- <arg name="state" type="uint"/>
4080- </request>
4081- <request name="modifiers">
4082- <arg name="serial" type="uint"/>
4083- <arg name="mods_depressed" type="uint"/>
4084- <arg name="mods_latched" type="uint"/>
4085- <arg name="mods_locked" type="uint"/>
4086- <arg name="group" type="uint"/>
4087- </request>
4088- <event name="surrounding_text">
4089- <description summary="surrounding text event">
4090- The plain surrounding text around the input position. Cursor is the
4091- position within the surrounding text. Anchor is the position of the
4092- selection anchor within the surrounding text. If there is no selected
4093- text anchor is the same as cursor.
4094- </description>
4095- <arg name="text" type="string"/>
4096- <arg name="cursor" type="uint"/>
4097- <arg name="anchor" type="uint"/>
4098- </event>
4099- <event name="reset">
4100- <arg name="serial" type="uint"/>
4101- </event>
4102- <event name="content_type">
4103- <arg name="hint" type="uint"/>
4104- <arg name="purpose" type="uint"/>
4105- </event>
4106- <event name="invoke_action">
4107- <arg name="button" type="uint"/>
4108- <arg name="index" type="uint"/>
4109- </event>
4110- </interface>
4111-
4112- <interface name="input_method" version="1">
4113- <description summary="input method">
4114- An input method object is responsible to compose text in response to
4115- input from hardware or virtual keyboards. There is one input method
4116- object per seat. On activate there is a new input method context object
4117- created which allows the input method to communicate with the text model.
4118- </description>
4119- <event name="activate">
4120- <description summary="activate event">
4121- A text model was activated. Creates an input method context object
4122- which allows communication with the text model.
4123- </description>
4124- <arg name="id" type="new_id" interface="input_method_context"/>
4125- <arg name="serial" type="uint"/>
4126- </event>
4127- <event name="deactivate">
4128- <description summary="activate event">
4129- The text model corresponding to the context argument was deactivated.
4130- The input method context should be destroyed after deactivation is
4131- handled.
4132- </description>
4133- <arg name="context" type="object" interface="input_method_context"/>
4134- </event>
4135- </interface>
4136-</protocol>
4137
4138=== modified file 'connection/inputcontextdbusaddress.cpp'
4139--- connection/inputcontextdbusaddress.cpp 2012-07-10 09:00:33 +0000
4140+++ connection/inputcontextdbusaddress.cpp 2013-06-27 13:54:25 +0000
4141@@ -58,7 +58,7 @@
4142
4143 void DynamicAddress::successCallback(const QDBusVariant &address)
4144 {
4145- Q_EMIT addressRecieved(address.variant().toString());
4146+ Q_EMIT addressReceived(address.variant().toString());
4147 }
4148
4149 void DynamicAddress::errorCallback(const QDBusError &error)
4150@@ -73,7 +73,7 @@
4151
4152 void FixedAddress::get()
4153 {
4154- Q_EMIT this->addressRecieved(mAddress);
4155+ Q_EMIT this->addressReceived(mAddress);
4156 }
4157
4158 } // namespace DBus
4159
4160=== modified file 'connection/inputcontextdbusaddress.h'
4161--- connection/inputcontextdbusaddress.h 2012-07-10 09:00:33 +0000
4162+++ connection/inputcontextdbusaddress.h 2013-06-27 13:54:25 +0000
4163@@ -35,7 +35,7 @@
4164 virtual void get() = 0;
4165
4166 Q_SIGNALS:
4167- void addressRecieved(const QString &address);
4168+ void addressReceived(const QString &address);
4169 void addressFetchError(const QString &errorMessage);
4170 };
4171
4172
4173=== modified file 'connection/libmaliit-connection.pri'
4174--- connection/libmaliit-connection.pri 2013-03-21 13:59:07 +0000
4175+++ connection/libmaliit-connection.pri 2013-06-27 13:54:25 +0000
4176@@ -2,8 +2,16 @@
4177 # The .pro file must define TOP_DIR to be a relative path
4178 # to the top-level source/build directory, and include config.pri
4179
4180-include($$IN_PWD/../common/libmaliit-common.pri)
4181+include($$PWD/../common/libmaliit-common.pri)
4182+include($$PWD/../weston-protocols/libmaliit-weston-protocols.pri)
4183
4184-LIBS += $$TOP_DIR/lib/$$maliitDynamicLib($${MALIIT_CONNECTION_LIB})
4185-POST_TARGETDEPS += $$TOP_DIR/lib/$$maliitDynamicLib($${MALIIT_CONNECTION_LIB})
4186+LIBS += $$TOP_DIR/lib/$$maliitStaticLib($${MALIIT_CONNECTION_LIB})
4187+POST_TARGETDEPS += $$TOP_DIR/lib/$$maliitStaticLib($${MALIIT_CONNECTION_LIB})
4188 INCLUDEPATH += $$TOP_DIR/connection $$OUT_PWD/$$TOP_DIR/connection
4189+
4190+QT += dbus
4191+
4192+wayland {
4193+ CONFIG += link_pkgconfig
4194+ PKGCONFIG += wayland-client
4195+}
4196
4197=== removed file 'connection/maliit-connection.pc.in'
4198--- connection/maliit-connection.pc.in 2013-03-21 13:59:07 +0000
4199+++ connection/maliit-connection.pc.in 1970-01-01 00:00:00 +0000
4200@@ -1,15 +0,0 @@
4201-prefix=@PREFIX@
4202-exec_prefix=@PREFIX@
4203-libdir=@LIBDIR@
4204-includedir=@INCLUDEDIR@
4205-pluginsdir=@MALIIT_PLUGINS_DIR@
4206-pluginsdatadir=@MALIIT_PLUGINS_DATA_DIR@
4207-factorypluginsdir=@MALIIT_FACTORY_PLUGINS_DIR@
4208-
4209-Name: Maliit Connection
4210-Description: Shared library for connection between Maliit IC and Maliit Server
4211-Version: @MALIIT_VERSION@
4212-Requires: maliit-framework
4213-Cflags: -I${includedir}/@MALIIT_CONNECTION_HEADER@
4214-Libs: -L${libdir} -l@MALIIT_CONNECTION_LIB@
4215-
4216
4217=== removed file 'connection/maliitmarshalers.list'
4218--- connection/maliitmarshalers.list 2012-08-06 12:48:36 +0000
4219+++ connection/maliitmarshalers.list 1970-01-01 00:00:00 +0000
4220@@ -1,1 +0,0 @@
4221-VOID:STRING,STRING
4222
4223=== removed file 'connection/mdbusglibinputcontextadaptor.cpp'
4224--- connection/mdbusglibinputcontextadaptor.cpp 2012-08-06 12:48:36 +0000
4225+++ connection/mdbusglibinputcontextadaptor.cpp 1970-01-01 00:00:00 +0000
4226@@ -1,250 +0,0 @@
4227-/* * This file is part of Maliit framework *
4228- *
4229- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4230- * All rights reserved.
4231- *
4232- * Contact: maliit-discuss@lists.maliit.org
4233- *
4234- * This library is free software; you can redistribute it and/or
4235- * modify it under the terms of the GNU Lesser General Public
4236- * License version 2.1 as published by the Free Software Foundation
4237- * and appearing in the file LICENSE.LGPL included in the packaging
4238- * of this file.
4239- */
4240-
4241-#include "mdbusglibinputcontextadaptor.h"
4242-#include "mimserverconnection.h"
4243-#include <maliit/settingdata.h>
4244-
4245-#include <variantmarshalling.h>
4246-
4247-#include <dbus/dbus.h>
4248-
4249-G_DEFINE_TYPE(MDBusGlibInputContextAdaptor, m_dbus_glib_input_context_adaptor, G_TYPE_OBJECT)
4250-
4251-
4252-static gboolean m_dbus_glib_input_context_adaptor_activation_lost_event(
4253- MDBusGlibInputContextAdaptor *obj, GError **/*error*/)
4254-{
4255- Q_EMIT obj->imServerConnection->activationLostEvent();
4256- return TRUE;
4257-}
4258-
4259-static gboolean m_dbus_glib_input_context_adaptor_im_initiated_hide(
4260- MDBusGlibInputContextAdaptor *obj, GError **/*error*/)
4261-{
4262- Q_EMIT obj->imServerConnection->imInitiatedHide();
4263- return TRUE;
4264-}
4265-
4266-static gboolean m_dbus_glib_input_context_adaptor_commit_string(
4267- MDBusGlibInputContextAdaptor *obj, const char *string, gint32 replaceStart,
4268- gint32 replaceLength, gint32 cursorPos, GError **/*error*/)
4269-{
4270- Q_EMIT obj->imServerConnection->commitString(QString::fromUtf8(string), replaceStart,
4271- replaceLength, cursorPos);
4272- return TRUE;
4273-}
4274-
4275-QDataStream &operator>>(QDataStream &s, Maliit::PreeditTextFormat &t)
4276-{
4277- int preeditFace;
4278- s >> t.start;
4279- s >> t.length;
4280- s >> preeditFace;
4281- t.preeditFace = static_cast<Maliit::PreeditFace>(preeditFace);
4282- return s;
4283-}
4284-
4285-static gboolean m_dbus_glib_input_context_adaptor_update_preedit(MDBusGlibInputContextAdaptor *obj,
4286- const char *string,
4287- GPtrArray *formatListData,
4288- gint32 replaceStart,
4289- gint32 replaceLength,
4290- gint32 cursorPos, GError **/*error*/)
4291-{
4292- QList<Maliit::PreeditTextFormat> formatList;
4293- for (guint i = 0; i < formatListData->len; ++i) {
4294- GValueArray *itemData = ((GValueArray**)formatListData->pdata)[i];
4295- formatList.push_back(Maliit::PreeditTextFormat(
4296- g_value_get_int(g_value_array_get_nth(itemData, 0)),
4297- g_value_get_int(g_value_array_get_nth(itemData, 1)),
4298- Maliit::PreeditFace(
4299- g_value_get_int(g_value_array_get_nth(itemData, 2)))));
4300- }
4301- Q_EMIT obj->imServerConnection->updatePreedit(QString::fromUtf8(string),
4302- formatList,
4303- replaceStart,
4304- replaceLength,
4305- cursorPos);
4306- return TRUE;
4307-}
4308-
4309-static gboolean m_dbus_glib_input_context_adaptor_key_event(
4310- MDBusGlibInputContextAdaptor *obj, gint32 type, gint32 key, gint32 modifiers, const char *text,
4311- gboolean autoRepeat, gint32 count, guchar requestType, GError **/*error*/)
4312-{
4313- Q_EMIT obj->imServerConnection->keyEvent(type, key, modifiers, QString::fromUtf8(text),
4314- autoRepeat == TRUE, count,
4315- static_cast<Maliit::EventRequestType>(requestType));
4316- return TRUE;
4317-}
4318-
4319-static gboolean m_dbus_glib_input_context_adaptor_update_input_method_area(
4320- MDBusGlibInputContextAdaptor *obj,
4321- gint32 left, gint32 top, gint32 width, gint32 height,
4322- GError **/*error*/)
4323-{
4324- Q_EMIT obj->imServerConnection->updateInputMethodArea(QRect(left, top, width, height));
4325- return TRUE;
4326-}
4327-
4328-static gboolean m_dbus_glib_input_context_adaptor_set_global_correction_enabled(
4329- MDBusGlibInputContextAdaptor *obj, gboolean value, GError **/*error*/)
4330-{
4331- Q_EMIT obj->imServerConnection->setGlobalCorrectionEnabled(value == TRUE);
4332- return TRUE;
4333-}
4334-
4335-static gboolean m_dbus_glib_input_context_adaptor_preedit_rectangle(
4336- MDBusGlibInputContextAdaptor *obj, gboolean *valid, gint *x, gint *y,
4337- gint *width, gint *height, GError **/*error*/)
4338-{
4339- bool deserializedValidity;
4340- QRect rect;
4341- Q_EMIT obj->imServerConnection->getPreeditRectangle(rect, deserializedValidity);
4342- *valid = deserializedValidity ? TRUE : FALSE;
4343- *x = rect.x();
4344- *y = rect.y();
4345- *width = rect.width();
4346- *height = rect.height();
4347- return TRUE;
4348-}
4349-
4350-static gboolean m_dbus_glib_input_context_adaptor_set_redirect_keys(
4351- MDBusGlibInputContextAdaptor *obj, gboolean enabled, GError **/*error*/)
4352-{
4353- Q_EMIT obj->imServerConnection->setRedirectKeys(enabled == TRUE);
4354- return TRUE;
4355-}
4356-
4357-static gboolean m_dbus_glib_input_context_adaptor_set_detectable_auto_repeat(
4358- MDBusGlibInputContextAdaptor *obj, gboolean enabled, GError **/*error*/)
4359-{
4360- Q_EMIT obj->imServerConnection->setDetectableAutoRepeat(enabled == TRUE);
4361- return TRUE;
4362-}
4363-
4364-static gboolean m_dbus_glib_input_context_adaptor_set_selection(MDBusGlibInputContextAdaptor *obj,
4365- gint32 start, gint32 length, GError **/*error*/)
4366-{
4367- Q_EMIT obj->imServerConnection->setSelection(start,length);
4368- return TRUE;
4369-}
4370-
4371-static gboolean m_dbus_glib_input_context_adaptor_selection(
4372- MDBusGlibInputContextAdaptor *obj, gboolean *valid, gchar **gdata, GError **/*error*/)
4373-{
4374- bool validity;
4375- QString selection;
4376- Q_EMIT obj->imServerConnection->getSelection(selection, validity);
4377- *valid = validity ? TRUE : FALSE;
4378- *gdata = NULL;
4379-
4380- if (validity && !selection.isEmpty()) {
4381- *gdata = g_strdup(selection.toUtf8().data());
4382- }
4383- return TRUE;
4384-}
4385-
4386-static gboolean m_dbus_glib_input_context_adaptor_set_language(
4387- MDBusGlibInputContextAdaptor *obj, const char *string,
4388- GError **/*error*/)
4389-{
4390- Q_EMIT obj->imServerConnection->setLanguage(QString::fromUtf8(string));
4391- return TRUE;
4392-}
4393-
4394-static gboolean m_dbus_glib_input_context_adaptor_notify_extended_attribute_changed(
4395- MDBusGlibInputContextAdaptor *obj,
4396- gint32 id,
4397- const char *target,
4398- const char *targetItem,
4399- const char *attribute,
4400- GValue *valueData,
4401- GError **/*error*/)
4402-{
4403- QVariant value;
4404- QString error_message;
4405- if (decodeVariant(&value, valueData, &error_message)) {
4406- Q_EMIT obj->imServerConnection->extendedAttributeChanged(static_cast<int>(id),
4407- QString::fromUtf8(target),
4408- QString::fromUtf8(targetItem),
4409- QString::fromUtf8(attribute),
4410- value);
4411- } else {
4412- qWarning() << "notify_extended_attribute_changed.arg[4]" + error_message;
4413- }
4414- return TRUE;
4415-}
4416-
4417-static gboolean m_dbus_glib_input_context_adaptor_plugin_settings_loaded(MDBusGlibInputContextAdaptor *obj,
4418- GPtrArray *settingsData, GError **/*error*/)
4419-{
4420- QList<MImPluginSettingsInfo> settings;
4421- for (guint i = 0; i < settingsData->len; ++i) {
4422- GValueArray *plugin_data = ((GValueArray**)settingsData->pdata)[i];
4423- MImPluginSettingsInfo plugin;
4424- GPtrArray *entries_data = (GPtrArray *)g_value_get_boxed(g_value_array_get_nth(plugin_data, 4));
4425-
4426- plugin.description_language = QString::fromUtf8(g_value_get_string(g_value_array_get_nth(plugin_data, 0)));
4427- plugin.plugin_name = QString::fromUtf8(g_value_get_string(g_value_array_get_nth(plugin_data, 1)));
4428- plugin.plugin_description = QString::fromUtf8(g_value_get_string(g_value_array_get_nth(plugin_data, 2)));
4429- plugin.extension_id = g_value_get_int(g_value_array_get_nth(plugin_data, 3));
4430-
4431- for (guint i = 0; i < entries_data->len; ++i) {
4432- GValueArray *entry_data = ((GValueArray**)entries_data->pdata)[i];
4433- MImPluginSettingsEntry entry;
4434-
4435- QString error_message;
4436- if (!decodeVariantMap(&entry.attributes, (GHashTable *)g_value_get_boxed(g_value_array_get_nth(entry_data, 5)), &error_message)) {
4437- qWarning() << "m_dbus_glib_input_context_adaptor_plugin_settings_loaded entry attributes:" + error_message;
4438-
4439- return FALSE;
4440- }
4441-
4442- entry.description = QString::fromUtf8(g_value_get_string(g_value_array_get_nth(entry_data, 0)));
4443- entry.extension_key = QString::fromUtf8(g_value_get_string(g_value_array_get_nth(entry_data, 1)));
4444- entry.type = static_cast<Maliit::SettingEntryType>(g_value_get_int(g_value_array_get_nth(entry_data, 2)));
4445-
4446- bool valid = g_value_get_boolean(g_value_array_get_nth(entry_data, 3));
4447-
4448- if (!valid) {
4449- entry.value = QVariant();
4450- } else if (!decodeVariant(&entry.value, g_value_array_get_nth(entry_data, 4), &error_message)) {
4451- qWarning() << "m_dbus_glib_input_context_adaptor_plugin_settings_loaded entry value:" + error_message;
4452- return FALSE;
4453- }
4454-
4455- plugin.entries.append(entry);
4456- }
4457-
4458- settings.append(plugin);
4459- }
4460- Q_EMIT obj->imServerConnection->pluginSettingsReceived(settings);
4461-
4462- return TRUE;
4463-}
4464-
4465-#include "mdbusglibinputcontextadaptorglue.h"
4466-
4467-static void
4468-m_dbus_glib_input_context_adaptor_init(MDBusGlibInputContextAdaptor */*obj*/)
4469-{
4470-}
4471-
4472-static void
4473-m_dbus_glib_input_context_adaptor_class_init(MDBusGlibInputContextAdaptorClass */*klass*/)
4474-{
4475- dbus_g_object_type_install_info(M_TYPE_DBUS_GLIB_INPUT_CONTEXT_ADAPTOR, &dbus_glib_m_dbus_glib_input_context_adaptor_object_info);
4476-}
4477
4478=== removed file 'connection/mdbusglibinputcontextadaptor.h'
4479--- connection/mdbusglibinputcontextadaptor.h 2012-07-10 09:00:33 +0000
4480+++ connection/mdbusglibinputcontextadaptor.h 1970-01-01 00:00:00 +0000
4481@@ -1,47 +0,0 @@
4482-/* * This file is part of Maliit framework *
4483- *
4484- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4485- * All rights reserved.
4486- *
4487- * Contact: maliit-discuss@lists.maliit.org
4488- *
4489- * This library is free software; you can redistribute it and/or
4490- * modify it under the terms of the GNU Lesser General Public
4491- * License version 2.1 as published by the Free Software Foundation
4492- * and appearing in the file LICENSE.LGPL included in the packaging
4493- * of this file.
4494- */
4495-
4496-#ifndef MDBUSGLIBINPUTCONTEXTADAPTOR_H
4497-#define MDBUSGLIBINPUTCONTEXTADAPTOR_H
4498-
4499-#include <glib-object.h>
4500-
4501-class MImServerConnection;
4502-
4503-//! \brief Glib D-Bus version of an adaptor that exposes MInputContext interface
4504-//! through D-Bus
4505-struct MDBusGlibInputContextAdaptor
4506-{
4507- GObject parent;
4508- MImServerConnection *imServerConnection;
4509-};
4510-
4511-//! \brief MDBusGlibInputContextAdaptor metaclass
4512-struct MDBusGlibInputContextAdaptorClass
4513-{
4514- GObjectClass parent;
4515-};
4516-
4517-#define M_TYPE_DBUS_GLIB_INPUT_CONTEXT_ADAPTOR (m_dbus_glib_input_context_adaptor_get_type())
4518-#define M_DBUS_GLIB_INPUT_CONTEXT_ADAPTOR(object) (G_TYPE_CHECK_INSTANCE_CAST((object), M_TYPE_DBUS_GLIB_INPUT_CONTEXT_ADAPTOR, MDBusGlibInputContextAdaptor))
4519-#define M_DBUS_GLIB_INPUT_CONTEXT_ADAPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), M_TYPE_DBUS_GLIB_INPUT_CONTEXT_ADAPTOR, MDBusGlibInputContextAdaptorClass))
4520-#define M_IS_M_DBUS_GLIB_INPUT_CONTEXT_ADAPTOR(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), M_TYPE_DBUS_GLIB_INPUT_CONTEXT_ADAPTOR))
4521-#define M_IS_M_DBUS_GLIB_INPUT_CONTEXT_ADAPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), M_TYPE_DBUS_GLIB_INPUT_CONTEXT_ADAPTOR))
4522-#define M_DBUS_GLIB_INPUT_CONTEXT_ADAPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), M_TYPE_DBUS_GLIB_INPUT_CONTEXT_ADAPTOR, MDBusGlibInputContextAdaptorClass))
4523-
4524-
4525-GType m_dbus_glib_input_context_adaptor_get_type(void);
4526-
4527-
4528-#endif
4529
4530=== removed file 'connection/mimdirectserverconnection.cpp'
4531--- connection/mimdirectserverconnection.cpp 2012-07-10 09:00:33 +0000
4532+++ connection/mimdirectserverconnection.cpp 1970-01-01 00:00:00 +0000
4533@@ -1,140 +0,0 @@
4534-/* * This file is part of Maliit framework *
4535- *
4536- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4537- * All rights reserved.
4538- *
4539- * Contact: maliit-discuss@lists.maliit.org
4540- *
4541- * This library is free software; you can redistribute it and/or
4542- * modify it under the terms of the GNU Lesser General Public
4543- * License version 2.1 as published by the Free Software Foundation
4544- * and appearing in the file LICENSE.LGPL included in the packaging
4545- * of this file.
4546- */
4547-
4548-#include "mimdirectserverconnection.h"
4549-
4550-#include "miminputcontextdirectconnection.h"
4551-
4552-namespace {
4553- const int firstConnectionId = 1;
4554-}
4555-
4556-MImDirectServerConnection *MImDirectServerConnection::instance()
4557-{
4558- static MImDirectServerConnection singleton;
4559-
4560- return &singleton;
4561-}
4562-
4563-MImDirectServerConnection::MImDirectServerConnection(QObject *parent)
4564- : MImServerConnection(parent)
4565- , mIcConnection(0)
4566- , mConnectionId(firstConnectionId)
4567-{
4568- /* FIXME: Don't hardcode mConnectionId
4569- Ideally it should be possible to have multiple IC (and thus server connection)
4570- in one process, talking to one imServer, for testing purposes. */
4571-}
4572-
4573-void MImDirectServerConnection::connectTo(MImInputContextDirectConnection *icConnection)
4574-{
4575- if (!icConnection) {
4576- qCritical() << __PRETTY_FUNCTION__ << "icConnection cannot be NULL";
4577- return;
4578- }
4579-
4580- if (icConnection != mIcConnection) {
4581- mIcConnection = icConnection;
4582- icConnection->connectTo(this);
4583- }
4584-}
4585-
4586-void MImDirectServerConnection::activateContext()
4587-{
4588- mIcConnection->activateContext(mConnectionId);
4589-}
4590-
4591-void MImDirectServerConnection::showInputMethod()
4592-{
4593- mIcConnection->showInputMethod(mConnectionId);
4594-}
4595-
4596-void MImDirectServerConnection::hideInputMethod()
4597-{
4598- mIcConnection->hideInputMethod(mConnectionId);
4599-}
4600-
4601-void MImDirectServerConnection::mouseClickedOnPreedit(const QPoint &pos, const QRect &preeditRect)
4602-{
4603- mIcConnection->mouseClickedOnPreedit(mConnectionId, pos, preeditRect);
4604-}
4605-
4606-void MImDirectServerConnection::setPreedit(const QString &text, int cursorPos)
4607-{
4608- mIcConnection->setPreedit(mConnectionId, text, cursorPos);
4609-}
4610-
4611-void MImDirectServerConnection::updateWidgetInformation(const QMap<QString, QVariant> &stateInformation,
4612- bool focusChanged)
4613-{
4614- mIcConnection->updateWidgetInformation(mConnectionId, stateInformation, focusChanged);
4615-}
4616-
4617-void MImDirectServerConnection::reset(bool requireSynchronization)
4618-{
4619- Q_UNUSED(requireSynchronization);
4620- mIcConnection->reset(mConnectionId);
4621-}
4622-
4623-bool MImDirectServerConnection::pendingResets()
4624-{
4625- return MImServerConnection::pendingResets();
4626-}
4627-
4628-void MImDirectServerConnection::appOrientationAboutToChange(int angle)
4629-{
4630- mIcConnection->receivedAppOrientationAboutToChange(mConnectionId, angle);
4631-}
4632-
4633-void MImDirectServerConnection::appOrientationChanged(int angle)
4634-{
4635- mIcConnection->receivedAppOrientationChanged(mConnectionId, angle);
4636-}
4637-
4638-void MImDirectServerConnection::setCopyPasteState(bool copyAvailable, bool pasteAvailable)
4639-{
4640- mIcConnection->setCopyPasteState(mConnectionId, copyAvailable, pasteAvailable);
4641-}
4642-
4643-void MImDirectServerConnection::processKeyEvent(QEvent::Type keyType, Qt::Key keyCode,
4644- Qt::KeyboardModifiers modifiers,
4645- const QString &text, bool autoRepeat, int count,
4646- quint32 nativeScanCode, quint32 nativeModifiers,
4647- unsigned long time)
4648-{
4649- mIcConnection->processKeyEvent(mConnectionId, keyType, keyCode, modifiers, text,
4650- autoRepeat, count, nativeScanCode, nativeModifiers,
4651- time);
4652-}
4653-
4654-void MImDirectServerConnection::registerAttributeExtension(int id, const QString &fileName)
4655-{
4656- mIcConnection->registerAttributeExtension(mConnectionId, id, fileName);
4657-}
4658-
4659-void MImDirectServerConnection::unregisterAttributeExtension(int id)
4660-{
4661- mIcConnection->unregisterAttributeExtension(mConnectionId, id);
4662-}
4663-
4664-void MImDirectServerConnection::setExtendedAttribute(int id, const QString &target, const QString &targetItem,
4665- const QString &attribute, const QVariant &value)
4666-{
4667- mIcConnection->setExtendedAttribute(mConnectionId, id, target, targetItem, attribute, value);
4668-}
4669-
4670-void MImDirectServerConnection::loadPluginSettings(const QString &descriptionLanguage)
4671-{
4672- mIcConnection->loadPluginSettings(mConnectionId, descriptionLanguage);
4673-}
4674
4675=== removed file 'connection/mimdirectserverconnection.h'
4676--- connection/mimdirectserverconnection.h 2012-07-10 09:00:33 +0000
4677+++ connection/mimdirectserverconnection.h 1970-01-01 00:00:00 +0000
4678@@ -1,80 +0,0 @@
4679-/* * This file is part of Maliit framework *
4680- *
4681- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4682- * All rights reserved.
4683- *
4684- * Contact: maliit-discuss@lists.maliit.org
4685- *
4686- * This library is free software; you can redistribute it and/or
4687- * modify it under the terms of the GNU Lesser General Public
4688- * License version 2.1 as published by the Free Software Foundation
4689- * and appearing in the file LICENSE.LGPL included in the packaging
4690- * of this file.
4691- */
4692-
4693-#ifndef MIMDIRECTSERVERCONNECTION_H
4694-#define MIMDIRECTSERVERCONNECTION_H
4695-
4696-#include "mimserverconnection.h"
4697-
4698-class MInputContextConnection;
4699-class MImInputContextDirectConnection;
4700-
4701-class MImDirectServerConnection : public MImServerConnection
4702-{
4703- Q_OBJECT
4704-
4705-public:
4706- static MImDirectServerConnection *instance();
4707-
4708- //! \brief Constructor
4709- explicit MImDirectServerConnection(QObject *parent = 0);
4710-
4711- void connectTo(MImInputContextDirectConnection *icConnection);
4712-
4713- //! reimpl
4714- virtual void activateContext();
4715-
4716- virtual void showInputMethod();
4717-
4718- virtual void hideInputMethod();
4719-
4720- virtual void mouseClickedOnPreedit(const QPoint &pos, const QRect &preeditRect);
4721-
4722- virtual void setPreedit(const QString &text, int cursorPos);
4723-
4724- virtual void updateWidgetInformation(const QMap<QString, QVariant> &stateInformation,
4725- bool focusChanged);
4726-
4727- virtual void reset(bool requireSynchronization);
4728- virtual bool pendingResets();
4729-
4730- virtual void appOrientationAboutToChange(int angle);
4731-
4732- virtual void appOrientationChanged(int angle);
4733-
4734- virtual void setCopyPasteState(bool copyAvailable, bool pasteAvailable);
4735-
4736- virtual void processKeyEvent(QEvent::Type keyType, Qt::Key keyCode,
4737- Qt::KeyboardModifiers modifiers,
4738- const QString &text, bool autoRepeat, int count,
4739- quint32 nativeScanCode, quint32 nativeModifiers, unsigned long time);
4740-
4741- virtual void registerAttributeExtension(int id, const QString &fileName);
4742-
4743- virtual void unregisterAttributeExtension(int id);
4744-
4745- virtual void setExtendedAttribute(int id, const QString &target, const QString &targetItem,
4746- const QString &attribute, const QVariant &value);
4747-
4748- virtual void loadPluginSettings(const QString &descriptionLanguage);
4749- //! reimpl end
4750-
4751-private:
4752- Q_DISABLE_COPY(MImDirectServerConnection)
4753-
4754- MInputContextConnection *mIcConnection;
4755- unsigned int mConnectionId;
4756-};
4757-
4758-#endif // MIMDIRECTSERVERCONNECTION_H
4759
4760=== removed file 'connection/miminputcontextdirectconnection.cpp'
4761--- connection/miminputcontextdirectconnection.cpp 2012-08-06 12:48:36 +0000
4762+++ connection/miminputcontextdirectconnection.cpp 1970-01-01 00:00:00 +0000
4763@@ -1,142 +0,0 @@
4764-/* * This file is part of Maliit framework *
4765- *
4766- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4767- * All rights reserved.
4768- *
4769- * Contact: maliit-discuss@lists.maliit.org
4770- *
4771- * This library is free software; you can redistribute it and/or
4772- * modify it under the terms of the GNU Lesser General Public
4773- * License version 2.1 as published by the Free Software Foundation
4774- * and appearing in the file LICENSE.LGPL included in the packaging
4775- * of this file.
4776- */
4777-
4778-#include "miminputcontextdirectconnection.h"
4779-
4780-#include "mimdirectserverconnection.h"
4781-
4782-#include <QtCore>
4783-#include <QtGui/QKeyEvent>
4784-
4785-MImInputContextDirectConnection *MImInputContextDirectConnection::instance()
4786-{
4787- static MImInputContextDirectConnection singleton;
4788-
4789- return &singleton;
4790-}
4791-
4792-MImInputContextDirectConnection::MImInputContextDirectConnection(QObject *parent)
4793- : MInputContextConnection(parent)
4794- , mServerConnection(0)
4795-{
4796-}
4797-
4798-void MImInputContextDirectConnection::connectTo(MImDirectServerConnection *serverConnection)
4799-{
4800- if (!serverConnection) {
4801- qCritical() << __PRETTY_FUNCTION__ << "serverConnection cannot be NULL";
4802- return;
4803- }
4804-
4805- if (serverConnection != mServerConnection) {
4806- mServerConnection = serverConnection;
4807- serverConnection->connectTo(this);
4808- }
4809-}
4810-
4811-void MImInputContextDirectConnection::sendPreeditString(const QString &string,
4812- const QList<Maliit::PreeditTextFormat> &preeditFormats,
4813- int replacementStart,
4814- int replacementLength,
4815- int cursorPos)
4816-{
4817- Q_EMIT mServerConnection->updatePreedit(string, preeditFormats,
4818- replacementStart, replacementLength, cursorPos);
4819-}
4820-
4821-void MImInputContextDirectConnection::sendCommitString(const QString &string, int replaceStart,
4822- int replaceLength, int cursorPos)
4823-{
4824- Q_EMIT mServerConnection->commitString(string, replaceStart, replaceLength, cursorPos);
4825-}
4826-
4827-void MImInputContextDirectConnection::sendKeyEvent(const QKeyEvent &keyEvent,
4828- Maliit::EventRequestType requestType)
4829-{
4830- const int type = static_cast<int>(keyEvent.type());
4831- const int key = static_cast<int>(keyEvent.key());
4832- const int modifiers = static_cast<int>(keyEvent.modifiers());
4833-
4834- /* TODO: make this API take the QEvent, so we don't have to do convert the argument here
4835- in a way that matches the conversion done in MInputContext::keyEvent() */
4836- Q_EMIT mServerConnection->keyEvent(type, key, modifiers,
4837- keyEvent.text().toUtf8().data(),
4838- keyEvent.isAutoRepeat(), keyEvent.count(),
4839- requestType);
4840-}
4841-
4842-void MImInputContextDirectConnection::notifyImInitiatedHiding()
4843-{
4844- Q_EMIT mServerConnection->imInitiatedHide();
4845-}
4846-
4847-void MImInputContextDirectConnection::invokeAction(const QString &action, const QKeySequence &sequence)
4848-{
4849- Q_EMIT mServerConnection->invokeAction(action, sequence);
4850-}
4851-
4852-void MImInputContextDirectConnection::setRedirectKeys(bool enabled)
4853-{
4854- Q_EMIT mServerConnection->setRedirectKeys(enabled);
4855-}
4856-
4857-void MImInputContextDirectConnection::setDetectableAutoRepeat(bool enabled)
4858-{
4859- Q_EMIT mServerConnection->setDetectableAutoRepeat(enabled);
4860-}
4861-
4862-void MImInputContextDirectConnection::setGlobalCorrectionEnabled(bool enabled)
4863-{
4864- Q_EMIT mServerConnection->setGlobalCorrectionEnabled(enabled);
4865-}
4866-
4867-void MImInputContextDirectConnection::setSelection(int start, int length)
4868-{
4869- Q_EMIT mServerConnection->setSelection(start, length);
4870-}
4871-
4872-void MImInputContextDirectConnection::updateInputMethodArea(const QRegion &region)
4873-{
4874- Q_EMIT mServerConnection->updateInputMethodArea(region.boundingRect());
4875-}
4876-
4877-void MImInputContextDirectConnection::notifyExtendedAttributeChanged(int id,
4878- const QString &target,
4879- const QString &targetItem,
4880- const QString &attribute,
4881- const QVariant &value)
4882-{
4883- Q_EMIT mServerConnection->extendedAttributeChanged(id, target, targetItem,
4884- attribute, value);
4885-}
4886-
4887-void MImInputContextDirectConnection::notifyExtendedAttributeChanged(const QList<int> &clientIds,
4888- int id,
4889- const QString &target,
4890- const QString &targetItem,
4891- const QString &attribute,
4892- const QVariant &value)
4893-{
4894- Q_UNUSED(clientIds);
4895-
4896- Q_EMIT mServerConnection->extendedAttributeChanged(id, target, targetItem,
4897- attribute, value);
4898-}
4899-
4900-void MImInputContextDirectConnection::pluginSettingsLoaded(int clientId, const QList<MImPluginSettingsInfo> &info)
4901-{
4902- Q_UNUSED(clientId);
4903-
4904- Q_EMIT mServerConnection->pluginSettingsReceived(info);
4905-}
4906
4907=== removed file 'connection/miminputcontextdirectconnection.h'
4908--- connection/miminputcontextdirectconnection.h 2012-08-06 12:48:36 +0000
4909+++ connection/miminputcontextdirectconnection.h 1970-01-01 00:00:00 +0000
4910@@ -1,71 +0,0 @@
4911-/* * This file is part of Maliit framework *
4912- *
4913- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4914- * All rights reserved.
4915- *
4916- * Contact: maliit-discuss@lists.maliit.org
4917- *
4918- * This library is free software; you can redistribute it and/or
4919- * modify it under the terms of the GNU Lesser General Public
4920- * License version 2.1 as published by the Free Software Foundation
4921- * and appearing in the file LICENSE.LGPL included in the packaging
4922- * of this file.
4923- */
4924-
4925-#ifndef MIMINPUTCONTEXTDIRECTCONNECTION_H
4926-#define MIMINPUTCONTEXTDIRECTCONNECTION_H
4927-
4928-#include "minputcontextconnection.h"
4929-
4930-#include <QtCore>
4931-
4932-class MImServerConnection;
4933-class MImDirectServerConnection;
4934-
4935-class MImInputContextDirectConnection : public MInputContextConnection
4936-{
4937- Q_OBJECT
4938-public:
4939- explicit MImInputContextDirectConnection(QObject *parent = 0);
4940-
4941- static MImInputContextDirectConnection *instance();
4942-
4943- void connectTo(MImDirectServerConnection *mServerConnection);
4944-
4945- //! reimpl
4946- virtual void sendPreeditString(const QString &string,
4947- const QList<Maliit::PreeditTextFormat> &preeditFormats,
4948- int replacementStart = 0,
4949- int replacementLength = 0,
4950- int cursorPos = -1);
4951- virtual void sendCommitString(const QString &string, int replaceStart = 0,
4952- int replaceLength = 0, int cursorPos = -1);
4953- virtual void sendKeyEvent(const QKeyEvent &keyEvent,
4954- Maliit::EventRequestType requestType
4955- = Maliit::EventRequestBoth);
4956- virtual void notifyImInitiatedHiding();
4957- virtual void invokeAction(const QString &action, const QKeySequence &sequence);
4958- virtual void setRedirectKeys(bool enabled);
4959- virtual void setDetectableAutoRepeat(bool enabled);
4960- virtual void setGlobalCorrectionEnabled(bool enabled);
4961- virtual void setSelection(int start, int length);
4962- virtual void updateInputMethodArea(const QRegion &region);
4963- virtual void notifyExtendedAttributeChanged(int id,
4964- const QString &target,
4965- const QString &targetItem,
4966- const QString &attribute,
4967- const QVariant &value);
4968- virtual void notifyExtendedAttributeChanged(const QList<int> &clientIds,
4969- int id,
4970- const QString &target,
4971- const QString &targetItem,
4972- const QString &attribute,
4973- const QVariant &value);
4974- virtual void pluginSettingsLoaded(int clientId, const QList<MImPluginSettingsInfo> &info);
4975- //! reimpl end
4976-
4977-private:
4978- MImServerConnection *mServerConnection;
4979-};
4980-
4981-#endif // MIMINPUTCONTEXTDIRECTCONNECTION_H
4982
4983=== modified file 'connection/mimserverconnection.cpp'
4984--- connection/mimserverconnection.cpp 2012-07-10 09:00:33 +0000
4985+++ connection/mimserverconnection.cpp 2013-06-27 13:54:25 +0000
4986@@ -43,8 +43,7 @@
4987 Q_UNUSED(cursorPos);
4988 }
4989
4990-void MImServerConnection::updateWidgetInformation(const QMap<QString, QVariant> &stateInformation,
4991- bool focusChanged)
4992+void MImServerConnection::updateWidgetInformation(const QMap<QString, QVariant> &stateInformation, bool focusChanged)
4993 {
4994 Q_UNUSED(stateInformation);
4995 Q_UNUSED(focusChanged);
4996@@ -77,10 +76,10 @@
4997 }
4998
4999 void MImServerConnection::processKeyEvent(QEvent::Type keyType, Qt::Key keyCode,
5000- Qt::KeyboardModifiers modifiers,
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches