Back to index

lightning-sunbird  0.9+nobinonly
nsIKBStateControl.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *   Frank Tang <ftang@netscape.com>
00024  *
00025  * Alternatively, the contents of this file may be used under the terms of
00026  * either the GNU General Public License Version 2 or later (the "GPL"), or
00027  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00028  * in which case the provisions of the GPL or the LGPL are applicable instead
00029  * of those above. If you wish to allow use of your version of this file only
00030  * under the terms of either the GPL or the LGPL, and not to allow others to
00031  * use your version of this file under the terms of the MPL, indicate your
00032  * decision by deleting the provisions above and replace them with the notice
00033  * and other provisions required by the GPL or the LGPL. If you do not delete
00034  * the provisions above, a recipient may use your version of this file under
00035  * the terms of any one of the MPL, the GPL or the LGPL.
00036  *
00037  * ***** END LICENSE BLOCK ***** */
00038 
00039 #ifndef nsIKBStateControl_h__
00040 #define nsIKBStateControl_h__
00041 
00042 #include "nsISupports.h"
00043 
00044 // {6A9AC731-988A-11d3-86CC-005004832142}
00045 #define NS_IKBSTATECONTROL_IID \
00046 { 0x6a9ac731, 0x988a, 0x11d3, \
00047 { 0x86, 0xcc, 0x0, 0x50, 0x4, 0x83, 0x21, 0x42 } }
00048 
00049 
00053 class nsIKBStateControl : public nsISupports {
00054 
00055   public:
00056 
00057     NS_DEFINE_STATIC_IID_ACCESSOR(NS_IKBSTATECONTROL_IID)
00058 
00059     /*
00060      * Force Input Method Editor to commit the uncommited input
00061      */
00062     NS_IMETHOD ResetInputState()=0;
00063 
00064     /*
00065      * Following methods relates to IME 'Opened'/'Closed' state.
00066      * 'Opened' means the user can input any character. I.e., users can input Japanese  
00067      * and other characters. The user can change the state to 'Closed'.
00068      * 'Closed' means the user can input ASCII characters only. This is the same as a
00069      * non-IME environment. The user can change the state to 'Opened'.
00070      * For more information is here.
00071      * http://bugzilla.mozilla.org/show_bug.cgi?id=16940#c48
00072      */
00073 
00074     /*
00075      * Set the state to 'Opened' or 'Closed'.
00076      * If aState is TRUE, IME open state is set to 'Opened'.
00077      * If aState is FALSE, set to 'Closed'.
00078      */
00079     NS_IMETHOD SetIMEOpenState(PRBool aState) = 0;
00080 
00081     /*
00082      * Get IME is 'Opened' or 'Closed'.
00083      * If IME is 'Opened', aState is set PR_TRUE.
00084      * If IME is 'Closed', aState is set PR_FALSE.
00085      */
00086     NS_IMETHOD GetIMEOpenState(PRBool* aState) = 0;
00087 
00088     /*
00089      * Destruct and don't commit the IME composition string.
00090      */
00091     NS_IMETHOD CancelIMEComposition() = 0;
00092 };
00093 
00094 #endif // nsIKBStateControl_h__