diff options
author | Owen Taylor <otaylor@redhat.com> | 1999-01-27 18:21:20 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1999-01-27 18:21:20 +0000 |
commit | 14724626395882260fc73ae008a9df4fe7cbd877 (patch) | |
tree | d16769df30f0409e3faacd27a94b4a22a2be332d /gtk/gtklayout.h | |
parent | 90c7ea0b9138bb94bef9b01f37c7d3faffcbc6b7 (diff) | |
download | gtk+-14724626395882260fc73ae008a9df4fe7cbd877.tar.gz |
Use floor() instead of truncating to integer values so we get translation
Wed Jan 20 11:19:00 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c: Use floor() instead of truncating
to integer values so we get translation invariance.
* gtk/gtklayout.c (gtk_layout_size_allocate): Set upper
and lower values for adjustments in size_allocate().
* gdk/gdkwindow.c gdk/gdk.h gdk/gdkprivate.h: New
function gdk_window_set_static_gravities() to set
up a window for guffaw scrolling.
* gdk/gdkwindow.c (gdk_window_internal_destroy): Set flags
indicating destroyed state before cleanup.
* gtk/gtkprivate.h gtk/gtkwidget.c: Add a new
private flag IS_OFFSCREEN. If set, this indicates
to GTK+ that the widget is not to be considered
viewable regardless of its map state. Queued draws
on offscreen widgets are suppressed.
Added new function static gtk_widget_is_offscreen() to
check this flag on a widget and its ancestors.
* gtk/gtklayout.[ch]: Major revisions.
- Use gdk_window_set_static_gravities to set static gravity
on all child windows, and thus avoid having to create a window
for NO_WINDOW children.
- Adjust allocations of children as we scroll them
so queued draws work correctly.
- Don't allocate our children directly in a put()
or move(); just queue a resize() like every other
widget.
* gtk/testgtk.c: Make the arrows on the scrollbars
work, create a larger and more demanding test.
Diffstat (limited to 'gtk/gtklayout.h')
-rw-r--r-- | gtk/gtklayout.h | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/gtk/gtklayout.h b/gtk/gtklayout.h index c7ca1d5ff0..862da8b69e 100644 --- a/gtk/gtklayout.h +++ b/gtk/gtklayout.h @@ -40,15 +40,6 @@ extern "C" { typedef struct _GtkLayout GtkLayout; typedef struct _GtkLayoutClass GtkLayoutClass; -typedef struct _GtkLayoutChild GtkLayoutChild; - -struct _GtkLayoutChild { - GtkWidget *widget; - GdkWindow *window; /* For NO_WINDOW widgets */ - gint x; - gint y; - gboolean mapped : 1; -}; struct _GtkLayout { GtkContainer container; @@ -72,6 +63,8 @@ struct _GtkLayout { gint scroll_y; guint freeze_count; + + guint gravity_works : 1; }; struct _GtkLayoutClass { @@ -99,13 +92,6 @@ void gtk_layout_set_size (GtkLayout *layout, guint width, guint height); -/* These disable and enable moving and repainting the scrolling window of the GtkLayout, - * respectively. If you want to update the layout's offsets but do not want it to - * repaint itself, you should use these functions. - */ -void gtk_layout_freeze (GtkLayout *layout); -void gtk_layout_thaw (GtkLayout *layout); - GtkAdjustment* gtk_layout_get_hadjustment (GtkLayout *layout); GtkAdjustment* gtk_layout_get_vadjustment (GtkLayout *layout); void gtk_layout_set_hadjustment (GtkLayout *layout, @@ -113,6 +99,17 @@ void gtk_layout_set_hadjustment (GtkLayout *layout, void gtk_layout_set_vadjustment (GtkLayout *layout, GtkAdjustment *adjustment); +/* These disable and enable moving and repainting the scrolling window + * of the GtkLayout, respectively. If you want to update the layout's + * offsets but do not want it to repaint itself, you should use these + * functions. + * + * - I don't understand these are supposed to work, so I suspect + * - they don't now. OWT 1/20/98 + */ +void gtk_layout_freeze (GtkLayout *layout); +void gtk_layout_thaw (GtkLayout *layout); + #ifdef __cplusplus } #endif /* __cplusplus */ |