]> Pileus Git - ~andy/gtk/blob - docs/Changes-1.4.txt
documented necessary changes for 1.4 transition.
[~andy/gtk] / docs / Changes-1.4.txt
1 Incompatible Changes from GTK+-1.2 to GTK+-1.4:
2
3 * The gdk_time* functions have been removed. This functionality
4   has been unused since the main loop was moved into GLib
5   prior to 1.2. 
6
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.
10
11 * The detail arguments in the GtkStyleClass structure are now 'const gchar *'.
12
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
15   the gutter.
16
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
21   window's owner.
22
23 * GtkColorSelectionDialog has now been moved into it's own set of files,
24   gtkcolorseldialog.c and gtkcolorseldialog.h.
25
26 * Type system changes:
27   - GTK_TYPE_OBJECT is not a fundamental type anymore. Type checks of the
28     style (GTK_FUNDAMENTAL_TYPE (some_type) == GTK_TYPE_OBJECT)
29     will not work anymore. As a replacement, (GTK_TYPE_IS_OBJECT (some_type))
30     can be used now.
31   - The following types vanished: GTK_TYPE_ARGS, GTK_TYPE_CALLBACK,
32     GTK_TYPE_C_CALLBACK, GTK_TYPE_FOREIGN. With them, the corresponding GtkARg
33     fields and field access macros vanished as well.
34   - The following type aliases vanished: GTK_TYPE_FLAT_FIRST,
35     GTK_TYPE_FLAT_LAST, GTK_TYPE_STRUCTURED_FIRST, GTK_TYPE_STRUCTURED_LAST.
36   - The type macros GTK_TYPE_MAKE() and GTK_TYPE_SEQNO() vanished, use of
37     GTK_FUNDAMENTAL_TYPE() is discouraged. Instead, the corresponding GType
38     API should be used: G_TYPE_FUNDAMENTAL(), G_TYPE_DERIVE_ID(),
39     G_TYPE_BRANCH_SEQNO(). Note that the GLib type system doesn't build new
40     type ids based on a global incremental sequential number anymore, but
41     numbers new type ids sequentially per fundamental type branch.
42   - The following type functions vanished/were replaced:
43     Old Function                 Replacement
44     gtk_type_query()             - being investigated -
45     gtk_type_set_varargs_type()  -
46     gtk_type_get_varargs_type()  -
47     gtk_type_check_object_cast() g_type_check_instance_cast()
48     gtk_type_check_class_cast()  g_type_check_class_cast()
49     gtk_type_describe_tree()     -
50     gtk_type_describe_heritage() -
51     gtk_type_free()              -
52     gtk_type_children_types()    g_type_children()
53     gtk_type_set_chunk_alloc()   GTypeInfo.n_preallocs
54     gtk_type_register_enum()     g_enum_register_static()
55     gtk_type_register_flags()    g_flags_register_static()
56     gtk_type_parent_class()      g_type_parent() / g_type_class_peek_parent()
57     Use of g_type_class_ref() / g_type_class_unref() and g_type_class_peek()
58     is recommended over usage of gtk_type_class().
59     Use of g_type_register_static() / g_type_register_dynamic() is recommended
60     over usage of gtk_type_unique().
61
62 * Object system changes:
63   GtkObject derives from GObject, it is not the basic object type anymore.
64   This imposes the following source incompatible changes:
65   - GtkObject has no klass field anymore, an object's class can be retrived
66     with the object's coresponding GTK_<OBJECT>_GET_CLASS (object) macro.
67   - GtkObjectClass has no type field anymore, a class's type can be retrived
68     with the GTK_CLASS_TYPE (class) macro.
69   - GtkObjectClass does not introduce the finalize() or shutdown() method
70     anymore. While shutdown() is intended for Gtk internal use only, finalize()
71     is required by a variety of object implementations. GObjectClass.finalize
72     should be overriden here, e.g.:
73     static void gtk_label_finalize (GObject *gobject)
74     {
75       GtkLabel *label = GTK_LABEL (gobject);
76       
77       G_OBJECT_CLASS (parent_class)->finalize (object);
78     }
79     static void gtk_label_class_init (GtkLabelClass *class)
80     {
81       GObjectClass *gobject_class = G_OBJECT_CLASS (class);
82       
83       gobject_class->finalize = gtk_label_finalize;
84     }
85   - the GtkObject::destroy signal can be emitted multiple times on an object
86     now. ::destroy implementations have to take this into account by
87     conditionalising freeing/release of assorted resources, e.g.:
88     if (object->foo_data)
89       {
90         g_free (object->foo_data);
91         object->foo_data = NULL;
92       }
93     Also, ::destroy implementations have to release peding object references,
94     that is, code portions commonly found in finalize implementations like:
95     if (object->adjustment)
96       {
97         gtk_object_unref (object->adjustment);
98         object->adjustment = NULL;
99       }
100     have to be moved into the ::destroy implementations.
101     This is required to break object reference cycles at destruction time.