It doesn't make sense to keep them separate as GtkSizeRequest requires a
GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
one without the other.
It also makes the code a lot easier because no casts are required when
calling functions.
Also, the names would translate to gtk_widget_get_width() and people
agreed that this would be a too generic name, so a "preferred" was added
to the names.
So this patch moves the functions:
gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
gtk_size_request_get_width() => gtk_widget_get_preferred_width()
gtk_size_request_get_height() => gtk_widget_get_preferred_height()
gtk_size_request_get_size() => gtk_widget_get_preferred_size()
gtk_size_request_get_width_for_height() =>
gtk_widget_get_preferred_width_for_height()
gtk_size_request_get_height_for_width() =>
gtk_widget_get_preferred_height_for_width()
... and moves the corresponding vfuncs to the GtkWidgetClass.
The patch also renames the implementations of the vfuncs in widgets to
include the word "preferrred".
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.
For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.
Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
This commit adds constructors for GtkPaned, GtkBox, GtkButtonBox,
GtkRuler, GtkScale, GtkScrollbar and GtkSeparator and makes these
types instantiable.
Deprecate widget flag macros GTK_WIDGET_STATE, GTK_WIDGET_SAVED_STATE,
GTK_WIDGET_FLAGS, GTK_WIDGET_TOPLEVEL, GTK_WIDGET_NO_WINDOW and
GTK_WIDGET_COMPOSITE_CHILD.
Also deprecate the type macros GTK_WIDGET_TYPE, GTK_OBJECT_TYPE_NAME and
GTK_OBJECT_TYPE which have become redundant.
Instances of GTK_WIDGET_TOPLEVEL are replaced with gtk_widget_is_toplevel,
GTK_WIDGET_TYPE is replaced with G_OBJECT_TYPE, GTK_WIDGET_COMPOSITE_CHILD
is replaced with use of the "composite-child" property and uses of
GTK_WIDGET_NO_WINDOW are adjusted to use gtk_widget_get_has_window.
Uses of GTK_WIDGET_SAVED_STATE and GTK_WIDGET_FLAGS inside GtkWidget are
changed to direct flag usage.
Documentation is updated to refer to gtk_widget_set_has_window and
gtk_widget_get_has_window.
Gail and tests are updated as well.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=69872
2008-11-07 Michael Natterer <mitch@imendio.com>
* gtk/gtkpaned.c: argh, actually call the newly added private
gtk_paned_calc_position() instead of the deprecated public
version.
svn path=/trunk/; revision=21774
2008-11-07 Michael Natterer <mitch@gimp.org>
Bug 553586 – Add orientation API to GtkPaned
* gtk/gtkpaned.[ch]: implement the GtkOrientable interface
and swallow all code from GtkHPaned and GtkVPaned. Add
gtk_paned_new() which takes a GtkOrientation argument. Deprecate
gtk_paned_compute_position() for good (also for GTK_COMPILATION).
* gtk/gtkhpaned.[ch]
* gtk/gtkvpaned.[ch]: remove all code except the constructor and
call gtk_orientable_set_orientation() in init().
* gtk/gtk.symbols: add gtk_box_new().
svn path=/trunk/; revision=21772
2008-08-12 Michael Natterer <mitch@imendio.com>
* gtk/*.c: consistently chain up using
GTK_FOO_CLASS(parent_class)->bar(instance) instead of
(*GTK_FOO_CLASS(parent_class))->bar(instance).
svn path=/trunk/; revision=21085
2008-06-30 Cody Russell <bratsche@gnome.org>
* Practically everything changed.
Change all references of GIMP Toolkit (and variations of it)
to GTK+ Toolkit, showing no mercy at all to our beloved
ancestry. (#540529)
svn path=/trunk/; revision=20709
2008-02-12 Matthias Clasen <mclasen@redhat.com>
* gtk/*.c: Unify the handling of various "Enter" keysyms
all over the place. (#515047, Christian Persch)
svn path=/trunk/; revision=19528
2008-01-31 Cody Russell <bratsche@gnome.org>
* gtk/gtkpaned.c (gtk_paned_set_position):
Change queue_resize() to queue_draw(), and add a check for
child2 != NULL in case someone calls this before there is
a child packed in there. (#144269 again)
svn path=/trunk/; revision=19449
2007-12-1 Cody Russell <bratsche@gnome.org>
* gtk/gtkpaned.c: (gtk_paned_set_position) [Win32]:
On Windows, queue a redraw of child2 whenever we set
the pane handle position. This is unfortunately kind
of hacky, but solves the visual artifacts that were
occuring on at least certain types of child widgets
(e.g., text views and tree views) that are inside
horizontal or vertical panes. (#144269)
svn path=/trunk/; revision=19095