/* $XConsortium: InputMethod2c.dat /main/4 1995/07/17 10:06:13 drk $ */ /* * @OPENGROUP_COPYRIGHT@ * COPYRIGHT NOTICE * Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc. * Copyright (c) 1996, 1997, 1998, 1999, 2000 The Open Group * ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for * the full copyright text. * * This software is subject to an open license. It may only be * used on, with or for operating systems which are themselves open * source systems. You must contact The Open Group for a license * allowing distribution and sublicensing of this software on, with, * or for operating systems which are not Open Source programs. * * See http://www.opengroup.org/openmotif/license for full * details of the license agreement. Any use, reproduction, or * distribution of the program constitutes recipient's acceptance of * this agreement. * * EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS * PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY * WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY * OR FITNESS FOR A PARTICULAR PURPOSE * * EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT * NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE * EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * */ /* * HISTORY */ #) This test, running with the "-I InputMethod2a.Dat -u a" option is for testing how the Motif Text and TextField widgets react to a Root style Input Method, with per widget Input Context. #) It is running with the LANG environment variable set to japanese. C) #) Testing the XmImGetXIM function. #) The XmNinputMethod has not been set on the VendorShell, so it should be NULL, and the function should try to open an input method using the current locale. #) If this failed, you will see a failure message in your term window and the test will exit. Else, you should see the following message in your term window: !) Input method opened successfully for locale . where should be japanese. C) #) Print the supported input styles of the open Input Method. #) You will see in your term window the number of supported input styles, and their values. #) If the Input Method cannot support a Root style, print an error and exit. Else you should see the following message in your term window: !) Input Method and Application support the same input style. C) #) A window should appear containing a Scrolled Text widget, a Text widget and a TextField widget. #) A panel should also appear, displaying information about the input style currently tested, and resources to test for the Input Context. #) Invoke the Input Method by pressing the key on the rigth of your space bar, while focus is in the Scrolled Text widget. The Status area appears at the bottom left, outside the application window. #) Move the input focus to the other widgets. #) Go to the end of the word "Testing" in the Scrolled Text widget, and start typing "fuji". When typing "f", the Preedit Area appears in another window, child of the root window, displaying the letter "f". After typing "u", you see a new character overriding the "f", which is the phonetic equivalent of the English letters "fu" in Hiragana. You will notice the same behavior while typing "ji". #) Now press the key to get the Katakana symbols. #) Press on the key on the left of your space bar, to enter the symbols in your text and get disconnected from the Input Method. C) #) Test the XmImSetValues function through XtSetValues of resources affecting the Input Context. #) Invoke again the Input Method by pressing the rigth key. #) Enter "to". A new phonetic symbol appears in the Preedit area. #) Change the input focus to the other text widgets. The Preedit area is moved to the other widgets, preserving its contents. #) Go back to the Scrolled Text widget. Select "Scrolled Text" in the "Apply to" radio box of the Panel, and select "Yellow" from the "Background" pulldown. The background color of the Scrolled Text changes to yellow as well as the Preedit area foreground and the Status area background. #) Give the input focus to the other text widgets. The yellow color should not be maintained in the Preedit Area and in the Status Area, but should be matching the text widget's color. #) Play with the other values of the different resources, in each widget. #) Press the left key. C) #) Test that the widgets are using different Input Context. #) You should see a message in your term window. C) #) Test the XmImUnregister function. #) The Scrolled Text widget has been unregistered from the Input Method. #) While focus in the Scrolled Text widget, try to invoke the Input Method. No Status area should appear, and when typing no Preedit Area should appear. C) E)