forked from AuroraMiddleware/gtk
Add some more goddamn accessors
This commit is contained in:
parent
d154b115e5
commit
5438a7b608
@ -5749,6 +5749,10 @@ gtk_widget_is_toplevel
|
||||
gtk_widget_set_window
|
||||
gtk_widget_set_receives_default
|
||||
gtk_widget_get_receives_default
|
||||
gtk_widget_set_realized
|
||||
gtk_widget_get_realized
|
||||
gtk_widget_set_mapped
|
||||
gtk_widget_set_mapped
|
||||
|
||||
<SUBSECTION>
|
||||
gtk_requisition_copy
|
||||
|
@ -5259,6 +5259,10 @@ gtk_widget_set_can_default
|
||||
gtk_widget_get_can_default
|
||||
gtk_widget_set_can_focus
|
||||
gtk_widget_get_can_focus
|
||||
gtk_widget_set_realized
|
||||
gtk_widget_get_realized
|
||||
gtk_widget_set_mapped
|
||||
gtk_widget_get_mapped
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -5965,6 +5965,100 @@ gtk_widget_is_drawable (GtkWidget *widget)
|
||||
(GTK_WIDGET_FLAGS (widget) & GTK_MAPPED) != 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_get_realized:
|
||||
* @widget: a #GtkWidget
|
||||
*
|
||||
* Determines whether @widget is realized.
|
||||
*
|
||||
* Return value: %TRUE if @widget is realized, %FALSE otherwise
|
||||
*
|
||||
* Since: 2.20
|
||||
**/
|
||||
gboolean
|
||||
gtk_widget_get_realized (GtkWidget *widget)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
|
||||
|
||||
return (GTK_WIDGET_FLAGS (widget) & GTK_REALIZED) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_set_realized:
|
||||
* @widget: a #GtkWidget
|
||||
* @realized: %TRUE to mark the widget as realized
|
||||
*
|
||||
* Marks the widget as being realized.
|
||||
*
|
||||
* This function should only ever be called in a derived widget's
|
||||
* "realize" or "unrealize" implementation.
|
||||
*
|
||||
* Since: 2.20
|
||||
*/
|
||||
void
|
||||
gtk_widget_set_realized (GtkWidget *widget,
|
||||
gboolean realized)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
realized = realized != FALSE;
|
||||
|
||||
if (realized != gtk_widget_get_realized (widget))
|
||||
{
|
||||
if (realized)
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
||||
else
|
||||
GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_get_mapped:
|
||||
* @widget: a #GtkWidget
|
||||
*
|
||||
* Whether the widget is mapped.
|
||||
*
|
||||
* Return value: %TRUE if the widget is mapped, %FALSE otherwise.
|
||||
*
|
||||
* Since: 2.20
|
||||
*/
|
||||
gboolean
|
||||
gtk_widget_get_mapped (GtkWidget *widget)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
|
||||
|
||||
return (GTK_WIDGET_FLAGS (widget) & GTK_MAPPED) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_set_mapped:
|
||||
* @widget: a #GtkWidget
|
||||
* @mapped: %TRUE to mark the widget as mapped
|
||||
*
|
||||
* Marks the widget as being realized.
|
||||
*
|
||||
* This function should only ever be called in a derived widget's
|
||||
* "map" or "unmap" implementation.
|
||||
*
|
||||
* Since: 2.20
|
||||
*/
|
||||
void
|
||||
gtk_widget_set_mapped (GtkWidget *widget,
|
||||
gboolean mapped)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
mapped = mapped != FALSE;
|
||||
|
||||
if (mapped != gtk_widget_get_mapped (widget))
|
||||
{
|
||||
if (mapped)
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
|
||||
else
|
||||
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_set_app_paintable:
|
||||
* @widget: a #GtkWidget
|
||||
|
@ -880,6 +880,12 @@ void gtk_widget_child_notify (GtkWidget *widget,
|
||||
const gchar *child_property);
|
||||
void gtk_widget_thaw_child_notify (GtkWidget *widget);
|
||||
|
||||
void gtk_widget_set_realized (GtkWidget *widget,
|
||||
gboolean realized);
|
||||
gboolean gtk_widget_get_realized (GtkWidget *widget);
|
||||
void gtk_widget_set_mapped (GtkWidget *widget,
|
||||
gboolean mapped);
|
||||
gboolean gtk_widget_get_mapped (GtkWidget *widget);
|
||||
void gtk_widget_set_can_focus (GtkWidget *widget,
|
||||
gboolean can_focus);
|
||||
gboolean gtk_widget_get_can_focus (GtkWidget *widget);
|
||||
@ -922,6 +928,12 @@ gboolean gtk_widget_get_has_window (GtkWidget *widget);
|
||||
|
||||
gboolean gtk_widget_is_toplevel (GtkWidget *widget);
|
||||
gboolean gtk_widget_is_drawable (GtkWidget *widget);
|
||||
void gtk_widget_set_realized (GtkWidget *widget,
|
||||
gboolean realized);
|
||||
gboolean gtk_widget_get_realized (GtkWidget *widget);
|
||||
void gtk_widget_set_mapped (GtkWidget *widget,
|
||||
gboolean mapped);
|
||||
gboolean gtk_widget_get_mapped (GtkWidget *widget);
|
||||
|
||||
void gtk_widget_set_app_paintable (GtkWidget *widget,
|
||||
gboolean app_paintable);
|
||||
|
Loading…
Reference in New Issue
Block a user