Avoid type checking overhead for resize-mode
This commit is contained in:
@ -24,6 +24,24 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
struct _GtkContainerPrivate
|
||||
{
|
||||
GtkWidget *focus_child;
|
||||
|
||||
GdkFrameClock *resize_clock;
|
||||
guint resize_handler;
|
||||
|
||||
guint border_width : 16;
|
||||
guint border_width_set : 1;
|
||||
|
||||
guint has_focus_chain : 1;
|
||||
guint reallocate_redraws : 1;
|
||||
guint resize_pending : 1;
|
||||
guint restyle_pending : 1;
|
||||
guint resize_mode : 2;
|
||||
guint request_mode : 2;
|
||||
};
|
||||
|
||||
|
||||
void _gtk_container_queue_resize (GtkContainer *container);
|
||||
void _gtk_container_queue_restyle (GtkContainer *container);
|
||||
@ -44,6 +62,16 @@ gboolean _gtk_container_get_border_width_set (GtkContainer *container);
|
||||
void _gtk_container_set_border_width_set (GtkContainer *container,
|
||||
gboolean border_width_set);
|
||||
|
||||
static inline GtkResizeMode _gtk_container_get_resize_mode (GtkContainer *container);
|
||||
|
||||
static inline GtkResizeMode
|
||||
_gtk_container_get_resize_mode (GtkContainer *container)
|
||||
{
|
||||
return container->priv->resize_mode;
|
||||
}
|
||||
|
||||
#define _GTK_IS_RESIZE_CONTAINER(container) (_gtk_container_get_resize_mode (GTK_CONTAINER (container)) != GTK_RESIZE_PARENT)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_CONTAINER_PRIVATE_H__ */
|
||||
|
||||
Reference in New Issue
Block a user