Back to index

im-sdk  12.3.91
xiiimp.h
Go to the documentation of this file.
00001 /*
00002 Copyright 1990-2001 Sun Microsystems, Inc. All Rights Reserved.
00003 
00004 Permission is hereby granted, free of charge, to any person obtaining a
00005 copy of this software and associated documentation files (the
00006 "Software"), to deal in the Software without restriction, including
00007 without limitation the rights to use, copy, modify, merge, publish,
00008 distribute, sublicense, and/or sell copies of the Software, and to
00009 permit persons to whom the Software is furnished to do so, subject to
00010 the following conditions: The above copyright notice and this
00011 permission notice shall be included in all copies or substantial
00012 portions of the Software.
00013 
00014 
00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00016 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00017 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00018 IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE
00019 FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
00020 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
00021 THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF
00022 ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
00023 
00024 
00025 Except as contained in this notice, the names of The Open Group and/or
00026 Sun Microsystems, Inc. shall not be used in advertising or otherwise to
00027 promote the sale, use or other dealings in this Software without prior
00028 written authorization from The Open Group and/or Sun Microsystems,
00029 Inc., as applicable.
00030 
00031 
00032 X Window System is a trademark of The Open Group
00033 
00034 OSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF
00035 logo, LBX, X Window System, and Xinerama are trademarks of the Open
00036 Group. All other trademarks and registered trademarks mentioned herein
00037 are the property of their respective owners. No right, title or
00038 interest in or to any trademark, service mark, logo or trade name of
00039 Sun Microsystems, Inc. or its licensors is granted.
00040 
00041 */
00042 #ifdef HAVE_CONFIG_H
00043 #include <config.h>
00044 #endif
00045 
00046 #ifndef _IIIMP_h
00047 #define _IIIMP_h
00048 
00049 #ifndef __XLIBINT_HH
00050 #define __XLIBINT_HH
00051 #include <X11/Xlibint.h>
00052 #endif /* __XLIBINT_HH */
00053 #include "Xlcint.h"
00054 
00055 #define TRIGGER_KEY_LABEL "TRIGGER KEYS"
00056 
00057 enum IIIMF_MODIFIERS
00058 {
00059   IIIMF_SHIFT_MODIFIER = 1,
00060   IIIMF_CONTROL_MODIFIER = 2,
00061   IIIMF_META_MODIFIER = 4,
00062   IIIMF_ALT_MODIFIER = 8,
00063   IIIMF_ALT_GRAPH_MODIFIER = 32
00064 };
00065 
00066 typedef enum {
00067   IM_DECORATION_FEEDBACK = 0,      /* IMNormal, IMReverse, IMUnderline */
00068   IM_FOREGROUND_RGB_FEEDBACK = 1,
00069   IM_BACKGROUND_RGB_FEEDBACK = 2,
00070   IM_UNDERLINE_RGB_FEEDBACK = 3
00071 } IMFeedbackType;
00072 #define IMFEEDBACK_LEN 4
00073 
00074 typedef struct _IMFeedback {
00075   IMFeedbackType type;
00076   int   value;                     /* depends on id-type */
00077 } IMFeedback;
00078 
00079 typedef struct _IMFeedbackList {
00080   unsigned int count_feedbacks;
00081   IMFeedback  *feedbacks;
00082 } IMFeedbackList;
00083 
00084 typedef struct _XIMDrawTextStgruct {
00085   XPointer call_data;
00086   IMFeedbackList  *feedback_list;
00087 } XIMDrawTextStruct;
00088 
00089 typedef enum    {
00090   DrawUpHorizontally = 0 ,
00091   DrawUpVertically = 1
00092 } DrawUpDirection ;
00093  
00094 typedef enum    {
00095   XIMOwnsLabel = 0 ,
00096   CBOwnsLabel = 1
00097 } WhoOwnsLabel ;
00098 
00099 typedef struct _XIMLookupStartCallbackStruct2 {
00100   int         which_is_master;
00101   int         choice_per_window;  /* Number of choices can be display
00102                                  * in the region
00103                                  */
00104   int         nrows;
00105   int         ncolumns;
00106   DrawUpDirection    draw_up_direction;
00107   WhoOwnsLabel       who_owns_label;
00108 } XIMLookupStartCallbackStruct2;
00109 
00110 typedef enum {
00111   NO_DECORATION = 0,
00112   BRACKET_DECORATION = 1
00113 } LABEL_DECORATION;
00114 typedef struct _XIMChoiceObject2 {
00115   LABEL_DECORATION label_decoration;
00116   XIMText         *label;
00117   IMFeedbackList  **label_feedback;
00118   XIMText         *value;
00119   IMFeedbackList  **value_feedback;
00120 } XIMChoiceObject2;
00121 
00122 typedef struct _XIMLookupDrawCallbackStruct2 {
00123   XIMChoiceObject2 *choices;       /* the lookup choices */
00124   int              n_choices;      /* Total number of lookup choices */
00125   int              first_index;
00126   int              last_index;
00127   int              current_index;
00128   XIMText         *title;
00129 } XIMLookupDrawCallbackStruct2;
00130 
00131 typedef struct _XIMLookupProcessCallbackStruct2 {
00132   int type;
00133   union {
00134     int       index_of_choice_selected;/* Set by callback for the
00135                               * selected choice.
00136                               * XIM_UNKNOW_KEYSYM and
00137                               * XIM_UNDETERMINED are
00138                               * also possible value.
00139                               */
00140     int index_of_page_selected;
00141   } data;
00142 } XIMLookupProcessCallbackStruct2;
00143 
00144 #endif /* _IIIMP_h */