gtk2/gtk/gtkwidget.h

645 lines
24 KiB
C
Raw Normal View History

1997-11-24 22:37:52 +00:00
/* GTK - The GIMP Toolkit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1997-11-24 22:37:52 +00:00
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
1997-11-24 22:37:52 +00:00
*/
/*
* Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
1997-11-24 22:37:52 +00:00
#ifndef __GTK_WIDGET_H__
#define __GTK_WIDGET_H__
#include <gdk/gdk.h>
fixed an assertment. Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org> * gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment. * gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from, this should eventually be done by gentypeinfo.el somewhen. * gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays. * gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the enum values of an enum type. * gtk/gtk.defs: * gtk/gtkcurve.h: * gtk/gtkobject.h: * gtk/gtkprivate.h: * gtk/gtkwidget.h: * gtk/gtkenums.h: brought enum/flags definitions in sync, added a few more enum definitions for bindings and pattern matching. * some more macro and GtkType fixups in various places. * gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used as a key-release modifier for the binding system. Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it was a stale list pointer that is already present in GtkMenuShell. * gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal GtkMenuShell::selection_done which is emitted after the menu shell poped down again and all possible menu items have been activated. Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue before activation of the menuitem, so the menu is actually taken off the screen prior to any menu item activation. * gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation for NULL nodes. * gtk/gtkwidget.h: * gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop the emission of the "add-accelerator" signal on a widget. this is usefull to prevent accelerator installation on certain widgets. * gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu labels left justified, by setting their alignment. stop accelerator installation for the menu items, since we use dynamic menus. Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenufactory.c: adaptions to use the new accel groups. people should *really* use GtkItemFactory. this is only for preserving source compatibility where possible, use of GtkMenuFactory is deprecated as of now. * gtk/gtkobject.h (gtk_object_class_add_user_signal): new function to create user signals of type GTK_RUN_NO_RECURSE. don't know why i missed this possibility when i added gtk_object_class_add_user_signal in late january. * gtk/gtkmain.c (gtk_init): ignore subsequent function calls. Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org> * gtk/gtkaccelgroup.h: * gtk/gtkaccelgroup.c: new implementation of the accelerator concept. * gtk/gtkaccellabel.h: * gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features display of the accelerators associated with a certain widget. * gtk/gtkitemfactory.h: * gtk/gtkitemfactory.c: new widget, item factory with automatic rc parsing and accelerator handling. * gtk/gtkmenu.c (gtk_menu_reposition): new function to care for positioning a menu. (gtk_menu_map): removed the allocation code. (gtk_menu_size_allocate): care for redrawing of children and resize our widget->window correctly. (gtk_menu_key_press): feature the new accelerator groups. * gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the submenu if neccessary. * gtk/gtkmenuitem.c: * gtk/gtkcheckmenuitem.c: * gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label() function variants. * gdk/gdk.c: (gdk_keyval_from_name): (gdk_keyval_name): new functions for keyval<->key-name associations. (gdk_keyval_to_upper): (gdk_keyval_to_lower): (gdk_keyval_is_upper): (gdk_keyval_is_lower): new functions to check/translate keyvalues with regards to their cases. Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a widget's class path. (gtk_widget_path): new function to calculate a widget's name path. * gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
#include <gtk/gtkaccelgroup.h>
1997-11-24 22:37:52 +00:00
#include <gtk/gtkobject.h>
added args ::show_text, ::text_xalign, ::text_yalign, ::activity_mode. Sun Nov 22 16:21:28 1998 Tim Janik <timj@gtk.org> * gtk/gtkprogress.c: added args ::show_text, ::text_xalign, ::text_yalign, ::activity_mode. * gtk/gtkprogressbar.c: added construct arg ::adjustment. added args ::bar_style, ::orientation, ::discrete_blocks, ::activity_step, ::activity_blocks. (gtk_progress_bar_new): (gtk_progress_bar_new_with_adjustment): use gtk_widget_new(). (gtk_progress_bar_construct): deprecated. * gtk/gtkvscrollbar.c: (gtk_vscrollbar_draw_step_back): (gtk_vscrollbar_draw_step_forw): use "vscrollbar" as detail for gtk_paint_arrow, to be consistent with hscrollbar. * gtk/gtktext.c added construct args ::hadjustment, ::vadjustment. added args ::line_wrap, ::word_wrap. (gtk_text_class_init): added scroll_adjustments signal. (gtk_text_new): use gtk_widget_new. (gtk_text_disconnect): remove adjustement with gtk_text_set_adjustments, so we don't screw the reference counts and don't leave signals connected. (gtk_text_destroy): disconnect adjustments signals. (gtk_text_finalize): unref adjustments. * gtk/gtkctree.c: added construct args ::n_columns and ::tree_column. added args ::indent, ::spacing, ::show_stub, ::reorderable, ::use_drag_icons, ::line_style and ::expander_style. (gtk_ctree_set_show_stub): renamed from gtk_ctree_show_stub, which is deprecated now. * gtk/gtkclist.h: remove GTK_CLIST_CONSTRUCT flag. * gtk/gtkclist.c: removed ::vadjustment and ::hadjustment args, introduced ::scroll_adjustments signal. added ::shadow_type, ::selection_mode and ::row_height args. added n_columns construct arg. (gtk_clist_construct): call gtk_object_constructed(). (gtk_clist_set_row_height): if height is passed as 0, revert to automatic height calculation. (gtk_clist_destroy): before unrefing the adjustments, disconnect our signal handlers. Fri Nov 21 22:34:58 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_new): call gtk_object_default_construct like gtk_object_new. (gtk_widget_destroy): assert that we only destroy constructed widgets. * gtk/gtkobject.h (enum GtkArgFlags): new flag GTK_ARG_CONSTRUCT_ONLY to identify args that may only be used for construction. GTK_ARG_CONSTRUCT maybe used as normal arguments besides construction time. * gtk/gtkobject.c (gtk_object_new): invoke gtk_object_default_construct at the end if the object is not fully constructed. (gtk_object_newv): likewise. (gtk_object_destroy): assert that we only destroy constructed objects. (gtk_object_init): setup GTK_CONSTRUCTED from the objects real klass. (gtk_object_default_construct): new function to complete default construction of an object by applying missing construtor args with default values of 0, 0.0 or NULL. (gtk_object_constructed): new function to mark an object as being constructed (used from within constructors). * gtk/gtkarg.c (gtk_arg_type_new_static): return the args info pointer so it is immediatedly available for the caller. * gtk/gtktypeutils.c (gtk_type_new): pass an object's real class to the object initilizer (GtkObjectInitFunc takes a second arg now, the real klass), and asure that object initializers may temporarily alter the class pointer. Fri Nov 20 08:00:30 1998 Tim Janik <timj@gtk.org> * gtk/testgtk.c: change all occourances of gtk_container_add ( scrolled_window, widget) to gtk_scrolled_window_add_with_viewport (...) for widget!=(clist, ctree, text, viewport). * gtk/gtkcombo.c: (gtk_combo_init): use gtk_scrolled_window_add_with_viewport() to add children to the scrolled window. * gtk/gtkscrolledwindow.h: * gtk/gtkscrolledwindow.c: changed scrolled_window->viewport to scrolled_window->child, and use gtk_widget_scroll_adjustements() to set the scroll adjustments for the widget, we do not create an additional viewport anymore. added ::hadjustment and ::vadjustment constructor args. (gtk_scrolled_window_new): use gtk_widget_new() to create the widget. (gtk_scrolled_window_set_hadjustment): (gtk_scrolled_window_set_vadjustment): new functions that superceed gtk_scrolled_window_construct. (gtk_scrolled_window_construct): deprecated this function. * gtk/gtkhscrollbar.c: * gtk/gtkvscrollbar.c: * gtk/gtkhscale.c: * gtk/gtkvscale.c: support a constructor arg "::adjustment", and use gtk_widget_new() for the widget creation. * gtk/gtkrange.c: added ::update_policy arg. (gtk_range_set_adjustment): if adjustment is passed in as NULL, create a default adjustment so this function can be used for derived widgets that depend on the adjustment's existance. (gtk_range_destroy): disconnect the adjustment signal, so we don't get called after we got destroyed, we don't destroy the adjustment in here, because it might have been provided from another widget. * gtk/gtkviewport.c: introduced ::scroll_adjustments signal. (gtk_viewport_destroy): same as gtk_range_destroy. * gtk/gtkprogress.c (gtk_progress_destroy): same as gtk_range_destroy. * gtk/gtkwidget.h: * gtk/gtkwidget.c: changed gtk_widget_activate() to return a gboolean, indicating whether this widget supports activation. added gtk_widget_scroll_adjustements() to set the scrolling adjustments of a widget. Wed Nov 19 01:22:42 1998 Tim Janik <timj@gtk.org> * gtk/gtkoptionmenu.c: (gtk_option_menu_remove_contents): (gtk_option_menu_update_contents): removed gtk_container_[un]block_resize() pairs. * gtk/gtknotebook.h: * gtk/gtknotebook.c: removed the tab_border field, since it shouldn't be used outside of gtknotebook.c anyways. made ARG_TAB_BORDER a wrtie-only argument. * *.c: made deprecated functions issue a message: gtk_clist_set_border, gtk_container_block_resize, gtk_container_unblock_resize, gtk_container_need_resize, gtk_object_class_add_user_signal, gtk_spin_button_construct, gtk_scrolled_window_construct. removed non-functional functions: gtk_container_disable_resize, gtk_container_enable_resize, gtk_clist_set_policy. Wed Nov 18 22:54:36 1998 Tim Janik <timj@gtk.org> * gtk/gtkbox.c (gtk_box_init): * gtk/gtkdrawingarea.c (gtk_drawing_area_init): * gtk/gtkeventbox.c (gtk_event_box_init): * gtk/gtkfixed.c (gtk_fixed_init): * gtk/gtkframe.c (gtk_frame_init): * gtk/gtkhandlebox.c (gtk_handle_box_init): * gtk/gtkpacker.c (gtk_packer_init): * gtk/gtkmisc.c (gtk_misc_init): * gtk/gtkpreview.c (gtk_preview_init): * gtk/gtkprogress.c (gtk_progress_init): * gtk/gtkprogressbar.c (gtk_progress_bar_init): * gtk/gtkseparator.c (gtk_separator_init): * gtk/gtktable.c (gtk_table_init): * gtk/gtkviewport.c (gtk_viewport_init): * gtk/gtkalignment.c (gtk_alignment_init): removed setting of the GTK_BASIC flag. * gtk/gtkwidget.h: * gtk/gtkwidget.c: removed GTK_BASIC, GTK_WIDGET_BASIC and gtk_widget_basic. * miscellaneous GtkType and macro fixups.
1998-11-23 01:54:45 +00:00
#include <gtk/gtkadjustment.h>
1997-11-24 22:37:52 +00:00
#include <gtk/gtkstyle.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
reimplemented the signal storage system to use a linear array rather than Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org> * gtk/gtksignal.c: reimplemented the signal storage system to use a linear array rather than a hash table. be carefull *not* to keep any GtkSignal pointers across invokations of gtk_signal_next_and_invalidate() and therefore gtk_signal_new[v](). general code cleanups, made all allocations through memchunks. (gtk_signal_lookup): we now do the lookup of signals through a key_id for the signal names to avoid multiple hashing of the signal name on lookups for the several hirarchy levels of an object. Tue May 5 15:33:27 1998 Tim Janik <timj@gtk.org> * gtk/gtkmain.c (gtk_init): added gtk_signal_init() to avoid repeatedly checking for signal initialization in gtksignal.c. * gtk/gtktypeutils.c (TYPE_NODES_BLOCK_SIZE): reseted this to 200 after a long debugging period ;) Mon May 4 00:30:11 1998 Tim Janik <timj@gtk.org> * gtk/gtktypeutils.h (GTK_TYPE_IS_A): new macro to speedup gtk_type_is_a(). * gtk/gtktypeutils.c: reimplemented the type storage system to use a linear array rather than a hash table. it actually speeded up testgtk for a *considerable* amount. be carefull *not* to keep any GtkTypeNode pointers across invokations of gtk_type_node_next_and_invalidate() and therefore gtk_type_unique()! * gtk/gtkobject.h (GTK_IS_OBJECT_CLASS): new macro to test for the inheritance of a class pointer. (GTK_OBJECT): modifications for speedups. (GTK_IS_OBJECT): likewise. (GTK_OBJECT_CLASS): likewise. (suggested by owen). * gtk/gtkcontainer.h (GTK_IS_CONTAINER_CLASS): new macro. * gtk/gtkwidget.h (GTK_IS_WIDGET_CLASS): new macro. * gtk/gtk.defs (GtkTooltips): define GtkTooltips as object not as boxed, since its derivation changed 4 month ago ;(. showed up with the unique type name checking code in gtk_type_unique(). * random guint->GtkType and macro fixups.
1998-05-06 01:43:56 +00:00
GTK_RESIZE_NEEDED is a private flag now. Mon Feb 2 04:15:08 1998 Tim Janik <timj@gimp.org> * gtk/gtkcontainer.h: * gtk/gtkcontainer.c: GTK_RESIZE_NEEDED is a private flag now. (gtk_container_register_toplevel): new function. (gtk_container_unregister_toplevel): new function. * gtk/gtkmain.c: GTK_LEAVE_PENDING is a private flag now. * gtk/gtkmenu.c: call gtk_container_register_toplevel in gtk_menu_class_init instead of this dirty gtk_widget_set_parent(,NULL) hack. new default handler gtk_menu_destroy for calling gtk_container_unregister_toplevel. removed GTK_ANCHORED, GTK_UNMAPPED. * gtk/gtkobject.h: macro cleanups, added GTK_DESTROYED flag. * gtk/gtkobject.c: only emit DESTROY signal if !GTK_OBJECT_DESTROYED (object). * gtk/gtkprivate.h: new file that will not be automatically included. it holds the private flags for GtkWidget along with it's SET/UNSET and examination macros. * gtk/gtkwidget.c: private flags: GTK_RESIZE_NEEDED, GTK_REDRAW_PENDING, GTK_RESIZE_PENDING, GTK_IN_REPARENT, GTK_USER_STYLE. GTK_ANCHORED is replaced by GTK_TOPLEVEL. added missing UNSET for GTK_IN_REPARENT. removed the gtk_widget_set_parent(, NULL) hack for toplevels. upon destroy free memory for widgets with GTK_WIDGET_HAS_SHAPE_MASK. * gtk/gtkwidget.h: split up the widget flags into a public and a private portion. added an extra field private_flags to GtkWidget without making it bigger by using an alignment gap of 16 bit. macro cleanups. * gtk/gtkwindow.c: removed GTK_ANCHORED. new function gtk_window_destroy for calling gtk_container_unregister_toplevel. removed the gtk_widget_set_parent(,NULL), call gtk_container_register_toplevel instead. remove GTK_UNMAPPED. GTK_RESIZE_NEEDED is private now. * gtk/gtksignal.c (gtk_signal_disconnect): removed a bug on removal that cut off the handler list -> living_objects == 0 with testgtk. made some warnings more descriptive. new function gtk_signal_connect_object_while_alive, which will automatically destroy the connection once one of the objects is destroyed. didn't include this before removal of the above mentioned bug. * reflected refcounting revolution in ChangeLog
1998-02-02 04:54:25 +00:00
/* The flags that are used by GtkWidget on top of the
* flags field of GtkObject.
1997-11-24 22:37:52 +00:00
*/
fixed an assertment. Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org> * gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment. * gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from, this should eventually be done by gentypeinfo.el somewhen. * gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays. * gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the enum values of an enum type. * gtk/gtk.defs: * gtk/gtkcurve.h: * gtk/gtkobject.h: * gtk/gtkprivate.h: * gtk/gtkwidget.h: * gtk/gtkenums.h: brought enum/flags definitions in sync, added a few more enum definitions for bindings and pattern matching. * some more macro and GtkType fixups in various places. * gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used as a key-release modifier for the binding system. Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it was a stale list pointer that is already present in GtkMenuShell. * gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal GtkMenuShell::selection_done which is emitted after the menu shell poped down again and all possible menu items have been activated. Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue before activation of the menuitem, so the menu is actually taken off the screen prior to any menu item activation. * gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation for NULL nodes. * gtk/gtkwidget.h: * gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop the emission of the "add-accelerator" signal on a widget. this is usefull to prevent accelerator installation on certain widgets. * gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu labels left justified, by setting their alignment. stop accelerator installation for the menu items, since we use dynamic menus. Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenufactory.c: adaptions to use the new accel groups. people should *really* use GtkItemFactory. this is only for preserving source compatibility where possible, use of GtkMenuFactory is deprecated as of now. * gtk/gtkobject.h (gtk_object_class_add_user_signal): new function to create user signals of type GTK_RUN_NO_RECURSE. don't know why i missed this possibility when i added gtk_object_class_add_user_signal in late january. * gtk/gtkmain.c (gtk_init): ignore subsequent function calls. Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org> * gtk/gtkaccelgroup.h: * gtk/gtkaccelgroup.c: new implementation of the accelerator concept. * gtk/gtkaccellabel.h: * gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features display of the accelerators associated with a certain widget. * gtk/gtkitemfactory.h: * gtk/gtkitemfactory.c: new widget, item factory with automatic rc parsing and accelerator handling. * gtk/gtkmenu.c (gtk_menu_reposition): new function to care for positioning a menu. (gtk_menu_map): removed the allocation code. (gtk_menu_size_allocate): care for redrawing of children and resize our widget->window correctly. (gtk_menu_key_press): feature the new accelerator groups. * gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the submenu if neccessary. * gtk/gtkmenuitem.c: * gtk/gtkcheckmenuitem.c: * gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label() function variants. * gdk/gdk.c: (gdk_keyval_from_name): (gdk_keyval_name): new functions for keyval<->key-name associations. (gdk_keyval_to_upper): (gdk_keyval_to_lower): (gdk_keyval_is_upper): (gdk_keyval_is_lower): new functions to check/translate keyvalues with regards to their cases. Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a widget's class path. (gtk_widget_path): new function to calculate a widget's name path. * gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
typedef enum
1997-11-24 22:37:52 +00:00
{
GTK_TOPLEVEL = 1 << 4,
GTK_NO_WINDOW = 1 << 5,
GTK_REALIZED = 1 << 6,
GTK_MAPPED = 1 << 7,
GTK_VISIBLE = 1 << 8,
GTK_SENSITIVE = 1 << 9,
GTK_PARENT_SENSITIVE = 1 << 10,
GTK_CAN_FOCUS = 1 << 11,
GTK_HAS_FOCUS = 1 << 12,
GTK_CAN_DEFAULT = 1 << 13,
GTK_HAS_DEFAULT = 1 << 14,
GTK_HAS_GRAB = 1 << 15,
GTK_RC_STYLE = 1 << 16,
GTK_COMPOSITE_CHILD = 1 << 17,
GTK_NO_REPARENT = 1 << 18,
GTK_APP_PAINTABLE = 1 << 19,
GTK_RECEIVES_DEFAULT = 1 << 20
} GtkWidgetFlags;
1997-11-24 22:37:52 +00:00
reimplemented the signal storage system to use a linear array rather than Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org> * gtk/gtksignal.c: reimplemented the signal storage system to use a linear array rather than a hash table. be carefull *not* to keep any GtkSignal pointers across invokations of gtk_signal_next_and_invalidate() and therefore gtk_signal_new[v](). general code cleanups, made all allocations through memchunks. (gtk_signal_lookup): we now do the lookup of signals through a key_id for the signal names to avoid multiple hashing of the signal name on lookups for the several hirarchy levels of an object. Tue May 5 15:33:27 1998 Tim Janik <timj@gtk.org> * gtk/gtkmain.c (gtk_init): added gtk_signal_init() to avoid repeatedly checking for signal initialization in gtksignal.c. * gtk/gtktypeutils.c (TYPE_NODES_BLOCK_SIZE): reseted this to 200 after a long debugging period ;) Mon May 4 00:30:11 1998 Tim Janik <timj@gtk.org> * gtk/gtktypeutils.h (GTK_TYPE_IS_A): new macro to speedup gtk_type_is_a(). * gtk/gtktypeutils.c: reimplemented the type storage system to use a linear array rather than a hash table. it actually speeded up testgtk for a *considerable* amount. be carefull *not* to keep any GtkTypeNode pointers across invokations of gtk_type_node_next_and_invalidate() and therefore gtk_type_unique()! * gtk/gtkobject.h (GTK_IS_OBJECT_CLASS): new macro to test for the inheritance of a class pointer. (GTK_OBJECT): modifications for speedups. (GTK_IS_OBJECT): likewise. (GTK_OBJECT_CLASS): likewise. (suggested by owen). * gtk/gtkcontainer.h (GTK_IS_CONTAINER_CLASS): new macro. * gtk/gtkwidget.h (GTK_IS_WIDGET_CLASS): new macro. * gtk/gtk.defs (GtkTooltips): define GtkTooltips as object not as boxed, since its derivation changed 4 month ago ;(. showed up with the unique type name checking code in gtk_type_unique(). * random guint->GtkType and macro fixups.
1998-05-06 01:43:56 +00:00
/* Macro for casting a pointer to a GtkWidget or GtkWidgetClass pointer.
* Macros for testing whether `widget' or `klass' are of type GTK_TYPE_WIDGET.
1997-11-24 22:37:52 +00:00
*/
reimplemented the signal storage system to use a linear array rather than Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org> * gtk/gtksignal.c: reimplemented the signal storage system to use a linear array rather than a hash table. be carefull *not* to keep any GtkSignal pointers across invokations of gtk_signal_next_and_invalidate() and therefore gtk_signal_new[v](). general code cleanups, made all allocations through memchunks. (gtk_signal_lookup): we now do the lookup of signals through a key_id for the signal names to avoid multiple hashing of the signal name on lookups for the several hirarchy levels of an object. Tue May 5 15:33:27 1998 Tim Janik <timj@gtk.org> * gtk/gtkmain.c (gtk_init): added gtk_signal_init() to avoid repeatedly checking for signal initialization in gtksignal.c. * gtk/gtktypeutils.c (TYPE_NODES_BLOCK_SIZE): reseted this to 200 after a long debugging period ;) Mon May 4 00:30:11 1998 Tim Janik <timj@gtk.org> * gtk/gtktypeutils.h (GTK_TYPE_IS_A): new macro to speedup gtk_type_is_a(). * gtk/gtktypeutils.c: reimplemented the type storage system to use a linear array rather than a hash table. it actually speeded up testgtk for a *considerable* amount. be carefull *not* to keep any GtkTypeNode pointers across invokations of gtk_type_node_next_and_invalidate() and therefore gtk_type_unique()! * gtk/gtkobject.h (GTK_IS_OBJECT_CLASS): new macro to test for the inheritance of a class pointer. (GTK_OBJECT): modifications for speedups. (GTK_IS_OBJECT): likewise. (GTK_OBJECT_CLASS): likewise. (suggested by owen). * gtk/gtkcontainer.h (GTK_IS_CONTAINER_CLASS): new macro. * gtk/gtkwidget.h (GTK_IS_WIDGET_CLASS): new macro. * gtk/gtk.defs (GtkTooltips): define GtkTooltips as object not as boxed, since its derivation changed 4 month ago ;(. showed up with the unique type name checking code in gtk_type_unique(). * random guint->GtkType and macro fixups.
1998-05-06 01:43:56 +00:00
#define GTK_TYPE_WIDGET (gtk_widget_get_type ())
#define GTK_WIDGET(widget) (GTK_CHECK_CAST ((widget), GTK_TYPE_WIDGET, GtkWidget))
#define GTK_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_WIDGET, GtkWidgetClass))
#define GTK_IS_WIDGET(widget) (GTK_CHECK_TYPE ((widget), GTK_TYPE_WIDGET))
#define GTK_IS_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_WIDGET))
1997-11-24 22:37:52 +00:00
GTK_RESIZE_NEEDED is a private flag now. Mon Feb 2 04:15:08 1998 Tim Janik <timj@gimp.org> * gtk/gtkcontainer.h: * gtk/gtkcontainer.c: GTK_RESIZE_NEEDED is a private flag now. (gtk_container_register_toplevel): new function. (gtk_container_unregister_toplevel): new function. * gtk/gtkmain.c: GTK_LEAVE_PENDING is a private flag now. * gtk/gtkmenu.c: call gtk_container_register_toplevel in gtk_menu_class_init instead of this dirty gtk_widget_set_parent(,NULL) hack. new default handler gtk_menu_destroy for calling gtk_container_unregister_toplevel. removed GTK_ANCHORED, GTK_UNMAPPED. * gtk/gtkobject.h: macro cleanups, added GTK_DESTROYED flag. * gtk/gtkobject.c: only emit DESTROY signal if !GTK_OBJECT_DESTROYED (object). * gtk/gtkprivate.h: new file that will not be automatically included. it holds the private flags for GtkWidget along with it's SET/UNSET and examination macros. * gtk/gtkwidget.c: private flags: GTK_RESIZE_NEEDED, GTK_REDRAW_PENDING, GTK_RESIZE_PENDING, GTK_IN_REPARENT, GTK_USER_STYLE. GTK_ANCHORED is replaced by GTK_TOPLEVEL. added missing UNSET for GTK_IN_REPARENT. removed the gtk_widget_set_parent(, NULL) hack for toplevels. upon destroy free memory for widgets with GTK_WIDGET_HAS_SHAPE_MASK. * gtk/gtkwidget.h: split up the widget flags into a public and a private portion. added an extra field private_flags to GtkWidget without making it bigger by using an alignment gap of 16 bit. macro cleanups. * gtk/gtkwindow.c: removed GTK_ANCHORED. new function gtk_window_destroy for calling gtk_container_unregister_toplevel. removed the gtk_widget_set_parent(,NULL), call gtk_container_register_toplevel instead. remove GTK_UNMAPPED. GTK_RESIZE_NEEDED is private now. * gtk/gtksignal.c (gtk_signal_disconnect): removed a bug on removal that cut off the handler list -> living_objects == 0 with testgtk. made some warnings more descriptive. new function gtk_signal_connect_object_while_alive, which will automatically destroy the connection once one of the objects is destroyed. didn't include this before removal of the above mentioned bug. * reflected refcounting revolution in ChangeLog
1998-02-02 04:54:25 +00:00
/* Macros for extracting various fields from GtkWidget and GtkWidgetClass.
1997-11-24 22:37:52 +00:00
*/
GTK_RESIZE_NEEDED is a private flag now. Mon Feb 2 04:15:08 1998 Tim Janik <timj@gimp.org> * gtk/gtkcontainer.h: * gtk/gtkcontainer.c: GTK_RESIZE_NEEDED is a private flag now. (gtk_container_register_toplevel): new function. (gtk_container_unregister_toplevel): new function. * gtk/gtkmain.c: GTK_LEAVE_PENDING is a private flag now. * gtk/gtkmenu.c: call gtk_container_register_toplevel in gtk_menu_class_init instead of this dirty gtk_widget_set_parent(,NULL) hack. new default handler gtk_menu_destroy for calling gtk_container_unregister_toplevel. removed GTK_ANCHORED, GTK_UNMAPPED. * gtk/gtkobject.h: macro cleanups, added GTK_DESTROYED flag. * gtk/gtkobject.c: only emit DESTROY signal if !GTK_OBJECT_DESTROYED (object). * gtk/gtkprivate.h: new file that will not be automatically included. it holds the private flags for GtkWidget along with it's SET/UNSET and examination macros. * gtk/gtkwidget.c: private flags: GTK_RESIZE_NEEDED, GTK_REDRAW_PENDING, GTK_RESIZE_PENDING, GTK_IN_REPARENT, GTK_USER_STYLE. GTK_ANCHORED is replaced by GTK_TOPLEVEL. added missing UNSET for GTK_IN_REPARENT. removed the gtk_widget_set_parent(, NULL) hack for toplevels. upon destroy free memory for widgets with GTK_WIDGET_HAS_SHAPE_MASK. * gtk/gtkwidget.h: split up the widget flags into a public and a private portion. added an extra field private_flags to GtkWidget without making it bigger by using an alignment gap of 16 bit. macro cleanups. * gtk/gtkwindow.c: removed GTK_ANCHORED. new function gtk_window_destroy for calling gtk_container_unregister_toplevel. removed the gtk_widget_set_parent(,NULL), call gtk_container_register_toplevel instead. remove GTK_UNMAPPED. GTK_RESIZE_NEEDED is private now. * gtk/gtksignal.c (gtk_signal_disconnect): removed a bug on removal that cut off the handler list -> living_objects == 0 with testgtk. made some warnings more descriptive. new function gtk_signal_connect_object_while_alive, which will automatically destroy the connection once one of the objects is destroyed. didn't include this before removal of the above mentioned bug. * reflected refcounting revolution in ChangeLog
1998-02-02 04:54:25 +00:00
#define GTK_WIDGET_TYPE(wid) (GTK_OBJECT_TYPE (wid))
#define GTK_WIDGET_STATE(wid) (GTK_WIDGET (wid)->state)
#define GTK_WIDGET_SAVED_STATE(wid) (GTK_WIDGET (wid)->saved_state)
1997-11-24 22:37:52 +00:00
GTK_RESIZE_NEEDED is a private flag now. Mon Feb 2 04:15:08 1998 Tim Janik <timj@gimp.org> * gtk/gtkcontainer.h: * gtk/gtkcontainer.c: GTK_RESIZE_NEEDED is a private flag now. (gtk_container_register_toplevel): new function. (gtk_container_unregister_toplevel): new function. * gtk/gtkmain.c: GTK_LEAVE_PENDING is a private flag now. * gtk/gtkmenu.c: call gtk_container_register_toplevel in gtk_menu_class_init instead of this dirty gtk_widget_set_parent(,NULL) hack. new default handler gtk_menu_destroy for calling gtk_container_unregister_toplevel. removed GTK_ANCHORED, GTK_UNMAPPED. * gtk/gtkobject.h: macro cleanups, added GTK_DESTROYED flag. * gtk/gtkobject.c: only emit DESTROY signal if !GTK_OBJECT_DESTROYED (object). * gtk/gtkprivate.h: new file that will not be automatically included. it holds the private flags for GtkWidget along with it's SET/UNSET and examination macros. * gtk/gtkwidget.c: private flags: GTK_RESIZE_NEEDED, GTK_REDRAW_PENDING, GTK_RESIZE_PENDING, GTK_IN_REPARENT, GTK_USER_STYLE. GTK_ANCHORED is replaced by GTK_TOPLEVEL. added missing UNSET for GTK_IN_REPARENT. removed the gtk_widget_set_parent(, NULL) hack for toplevels. upon destroy free memory for widgets with GTK_WIDGET_HAS_SHAPE_MASK. * gtk/gtkwidget.h: split up the widget flags into a public and a private portion. added an extra field private_flags to GtkWidget without making it bigger by using an alignment gap of 16 bit. macro cleanups. * gtk/gtkwindow.c: removed GTK_ANCHORED. new function gtk_window_destroy for calling gtk_container_unregister_toplevel. removed the gtk_widget_set_parent(,NULL), call gtk_container_register_toplevel instead. remove GTK_UNMAPPED. GTK_RESIZE_NEEDED is private now. * gtk/gtksignal.c (gtk_signal_disconnect): removed a bug on removal that cut off the handler list -> living_objects == 0 with testgtk. made some warnings more descriptive. new function gtk_signal_connect_object_while_alive, which will automatically destroy the connection once one of the objects is destroyed. didn't include this before removal of the above mentioned bug. * reflected refcounting revolution in ChangeLog
1998-02-02 04:54:25 +00:00
/* Macros for extracting the widget flags from GtkWidget.
*/
#define GTK_WIDGET_FLAGS(wid) (GTK_OBJECT_FLAGS (wid))
#define GTK_WIDGET_TOPLEVEL(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_TOPLEVEL) != 0)
#define GTK_WIDGET_NO_WINDOW(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_NO_WINDOW) != 0)
#define GTK_WIDGET_REALIZED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_REALIZED) != 0)
#define GTK_WIDGET_MAPPED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_MAPPED) != 0)
#define GTK_WIDGET_VISIBLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_VISIBLE) != 0)
#define GTK_WIDGET_DRAWABLE(wid) (GTK_WIDGET_VISIBLE (wid) && GTK_WIDGET_MAPPED (wid))
#define GTK_WIDGET_SENSITIVE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_SENSITIVE) != 0)
#define GTK_WIDGET_PARENT_SENSITIVE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_PARENT_SENSITIVE) != 0)
#define GTK_WIDGET_IS_SENSITIVE(wid) (GTK_WIDGET_SENSITIVE (wid) && \
GTK_WIDGET_PARENT_SENSITIVE (wid))
#define GTK_WIDGET_CAN_FOCUS(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_CAN_FOCUS) != 0)
#define GTK_WIDGET_HAS_FOCUS(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_HAS_FOCUS) != 0)
#define GTK_WIDGET_CAN_DEFAULT(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_CAN_DEFAULT) != 0)
#define GTK_WIDGET_HAS_DEFAULT(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_HAS_DEFAULT) != 0)
#define GTK_WIDGET_HAS_GRAB(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_HAS_GRAB) != 0)
#define GTK_WIDGET_RC_STYLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_RC_STYLE) != 0)
GTK_MENU_DIR_CHILD: check for the existance of Thu Sep 3 04:22:20 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenushell.c (gtk_real_menu_shell_move_current): GTK_MENU_DIR_CHILD: check for the existance of menu_shell->active_menu_item before accessing its child. GTK_MENU_DIR_PREV: GTK_MENU_DIR_NEXT: if we haven't had an active item and still don't, make a default selection. Wed Sep 2 00:28:58 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_propagate_state): iterate the children with _forall for sensitivity changes and with _foreach on pure state changes. this fixes a lot of the old inclusions of internal widgets into _foreach calls. * gtk/gtktree.c: removed gtk_tree_foreach, let gtk_tree_forall do the work. don't walk the subtrees of first level children. * gtk/gtktreeitem.c: provide a _forall implementation, which walks the subtrees as well for include_internals. * gtk/gtkmenuitem.c: provide a _forall implementation, which walks the submenus as well for include_internals. * gtk/gtkscrolledwindow.c: removed gtk_scrolled_window_foreach and implemented gtk_scrolled_window_forall, which will iterate over the viewport and the scrollbars for gtk_container_forall or iterate over the viewports children for gtk_container_foreach. * gtk/gtktoolbar.c: * gtk/gtktable.c: * gtk/gtkpaned.c: * gtk/gtkpacker.c: * gtk/gtkmenushell.c: * gtk/gtklist.c: * gtk/gtkfixed.c: * gtk/gtkclist.c: * gtk/gtkbox.c: * gtk/gtkbin.c: * gtk/gtknotebook.c: removed the old gtk_*_foreach functions and provided gtk_*_forall. * gtk/gtknotebook.c: (gtk_notebook_real_switch_page): expose tabs. (gtk_notebook_page_num): new function to return the page number of a distinct child. (gtk_notebook_focus): minor fixups. foxus handling is still screwed under some circumstances. * gtk/gtktreeitem.c: (gtk_real_tree_item_select): (gtk_real_tree_item_deselect): major fixes. some general fixups wrt queue_redraw, and tree items not being NO_WINDOW widgets. * gtk/gtklistitem.c: (gtk_real_list_item_select): (gtk_real_list_item_deselect): (gtk_real_list_item_toggle): removed unneccessary queue_redraw calls. Wed Aug 30 09:42:07 1998 Tim Janik <timj@gtk.org> * gtk/gtkoptionmenu.c: allow optionmenus to have the focus and automatically popup the menu on space bar. Wed Aug 26 06:40:34 1998 Tim Janik <timj@gtk.org> * gtk/gtkcontainer.h: * gtk/gtkcontainer.c: implemented gtk_container_forall() (as a class method), which acts similar to gtk_container_foreach(), but iterates over internal children. the GtkContainer::foreach signal vanished in favour of a new class method ->forall() that optionally includes internal widgets. * gtk/gtkclist.c (gtk_clist_init): provide no _foreach implementation but a _forall implementation, since all child widgets we have are internal ones. (column_button_create): set the parent window prior to gtk_widget_set_parent(). * gtk/gtkwidget.c: exchanged all calls to gtk_container_foreach() with gtk_container_forall(). * gtk/gtkwidget.h: * gtk/gtkwidget.c: added the GTK_COMPOSITE_CHILD, exported through the GtkWidget::composite_child argument. to have a widget created with the flag initially, two new functions got added to wrap a widgets creation: gtk_widget_push_composite_flag() and gtk_widget_pop_composite_flag(). Wed Aug 25 23:37:39 1998 Tim Janik <timj@gtk.org> * gtk/gtktooltips.h: * gtk/gtktooltips.c: exported gtk_tooltips_create_window() as gtk_tooltips_force_window(), so tooltips->tip_window can be accessed prior to the first tip being set. don't put an extra reference on the window, since it is a toplevel, it wont get destroyed from anywhere else. * overall macro and GtkType fixups.
1998-09-03 02:38:53 +00:00
#define GTK_WIDGET_COMPOSITE_CHILD(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_COMPOSITE_CHILD) != 0)
#define GTK_WIDGET_APP_PAINTABLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_APP_PAINTABLE) != 0)
#define GTK_WIDGET_RECEIVES_DEFAULT(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_RECEIVES_DEFAULT) != 0)
GTK_RESIZE_NEEDED is a private flag now. Mon Feb 2 04:15:08 1998 Tim Janik <timj@gimp.org> * gtk/gtkcontainer.h: * gtk/gtkcontainer.c: GTK_RESIZE_NEEDED is a private flag now. (gtk_container_register_toplevel): new function. (gtk_container_unregister_toplevel): new function. * gtk/gtkmain.c: GTK_LEAVE_PENDING is a private flag now. * gtk/gtkmenu.c: call gtk_container_register_toplevel in gtk_menu_class_init instead of this dirty gtk_widget_set_parent(,NULL) hack. new default handler gtk_menu_destroy for calling gtk_container_unregister_toplevel. removed GTK_ANCHORED, GTK_UNMAPPED. * gtk/gtkobject.h: macro cleanups, added GTK_DESTROYED flag. * gtk/gtkobject.c: only emit DESTROY signal if !GTK_OBJECT_DESTROYED (object). * gtk/gtkprivate.h: new file that will not be automatically included. it holds the private flags for GtkWidget along with it's SET/UNSET and examination macros. * gtk/gtkwidget.c: private flags: GTK_RESIZE_NEEDED, GTK_REDRAW_PENDING, GTK_RESIZE_PENDING, GTK_IN_REPARENT, GTK_USER_STYLE. GTK_ANCHORED is replaced by GTK_TOPLEVEL. added missing UNSET for GTK_IN_REPARENT. removed the gtk_widget_set_parent(, NULL) hack for toplevels. upon destroy free memory for widgets with GTK_WIDGET_HAS_SHAPE_MASK. * gtk/gtkwidget.h: split up the widget flags into a public and a private portion. added an extra field private_flags to GtkWidget without making it bigger by using an alignment gap of 16 bit. macro cleanups. * gtk/gtkwindow.c: removed GTK_ANCHORED. new function gtk_window_destroy for calling gtk_container_unregister_toplevel. removed the gtk_widget_set_parent(,NULL), call gtk_container_register_toplevel instead. remove GTK_UNMAPPED. GTK_RESIZE_NEEDED is private now. * gtk/gtksignal.c (gtk_signal_disconnect): removed a bug on removal that cut off the handler list -> living_objects == 0 with testgtk. made some warnings more descriptive. new function gtk_signal_connect_object_while_alive, which will automatically destroy the connection once one of the objects is destroyed. didn't include this before removal of the above mentioned bug. * reflected refcounting revolution in ChangeLog
1998-02-02 04:54:25 +00:00
/* Macros for setting and clearing widget flags.
1997-11-24 22:37:52 +00:00
*/
GTK_RESIZE_NEEDED is a private flag now. Mon Feb 2 04:15:08 1998 Tim Janik <timj@gimp.org> * gtk/gtkcontainer.h: * gtk/gtkcontainer.c: GTK_RESIZE_NEEDED is a private flag now. (gtk_container_register_toplevel): new function. (gtk_container_unregister_toplevel): new function. * gtk/gtkmain.c: GTK_LEAVE_PENDING is a private flag now. * gtk/gtkmenu.c: call gtk_container_register_toplevel in gtk_menu_class_init instead of this dirty gtk_widget_set_parent(,NULL) hack. new default handler gtk_menu_destroy for calling gtk_container_unregister_toplevel. removed GTK_ANCHORED, GTK_UNMAPPED. * gtk/gtkobject.h: macro cleanups, added GTK_DESTROYED flag. * gtk/gtkobject.c: only emit DESTROY signal if !GTK_OBJECT_DESTROYED (object). * gtk/gtkprivate.h: new file that will not be automatically included. it holds the private flags for GtkWidget along with it's SET/UNSET and examination macros. * gtk/gtkwidget.c: private flags: GTK_RESIZE_NEEDED, GTK_REDRAW_PENDING, GTK_RESIZE_PENDING, GTK_IN_REPARENT, GTK_USER_STYLE. GTK_ANCHORED is replaced by GTK_TOPLEVEL. added missing UNSET for GTK_IN_REPARENT. removed the gtk_widget_set_parent(, NULL) hack for toplevels. upon destroy free memory for widgets with GTK_WIDGET_HAS_SHAPE_MASK. * gtk/gtkwidget.h: split up the widget flags into a public and a private portion. added an extra field private_flags to GtkWidget without making it bigger by using an alignment gap of 16 bit. macro cleanups. * gtk/gtkwindow.c: removed GTK_ANCHORED. new function gtk_window_destroy for calling gtk_container_unregister_toplevel. removed the gtk_widget_set_parent(,NULL), call gtk_container_register_toplevel instead. remove GTK_UNMAPPED. GTK_RESIZE_NEEDED is private now. * gtk/gtksignal.c (gtk_signal_disconnect): removed a bug on removal that cut off the handler list -> living_objects == 0 with testgtk. made some warnings more descriptive. new function gtk_signal_connect_object_while_alive, which will automatically destroy the connection once one of the objects is destroyed. didn't include this before removal of the above mentioned bug. * reflected refcounting revolution in ChangeLog
1998-02-02 04:54:25 +00:00
#define GTK_WIDGET_SET_FLAGS(wid,flag) G_STMT_START{ (GTK_WIDGET_FLAGS (wid) |= (flag)); }G_STMT_END
#define GTK_WIDGET_UNSET_FLAGS(wid,flag) G_STMT_START{ (GTK_WIDGET_FLAGS (wid) &= ~(flag)); }G_STMT_END
typedef struct _GtkRequisition GtkRequisition;
typedef struct _GtkAllocation GtkAllocation;
1997-11-24 22:37:52 +00:00
typedef struct _GtkSelectionData GtkSelectionData;
typedef struct _GtkWidgetClass GtkWidgetClass;
1997-11-24 22:37:52 +00:00
typedef struct _GtkWidgetAuxInfo GtkWidgetAuxInfo;
typedef struct _GtkWidgetShapeInfo GtkWidgetShapeInfo;
typedef void (*GtkCallback) (GtkWidget *widget,
gpointer data);
1997-11-24 22:37:52 +00:00
/* A requisition is a desired amount of space which a
* widget may request.
*/
struct _GtkRequisition
{
s/gtk_notebook_nth_page/gtk_notebook_get_nth_page/. Wed Dec 2 01:39:02 1998 Tim Janik <timj@gtk.org> * gtk/gtknotebook.h: * gtk/gtknotebook.c: s/gtk_notebook_nth_page/gtk_notebook_get_nth_page/. * incremented version number to 1.1.6 and made Gtk dependant on GLib 1.1.6. * gtk/gtkwidget.h (struct _GtkRequisition): changed width and height from guint16 to gint16, since sizes bigger than 32767 are not supported anyways, and aritmethics with intermediate negative values are possible now. Tue Dec 1 00:00:04 1998 Tim Janik <timj@gtk.org> * gtk/gtkscrolledwindow.c: implementation of GTK_POLICY_NEVER functionality, added rationales on the policy and size requisition handling at the top. (gtk_scrolled_window_size_request): we assume a default minimum for our child's width and height if [hv]scrollbar_policy != GTK_POLICY_NEVER, except when the user specified the dimension explicitely. (gtk_scrolled_window_size_allocate): do not show scrollbars if [hv]scrollbar_policy == GTK_POLICY_NEVER. * gtk/gtkviewport.c (gtk_viewport_size_request): report the real size we require (including the child). * gtk/gtkclist.c: (gtk_clist_size_request): report the real size required. * gtk/gtkenums.h (enum GtkPolicyType): added GTK_POLICY_NEVER. * gtk/gtkobject.c (gtk_object_init_type): object_type doesn't need to be a static variable. Mon Nov 30 22:41:25 1998 Tim Janik <timj@gtk.org> * gtk/gtkclist.h: * gtk/gtkclist.c: * gtk/gtkviewport.h: * gtk/gtkviewport.c: * gtk/gtktext.h: * gtk/gtktext.c: * gtk/gtklayout.h: * gtk/gtklayout.c: * gtk/gtkwidget.h: * gtk/gtkwidget.c: * gtk/gtkscrolledwindow.h: * gtk/gtkscrolledwindow.c: s/scroll_adjustements/scroll_adjustments/ s/scroll_adjustments/set_scroll_adjustments/g
1998-12-02 03:40:03 +00:00
gint16 width;
gint16 height;
1997-11-24 22:37:52 +00:00
};
/* An allocation is a size and position. Where a widget
* can ask for a desired size, it is actually given
* this amount of space at the specified position.
*/
struct _GtkAllocation
{
gint16 x;
gint16 y;
guint16 width;
guint16 height;
};
/* The contents of a selection are returned in a GtkSelectionData
structure. selection/target identify the request.
type specifies the type of the return; if length < 0, and
the data should be ignored. This structure has object semantics -
no fields should be modified directly, they should not be created
directly, and pointers to them should not be stored beyond the duration of
a callback. (If the last is changed, we'll need to add reference
Added a modular client-message-filter mechanism, that is used for the DND Sun Oct 18 18:16:39 1998 Owen Taylor <otaylor@gtk.org> * gdk/gdk.c gdkprivate.h: Added a modular client-message-filter mechanism, that is used for the DND messages. Removed all the old DND code. * gdk/gdkcolormap.c gdk/gdkcolormap.h: Add a function to get the visual of a given colormap. * gtk/gtkcolorsel.c: Conversion to new DND, drag a color-swatch. * gdk/gdk.h gdk/gdkdnd.c: The low-level X oriented portions of drag and drop protocols. Sending and receiving client messages, and navigating window trees. * gdk/gdkimage.c: added a gdk_flush() when destroying SHM images to hopefully make it more likely that X will gracefully handle the segment being destroyed. * gdk/gdkprivate.h gtk/gtkdebug.h: Add new DND debugging flags. * gtk/gtkeditable.[ch]: Updates for the selection handling changes. * gtk/gtkselection.[ch]: Added GtkTargetList, a refcounted data structure for keeping track of lists of GdkAtom + information. Removed selection_handler_add in favor of a "drag_data_get" signal. * gtk/gtkdnd.[ch] gtk/gtk.h: New files - highlevel (event loop dependent) parts of the DND protocols, display of drag icons, drag-under highlighting, and the "default handlers". * gtk/gtkinvisible.[ch]: New widget - InputOnly offscreen windows that are used for reliable pointer grabs and selection handling in the DND code. * gtk/testdnd.c: New test program for new DND. (Old DND tests in testgtk still need to be converted.) * gtk/testselection.c: Use the new selection API. * docs/dnd_internals: Start at describing how all the new code works inside. * docs/Changes-1.2.txt: New file describing source-incompatible changes in GTK+-1.2. Sat Oct 17 22:50:34 1998 Owen Taylor <otaylor@gtk.org> * gdk/gdkwindow.c (gdk_window_remove_filter): Free the right list node. * gdk/gdkwindow.c (gdk_window_init): Add gdk_root_parent to the XID table so we can receive events on it. Wed Oct 14 12:57:40 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c gdk/gdk.h (gdk_event_get_time): New function to get the timestamp from a generic event. Fri Oct 9 13:16:04 1998 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_add_events): Added function that safely adds additional events to a widget's event mask, even if the widget has previously been realized. (We can do this, but not remove events from the event mask). Fri Oct 2 17:35:35 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_property_get): Allow type == 0, for AnyPropertyType. Fri Oct 2 10:32:21 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Add client-local hashing. Thu Sep 24 20:33:54 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_event_send_clientmessage_toall): serial isn't a timestamp. Thu Sep 17 14:23:03 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_event_translate): Removed printing of unknown window lookup warnings. (Made it a GDK_NOTE) - they happen in many circumstances.
1998-10-18 22:51:24 +00:00
counting.) The time field gives the timestamp at which the data was sent. */
1997-11-24 22:37:52 +00:00
struct _GtkSelectionData
{
GdkAtom selection;
GdkAtom target;
GdkAtom type;
gint format;
1997-11-24 22:37:52 +00:00
guchar *data;
gint length;
1997-11-24 22:37:52 +00:00
};
/* The widget is the base of the tree for displayable objects.
* (A displayable object is one which takes up some amount
* of screen real estate). It provides a common base and interface
* which actual widgets must adhere to.
*/
struct _GtkWidget
{
/* The object structure needs to be the first
* element in the widget structure in order for
* the object mechanism to work correctly. This
* allows a GtkWidget pointer to be cast to a
* GtkObject pointer.
*/
GtkObject object;
GTK_RESIZE_NEEDED is a private flag now. Mon Feb 2 04:15:08 1998 Tim Janik <timj@gimp.org> * gtk/gtkcontainer.h: * gtk/gtkcontainer.c: GTK_RESIZE_NEEDED is a private flag now. (gtk_container_register_toplevel): new function. (gtk_container_unregister_toplevel): new function. * gtk/gtkmain.c: GTK_LEAVE_PENDING is a private flag now. * gtk/gtkmenu.c: call gtk_container_register_toplevel in gtk_menu_class_init instead of this dirty gtk_widget_set_parent(,NULL) hack. new default handler gtk_menu_destroy for calling gtk_container_unregister_toplevel. removed GTK_ANCHORED, GTK_UNMAPPED. * gtk/gtkobject.h: macro cleanups, added GTK_DESTROYED flag. * gtk/gtkobject.c: only emit DESTROY signal if !GTK_OBJECT_DESTROYED (object). * gtk/gtkprivate.h: new file that will not be automatically included. it holds the private flags for GtkWidget along with it's SET/UNSET and examination macros. * gtk/gtkwidget.c: private flags: GTK_RESIZE_NEEDED, GTK_REDRAW_PENDING, GTK_RESIZE_PENDING, GTK_IN_REPARENT, GTK_USER_STYLE. GTK_ANCHORED is replaced by GTK_TOPLEVEL. added missing UNSET for GTK_IN_REPARENT. removed the gtk_widget_set_parent(, NULL) hack for toplevels. upon destroy free memory for widgets with GTK_WIDGET_HAS_SHAPE_MASK. * gtk/gtkwidget.h: split up the widget flags into a public and a private portion. added an extra field private_flags to GtkWidget without making it bigger by using an alignment gap of 16 bit. macro cleanups. * gtk/gtkwindow.c: removed GTK_ANCHORED. new function gtk_window_destroy for calling gtk_container_unregister_toplevel. removed the gtk_widget_set_parent(,NULL), call gtk_container_register_toplevel instead. remove GTK_UNMAPPED. GTK_RESIZE_NEEDED is private now. * gtk/gtksignal.c (gtk_signal_disconnect): removed a bug on removal that cut off the handler list -> living_objects == 0 with testgtk. made some warnings more descriptive. new function gtk_signal_connect_object_while_alive, which will automatically destroy the connection once one of the objects is destroyed. didn't include this before removal of the above mentioned bug. * reflected refcounting revolution in ChangeLog
1998-02-02 04:54:25 +00:00
/* 16 bits of internally used private flags.
* this will be packed into the same 4 byte alignment frame that
* state and saved_state go. we therefore don't waste any new
* space on this.
*/
guint16 private_flags;
1997-11-24 22:37:52 +00:00
/* The state of the widget. There are actually only
* 5 widget states (defined in "gtkenums.h").
*/
guint8 state;
1997-11-24 22:37:52 +00:00
/* The saved state of the widget. When a widgets state
* is changed to GTK_STATE_INSENSITIVE via
* "gtk_widget_set_state" or "gtk_widget_set_sensitive"
* the old state is kept around in this field. The state
* will be restored once the widget gets sensitive again.
1997-11-24 22:37:52 +00:00
*/
guint8 saved_state;
1997-11-24 22:37:52 +00:00
/* The widgets name. If the widget does not have a name
* (the name is NULL), then its name (as returned by
* "gtk_widget_get_name") is its classes name.
* Among other things, the widget name is used to determine
* the style to use for a widget.
1997-11-24 22:37:52 +00:00
*/
gchar *name;
1997-11-24 22:37:52 +00:00
/* The style for the widget. The style contains the
* colors the widget should be drawn in for each state
* along with graphics contexts used to draw with and
* the font to use for text.
*/
GtkStyle *style;
1997-11-24 22:37:52 +00:00
/* The widgets desired size.
*/
GtkRequisition requisition;
1997-11-24 22:37:52 +00:00
/* The widgets allocated size.
*/
GtkAllocation allocation;
1997-11-24 22:37:52 +00:00
/* The widgets window or its parent window if it does
* not have a window. (Which will be indicated by the
* GTK_NO_WINDOW flag being set).
*/
GdkWindow *window;
1997-11-24 22:37:52 +00:00
/* The widgets parent.
*/
GtkWidget *parent;
};
struct _GtkWidgetClass
{
/* The object class structure needs to be the first
* element in the widget class structure in order for
* the class mechanism to work correctly. This allows a
* GtkWidgetClass pointer to be cast to a GtkObjectClass
* pointer.
*/
GtkObjectClass parent_class;
added args ::show_text, ::text_xalign, ::text_yalign, ::activity_mode. Sun Nov 22 16:21:28 1998 Tim Janik <timj@gtk.org> * gtk/gtkprogress.c: added args ::show_text, ::text_xalign, ::text_yalign, ::activity_mode. * gtk/gtkprogressbar.c: added construct arg ::adjustment. added args ::bar_style, ::orientation, ::discrete_blocks, ::activity_step, ::activity_blocks. (gtk_progress_bar_new): (gtk_progress_bar_new_with_adjustment): use gtk_widget_new(). (gtk_progress_bar_construct): deprecated. * gtk/gtkvscrollbar.c: (gtk_vscrollbar_draw_step_back): (gtk_vscrollbar_draw_step_forw): use "vscrollbar" as detail for gtk_paint_arrow, to be consistent with hscrollbar. * gtk/gtktext.c added construct args ::hadjustment, ::vadjustment. added args ::line_wrap, ::word_wrap. (gtk_text_class_init): added scroll_adjustments signal. (gtk_text_new): use gtk_widget_new. (gtk_text_disconnect): remove adjustement with gtk_text_set_adjustments, so we don't screw the reference counts and don't leave signals connected. (gtk_text_destroy): disconnect adjustments signals. (gtk_text_finalize): unref adjustments. * gtk/gtkctree.c: added construct args ::n_columns and ::tree_column. added args ::indent, ::spacing, ::show_stub, ::reorderable, ::use_drag_icons, ::line_style and ::expander_style. (gtk_ctree_set_show_stub): renamed from gtk_ctree_show_stub, which is deprecated now. * gtk/gtkclist.h: remove GTK_CLIST_CONSTRUCT flag. * gtk/gtkclist.c: removed ::vadjustment and ::hadjustment args, introduced ::scroll_adjustments signal. added ::shadow_type, ::selection_mode and ::row_height args. added n_columns construct arg. (gtk_clist_construct): call gtk_object_constructed(). (gtk_clist_set_row_height): if height is passed as 0, revert to automatic height calculation. (gtk_clist_destroy): before unrefing the adjustments, disconnect our signal handlers. Fri Nov 21 22:34:58 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_new): call gtk_object_default_construct like gtk_object_new. (gtk_widget_destroy): assert that we only destroy constructed widgets. * gtk/gtkobject.h (enum GtkArgFlags): new flag GTK_ARG_CONSTRUCT_ONLY to identify args that may only be used for construction. GTK_ARG_CONSTRUCT maybe used as normal arguments besides construction time. * gtk/gtkobject.c (gtk_object_new): invoke gtk_object_default_construct at the end if the object is not fully constructed. (gtk_object_newv): likewise. (gtk_object_destroy): assert that we only destroy constructed objects. (gtk_object_init): setup GTK_CONSTRUCTED from the objects real klass. (gtk_object_default_construct): new function to complete default construction of an object by applying missing construtor args with default values of 0, 0.0 or NULL. (gtk_object_constructed): new function to mark an object as being constructed (used from within constructors). * gtk/gtkarg.c (gtk_arg_type_new_static): return the args info pointer so it is immediatedly available for the caller. * gtk/gtktypeutils.c (gtk_type_new): pass an object's real class to the object initilizer (GtkObjectInitFunc takes a second arg now, the real klass), and asure that object initializers may temporarily alter the class pointer. Fri Nov 20 08:00:30 1998 Tim Janik <timj@gtk.org> * gtk/testgtk.c: change all occourances of gtk_container_add ( scrolled_window, widget) to gtk_scrolled_window_add_with_viewport (...) for widget!=(clist, ctree, text, viewport). * gtk/gtkcombo.c: (gtk_combo_init): use gtk_scrolled_window_add_with_viewport() to add children to the scrolled window. * gtk/gtkscrolledwindow.h: * gtk/gtkscrolledwindow.c: changed scrolled_window->viewport to scrolled_window->child, and use gtk_widget_scroll_adjustements() to set the scroll adjustments for the widget, we do not create an additional viewport anymore. added ::hadjustment and ::vadjustment constructor args. (gtk_scrolled_window_new): use gtk_widget_new() to create the widget. (gtk_scrolled_window_set_hadjustment): (gtk_scrolled_window_set_vadjustment): new functions that superceed gtk_scrolled_window_construct. (gtk_scrolled_window_construct): deprecated this function. * gtk/gtkhscrollbar.c: * gtk/gtkvscrollbar.c: * gtk/gtkhscale.c: * gtk/gtkvscale.c: support a constructor arg "::adjustment", and use gtk_widget_new() for the widget creation. * gtk/gtkrange.c: added ::update_policy arg. (gtk_range_set_adjustment): if adjustment is passed in as NULL, create a default adjustment so this function can be used for derived widgets that depend on the adjustment's existance. (gtk_range_destroy): disconnect the adjustment signal, so we don't get called after we got destroyed, we don't destroy the adjustment in here, because it might have been provided from another widget. * gtk/gtkviewport.c: introduced ::scroll_adjustments signal. (gtk_viewport_destroy): same as gtk_range_destroy. * gtk/gtkprogress.c (gtk_progress_destroy): same as gtk_range_destroy. * gtk/gtkwidget.h: * gtk/gtkwidget.c: changed gtk_widget_activate() to return a gboolean, indicating whether this widget supports activation. added gtk_widget_scroll_adjustements() to set the scrolling adjustments of a widget. Wed Nov 19 01:22:42 1998 Tim Janik <timj@gtk.org> * gtk/gtkoptionmenu.c: (gtk_option_menu_remove_contents): (gtk_option_menu_update_contents): removed gtk_container_[un]block_resize() pairs. * gtk/gtknotebook.h: * gtk/gtknotebook.c: removed the tab_border field, since it shouldn't be used outside of gtknotebook.c anyways. made ARG_TAB_BORDER a wrtie-only argument. * *.c: made deprecated functions issue a message: gtk_clist_set_border, gtk_container_block_resize, gtk_container_unblock_resize, gtk_container_need_resize, gtk_object_class_add_user_signal, gtk_spin_button_construct, gtk_scrolled_window_construct. removed non-functional functions: gtk_container_disable_resize, gtk_container_enable_resize, gtk_clist_set_policy. Wed Nov 18 22:54:36 1998 Tim Janik <timj@gtk.org> * gtk/gtkbox.c (gtk_box_init): * gtk/gtkdrawingarea.c (gtk_drawing_area_init): * gtk/gtkeventbox.c (gtk_event_box_init): * gtk/gtkfixed.c (gtk_fixed_init): * gtk/gtkframe.c (gtk_frame_init): * gtk/gtkhandlebox.c (gtk_handle_box_init): * gtk/gtkpacker.c (gtk_packer_init): * gtk/gtkmisc.c (gtk_misc_init): * gtk/gtkpreview.c (gtk_preview_init): * gtk/gtkprogress.c (gtk_progress_init): * gtk/gtkprogressbar.c (gtk_progress_bar_init): * gtk/gtkseparator.c (gtk_separator_init): * gtk/gtktable.c (gtk_table_init): * gtk/gtkviewport.c (gtk_viewport_init): * gtk/gtkalignment.c (gtk_alignment_init): removed setting of the GTK_BASIC flag. * gtk/gtkwidget.h: * gtk/gtkwidget.c: removed GTK_BASIC, GTK_WIDGET_BASIC and gtk_widget_basic. * miscellaneous GtkType and macro fixups.
1998-11-23 01:54:45 +00:00
/* The signal to emit when a widget of this class is activated,
* gtk_widget_activate() handles the emission.
* Implementation of this signal is optional.
1997-11-24 22:37:52 +00:00
*/
made the <widget>_signals[] arrays of type guint rather than gint. made Mon Mar 9 15:48:10 1998 Tim Janik <timj@gimp.org> * Signal signedness and naming corrections, plus GtkType fixes: * gtk/gtkadjustment.c: * gtk/gtkbutton.c: * gtk/gtkcheckmenuitem.c: * gtk/gtkclist.c: * gtk/gtkcolorsel.c: * gtk/gtkcontainer.c: * gtk/gtkcurve.c: * gtk/gtkdata.c: * gtk/gtkeditable.c: * gtk/gtkentry.c: * gtk/gtkhandlebox.c: * gtk/gtkinputdialog.c: * gtk/gtkitem.c: * gtk/gtklist.c: * gtk/gtkmenuitem.c: * gtk/gtkmenushell.c: * gtk/gtknotebook.c: * gtk/gtkstatusbar.c: * gtk/gtktoolbar.c: * gtk/gtktree.c: * gtk/gtktreeitem.c: * gtk/gtkwidget.c: * gtk/gtktogglebutton.c: * gtk/gtkwindow.c: made the <widget>_signals[] arrays of type guint rather than gint. * gtk/gtkwidget.c (gtk_widget_get_ancestor): made widget_type a GtkType. * gtk/gtkcombo.h: handler ids need to be of type guint (entry_change_id, list_change_id). * gtk/gtkaccelerator.c: changed signal_num to signal_id and typed it guint. * gtk/gtkmain.c: made gtk_ndebug_keys a guint. * gtk/gtkmenu.h: * gtk/gtkmenu.c: (gtk_menu_popup): made button a guint. (gtk_menu_set_active): made index a guint. * gtk/gtkmenuitem.h: * gtk/gtkmenuitem.c: made accelerator_signal a guint. * gtk/gtkoptionmenu.h: * gtk/gtkoptionmenu.c: (gtk_option_menu_set_history): made index a guint. * gtk/gtksignal.h: * gtk/gtksignal.c: * gtk/gtkobject.h: * gtk/gtkobject.c: changed a bunch of prototypes to take guints rather than gints. also made some conversions from guint to GtkType, left over from when the fundamental-types system was introduced. * gtk/gtkobject.h: * gtk/gtkobject.c: made object_data_id_index and obj_count guints. made *signals and nsignals guints in GtkObjectClass.
1998-03-09 15:16:28 +00:00
guint activate_signal;
added args ::show_text, ::text_xalign, ::text_yalign, ::activity_mode. Sun Nov 22 16:21:28 1998 Tim Janik <timj@gtk.org> * gtk/gtkprogress.c: added args ::show_text, ::text_xalign, ::text_yalign, ::activity_mode. * gtk/gtkprogressbar.c: added construct arg ::adjustment. added args ::bar_style, ::orientation, ::discrete_blocks, ::activity_step, ::activity_blocks. (gtk_progress_bar_new): (gtk_progress_bar_new_with_adjustment): use gtk_widget_new(). (gtk_progress_bar_construct): deprecated. * gtk/gtkvscrollbar.c: (gtk_vscrollbar_draw_step_back): (gtk_vscrollbar_draw_step_forw): use "vscrollbar" as detail for gtk_paint_arrow, to be consistent with hscrollbar. * gtk/gtktext.c added construct args ::hadjustment, ::vadjustment. added args ::line_wrap, ::word_wrap. (gtk_text_class_init): added scroll_adjustments signal. (gtk_text_new): use gtk_widget_new. (gtk_text_disconnect): remove adjustement with gtk_text_set_adjustments, so we don't screw the reference counts and don't leave signals connected. (gtk_text_destroy): disconnect adjustments signals. (gtk_text_finalize): unref adjustments. * gtk/gtkctree.c: added construct args ::n_columns and ::tree_column. added args ::indent, ::spacing, ::show_stub, ::reorderable, ::use_drag_icons, ::line_style and ::expander_style. (gtk_ctree_set_show_stub): renamed from gtk_ctree_show_stub, which is deprecated now. * gtk/gtkclist.h: remove GTK_CLIST_CONSTRUCT flag. * gtk/gtkclist.c: removed ::vadjustment and ::hadjustment args, introduced ::scroll_adjustments signal. added ::shadow_type, ::selection_mode and ::row_height args. added n_columns construct arg. (gtk_clist_construct): call gtk_object_constructed(). (gtk_clist_set_row_height): if height is passed as 0, revert to automatic height calculation. (gtk_clist_destroy): before unrefing the adjustments, disconnect our signal handlers. Fri Nov 21 22:34:58 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_new): call gtk_object_default_construct like gtk_object_new. (gtk_widget_destroy): assert that we only destroy constructed widgets. * gtk/gtkobject.h (enum GtkArgFlags): new flag GTK_ARG_CONSTRUCT_ONLY to identify args that may only be used for construction. GTK_ARG_CONSTRUCT maybe used as normal arguments besides construction time. * gtk/gtkobject.c (gtk_object_new): invoke gtk_object_default_construct at the end if the object is not fully constructed. (gtk_object_newv): likewise. (gtk_object_destroy): assert that we only destroy constructed objects. (gtk_object_init): setup GTK_CONSTRUCTED from the objects real klass. (gtk_object_default_construct): new function to complete default construction of an object by applying missing construtor args with default values of 0, 0.0 or NULL. (gtk_object_constructed): new function to mark an object as being constructed (used from within constructors). * gtk/gtkarg.c (gtk_arg_type_new_static): return the args info pointer so it is immediatedly available for the caller. * gtk/gtktypeutils.c (gtk_type_new): pass an object's real class to the object initilizer (GtkObjectInitFunc takes a second arg now, the real klass), and asure that object initializers may temporarily alter the class pointer. Fri Nov 20 08:00:30 1998 Tim Janik <timj@gtk.org> * gtk/testgtk.c: change all occourances of gtk_container_add ( scrolled_window, widget) to gtk_scrolled_window_add_with_viewport (...) for widget!=(clist, ctree, text, viewport). * gtk/gtkcombo.c: (gtk_combo_init): use gtk_scrolled_window_add_with_viewport() to add children to the scrolled window. * gtk/gtkscrolledwindow.h: * gtk/gtkscrolledwindow.c: changed scrolled_window->viewport to scrolled_window->child, and use gtk_widget_scroll_adjustements() to set the scroll adjustments for the widget, we do not create an additional viewport anymore. added ::hadjustment and ::vadjustment constructor args. (gtk_scrolled_window_new): use gtk_widget_new() to create the widget. (gtk_scrolled_window_set_hadjustment): (gtk_scrolled_window_set_vadjustment): new functions that superceed gtk_scrolled_window_construct. (gtk_scrolled_window_construct): deprecated this function. * gtk/gtkhscrollbar.c: * gtk/gtkvscrollbar.c: * gtk/gtkhscale.c: * gtk/gtkvscale.c: support a constructor arg "::adjustment", and use gtk_widget_new() for the widget creation. * gtk/gtkrange.c: added ::update_policy arg. (gtk_range_set_adjustment): if adjustment is passed in as NULL, create a default adjustment so this function can be used for derived widgets that depend on the adjustment's existance. (gtk_range_destroy): disconnect the adjustment signal, so we don't get called after we got destroyed, we don't destroy the adjustment in here, because it might have been provided from another widget. * gtk/gtkviewport.c: introduced ::scroll_adjustments signal. (gtk_viewport_destroy): same as gtk_range_destroy. * gtk/gtkprogress.c (gtk_progress_destroy): same as gtk_range_destroy. * gtk/gtkwidget.h: * gtk/gtkwidget.c: changed gtk_widget_activate() to return a gboolean, indicating whether this widget supports activation. added gtk_widget_scroll_adjustements() to set the scrolling adjustments of a widget. Wed Nov 19 01:22:42 1998 Tim Janik <timj@gtk.org> * gtk/gtkoptionmenu.c: (gtk_option_menu_remove_contents): (gtk_option_menu_update_contents): removed gtk_container_[un]block_resize() pairs. * gtk/gtknotebook.h: * gtk/gtknotebook.c: removed the tab_border field, since it shouldn't be used outside of gtknotebook.c anyways. made ARG_TAB_BORDER a wrtie-only argument. * *.c: made deprecated functions issue a message: gtk_clist_set_border, gtk_container_block_resize, gtk_container_unblock_resize, gtk_container_need_resize, gtk_object_class_add_user_signal, gtk_spin_button_construct, gtk_scrolled_window_construct. removed non-functional functions: gtk_container_disable_resize, gtk_container_enable_resize, gtk_clist_set_policy. Wed Nov 18 22:54:36 1998 Tim Janik <timj@gtk.org> * gtk/gtkbox.c (gtk_box_init): * gtk/gtkdrawingarea.c (gtk_drawing_area_init): * gtk/gtkeventbox.c (gtk_event_box_init): * gtk/gtkfixed.c (gtk_fixed_init): * gtk/gtkframe.c (gtk_frame_init): * gtk/gtkhandlebox.c (gtk_handle_box_init): * gtk/gtkpacker.c (gtk_packer_init): * gtk/gtkmisc.c (gtk_misc_init): * gtk/gtkpreview.c (gtk_preview_init): * gtk/gtkprogress.c (gtk_progress_init): * gtk/gtkprogressbar.c (gtk_progress_bar_init): * gtk/gtkseparator.c (gtk_separator_init): * gtk/gtktable.c (gtk_table_init): * gtk/gtkviewport.c (gtk_viewport_init): * gtk/gtkalignment.c (gtk_alignment_init): removed setting of the GTK_BASIC flag. * gtk/gtkwidget.h: * gtk/gtkwidget.c: removed GTK_BASIC, GTK_WIDGET_BASIC and gtk_widget_basic. * miscellaneous GtkType and macro fixups.
1998-11-23 01:54:45 +00:00
/* This signal is emitted when a widget of this class is added
* to a scrolling aware parent, gtk_widget_set_scroll_adjustments()
* handles the emission.
* Implementation of this signal is optional.
*/
s/gtk_notebook_nth_page/gtk_notebook_get_nth_page/. Wed Dec 2 01:39:02 1998 Tim Janik <timj@gtk.org> * gtk/gtknotebook.h: * gtk/gtknotebook.c: s/gtk_notebook_nth_page/gtk_notebook_get_nth_page/. * incremented version number to 1.1.6 and made Gtk dependant on GLib 1.1.6. * gtk/gtkwidget.h (struct _GtkRequisition): changed width and height from guint16 to gint16, since sizes bigger than 32767 are not supported anyways, and aritmethics with intermediate negative values are possible now. Tue Dec 1 00:00:04 1998 Tim Janik <timj@gtk.org> * gtk/gtkscrolledwindow.c: implementation of GTK_POLICY_NEVER functionality, added rationales on the policy and size requisition handling at the top. (gtk_scrolled_window_size_request): we assume a default minimum for our child's width and height if [hv]scrollbar_policy != GTK_POLICY_NEVER, except when the user specified the dimension explicitely. (gtk_scrolled_window_size_allocate): do not show scrollbars if [hv]scrollbar_policy == GTK_POLICY_NEVER. * gtk/gtkviewport.c (gtk_viewport_size_request): report the real size we require (including the child). * gtk/gtkclist.c: (gtk_clist_size_request): report the real size required. * gtk/gtkenums.h (enum GtkPolicyType): added GTK_POLICY_NEVER. * gtk/gtkobject.c (gtk_object_init_type): object_type doesn't need to be a static variable. Mon Nov 30 22:41:25 1998 Tim Janik <timj@gtk.org> * gtk/gtkclist.h: * gtk/gtkclist.c: * gtk/gtkviewport.h: * gtk/gtkviewport.c: * gtk/gtktext.h: * gtk/gtktext.c: * gtk/gtklayout.h: * gtk/gtklayout.c: * gtk/gtkwidget.h: * gtk/gtkwidget.c: * gtk/gtkscrolledwindow.h: * gtk/gtkscrolledwindow.c: s/scroll_adjustements/scroll_adjustments/ s/scroll_adjustments/set_scroll_adjustments/g
1998-12-02 03:40:03 +00:00
guint set_scroll_adjustments_signal;
1997-11-24 22:37:52 +00:00
/* basics */
void (* show) (GtkWidget *widget);
GTK_MENU_DIR_CHILD: check for the existance of Thu Sep 3 04:22:20 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenushell.c (gtk_real_menu_shell_move_current): GTK_MENU_DIR_CHILD: check for the existance of menu_shell->active_menu_item before accessing its child. GTK_MENU_DIR_PREV: GTK_MENU_DIR_NEXT: if we haven't had an active item and still don't, make a default selection. Wed Sep 2 00:28:58 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_propagate_state): iterate the children with _forall for sensitivity changes and with _foreach on pure state changes. this fixes a lot of the old inclusions of internal widgets into _foreach calls. * gtk/gtktree.c: removed gtk_tree_foreach, let gtk_tree_forall do the work. don't walk the subtrees of first level children. * gtk/gtktreeitem.c: provide a _forall implementation, which walks the subtrees as well for include_internals. * gtk/gtkmenuitem.c: provide a _forall implementation, which walks the submenus as well for include_internals. * gtk/gtkscrolledwindow.c: removed gtk_scrolled_window_foreach and implemented gtk_scrolled_window_forall, which will iterate over the viewport and the scrollbars for gtk_container_forall or iterate over the viewports children for gtk_container_foreach. * gtk/gtktoolbar.c: * gtk/gtktable.c: * gtk/gtkpaned.c: * gtk/gtkpacker.c: * gtk/gtkmenushell.c: * gtk/gtklist.c: * gtk/gtkfixed.c: * gtk/gtkclist.c: * gtk/gtkbox.c: * gtk/gtkbin.c: * gtk/gtknotebook.c: removed the old gtk_*_foreach functions and provided gtk_*_forall. * gtk/gtknotebook.c: (gtk_notebook_real_switch_page): expose tabs. (gtk_notebook_page_num): new function to return the page number of a distinct child. (gtk_notebook_focus): minor fixups. foxus handling is still screwed under some circumstances. * gtk/gtktreeitem.c: (gtk_real_tree_item_select): (gtk_real_tree_item_deselect): major fixes. some general fixups wrt queue_redraw, and tree items not being NO_WINDOW widgets. * gtk/gtklistitem.c: (gtk_real_list_item_select): (gtk_real_list_item_deselect): (gtk_real_list_item_toggle): removed unneccessary queue_redraw calls. Wed Aug 30 09:42:07 1998 Tim Janik <timj@gtk.org> * gtk/gtkoptionmenu.c: allow optionmenus to have the focus and automatically popup the menu on space bar. Wed Aug 26 06:40:34 1998 Tim Janik <timj@gtk.org> * gtk/gtkcontainer.h: * gtk/gtkcontainer.c: implemented gtk_container_forall() (as a class method), which acts similar to gtk_container_foreach(), but iterates over internal children. the GtkContainer::foreach signal vanished in favour of a new class method ->forall() that optionally includes internal widgets. * gtk/gtkclist.c (gtk_clist_init): provide no _foreach implementation but a _forall implementation, since all child widgets we have are internal ones. (column_button_create): set the parent window prior to gtk_widget_set_parent(). * gtk/gtkwidget.c: exchanged all calls to gtk_container_foreach() with gtk_container_forall(). * gtk/gtkwidget.h: * gtk/gtkwidget.c: added the GTK_COMPOSITE_CHILD, exported through the GtkWidget::composite_child argument. to have a widget created with the flag initially, two new functions got added to wrap a widgets creation: gtk_widget_push_composite_flag() and gtk_widget_pop_composite_flag(). Wed Aug 25 23:37:39 1998 Tim Janik <timj@gtk.org> * gtk/gtktooltips.h: * gtk/gtktooltips.c: exported gtk_tooltips_create_window() as gtk_tooltips_force_window(), so tooltips->tip_window can be accessed prior to the first tip being set. don't put an extra reference on the window, since it is a toplevel, it wont get destroyed from anywhere else. * overall macro and GtkType fixups.
1998-09-03 02:38:53 +00:00
void (* show_all) (GtkWidget *widget);
void (* hide) (GtkWidget *widget);
GTK_MENU_DIR_CHILD: check for the existance of Thu Sep 3 04:22:20 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenushell.c (gtk_real_menu_shell_move_current): GTK_MENU_DIR_CHILD: check for the existance of menu_shell->active_menu_item before accessing its child. GTK_MENU_DIR_PREV: GTK_MENU_DIR_NEXT: if we haven't had an active item and still don't, make a default selection. Wed Sep 2 00:28:58 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_propagate_state): iterate the children with _forall for sensitivity changes and with _foreach on pure state changes. this fixes a lot of the old inclusions of internal widgets into _foreach calls. * gtk/gtktree.c: removed gtk_tree_foreach, let gtk_tree_forall do the work. don't walk the subtrees of first level children. * gtk/gtktreeitem.c: provide a _forall implementation, which walks the subtrees as well for include_internals. * gtk/gtkmenuitem.c: provide a _forall implementation, which walks the submenus as well for include_internals. * gtk/gtkscrolledwindow.c: removed gtk_scrolled_window_foreach and implemented gtk_scrolled_window_forall, which will iterate over the viewport and the scrollbars for gtk_container_forall or iterate over the viewports children for gtk_container_foreach. * gtk/gtktoolbar.c: * gtk/gtktable.c: * gtk/gtkpaned.c: * gtk/gtkpacker.c: * gtk/gtkmenushell.c: * gtk/gtklist.c: * gtk/gtkfixed.c: * gtk/gtkclist.c: * gtk/gtkbox.c: * gtk/gtkbin.c: * gtk/gtknotebook.c: removed the old gtk_*_foreach functions and provided gtk_*_forall. * gtk/gtknotebook.c: (gtk_notebook_real_switch_page): expose tabs. (gtk_notebook_page_num): new function to return the page number of a distinct child. (gtk_notebook_focus): minor fixups. foxus handling is still screwed under some circumstances. * gtk/gtktreeitem.c: (gtk_real_tree_item_select): (gtk_real_tree_item_deselect): major fixes. some general fixups wrt queue_redraw, and tree items not being NO_WINDOW widgets. * gtk/gtklistitem.c: (gtk_real_list_item_select): (gtk_real_list_item_deselect): (gtk_real_list_item_toggle): removed unneccessary queue_redraw calls. Wed Aug 30 09:42:07 1998 Tim Janik <timj@gtk.org> * gtk/gtkoptionmenu.c: allow optionmenus to have the focus and automatically popup the menu on space bar. Wed Aug 26 06:40:34 1998 Tim Janik <timj@gtk.org> * gtk/gtkcontainer.h: * gtk/gtkcontainer.c: implemented gtk_container_forall() (as a class method), which acts similar to gtk_container_foreach(), but iterates over internal children. the GtkContainer::foreach signal vanished in favour of a new class method ->forall() that optionally includes internal widgets. * gtk/gtkclist.c (gtk_clist_init): provide no _foreach implementation but a _forall implementation, since all child widgets we have are internal ones. (column_button_create): set the parent window prior to gtk_widget_set_parent(). * gtk/gtkwidget.c: exchanged all calls to gtk_container_foreach() with gtk_container_forall(). * gtk/gtkwidget.h: * gtk/gtkwidget.c: added the GTK_COMPOSITE_CHILD, exported through the GtkWidget::composite_child argument. to have a widget created with the flag initially, two new functions got added to wrap a widgets creation: gtk_widget_push_composite_flag() and gtk_widget_pop_composite_flag(). Wed Aug 25 23:37:39 1998 Tim Janik <timj@gtk.org> * gtk/gtktooltips.h: * gtk/gtktooltips.c: exported gtk_tooltips_create_window() as gtk_tooltips_force_window(), so tooltips->tip_window can be accessed prior to the first tip being set. don't put an extra reference on the window, since it is a toplevel, it wont get destroyed from anywhere else. * overall macro and GtkType fixups.
1998-09-03 02:38:53 +00:00
void (* hide_all) (GtkWidget *widget);
void (* map) (GtkWidget *widget);
void (* unmap) (GtkWidget *widget);
void (* realize) (GtkWidget *widget);
void (* unrealize) (GtkWidget *widget);
void (* draw) (GtkWidget *widget,
1997-11-24 22:37:52 +00:00
GdkRectangle *area);
void (* draw_focus) (GtkWidget *widget);
void (* draw_default) (GtkWidget *widget);
void (* size_request) (GtkWidget *widget,
1997-11-24 22:37:52 +00:00
GtkRequisition *requisition);
void (* size_allocate) (GtkWidget *widget,
GtkAllocation *allocation);
void (* state_changed) (GtkWidget *widget,
new functions gtk_selection_data_copy and gtk_selection_data_free. Tue Jun 9 01:57:23 1998 Tim Janik <timj@gtk.org> * gtk/gtkselection.h: * gtk/gtkselection.c: new functions gtk_selection_data_copy and gtk_selection_data_free. * gtk/gtkwidget.c (gtk_widget_class_init): fixed gtk_signal_new() call for "selection_received", which was completely bogus. * other fixups to gtk_signal_new() calls all over the place. * gtk/gtktypebuiltins.h: types as variables (formerly macros). * gtk/gtktypebuiltins_vars.c: type variable implementations. * gtk/gtktypebuiltins_ids.c: array entries for builtin type declarations. * gtk/gtktypebuiltins_evals.c: enum value arrays. * gtk/gtk-boxed.defs: gtk and gdk structure definitions, used to build gtk.defs. * gtk/gtk.defs: generated file with scheme syntax for type definitions of gtk and gdk structures and enums. * gtk/gtktypeutils.h: * gtk/gtktypeutils.c: reworked type ids, so they are variables not macros anymore (this fixes binary incompatibility with new enum definitions). * gtk/gtkwidget.c (gtk_widget_real_key_press_event): proccess possible key bindings for this widget. * gtk/gtkwindow.c (gtk_window_key_press_event): chain parent class' handler. * gtk/gtkobject.h: * gtk/gtkobject.c: removed gtk_object_class_new_user_signal_no_recurse() again. new functions gtk_object_class_user_signal_new () and gtk_object_class_user_signal_newv (), to feature the GtkSignalRunType flag on the signal creation. Mon Jun 8 20:52:21 1998 Tim Janik <timj@gtk.org> * gtk/gtkcontainer.h: new signal GtkContainer::set_focus_child.
1998-06-09 07:11:55 +00:00
GtkStateType previous_state);
void (* parent_set) (GtkWidget *widget,
GtkWidget *previous_parent);
void (* style_set) (GtkWidget *widget,
GtkStyle *previous_style);
1997-11-24 22:37:52 +00:00
/* accelerators */
fixed an assertment. Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org> * gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment. * gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from, this should eventually be done by gentypeinfo.el somewhen. * gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays. * gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the enum values of an enum type. * gtk/gtk.defs: * gtk/gtkcurve.h: * gtk/gtkobject.h: * gtk/gtkprivate.h: * gtk/gtkwidget.h: * gtk/gtkenums.h: brought enum/flags definitions in sync, added a few more enum definitions for bindings and pattern matching. * some more macro and GtkType fixups in various places. * gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used as a key-release modifier for the binding system. Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it was a stale list pointer that is already present in GtkMenuShell. * gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal GtkMenuShell::selection_done which is emitted after the menu shell poped down again and all possible menu items have been activated. Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue before activation of the menuitem, so the menu is actually taken off the screen prior to any menu item activation. * gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation for NULL nodes. * gtk/gtkwidget.h: * gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop the emission of the "add-accelerator" signal on a widget. this is usefull to prevent accelerator installation on certain widgets. * gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu labels left justified, by setting their alignment. stop accelerator installation for the menu items, since we use dynamic menus. Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenufactory.c: adaptions to use the new accel groups. people should *really* use GtkItemFactory. this is only for preserving source compatibility where possible, use of GtkMenuFactory is deprecated as of now. * gtk/gtkobject.h (gtk_object_class_add_user_signal): new function to create user signals of type GTK_RUN_NO_RECURSE. don't know why i missed this possibility when i added gtk_object_class_add_user_signal in late january. * gtk/gtkmain.c (gtk_init): ignore subsequent function calls. Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org> * gtk/gtkaccelgroup.h: * gtk/gtkaccelgroup.c: new implementation of the accelerator concept. * gtk/gtkaccellabel.h: * gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features display of the accelerators associated with a certain widget. * gtk/gtkitemfactory.h: * gtk/gtkitemfactory.c: new widget, item factory with automatic rc parsing and accelerator handling. * gtk/gtkmenu.c (gtk_menu_reposition): new function to care for positioning a menu. (gtk_menu_map): removed the allocation code. (gtk_menu_size_allocate): care for redrawing of children and resize our widget->window correctly. (gtk_menu_key_press): feature the new accelerator groups. * gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the submenu if neccessary. * gtk/gtkmenuitem.c: * gtk/gtkcheckmenuitem.c: * gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label() function variants. * gdk/gdk.c: (gdk_keyval_from_name): (gdk_keyval_name): new functions for keyval<->key-name associations. (gdk_keyval_to_upper): (gdk_keyval_to_lower): (gdk_keyval_is_upper): (gdk_keyval_is_lower): new functions to check/translate keyvalues with regards to their cases. Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a widget's class path. (gtk_widget_path): new function to calculate a widget's name path. * gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
gint (* add_accelerator) (GtkWidget *widget,
guint accel_signal_id,
GtkAccelGroup *accel_group,
guint accel_key,
new functions gtk_selection_data_copy and gtk_selection_data_free. Tue Jun 9 01:57:23 1998 Tim Janik <timj@gtk.org> * gtk/gtkselection.h: * gtk/gtkselection.c: new functions gtk_selection_data_copy and gtk_selection_data_free. * gtk/gtkwidget.c (gtk_widget_class_init): fixed gtk_signal_new() call for "selection_received", which was completely bogus. * other fixups to gtk_signal_new() calls all over the place. * gtk/gtktypebuiltins.h: types as variables (formerly macros). * gtk/gtktypebuiltins_vars.c: type variable implementations. * gtk/gtktypebuiltins_ids.c: array entries for builtin type declarations. * gtk/gtktypebuiltins_evals.c: enum value arrays. * gtk/gtk-boxed.defs: gtk and gdk structure definitions, used to build gtk.defs. * gtk/gtk.defs: generated file with scheme syntax for type definitions of gtk and gdk structures and enums. * gtk/gtktypeutils.h: * gtk/gtktypeutils.c: reworked type ids, so they are variables not macros anymore (this fixes binary incompatibility with new enum definitions). * gtk/gtkwidget.c (gtk_widget_real_key_press_event): proccess possible key bindings for this widget. * gtk/gtkwindow.c (gtk_window_key_press_event): chain parent class' handler. * gtk/gtkobject.h: * gtk/gtkobject.c: removed gtk_object_class_new_user_signal_no_recurse() again. new functions gtk_object_class_user_signal_new () and gtk_object_class_user_signal_newv (), to feature the GtkSignalRunType flag on the signal creation. Mon Jun 8 20:52:21 1998 Tim Janik <timj@gtk.org> * gtk/gtkcontainer.h: new signal GtkContainer::set_focus_child.
1998-06-09 07:11:55 +00:00
GdkModifierType accel_mods,
fixed an assertment. Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org> * gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment. * gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from, this should eventually be done by gentypeinfo.el somewhen. * gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays. * gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the enum values of an enum type. * gtk/gtk.defs: * gtk/gtkcurve.h: * gtk/gtkobject.h: * gtk/gtkprivate.h: * gtk/gtkwidget.h: * gtk/gtkenums.h: brought enum/flags definitions in sync, added a few more enum definitions for bindings and pattern matching. * some more macro and GtkType fixups in various places. * gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used as a key-release modifier for the binding system. Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it was a stale list pointer that is already present in GtkMenuShell. * gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal GtkMenuShell::selection_done which is emitted after the menu shell poped down again and all possible menu items have been activated. Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue before activation of the menuitem, so the menu is actually taken off the screen prior to any menu item activation. * gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation for NULL nodes. * gtk/gtkwidget.h: * gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop the emission of the "add-accelerator" signal on a widget. this is usefull to prevent accelerator installation on certain widgets. * gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu labels left justified, by setting their alignment. stop accelerator installation for the menu items, since we use dynamic menus. Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenufactory.c: adaptions to use the new accel groups. people should *really* use GtkItemFactory. this is only for preserving source compatibility where possible, use of GtkMenuFactory is deprecated as of now. * gtk/gtkobject.h (gtk_object_class_add_user_signal): new function to create user signals of type GTK_RUN_NO_RECURSE. don't know why i missed this possibility when i added gtk_object_class_add_user_signal in late january. * gtk/gtkmain.c (gtk_init): ignore subsequent function calls. Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org> * gtk/gtkaccelgroup.h: * gtk/gtkaccelgroup.c: new implementation of the accelerator concept. * gtk/gtkaccellabel.h: * gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features display of the accelerators associated with a certain widget. * gtk/gtkitemfactory.h: * gtk/gtkitemfactory.c: new widget, item factory with automatic rc parsing and accelerator handling. * gtk/gtkmenu.c (gtk_menu_reposition): new function to care for positioning a menu. (gtk_menu_map): removed the allocation code. (gtk_menu_size_allocate): care for redrawing of children and resize our widget->window correctly. (gtk_menu_key_press): feature the new accelerator groups. * gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the submenu if neccessary. * gtk/gtkmenuitem.c: * gtk/gtkcheckmenuitem.c: * gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label() function variants. * gdk/gdk.c: (gdk_keyval_from_name): (gdk_keyval_name): new functions for keyval<->key-name associations. (gdk_keyval_to_upper): (gdk_keyval_to_lower): (gdk_keyval_is_upper): (gdk_keyval_is_lower): new functions to check/translate keyvalues with regards to their cases. Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a widget's class path. (gtk_widget_path): new function to calculate a widget's name path. * gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
GtkAccelFlags accel_flags);
1997-11-24 22:37:52 +00:00
void (* remove_accelerator) (GtkWidget *widget,
fixed an assertment. Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org> * gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment. * gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from, this should eventually be done by gentypeinfo.el somewhen. * gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays. * gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the enum values of an enum type. * gtk/gtk.defs: * gtk/gtkcurve.h: * gtk/gtkobject.h: * gtk/gtkprivate.h: * gtk/gtkwidget.h: * gtk/gtkenums.h: brought enum/flags definitions in sync, added a few more enum definitions for bindings and pattern matching. * some more macro and GtkType fixups in various places. * gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used as a key-release modifier for the binding system. Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it was a stale list pointer that is already present in GtkMenuShell. * gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal GtkMenuShell::selection_done which is emitted after the menu shell poped down again and all possible menu items have been activated. Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue before activation of the menuitem, so the menu is actually taken off the screen prior to any menu item activation. * gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation for NULL nodes. * gtk/gtkwidget.h: * gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop the emission of the "add-accelerator" signal on a widget. this is usefull to prevent accelerator installation on certain widgets. * gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu labels left justified, by setting their alignment. stop accelerator installation for the menu items, since we use dynamic menus. Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenufactory.c: adaptions to use the new accel groups. people should *really* use GtkItemFactory. this is only for preserving source compatibility where possible, use of GtkMenuFactory is deprecated as of now. * gtk/gtkobject.h (gtk_object_class_add_user_signal): new function to create user signals of type GTK_RUN_NO_RECURSE. don't know why i missed this possibility when i added gtk_object_class_add_user_signal in late january. * gtk/gtkmain.c (gtk_init): ignore subsequent function calls. Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org> * gtk/gtkaccelgroup.h: * gtk/gtkaccelgroup.c: new implementation of the accelerator concept. * gtk/gtkaccellabel.h: * gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features display of the accelerators associated with a certain widget. * gtk/gtkitemfactory.h: * gtk/gtkitemfactory.c: new widget, item factory with automatic rc parsing and accelerator handling. * gtk/gtkmenu.c (gtk_menu_reposition): new function to care for positioning a menu. (gtk_menu_map): removed the allocation code. (gtk_menu_size_allocate): care for redrawing of children and resize our widget->window correctly. (gtk_menu_key_press): feature the new accelerator groups. * gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the submenu if neccessary. * gtk/gtkmenuitem.c: * gtk/gtkcheckmenuitem.c: * gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label() function variants. * gdk/gdk.c: (gdk_keyval_from_name): (gdk_keyval_name): new functions for keyval<->key-name associations. (gdk_keyval_to_upper): (gdk_keyval_to_lower): (gdk_keyval_is_upper): (gdk_keyval_is_lower): new functions to check/translate keyvalues with regards to their cases. Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a widget's class path. (gtk_widget_path): new function to calculate a widget's name path. * gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
GtkAccelGroup *accel_group,
guint accel_key,
new functions gtk_selection_data_copy and gtk_selection_data_free. Tue Jun 9 01:57:23 1998 Tim Janik <timj@gtk.org> * gtk/gtkselection.h: * gtk/gtkselection.c: new functions gtk_selection_data_copy and gtk_selection_data_free. * gtk/gtkwidget.c (gtk_widget_class_init): fixed gtk_signal_new() call for "selection_received", which was completely bogus. * other fixups to gtk_signal_new() calls all over the place. * gtk/gtktypebuiltins.h: types as variables (formerly macros). * gtk/gtktypebuiltins_vars.c: type variable implementations. * gtk/gtktypebuiltins_ids.c: array entries for builtin type declarations. * gtk/gtktypebuiltins_evals.c: enum value arrays. * gtk/gtk-boxed.defs: gtk and gdk structure definitions, used to build gtk.defs. * gtk/gtk.defs: generated file with scheme syntax for type definitions of gtk and gdk structures and enums. * gtk/gtktypeutils.h: * gtk/gtktypeutils.c: reworked type ids, so they are variables not macros anymore (this fixes binary incompatibility with new enum definitions). * gtk/gtkwidget.c (gtk_widget_real_key_press_event): proccess possible key bindings for this widget. * gtk/gtkwindow.c (gtk_window_key_press_event): chain parent class' handler. * gtk/gtkobject.h: * gtk/gtkobject.c: removed gtk_object_class_new_user_signal_no_recurse() again. new functions gtk_object_class_user_signal_new () and gtk_object_class_user_signal_newv (), to feature the GtkSignalRunType flag on the signal creation. Mon Jun 8 20:52:21 1998 Tim Janik <timj@gtk.org> * gtk/gtkcontainer.h: new signal GtkContainer::set_focus_child.
1998-06-09 07:11:55 +00:00
GdkModifierType accel_mods);
/* explicit focus */
void (* grab_focus) (GtkWidget *widget);
1997-11-24 22:37:52 +00:00
/* events */
gint (* event) (GtkWidget *widget,
GdkEvent *event);
gint (* button_press_event) (GtkWidget *widget,
GdkEventButton *event);
gint (* button_release_event) (GtkWidget *widget,
GdkEventButton *event);
gint (* motion_notify_event) (GtkWidget *widget,
GdkEventMotion *event);
gint (* delete_event) (GtkWidget *widget,
GdkEventAny *event);
gint (* destroy_event) (GtkWidget *widget,
GdkEventAny *event);
gint (* expose_event) (GtkWidget *widget,
GdkEventExpose *event);
gint (* key_press_event) (GtkWidget *widget,
GdkEventKey *event);
gint (* key_release_event) (GtkWidget *widget,
GdkEventKey *event);
gint (* enter_notify_event) (GtkWidget *widget,
GdkEventCrossing *event);
gint (* leave_notify_event) (GtkWidget *widget,
GdkEventCrossing *event);
gint (* configure_event) (GtkWidget *widget,
GdkEventConfigure *event);
gint (* focus_in_event) (GtkWidget *widget,
GdkEventFocus *event);
gint (* focus_out_event) (GtkWidget *widget,
GdkEventFocus *event);
gint (* map_event) (GtkWidget *widget,
GdkEventAny *event);
gint (* unmap_event) (GtkWidget *widget,
GdkEventAny *event);
gint (* property_notify_event) (GtkWidget *widget,
GdkEventProperty *event);
gint (* selection_clear_event) (GtkWidget *widget,
GdkEventSelection *event);
gint (* selection_request_event) (GtkWidget *widget,
GdkEventSelection *event);
gint (* selection_notify_event) (GtkWidget *widget,
GdkEventSelection *event);
gint (* proximity_in_event) (GtkWidget *widget,
GdkEventProximity *event);
gint (* proximity_out_event) (GtkWidget *widget,
GdkEventProximity *event);
gint (* visibility_notify_event) (GtkWidget *widget,
GdkEventVisibility *event);
gint (* client_event) (GtkWidget *widget,
GdkEventClient *event);
gint (* no_expose_event) (GtkWidget *widget,
GdkEventAny *event);
Added a modular client-message-filter mechanism, that is used for the DND Sun Oct 18 18:16:39 1998 Owen Taylor <otaylor@gtk.org> * gdk/gdk.c gdkprivate.h: Added a modular client-message-filter mechanism, that is used for the DND messages. Removed all the old DND code. * gdk/gdkcolormap.c gdk/gdkcolormap.h: Add a function to get the visual of a given colormap. * gtk/gtkcolorsel.c: Conversion to new DND, drag a color-swatch. * gdk/gdk.h gdk/gdkdnd.c: The low-level X oriented portions of drag and drop protocols. Sending and receiving client messages, and navigating window trees. * gdk/gdkimage.c: added a gdk_flush() when destroying SHM images to hopefully make it more likely that X will gracefully handle the segment being destroyed. * gdk/gdkprivate.h gtk/gtkdebug.h: Add new DND debugging flags. * gtk/gtkeditable.[ch]: Updates for the selection handling changes. * gtk/gtkselection.[ch]: Added GtkTargetList, a refcounted data structure for keeping track of lists of GdkAtom + information. Removed selection_handler_add in favor of a "drag_data_get" signal. * gtk/gtkdnd.[ch] gtk/gtk.h: New files - highlevel (event loop dependent) parts of the DND protocols, display of drag icons, drag-under highlighting, and the "default handlers". * gtk/gtkinvisible.[ch]: New widget - InputOnly offscreen windows that are used for reliable pointer grabs and selection handling in the DND code. * gtk/testdnd.c: New test program for new DND. (Old DND tests in testgtk still need to be converted.) * gtk/testselection.c: Use the new selection API. * docs/dnd_internals: Start at describing how all the new code works inside. * docs/Changes-1.2.txt: New file describing source-incompatible changes in GTK+-1.2. Sat Oct 17 22:50:34 1998 Owen Taylor <otaylor@gtk.org> * gdk/gdkwindow.c (gdk_window_remove_filter): Free the right list node. * gdk/gdkwindow.c (gdk_window_init): Add gdk_root_parent to the XID table so we can receive events on it. Wed Oct 14 12:57:40 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c gdk/gdk.h (gdk_event_get_time): New function to get the timestamp from a generic event. Fri Oct 9 13:16:04 1998 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_add_events): Added function that safely adds additional events to a widget's event mask, even if the widget has previously been realized. (We can do this, but not remove events from the event mask). Fri Oct 2 17:35:35 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_property_get): Allow type == 0, for AnyPropertyType. Fri Oct 2 10:32:21 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Add client-local hashing. Thu Sep 24 20:33:54 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_event_send_clientmessage_toall): serial isn't a timestamp. Thu Sep 17 14:23:03 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_event_translate): Removed printing of unknown window lookup warnings. (Made it a GDK_NOTE) - they happen in many circumstances.
1998-10-18 22:51:24 +00:00
1997-11-24 22:37:52 +00:00
/* selection */
Added a modular client-message-filter mechanism, that is used for the DND Sun Oct 18 18:16:39 1998 Owen Taylor <otaylor@gtk.org> * gdk/gdk.c gdkprivate.h: Added a modular client-message-filter mechanism, that is used for the DND messages. Removed all the old DND code. * gdk/gdkcolormap.c gdk/gdkcolormap.h: Add a function to get the visual of a given colormap. * gtk/gtkcolorsel.c: Conversion to new DND, drag a color-swatch. * gdk/gdk.h gdk/gdkdnd.c: The low-level X oriented portions of drag and drop protocols. Sending and receiving client messages, and navigating window trees. * gdk/gdkimage.c: added a gdk_flush() when destroying SHM images to hopefully make it more likely that X will gracefully handle the segment being destroyed. * gdk/gdkprivate.h gtk/gtkdebug.h: Add new DND debugging flags. * gtk/gtkeditable.[ch]: Updates for the selection handling changes. * gtk/gtkselection.[ch]: Added GtkTargetList, a refcounted data structure for keeping track of lists of GdkAtom + information. Removed selection_handler_add in favor of a "drag_data_get" signal. * gtk/gtkdnd.[ch] gtk/gtk.h: New files - highlevel (event loop dependent) parts of the DND protocols, display of drag icons, drag-under highlighting, and the "default handlers". * gtk/gtkinvisible.[ch]: New widget - InputOnly offscreen windows that are used for reliable pointer grabs and selection handling in the DND code. * gtk/testdnd.c: New test program for new DND. (Old DND tests in testgtk still need to be converted.) * gtk/testselection.c: Use the new selection API. * docs/dnd_internals: Start at describing how all the new code works inside. * docs/Changes-1.2.txt: New file describing source-incompatible changes in GTK+-1.2. Sat Oct 17 22:50:34 1998 Owen Taylor <otaylor@gtk.org> * gdk/gdkwindow.c (gdk_window_remove_filter): Free the right list node. * gdk/gdkwindow.c (gdk_window_init): Add gdk_root_parent to the XID table so we can receive events on it. Wed Oct 14 12:57:40 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c gdk/gdk.h (gdk_event_get_time): New function to get the timestamp from a generic event. Fri Oct 9 13:16:04 1998 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_add_events): Added function that safely adds additional events to a widget's event mask, even if the widget has previously been realized. (We can do this, but not remove events from the event mask). Fri Oct 2 17:35:35 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_property_get): Allow type == 0, for AnyPropertyType. Fri Oct 2 10:32:21 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Add client-local hashing. Thu Sep 24 20:33:54 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_event_send_clientmessage_toall): serial isn't a timestamp. Thu Sep 17 14:23:03 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_event_translate): Removed printing of unknown window lookup warnings. (Made it a GDK_NOTE) - they happen in many circumstances.
1998-10-18 22:51:24 +00:00
void (* selection_get) (GtkWidget *widget,
GtkSelectionData *selection_data,
guint info,
guint time);
new functions gtk_selection_data_copy and gtk_selection_data_free. Tue Jun 9 01:57:23 1998 Tim Janik <timj@gtk.org> * gtk/gtkselection.h: * gtk/gtkselection.c: new functions gtk_selection_data_copy and gtk_selection_data_free. * gtk/gtkwidget.c (gtk_widget_class_init): fixed gtk_signal_new() call for "selection_received", which was completely bogus. * other fixups to gtk_signal_new() calls all over the place. * gtk/gtktypebuiltins.h: types as variables (formerly macros). * gtk/gtktypebuiltins_vars.c: type variable implementations. * gtk/gtktypebuiltins_ids.c: array entries for builtin type declarations. * gtk/gtktypebuiltins_evals.c: enum value arrays. * gtk/gtk-boxed.defs: gtk and gdk structure definitions, used to build gtk.defs. * gtk/gtk.defs: generated file with scheme syntax for type definitions of gtk and gdk structures and enums. * gtk/gtktypeutils.h: * gtk/gtktypeutils.c: reworked type ids, so they are variables not macros anymore (this fixes binary incompatibility with new enum definitions). * gtk/gtkwidget.c (gtk_widget_real_key_press_event): proccess possible key bindings for this widget. * gtk/gtkwindow.c (gtk_window_key_press_event): chain parent class' handler. * gtk/gtkobject.h: * gtk/gtkobject.c: removed gtk_object_class_new_user_signal_no_recurse() again. new functions gtk_object_class_user_signal_new () and gtk_object_class_user_signal_newv (), to feature the GtkSignalRunType flag on the signal creation. Mon Jun 8 20:52:21 1998 Tim Janik <timj@gtk.org> * gtk/gtkcontainer.h: new signal GtkContainer::set_focus_child.
1998-06-09 07:11:55 +00:00
void (* selection_received) (GtkWidget *widget,
Added a modular client-message-filter mechanism, that is used for the DND Sun Oct 18 18:16:39 1998 Owen Taylor <otaylor@gtk.org> * gdk/gdk.c gdkprivate.h: Added a modular client-message-filter mechanism, that is used for the DND messages. Removed all the old DND code. * gdk/gdkcolormap.c gdk/gdkcolormap.h: Add a function to get the visual of a given colormap. * gtk/gtkcolorsel.c: Conversion to new DND, drag a color-swatch. * gdk/gdk.h gdk/gdkdnd.c: The low-level X oriented portions of drag and drop protocols. Sending and receiving client messages, and navigating window trees. * gdk/gdkimage.c: added a gdk_flush() when destroying SHM images to hopefully make it more likely that X will gracefully handle the segment being destroyed. * gdk/gdkprivate.h gtk/gtkdebug.h: Add new DND debugging flags. * gtk/gtkeditable.[ch]: Updates for the selection handling changes. * gtk/gtkselection.[ch]: Added GtkTargetList, a refcounted data structure for keeping track of lists of GdkAtom + information. Removed selection_handler_add in favor of a "drag_data_get" signal. * gtk/gtkdnd.[ch] gtk/gtk.h: New files - highlevel (event loop dependent) parts of the DND protocols, display of drag icons, drag-under highlighting, and the "default handlers". * gtk/gtkinvisible.[ch]: New widget - InputOnly offscreen windows that are used for reliable pointer grabs and selection handling in the DND code. * gtk/testdnd.c: New test program for new DND. (Old DND tests in testgtk still need to be converted.) * gtk/testselection.c: Use the new selection API. * docs/dnd_internals: Start at describing how all the new code works inside. * docs/Changes-1.2.txt: New file describing source-incompatible changes in GTK+-1.2. Sat Oct 17 22:50:34 1998 Owen Taylor <otaylor@gtk.org> * gdk/gdkwindow.c (gdk_window_remove_filter): Free the right list node. * gdk/gdkwindow.c (gdk_window_init): Add gdk_root_parent to the XID table so we can receive events on it. Wed Oct 14 12:57:40 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c gdk/gdk.h (gdk_event_get_time): New function to get the timestamp from a generic event. Fri Oct 9 13:16:04 1998 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_add_events): Added function that safely adds additional events to a widget's event mask, even if the widget has previously been realized. (We can do this, but not remove events from the event mask). Fri Oct 2 17:35:35 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_property_get): Allow type == 0, for AnyPropertyType. Fri Oct 2 10:32:21 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Add client-local hashing. Thu Sep 24 20:33:54 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_event_send_clientmessage_toall): serial isn't a timestamp. Thu Sep 17 14:23:03 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_event_translate): Removed printing of unknown window lookup warnings. (Made it a GDK_NOTE) - they happen in many circumstances.
1998-10-18 22:51:24 +00:00
GtkSelectionData *selection_data,
guint time);
/* Source side drag signals */
void (* drag_begin) (GtkWidget *widget,
GdkDragContext *context);
void (* drag_end) (GtkWidget *widget,
GdkDragContext *context);
void (* drag_data_get) (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection_data,
guint info,
guint32 time);
void (* drag_data_delete) (GtkWidget *widget,
GdkDragContext *context);
/* Target side drag signals */
void (* drag_leave) (GtkWidget *widget,
GdkDragContext *context,
guint time);
gboolean (* drag_motion) (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
guint time);
gboolean (* drag_drop) (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
guint time);
void (* drag_data_received) (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
Added a modular client-message-filter mechanism, that is used for the DND Sun Oct 18 18:16:39 1998 Owen Taylor <otaylor@gtk.org> * gdk/gdk.c gdkprivate.h: Added a modular client-message-filter mechanism, that is used for the DND messages. Removed all the old DND code. * gdk/gdkcolormap.c gdk/gdkcolormap.h: Add a function to get the visual of a given colormap. * gtk/gtkcolorsel.c: Conversion to new DND, drag a color-swatch. * gdk/gdk.h gdk/gdkdnd.c: The low-level X oriented portions of drag and drop protocols. Sending and receiving client messages, and navigating window trees. * gdk/gdkimage.c: added a gdk_flush() when destroying SHM images to hopefully make it more likely that X will gracefully handle the segment being destroyed. * gdk/gdkprivate.h gtk/gtkdebug.h: Add new DND debugging flags. * gtk/gtkeditable.[ch]: Updates for the selection handling changes. * gtk/gtkselection.[ch]: Added GtkTargetList, a refcounted data structure for keeping track of lists of GdkAtom + information. Removed selection_handler_add in favor of a "drag_data_get" signal. * gtk/gtkdnd.[ch] gtk/gtk.h: New files - highlevel (event loop dependent) parts of the DND protocols, display of drag icons, drag-under highlighting, and the "default handlers". * gtk/gtkinvisible.[ch]: New widget - InputOnly offscreen windows that are used for reliable pointer grabs and selection handling in the DND code. * gtk/testdnd.c: New test program for new DND. (Old DND tests in testgtk still need to be converted.) * gtk/testselection.c: Use the new selection API. * docs/dnd_internals: Start at describing how all the new code works inside. * docs/Changes-1.2.txt: New file describing source-incompatible changes in GTK+-1.2. Sat Oct 17 22:50:34 1998 Owen Taylor <otaylor@gtk.org> * gdk/gdkwindow.c (gdk_window_remove_filter): Free the right list node. * gdk/gdkwindow.c (gdk_window_init): Add gdk_root_parent to the XID table so we can receive events on it. Wed Oct 14 12:57:40 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c gdk/gdk.h (gdk_event_get_time): New function to get the timestamp from a generic event. Fri Oct 9 13:16:04 1998 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_add_events): Added function that safely adds additional events to a widget's event mask, even if the widget has previously been realized. (We can do this, but not remove events from the event mask). Fri Oct 2 17:35:35 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_property_get): Allow type == 0, for AnyPropertyType. Fri Oct 2 10:32:21 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Add client-local hashing. Thu Sep 24 20:33:54 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_event_send_clientmessage_toall): serial isn't a timestamp. Thu Sep 17 14:23:03 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_event_translate): Removed printing of unknown window lookup warnings. (Made it a GDK_NOTE) - they happen in many circumstances.
1998-10-18 22:51:24 +00:00
GtkSelectionData *selection_data,
guint info,
guint32 time);
/* action signals */
void (* debug_msg) (GtkWidget *widget,
const gchar *string);
1997-11-24 22:37:52 +00:00
};
struct _GtkWidgetAuxInfo
{
gint16 x;
gint16 y;
gint16 width;
gint16 height;
1997-11-24 22:37:52 +00:00
};
struct _GtkWidgetShapeInfo
{
gint16 offset_x;
gint16 offset_y;
GdkBitmap *shape_mask;
};
GtkType gtk_widget_get_type (void);
GtkWidget* gtk_widget_new (GtkType type,
const gchar *first_arg_name,
1997-11-24 22:37:52 +00:00
...);
GtkWidget* gtk_widget_newv (GtkType type,
guint nargs,
GtkArg *args);
void gtk_widget_ref (GtkWidget *widget);
void gtk_widget_unref (GtkWidget *widget);
void gtk_widget_destroy (GtkWidget *widget);
void gtk_widget_destroyed (GtkWidget *widget,
GtkWidget **widget_pointer);
void gtk_widget_get (GtkWidget *widget,
GtkArg *arg);
void gtk_widget_getv (GtkWidget *widget,
guint nargs,
GtkArg *args);
void gtk_widget_set (GtkWidget *widget,
const gchar *first_arg_name,
1997-11-24 22:37:52 +00:00
...);
void gtk_widget_setv (GtkWidget *widget,
guint nargs,
GtkArg *args);
void gtk_widget_unparent (GtkWidget *widget);
void gtk_widget_show (GtkWidget *widget);
void gtk_widget_show_now (GtkWidget *widget);
void gtk_widget_hide (GtkWidget *widget);
void gtk_widget_show_all (GtkWidget *widget);
void gtk_widget_hide_all (GtkWidget *widget);
void gtk_widget_map (GtkWidget *widget);
void gtk_widget_unmap (GtkWidget *widget);
void gtk_widget_realize (GtkWidget *widget);
void gtk_widget_unrealize (GtkWidget *widget);
/* Queuing draws */
void gtk_widget_queue_draw (GtkWidget *widget);
void gtk_widget_queue_draw_area (GtkWidget *widget,
gint x,
gint y,
gint width,
gint height);
void gtk_widget_queue_clear (GtkWidget *widget);
void gtk_widget_queue_clear_area (GtkWidget *widget,
gint x,
gint y,
gint width,
gint height);
void gtk_widget_queue_resize (GtkWidget *widget);
void gtk_widget_draw (GtkWidget *widget,
GdkRectangle *area);
void gtk_widget_draw_focus (GtkWidget *widget);
void gtk_widget_draw_default (GtkWidget *widget);
void gtk_widget_size_request (GtkWidget *widget,
1997-11-24 22:37:52 +00:00
GtkRequisition *requisition);
void gtk_widget_size_allocate (GtkWidget *widget,
1997-11-24 22:37:52 +00:00
GtkAllocation *allocation);
void gtk_widget_get_child_requisition (GtkWidget *widget,
GtkRequisition *requisition);
fixed an assertment. Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org> * gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment. * gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from, this should eventually be done by gentypeinfo.el somewhen. * gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays. * gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the enum values of an enum type. * gtk/gtk.defs: * gtk/gtkcurve.h: * gtk/gtkobject.h: * gtk/gtkprivate.h: * gtk/gtkwidget.h: * gtk/gtkenums.h: brought enum/flags definitions in sync, added a few more enum definitions for bindings and pattern matching. * some more macro and GtkType fixups in various places. * gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used as a key-release modifier for the binding system. Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it was a stale list pointer that is already present in GtkMenuShell. * gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal GtkMenuShell::selection_done which is emitted after the menu shell poped down again and all possible menu items have been activated. Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue before activation of the menuitem, so the menu is actually taken off the screen prior to any menu item activation. * gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation for NULL nodes. * gtk/gtkwidget.h: * gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop the emission of the "add-accelerator" signal on a widget. this is usefull to prevent accelerator installation on certain widgets. * gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu labels left justified, by setting their alignment. stop accelerator installation for the menu items, since we use dynamic menus. Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenufactory.c: adaptions to use the new accel groups. people should *really* use GtkItemFactory. this is only for preserving source compatibility where possible, use of GtkMenuFactory is deprecated as of now. * gtk/gtkobject.h (gtk_object_class_add_user_signal): new function to create user signals of type GTK_RUN_NO_RECURSE. don't know why i missed this possibility when i added gtk_object_class_add_user_signal in late january. * gtk/gtkmain.c (gtk_init): ignore subsequent function calls. Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org> * gtk/gtkaccelgroup.h: * gtk/gtkaccelgroup.c: new implementation of the accelerator concept. * gtk/gtkaccellabel.h: * gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features display of the accelerators associated with a certain widget. * gtk/gtkitemfactory.h: * gtk/gtkitemfactory.c: new widget, item factory with automatic rc parsing and accelerator handling. * gtk/gtkmenu.c (gtk_menu_reposition): new function to care for positioning a menu. (gtk_menu_map): removed the allocation code. (gtk_menu_size_allocate): care for redrawing of children and resize our widget->window correctly. (gtk_menu_key_press): feature the new accelerator groups. * gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the submenu if neccessary. * gtk/gtkmenuitem.c: * gtk/gtkcheckmenuitem.c: * gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label() function variants. * gdk/gdk.c: (gdk_keyval_from_name): (gdk_keyval_name): new functions for keyval<->key-name associations. (gdk_keyval_to_upper): (gdk_keyval_to_lower): (gdk_keyval_is_upper): (gdk_keyval_is_lower): new functions to check/translate keyvalues with regards to their cases. Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a widget's class path. (gtk_widget_path): new function to calculate a widget's name path. * gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
void gtk_widget_add_accelerator (GtkWidget *widget,
const gchar *accel_signal,
GtkAccelGroup *accel_group,
guint accel_key,
guint accel_mods,
GtkAccelFlags accel_flags);
void gtk_widget_remove_accelerator (GtkWidget *widget,
GtkAccelGroup *accel_group,
guint accel_key,
guint accel_mods);
void gtk_widget_remove_accelerators (GtkWidget *widget,
const gchar *accel_signal,
gboolean visible_only);
guint gtk_widget_accelerator_signal (GtkWidget *widget,
GtkAccelGroup *accel_group,
guint accel_key,
guint accel_mods);
void gtk_widget_lock_accelerators (GtkWidget *widget);
void gtk_widget_unlock_accelerators (GtkWidget *widget);
gint gtk_widget_event (GtkWidget *widget,
GdkEvent *event);
s/gtk_notebook_nth_page/gtk_notebook_get_nth_page/. Wed Dec 2 01:39:02 1998 Tim Janik <timj@gtk.org> * gtk/gtknotebook.h: * gtk/gtknotebook.c: s/gtk_notebook_nth_page/gtk_notebook_get_nth_page/. * incremented version number to 1.1.6 and made Gtk dependant on GLib 1.1.6. * gtk/gtkwidget.h (struct _GtkRequisition): changed width and height from guint16 to gint16, since sizes bigger than 32767 are not supported anyways, and aritmethics with intermediate negative values are possible now. Tue Dec 1 00:00:04 1998 Tim Janik <timj@gtk.org> * gtk/gtkscrolledwindow.c: implementation of GTK_POLICY_NEVER functionality, added rationales on the policy and size requisition handling at the top. (gtk_scrolled_window_size_request): we assume a default minimum for our child's width and height if [hv]scrollbar_policy != GTK_POLICY_NEVER, except when the user specified the dimension explicitely. (gtk_scrolled_window_size_allocate): do not show scrollbars if [hv]scrollbar_policy == GTK_POLICY_NEVER. * gtk/gtkviewport.c (gtk_viewport_size_request): report the real size we require (including the child). * gtk/gtkclist.c: (gtk_clist_size_request): report the real size required. * gtk/gtkenums.h (enum GtkPolicyType): added GTK_POLICY_NEVER. * gtk/gtkobject.c (gtk_object_init_type): object_type doesn't need to be a static variable. Mon Nov 30 22:41:25 1998 Tim Janik <timj@gtk.org> * gtk/gtkclist.h: * gtk/gtkclist.c: * gtk/gtkviewport.h: * gtk/gtkviewport.c: * gtk/gtktext.h: * gtk/gtktext.c: * gtk/gtklayout.h: * gtk/gtklayout.c: * gtk/gtkwidget.h: * gtk/gtkwidget.c: * gtk/gtkscrolledwindow.h: * gtk/gtkscrolledwindow.c: s/scroll_adjustements/scroll_adjustments/ s/scroll_adjustments/set_scroll_adjustments/g
1998-12-02 03:40:03 +00:00
gboolean gtk_widget_activate (GtkWidget *widget);
gboolean gtk_widget_set_scroll_adjustments (GtkWidget *widget,
GtkAdjustment *hadjustment,
GtkAdjustment *vadjustment);
added args ::show_text, ::text_xalign, ::text_yalign, ::activity_mode. Sun Nov 22 16:21:28 1998 Tim Janik <timj@gtk.org> * gtk/gtkprogress.c: added args ::show_text, ::text_xalign, ::text_yalign, ::activity_mode. * gtk/gtkprogressbar.c: added construct arg ::adjustment. added args ::bar_style, ::orientation, ::discrete_blocks, ::activity_step, ::activity_blocks. (gtk_progress_bar_new): (gtk_progress_bar_new_with_adjustment): use gtk_widget_new(). (gtk_progress_bar_construct): deprecated. * gtk/gtkvscrollbar.c: (gtk_vscrollbar_draw_step_back): (gtk_vscrollbar_draw_step_forw): use "vscrollbar" as detail for gtk_paint_arrow, to be consistent with hscrollbar. * gtk/gtktext.c added construct args ::hadjustment, ::vadjustment. added args ::line_wrap, ::word_wrap. (gtk_text_class_init): added scroll_adjustments signal. (gtk_text_new): use gtk_widget_new. (gtk_text_disconnect): remove adjustement with gtk_text_set_adjustments, so we don't screw the reference counts and don't leave signals connected. (gtk_text_destroy): disconnect adjustments signals. (gtk_text_finalize): unref adjustments. * gtk/gtkctree.c: added construct args ::n_columns and ::tree_column. added args ::indent, ::spacing, ::show_stub, ::reorderable, ::use_drag_icons, ::line_style and ::expander_style. (gtk_ctree_set_show_stub): renamed from gtk_ctree_show_stub, which is deprecated now. * gtk/gtkclist.h: remove GTK_CLIST_CONSTRUCT flag. * gtk/gtkclist.c: removed ::vadjustment and ::hadjustment args, introduced ::scroll_adjustments signal. added ::shadow_type, ::selection_mode and ::row_height args. added n_columns construct arg. (gtk_clist_construct): call gtk_object_constructed(). (gtk_clist_set_row_height): if height is passed as 0, revert to automatic height calculation. (gtk_clist_destroy): before unrefing the adjustments, disconnect our signal handlers. Fri Nov 21 22:34:58 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_new): call gtk_object_default_construct like gtk_object_new. (gtk_widget_destroy): assert that we only destroy constructed widgets. * gtk/gtkobject.h (enum GtkArgFlags): new flag GTK_ARG_CONSTRUCT_ONLY to identify args that may only be used for construction. GTK_ARG_CONSTRUCT maybe used as normal arguments besides construction time. * gtk/gtkobject.c (gtk_object_new): invoke gtk_object_default_construct at the end if the object is not fully constructed. (gtk_object_newv): likewise. (gtk_object_destroy): assert that we only destroy constructed objects. (gtk_object_init): setup GTK_CONSTRUCTED from the objects real klass. (gtk_object_default_construct): new function to complete default construction of an object by applying missing construtor args with default values of 0, 0.0 or NULL. (gtk_object_constructed): new function to mark an object as being constructed (used from within constructors). * gtk/gtkarg.c (gtk_arg_type_new_static): return the args info pointer so it is immediatedly available for the caller. * gtk/gtktypeutils.c (gtk_type_new): pass an object's real class to the object initilizer (GtkObjectInitFunc takes a second arg now, the real klass), and asure that object initializers may temporarily alter the class pointer. Fri Nov 20 08:00:30 1998 Tim Janik <timj@gtk.org> * gtk/testgtk.c: change all occourances of gtk_container_add ( scrolled_window, widget) to gtk_scrolled_window_add_with_viewport (...) for widget!=(clist, ctree, text, viewport). * gtk/gtkcombo.c: (gtk_combo_init): use gtk_scrolled_window_add_with_viewport() to add children to the scrolled window. * gtk/gtkscrolledwindow.h: * gtk/gtkscrolledwindow.c: changed scrolled_window->viewport to scrolled_window->child, and use gtk_widget_scroll_adjustements() to set the scroll adjustments for the widget, we do not create an additional viewport anymore. added ::hadjustment and ::vadjustment constructor args. (gtk_scrolled_window_new): use gtk_widget_new() to create the widget. (gtk_scrolled_window_set_hadjustment): (gtk_scrolled_window_set_vadjustment): new functions that superceed gtk_scrolled_window_construct. (gtk_scrolled_window_construct): deprecated this function. * gtk/gtkhscrollbar.c: * gtk/gtkvscrollbar.c: * gtk/gtkhscale.c: * gtk/gtkvscale.c: support a constructor arg "::adjustment", and use gtk_widget_new() for the widget creation. * gtk/gtkrange.c: added ::update_policy arg. (gtk_range_set_adjustment): if adjustment is passed in as NULL, create a default adjustment so this function can be used for derived widgets that depend on the adjustment's existance. (gtk_range_destroy): disconnect the adjustment signal, so we don't get called after we got destroyed, we don't destroy the adjustment in here, because it might have been provided from another widget. * gtk/gtkviewport.c: introduced ::scroll_adjustments signal. (gtk_viewport_destroy): same as gtk_range_destroy. * gtk/gtkprogress.c (gtk_progress_destroy): same as gtk_range_destroy. * gtk/gtkwidget.h: * gtk/gtkwidget.c: changed gtk_widget_activate() to return a gboolean, indicating whether this widget supports activation. added gtk_widget_scroll_adjustements() to set the scrolling adjustments of a widget. Wed Nov 19 01:22:42 1998 Tim Janik <timj@gtk.org> * gtk/gtkoptionmenu.c: (gtk_option_menu_remove_contents): (gtk_option_menu_update_contents): removed gtk_container_[un]block_resize() pairs. * gtk/gtknotebook.h: * gtk/gtknotebook.c: removed the tab_border field, since it shouldn't be used outside of gtknotebook.c anyways. made ARG_TAB_BORDER a wrtie-only argument. * *.c: made deprecated functions issue a message: gtk_clist_set_border, gtk_container_block_resize, gtk_container_unblock_resize, gtk_container_need_resize, gtk_object_class_add_user_signal, gtk_spin_button_construct, gtk_scrolled_window_construct. removed non-functional functions: gtk_container_disable_resize, gtk_container_enable_resize, gtk_clist_set_policy. Wed Nov 18 22:54:36 1998 Tim Janik <timj@gtk.org> * gtk/gtkbox.c (gtk_box_init): * gtk/gtkdrawingarea.c (gtk_drawing_area_init): * gtk/gtkeventbox.c (gtk_event_box_init): * gtk/gtkfixed.c (gtk_fixed_init): * gtk/gtkframe.c (gtk_frame_init): * gtk/gtkhandlebox.c (gtk_handle_box_init): * gtk/gtkpacker.c (gtk_packer_init): * gtk/gtkmisc.c (gtk_misc_init): * gtk/gtkpreview.c (gtk_preview_init): * gtk/gtkprogress.c (gtk_progress_init): * gtk/gtkprogressbar.c (gtk_progress_bar_init): * gtk/gtkseparator.c (gtk_separator_init): * gtk/gtktable.c (gtk_table_init): * gtk/gtkviewport.c (gtk_viewport_init): * gtk/gtkalignment.c (gtk_alignment_init): removed setting of the GTK_BASIC flag. * gtk/gtkwidget.h: * gtk/gtkwidget.c: removed GTK_BASIC, GTK_WIDGET_BASIC and gtk_widget_basic. * miscellaneous GtkType and macro fixups.
1998-11-23 01:54:45 +00:00
void gtk_widget_reparent (GtkWidget *widget,
GtkWidget *new_parent);
void gtk_widget_popup (GtkWidget *widget,
gint x,
gint y);
gint gtk_widget_intersect (GtkWidget *widget,
GdkRectangle *area,
GdkRectangle *intersection);
void gtk_widget_grab_focus (GtkWidget *widget);
void gtk_widget_grab_default (GtkWidget *widget);
void gtk_widget_set_name (GtkWidget *widget,
const gchar *name);
gchar* gtk_widget_get_name (GtkWidget *widget);
void gtk_widget_set_state (GtkWidget *widget,
GtkStateType state);
void gtk_widget_set_sensitive (GtkWidget *widget,
gboolean sensitive);
void gtk_widget_set_app_paintable (GtkWidget *widget,
gboolean app_paintable);
void gtk_widget_set_parent (GtkWidget *widget,
GtkWidget *parent);
void gtk_widget_set_parent_window (GtkWidget *widget,
GdkWindow *parent_window);
GdkWindow *gtk_widget_get_parent_window (GtkWidget *widget);
void gtk_widget_set_uposition (GtkWidget *widget,
gint x,
gint y);
void gtk_widget_set_usize (GtkWidget *widget,
gint width,
gint height);
void gtk_widget_set_events (GtkWidget *widget,
gint events);
Added a modular client-message-filter mechanism, that is used for the DND Sun Oct 18 18:16:39 1998 Owen Taylor <otaylor@gtk.org> * gdk/gdk.c gdkprivate.h: Added a modular client-message-filter mechanism, that is used for the DND messages. Removed all the old DND code. * gdk/gdkcolormap.c gdk/gdkcolormap.h: Add a function to get the visual of a given colormap. * gtk/gtkcolorsel.c: Conversion to new DND, drag a color-swatch. * gdk/gdk.h gdk/gdkdnd.c: The low-level X oriented portions of drag and drop protocols. Sending and receiving client messages, and navigating window trees. * gdk/gdkimage.c: added a gdk_flush() when destroying SHM images to hopefully make it more likely that X will gracefully handle the segment being destroyed. * gdk/gdkprivate.h gtk/gtkdebug.h: Add new DND debugging flags. * gtk/gtkeditable.[ch]: Updates for the selection handling changes. * gtk/gtkselection.[ch]: Added GtkTargetList, a refcounted data structure for keeping track of lists of GdkAtom + information. Removed selection_handler_add in favor of a "drag_data_get" signal. * gtk/gtkdnd.[ch] gtk/gtk.h: New files - highlevel (event loop dependent) parts of the DND protocols, display of drag icons, drag-under highlighting, and the "default handlers". * gtk/gtkinvisible.[ch]: New widget - InputOnly offscreen windows that are used for reliable pointer grabs and selection handling in the DND code. * gtk/testdnd.c: New test program for new DND. (Old DND tests in testgtk still need to be converted.) * gtk/testselection.c: Use the new selection API. * docs/dnd_internals: Start at describing how all the new code works inside. * docs/Changes-1.2.txt: New file describing source-incompatible changes in GTK+-1.2. Sat Oct 17 22:50:34 1998 Owen Taylor <otaylor@gtk.org> * gdk/gdkwindow.c (gdk_window_remove_filter): Free the right list node. * gdk/gdkwindow.c (gdk_window_init): Add gdk_root_parent to the XID table so we can receive events on it. Wed Oct 14 12:57:40 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c gdk/gdk.h (gdk_event_get_time): New function to get the timestamp from a generic event. Fri Oct 9 13:16:04 1998 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_add_events): Added function that safely adds additional events to a widget's event mask, even if the widget has previously been realized. (We can do this, but not remove events from the event mask). Fri Oct 2 17:35:35 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_property_get): Allow type == 0, for AnyPropertyType. Fri Oct 2 10:32:21 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.c (gdk_atom_intern): Add client-local hashing. Thu Sep 24 20:33:54 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_event_send_clientmessage_toall): serial isn't a timestamp. Thu Sep 17 14:23:03 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_event_translate): Removed printing of unknown window lookup warnings. (Made it a GDK_NOTE) - they happen in many circumstances.
1998-10-18 22:51:24 +00:00
void gtk_widget_add_events (GtkWidget *widget,
gint events);
void gtk_widget_set_extension_events (GtkWidget *widget,
GdkExtensionMode mode);
1997-11-24 22:37:52 +00:00
GdkExtensionMode gtk_widget_get_extension_events (GtkWidget *widget);
GtkWidget* gtk_widget_get_toplevel (GtkWidget *widget);
GtkWidget* gtk_widget_get_ancestor (GtkWidget *widget,
made the <widget>_signals[] arrays of type guint rather than gint. made Mon Mar 9 15:48:10 1998 Tim Janik <timj@gimp.org> * Signal signedness and naming corrections, plus GtkType fixes: * gtk/gtkadjustment.c: * gtk/gtkbutton.c: * gtk/gtkcheckmenuitem.c: * gtk/gtkclist.c: * gtk/gtkcolorsel.c: * gtk/gtkcontainer.c: * gtk/gtkcurve.c: * gtk/gtkdata.c: * gtk/gtkeditable.c: * gtk/gtkentry.c: * gtk/gtkhandlebox.c: * gtk/gtkinputdialog.c: * gtk/gtkitem.c: * gtk/gtklist.c: * gtk/gtkmenuitem.c: * gtk/gtkmenushell.c: * gtk/gtknotebook.c: * gtk/gtkstatusbar.c: * gtk/gtktoolbar.c: * gtk/gtktree.c: * gtk/gtktreeitem.c: * gtk/gtkwidget.c: * gtk/gtktogglebutton.c: * gtk/gtkwindow.c: made the <widget>_signals[] arrays of type guint rather than gint. * gtk/gtkwidget.c (gtk_widget_get_ancestor): made widget_type a GtkType. * gtk/gtkcombo.h: handler ids need to be of type guint (entry_change_id, list_change_id). * gtk/gtkaccelerator.c: changed signal_num to signal_id and typed it guint. * gtk/gtkmain.c: made gtk_ndebug_keys a guint. * gtk/gtkmenu.h: * gtk/gtkmenu.c: (gtk_menu_popup): made button a guint. (gtk_menu_set_active): made index a guint. * gtk/gtkmenuitem.h: * gtk/gtkmenuitem.c: made accelerator_signal a guint. * gtk/gtkoptionmenu.h: * gtk/gtkoptionmenu.c: (gtk_option_menu_set_history): made index a guint. * gtk/gtksignal.h: * gtk/gtksignal.c: * gtk/gtkobject.h: * gtk/gtkobject.c: changed a bunch of prototypes to take guints rather than gints. also made some conversions from guint to GtkType, left over from when the fundamental-types system was introduced. * gtk/gtkobject.h: * gtk/gtkobject.c: made object_data_id_index and obj_count guints. made *signals and nsignals guints in GtkObjectClass.
1998-03-09 15:16:28 +00:00
GtkType widget_type);
GdkColormap* gtk_widget_get_colormap (GtkWidget *widget);
GdkVisual* gtk_widget_get_visual (GtkWidget *widget);
/* The following functions must not be called on an already
* realized widget. Because it is possible that somebody
* can call get_colormap() or get_visual() and save the
* result, these functions are probably only safe to
* call in a widget's init() function.
*/
void gtk_widget_set_colormap (GtkWidget *widget,
GdkColormap *colormap);
void gtk_widget_set_visual (GtkWidget *widget,
GdkVisual *visual);
gint gtk_widget_get_events (GtkWidget *widget);
void gtk_widget_get_pointer (GtkWidget *widget,
gint *x,
gint *y);
gint gtk_widget_is_ancestor (GtkWidget *widget,
GtkWidget *ancestor);
/* Hide widget and return TRUE.
*/
gint gtk_widget_hide_on_delete (GtkWidget *widget);
/* Widget styles.
*/
void gtk_widget_set_style (GtkWidget *widget,
GtkStyle *style);
void gtk_widget_set_rc_style (GtkWidget *widget);
void gtk_widget_ensure_style (GtkWidget *widget);
GtkStyle* gtk_widget_get_style (GtkWidget *widget);
void gtk_widget_restore_default_style (GtkWidget *widget);
void gtk_widget_modify_style (GtkWidget *widget,
GtkRcStyle *style);
/* handle composite names for GTK_COMPOSITE_CHILD widgets,
* the returned name is newly allocated.
*/
void gtk_widget_set_composite_name (GtkWidget *widget,
gchar *name);
gchar* gtk_widget_get_composite_name (GtkWidget *widget);
/* Descend recursively and set rc-style on all widgets without user styles */
void gtk_widget_reset_rc_styles (GtkWidget *widget);
/* Push/pop pairs, to change default values upon a widget's creation.
* This will override the values that got set by the
* gtk_widget_set_default_* () functions.
*/
added args ::show_text, ::text_xalign, ::text_yalign, ::activity_mode. Sun Nov 22 16:21:28 1998 Tim Janik <timj@gtk.org> * gtk/gtkprogress.c: added args ::show_text, ::text_xalign, ::text_yalign, ::activity_mode. * gtk/gtkprogressbar.c: added construct arg ::adjustment. added args ::bar_style, ::orientation, ::discrete_blocks, ::activity_step, ::activity_blocks. (gtk_progress_bar_new): (gtk_progress_bar_new_with_adjustment): use gtk_widget_new(). (gtk_progress_bar_construct): deprecated. * gtk/gtkvscrollbar.c: (gtk_vscrollbar_draw_step_back): (gtk_vscrollbar_draw_step_forw): use "vscrollbar" as detail for gtk_paint_arrow, to be consistent with hscrollbar. * gtk/gtktext.c added construct args ::hadjustment, ::vadjustment. added args ::line_wrap, ::word_wrap. (gtk_text_class_init): added scroll_adjustments signal. (gtk_text_new): use gtk_widget_new. (gtk_text_disconnect): remove adjustement with gtk_text_set_adjustments, so we don't screw the reference counts and don't leave signals connected. (gtk_text_destroy): disconnect adjustments signals. (gtk_text_finalize): unref adjustments. * gtk/gtkctree.c: added construct args ::n_columns and ::tree_column. added args ::indent, ::spacing, ::show_stub, ::reorderable, ::use_drag_icons, ::line_style and ::expander_style. (gtk_ctree_set_show_stub): renamed from gtk_ctree_show_stub, which is deprecated now. * gtk/gtkclist.h: remove GTK_CLIST_CONSTRUCT flag. * gtk/gtkclist.c: removed ::vadjustment and ::hadjustment args, introduced ::scroll_adjustments signal. added ::shadow_type, ::selection_mode and ::row_height args. added n_columns construct arg. (gtk_clist_construct): call gtk_object_constructed(). (gtk_clist_set_row_height): if height is passed as 0, revert to automatic height calculation. (gtk_clist_destroy): before unrefing the adjustments, disconnect our signal handlers. Fri Nov 21 22:34:58 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_new): call gtk_object_default_construct like gtk_object_new. (gtk_widget_destroy): assert that we only destroy constructed widgets. * gtk/gtkobject.h (enum GtkArgFlags): new flag GTK_ARG_CONSTRUCT_ONLY to identify args that may only be used for construction. GTK_ARG_CONSTRUCT maybe used as normal arguments besides construction time. * gtk/gtkobject.c (gtk_object_new): invoke gtk_object_default_construct at the end if the object is not fully constructed. (gtk_object_newv): likewise. (gtk_object_destroy): assert that we only destroy constructed objects. (gtk_object_init): setup GTK_CONSTRUCTED from the objects real klass. (gtk_object_default_construct): new function to complete default construction of an object by applying missing construtor args with default values of 0, 0.0 or NULL. (gtk_object_constructed): new function to mark an object as being constructed (used from within constructors). * gtk/gtkarg.c (gtk_arg_type_new_static): return the args info pointer so it is immediatedly available for the caller. * gtk/gtktypeutils.c (gtk_type_new): pass an object's real class to the object initilizer (GtkObjectInitFunc takes a second arg now, the real klass), and asure that object initializers may temporarily alter the class pointer. Fri Nov 20 08:00:30 1998 Tim Janik <timj@gtk.org> * gtk/testgtk.c: change all occourances of gtk_container_add ( scrolled_window, widget) to gtk_scrolled_window_add_with_viewport (...) for widget!=(clist, ctree, text, viewport). * gtk/gtkcombo.c: (gtk_combo_init): use gtk_scrolled_window_add_with_viewport() to add children to the scrolled window. * gtk/gtkscrolledwindow.h: * gtk/gtkscrolledwindow.c: changed scrolled_window->viewport to scrolled_window->child, and use gtk_widget_scroll_adjustements() to set the scroll adjustments for the widget, we do not create an additional viewport anymore. added ::hadjustment and ::vadjustment constructor args. (gtk_scrolled_window_new): use gtk_widget_new() to create the widget. (gtk_scrolled_window_set_hadjustment): (gtk_scrolled_window_set_vadjustment): new functions that superceed gtk_scrolled_window_construct. (gtk_scrolled_window_construct): deprecated this function. * gtk/gtkhscrollbar.c: * gtk/gtkvscrollbar.c: * gtk/gtkhscale.c: * gtk/gtkvscale.c: support a constructor arg "::adjustment", and use gtk_widget_new() for the widget creation. * gtk/gtkrange.c: added ::update_policy arg. (gtk_range_set_adjustment): if adjustment is passed in as NULL, create a default adjustment so this function can be used for derived widgets that depend on the adjustment's existance. (gtk_range_destroy): disconnect the adjustment signal, so we don't get called after we got destroyed, we don't destroy the adjustment in here, because it might have been provided from another widget. * gtk/gtkviewport.c: introduced ::scroll_adjustments signal. (gtk_viewport_destroy): same as gtk_range_destroy. * gtk/gtkprogress.c (gtk_progress_destroy): same as gtk_range_destroy. * gtk/gtkwidget.h: * gtk/gtkwidget.c: changed gtk_widget_activate() to return a gboolean, indicating whether this widget supports activation. added gtk_widget_scroll_adjustements() to set the scrolling adjustments of a widget. Wed Nov 19 01:22:42 1998 Tim Janik <timj@gtk.org> * gtk/gtkoptionmenu.c: (gtk_option_menu_remove_contents): (gtk_option_menu_update_contents): removed gtk_container_[un]block_resize() pairs. * gtk/gtknotebook.h: * gtk/gtknotebook.c: removed the tab_border field, since it shouldn't be used outside of gtknotebook.c anyways. made ARG_TAB_BORDER a wrtie-only argument. * *.c: made deprecated functions issue a message: gtk_clist_set_border, gtk_container_block_resize, gtk_container_unblock_resize, gtk_container_need_resize, gtk_object_class_add_user_signal, gtk_spin_button_construct, gtk_scrolled_window_construct. removed non-functional functions: gtk_container_disable_resize, gtk_container_enable_resize, gtk_clist_set_policy. Wed Nov 18 22:54:36 1998 Tim Janik <timj@gtk.org> * gtk/gtkbox.c (gtk_box_init): * gtk/gtkdrawingarea.c (gtk_drawing_area_init): * gtk/gtkeventbox.c (gtk_event_box_init): * gtk/gtkfixed.c (gtk_fixed_init): * gtk/gtkframe.c (gtk_frame_init): * gtk/gtkhandlebox.c (gtk_handle_box_init): * gtk/gtkpacker.c (gtk_packer_init): * gtk/gtkmisc.c (gtk_misc_init): * gtk/gtkpreview.c (gtk_preview_init): * gtk/gtkprogress.c (gtk_progress_init): * gtk/gtkprogressbar.c (gtk_progress_bar_init): * gtk/gtkseparator.c (gtk_separator_init): * gtk/gtktable.c (gtk_table_init): * gtk/gtkviewport.c (gtk_viewport_init): * gtk/gtkalignment.c (gtk_alignment_init): removed setting of the GTK_BASIC flag. * gtk/gtkwidget.h: * gtk/gtkwidget.c: removed GTK_BASIC, GTK_WIDGET_BASIC and gtk_widget_basic. * miscellaneous GtkType and macro fixups.
1998-11-23 01:54:45 +00:00
void gtk_widget_push_style (GtkStyle *style);
void gtk_widget_push_colormap (GdkColormap *cmap);
void gtk_widget_push_visual (GdkVisual *visual);
void gtk_widget_push_composite_child (void);
void gtk_widget_pop_composite_child (void);
void gtk_widget_pop_style (void);
void gtk_widget_pop_colormap (void);
void gtk_widget_pop_visual (void);
1997-11-24 22:37:52 +00:00
/* Set certain default values to be used at widget creation time.
*/
void gtk_widget_set_default_style (GtkStyle *style);
void gtk_widget_set_default_colormap (GdkColormap *colormap);
void gtk_widget_set_default_visual (GdkVisual *visual);
GtkStyle* gtk_widget_get_default_style (void);
1997-11-24 22:37:52 +00:00
GdkColormap* gtk_widget_get_default_colormap (void);
GdkVisual* gtk_widget_get_default_visual (void);
/* Counterpart to gdk_window_shape_combine_mask.
1997-11-24 22:37:52 +00:00
*/
void gtk_widget_shape_combine_mask (GtkWidget *widget,
1997-11-24 22:37:52 +00:00
GdkBitmap *shape_mask,
gint offset_x,
gint offset_y);
changed scrolled window inheritance, it inherits from GtkBin now. Sat Nov 28 03:13:42 1998 Tim Janik <timj@gtk.org> * gtk/gtkscrolledwindow.h: * gtk/gtkscrolledwindow.c: changed scrolled window inheritance, it inherits from GtkBin now. * gtk/gtkbin.c (gtk_bin_unmap): removed superfluous check for visibility of child. (gtk_bin_draw): removed superfluous check for GTK_WIDGET_DRAWABLE(). added check so a child gets only drawn if it's visible. * gtk/gtkwidget.h: * gtk/gtkwidget.c: removed gtk_widget_draw_children(). * gtk/gtkstyle.h: * gtk/gtkstyle.c: rmoved gtk_reset_widget_shapes. * gtk/gtkwidget.h: * gtk/gtkwidget.c: removed crufty relict: gtk_widget_is_child(). added internal function gtk_widget_reset_shapes() from gtkstyle.c. * gtk/gtkrc.h: * gtk/gtkrc.c: (gtk_rc_find_pixmap_in_path): removed bogus gscanner argument, changed callers. * gtk/gtkmenufactory.c: GtkMenuFactory is deprecated for a long time, it will issue a warning now. * gtk/gtkcompat.h: new file to #define aliases for historic function names. * changed 8 function names for consistency and provided aliases to keep source compatibility in gtkcompat.h: (gtk_accel_label_get_accel_width): renamed from gtk_accel_label_accelerator_width (gtk_container_set_border_width): renamed from gtk_container_border_width (gtk_notebook_get_current_page): renamed from gtk_notebook_current_page (gtk_packer_configure): renamed from gtk_packer_set_child_packing (gtk_paned_set_gutter_size): renamed from gtk_paned_gutter_size (gtk_paned_set_handle_size): renamed from gtk_paned_handle_size (gtk_scale_get_value_width): renamed from gtk_scale_value_width (gtk_window_set_position): renamed from gtk_window_position * renamed a few recently added funtions for consistency: (gtk_notebook_get_tab_label): renamed from gtk_notebook_query_tab_label. (gtk_notebook_get_menu_label): renamed from gtk_notebook_query_menu_label. (gtk_progress_configure): renamed from gtk_progress_reconfigure.
1998-11-28 07:42:37 +00:00
/* internal function */
void gtk_widget_reset_shapes (GtkWidget *widget);
fixed an assertment. Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org> * gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment. * gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from, this should eventually be done by gentypeinfo.el somewhen. * gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays. * gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the enum values of an enum type. * gtk/gtk.defs: * gtk/gtkcurve.h: * gtk/gtkobject.h: * gtk/gtkprivate.h: * gtk/gtkwidget.h: * gtk/gtkenums.h: brought enum/flags definitions in sync, added a few more enum definitions for bindings and pattern matching. * some more macro and GtkType fixups in various places. * gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used as a key-release modifier for the binding system. Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it was a stale list pointer that is already present in GtkMenuShell. * gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal GtkMenuShell::selection_done which is emitted after the menu shell poped down again and all possible menu items have been activated. Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue before activation of the menuitem, so the menu is actually taken off the screen prior to any menu item activation. * gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation for NULL nodes. * gtk/gtkwidget.h: * gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop the emission of the "add-accelerator" signal on a widget. this is usefull to prevent accelerator installation on certain widgets. * gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu labels left justified, by setting their alignment. stop accelerator installation for the menu items, since we use dynamic menus. Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenufactory.c: adaptions to use the new accel groups. people should *really* use GtkItemFactory. this is only for preserving source compatibility where possible, use of GtkMenuFactory is deprecated as of now. * gtk/gtkobject.h (gtk_object_class_add_user_signal): new function to create user signals of type GTK_RUN_NO_RECURSE. don't know why i missed this possibility when i added gtk_object_class_add_user_signal in late january. * gtk/gtkmain.c (gtk_init): ignore subsequent function calls. Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org> * gtk/gtkaccelgroup.h: * gtk/gtkaccelgroup.c: new implementation of the accelerator concept. * gtk/gtkaccellabel.h: * gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features display of the accelerators associated with a certain widget. * gtk/gtkitemfactory.h: * gtk/gtkitemfactory.c: new widget, item factory with automatic rc parsing and accelerator handling. * gtk/gtkmenu.c (gtk_menu_reposition): new function to care for positioning a menu. (gtk_menu_map): removed the allocation code. (gtk_menu_size_allocate): care for redrawing of children and resize our widget->window correctly. (gtk_menu_key_press): feature the new accelerator groups. * gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the submenu if neccessary. * gtk/gtkmenuitem.c: * gtk/gtkcheckmenuitem.c: * gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label() function variants. * gdk/gdk.c: (gdk_keyval_from_name): (gdk_keyval_name): new functions for keyval<->key-name associations. (gdk_keyval_to_upper): (gdk_keyval_to_lower): (gdk_keyval_is_upper): (gdk_keyval_is_lower): new functions to check/translate keyvalues with regards to their cases. Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a widget's class path. (gtk_widget_path): new function to calculate a widget's name path. * gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
/* Compute a widget's path in the form "GtkWindow.MyLabel", and
* return newly alocated strings.
*/
void gtk_widget_path (GtkWidget *widget,
guint *path_length,
gchar **path,
gchar **path_reversed);
void gtk_widget_class_path (GtkWidget *widget,
guint *path_length,
gchar **path,
gchar **path_reversed);
#if defined (GTK_TRACE_OBJECTS) && defined (__GNUC__)
# define gtk_widget_ref gtk_object_ref
# define gtk_widget_unref gtk_object_unref
#endif /* GTK_TRACE_OBJECTS && __GNUC__ */
1997-11-24 22:37:52 +00:00
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GTK_WIDGET_H__ */