https://git.reactos.org/?p=reactos.git;a=commitdiff;h=045e9dee58dda42769ea9…
commit 045e9dee58dda42769ea94c3c3e9239eebefa5f8
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Dec 11 07:51:17 2023 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon Dec 11 07:51:17 2023 +0900
[SDK][UUID] Strengthen <ctfutb.h> (#6135)
For supporting Text Input Processors (TIPs).
Add many TSF interfaces and definitions into "ctfutb.idl".
CORE-19268
---
sdk/include/psdk/ctfutb.idl | 282 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 276 insertions(+), 6 deletions(-)
diff --git a/sdk/include/psdk/ctfutb.idl b/sdk/include/psdk/ctfutb.idl
index d32894f820b..274dda28e04 100644
--- a/sdk/include/psdk/ctfutb.idl
+++ b/sdk/include/psdk/ctfutb.idl
@@ -1,5 +1,6 @@
/*
* Copyright 2010 Justin Chevrier
+ * Copyright 2023 Katayama Hirofumi MZ
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -23,12 +24,85 @@ import "msctf.idl";
#endif
#endif
+cpp_quote("#define TF_FLOATINGLANGBAR_WNDTITLEW
L\"TF_FloatingLangBar_WndTitle\"")
+cpp_quote("#define TF_FLOATINGLANGBAR_WNDTITLEA
\"TF_FloatingLangBar_WndTitle\"")
+cpp_quote("#ifdef UNICODE")
+cpp_quote("#define TF_FLOATINGLANGBAR_WNDTITLE TF_FLOATINGLANGBAR_WNDTITLEW")
+cpp_quote("#else")
+cpp_quote("#define TF_FLOATINGLANGBAR_WNDTITLE TF_FLOATINGLANGBAR_WNDTITLEA")
+cpp_quote("#endif")
+
+/* Flags for ITfLangBarItemSink::OnUpdate */
+cpp_quote("#define TF_LBI_ICON 0x00000001")
+cpp_quote("#define TF_LBI_TEXT 0x00000002")
+cpp_quote("#define TF_LBI_TOOLTIP 0x00000004")
+cpp_quote("#define TF_LBI_BITMAP 0x00000008")
+cpp_quote("#define TF_LBI_BALLOON 0x00000010")
+cpp_quote("#define TF_LBI_CUSTOMUI 0x00000020")
+cpp_quote("#define TF_LBI_BTNALL (TF_LBI_TEXT | TF_LBI_ICON |
TF_LBI_TOOLTIP)")
+cpp_quote("#define TF_LBI_BMPBTNALL (TF_LBI_TEXT | TF_LBI_BITMAP |
TF_LBI_TOOLTIP)")
+cpp_quote("#define TF_LBI_BMPALL (TF_LBI_BITMAP | TF_LBI_TOOLTIP)")
+cpp_quote("#define TF_LBI_STATUS 0x00010000")
+
+/* Flags for ITfLangBarItem::GetInfo */
+cpp_quote("#define TF_LBI_STYLE_HIDDENSTATUSCONTROL 0x00000001")
+cpp_quote("#define TF_LBI_STYLE_SHOWNINTRAY 0x00000002")
+cpp_quote("#define TF_LBI_STYLE_HIDEONNOOTHERITEMS 0x00000004")
+cpp_quote("#define TF_LBI_STYLE_SHOWNINTRAYONLY 0x00000008")
+cpp_quote("#define TF_LBI_STYLE_HIDDENBYDEFAULT 0x00000010")
+cpp_quote("#define TF_LBI_STYLE_TEXTCOLORICON 0x00000020")
+cpp_quote("#define TF_LBI_STYLE_BTN_BUTTON 0x00010000")
+cpp_quote("#define TF_LBI_STYLE_BTN_MENU 0x00020000")
+cpp_quote("#define TF_LBI_STYLE_BTN_TOGGLE 0x00040000")
+
+/* Flags for ITfLangBarItem::GetStatus */
+cpp_quote("#define TF_LBI_STATUS_HIDDEN 0x00000001")
+cpp_quote("#define TF_LBI_STATUS_DISABLED 0x00000002")
+cpp_quote("#define TF_LBI_STATUS_BTN_TOGGLED 0x00010000")
+
+cpp_quote("#define TF_LBI_BMPF_VERTICAL 0x00000001")
+
+/* Flags for ShowFloating */
+cpp_quote("#define TF_SFT_SHOWNORMAL 0x00000001")
+cpp_quote("#define TF_SFT_DOCK 0x00000002")
+cpp_quote("#define TF_SFT_MINIMIZED 0x00000004")
+cpp_quote("#define TF_SFT_HIDDEN 0x00000008")
+cpp_quote("#define TF_SFT_NOTRANSPARENCY 0x00000010")
+cpp_quote("#define TF_SFT_LOWTRANSPARENCY 0x00000020")
+cpp_quote("#define TF_SFT_HIGHTRANSPARENCY 0x00000040")
+cpp_quote("#define TF_SFT_LABELS 0x00000080")
+cpp_quote("#define TF_SFT_NOLABELS 0x00000100")
+cpp_quote("#define TF_SFT_EXTRAICONSONMINIMIZED 0x00000200")
+cpp_quote("#define TF_SFT_NOEXTRAICONSONMINIMIZED 0x00000400")
+cpp_quote("#define TF_SFT_DESKBAND 0x00000800")
+
+/* OnMenuSelect flags */
+cpp_quote("#define TF_INVALIDMENUITEM (UINT)(-1)")
+
+/* SystemDeviceTypeLangbarItem flag */
+cpp_quote("#define TF_DTLBI_USEPROFILEICON 0x00000001")
+
+typedef enum
+{
+ TF_LBI_CLK_RIGHT = 1,
+ TF_LBI_CLK_LEFT = 2
+} TfLBIClick;
+
interface ITfLangBarEventSink;
interface ITfLangBarItemMgr;
interface ITfInputProcessorProfiles;
interface IEnumTfLangBarItems;
interface ITfLangBarItem;
interface ITfLangBarItemSink;
+interface ITfLangBarItemBalloon;
+interface ITfLangBarItemBitmap;
+interface ITfLangBarItemBitmapButton;
+interface ITfLangBarItemButton;
+interface ITfMenu;
+interface ITfSystemDeviceTypeLangBarItem;
+interface ITfSystemLangBarItem;
+interface ITfSystemLangBarItemSink;
+interface ITfSystemLangBarItemText;
[
object,
@@ -76,7 +150,7 @@ interface ITfLangBarMgr: IUnknown
HRESULT GetShowFloatingStatus(
[out] DWORD *pdwFlags);
-};
+}
[
object,
@@ -123,7 +197,7 @@ typedef [uuid(12a1d29f-a065-440c-9746-eb2002c8bd19)] struct
TF_LANGBARITEMINFO
[
object,
uuid(ba468c55-9956-4fb1-a59d-52a7dd7cc6aa),
- pointer_default(unique),
+ pointer_default(unique)
]
interface ITfLangBarItemMgr : IUnknown
{
@@ -177,12 +251,12 @@ interface ITfLangBarItemMgr : IUnknown
HRESULT UnadviseItemsSink(
[in] ULONG ulCount,
[in, size_is(ulCount)] DWORD *pdwCookie);
-};
+}
[
object,
uuid(583f34d0-de25-11d2-afdd-00105a2799b5),
- pointer_default(unique),
+ pointer_default(unique)
]
interface IEnumTfLangBarItems : IUnknown
{
@@ -203,7 +277,7 @@ interface IEnumTfLangBarItems : IUnknown
[
object,
uuid(73540d69-edeb-4ee9-96c9-23aa30b25916),
- pointer_default(unique),
+ pointer_default(unique)
]
interface ITfLangBarItem : IUnknown
{
@@ -223,10 +297,206 @@ interface ITfLangBarItem : IUnknown
[
object,
uuid(57dbe1a0-de25-11d2-afdd-00105a2799b5),
- pointer_default(unique),
+ pointer_default(unique)
]
interface ITfLangBarItemSink : IUnknown
{
HRESULT OnUpdate(
[in] DWORD dwFlags);
}
+
+[
+ object,
+ uuid(01c2d285-d3c7-4b7b-b5b5-d97411d0c283),
+ pointer_default(unique)
+]
+interface ITfLangBarItemBalloon : IUnknown
+{
+ HRESULT OnClick(
+ [in] TfLBIClick click,
+ [in] POINT pt,
+ [in] const RECT *prcArea);
+
+ HRESULT GetPreferredSize(
+ [in] const SIZE *pszDefault,
+ [out] SIZE *psz);
+
+ typedef enum
+ {
+ TF_LB_BALLOON_RECO = 0,
+ TF_LB_BALLOON_SHOW = 1,
+ TF_LB_BALLOON_MISS = 2
+ } TfLBBalloonStyle;
+
+ typedef struct TF_LBBALLOONINFO
+ {
+ TfLBBalloonStyle style;
+ BSTR bstrText;
+ } TF_LBBALLOONINFO;
+
+ HRESULT GetBalloonInfo(
+ [out] TF_LBBALLOONINFO *pInfo);
+}
+
+[
+ object,
+ uuid(73830352-d722-4179-ada5-f045c98df355),
+ pointer_default(unique)
+]
+interface ITfLangBarItemBitmap : IUnknown
+{
+ HRESULT OnClick(
+ [in] TfLBIClick click,
+ [in] POINT pt,
+ [in] const RECT *prcArea);
+
+ HRESULT GetPreferredSize(
+ [in] const SIZE *pszDefault,
+ [out] SIZE *psz);
+
+ HRESULT DrawBitmap(
+ [in] LONG bmWidth,
+ [in] LONG bmHeight,
+ [in] DWORD dwFlags,
+ [out] HBITMAP *phbmp,
+ [out] HBITMAP *phbmpMask);
+}
+
+[
+ object,
+ uuid(a26a0525-3fae-4fa0-89ee-88a964f9f1b5),
+ pointer_default(unique)
+]
+interface ITfLangBarItemBitmapButton : IUnknown
+{
+ HRESULT OnClick(
+ [in] TfLBIClick click,
+ [in] POINT pt,
+ [in] const RECT *prcArea);
+
+ HRESULT InitMenu(
+ [in] ITfMenu *pMenu);
+
+ HRESULT OnMenuSelect(
+ [in] UINT wID);
+
+ HRESULT GetPreferredSize(
+ [in] const SIZE *pszDefault,
+ [out] SIZE *psz);
+
+ HRESULT DrawBitmap(
+ [in] LONG bmWidth,
+ [in] LONG bmHeight,
+ [in] DWORD dwFlags,
+ [out] HBITMAP *phbmp,
+ [out] HBITMAP *phbmpMask);
+
+ HRESULT GetText(
+ [out] BSTR *pbstrText);
+}
+
+[
+ object,
+ uuid(28c7f1d0-de25-11d2-afdd-00105a2799b5),
+ pointer_default(unique)
+]
+interface ITfLangBarItemButton : IUnknown
+{
+ HRESULT OnClick(
+ [in] TfLBIClick click,
+ [in] POINT pt,
+ [in] const RECT *prcArea);
+
+ HRESULT InitMenu(
+ [in] ITfMenu *pMenu);
+
+ HRESULT OnMenuSelect(
+ [in] UINT wID);
+
+ HRESULT GetIcon(
+ [out] HICON *phIcon);
+
+ HRESULT GetText(
+ [out] BSTR *pbstrText);
+}
+
+[
+ object,
+ uuid(6f8a98e4-aaa0-4f15-8c5b-07e0df0a3dd8),
+ pointer_default(unique)
+]
+interface ITfMenu : IUnknown
+{
+ const DWORD TF_LBMENUF_CHECKED = 0x00000001;
+ const DWORD TF_LBMENUF_SUBMENU = 0x00000002;
+ const DWORD TF_LBMENUF_SEPARATOR = 0x00000004;
+ const DWORD TF_LBMENUF_RADIOCHECKED = 0x00000008;
+ const DWORD TF_LBMENUF_GRAYED = 0x00000010;
+
+ HRESULT AddMenuItem(
+ [in] UINT uId,
+ [in] DWORD dwFlags,
+ [in] HBITMAP hbmp,
+ [in] HBITMAP hbmpMask,
+ [in] const WCHAR *pch,
+ [in] ULONG cch,
+ ITfMenu **ppMenu);
+}
+
+[
+ object,
+ uuid(45672eb9-9059-46a2-838d-4530355f6a77),
+ pointer_default(unique)
+]
+interface ITfSystemDeviceTypeLangBarItem : IUnknown
+{
+ HRESULT SetIconMode(
+ [in] DWORD dwFlags);
+
+ HRESULT GetIconMode(
+ [out] DWORD *pdwFlags);
+}
+
+[
+ object,
+ uuid(1e13e9ec-6b33-4d4a-b5eb-8a92f029f356),
+ pointer_default(unique)
+]
+interface ITfSystemLangBarItem : IUnknown
+{
+ HRESULT SetIcon(
+ [in] HICON hIcon);
+
+ HRESULT SetTooltipString(
+ [in] WCHAR *pchToolTip,
+ [in] ULONG cch);
+}
+
+[
+ object,
+ uuid(1449d9ab-13cf-4687-aa3e-8d8b18574396),
+ pointer_default(unique)
+]
+interface ITfSystemLangBarItemSink : IUnknown
+{
+ HRESULT InitMenu(
+ [in] ITfMenu *pMenu);
+
+ HRESULT OnMenuSelect(
+ [in] UINT wID);
+}
+
+[
+ object,
+ uuid(5c4ce0e5-ba49-4b52-ac6b-3b397b4f701f),
+ pointer_default(unique)
+]
+interface ITfSystemLangBarItemText : IUnknown
+{
+ HRESULT SetItemText(
+ [in] const WCHAR *pch,
+ [in] ULONG cch);
+
+ HRESULT GetItemText(
+ [out] BSTR *pbstrText);
+}