8273387: remove some unreferenced gtk-related functions
Reviewed-by: pbansal, clanger
This commit is contained in:
parent
5df2648086
commit
6eba443428
src/java.desktop/unix/native/libawt_xawt/awt
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -147,10 +147,6 @@ static void (*fp_gtk_paint_arrow)(GtkStyle* style, GdkWindow* window,
|
||||
GdkRectangle* area, GtkWidget* widget, const gchar* detail,
|
||||
GtkArrowType arrow_type, gboolean fill, gint x, gint y,
|
||||
gint width, gint height);
|
||||
static void (*fp_gtk_paint_diamond)(GtkStyle* style, GdkWindow* window,
|
||||
GtkStateType state_type, GtkShadowType shadow_type,
|
||||
GdkRectangle* area, GtkWidget* widget, const gchar* detail,
|
||||
gint x, gint y, gint width, gint height);
|
||||
static void (*fp_gtk_paint_box)(GtkStyle* style, GdkWindow* window,
|
||||
GtkStateType state_type, GtkShadowType shadow_type,
|
||||
GdkRectangle* area, GtkWidget* widget, const gchar* detail,
|
||||
@ -595,7 +591,6 @@ GtkApi* gtk2_load(JNIEnv *env, const char* lib_name)
|
||||
fp_gtk_paint_vline = dl_symbol("gtk_paint_vline");
|
||||
fp_gtk_paint_shadow = dl_symbol("gtk_paint_shadow");
|
||||
fp_gtk_paint_arrow = dl_symbol("gtk_paint_arrow");
|
||||
fp_gtk_paint_diamond = dl_symbol("gtk_paint_diamond");
|
||||
fp_gtk_paint_box = dl_symbol("gtk_paint_box");
|
||||
fp_gtk_paint_flat_box = dl_symbol("gtk_paint_flat_box");
|
||||
fp_gtk_paint_check = dl_symbol("gtk_paint_check");
|
||||
@ -1850,19 +1845,6 @@ static void gtk2_paint_check(WidgetType widget_type, gint synth_state,
|
||||
x, y, width, height);
|
||||
}
|
||||
|
||||
static void gtk2_paint_diamond(WidgetType widget_type, GtkStateType state_type,
|
||||
GtkShadowType shadow_type, const gchar *detail,
|
||||
gint x, gint y, gint width, gint height)
|
||||
{
|
||||
gtk2_widget = gtk2_get_widget(widget_type);
|
||||
(*fp_gtk_paint_diamond)(gtk2_widget->style, gtk2_white_pixmap, state_type,
|
||||
shadow_type, NULL, gtk2_widget, detail,
|
||||
x, y, width, height);
|
||||
(*fp_gtk_paint_diamond)(gtk2_widget->style, gtk2_black_pixmap, state_type,
|
||||
shadow_type, NULL, gtk2_widget, detail,
|
||||
x, y, width, height);
|
||||
}
|
||||
|
||||
static void gtk2_paint_expander(WidgetType widget_type, GtkStateType state_type,
|
||||
const gchar *detail, gint x, gint y, gint width, gint height,
|
||||
GtkExpanderStyle expander_style)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -58,26 +58,6 @@ static const char ENV_PREFIX[] = "GTK_MODULES=";
|
||||
|
||||
static GtkWidget *gtk3_widgets[_GTK_WIDGET_TYPE_SIZE];
|
||||
|
||||
static void throw_exception(JNIEnv *env, const char* name, const char* message)
|
||||
{
|
||||
jclass class = (*env)->FindClass(env, name);
|
||||
|
||||
if (class != NULL)
|
||||
(*env)->ThrowNew(env, class, message);
|
||||
|
||||
(*env)->DeleteLocalRef(env, class);
|
||||
}
|
||||
|
||||
static void gtk3_add_state(GtkWidget *widget, GtkStateType state) {
|
||||
GtkStateType old_state = fp_gtk_widget_get_state(widget);
|
||||
fp_gtk_widget_set_state(widget, old_state | state);
|
||||
}
|
||||
|
||||
static void gtk3_remove_state(GtkWidget *widget, GtkStateType state) {
|
||||
GtkStateType old_state = fp_gtk_widget_get_state(widget);
|
||||
fp_gtk_widget_set_state(widget, old_state & ~state);
|
||||
}
|
||||
|
||||
/* This is a workaround for the bug:
|
||||
* http://sourceware.org/bugzilla/show_bug.cgi?id=1814
|
||||
* (dlsym/dlopen clears dlerror state)
|
||||
@ -838,21 +818,6 @@ static void gtk3_set_direction(GtkWidget *widget, GtkTextDirection dir)
|
||||
}
|
||||
}
|
||||
|
||||
/* GTK state_type filter */
|
||||
static GtkStateType get_gtk_state_type(WidgetType widget_type, gint synth_state)
|
||||
{
|
||||
GtkStateType result = GTK_STATE_NORMAL;
|
||||
|
||||
if ((synth_state & DISABLED) != 0) {
|
||||
result = GTK_STATE_INSENSITIVE;
|
||||
} else if ((synth_state & PRESSED) != 0) {
|
||||
result = GTK_STATE_ACTIVE;
|
||||
} else if ((synth_state & MOUSE_OVER) != 0) {
|
||||
result = GTK_STATE_PRELIGHT;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static GtkStateFlags get_gtk_state_flags(gint synth_state)
|
||||
{
|
||||
GtkStateFlags flags = 0;
|
||||
@ -897,19 +862,6 @@ static GtkStateFlags get_gtk_flags(GtkStateType state_type) {
|
||||
return flags;
|
||||
}
|
||||
|
||||
/* GTK shadow_type filter */
|
||||
static GtkShadowType get_gtk_shadow_type(WidgetType widget_type,
|
||||
gint synth_state)
|
||||
{
|
||||
GtkShadowType result = GTK_SHADOW_OUT;
|
||||
|
||||
if ((synth_state & SELECTED) != 0) {
|
||||
result = GTK_SHADOW_IN;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
static GtkWidget* gtk3_get_arrow(GtkArrowType arrow_type,
|
||||
GtkShadowType shadow_type)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user