[Uim] [immodule_for_Qt] stabilizing API change
YamaKen
yamaken at bp.iij4u.or.jp
Tue Jun 15 13:42:36 EEST 2004
Hi there, I'm posting the article as developer of immodule for
Qt. Excuse me for posting to inappropriate place. We will move
to dedicated place soon.
I've updated the 'Simplified API' patch. This is the last code
change for the patch for Qt3 (aka 'Binary Compatible' version)
except for function renaming and possible fix for unknown bugs.
http://www.kde.gr.jp/~daisuke/immodule_for_qt/pukiwiki/?SimplifiedAPI
Corresponding version of QUimInputContext has been committed as
r906.
This release is focusing on API reorganization to be consistent
with client/server input method model of Qt/Embedded. Although
this is an optional work, I believe that the consistency is
important for future of non-desktop input method environment,
and of course Qt itself. So I've invested some days in the
development. The reorganized API also simplified IM plugin
development for Qt/X11 environment.
- Remaining work
* Validate the patch and merge into main tree (by Daisuke-san)
* Rename some inappropriate function names (I will suggest)
* Update comments in the patch
* Validate the specification by community
* Update documents
* Send updated patch to Trolltech
2004-06-15 YamaKen <yamaken at bp.iij4u.or.jp>
* src/kernel/qwidget_x11.cpp
- (setMicroFocusHint): Replace relative coordinate with
global one for qic->setMicroFocus(). This is required to
share particular IM plugin code with Qt/Embedded
* src/widgets/qlineedit.cpp
- (sendMouseEventToInputContext): Add button event sending
when clicking on out of preedit
* src/widgets/qtextedit.cpp
- (sendMouseEventToInputContext): Add button event sending
when clicking on out of preedit
* src/input/qximinputcontext_p.h
- (isComposing): New function
- (composing, cpos, sellen): Remove to follow API change
- (isPreeditRelocationEnabled): New overriding function to
follow API change
- (isPreeditPreservationEnabled): New function
* src/input/qximinputcontext_x11.cpp
- (xic_start_callback, xic_draw_callback, xic_done_callback,
x11FilterEvent, reset): Replace qic->composing with
qic->isComposing() to use automatic compose state tracking
of QInputContext
- (QXIMInputContext): Remove composing, cpos, sellen from
initializer list
- (sendIMEvent): Remove remembering of cpos, sellen
- (reset): Replace IMEnd event sending with
QInputContext::reset()
- (resetClientState): Remove cpos, sellen, composing
- (isComposing): Exported interface for xic callbacks to
access protected QInputContext::isComposing()
- (setMicroFocus): Follow API change that replaces relative
coordinate with global one
- (mouseHandler): Add approprate reset on clicking
- (setFocus, unsetFocus): Remove preedit preservation and
relocation to follow API change. They are moved to
QInputContext as generarization
- (isPreeditRelocationEnabled): New function to follow API
change.
- (isPreeditPreservationEnabled): New function. This
indicates that whether preedit state should be preserved
or not when focusing out the widget
2004-06-14 YamaKen <yamaken at bp.iij4u.or.jp>
* src/kernel/qinputcontext.h
- (setFocus): Remove hasPreservedPreedit arg
- (unsetFocus): Remove preservePreedit arg
- (isPreeditRelocationEnabled): New function
- (isComposing): New function
* src/kernel/qinputcontext.cpp
- (class QInputContextPrivate): Reorganize variables for
preedit relocation
- (QInputContextPrivate::resetComposingState): New function
- (QInputContextPrivate::updateComposingState): New function
- (setFocusWidget): Add preedit relocation support. Preedit
state is relocated to another text widget when the shared
context has focused on the another text widget. This
feature is mainly used by Japanese input methods
- (isPreeditRelocationEnabled): New function. Preedit
relocation is enabled only if this function returned TRUE.
- (isComposing): New function. Returns current composing
state as result of automatic compose state tracking
through sendIMEvent(). The function is for used by
subclass of QInputContext to know preedit state of the
widget. Although QWidget and QInputContextFactory can
access to the function as friend, they must not use the
function to know composing state of contexts. Keep less
relationship to simplify input method development
- (sendIMEvent): New 1-arg overloaded function. The function
encupsulates platform-dependent IMEvent sending. Only
Q_WS_X11 is supported for now. Q_WS_QWS should be supported
- (sendIMEvent):
* 4-args version of the overloaded function
* Isolate platform-dependent event sending process to
separated function
* Add preedit relocation support
* Add compose state tracking support
- (unsetFocus): Add reset() for simple ephemeral input
contexts
- (mouseHandler): Add reset() when clicking for simple
ephemeral input contexts
- (reset): Add preedit finalization code. Overriding
function should call this function to ensure proper
preedit state
2004-06-11 YamaKen <yamaken at bp.iij4u.or.jp>
* src/kernel/qlineedit.cpp
- (QLineEditPrivate::xToPosInternal, QLineEditPrivate::xToPos):
Fix loose placement to tail when clicking beyond the string
2004-06-10 YamaKen <yamaken at bp.iij4u.or.jp>
* src/kernel/qinputcontext.h
- Remove several pointers to QWidget to share concrete IM
implementation code with Qt/Embedded. The IM model of
Qt/Embedded requires that widgets and input contexts are
existing in another process
- (QInputContext): Remove the QWidget * arg
- (focusWidget, ownerWidget):
* Move to protected and unrecommended
* Move the inline function definition to qinputcontext.cpp
- (filterEvent): Remove unnecessary keywidget
- (setFocus):
* Remove newFocusWidget arg
* Add hasPreservedPreedit arg
- (unsetFocus): Add preservePreedit arg
- (sendIMError): New function to hide ownerWidget from
derived QInputContext
- (composingWidget, setComposingWidget): New function to support
preedit relocation of shared context on focus transition
- (setFocusWidget, setOwnerWidget): New function to
implement internal functionality on Qt/X11 platform
- (d): New variable to hide ABI change
- (QInputContext, operator=): New function to disable copy
constructor and operator=
* src/kernel/qinputcontext.cpp
- (class QInputContextPrivate): New class to hide ABI change
- (QInputContext):
* Follow API change
* Follow introducing QInputContextPrivate
- (~QInputContext): Follow introducing QInputContextPrivate
- (ownerWidget):
* Move from qinputcontext.h
* Follow introducing QInputContextPrivate
- (setOwnerWidget): New function to complement removal of
the arg of QInputContext constructor
- (composingWidget, setComposingWidget): New function. These
functions are participating with preedit relocation of shared
context on focus transition
- (focusWidget):
* Move from qinputcontext.h
* Follow introducing QInputContextPrivate
* Follow introducing composingWidget
- (setFocusWidget): New function to complement removal of
the QWidget * arg of setFocus()
- (filterEvent): Follow API change of removal of keywidget
- (sendIMEvent): Add #ifdef to isolate Qt/X11 dependent code
- (sendIMError): New function to hide ownerWidget() from
derived QInputContext. This is required to share particular
IM plugin code with Qt/Embedded
- (setFocus, unsetFocus): Follow API change
* src/input/qinputcontextfactory.cpp
- (create): Add ownerWidget initialization for new context
* src/kernel/qwidget.cpp
- (setFocus): Remove unnecessary shared input context
checking
* src/kernel/qwidget_x11.cpp
- (setActiveWindow): Replace duplicated code with
focusInputContext()
- (getInputContext): Return input context only if
isInputMethodEnabled() widget, otherwise returns 0. This
is required for proper focus transition handling
- (unfocusInputContext): Follow API change of
QInputContext::unsetFocus()
* src/kernel/qapplication.cpp
- (setActiveWindow): Follow change of QWidget::unfocusInputContext()
* src/kernel/qapplication_x11.cpp
- (x11ProcessEvent): Follow API change of
QInputContext::filterEvent()
* src/input/qximinputcontext_p.h
- (setFocus, unsetFocus): Follow API Change
- (hasFocus): New function
- (close): New function
* src/input/qximinputcontext.cpp
- Remove unrecommended focusWidget() and ownerWidget()
- (ximWidgetList): Remove to replace with ximContextList
- (ximContextList): New variable
- (xic_draw_callback): Replace focusWidget() with hasFocus()
to follow API Change
- (QXIMInputContext):
* Follow API change
* Follow replacing to ximContextList
- (~QXIMInputContext):
* Follow replacing to ximContextList
* Remove unnecessary QInputContext::unsetFocus()
- (close_xim):
* Follow replacing to ximContextList
* Follow API change
- (close, hasFocus): New function. Exported interface for
xic_draw_callback to access protected features
- (setFocus, unsetFocus): Follow API change
-------------------------------
YamaKen yamaken at bp.iij4u.or.jp
More information about the uim
mailing list