1/* 2 * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25#ifndef _GTK3_INTERFACE_H 26#define _GTK3_INTERFACE_H 27 28#include <stdlib.h> 29#include <jni.h> 30#include <X11/X.h> 31#include "gtk_interface.h" 32 33#define LIGHTNESS_MULT 1.3 34#define DARKNESS_MULT 0.7 35 36#define G_PI 3.1415926535897932384626433832795028841971693993751 37 38typedef enum 39{ 40 GTK_STATE_FLAG_NORMAL = 0, 41 GTK_STATE_FLAG_ACTIVE = 1 << 0, 42 GTK_STATE_FLAG_PRELIGHT = 1 << 1, 43 GTK_STATE_FLAG_SELECTED = 1 << 2, 44 GTK_STATE_FLAG_INSENSITIVE = 1 << 3, 45 GTK_STATE_FLAG_INCONSISTENT = 1 << 4, 46 GTK_STATE_FLAG_FOCUSED = 1 << 5, 47 GTK_STATE_FLAG_BACKDROP = 1 << 6, 48 GTK_STATE_FLAG_DIR_LTR = 1 << 7, 49 GTK_STATE_FLAG_DIR_RTL = 1 << 8, 50 GTK_STATE_FLAG_LINK = 1 << 9, 51 GTK_STATE_FLAG_VISITED = 1 << 10, 52 GTK_STATE_FLAG_CHECKED = 1 << 11 53} GtkStateFlags; 54 55typedef enum { 56 GTK_JUNCTION_NONE = 0, 57 GTK_JUNCTION_CORNER_TOPLEFT = 1 << 0, 58 GTK_JUNCTION_CORNER_TOPRIGHT = 1 << 1, 59 GTK_JUNCTION_CORNER_BOTTOMLEFT = 1 << 2, 60 GTK_JUNCTION_CORNER_BOTTOMRIGHT = 1 << 3, 61 GTK_JUNCTION_TOP = 62 (GTK_JUNCTION_CORNER_TOPLEFT | GTK_JUNCTION_CORNER_TOPRIGHT), 63 GTK_JUNCTION_BOTTOM = 64 (GTK_JUNCTION_CORNER_BOTTOMLEFT | GTK_JUNCTION_CORNER_BOTTOMRIGHT), 65 GTK_JUNCTION_LEFT = 66 (GTK_JUNCTION_CORNER_TOPLEFT | GTK_JUNCTION_CORNER_BOTTOMLEFT), 67 GTK_JUNCTION_RIGHT = 68 (GTK_JUNCTION_CORNER_TOPRIGHT | GTK_JUNCTION_CORNER_BOTTOMRIGHT) 69} GtkJunctionSides; 70 71typedef enum { 72 GTK_REGION_EVEN = 1 << 0, 73 GTK_REGION_ODD = 1 << 1, 74 GTK_REGION_FIRST = 1 << 2, 75 GTK_REGION_LAST = 1 << 3, 76 GTK_REGION_ONLY = 1 << 4, 77 GTK_REGION_SORTED = 1 << 5 78} GtkRegionFlags; 79 80typedef enum 81{ 82 GTK_WINDOW_TOPLEVEL, 83 GTK_WINDOW_POPUP 84} GtkWindowType; 85 86typedef enum 87{ 88 G_PARAM_READABLE = 1 << 0, 89 G_PARAM_WRITABLE = 1 << 1, 90 G_PARAM_CONSTRUCT = 1 << 2, 91 G_PARAM_CONSTRUCT_ONLY = 1 << 3, 92 G_PARAM_LAX_VALIDATION = 1 << 4, 93 G_PARAM_STATIC_NAME = 1 << 5 94} GParamFlags; 95 96typedef enum 97{ 98 GTK_ICON_LOOKUP_NO_SVG = 1 << 0, 99 GTK_ICON_LOOKUP_FORCE_SVG = 1 << 1, 100 GTK_ICON_LOOKUP_USE_BUILTIN = 1 << 2, 101 GTK_ICON_LOOKUP_GENERIC_FALLBACK = 1 << 3, 102 GTK_ICON_LOOKUP_FORCE_SIZE = 1 << 4 103} GtkIconLookupFlags; 104 105typedef enum 106{ 107 GTK_UPDATE_CONTINUOUS, 108 GTK_UPDATE_DISCONTINUOUS, 109 GTK_UPDATE_DELAYED 110} GtkUpdateType; 111 112typedef enum 113{ 114 GTK_PROGRESS_CONTINUOUS, 115 GTK_PROGRESS_DISCRETE 116} GtkProgressBarStyle; 117 118typedef enum 119{ 120 GTK_PROGRESS_LEFT_TO_RIGHT, 121 GTK_PROGRESS_RIGHT_TO_LEFT, 122 GTK_PROGRESS_BOTTOM_TO_TOP, 123 GTK_PROGRESS_TOP_TO_BOTTOM 124} GtkProgressBarOrientation; 125 126typedef enum { 127 CAIRO_FORMAT_INVALID = -1, 128 CAIRO_FORMAT_ARGB32 = 0, 129 CAIRO_FORMAT_RGB24 = 1, 130 CAIRO_FORMAT_A8 = 2, 131 CAIRO_FORMAT_A1 = 3, 132 CAIRO_FORMAT_RGB16_565 = 4 133} cairo_format_t; 134 135/* We define all structure pointers to be void* */ 136typedef void GdkPixbuf; 137typedef void GMainContext; 138typedef void GVfs; 139 140typedef void GdkColormap; 141typedef void GdkDrawable; 142typedef void GdkGC; 143typedef void GdkPixmap; 144typedef void GtkStyleContext; 145typedef void GtkFixed; 146typedef void GtkMenuItem; 147typedef void GtkMenuShell; 148typedef void GtkWidgetClass; 149typedef void PangoFontDescription; 150typedef void GtkSettings; 151typedef void GtkStyleProvider; 152typedef void cairo_pattern_t; 153typedef void cairo_t; 154typedef void cairo_surface_t; 155typedef void GtkScrolledWindow; 156typedef void GtkIconTheme; 157typedef void GtkWidget; 158typedef void GtkMisc; 159typedef void GtkContainer; 160typedef void GtkBin; 161typedef void GtkAdjustment; 162typedef void GtkRange; 163typedef void GtkProgressBar; 164typedef void GtkProgress; 165 166/* Some real structures */ 167typedef struct 168{ 169 guint32 pixel; 170 guint16 red; 171 guint16 green; 172 guint16 blue; 173} GdkColor; 174 175typedef struct 176{ 177 gdouble red; 178 gdouble green; 179 gdouble blue; 180 gdouble alpha; 181} GdkRGBA; 182 183typedef struct { 184 gint fd; 185 gushort events; 186 gushort revents; 187} GPollFD; 188 189typedef struct { 190 gint x; 191 gint y; 192 gint width; 193 gint height; 194} GdkRectangle; 195 196typedef struct { 197 int x, y; 198 int width, height; 199} GtkAllocation; 200 201typedef struct { 202 gint width; 203 gint height; 204} GtkRequisition; 205 206typedef struct { 207 GtkWidgetClass *g_class; 208} GTypeInstance; 209 210typedef struct { 211 gint16 left; 212 gint16 right; 213 gint16 top; 214 gint16 bottom; 215} GtkBorder; 216 217typedef struct 218{ 219 GType g_type; 220 union { 221 gint v_int; 222 guint v_uint; 223 glong v_long; 224 gulong v_ulong; 225 gint64 v_int64; 226 guint64 v_uint64; 227 gfloat v_float; 228 gdouble v_double; 229 gpointer v_pointer; 230 } data[2]; 231} GValue; 232 233typedef struct { 234 GTypeInstance g_type_instance; 235 const gchar *name; 236 GParamFlags flags; 237 GType value_type; 238 GType owner_type; 239} GParamSpec; 240 241 242static gchar* (*fp_glib_check_version)(guint required_major, 243 guint required_minor, guint required_micro); 244 245/** 246 * Returns : 247 * NULL if the GTK+ library is compatible with the given version, or a string 248 * describing the version mismatch. 249 */ 250static gchar* (*fp_gtk_check_version)(guint required_major, guint 251 required_minor, guint required_micro); 252 253static void (*fp_g_free)(gpointer mem); 254static void (*fp_g_object_unref)(gpointer object); 255static GdkWindow *(*fp_gdk_get_default_root_window) (void); 256 257static int (*fp_gdk_pixbuf_get_bits_per_sample)(const GdkPixbuf *pixbuf); 258static guchar *(*fp_gdk_pixbuf_get_pixels)(const GdkPixbuf *pixbuf); 259static gboolean (*fp_gdk_pixbuf_get_has_alpha)(const GdkPixbuf *pixbuf); 260static int (*fp_gdk_pixbuf_get_height)(const GdkPixbuf *pixbuf); 261static int (*fp_gdk_pixbuf_get_n_channels)(const GdkPixbuf *pixbuf); 262static int (*fp_gdk_pixbuf_get_rowstride)(const GdkPixbuf *pixbuf); 263static int (*fp_gdk_pixbuf_get_width)(const GdkPixbuf *pixbuf); 264static GdkPixbuf *(*fp_gdk_pixbuf_new_from_file)(const char *filename, 265 GError **error); 266static GdkColorspace (*fp_gdk_pixbuf_get_colorspace)(const GdkPixbuf *pixbuf); 267 268static GdkPixbuf *(*fp_gdk_pixbuf_get_from_drawable)(GdkWindow *window, 269 int src_x, int src_y, int width, int height); 270static GdkPixbuf *(*fp_gdk_pixbuf_scale_simple)(GdkPixbuf *src, 271 int dest_width, int dest_heigh, GdkInterpType interp_type); 272 273 274static void (*fp_gtk_widget_destroy)(void *widget); 275static void (*fp_gtk_window_present)(GtkWindow *window); 276static void (*fp_gtk_window_move)(GtkWindow *window, gint x, gint y); 277static void (*fp_gtk_window_resize)(GtkWindow *window, gint width, gint height); 278 279/** 280 * Function Pointers for GtkFileChooser 281 */ 282static gchar* (*fp_gtk_file_chooser_get_filename)(GtkFileChooser *chooser); 283static void (*fp_gtk_widget_hide)(void *widget); 284static void (*fp_gtk_main_quit)(void); 285static void* (*fp_gtk_file_chooser_dialog_new)(const gchar *title, 286 GtkWindow *parent, GtkFileChooserAction action, 287 const gchar *first_button_text, ...); 288static gboolean (*fp_gtk_file_chooser_set_current_folder) 289 (GtkFileChooser *chooser, const gchar *filename); 290static gboolean (*fp_gtk_file_chooser_set_filename)(GtkFileChooser *chooser, 291 const char *filename); 292static void (*fp_gtk_file_chooser_set_current_name)(GtkFileChooser *chooser, 293 const gchar *name); 294static void (*fp_gtk_file_filter_add_custom)(GtkFileFilter *filter, 295 GtkFileFilterFlags needed, GtkFileFilterFunc func, gpointer data, 296 GDestroyNotify notify); 297static void (*fp_gtk_file_chooser_set_filter)(GtkFileChooser *chooser, 298 GtkFileFilter *filter); 299static GType (*fp_gtk_file_chooser_get_type)(void); 300static GtkFileFilter* (*fp_gtk_file_filter_new)(void); 301static void (*fp_gtk_file_chooser_set_do_overwrite_confirmation)( 302 GtkFileChooser *chooser, gboolean do_overwrite_confirmation); 303static void (*fp_gtk_file_chooser_set_select_multiple)( 304 GtkFileChooser *chooser, gboolean select_multiple); 305static gchar* (*fp_gtk_file_chooser_get_current_folder) 306 (GtkFileChooser *chooser); 307static GSList* (*fp_gtk_file_chooser_get_filenames)(GtkFileChooser *chooser); 308static guint (*fp_gtk_g_slist_length)(GSList *list); 309static gulong (*fp_g_signal_connect_data)(gpointer instance, 310 const gchar *detailed_signal, GCallback c_handler, gpointer data, 311 GClosureNotify destroy_data, GConnectFlags connect_flags); 312static void (*fp_gtk_widget_show)(void *widget); 313static void (*fp_gtk_main)(void); 314static guint (*fp_gtk_main_level)(void); 315static gchar* (*fp_g_path_get_dirname) (const gchar *file_name); 316static XID (*fp_gdk_x11_drawable_get_xid) (GdkWindow *drawable); 317 318static GList* (*fp_g_list_append) (GList *list, gpointer data); 319static void (*fp_g_list_free) (GList *list); 320static void (*fp_g_list_free_full) (GList *list, GDestroyNotify free_func); 321 322static void (*fp_gdk_threads_enter)(void); 323static void (*fp_gdk_threads_leave)(void); 324 325static gboolean (*fp_gtk_show_uri)(GdkScreen *screen, const gchar *uri, 326 guint32 timestamp, GError **error); 327 328// Implementation functions prototypes 329static void gtk3_init(GtkApi* gtk); 330static GValue* (*fp_g_value_init)(GValue *value, GType g_type); 331static gboolean (*fp_g_type_is_a)(GType type, GType is_a_type); 332static gboolean (*fp_g_value_get_boolean)(const GValue *value); 333static gchar (*fp_g_value_get_char)(const GValue *value); 334static guchar (*fp_g_value_get_uchar)(const GValue *value); 335static gint (*fp_g_value_get_int)(const GValue *value); 336static guint (*fp_g_value_get_uint)(const GValue *value); 337static glong (*fp_g_value_get_long)(const GValue *value); 338static gulong (*fp_g_value_get_ulong)(const GValue *value); 339static gint64 (*fp_g_value_get_int64)(const GValue *value); 340static guint64 (*fp_g_value_get_uint64)(const GValue *value); 341static gfloat (*fp_g_value_get_float)(const GValue *value); 342static gdouble (*fp_g_value_get_double)(const GValue *value); 343static const gchar* (*fp_g_value_get_string)(const GValue *value); 344static gint (*fp_g_value_get_enum)(const GValue *value); 345static guint (*fp_g_value_get_flags)(const GValue *value); 346static GParamSpec* (*fp_g_value_get_param)(const GValue *value); 347static gpointer* (*fp_g_value_get_boxed)(const GValue *value); 348static gpointer* (*fp_g_value_get_pointer)(const GValue *value); 349static void (*fp_g_object_get)(gpointer object, 350 const gchar* fpn, ...); 351static void (*fp_g_object_set)(gpointer object, 352 const gchar *first_property_name, 353 ...); 354 355static gboolean (*fp_g_main_context_iteration)(GMainContext *context); 356static gboolean (*fp_g_str_has_prefix)(const gchar *str, const gchar *prefix); 357static gchar** (*fp_g_strsplit)(const gchar *string, const gchar *delimiter, 358 gint max_tokens); 359static void (*fp_g_strfreev)(gchar **str_array); 360 361 362static cairo_surface_t* (*fp_cairo_image_surface_create)(cairo_format_t format, 363 int width, int height); 364static void (*fp_cairo_surface_destroy)(cairo_surface_t *surface); 365static cairo_t* (*fp_cairo_create)(cairo_surface_t *target); 366static void (*fp_cairo_destroy)(cairo_t *cr); 367static void (*fp_cairo_fill)(cairo_t *cr); 368static void (*fp_cairo_surface_flush)(cairo_surface_t *surface); 369static void (*fp_cairo_rectangle)(cairo_t *cr, double x, double y, double width, 370 double height); 371static void (*fp_cairo_set_source_rgb)(cairo_t *cr, double red, double green, 372 double blue); 373static void (*fp_cairo_set_source_rgba)(cairo_t *cr, double red, double green, 374 double blue, double alpha); 375static void (*fp_cairo_paint)(cairo_t *cr); 376static void (*fp_cairo_clip)(cairo_t *cr); 377static unsigned char* (*fp_cairo_image_surface_get_data)( 378 cairo_surface_t *surface); 379static int (*fp_cairo_image_surface_get_stride) (cairo_surface_t *surface); 380static GdkPixbuf* (*fp_gdk_pixbuf_get_from_surface)(cairo_surface_t *surface, 381 gint src_x, gint src_y, gint width, gint height); 382static GtkStateType (*fp_gtk_widget_get_state)(GtkWidget *widget); 383static void (*fp_gtk_widget_set_state)(GtkWidget *widget, GtkStateType state); 384static gboolean (*fp_gtk_widget_is_focus)(GtkWidget *widget); 385static void (*fp_gtk_widget_set_allocation)(GtkWidget *widget, 386 const GtkAllocation *allocation); 387static GtkWidget* (*fp_gtk_widget_get_parent)(GtkWidget *widget); 388static GtkStyleContext* (*fp_gtk_widget_get_style_context)(GtkWidget *widget); 389static void (*fp_gtk_style_context_get_color)(GtkStyleContext *context, 390 GtkStateFlags state, GdkRGBA *color); 391static void (*fp_gtk_style_context_get_background_color) 392 (GtkStyleContext *context, GtkStateFlags state, GdkRGBA *color); 393static void (*fp_gtk_style_context_get)(GtkStyleContext *context, 394 GtkStateFlags state, ...); 395static GtkStateFlags (*fp_gtk_widget_get_state_flags)(GtkWidget* widget); 396static void (*fp_gtk_style_context_set_state)(GtkStyleContext* style, 397 GtkStateFlags flags); 398static void (*fp_gtk_style_context_add_class)(GtkStyleContext *context, 399 const gchar *class_name); 400static void (*fp_gtk_style_context_save)(GtkStyleContext *context); 401static void (*fp_gtk_style_context_restore)(GtkStyleContext *context); 402static void (*fp_gtk_render_check)(GtkStyleContext *context, cairo_t *cr, 403 gdouble x, gdouble y, gdouble width, gdouble height); 404static void (*fp_gtk_render_option)(GtkStyleContext *context, cairo_t *cr, 405 gdouble x, gdouble y, gdouble width, gdouble height); 406static void (*fp_gtk_render_extension)(GtkStyleContext *context, cairo_t *cr, 407 gdouble x, gdouble y, gdouble width, gdouble height, 408 GtkPositionType gap_side); 409static void (*fp_gtk_render_expander)(GtkStyleContext *context, cairo_t *cr, 410 gdouble x, gdouble y, gdouble width, gdouble height); 411static void (*fp_gtk_render_frame_gap)(GtkStyleContext *context, cairo_t *cr, 412 gdouble x, gdouble y, gdouble width, gdouble height, 413 GtkPositionType gap_side, gdouble xy0_gap, 414 gdouble xy1_gap); 415static void (*fp_gtk_render_line)(GtkStyleContext *context, cairo_t *cr, 416 gdouble x0, gdouble y0, gdouble x1, gdouble y1); 417static GdkPixbuf* (*fp_gtk_widget_render_icon_pixbuf)(GtkWidget *widget, 418 const gchar *stock_id, GtkIconSize size); 419static cairo_surface_t* (*fp_gdk_window_create_similar_image_surface)( 420 GdkWindow *window, cairo_format_t format, int width, 421 int height, int scale); 422static cairo_surface_t* (*fp_gdk_window_create_similar_surface)( 423 GdkWindow *window, cairo_format_t format, 424 int width, int height); 425static GdkWindow* (*fp_gtk_widget_get_window)(GtkWidget *widget); 426static GtkSettings *(*fp_gtk_settings_get_for_screen)(GdkScreen *screen); 427static GdkScreen *(*fp_gtk_widget_get_screen)(GtkWidget *widget); 428static GtkStyleProvider* (*fp_gtk_css_provider_get_named)(const gchar *name, 429 const gchar *variant); 430static void (*fp_gtk_style_context_add_provider)(GtkStyleContext *context, 431 GtkStyleProvider *provider, guint priority); 432static void (*fp_gtk_render_frame)(GtkStyleContext *context,cairo_t *cr, 433 gdouble x, gdouble y, gdouble width, gdouble height); 434static void (*fp_gtk_render_focus)(GtkStyleContext *context,cairo_t *cr, 435 gdouble x, gdouble y, gdouble width, gdouble height); 436static void (*fp_gtk_render_handle)(GtkStyleContext *context,cairo_t *cr, 437 gdouble x, gdouble y, gdouble width, gdouble height); 438static void (*fp_gtk_style_context_get_property)(GtkStyleContext *context, 439 const gchar *property, GtkStateFlags state, GValue *value); 440static void (*fp_gtk_render_activity)(GtkStyleContext *context, cairo_t *cr, 441 gdouble x, gdouble y, gdouble width, gdouble height); 442static void (*fp_gtk_render_background)(GtkStyleContext *context, cairo_t *cr, 443 gdouble x, gdouble y, gdouble width, gdouble height); 444static gboolean (*fp_gtk_style_context_has_class)(GtkStyleContext *context, 445 const gchar *class_name); 446static void transform_detail_string (const gchar *detail, 447 GtkStyleContext *context); 448void (*fp_gtk_style_context_set_junction_sides)(GtkStyleContext *context, 449 GtkJunctionSides sides); 450void (*fp_gtk_style_context_add_region)(GtkStyleContext *context, 451 const gchar *region_name, GtkRegionFlags flags); 452void (*fp_gtk_render_arrow)(GtkStyleContext *context, cairo_t *cr, 453 gdouble angle, gdouble x, gdouble y, gdouble size); 454void (*fp_gtk_bin_set_child)(GtkBin *bin, GtkWidget *widget); 455void (*fp_gtk_scrolled_window_set_shadow_type)( 456 GtkScrolledWindow *scrolled_window, GtkShadowType type); 457static void (*fp_gtk_render_slider)(GtkStyleContext *context, cairo_t *cr, 458 gdouble x, gdouble y, gdouble width, gdouble height, 459 GtkOrientation orientation); 460static void (*fp_gtk_style_context_get_padding)(GtkStyleContext *self, 461 GtkStateFlags state, GtkBorder* padding); 462static void (*fp_gtk_range_set_inverted)(GtkRange *range, gboolean setting); 463static PangoFontDescription* (*fp_gtk_style_context_get_font)( 464 GtkStyleContext *context, GtkStateFlags state); 465static int (*fp_gtk_widget_get_allocated_width)(GtkWidget *widget); 466static int (*fp_gtk_widget_get_allocated_height)(GtkWidget *widget); 467static GtkIconTheme* (*fp_gtk_icon_theme_get_default)(void); 468static GdkPixbuf* (*fp_gtk_icon_theme_load_icon)(GtkIconTheme *icon_theme, 469 const gchar *icon_name, gint size, 470 GtkIconLookupFlags flags, GError **error); 471static void (*fp_gtk_adjustment_set_lower)(GtkAdjustment *adjustment, 472 gdouble lower); 473static void (*fp_gtk_adjustment_set_page_increment)(GtkAdjustment *adjustment, 474 gdouble page_increment); 475static void (*fp_gtk_adjustment_set_page_size)(GtkAdjustment *adjustment, 476 gdouble page_size); 477static void (*fp_gtk_adjustment_set_step_increment)(GtkAdjustment *adjustment, 478 gdouble step_increment); 479static void (*fp_gtk_adjustment_set_upper)(GtkAdjustment *adjustment, 480 gdouble upper); 481static void (*fp_gtk_adjustment_set_value)(GtkAdjustment *adjustment, 482 gdouble value); 483static GdkGC *(*fp_gdk_gc_new)(GdkDrawable*); 484static void (*fp_gdk_rgb_gc_set_foreground)(GdkGC*, guint32); 485static void (*fp_gdk_draw_rectangle)(GdkDrawable*, GdkGC*, gboolean, 486 gint, gint, gint, gint); 487static GdkPixbuf *(*fp_gdk_pixbuf_new)(GdkColorspace colorspace, 488 gboolean has_alpha, int bits_per_sample, int width, int height); 489static void (*fp_gdk_drawable_get_size)(GdkDrawable *drawable, 490 gint* width, gint* height); 491static gboolean (*fp_gtk_init_check)(int* argc, char** argv); 492 493/* Widget creation */ 494static GtkWidget* (*fp_gtk_arrow_new)(GtkArrowType arrow_type, 495 GtkShadowType shadow_type); 496static GtkWidget* (*fp_gtk_button_new)(); 497static GtkWidget* (*fp_gtk_check_button_new)(); 498static GtkWidget* (*fp_gtk_check_menu_item_new)(); 499static GtkWidget* (*fp_gtk_color_selection_dialog_new)(const gchar* title); 500static GtkWidget* (*fp_gtk_combo_box_new)(); 501static GtkWidget* (*fp_gtk_combo_box_entry_new)(); 502static GtkWidget* (*fp_gtk_entry_new)(); 503static GtkWidget* (*fp_gtk_fixed_new)(); 504static GtkWidget* (*fp_gtk_handle_box_new)(); 505static GtkWidget* (*fp_gtk_hpaned_new)(); 506static GtkWidget* (*fp_gtk_vpaned_new)(); 507static GtkWidget* (*fp_gtk_scale_new)(GtkOrientation orientation, 508 GtkAdjustment* adjustment); 509static GtkWidget* (*fp_gtk_hscrollbar_new)(GtkAdjustment* adjustment); 510static GtkWidget* (*fp_gtk_vscrollbar_new)(GtkAdjustment* adjustment); 511static GtkWidget* (*fp_gtk_hseparator_new)(); 512static GtkWidget* (*fp_gtk_vseparator_new)(); 513static GtkWidget* (*fp_gtk_image_new)(); 514static GtkWidget* (*fp_gtk_label_new)(const gchar* str); 515static GtkWidget* (*fp_gtk_menu_new)(); 516static GtkWidget* (*fp_gtk_menu_bar_new)(); 517static GtkWidget* (*fp_gtk_menu_item_new)(); 518static GtkWidget* (*fp_gtk_notebook_new)(); 519static GtkWidget* (*fp_gtk_progress_bar_new)(); 520static GtkWidget* (*fp_gtk_progress_bar_set_orientation)( 521 GtkProgressBar *pbar, 522 GtkProgressBarOrientation orientation); 523static GtkWidget* (*fp_gtk_radio_button_new)(GSList *group); 524static GtkWidget* (*fp_gtk_radio_menu_item_new)(GSList *group); 525static GtkWidget* (*fp_gtk_scrolled_window_new)(GtkAdjustment *hadjustment, 526 GtkAdjustment *vadjustment); 527static GtkWidget* (*fp_gtk_separator_menu_item_new)(); 528static GtkWidget* (*fp_gtk_separator_tool_item_new)(); 529static GtkWidget* (*fp_gtk_text_view_new)(); 530static GtkWidget* (*fp_gtk_toggle_button_new)(); 531static GtkWidget* (*fp_gtk_toolbar_new)(); 532static GtkWidget* (*fp_gtk_tree_view_new)(); 533static GtkWidget* (*fp_gtk_viewport_new)(GtkAdjustment *hadjustment, 534 GtkAdjustment *vadjustment); 535static GtkWidget* (*fp_gtk_window_new)(GtkWindowType type); 536static GtkWidget* (*fp_gtk_dialog_new)(); 537static GtkWidget* (*fp_gtk_spin_button_new)(GtkAdjustment *adjustment, 538 gdouble climb_rate, guint digits); 539static GtkWidget* (*fp_gtk_frame_new)(const gchar *label); 540 541/* Other widget operations */ 542static GtkAdjustment* (*fp_gtk_adjustment_new)(gdouble value, 543 gdouble lower, gdouble upper, gdouble step_increment, 544 gdouble page_increment, gdouble page_size); 545static void (*fp_gtk_container_add)(GtkContainer *window, GtkWidget *widget); 546static void (*fp_gtk_menu_shell_append)(GtkMenuShell *menu_shell, 547 GtkWidget *child); 548static void (*fp_gtk_menu_item_set_submenu)(GtkMenuItem *menu_item, 549 GtkWidget *submenu); 550static void (*fp_gtk_widget_realize)(GtkWidget *widget); 551static GdkPixbuf* (*fp_gtk_widget_render_icon)(GtkWidget *widget, 552 const gchar *stock_id, GtkIconSize size, const gchar *detail); 553static void (*fp_gtk_widget_set_name)(GtkWidget *widget, const gchar *name); 554static void (*fp_gtk_widget_set_parent)(GtkWidget *widget, GtkWidget *parent); 555static void (*fp_gtk_widget_set_direction)(GtkWidget *widget, 556 GtkTextDirection direction); 557static void (*fp_gtk_widget_style_get)(GtkWidget *widget, 558 const gchar *first_property_name, ...); 559static void (*fp_gtk_widget_class_install_style_property)( 560 GtkWidgetClass* class, GParamSpec *pspec); 561static GParamSpec* (*fp_gtk_widget_class_find_style_property)( 562 GtkWidgetClass* class, const gchar* property_name); 563static void (*fp_gtk_widget_style_get_property)(GtkWidget* widget, 564 const gchar* property_name, GValue* value); 565static char* (*fp_pango_font_description_to_string)( 566 const PangoFontDescription* fd); 567static GtkSettings* (*fp_gtk_settings_get_default)(); 568static GtkSettings* (*fp_gtk_widget_get_settings)(GtkWidget *widget); 569static GType (*fp_gtk_border_get_type)(); 570static void (*fp_gtk_arrow_set)(GtkWidget* arrow, 571 GtkArrowType arrow_type, 572 GtkShadowType shadow_type); 573static void (*fp_gtk_widget_size_request)(GtkWidget *widget, 574 GtkRequisition *requisition); 575static GtkAdjustment* (*fp_gtk_range_get_adjustment)(GtkRange* range); 576 577#endif /* !_GTK3_INTERFACE_H */ 578