jdk/src/solaris/native/sun/awt/awt_util.h
author ohair
Tue, 25 May 2010 15:58:33 -0700
changeset 5506 202f599c92aa
parent 2 90ce3da70b43
child 11093 e753252dc8a9
permissions -rw-r--r--
6943119: Rebrand source copyright notices Reviewed-by: darcy, weijun
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 1995, 2004, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#ifndef _AWT_UTIL_H_
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
#define _AWT_UTIL_H_
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
#ifndef HEADLESS
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
#ifndef XAWT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
#include <Xm/VendorSEP.h>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#include <Xm/VendorSP.h>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
#include "gdefs.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
typedef struct ConvertEventTimeAndModifiers {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
    jlong when;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
    jint modifiers;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
} ConvertEventTimeAndModifiers;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
Boolean awt_util_focusIsOnMenu(Display *display);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
int32_t awt_util_sendButtonClick(Display *display, Window window);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
Widget awt_util_createWarningWindow(Widget parent, char *warning);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
void awt_util_show(Widget w);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
void awt_util_hide(Widget w);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
void awt_util_enable(Widget w);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
void awt_util_disable(Widget w);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
void awt_util_reshape(Widget w, jint x, jint y, jint wd, jint ht);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
void awt_util_mapChildren(Widget w, void (*func)(Widget,void *),
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
                          int32_t applyToSelf, void *data);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
int32_t awt_util_setCursor(Widget w, Cursor c);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
void awt_util_convertEventTimeAndModifiers
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    (XEvent *event, ConvertEventTimeAndModifiers *output);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
Widget awt_WidgetAtXY(Widget root, Position x, Position y);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
char *awt_util_makeWMMenuItem(char *target, Atom protocol);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
Cardinal awt_util_insertCallback(Widget w);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
void awt_util_consumeAllXEvents(Widget widget);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
void awt_util_cleanupBeforeDestroyWidget(Widget widget);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
void awt_util_debug_init();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
Time awt_util_getCurrentServerTime();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
jlong awt_util_nowMillisUTC();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
jlong awt_util_nowMillisUTC_offset(Time server_offset);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
void awt_util_do_wheel_scroll(Widget scrolled_window, jint scrollType,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
                                jint scrollAmt, jint wheelAmt);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
Widget awt_util_get_scrollbar_to_scroll(Widget window);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
typedef struct _EmbeddedFrame {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    Widget embeddedFrame;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
    Window frameContainer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    jobject javaRef;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
    Boolean eventSelectedPreviously;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    struct _EmbeddedFrame * next;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
    struct _EmbeddedFrame * prev;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
} EmbeddedFrame;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
void awt_util_addEmbeddedFrame(Widget embeddedFrame, jobject javaRef);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
void awt_util_delEmbeddedFrame(Widget embeddedFrame);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
Boolean awt_util_processEventForEmbeddedFrame(XEvent *ev);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
#define WITH_XERROR_HANDLER(f) do {             \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    XSync(awt_display, False);                  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
    xerror_code = Success;                      \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
    xerror_saved_handler = XSetErrorHandler(f); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
} while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
/* Convenience macro for handlers to use */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
#define XERROR_SAVE(err) do {                   \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    xerror_code = (err)->error_code;            \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
} while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
#define RESTORE_XERROR_HANDLER do {             \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
    XSync(awt_display, False);                  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    XSetErrorHandler(xerror_saved_handler);     \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
} while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
#define EXEC_WITH_XERROR_HANDLER(f, code) do {  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
    WITH_XERROR_HANDLER(f);                     \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
    do {                                        \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
        code;                                   \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
    } while (0);                                \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    RESTORE_XERROR_HANDLER;                     \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
} while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
 * Since X reports protocol errors asynchronously, we often need to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
 * install an error handler that acts like a callback.  While that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
 * specialized handler is installed we save original handler here.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
extern XErrorHandler xerror_saved_handler;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
 * A place for error handler to report the error code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
extern unsigned char xerror_code;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
extern int xerror_ignore_bad_window(Display *dpy, XErrorEvent *err);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
#endif /* !HEADLESS */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
#ifndef INTERSECTS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
#define INTERSECTS(r1_x1,r1_x2,r1_y1,r1_y2,r2_x1,r2_x2,r2_y1,r2_y2) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
!((r2_x2 <= r1_x1) ||\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
  (r2_y2 <= r1_y1) ||\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
  (r2_x1 >= r1_x2) ||\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
  (r2_y1 >= r1_y2))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
#ifndef MIN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
#define MIN(a,b) ((a) < (b) ? (a) : (b))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
#ifndef MAX
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
#define MAX(a,b) ((a) > (b) ? (a) : (b))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
struct DPos {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
    int32_t x;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
    int32_t y;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    int32_t mapped;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
    void *data;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
    void *peer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    int32_t echoC;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
extern jobject awtJNI_GetCurrentThread(JNIEnv *env);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
extern void awtJNI_ThreadYield(JNIEnv *env);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
#ifndef HEADLESS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
extern Widget prevWidget;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
#endif /* !HEADLESS */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
 * Functions for accessing fields by name and signature
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
JNIEXPORT jobject JNICALL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
JNU_GetObjectField(JNIEnv *env, jobject self, const char *name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
                   const char *sig);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
JNIEXPORT jboolean JNICALL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
JNU_SetObjectField(JNIEnv *env, jobject self, const char *name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
                   const char *sig, jobject val);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
JNIEXPORT jlong JNICALL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
JNU_GetLongField(JNIEnv *env, jobject self, const char *name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
JNIEXPORT jint JNICALL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
JNU_GetIntField(JNIEnv *env, jobject self, const char *name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
JNIEXPORT jboolean JNICALL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
JNU_SetIntField(JNIEnv *env, jobject self, const char *name, jint val);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
JNIEXPORT jboolean JNICALL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
JNU_SetLongField(JNIEnv *env, jobject self, const char *name, jlong val);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
JNIEXPORT jboolean JNICALL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
JNU_GetBooleanField(JNIEnv *env, jobject self, const char *name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
JNIEXPORT jboolean JNICALL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
JNU_SetBooleanField(JNIEnv *env, jobject self, const char *name, jboolean val);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
JNIEXPORT jint JNICALL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
JNU_GetCharField(JNIEnv *env, jobject self, const char *name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
#ifndef HEADLESS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
#ifdef __solaris__
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
extern Widget awt_util_getXICStatusAreaWindow(Widget w);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
#else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
int32_t awt_util_getIMStatusHeight(Widget vw);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
XVaNestedList awt_util_getXICStatusAreaList(Widget w);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
Widget awt_util_getXICStatusAreaWindow(Widget w);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
#ifdef __linux__
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
typedef struct _XmImRefRec {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
  Cardinal      num_refs;       /* Number of referencing widgets. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
  Cardinal      max_refs;       /* Maximum length of refs array. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
  Widget*       refs;           /* Array of referencing widgets. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
  XtPointer     **callbacks;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
} XmImRefRec, *XmImRefInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
typedef struct _PreeditBufferRec {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
  unsigned short length;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
  wchar_t        *text;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
  XIMFeedback    *feedback;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
  int32_t            caret;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
  XIMCaretStyle  style;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
} PreeditBufferRec, *PreeditBuffer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
typedef struct _XmImXICRec {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
  struct _XmImXICRec *next;     /* Links all have the same XIM. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
  XIC           xic;            /* The XIC. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
  Window        focus_window;   /* Cached information about the XIC. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
  XIMStyle      input_style;    /* ...ditto... */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
  int32_t           status_width;   /* ...ditto... */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
  int32_t           preedit_width;  /* ...ditto... */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
  int32_t           sp_height;      /* ...ditto... */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
  Boolean       has_focus;      /* Does this XIC have keyboard focus. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
  Boolean       anonymous;      /* Do we have exclusive rights to this XIC. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
  XmImRefRec    widget_refs;    /* Widgets referencing this XIC. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
  struct _XmImXICRec **source; /* Original source of shared XICs. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
  PreeditBuffer preedit_buffer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
} XmImXICRec, *XmImXICInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
typedef struct _XmImShellRec {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
  /* per-Shell fields. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
  Widget        im_widget;      /* Dummy widget to make intrinsics behave. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
  Widget        current_widget; /* Widget whose visual we're matching. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
  /* per <Shell,XIM> fields. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
  XmImXICInfo   shell_xic;      /* For PER_SHELL sharing policy. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
  XmImXICInfo   iclist;         /* All known XICs for this <XIM,Shell>. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
} XmImShellRec, *XmImShellInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
typedef struct {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
  /* per-Display fields. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
  XContext      current_xics;   /* Map widget -> current XmImXICInfo. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
  /* per-XIM fields. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
  XIM           xim;            /* The XIM. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
  XIMStyles     *styles;        /* XNQueryInputStyle result. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
  XmImRefRec    shell_refs;     /* Shells referencing this XIM. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
} XmImDisplayRec, *XmImDisplayInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
#endif /* !HEADLESS */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
#endif           /* _AWT_UTIL_H_ */