[PATCH 0/2] MR9940: Include inkobj
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> --- include/Makefile.in | 1 + include/peninputpanel.idl | 202 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 203 insertions(+) create mode 100644 include/peninputpanel.idl diff --git a/include/Makefile.in b/include/Makefile.in index 3018b8f72bb..63f642a7f15 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -651,6 +651,7 @@ SOURCES = \ pathcch.h \ pdh.h \ pdhmsg.h \ + peninputpanel.idl \ perflib.h \ perhist.idl \ physicalmonitorenumerationapi.h \ diff --git a/include/peninputpanel.idl b/include/peninputpanel.idl new file mode 100644 index 00000000000..9172142706c --- /dev/null +++ b/include/peninputpanel.idl @@ -0,0 +1,202 @@ +/* + * Copyright (C) 2025 Alistair Leslie-Hughes + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "oaidl.idl"; + +#if !defined(progid) && !defined(__WIDL__) +#define threading(model) +#define progid(str) +#define vi_progid(str) +#endif + + +[ + uuid(500f9c5a-6739-449b-9cfa-5fc2f2e9ddce) +] +typedef enum +{ + InteractionMode_InPlace, + InteractionMode_Floating, + InteractionMode_DockedTop, + InteractionMode_DockedBottom +} InteractionMode; + +[ + uuid(aa9bda6b-fc6a-49a3-9d7c-26b233690583) +] +typedef enum +{ + InPlaceState_Auto, + InPlaceState_HoverTarget, + InPlaceState_Expanded +} InPlaceState; + +[ + uuid(619eab37-412f-44ca-996f-0f415fb8bc12) +] +typedef enum +{ + InPlaceDirection_Auto, + InPlaceDirection_Bottom, + InPlaceDirection_Top +} InPlaceDirection; + + +[ + uuid(8b4f78bf-4253-4467-a006-670419caa993) +] +typedef enum +{ + PanelInputArea_Auto, + PanelInputArea_Keyboard, + PanelInputArea_WritingPad, + PanelInputArea_CharacterPad +} PanelInputArea; + +[ + uuid(d708f745-981e-4e9b-afa0-98082aadb421) +] +typedef enum +{ + CorrectionMode_NotVisible, + CorrectionMode_PreInsertion, + CorrectionMode_PostInsertionCollapsed, + CorrectionMode_PostInsertionExpanded +} CorrectionMode; + +[ + uuid(84ccefd0-9212-44e4-94e6-91562a94016e) +] +typedef enum +{ + CorrectionPosition_Auto, + CorrectionPosition_Bottom, + CorrectionPosition_Top +} CorrectionPosition; + +[ + object, + oleautomation, + uuid(27560408-8e64-4fe1-804e-421201584b31), +] +interface ITextInputPanelEventSink : IUnknown +{ + HRESULT InPlaceStateChanging(InPlaceState old_state, InPlaceState new_state); + HRESULT InPlaceStateChanged(InPlaceState old_state, InPlaceState new_state); + + HRESULT InPlaceSizeChanging(RECT old_rect, RECT new_rect); + HRESULT InPlaceSizeChanged(RECT old_rect, RECT new_rect); + + HRESULT InputAreaChanging(PanelInputArea old_area, PanelInputArea new_area); + HRESULT InputAreaChanged(PanelInputArea old_area, PanelInputArea new_area); + + HRESULT CorrectionModeChanging(CorrectionMode old_mode,CorrectionMode new_mode); + HRESULT CorrectionModeChanged(CorrectionMode old_mode, CorrectionMode new_mode); + + HRESULT InPlaceVisibilityChanging(BOOL old_visible, BOOL new_visible); + HRESULT InPlaceVisibilityChanged(BOOL old_visible, BOOL new_visible); + + HRESULT TextInserting(SAFEARRAY(VARIANT) *ink); + HRESULT TextInserted(SAFEARRAY(VARIANT) *ink); +}; + +[ + object, + oleautomation, + uuid(6b6a65a5-6af3-46c2-b6ea-56cd1f80df71), +] +interface ITextInputPanel : IUnknown +{ + [propget] + HRESULT AttachedEditWindow([retval, out] HWND *window); + + [propput] + HRESULT AttachedEditWindow([in] HWND window); + + [propget] + HRESULT CurrentInteractionMode([retval, out] InteractionMode *mode); + + [propget] + HRESULT DefaultInPlaceState([retval, out] InPlaceState *state); + + [propput] + HRESULT DefaultInPlaceState([in] InPlaceState state); + + [propget] + HRESULT CurrentInPlaceState([retval, out] InPlaceState *state); + + [propget] + HRESULT DefaultInputArea([retval, out] PanelInputArea *area); + + [propput] + HRESULT DefaultInputArea([in] PanelInputArea area); + + [propget] + HRESULT CurrentInputArea([retval, out] PanelInputArea *area); + + [propget] + HRESULT CurrentCorrectionMode([retval, out] CorrectionMode *Mode); + + [propget] + HRESULT PreferredInPlaceDirection([retval, out] InPlaceDirection *direction); + + [propput] + HRESULT PreferredInPlaceDirection( [in] InPlaceDirection drection); + + [propget] + HRESULT ExpandPostInsertionCorrection([retval, out] BOOL *expand); + + [propput] + HRESULT ExpandPostInsertionCorrection([in] BOOL expand); + + [propget] + HRESULT InPlaceVisibleOnFocus([retval, out] BOOL *bisible); + + [propput] + HRESULT InPlaceVisibleOnFocus([in] BOOL bisible); + + [propget] + HRESULT InPlaceBoundingRectangle([retval, out] RECT *bounding_rect); + + [propget] + HRESULT PopUpCorrectionHeight([retval, out] int *height); + + [propget] + HRESULT PopDownCorrectionHeight([retval, out] int *height); + + HRESULT CommitPendingInput(void); + + HRESULT SetInPlaceVisibility(BOOL Visible); + + HRESULT SetInPlacePosition(int x, int y, CorrectionPosition position); + + HRESULT SetInPlaceHoverTargetPosition(int x, int y); + + HRESULT Advise(ITextInputPanelEventSink *sink, DWORD mask); + + HRESULT Unadvise(ITextInputPanelEventSink *sink); +} + +[ + uuid(f9b189d7-228b-4f2b-8650-b97f59e02c8c) +] +coclass TextInputPanel +{ + [default] interface ITextInputPanel; +} -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9940
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> --- include/msinkaut.idl | 173 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 173 insertions(+) diff --git a/include/msinkaut.idl b/include/msinkaut.idl index 743dec82a40..beb7c5bb3fa 100644 --- a/include/msinkaut.idl +++ b/include/msinkaut.idl @@ -108,6 +108,39 @@ library MSINKAUTLib IRC_Poor = 2 } InkRecognitionConfidence; + typedef enum InkOverlayEditingMode + { + IOEM_Ink = 0, + IOEM_Delete = 1, + IOEM_Select = 2 + } InkOverlayEditingMode; + + typedef enum InkOverlayEraserMode + { + IOERM_StrokeErase = 0, + IOERM_PointErase = 1 + } InkOverlayEraserMode; + + typedef enum + { + IOAM_Behind = 0, + IOAM_InFront = 1 + } InkOverlayAttachMode; + + typedef enum SelectionHitResult + { + SHR_None = 0, + SHR_NW = 1, + SHR_SE = 2, + SHR_NE = 3, + SHR_SW = 4, + SHR_E = 5, + SHR_W = 6, + SHR_N = 7, + SHR_S = 8, + SHR_Selection = 9 + } SelectionHitResult; + [ odl, uuid(DB489209-B7C3-411D-90F6-1548CFFF271E), @@ -1006,4 +1039,144 @@ cpp_quote("#endif /* _WINGDI_ */") [in] InkCollectorEventInterest EventId, [in] VARIANT_BOOL Listen); } + + [ + odl, + dual, + oleautomation, + uuid(B82A463B-C1C5-45A3-997C-DEAB5651B67A), + ] + interface IInkOverlay : IDispatch + { + [id(0x00000002), propget] + HRESULT hWnd([out, retval] LONG_PTR *window); + [id(0x00000002), propput] + HRESULT hWnd([in] LONG_PTR window); + [id(0x00000001), propget] + HRESULT Enabled([out, retval] VARIANT_BOOL* Collecting); + [id(0x00000001), propput] + HRESULT Enabled([in] VARIANT_BOOL Collecting); + [id(0x00000005), propget] + HRESULT DefaultDrawingAttributes([out, retval] IInkDrawingAttributes** CurrentAttributes); + [id(0x00000005), propputref] + HRESULT DefaultDrawingAttributes([in] IInkDrawingAttributes* CurrentAttributes); + [id(0x00000006), propget] + HRESULT Renderer([out, retval] IInkRenderer** CurrentInkRenderer); + [id(0x00000006), propputref] + HRESULT Renderer([in] IInkRenderer* CurrentInkRenderer); + [id(0x00000007), propget] + HRESULT Ink([out, retval] IInkDisp** Ink); + [id(0x00000007), propputref] + HRESULT Ink([in] IInkDisp* Ink); + [id(0x00000008), propget] + HRESULT AutoRedraw([out, retval] VARIANT_BOOL* AutoRedraw); + [id(0x00000008), propput] + HRESULT AutoRedraw([in] VARIANT_BOOL AutoRedraw); + [id(0x00000009), propget] + HRESULT CollectingInk([out, retval] VARIANT_BOOL* Collecting); + [id(0x0000001c), propget] + HRESULT CollectionMode([out, retval] InkCollectionMode* Mode); + [id(0x0000001c), propput] + HRESULT CollectionMode([in] InkCollectionMode Mode); + [id(0x0000001f), propget] + HRESULT DynamicRendering([out, retval] VARIANT_BOOL* Enabled); + [id(0x0000001f), propput] + HRESULT DynamicRendering([in] VARIANT_BOOL Enabled); + [id(0x00000020), propget] + HRESULT DesiredPacketDescription([out, retval] VARIANT* PacketGuids); + [id(0x00000020), propput] + HRESULT DesiredPacketDescription([in] VARIANT PacketGuids); + [id(0x00000023), propget] + HRESULT MouseIcon([out, retval] IPictureDisp** MouseIcon); + [id(0x00000023), propput] + HRESULT MouseIcon([in] IPictureDisp* MouseIcon); + [id(0x00000023), propputref] + HRESULT MouseIcon([in] IPictureDisp* MouseIcon); + [id(0x00000024), propget] + HRESULT MousePointer([out, retval] InkMousePointer* MousePointer); + [id(0x00000024), propput] + HRESULT MousePointer([in] InkMousePointer MousePointer); + [id(0x0000000c), propget] + HRESULT EditingMode([out, retval] InkOverlayEditingMode* EditingMode); + [id(0x0000000c), propput] + HRESULT EditingMode([in] InkOverlayEditingMode EditingMode); + [id(0x0000000d), propget] + HRESULT Selection([out, retval] IInkStrokes** Selection); + [id(0x0000000d), propput] + HRESULT Selection([in] IInkStrokes* Selection); + [id(0x00000021), propget] + HRESULT EraserMode([out, retval] InkOverlayEraserMode* EraserMode); + [id(0x00000021), propput] + HRESULT EraserMode([in] InkOverlayEraserMode EraserMode); + [id(0x00000022), propget] + HRESULT EraserWidth([out, retval] long* EraserWidth); + [id(0x00000022), propput] + HRESULT EraserWidth([in] long EraserWidth); + [id(0x0000000e), propget] + HRESULT AttachMode([out, retval] InkOverlayAttachMode* AttachMode); + [id(0x0000000e), propput] + HRESULT AttachMode([in] InkOverlayAttachMode AttachMode); + [id(0x00000014), propget] + HRESULT Cursors([out, retval] IInkCursors** Cursors); + [id(0x00000015), propget] + HRESULT MarginX([out, retval] long* MarginX); + [id(0x00000015), propput] + HRESULT MarginX([in] long MarginX); + [id(0x00000016), propget] + HRESULT MarginY([out, retval] long* MarginY); + [id(0x00000016), propput] + HRESULT MarginY([in] long MarginY); + [id(0x00000019), propget] + HRESULT Tablet([out, retval] IInkTablet** SingleTablet); + [id(0x00000026), propget] + HRESULT SupportHighContrastInk([out, retval] VARIANT_BOOL* Support); + [id(0x00000026), propput] + HRESULT SupportHighContrastInk([in] VARIANT_BOOL Support); + [id(0x00000027), propget] + HRESULT SupportHighContrastSelectionUI([out, retval] VARIANT_BOOL* Support); + [id(0x00000027), propput] + HRESULT SupportHighContrastSelectionUI([in] VARIANT_BOOL Support); + [id(0x0000000f)] + HRESULT HitTestSelection([in] long x, [in] long y, [out, retval] SelectionHitResult* SelArea); + [id(0x00000010)] + HRESULT Draw([in] IInkRectangle* Rect); + [id(0x0000001d)] + HRESULT SetGestureStatus([in] InkApplicationGesture Gesture, [in] VARIANT_BOOL Listen); + [id(0x0000001e)] + HRESULT GetGestureStatus([in] InkApplicationGesture Gesture, [out, retval] VARIANT_BOOL* Listening); + [id(0x00000018)] + HRESULT GetWindowInputRectangle([in, out] IInkRectangle** WindowInputRectangle); + [id(0x00000017)] + HRESULT SetWindowInputRectangle([in] IInkRectangle* WindowInputRectangle); + [id(0x0000001a)] + HRESULT SetAllTabletsMode([in, optional, defaultvalue(-1)] VARIANT_BOOL UseMouseForInput); + [id(0x0000001b)] + HRESULT SetSingleTabletIntegratedMode([in] IInkTablet* Tablet); + [id(0x0000000b)] + HRESULT GetEventInterest([in] InkCollectorEventInterest EventId, [out, retval] VARIANT_BOOL* Listen); + [id(0x0000000a)] + HRESULT SetEventInterest([in] InkCollectorEventInterest EventId, [in] VARIANT_BOOL Listen); + } + + [ + progid("msinkaut.InkObject.1"), + vi_progid("msinkaut.InkObject"), + threading(both), + uuid(937c1a34-151d-4610-9ca6-a8cc9bdb5d83) + ] + coclass InkDisp + { + [default] interface IInkDisp; + } + + [ + progid("msinkaut.InkOverlay.1"), + vi_progid("msinkaut.InkOverlay"), + threading(both), + uuid(65d00646-cde3-4a88-9163-6769f0f1a97d) + ] + coclass InkOverlay + { + [default] interface IInkOverlay; + } } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9940
What is this for? I tried adding some inkobj interfaces to Wine a couple of years ago for [Bug 55894](https://bugs.winehq.org/show_bug.cgi?id=55894) but I wasn't able to implement enough to make the app functional. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9940#note_127639
I was looking at [Bug 31554](https://bugs.winehq.org/show_bug.cgi?id=31554), to stop the crash as a starting point. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9940#note_127642
participants (3)
-
Alex Henrie (@alexhenrie) -
Alistair Leslie-Hughes -
Alistair Leslie-Hughes (@alesliehughes)