-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CHANGE: Move text input to separate interface.
- Loading branch information
Rene Damm
committed
Oct 3, 2018
1 parent
d0a92ca
commit 1b045d4
Showing
6 changed files
with
125 additions
and
77 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
Packages/com.unity.inputsystem/InputSystem/Devices/ITextInputReceiver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using UnityEngine.Experimental.Input.LowLevel; | ||
|
||
namespace UnityEngine.Experimental.Input | ||
{ | ||
/// <summary> | ||
/// Interface for <see cref="InputDevice">devices</see> that can receive text input events. | ||
/// </summary> | ||
/// <seealso cref="TextEvent"/> | ||
/// <seealso cref="IMECompositionEvent"/> | ||
public interface ITextInputReceiver | ||
{ | ||
/// <summary> | ||
/// A single, fully-formed Unicode character has been typed on the device. | ||
/// </summary> | ||
/// <param name="character">Character that was typed. Note that in case the character is part of | ||
/// a surrogate pair, this method is called first with the low surrogate and then with the | ||
/// high surrogate character.</param> | ||
void OnTextInput(char character); | ||
|
||
/// <summary> | ||
/// Called when an IME composition is in-progress or finished. | ||
/// </summary> | ||
/// <param name="compositionString">The current composition string.</param> | ||
/// <seealso cref="IMECompositionEvent"/> | ||
/// <seealso cref="Keyboard.onIMECompositionChange"/> | ||
/// <remarks> | ||
/// The method will be repeatedly called with the current string while composition is in progress. | ||
/// Once composition finishes, the method will be called one more time with a blank composition | ||
/// string. | ||
/// </remarks> | ||
void OnIMECompositionChanged(IMECompositionString compositionString); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Packages/com.unity.inputsystem/InputSystem/Devices/ITextInputReceiver.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters