1 Incompatible Changes from GTK+-1.2 to GTK+-1.4:
3 * The gdk_time* functions have been removed. This functionality
4 has been unused since the main loop was moved into GLib
7 * The signature for GtkPrintFunc (used for gtk_item_factory_dump_items)
8 has been changed to take a 'const gchar *' instead of 'gchar *', to
9 match what we do for glib, and other similar cases.
11 * The detail arguments in the GtkStyleClass structure are now 'const gchar *'.
13 * gtk_paned_set_gutter_size() has been removed, since the small handle tab
14 has been changed to include the entire area previously occupied by
17 * GDK no longer selects OwnerGrabButtonMask for button presses. This means
18 that the automatic grab that occurs when the user presses a button
19 will have owner_events = FALSE, so all events are redirected to the
20 grab window, even events that would normally go to other windows of the
23 * GtkColorSelectionDialog has now been moved into it's own set of files,
24 gtkcolorseldialog.c and gtkcolorseldialog.h.
26 * gtk_widget_shape_combine_mask() now keeps a reference count on the
27 mask pixmap that is passed in.
29 * Type system changes:
30 - GTK_TYPE_OBJECT is not a fundamental type anymore. Type checks of the
31 style (GTK_FUNDAMENTAL_TYPE (some_type) == GTK_TYPE_OBJECT)
32 will not work anymore. As a replacement, (GTK_TYPE_IS_OBJECT (some_type))
34 - The following types vanished: GTK_TYPE_ARGS, GTK_TYPE_CALLBACK,
35 GTK_TYPE_C_CALLBACK, GTK_TYPE_FOREIGN. The corresponding GtkArg
36 fields and field access macros are also gone.
37 - The following type aliases vanished: GTK_TYPE_FLAT_FIRST,
38 GTK_TYPE_FLAT_LAST, GTK_TYPE_STRUCTURED_FIRST, GTK_TYPE_STRUCTURED_LAST.
39 - The type macros GTK_TYPE_MAKE() and GTK_TYPE_SEQNO() vanished, use of
40 GTK_FUNDAMENTAL_TYPE() is discouraged. Instead, the corresponding GType
41 API should be used: G_TYPE_FUNDAMENTAL(), G_TYPE_DERIVE_ID(),
42 G_TYPE_BRANCH_SEQNO(). Note that the GLib type system doesn't build new
43 type ids based on a global incremental sequential number anymore, but
44 numbers new type ids sequentially per fundamental type branch.
45 - The following type functions vanished/were replaced:
46 Old Function Replacement
47 gtk_type_query() - being investigated -
48 gtk_type_set_varargs_type() -
49 gtk_type_get_varargs_type() -
50 gtk_type_check_object_cast() g_type_check_instance_cast()
51 gtk_type_check_class_cast() g_type_check_class_cast()
52 gtk_type_describe_tree() -
53 gtk_type_describe_heritage() -
55 gtk_type_children_types() g_type_children()
56 gtk_type_set_chunk_alloc() GTypeInfo.n_preallocs
57 gtk_type_register_enum() g_enum_register_static()
58 gtk_type_register_flags() g_flags_register_static()
59 gtk_type_parent_class() g_type_parent() / g_type_class_peek_parent()
60 Use of g_type_class_ref() / g_type_class_unref() and g_type_class_peek()
61 is recommended over usage of gtk_type_class().
62 Use of g_type_register_static() / g_type_register_dynamic() is recommended
63 over usage of gtk_type_unique().
65 * Object system changes:
66 GtkObject derives from GObject, so is not the basic object type anymore.
67 This imposes the following source incompatible changes:
68 - GtkObject has no klass field anymore, an object's class can be retrived
69 with the object's coresponding GTK_<OBJECT>_GET_CLASS (object) macro.
70 - GtkObjectClass has no type field anymore, a class's type can be retrived
71 with the GTK_CLASS_TYPE (class) macro.
72 - GtkObjectClass does not introduce the finalize() and shutdown() methods
73 anymore. While shutdown() is intended for GTK+ internal use only, finalize()
74 is required by a variety of object implementations. GObjectClass.finalize
75 should be overriden here, e.g.:
76 static void gtk_label_finalize (GObject *gobject)
78 GtkLabel *label = GTK_LABEL (gobject);
80 G_OBJECT_CLASS (parent_class)->finalize (object);
82 static void gtk_label_class_init (GtkLabelClass *class)
84 GObjectClass *gobject_class = G_OBJECT_CLASS (class);
86 gobject_class->finalize = gtk_label_finalize;
89 - the GtkObject::destroy signal can now be emitted multiple times on an object.
90 ::destroy implementations should check that make sure that they take this
91 into account, by checking to make sure that resources are there before
92 freeing them. For example:
95 g_free (object->foo_data);
96 object->foo_data = NULL;
99 Also, ::destroy implementations have to release object references that
100 the object holds. Code in finalize implementations such as:
101 if (object->adjustment)
103 gtk_object_unref (object->adjustment);
104 object->adjustment = NULL;
106 have to be moved into the ::destroy implementations. The reason for doing
107 this is that all object reference cycles should be broken at destruction
110 - Inserting and deleting text in GtkEntry though functions such
111 as gtk_entry_insert_text() now leave the cursor at its original
112 position in the text instead of moving it to the location of
113 the insertion/deletion.
115 - The ->label field of GtkFrame widgets has been removed. (As part of
116 a change to allow the arbitrary widgets in the title position.) The
117 text can now be retrieved with the new function gtk_frame_get_text().
119 - The 'font' and 'font_set' declarations in RC files are now ignored. There
120 is a new 'font_name' field that holds the string form of a Pango font
122 - A number of types in GDK have become subclasses of GObject. For the
123 most part, this should not break anyone's code. However, it's now
124 possible/encouraged to use g_object_ref()/g_object_unref() and other
125 GObject features with these GDK types. The converted types are:
126 GdkWindow, GdkDrawable, GdkPixmap, GdkImage, GdkGC, GdkDragContext,
129 - All drawables including pixmaps used to have a type tag, the
130 GdkWindowType enumeration, which included GDK_WINDOW_PIXMAP.
131 GdkWindowType is now a property of GdkWindow _only_, and there is
132 no GDK_WINDOW_PIXMAP. You can use the GDK_IS_PIXMAP() macro to see
133 if you have a pixmap, if you need to know that.
135 - GtkStyle and GtkRcStyle are now subclasses of GObject as well.
136 This breaks theme engines quite badly, but shouldn't affect most
139 - xthickness/ythickness have moved from GtkStyleClass to GtkStyle
140 (from class to instance). This gives themes a bit more flexibility
141 and is generally more of the Right Thing. You can trivially fix
142 your code with s/style->klass->xthickness/style->xthickness/g and
145 - If you were using private GDK types, they have been rearranged
146 significantly. You shouldn't use private types. ;-)