diff --git a/ChangeLog b/ChangeLog index 9f8b3a2224..316d83ae42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-01-04 Matthias Clasen + + * gtk/gtkobject.c (gtk_object_dispose): Fix a comment. + + * gtk/gtkwidget.c (gtk_widget_set_sensitive): tiny docs change + 2002-01-04 Havoc Pennington * gtk/gtkwidget.c (gtk_widget_set_sensitive): tiny docs change diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 9f8b3a2224..316d83ae42 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +2001-01-04 Matthias Clasen + + * gtk/gtkobject.c (gtk_object_dispose): Fix a comment. + + * gtk/gtkwidget.c (gtk_widget_set_sensitive): tiny docs change + 2002-01-04 Havoc Pennington * gtk/gtkwidget.c (gtk_widget_set_sensitive): tiny docs change diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9f8b3a2224..316d83ae42 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2001-01-04 Matthias Clasen + + * gtk/gtkobject.c (gtk_object_dispose): Fix a comment. + + * gtk/gtkwidget.c (gtk_widget_set_sensitive): tiny docs change + 2002-01-04 Havoc Pennington * gtk/gtkwidget.c (gtk_widget_set_sensitive): tiny docs change diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 9f8b3a2224..316d83ae42 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +2001-01-04 Matthias Clasen + + * gtk/gtkobject.c (gtk_object_dispose): Fix a comment. + + * gtk/gtkwidget.c (gtk_widget_set_sensitive): tiny docs change + 2002-01-04 Havoc Pennington * gtk/gtkwidget.c (gtk_widget_set_sensitive): tiny docs change diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 9f8b3a2224..316d83ae42 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2001-01-04 Matthias Clasen + + * gtk/gtkobject.c (gtk_object_dispose): Fix a comment. + + * gtk/gtkwidget.c (gtk_widget_set_sensitive): tiny docs change + 2002-01-04 Havoc Pennington * gtk/gtkwidget.c (gtk_widget_set_sensitive): tiny docs change diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 9f8b3a2224..316d83ae42 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2001-01-04 Matthias Clasen + + * gtk/gtkobject.c (gtk_object_dispose): Fix a comment. + + * gtk/gtkwidget.c (gtk_widget_set_sensitive): tiny docs change + 2002-01-04 Havoc Pennington * gtk/gtkwidget.c (gtk_widget_set_sensitive): tiny docs change diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 9f8b3a2224..316d83ae42 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2001-01-04 Matthias Clasen + + * gtk/gtkobject.c (gtk_object_dispose): Fix a comment. + + * gtk/gtkwidget.c (gtk_widget_set_sensitive): tiny docs change + 2002-01-04 Havoc Pennington * gtk/gtkwidget.c (gtk_widget_set_sensitive): tiny docs change diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 511d9ffa17..d8463a8e30 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,11 @@ +2002-01-04 Matthias Clasen + + * gtk/changes-1.2.sgml, gtk/changes-2.0.sgml: SGML fixes. + + * gtk/tmpl/gtkobject.sgml: Document GTK_IN_DESTRUCTION. + + * gtk/tmpl/gtkwidget.sgml: Additions. + 2002-01-04 Havoc Pennington * gtk/question_index.sgml: add question to help people find diff --git a/docs/reference/gtk/changes-1.2.sgml b/docs/reference/gtk/changes-1.2.sgml index f54a1dabec..1f013ba53f 100644 --- a/docs/reference/gtk/changes-1.2.sgml +++ b/docs/reference/gtk/changes-1.2.sgml @@ -36,7 +36,7 @@ provided to ease the migration phase. -The GtkTypeInfo structures used in the +The GtkTypeInfo structures used in the gtk_*_type_init() functions have changed a bit, the old format: @@ -89,6 +89,7 @@ A number of GTK+ functions were renamed. For compatibility, Here is the list of the old names and replacements: + OldReplacement @@ -106,6 +107,7 @@ A number of GTK+ functions were renamed. For compatibility, gtk_toggle_button_set_stategtk_toggle_button_set_active gtk_window_positiongtk_window_set_position + Note that gtk_style_apply_default_background() has an additional argument, set_bg. This parameter should be @@ -120,6 +122,7 @@ During the development phase of the 1.1.x line of GTK+ certain functions were deprecated and later removed. Functions affected are: + RemovedReplacement @@ -140,6 +143,7 @@ During the development phase of the 1.1.x line of GTK+ certain functions gtk_widget_thaw_acceleratorsgtk_widget_unlock_accelerators gtk_widget_freeze_acceleratorsgtk_widget_lock_accelerators + Note that gtk_entry_adjust_scroll() is no longer needed @@ -226,19 +230,25 @@ Support for Themes has been added. In general, this does not affect application code, however, a few new rules should be observed: - - - To set a shape for a window, you must use + + + To set a shape for a window, you must use gtk_widget_shape_combine_mask() instead of gdk_window_shape_combine_mask(), or the shape will be reset when switching themes. + + - - It is no longer permissable to draw directly on an arbitrary + + It is no longer permissable to draw directly on an arbitrary widget, or to set an arbitrary widget's background pixmap. If you need to do that, use a GtkDrawingArea or (for a toplevel) a GtkWindow where gtk_widget_set_app_paintable() has been called. - + + + @@ -384,14 +394,10 @@ The thread safety in GTK+ 1.2 is slightly different than - Link with the libraries returned by: - + Link with the libraries returned by gtk-config --libs gthread - - and use the cflags from: - - gtk-config --cflags gthread - + and use the cflags from + gtk-config --cflags gthread. You can get these CFLAGS and LIBS by passing gthread as the fourth parameter to the AM_PATH_GTK automake diff --git a/docs/reference/gtk/changes-2.0.sgml b/docs/reference/gtk/changes-2.0.sgml index 27af0d19cd..6e5750e930 100644 --- a/docs/reference/gtk/changes-2.0.sgml +++ b/docs/reference/gtk/changes-2.0.sgml @@ -164,6 +164,7 @@ The type macros GTK_TYPE_MAKE() and GTK_TYPE_SEQN The following type functions vanished/were replaced: + Old FunctionReplacement @@ -182,6 +183,7 @@ The following type functions vanished/were replaced: gtk_type_register_flags()g_flags_register_static() gtk_type_parent_class()g_type_parent()/g_type_class_peek_parent() + Use of g_type_class_ref()/g_type_class_unref() and g_type_class_peek() is recommended over usage of gtk_type_class(). @@ -381,7 +383,7 @@ All drawables including pixmaps used to have a type tag, the (from class to instance). This gives themes a bit more flexibility and is generally more of the Right Thing. You can trivially fix your code with s/style->klass->xthickness/style->xthickness/g and - same for ythickness. + same for ythickness. @@ -422,6 +424,7 @@ A number of functions in GDK have been renamed for consistency and included, but can be disabled by defining GDK_DISABLE_DEPRECATED. + Old functionDefined As @@ -445,6 +448,7 @@ A number of functions in GDK have been renamed for consistency and gdk_window_copy_area(drawable,gc,x,y,source_drawable,source_x,source_y,width,height)gdk_draw_pixmap(drawable,gc,source_drawable,source_x,source_y,x,y,width,height) gdk_rgb_get_cmapgdk_rgb_get_colormap + (Note that g_object_ref() and g_object_unref() may be used for all of the above ref @@ -744,6 +748,7 @@ The set_child_arg() and get_child_arg()GtkContainer functions with the replacements: + Old functionReplacement @@ -755,6 +760,7 @@ Other removed GtkContainer functions with the replaceme gtk_container_add_with_argsgtk_container_add_with_properties gtk_container_addvgtk_container_add/gtk_container_child_set_property + @@ -902,20 +908,26 @@ The following variables are no longer exported from GDK. (Other variables are also no longer exported; the following are the ones found used externally in a large sample of GTK+ code.) - - Variable Replacement - ======== =========== - gdk_null_window_warnings None - did nothing in GTK+ 1.2. - gdk_leader_window None - private variable - gdk_screen gdk_x11_get_default_screen () - gdk_root_window gdk_x11_get_default_root_xwindow () - gdk_root_parent gdk_get_default_root_window () - gdk_error_code/gdk_error_warnings gdk_error_trap_push()/pop() - gdk_display_name gdk_get_display () - gdk_wm_delete_window gdk_atom_intern ("WM_DELETE_WINDOW", FALSE) - gdk_wm_take_focus gdk_atom_intern ("WM_TAKE_FOCUS", FALSE) - gdk_wm_protocols gdk_atom_intern ("WM_PROTOCOLS", FALSE) - + + + +VariableReplacement + + +gdk_null_window_warningsNone - did nothing in GTK+ 1.2 +gdk_leader_windowNone - private variable +gdk_screengdk_x11_get_default_screen () +gdk_root_windowgdk_x11_get_default_root_xwindow () +gdk_root_parentgdk_get_default_root_window () +gdk_error_codegdk_error_trap_push ()/pop ()/entry> +gdk_error_warningsgdk_error_trap_push ()/pop () +gdk_display_namegdk_get_display () +gdk_wm_delete_windowgdk_atom_intern ("WM_DELETE_WINDOW", FALSE) +gdk_wm_take_focusgdk_atom_intern ("WM_TAKE_FOCUS", FALSE) +gdk_wm_protocolsgdk_atom_intern ("WM_PROTOCOLS", FALSE) + + + @@ -1042,8 +1054,8 @@ If you are embedding one of these widgets in a custom widget, -GtkLayout no longer has the xoffset, - yoffset fields, which used to store the difference between +GtkLayout no longer has the xoffset, + yoffset fields, which used to store the difference between world and window coordinates for layout->bin_window. These coordinate systems are now always the same. diff --git a/docs/reference/gtk/tmpl/gtkobject.sgml b/docs/reference/gtk/tmpl/gtkobject.sgml index 3b975bc0f8..0cc15ca13d 100644 --- a/docs/reference/gtk/tmpl/gtkobject.sgml +++ b/docs/reference/gtk/tmpl/gtkobject.sgml @@ -119,13 +119,12 @@ Gets the name of an objects type. Tells about the state of the object. -@GTK_IN_DESTRUCTION: -@GTK_FLOATING: whether the object is orphaned. Objects that take -strong hold of an object may gtk_object_sink() it, after obtaining -there own references, if they believe they are nearly primary -ownership of the object. -GTK_CONNECTED: refers to whether are signals are connected to this -object. +@GTK_IN_DESTRUCTION: the object is currently being destroyed. This is used + internally by GTK+ to prevent reinvokations during destruction. +@GTK_FLOATING: the object is orphaned. Objects that take strong hold of an + object may gtk_object_sink() it, after obtaining their own references, if + they believe they are nearly primary ownership of the object. +GTK_CONNECTED: signals are connected to this object. @GTK_RESERVED_1: reserved for future use @GTK_RESERVED_2: reserved for future use diff --git a/docs/reference/gtk/tmpl/gtkwidget.sgml b/docs/reference/gtk/tmpl/gtkwidget.sgml index 1a9670b1d0..92cac33bb3 100644 --- a/docs/reference/gtk/tmpl/gtkwidget.sgml +++ b/docs/reference/gtk/tmpl/gtkwidget.sgml @@ -22,27 +22,69 @@ GtkWidget - +Tells about certain properties of the widget. @GTK_TOPLEVEL: + widgets without a real parent, as there are #GtkWindows and + #GtkMenus have this flag set throughout their lifetime. + Toplevel widgets always contain their own #GdkWindow. @GTK_NO_WINDOW: + Indicative for a widget that does not provide its own #GdkWindow. + Visible action (e.g. drawing) is performed on the parent's #GdkWindow. @GTK_REALIZED: + Set by gtk_widget_realize(), unset by gtk_widget_unrealize(). + A realized widget has an associated #GdkWindow. @GTK_MAPPED: + Set by gtk_widget_map(), unset by gtk_widget_unmap(). + Only realized widgets can be mapped. It means that gdk_window_show() + has been called on the widgets window(s). @GTK_VISIBLE: + Set by gtk_widget_show(), unset by gtk_widget_hide(). Implies that a + widget will be mapped as soon as its parent is mapped. @GTK_SENSITIVE: + Set and unset by gtk_widget_set_sensitive(). + The sensitivity of a widget determines whether it will receive + certain events (e.g. button or key presses). One premise for + the widgets sensitivity is to have this flag set. @GTK_PARENT_SENSITIVE: + Set and unset by gtk_widget_set_sensitive() operations on the + parents of the widget. + This is the second premise for the widgets sensitivity. Once + it has %GTK_SENSITIVE and %GTK_PARENT_SENSITIVE set, its state is + effectively sensitive. This is expressed (and can be examined) by + the #GTK_WIDGET_IS_SENSITIVE macro. @GTK_CAN_FOCUS: + Determines whether a widget is able to handle focus grabs. @GTK_HAS_FOCUS: + Set by gtk_widget_grab_focus() for widgets that also + have %GTK_CAN_FOCUS set. The flag will be unset once another widget + grabs the focus. @GTK_CAN_DEFAULT: + The widget is allowed to receive the default action via + gtk_widget_grab_default(). @GTK_HAS_DEFAULT: + The widget currently is receiving the default action. @GTK_HAS_GRAB: + Set by gtk_grab_add(), unset by gtk_grab_remove(). It means that the + widget is in the grab_widgets stack, and will be the preferred one for + receiving events other than ones of cosmetic value. @GTK_RC_STYLE: + Indicates that the widgets style has been looked up through the rc + mechanism. It does not imply that the widget actually had a style + defined through the rc mechanism. @GTK_COMPOSITE_CHILD: + Indicates that the widget is a composite child of its parent; see + gtk_widget_push_composite_child(), gtk_widget_pop_composite_child(). @GTK_NO_REPARENT: @GTK_APP_PAINTABLE: + Set and unset by gtk_widget_set_app_paintable(). @GTK_RECEIVES_DEFAULT: + The widget when focused will receive the default action and have + %GTK_HAS_DEFAULT set even if there is a different widget set as default. @GTK_DOUBLE_BUFFERED: + Set and unset by gtk_widget_set_double_buffered(). + Indicates that exposes done on the widget should be double-buffered. @@ -54,175 +96,185 @@ GtkWidget - +Returns the current state of the widget, as a #GtkStateType. -@wid: +@wid: a #GtkWidget. - +Returns the saved state of the widget, as a #GtkStateType. + + +The saved state will be restored when a widget gets sensitive +again, after it has been made insensitive with gtk_widget_set_state() +or gtk_widget_set_sensitive(). -@wid: +@wid: a #GtkWidget. - +Returns the widget flags from @wid. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the widget is a toplevel widget. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the widget doesn't have an own #GdkWindow. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the widget is realized. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the widget is mapped. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the widget is visible. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the widget is mapped and visible. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the #GTK_SENSITIVE flag has be set on the widget. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the #GTK_PARENT_SENSITIVE flag has be set on the widget. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the widget is effectively sensitive. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the widget is able to handle focus grabs. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the widget has grabbed the focus and no other +widget has done so more recently. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the widget is allowed to receive the default action +via gtk_widget_grab_default(). -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the widget when focused will receive the default action +even if there is a different widget set as default. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the widget currently is receiving the default action. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the widget is in the grab_widgets stack, and will be +the preferred one for receiving events other than ones of cosmetic value. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the widgets style has been looked up through the rc +mechanism. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the widget is a composite child of its parent. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the #GTK_APP_PAINTABLE flag has been set on the widget. -@wid: +@wid: a #GtkWidget. - +Evaluates to %TRUE if the #GTK_DOUBLE_BUFFERED flag has been set on the widget. @wid: @@ -230,20 +282,20 @@ GtkWidget - +Turns on certain widget flags. -@wid: -@flag: +@wid: a #GtkWidget. +@flag: the flags to set. - +Turns off certain widget flags. -@wid: -@flag: +@wid: a #GtkWidget. +@flag: the flags to unset. diff --git a/gtk/gtkobject.c b/gtk/gtkobject.c index 70e1eda4a7..e20680a4d0 100644 --- a/gtk/gtkobject.c +++ b/gtk/gtkobject.c @@ -364,7 +364,7 @@ gtk_object_dispose (GObject *gobject) GtkObject *object = GTK_OBJECT (gobject); /* guard against reinvocations during - * destruction with the GTK_DESTROYED flag. + * destruction with the GTK_IN_DESTRUCTION flag. */ if (!(GTK_OBJECT_FLAGS (object) & GTK_IN_DESTRUCTION)) { diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index b4982c9964..49e1205a84 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -3642,7 +3642,7 @@ gtk_widget_set_redraw_on_allocate (GtkWidget *widget, /** * gtk_widget_set_sensitive: - * @widget: a @widget + * @widget: a #GtkWidget * @sensitive: %TRUE to make the widget sensitive * * Sets the sensitivity of a widget. A widget is sensitive if the user