Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Core / CSharp / System / Windows / Input / InputMethodStateTypeInfo.cs / 1 / InputMethodStateTypeInfo.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: The information for the compartments. // // History: // 07/30/2003 : yutakas - Ported from .net tree. // //--------------------------------------------------------------------------- using System.Runtime.InteropServices; using System.Collections; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; using System.Windows.Threading; using System.Windows; using MS.Internal; //TextServicesInterop using MS.Utility; using MS.Win32; using System; namespace System.Windows.Input { //----------------------------------------------------- // // InputMethodStateType enum // //----------------------------------------------------- ////// This is an internal. /// This enum identifies the type of input method event. /// internal enum InputMethodStateType { Invalid, ImeState, MicrophoneState, HandwritingState, SpeechMode, ImeConversionModeValues, ImeSentenceModeValues, } internal enum CompartmentScope { Invalid, Thread, Global, } //------------------------------------------------------ // // InputMethodEventTypeInfo class // //----------------------------------------------------- ////// This is an internal. /// This is a holder of compartment type information. /// internal class InputMethodEventTypeInfo { //------------------------------------------------------ // // Constructors // //------------------------------------------------------ internal InputMethodEventTypeInfo( InputMethodStateType type, Guid guid, CompartmentScope scope) { _inputmethodstatetype = type; _guid = guid; _scope = scope; } //----------------------------------------------------- // // Internal Methods // //------------------------------------------------------ #region Internal Methods ////// This converts from GUID for ITfCompartment to InputMethodStateType. /// internal static InputMethodStateType ToType(ref Guid rguid) { for (int i = 0; i < _iminfo.Length; i++) { InputMethodEventTypeInfo im = _iminfo[i]; if (rguid == im._guid) return im._inputmethodstatetype; } Debug.Assert(false, "The guid does not match."); return InputMethodStateType.Invalid; } #endregion Internal Methods //----------------------------------------------------- // // Internal Properties // //----------------------------------------------------- #region Internal Properties internal InputMethodStateType Type {get{return _inputmethodstatetype;}} internal Guid Guid {get{return _guid;}} internal CompartmentScope Scope {get{return _scope;}} internal static InputMethodEventTypeInfo[] InfoList {get{return _iminfo;}} #endregion Internal Properties //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields private static readonly InputMethodEventTypeInfo _iminfoImeState = new InputMethodEventTypeInfo( InputMethodStateType.ImeState, UnsafeNativeMethods.GUID_COMPARTMENT_KEYBOARD_OPENCLOSE, CompartmentScope.Thread); private static readonly InputMethodEventTypeInfo _iminfoHandwritingState = new InputMethodEventTypeInfo( InputMethodStateType.HandwritingState, UnsafeNativeMethods.GUID_COMPARTMENT_HANDWRITING_OPENCLOSE, CompartmentScope.Thread); private static readonly InputMethodEventTypeInfo _iminfoMicrophoneState = new InputMethodEventTypeInfo( InputMethodStateType.MicrophoneState, UnsafeNativeMethods.GUID_COMPARTMENT_SPEECH_OPENCLOSE, CompartmentScope.Global); private static readonly InputMethodEventTypeInfo _iminfoSpeechMode = new InputMethodEventTypeInfo( InputMethodStateType.SpeechMode, UnsafeNativeMethods.GUID_COMPARTMENT_SPEECH_GLOBALSTATE, CompartmentScope.Global); private static readonly InputMethodEventTypeInfo _iminfoImeConversionMode = new InputMethodEventTypeInfo( InputMethodStateType.ImeConversionModeValues, UnsafeNativeMethods.GUID_COMPARTMENT_KEYBOARD_INPUTMODE_CONVERSION, CompartmentScope.Thread); private static readonly InputMethodEventTypeInfo _iminfoImeSentenceMode = new InputMethodEventTypeInfo( InputMethodStateType.ImeSentenceModeValues, UnsafeNativeMethods.GUID_COMPARTMENT_KEYBOARD_INPUTMODE_SENTENCE, CompartmentScope.Thread); private static readonly InputMethodEventTypeInfo[] _iminfo = new InputMethodEventTypeInfo[] { _iminfoImeState, _iminfoHandwritingState, _iminfoMicrophoneState, _iminfoSpeechMode, _iminfoImeConversionMode, _iminfoImeSentenceMode}; private InputMethodStateType _inputmethodstatetype; private Guid _guid; private CompartmentScope _scope; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: The information for the compartments. // // History: // 07/30/2003 : yutakas - Ported from .net tree. // //--------------------------------------------------------------------------- using System.Runtime.InteropServices; using System.Collections; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; using System.Windows.Threading; using System.Windows; using MS.Internal; //TextServicesInterop using MS.Utility; using MS.Win32; using System; namespace System.Windows.Input { //----------------------------------------------------- // // InputMethodStateType enum // //----------------------------------------------------- ////// This is an internal. /// This enum identifies the type of input method event. /// internal enum InputMethodStateType { Invalid, ImeState, MicrophoneState, HandwritingState, SpeechMode, ImeConversionModeValues, ImeSentenceModeValues, } internal enum CompartmentScope { Invalid, Thread, Global, } //------------------------------------------------------ // // InputMethodEventTypeInfo class // //----------------------------------------------------- ////// This is an internal. /// This is a holder of compartment type information. /// internal class InputMethodEventTypeInfo { //------------------------------------------------------ // // Constructors // //------------------------------------------------------ internal InputMethodEventTypeInfo( InputMethodStateType type, Guid guid, CompartmentScope scope) { _inputmethodstatetype = type; _guid = guid; _scope = scope; } //----------------------------------------------------- // // Internal Methods // //------------------------------------------------------ #region Internal Methods ////// This converts from GUID for ITfCompartment to InputMethodStateType. /// internal static InputMethodStateType ToType(ref Guid rguid) { for (int i = 0; i < _iminfo.Length; i++) { InputMethodEventTypeInfo im = _iminfo[i]; if (rguid == im._guid) return im._inputmethodstatetype; } Debug.Assert(false, "The guid does not match."); return InputMethodStateType.Invalid; } #endregion Internal Methods //----------------------------------------------------- // // Internal Properties // //----------------------------------------------------- #region Internal Properties internal InputMethodStateType Type {get{return _inputmethodstatetype;}} internal Guid Guid {get{return _guid;}} internal CompartmentScope Scope {get{return _scope;}} internal static InputMethodEventTypeInfo[] InfoList {get{return _iminfo;}} #endregion Internal Properties //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields private static readonly InputMethodEventTypeInfo _iminfoImeState = new InputMethodEventTypeInfo( InputMethodStateType.ImeState, UnsafeNativeMethods.GUID_COMPARTMENT_KEYBOARD_OPENCLOSE, CompartmentScope.Thread); private static readonly InputMethodEventTypeInfo _iminfoHandwritingState = new InputMethodEventTypeInfo( InputMethodStateType.HandwritingState, UnsafeNativeMethods.GUID_COMPARTMENT_HANDWRITING_OPENCLOSE, CompartmentScope.Thread); private static readonly InputMethodEventTypeInfo _iminfoMicrophoneState = new InputMethodEventTypeInfo( InputMethodStateType.MicrophoneState, UnsafeNativeMethods.GUID_COMPARTMENT_SPEECH_OPENCLOSE, CompartmentScope.Global); private static readonly InputMethodEventTypeInfo _iminfoSpeechMode = new InputMethodEventTypeInfo( InputMethodStateType.SpeechMode, UnsafeNativeMethods.GUID_COMPARTMENT_SPEECH_GLOBALSTATE, CompartmentScope.Global); private static readonly InputMethodEventTypeInfo _iminfoImeConversionMode = new InputMethodEventTypeInfo( InputMethodStateType.ImeConversionModeValues, UnsafeNativeMethods.GUID_COMPARTMENT_KEYBOARD_INPUTMODE_CONVERSION, CompartmentScope.Thread); private static readonly InputMethodEventTypeInfo _iminfoImeSentenceMode = new InputMethodEventTypeInfo( InputMethodStateType.ImeSentenceModeValues, UnsafeNativeMethods.GUID_COMPARTMENT_KEYBOARD_INPUTMODE_SENTENCE, CompartmentScope.Thread); private static readonly InputMethodEventTypeInfo[] _iminfo = new InputMethodEventTypeInfo[] { _iminfoImeState, _iminfoHandwritingState, _iminfoMicrophoneState, _iminfoSpeechMode, _iminfoImeConversionMode, _iminfoImeSentenceMode}; private InputMethodStateType _inputmethodstatetype; private Guid _guid; private CompartmentScope _scope; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RegexMatchCollection.cs
- Point4DValueSerializer.cs
- XmlSchemaAnyAttribute.cs
- util.cs
- ReachDocumentReferenceCollectionSerializer.cs
- CompilerErrorCollection.cs
- XPathArrayIterator.cs
- ListBox.cs
- LocatorManager.cs
- XMLDiffLoader.cs
- KeyTime.cs
- SingleConverter.cs
- Rect3D.cs
- DataGridCaption.cs
- SqlFormatter.cs
- StrongName.cs
- KeyFrames.cs
- Canvas.cs
- UseLicense.cs
- State.cs
- OdbcRowUpdatingEvent.cs
- CheckBoxRenderer.cs
- WebPartDisplayMode.cs
- ScrollViewer.cs
- IpcManager.cs
- QilStrConcatenator.cs
- UIElementParaClient.cs
- XpsTokenContext.cs
- UserPreference.cs
- IconBitmapDecoder.cs
- MarkupCompilePass1.cs
- FilterQueryOptionExpression.cs
- Image.cs
- EmptyQuery.cs
- DesignerDataSourceView.cs
- DocumentPage.cs
- NonNullItemCollection.cs
- OleDbTransaction.cs
- SchemaNotation.cs
- MachineSettingsSection.cs
- SQLDateTimeStorage.cs
- ManagedFilter.cs
- DataSourceView.cs
- Line.cs
- HttpServerVarsCollection.cs
- EndpointBehaviorElementCollection.cs
- LazyTextWriterCreator.cs
- XmlSchemaAnnotated.cs
- GridItemCollection.cs
- ListenDesigner.cs
- XmlSchemaSequence.cs
- EntityClientCacheEntry.cs
- SoapEnumAttribute.cs
- SqlDataSourceSelectingEventArgs.cs
- PointUtil.cs
- Stackframe.cs
- RequiredFieldValidator.cs
- ElementNotAvailableException.cs
- XmlDocument.cs
- RegistrySecurity.cs
- RNGCryptoServiceProvider.cs
- DataRowComparer.cs
- HttpPostClientProtocol.cs
- SafeLibraryHandle.cs
- ToolStripManager.cs
- WebBrowserNavigatedEventHandler.cs
- X509Certificate2.cs
- DbXmlEnabledProviderManifest.cs
- ObjectIDGenerator.cs
- DataControlField.cs
- rsa.cs
- DbConnectionPoolGroup.cs
- MembershipSection.cs
- CollectionsUtil.cs
- StrokeCollectionDefaultValueFactory.cs
- BamlResourceDeserializer.cs
- GridViewRowPresenterBase.cs
- DynamicRendererThreadManager.cs
- NativeMethods.cs
- WebServiceReceive.cs
- Unit.cs
- WorkflowInstanceExtensionManager.cs
- TextFormatterImp.cs
- UnsafeNativeMethods.cs
- Lasso.cs
- CodeParameterDeclarationExpression.cs
- KeyedHashAlgorithm.cs
- SystemIPGlobalProperties.cs
- PolyQuadraticBezierSegment.cs
- URLAttribute.cs
- PackagingUtilities.cs
- RecognizedAudio.cs
- BlobPersonalizationState.cs
- SafeNativeMethods.cs
- BitmapInitialize.cs
- HTTPNotFoundHandler.cs
- Clipboard.cs
- StyleTypedPropertyAttribute.cs
- TextContainer.cs
- GenericTypeParameterBuilder.cs