A game framework written with osu! in mind.
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2// See the LICENCE file in the repository root for full licence text.
3
4using System;
5
6namespace osu.Framework.Input
7{
8 /// <summary>
9 /// A source from which we can retrieve user text input.
10 /// Generally hides a native implementation from the game framework.
11 /// </summary>
12 public interface ITextInputSource
13 {
14 bool ImeActive { get; }
15
16 string GetPendingText();
17
18 void Deactivate();
19
20 void Activate();
21
22 /// <summary>
23 /// Ensures that the native implementation that retrieves user text input is activated
24 /// and that the user can start entering text.
25 /// </summary>
26 void EnsureActivated();
27
28 event Action<string> OnNewImeComposition;
29 event Action<string> OnNewImeResult;
30 }
31}