Skip to content

Commit 21164ee

Browse files
committed
· 推送测试Marshal所用的IME更新。
1 parent 6463600 commit 21164ee

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

OpenHarmony.NDK.Bindings/input_method/input_method.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
namespace OpenHarmony.NDK.Bindings.Native;
44

5+
//delegate* unmanaged[Cdecl]<InputMethod_TextEditorProxy*, char*, ulong, void> insertTextFunc
6+
7+
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
8+
public unsafe delegate void InsertTextFunc(InputMethod_TextEditorProxy* proxy, char* text, ulong length);
59
public unsafe static partial class input_method
610
{
711
[LibraryImport("libohinputmethod.so")]
@@ -154,6 +158,10 @@ public unsafe static partial class input_method
154158
[LibraryImport("libohinputmethod.so")]
155159
public static partial InputMethod_ErrorCode OH_TextEditorProxy_SetInsertTextFunc(InputMethod_TextEditorProxy* proxy, delegate* unmanaged[Cdecl]<InputMethod_TextEditorProxy*, char*, ulong, void> insertTextFunc);
156160

161+
[LibraryImport("libohinputmethod.so", EntryPoint = "OH_TextEditorProxy_SetInsertTextFunc")]
162+
public static partial InputMethod_ErrorCode OH_TextEditorProxy_SetInsertTextFuncTest(
163+
InputMethod_TextEditorProxy* proxy, IntPtr insertTextFunc);
164+
157165
[LibraryImport("libohinputmethod.so")]
158166
public static partial InputMethod_ErrorCode OH_TextEditorProxy_SetDeleteForwardFunc(InputMethod_TextEditorProxy* proxy, delegate* unmanaged[Cdecl]<InputMethod_TextEditorProxy*, int, void> insertTextFunc);
159167

0 commit comments

Comments
 (0)