forked from AuroraMiddleware/gtk
Remove some deprecated functions from GtkWidget
This commit is contained in:
parent
6513947473
commit
16011da879
149
gtk/gtkwidget.c
149
gtk/gtkwidget.c
@ -540,7 +540,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
|||||||
klass->unmap_event = NULL;
|
klass->unmap_event = NULL;
|
||||||
klass->window_state_event = NULL;
|
klass->window_state_event = NULL;
|
||||||
klass->property_notify_event = _gtk_selection_property_notify;
|
klass->property_notify_event = _gtk_selection_property_notify;
|
||||||
klass->selection_clear_event = gtk_selection_clear;
|
klass->selection_clear_event = _gtk_selection_clear;
|
||||||
klass->selection_request_event = _gtk_selection_request;
|
klass->selection_request_event = _gtk_selection_request;
|
||||||
klass->selection_notify_event = _gtk_selection_notify;
|
klass->selection_notify_event = _gtk_selection_notify;
|
||||||
klass->selection_received = NULL;
|
klass->selection_received = NULL;
|
||||||
@ -3002,31 +3002,6 @@ gtk_widget_new (GType type,
|
|||||||
return widget;
|
return widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_widget_set:
|
|
||||||
* @widget: a #GtkWidget
|
|
||||||
* @first_property_name: name of first property to set
|
|
||||||
* @Varargs: value of first property, followed by more properties,
|
|
||||||
* %NULL-terminated
|
|
||||||
*
|
|
||||||
* Precursor of g_object_set().
|
|
||||||
*
|
|
||||||
* Deprecated: 2.0: Use g_object_set() instead.
|
|
||||||
**/
|
|
||||||
void
|
|
||||||
gtk_widget_set (GtkWidget *widget,
|
|
||||||
const gchar *first_property_name,
|
|
||||||
...)
|
|
||||||
{
|
|
||||||
va_list var_args;
|
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
|
||||||
|
|
||||||
va_start (var_args, first_property_name);
|
|
||||||
g_object_set_valist (G_OBJECT (widget), first_property_name, var_args);
|
|
||||||
va_end (var_args);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
gtk_widget_queue_draw_child (GtkWidget *widget)
|
gtk_widget_queue_draw_child (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
@ -3743,55 +3718,6 @@ gtk_widget_queue_draw (GtkWidget *widget)
|
|||||||
rect.width, rect.height);
|
rect.width, rect.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Invalidates the given area (allocation-relative-coordinates)
|
|
||||||
* in all of the widget's windows
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* gtk_widget_queue_clear_area:
|
|
||||||
* @widget: a #GtkWidget
|
|
||||||
* @x: x coordinate of upper-left corner of rectangle to redraw
|
|
||||||
* @y: y coordinate of upper-left corner of rectangle to redraw
|
|
||||||
* @width: width of region to draw
|
|
||||||
* @height: height of region to draw
|
|
||||||
*
|
|
||||||
* This function is no longer different from
|
|
||||||
* gtk_widget_queue_draw_area(), though it once was. Now it just calls
|
|
||||||
* gtk_widget_queue_draw_area(). Originally
|
|
||||||
* gtk_widget_queue_clear_area() would force a redraw of the
|
|
||||||
* background for %GTK_NO_WINDOW widgets, and
|
|
||||||
* gtk_widget_queue_draw_area() would not. Now both functions ensure
|
|
||||||
* the background will be redrawn.
|
|
||||||
*
|
|
||||||
* Deprecated: 2.2: Use gtk_widget_queue_draw_area() instead.
|
|
||||||
**/
|
|
||||||
void
|
|
||||||
gtk_widget_queue_clear_area (GtkWidget *widget,
|
|
||||||
gint x,
|
|
||||||
gint y,
|
|
||||||
gint width,
|
|
||||||
gint height)
|
|
||||||
{
|
|
||||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
|
||||||
|
|
||||||
gtk_widget_queue_draw_area (widget, x, y, width, height);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_widget_queue_clear:
|
|
||||||
* @widget: a #GtkWidget
|
|
||||||
*
|
|
||||||
* This function does the same as gtk_widget_queue_draw().
|
|
||||||
*
|
|
||||||
* Deprecated: 2.2: Use gtk_widget_queue_draw() instead.
|
|
||||||
**/
|
|
||||||
void
|
|
||||||
gtk_widget_queue_clear (GtkWidget *widget)
|
|
||||||
{
|
|
||||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
|
||||||
|
|
||||||
gtk_widget_queue_draw (widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_widget_queue_resize:
|
* gtk_widget_queue_resize:
|
||||||
* @widget: a #GtkWidget
|
* @widget: a #GtkWidget
|
||||||
@ -7949,42 +7875,6 @@ gtk_widget_set_usize_internal (GtkWidget *widget,
|
|||||||
g_object_thaw_notify (G_OBJECT (widget));
|
g_object_thaw_notify (G_OBJECT (widget));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_widget_set_usize:
|
|
||||||
* @widget: a #GtkWidget
|
|
||||||
* @width: minimum width, or -1 to unset
|
|
||||||
* @height: minimum height, or -1 to unset
|
|
||||||
*
|
|
||||||
* Sets the minimum size of a widget; that is, the widget's size
|
|
||||||
* request will be @width by @height. You can use this function to
|
|
||||||
* force a widget to be either larger or smaller than it is. The
|
|
||||||
* strange "usize" name dates from the early days of GTK+, and derives
|
|
||||||
* from X Window System terminology. In many cases,
|
|
||||||
* gtk_window_set_default_size() is a better choice for toplevel
|
|
||||||
* windows than this function; setting the default size will still
|
|
||||||
* allow users to shrink the window. Setting the usize will force them
|
|
||||||
* to leave the window at least as large as the usize. When dealing
|
|
||||||
* with window sizes, gtk_window_set_geometry_hints() can be a useful
|
|
||||||
* function as well.
|
|
||||||
*
|
|
||||||
* Note the inherent danger of setting any fixed size - themes,
|
|
||||||
* translations into other languages, different fonts, and user action
|
|
||||||
* can all change the appropriate size for a given widget. So, it's
|
|
||||||
* basically impossible to hardcode a size that will always be
|
|
||||||
* correct.
|
|
||||||
*
|
|
||||||
* Deprecated: 2.2: Use gtk_widget_set_size_request() instead.
|
|
||||||
**/
|
|
||||||
void
|
|
||||||
gtk_widget_set_usize (GtkWidget *widget,
|
|
||||||
gint width,
|
|
||||||
gint height)
|
|
||||||
{
|
|
||||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
|
||||||
|
|
||||||
gtk_widget_set_usize_internal (widget, width, height);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_widget_set_size_request:
|
* gtk_widget_set_size_request:
|
||||||
* @widget: a #GtkWidget
|
* @widget: a #GtkWidget
|
||||||
@ -9516,43 +9406,6 @@ gtk_widget_reset_shapes (GtkWidget *widget)
|
|||||||
gtk_reset_shapes_recurse (widget, widget->window);
|
gtk_reset_shapes_recurse (widget, widget->window);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_widget_ref:
|
|
||||||
* @widget: a #GtkWidget
|
|
||||||
*
|
|
||||||
* Adds a reference to a widget. This function is exactly the same
|
|
||||||
* as calling g_object_ref(), and exists mostly for historical
|
|
||||||
* reasons. It can still be convenient to avoid casting a widget
|
|
||||||
* to a #GObject, it saves a small amount of typing.
|
|
||||||
*
|
|
||||||
* Return value: the widget that was referenced
|
|
||||||
*
|
|
||||||
* Deprecated: 2.12: Use g_object_ref() instead.
|
|
||||||
**/
|
|
||||||
GtkWidget*
|
|
||||||
gtk_widget_ref (GtkWidget *widget)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
|
|
||||||
|
|
||||||
return (GtkWidget*) g_object_ref ((GObject*) widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_widget_unref:
|
|
||||||
* @widget: a #GtkWidget
|
|
||||||
*
|
|
||||||
* Inverse of gtk_widget_ref(). Equivalent to g_object_unref().
|
|
||||||
*
|
|
||||||
* Deprecated: 2.12: Use g_object_unref() instead.
|
|
||||||
**/
|
|
||||||
void
|
|
||||||
gtk_widget_unref (GtkWidget *widget)
|
|
||||||
{
|
|
||||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
|
||||||
|
|
||||||
g_object_unref ((GObject*) widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
expose_window (GdkWindow *window)
|
expose_window (GdkWindow *window)
|
||||||
{
|
{
|
||||||
|
@ -837,13 +837,6 @@ GtkWidget* gtk_widget_new (GType type,
|
|||||||
void gtk_widget_destroy (GtkWidget *widget);
|
void gtk_widget_destroy (GtkWidget *widget);
|
||||||
void gtk_widget_destroyed (GtkWidget *widget,
|
void gtk_widget_destroyed (GtkWidget *widget,
|
||||||
GtkWidget **widget_pointer);
|
GtkWidget **widget_pointer);
|
||||||
#ifndef GTK_DISABLE_DEPRECATED
|
|
||||||
GtkWidget* gtk_widget_ref (GtkWidget *widget);
|
|
||||||
void gtk_widget_unref (GtkWidget *widget);
|
|
||||||
void gtk_widget_set (GtkWidget *widget,
|
|
||||||
const gchar *first_property_name,
|
|
||||||
...) G_GNUC_NULL_TERMINATED;
|
|
||||||
#endif /* GTK_DISABLE_DEPRECATED */
|
|
||||||
void gtk_widget_unparent (GtkWidget *widget);
|
void gtk_widget_unparent (GtkWidget *widget);
|
||||||
void gtk_widget_show (GtkWidget *widget);
|
void gtk_widget_show (GtkWidget *widget);
|
||||||
void gtk_widget_show_now (GtkWidget *widget);
|
void gtk_widget_show_now (GtkWidget *widget);
|
||||||
@ -865,16 +858,6 @@ void gtk_widget_queue_draw_area (GtkWidget *widget,
|
|||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
#ifndef GTK_DISABLE_DEPRECATED
|
|
||||||
void gtk_widget_queue_clear (GtkWidget *widget);
|
|
||||||
void gtk_widget_queue_clear_area (GtkWidget *widget,
|
|
||||||
gint x,
|
|
||||||
gint y,
|
|
||||||
gint width,
|
|
||||||
gint height);
|
|
||||||
#endif /* GTK_DISABLE_DEPRECATED */
|
|
||||||
|
|
||||||
|
|
||||||
void gtk_widget_queue_resize (GtkWidget *widget);
|
void gtk_widget_queue_resize (GtkWidget *widget);
|
||||||
void gtk_widget_queue_resize_no_redraw (GtkWidget *widget);
|
void gtk_widget_queue_resize_no_redraw (GtkWidget *widget);
|
||||||
#ifndef GTK_DISABLE_DEPRECATED
|
#ifndef GTK_DISABLE_DEPRECATED
|
||||||
@ -1032,9 +1015,6 @@ void gtk_widget_get_size_request (GtkWidget *widget,
|
|||||||
void gtk_widget_set_uposition (GtkWidget *widget,
|
void gtk_widget_set_uposition (GtkWidget *widget,
|
||||||
gint x,
|
gint x,
|
||||||
gint y);
|
gint y);
|
||||||
void gtk_widget_set_usize (GtkWidget *widget,
|
|
||||||
gint width,
|
|
||||||
gint height);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void gtk_widget_set_events (GtkWidget *widget,
|
void gtk_widget_set_events (GtkWidget *widget,
|
||||||
@ -1308,11 +1288,6 @@ GType gtk_requisition_get_type (void) G_GNUC_CONST;
|
|||||||
GtkRequisition *gtk_requisition_copy (const GtkRequisition *requisition);
|
GtkRequisition *gtk_requisition_copy (const GtkRequisition *requisition);
|
||||||
void gtk_requisition_free (GtkRequisition *requisition);
|
void gtk_requisition_free (GtkRequisition *requisition);
|
||||||
|
|
||||||
#if defined (GTK_TRACE_OBJECTS) && defined (__GNUC__)
|
|
||||||
# define gtk_widget_ref g_object_ref
|
|
||||||
# define gtk_widget_unref g_object_unref
|
|
||||||
#endif /* GTK_TRACE_OBJECTS && __GNUC__ */
|
|
||||||
|
|
||||||
void _gtk_widget_set_has_default (GtkWidget *widget,
|
void _gtk_widget_set_has_default (GtkWidget *widget,
|
||||||
gboolean has_default);
|
gboolean has_default);
|
||||||
void _gtk_widget_set_has_grab (GtkWidget *widget,
|
void _gtk_widget_set_has_grab (GtkWidget *widget,
|
||||||
|
Loading…
Reference in New Issue
Block a user