GTK_WIDGET (widget)->style->ythickness) * 2 +
inner_border.top + inner_border.bottom);
- if (GTK_WIDGET_CAN_DEFAULT (widget))
+ if (gtk_widget_get_can_default (widget))
{
requisition->width += default_border.left + default_border.right;
requisition->height += default_border.top + default_border.bottom;
}
- if (GTK_BIN (button)->child && GTK_WIDGET_VISIBLE (GTK_BIN (button)->child))
+ if (GTK_BIN (button)->child && gtk_widget_get_visible (GTK_BIN (button)->child))
{
GtkRequisition child_requisition;
widget->allocation.width - border_width * 2,
widget->allocation.height - border_width * 2);
- if (GTK_BIN (button)->child && GTK_WIDGET_VISIBLE (GTK_BIN (button)->child))
+ if (GTK_BIN (button)->child && gtk_widget_get_visible (GTK_BIN (button)->child))
{
child_allocation.x = widget->allocation.x + border_width + inner_border.left + xthickness;
child_allocation.y = widget->allocation.y + border_width + inner_border.top + ythickness;
inner_border.bottom -
border_width * 2);
- if (GTK_WIDGET_CAN_DEFAULT (button))
+ if (gtk_widget_get_can_default (GTK_WIDGET (button)))
{
child_allocation.x += default_border.left;
child_allocation.y += default_border.top;
child_allocation.height = MAX (1, child_allocation.height - default_border.top - default_border.bottom);
}
- if (GTK_WIDGET_CAN_FOCUS (button))
+ if (gtk_widget_get_can_focus (GTK_WIDGET (button)))
{
child_allocation.x += focus_width + focus_pad;
child_allocation.y += focus_width + focus_pad;
gboolean interior_focus;
gint focus_width;
gint focus_pad;
-
- if (GTK_WIDGET_DRAWABLE (button))
+
+ widget = GTK_WIDGET (button);
+
+ if (gtk_widget_is_drawable (widget))
{
- widget = GTK_WIDGET (button);
border_width = GTK_CONTAINER (widget)->border_width;
gtk_button_get_props (button, &default_border, &default_outside_border, NULL, &interior_focus);
- gtk_widget_style_get (GTK_WIDGET (widget),
+ gtk_widget_style_get (widget,
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
NULL);
width = widget->allocation.width - border_width * 2;
height = widget->allocation.height - border_width * 2;
- if (GTK_WIDGET_HAS_DEFAULT (widget) &&
+ if (gtk_widget_has_default (widget) &&
GTK_BUTTON (widget)->relief == GTK_RELIEF_NORMAL)
{
gtk_paint_box (widget->style, widget->window,
width -= default_border.left + default_border.right;
height -= default_border.top + default_border.bottom;
}
- else if (GTK_WIDGET_CAN_DEFAULT (widget))
+ else if (gtk_widget_get_can_default (widget))
{
x += default_outside_border.left;
y += default_outside_border.top;
height -= default_outside_border.top + default_outside_border.bottom;
}
- if (!interior_focus && GTK_WIDGET_HAS_FOCUS (widget))
+ if (!interior_focus && gtk_widget_has_focus (widget))
{
x += focus_width + focus_pad;
y += focus_width + focus_pad;
shadow_type, area, widget, "button",
x, y, width, height);
- if (GTK_WIDGET_HAS_FOCUS (widget))
+ if (gtk_widget_has_focus (widget))
{
gint child_displacement_x;
gint child_displacement_y;
gboolean displace_focus;
- gtk_widget_style_get (GTK_WIDGET (widget),
+ gtk_widget_style_get (widget,
"child-displacement-y", &child_displacement_y,
"child-displacement-x", &child_displacement_x,
"displace-focus", &displace_focus,
gtk_button_expose (GtkWidget *widget,
GdkEventExpose *event)
{
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
GtkButton *button = GTK_BUTTON (widget);
{
button = GTK_BUTTON (widget);
- if (button->focus_on_click && !GTK_WIDGET_HAS_FOCUS (widget))
+ if (button->focus_on_click && !gtk_widget_has_focus (widget))
gtk_widget_grab_focus (widget);
if (event->button == 1)
if ((event_widget == widget) &&
(event->detail != GDK_NOTIFY_INFERIOR) &&
- (GTK_WIDGET_SENSITIVE (event_widget)))
+ (gtk_widget_get_sensitive (event_widget)))
{
button->in_button = FALSE;
gtk_button_leave (button);
{
GtkButton *button = GTK_BUTTON (widget);
- if (!GTK_WIDGET_IS_SENSITIVE (widget))
+ if (!gtk_widget_is_sensitive (widget))
{
button->in_button = FALSE;
gtk_real_button_released (button);