Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dorota Czaplejewicz
gtk
Commits
f427d699
Commit
f427d699
authored
Nov 17, 2010
by
Javier Jardón
Browse files
gtkoffscreenbox.c: Replace size_request by get_preferred_width/height
parent
10d5686f
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/gtkoffscreenbox.c
View file @
f427d699
...
...
@@ -11,8 +11,12 @@
static
void
gtk_offscreen_box_realize
(
GtkWidget
*
widget
);
static
void
gtk_offscreen_box_unrealize
(
GtkWidget
*
widget
);
static
void
gtk_offscreen_box_size_request
(
GtkWidget
*
widget
,
GtkRequisition
*
requisition
);
static
void
gtk_offscreen_box_get_preferred_width
(
GtkWidget
*
widget
,
gint
*
minimum
,
gint
*
maximum
);
static
void
gtk_offscreen_box_get_preferred_height
(
GtkWidget
*
widget
,
gint
*
minimum
,
gint
*
maximum
);
static
void
gtk_offscreen_box_size_allocate
(
GtkWidget
*
widget
,
GtkAllocation
*
allocation
);
static
gboolean
gtk_offscreen_box_damage
(
GtkWidget
*
widget
,
...
...
@@ -119,7 +123,8 @@ gtk_offscreen_box_class_init (GtkOffscreenBoxClass *klass)
widget_class
->
realize
=
gtk_offscreen_box_realize
;
widget_class
->
unrealize
=
gtk_offscreen_box_unrealize
;
widget_class
->
size_request
=
gtk_offscreen_box_size_request
;
widget_class
->
get_preferred_width
=
gtk_offscreen_box_get_preferred_width
;
widget_class
->
get_preferred_height
=
gtk_offscreen_box_get_preferred_height
;
widget_class
->
size_allocate
=
gtk_offscreen_box_size_allocate
;
widget_class
->
draw
=
gtk_offscreen_box_draw
;
...
...
@@ -517,6 +522,30 @@ gtk_offscreen_box_size_request (GtkWidget *widget,
requisition
->
height
=
border_width
*
2
+
h
;
}
static
void
gtk_offscreen_box_get_preferred_width
(
GtkWidget
*
widget
,
gint
*
minimum
,
gint
*
natural
)
{
GtkRequisition
requisition
;
gtk_offscreen_box_size_request
(
widget
,
&
requisition
);
*
minimum
=
*
natural
=
requisition
.
width
;
}
static
void
gtk_offscreen_box_get_preferred_height
(
GtkWidget
*
widget
,
gint
*
minimum
,
gint
*
natural
)
{
GtkRequisition
requisition
;
gtk_offscreen_box_size_request
(
widget
,
&
requisition
);
*
minimum
=
*
natural
=
requisition
.
height
;
}
static
void
gtk_offscreen_box_size_allocate
(
GtkWidget
*
widget
,
GtkAllocation
*
allocation
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment