G_BEGIN_DECLS
-/* With GtkWidget, a widget may be requested
- * its width for 2 or maximum 3 heights in one resize
- * (Note this define is limited by the bitfield sizes
- * defined on the SizeRequestCache structure).
+/* Cache as many ranges of height-for-width
+ * (or width-for-height) as can be rational
+ * for a said widget to have, if a label can
+ * only wrap to 3 lines, only 3 caches will
+ * ever be allocated for it.
*/
-#define GTK_SIZE_REQUEST_CACHED_SIZES (3)
-
-typedef struct
-{
- /* the size this request is for */
- gint for_size;
+#define GTK_SIZE_REQUEST_CACHED_SIZES (5)
+typedef struct {
gint minimum_size;
gint natural_size;
+} CachedSize;
+
+typedef struct
+{
+ gint lower_for_size; /* The minimum for_size with the same result */
+ gint upper_for_size; /* The maximum for_size with the same result */
+ CachedSize cached_size;
} SizeRequest;
typedef struct {
- SizeRequest widths[GTK_SIZE_REQUEST_CACHED_SIZES];
- SizeRequest heights[GTK_SIZE_REQUEST_CACHED_SIZES];
+ SizeRequest **widths;
+ SizeRequest **heights;
+
+ CachedSize cached_width;
+ CachedSize cached_height;
- guint cached_widths : 2;
- guint cached_heights : 2;
- guint last_cached_width : 2;
- guint last_cached_height : 2;
+ guint cached_widths : 3;
+ guint cached_heights : 3;
+ guint last_cached_width : 3;
+ guint last_cached_height : 3;
+ guint cached_base_width : 1;
+ guint cached_base_height : 1;
} SizeRequestCache;
void _gtk_widget_set_visible_flag (GtkWidget *widget,
gpointer group);
GSList *_gtk_widget_get_sizegroups (GtkWidget *widget);
+void _gtk_widget_add_attached_window (GtkWidget *widget,
+ GtkWindow *window);
+void _gtk_widget_remove_attached_window (GtkWidget *widget,
+ GtkWindow *window);
+
void _gtk_widget_override_size_request (GtkWidget *widget,
int width,
int height,
GdkWindow *window,
int *x,
int *y);
+void _gtk_widget_free_cached_sizes (GtkWidget *widget);
+
+const gchar* _gtk_widget_get_accel_path (GtkWidget *widget,
+ gboolean *locked);
+
+AtkObject * _gtk_widget_peek_accessible (GtkWidget *widget);
+
+GdkEventExpose * _gtk_cairo_get_event (cairo_t *cr);
+
+void _gtk_widget_draw_internal (GtkWidget *widget,
+ cairo_t *cr,
+ gboolean clip_to_size);
+void _gtk_widget_set_has_default (GtkWidget *widget,
+ gboolean has_default);
+void _gtk_widget_set_has_grab (GtkWidget *widget,
+ gboolean has_grab);
+void _gtk_widget_set_is_toplevel (GtkWidget *widget,
+ gboolean is_toplevel);
+
+void _gtk_widget_grab_notify (GtkWidget *widget,
+ gboolean was_grabbed);
+
+void _gtk_widget_propagate_hierarchy_changed (GtkWidget *widget,
+ GtkWidget *previous_toplevel);
+void _gtk_widget_propagate_screen_changed (GtkWidget *widget,
+ GdkScreen *previous_screen);
+void _gtk_widget_propagate_composited_changed (GtkWidget *widget);
+
+void _gtk_widget_set_device_window (GtkWidget *widget,
+ GdkDevice *device,
+ GdkWindow *pointer_window);
+GdkWindow * _gtk_widget_get_device_window (GtkWidget *widget,
+ GdkDevice *device);
+GList * _gtk_widget_list_devices (GtkWidget *widget);
+
+void _gtk_widget_synthesize_crossing (GtkWidget *from,
+ GtkWidget *to,
+ GdkDevice *device,
+ GdkCrossingMode mode);
+
+gpointer _gtk_widget_peek_request_cache (GtkWidget *widget);
+
+void _gtk_widget_buildable_finish_accelerator (GtkWidget *widget,
+ GtkWidget *toplevel,
+ gpointer user_data);
+GtkStyle * _gtk_widget_get_style (GtkWidget *widget);
+void _gtk_widget_set_style (GtkWidget *widget,
+ GtkStyle *style);
+
G_END_DECLS