jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.h
author ssadetsky
Mon, 25 Apr 2016 15:37:31 +0300
changeset 37711 972001566d66
parent 36903 addc2e9d4bd4
child 41792 8b032394d44e
permissions -rw-r--r--
8145547: [AWT/Swing] Conditional support for GTK 3 on Linux Reviewed-by: prr, alexsch
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
36903
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 34395
diff changeset
     2
 * Copyright (c) 2005, 2016, 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: 5471
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: 5471
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: 5471
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5471
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5471
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
#ifndef _GTK2_INTERFACE_H
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#define _GTK2_INTERFACE_H
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#include <stdlib.h>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
#include <jni.h>
32119
1778956d7bee 8025815: Child FileDialog of modal dialog does not get focus on Gnome
ssadetsky
parents: 30940
diff changeset
    30
#include <X11/X.h>
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
    31
#include "gtk_interface.h"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
#define GTK_HAS_FOCUS   (1 << 12)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
#define GTK_HAS_DEFAULT (1 << 14)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
typedef enum
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
  GTK_WINDOW_TOPLEVEL,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
  GTK_WINDOW_POPUP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
} GtkWindowType;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
typedef enum
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
  G_PARAM_READABLE            = 1 << 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
  G_PARAM_WRITABLE            = 1 << 1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
  G_PARAM_CONSTRUCT           = 1 << 2,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
  G_PARAM_CONSTRUCT_ONLY      = 1 << 3,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
  G_PARAM_LAX_VALIDATION      = 1 << 4,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
  G_PARAM_PRIVATE             = 1 << 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
} GParamFlags;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
/* We define all structure pointers to be void* */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
typedef void GMainContext;
23243
43e5bc27297f 8029263: user's default browser can not launch after we click the button, and there is an IOException shown in the log text (java.io.IOException)
azvegint
parents: 23242
diff changeset
    54
typedef void GVfs;
5444
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
    55
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
typedef void GdkColormap;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
typedef void GdkDrawable;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
typedef void GdkGC;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
typedef void GdkPixbuf;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
typedef void GdkPixmap;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
typedef void GtkFixed;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
typedef void GtkMenuItem;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
typedef void GtkMenuShell;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
typedef void GtkWidgetClass;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
typedef void PangoFontDescription;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
typedef void GtkSettings;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
/* Some real structures */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
typedef struct
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
  guint32 pixel;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
  guint16 red;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
  guint16 green;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
  guint16 blue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
} GdkColor;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
typedef struct {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
  gint      fd;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
  gushort   events;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
  gushort   revents;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
} GPollFD;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
typedef struct {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
  gint x;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
  gint y;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
  gint width;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
  gint height;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
} GdkRectangle;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
typedef struct {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
  gint x;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
  gint y;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
  gint width;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
  gint height;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
} GtkAllocation;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
typedef struct {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
  gint width;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
  gint height;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
} GtkRequisition;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
typedef struct {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
  GtkWidgetClass *g_class;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
} GTypeInstance;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
typedef struct {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
  gint left;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
  gint right;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
  gint top;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
  gint bottom;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
} GtkBorder;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
/******************************************************
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
 * FIXME: it is more safe to include gtk headers for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
 * the precise type definition of GType and other
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
 * structures. This is a place where getting rid of gtk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
 * headers may be dangerous.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
 ******************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
typedef struct
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
  GType         g_type;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
  union {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
    gint        v_int;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    guint       v_uint;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
    glong       v_long;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
    gulong      v_ulong;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
    gint64      v_int64;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
    guint64     v_uint64;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
    gfloat      v_float;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
    gdouble     v_double;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
    gpointer    v_pointer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
  } data[2];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
} GValue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
typedef struct
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
  GTypeInstance  g_type_instance;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
  gchar         *name;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
  GParamFlags    flags;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
  GType          value_type;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
  GType          owner_type;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
} GParamSpec;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
typedef struct {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
  GTypeInstance g_type_instance;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
  guint         ref_count;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
  void         *qdata;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
} GObject;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
typedef struct {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
  GObject parent_instance;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
  guint32 flags;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
} GtkObject;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
typedef struct
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
  GObject parent_instance;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
  GdkColor fg[5];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
  GdkColor bg[5];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
  GdkColor light[5];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
  GdkColor dark[5];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
  GdkColor mid[5];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
  GdkColor text[5];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
  GdkColor base[5];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
  GdkColor text_aa[5];          /* Halfway between text/base */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
  GdkColor black;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
  GdkColor white;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
  PangoFontDescription *font_desc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
  gint xthickness;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
  gint ythickness;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
  GdkGC *fg_gc[5];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
  GdkGC *bg_gc[5];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
  GdkGC *light_gc[5];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
  GdkGC *dark_gc[5];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
  GdkGC *mid_gc[5];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
  GdkGC *text_gc[5];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
  GdkGC *base_gc[5];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
  GdkGC *text_aa_gc[5];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
  GdkGC *black_gc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
  GdkGC *white_gc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
  GdkPixmap *bg_pixmap[5];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
} GtkStyle;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
typedef struct _GtkWidget GtkWidget;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
struct _GtkWidget
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
  GtkObject object;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
  guint16 private_flags;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
  guint8 state;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
  guint8 saved_state;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
  gchar *name;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
  GtkStyle *style;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
  GtkRequisition requisition;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
  GtkAllocation allocation;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
  GdkWindow *window;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
  GtkWidget *parent;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
typedef struct
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
  GtkWidget widget;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
  gfloat xalign;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
  gfloat yalign;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
  guint16 xpad;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
  guint16 ypad;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
} GtkMisc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
typedef struct {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
  GtkWidget widget;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
  GtkWidget *focus_child;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
  guint border_width : 16;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
  guint need_resize : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
  guint resize_mode : 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
  guint reallocate_redraws : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
  guint has_focus_chain : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
} GtkContainer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
typedef struct {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
  GtkContainer container;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
  GtkWidget *child;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
} GtkBin;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
typedef struct {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
  GtkBin bin;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
  GdkWindow *event_window;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
  gchar *label_text;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
  guint activate_timeout;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
  guint constructed : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
  guint in_button : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
  guint button_down : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
  guint relief : 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
  guint use_underline : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
  guint use_stock : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
  guint depressed : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
  guint depress_on_activate : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
  guint focus_on_click : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
} GtkButton;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
typedef struct {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
  GtkButton button;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
  guint active : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
  guint draw_indicator : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
  guint inconsistent : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
} GtkToggleButton;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
typedef struct _GtkAdjustment GtkAdjustment;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
struct _GtkAdjustment
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
  GtkObject parent_instance;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
  gdouble lower;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
  gdouble upper;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
  gdouble value;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
  gdouble step_increment;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
  gdouble page_increment;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
  gdouble page_size;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
typedef enum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
  GTK_UPDATE_CONTINUOUS,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
  GTK_UPDATE_DISCONTINUOUS,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
  GTK_UPDATE_DELAYED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
} GtkUpdateType;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
typedef struct _GtkRange GtkRange;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
struct _GtkRange
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
  GtkWidget widget;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
  GtkAdjustment *adjustment;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
  GtkUpdateType update_policy;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
  guint inverted : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
  /*< protected >*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
  guint flippable : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
  guint has_stepper_a : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
  guint has_stepper_b : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
  guint has_stepper_c : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
  guint has_stepper_d : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
  guint need_recalc : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
  guint slider_size_fixed : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
  gint min_slider_size;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
  GtkOrientation orientation;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
  GdkRectangle range_rect;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
  gint slider_start, slider_end;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
  gint round_digits;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
  /*< private >*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
  guint trough_click_forward : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
  guint update_pending : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
  /*GtkRangeLayout * */ void *layout;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
  /*GtkRangeStepTimer * */ void* timer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
  gint slide_initial_slider_position;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
  gint slide_initial_coordinate;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
  guint update_timeout_id;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
  GdkWindow *event_window;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
typedef struct _GtkProgressBar       GtkProgressBar;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
typedef enum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
  GTK_PROGRESS_CONTINUOUS,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
  GTK_PROGRESS_DISCRETE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
} GtkProgressBarStyle;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
typedef enum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
  GTK_PROGRESS_LEFT_TO_RIGHT,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
  GTK_PROGRESS_RIGHT_TO_LEFT,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
  GTK_PROGRESS_BOTTOM_TO_TOP,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
  GTK_PROGRESS_TOP_TO_BOTTOM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
} GtkProgressBarOrientation;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
typedef struct _GtkProgress       GtkProgress;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
struct _GtkProgress
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
  GtkWidget widget;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
  GtkAdjustment *adjustment;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
  GdkPixmap     *offscreen_pixmap;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
  gchar         *format;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
  gfloat         x_align;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
  gfloat         y_align;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
  guint          show_text : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
  guint          activity_mode : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
  guint          use_text_format : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
struct _GtkProgressBar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
  GtkProgress progress;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
  GtkProgressBarStyle bar_style;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
  GtkProgressBarOrientation orientation;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
  guint blocks;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
  gint  in_block;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
  gint  activity_pos;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
  guint activity_step;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
  guint activity_blocks;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
  gdouble pulse_fraction;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
  guint activity_dir : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
  guint ellipsize : 3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
5444
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   354
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   355
typedef struct _GThreadFunctions GThreadFunctions;
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   356
21261
47f0a3e7ef46 7059886: 6 JCK manual awt/Desktop tests fail with GTKLookAndFeel - GTK intialization issue
serb
parents: 16471
diff changeset
   357
/**
47f0a3e7ef46 7059886: 6 JCK manual awt/Desktop tests fail with GTKLookAndFeel - GTK intialization issue
serb
parents: 16471
diff changeset
   358
 * Returns :
47f0a3e7ef46 7059886: 6 JCK manual awt/Desktop tests fail with GTKLookAndFeel - GTK intialization issue
serb
parents: 16471
diff changeset
   359
 * NULL if the GLib library is compatible with the given version, or a string
47f0a3e7ef46 7059886: 6 JCK manual awt/Desktop tests fail with GTKLookAndFeel - GTK intialization issue
serb
parents: 16471
diff changeset
   360
 * describing the version mismatch.
23242
3ebc2cd4845d 8029923: Many Swing tests and SwingSet2 are failing under Solaris using GTK LaF - "Unable to load native GTK libraries"
azvegint
parents: 21261
diff changeset
   361
 * Please note that the glib_check_version() is available since 2.6,
3ebc2cd4845d 8029923: Many Swing tests and SwingSet2 are failing under Solaris using GTK LaF - "Unable to load native GTK libraries"
azvegint
parents: 21261
diff changeset
   362
 * so you should use GLIB_CHECK_VERSION macro instead.
21261
47f0a3e7ef46 7059886: 6 JCK manual awt/Desktop tests fail with GTKLookAndFeel - GTK intialization issue
serb
parents: 16471
diff changeset
   363
 */
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   364
static gchar* (*fp_glib_check_version)(guint required_major, guint required_minor,
21261
47f0a3e7ef46 7059886: 6 JCK manual awt/Desktop tests fail with GTKLookAndFeel - GTK intialization issue
serb
parents: 16471
diff changeset
   365
                       guint required_micro);
47f0a3e7ef46 7059886: 6 JCK manual awt/Desktop tests fail with GTKLookAndFeel - GTK intialization issue
serb
parents: 16471
diff changeset
   366
23242
3ebc2cd4845d 8029923: Many Swing tests and SwingSet2 are failing under Solaris using GTK LaF - "Unable to load native GTK libraries"
azvegint
parents: 21261
diff changeset
   367
/**
3ebc2cd4845d 8029923: Many Swing tests and SwingSet2 are failing under Solaris using GTK LaF - "Unable to load native GTK libraries"
azvegint
parents: 21261
diff changeset
   368
 * Returns :
3ebc2cd4845d 8029923: Many Swing tests and SwingSet2 are failing under Solaris using GTK LaF - "Unable to load native GTK libraries"
azvegint
parents: 21261
diff changeset
   369
 *  TRUE if the GLib library is compatible with the given version
3ebc2cd4845d 8029923: Many Swing tests and SwingSet2 are failing under Solaris using GTK LaF - "Unable to load native GTK libraries"
azvegint
parents: 21261
diff changeset
   370
 */
3ebc2cd4845d 8029923: Many Swing tests and SwingSet2 are failing under Solaris using GTK LaF - "Unable to load native GTK libraries"
azvegint
parents: 21261
diff changeset
   371
#define GLIB_CHECK_VERSION(major, minor, micro) \
3ebc2cd4845d 8029923: Many Swing tests and SwingSet2 are failing under Solaris using GTK LaF - "Unable to load native GTK libraries"
azvegint
parents: 21261
diff changeset
   372
    (fp_glib_check_version && fp_glib_check_version(major, minor, micro) == NULL)
3ebc2cd4845d 8029923: Many Swing tests and SwingSet2 are failing under Solaris using GTK LaF - "Unable to load native GTK libraries"
azvegint
parents: 21261
diff changeset
   373
5444
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   374
/**
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   375
 * Returns :
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   376
 * NULL if the GTK+ library is compatible with the given version, or a string
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   377
 * describing the version mismatch.
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   378
 */
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   379
static gchar* (*fp_gtk_check_version)(guint required_major, guint required_minor,
5444
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   380
                       guint required_micro);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   382
static void gtk2_init(GtkApi* gtk);
16471
33bca48c948b 7123476: DesktopOpenTests:When enter the file path and click the open button,it crash
denis
parents: 9210
diff changeset
   383
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   384
static void (*fp_g_free)(gpointer mem);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   385
static void (*fp_g_object_unref)(gpointer object);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   386
static GdkWindow *(*fp_gdk_get_default_root_window) (void);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   388
static int (*fp_gdk_pixbuf_get_bits_per_sample)(const GdkPixbuf *pixbuf);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   389
static guchar *(*fp_gdk_pixbuf_get_pixels)(const GdkPixbuf *pixbuf);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   390
static gboolean (*fp_gdk_pixbuf_get_has_alpha)(const GdkPixbuf *pixbuf);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   391
static int (*fp_gdk_pixbuf_get_height)(const GdkPixbuf *pixbuf);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   392
static int (*fp_gdk_pixbuf_get_n_channels)(const GdkPixbuf *pixbuf);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   393
static int (*fp_gdk_pixbuf_get_rowstride)(const GdkPixbuf *pixbuf);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   394
static int (*fp_gdk_pixbuf_get_width)(const GdkPixbuf *pixbuf);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   395
static GdkPixbuf *(*fp_gdk_pixbuf_new_from_file)(const char *filename, GError **error);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   396
static GdkColorspace (*fp_gdk_pixbuf_get_colorspace)(const GdkPixbuf *pixbuf);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   398
static GdkPixbuf *(*fp_gdk_pixbuf_get_from_drawable)(GdkPixbuf *dest,
32282
9c9ff2c42e0d 8014212: Robot captures black screen
azvegint
parents: 32119
diff changeset
   399
        GdkDrawable *src, GdkColormap *cmap, int src_x, int src_y,
9c9ff2c42e0d 8014212: Robot captures black screen
azvegint
parents: 32119
diff changeset
   400
        int dest_x, int dest_y, int width, int height);
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   401
static GdkPixbuf *(*fp_gdk_pixbuf_scale_simple)(GdkPixbuf *src,
34395
2ac7e99f7f4a 8137571: Linux HiDPI Graphics support
alexsch
parents: 32282
diff changeset
   402
        int dest_width, int dest_heigh, GdkInterpType interp_type);
32282
9c9ff2c42e0d 8014212: Robot captures black screen
azvegint
parents: 32119
diff changeset
   403
9c9ff2c42e0d 8014212: Robot captures black screen
azvegint
parents: 32119
diff changeset
   404
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   405
static void (*fp_gtk_widget_destroy)(void *widget);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   406
static void (*fp_gtk_window_present)(GtkWindow *window);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   407
static void (*fp_gtk_window_move)(GtkWindow *window, gint x, gint y);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   408
static void (*fp_gtk_window_resize)(GtkWindow *window, gint width, gint height);
5444
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   409
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   410
/**
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   411
 * Function Pointers for GtkFileChooser
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   412
 */
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   413
static gchar* (*fp_gtk_file_chooser_get_filename)(GtkFileChooser *chooser);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   414
static void (*fp_gtk_widget_hide)(void *widget);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   415
static void (*fp_gtk_main_quit)(void);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   416
static void* (*fp_gtk_file_chooser_dialog_new)(const gchar *title,
5444
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   417
    GtkWindow *parent, GtkFileChooserAction action,
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   418
    const gchar *first_button_text, ...);
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   419
static gboolean (*fp_gtk_file_chooser_set_current_folder)(GtkFileChooser *chooser,
5444
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   420
    const gchar *filename);
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   421
static gboolean (*fp_gtk_file_chooser_set_filename)(GtkFileChooser *chooser,
5444
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   422
    const char *filename);
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   423
static void (*fp_gtk_file_chooser_set_current_name)(GtkFileChooser *chooser,
9198
1c69a0857cfb 6998877: After double-click on the folder names , FileNameOverrideTest FAILED
serb
parents: 8513
diff changeset
   424
    const gchar *name);
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   425
static void (*fp_gtk_file_filter_add_custom)(GtkFileFilter *filter,
5444
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   426
    GtkFileFilterFlags needed, GtkFileFilterFunc func, gpointer data,
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   427
    GDestroyNotify notify);
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   428
static void (*fp_gtk_file_chooser_set_filter)(GtkFileChooser *chooser,
5444
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   429
    GtkFileFilter *filter);
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   430
static GType (*fp_gtk_file_chooser_get_type)(void);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   431
static GtkFileFilter* (*fp_gtk_file_filter_new)(void);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   432
static void (*fp_gtk_file_chooser_set_do_overwrite_confirmation)(
5444
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   433
    GtkFileChooser *chooser, gboolean do_overwrite_confirmation);
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   434
static void (*fp_gtk_file_chooser_set_select_multiple)(
5444
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   435
    GtkFileChooser *chooser, gboolean select_multiple);
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   436
static gchar* (*fp_gtk_file_chooser_get_current_folder)(GtkFileChooser *chooser);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   437
static GSList* (*fp_gtk_file_chooser_get_filenames)(GtkFileChooser *chooser);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   438
static guint (*fp_gtk_g_slist_length)(GSList *list);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   439
static gulong (*fp_g_signal_connect_data)(gpointer instance,
5444
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   440
    const gchar *detailed_signal, GCallback c_handler, gpointer data,
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   441
    GClosureNotify destroy_data, GConnectFlags connect_flags);
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   442
static void (*fp_gtk_widget_show)(void *widget);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   443
static void (*fp_gtk_main)(void);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   444
static guint (*fp_gtk_main_level)(void);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   445
static gchar* (*fp_g_path_get_dirname) (const gchar *file_name);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   446
static XID (*fp_gdk_x11_drawable_get_xid) (GdkWindow *drawable);
5444
f7c5aeb82a14 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents: 2
diff changeset
   447
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   448
static GList* (*fp_g_list_append) (GList *list, gpointer data);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   449
static void (*fp_g_list_free) (GList *list);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   450
static void (*fp_g_list_free_full) (GList *list, GDestroyNotify free_func);
36903
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 34395
diff changeset
   451
21261
47f0a3e7ef46 7059886: 6 JCK manual awt/Desktop tests fail with GTKLookAndFeel - GTK intialization issue
serb
parents: 16471
diff changeset
   452
/**
47f0a3e7ef46 7059886: 6 JCK manual awt/Desktop tests fail with GTKLookAndFeel - GTK intialization issue
serb
parents: 16471
diff changeset
   453
 * This function is available for GLIB > 2.20, so it MUST be
23242
3ebc2cd4845d 8029923: Many Swing tests and SwingSet2 are failing under Solaris using GTK LaF - "Unable to load native GTK libraries"
azvegint
parents: 21261
diff changeset
   454
 * called within GLIB_CHECK_VERSION(2, 20, 0) check.
21261
47f0a3e7ef46 7059886: 6 JCK manual awt/Desktop tests fail with GTKLookAndFeel - GTK intialization issue
serb
parents: 16471
diff changeset
   455
 */
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   456
static gboolean (*fp_g_thread_get_initialized)(void);
21261
47f0a3e7ef46 7059886: 6 JCK manual awt/Desktop tests fail with GTKLookAndFeel - GTK intialization issue
serb
parents: 16471
diff changeset
   457
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   458
static void (*fp_g_thread_init)(GThreadFunctions *vtable);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   459
static void (*fp_gdk_threads_init)(void);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   460
static void (*fp_gdk_threads_enter)(void);
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   461
static void (*fp_gdk_threads_leave)(void);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
37711
972001566d66 8145547: [AWT/Swing] Conditional support for GTK 3 on Linux
ssadetsky
parents: 36903
diff changeset
   463
static gboolean (*fp_gtk_show_uri)(GdkScreen *screen, const gchar *uri,
16471
33bca48c948b 7123476: DesktopOpenTests:When enter the file path and click the open button,it crash
denis
parents: 9210
diff changeset
   464
    guint32 timestamp, GError **error);
33bca48c948b 7123476: DesktopOpenTests:When enter the file path and click the open button,it crash
denis
parents: 9210
diff changeset
   465
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
#endif /* !_GTK2_INTERFACE_H */