gtk2/docs/reference/gtk/tmpl/gtkwindow.sgml

824 lines
12 KiB
Plaintext
Raw Normal View History

1999-08-16 18:51:52 +00:00
<!-- ##### SECTION Title ##### -->
GtkWindow
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### STRUCT GtkWindow ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_window_new ##### -->
<para>
</para>
@type:
@Returns:
<!-- ##### FUNCTION gtk_window_set_title ##### -->
<para>
</para>
@window:
@title:
<!-- ##### FUNCTION gtk_window_set_wmclass ##### -->
<para>
</para>
@window:
@wmclass_name:
@wmclass_class:
<!-- ##### FUNCTION gtk_window_set_policy ##### -->
<para>
Changes how a toplevel window deals with its size request and user resize
attempts. There are really only two reasonable ways to call this function:
<orderedlist>
<listitem>
<para>
<literal>gtk_window_set_policy (GTK_WINDOW (window), FALSE, TRUE, FALSE)</literal>
means that the window is user-resizable.
</para>
</listitem>
<listitem>
<para>
<literal>gtk_window_set_policy (GTK_WINDOW (window), FALSE, FALSE, TRUE)</literal>
means that the window's size is program-controlled, and should simply match
the current size request of the window's children.
</para>
</listitem>
</orderedlist>
The first policy is the default, that is, by default windows are designed to
be resized by users.
</para>
1999-08-16 18:51:52 +00:00
<para>
The basic ugly truth of this function is that it should be simply:
<literal>
void gtk_window_set_resizable (GtkWindow* window, gboolean setting);
</literal>
...which is why GTK+ 2.0 introduces gtk_window_set_resizable(), which you
should use instead of gtk_window_set_policy().
1999-08-16 18:51:52 +00:00
</para>
<para>
If set to %TRUE, the @allow_grow parameter allows the user to expand the window
beyond the size request of its child widgets. If @allow_grow is %TRUE, be sure to
check that your child widgets work properly as the window is resized.
</para>
<para>
A toplevel window will always change size to ensure its child widgets receive
their requested size. This means that if you add child widgets, the toplevel
window will expand to contain them. However, normally the toplevel will not
shrink to fit the size request of its children if it's too large; the
@auto_shrink parameter causes the window to shrink when child widgets have too
much space. @auto_shrink is normally used with the second of the two window
policies mentioned above. That is, set @auto_shrink to %TRUE if you want the
window to have a fixed, always-optimal size determined by your program.
</para>
<para>
Note that @auto_shrink doesn't do anything if @allow_shrink and @allow_grow are
both set to %FALSE.
</para>
<para>
Neither of the two suggested window policies set the @allow_shrink parameter to
%TRUE. If @allow_shrink is %TRUE, the user can shrink the window so that its
children do not receive their full size request; this is basically a bad thing,
because most widgets will look wrong if this happens. Furthermore GTK+ has a
tendency to re-expand the window if size is recalculated for any reason. The
upshot is that @allow_shrink should always be set to %FALSE.
</para>
<para>
Sometimes when you think you want to use @allow_shrink, the real problem is that
some specific child widget is requesting too much space, so the user can't
shrink the window sufficiently. Perhaps you are calling gtk_widget_set_usize()
on a child widget, and forcing its size request to be too large. Instead of
setting the child's usize, consider using gtk_window_set_default_size() so that
the child gets a larger allocation than it requests.
</para>
@window: the window
@allow_shrink: whether the user can shrink the window below its size request
@allow_grow: whether the user can grow the window larger than its size request
@auto_shrink: whether the window automatically snaps back to its size request if
it's larger
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_window_set_resizable ##### -->
<para>
</para>
@window:
@resizable:
<!-- ##### FUNCTION gtk_window_get_resizable ##### -->
<para>
</para>
@window:
@Returns:
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_window_add_accel_group ##### -->
<para>
</para>
@window:
@accel_group:
<!-- ##### FUNCTION gtk_window_remove_accel_group ##### -->
<para>
</para>
@window:
@accel_group:
<!-- ##### MACRO gtk_window_position ##### -->
<para>
Deprecated alias for gtk_window_set_position().
1999-08-16 18:51:52 +00:00
</para>
<!-- ##### FUNCTION gtk_window_activate_focus ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gtk_window_activate_default ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gtk_window_set_modal ##### -->
<para>
</para>
@window:
@modal:
<!-- ##### FUNCTION gtk_window_set_default_size ##### -->
<para>
</para>
@window:
@width:
@height:
<!-- ##### FUNCTION gtk_window_set_geometry_hints ##### -->
<para>
</para>
@window:
@geometry_widget:
@geometry:
@geom_mask:
<!-- ##### FUNCTION gtk_window_set_gravity ##### -->
<para>
</para>
@window:
@gravity:
<!-- ##### FUNCTION gtk_window_get_gravity ##### -->
<para>
</para>
@window:
@Returns:
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_window_set_position ##### -->
<para>
</para>
@window:
@position:
<!-- ##### FUNCTION gtk_window_set_transient_for ##### -->
<para>
</para>
@window:
@parent:
create some stock buttons with the default accel group (create_image): 2000-10-04 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c (create_buttons): create some stock buttons with the default accel group (create_image): test some new GtkImage features (make_message_dialog): test GtkMessageDialog (create_modal_window): fix someone's bizzarro indentation * gtk/gtkwindow.h, gtk/gtkwindow.c: Implement GTK_WIN_POS_CENTER_ON_PARENT. Add "destroy with parent" setting, which means the window goes away with its transient parent. (gtk_window_get_default_accel_group): get the default accel group for the window. (gtk_window_set_destroy_with_parent): set/unset destroy with parent flag (gtk_window_read_rcfiles): invalidate icon set caches after reloading rcfiles * gtk/gtkenums.h (GtkWindowPosition): add GTK_WIN_POS_CENTER_ON_PARENT, which centers a dialog on its parent window when the dialog is mapped for the first time. * gtk/gtkmessagedialog.h, gtk/gtkmessagedialog.c: Add a simple message dialog class * gtk/gtkdialog.c (gtk_dialog_init): Connect delete event handler to emit response signal, and maybe later it would honor a hide_on_delete flag - though that isn't there yet. Set border width on the vbox to 2, so we get some padding. Use a button box for the action area. (gtk_dialog_key_press): synthesize a delete event if Esc is pressed and the GtkWidget key press handler didn't handle the escape key. (gtk_dialog_new_with_buttons): new function creates a dialog with some default buttons in it. (gtk_dialog_add_action_widget): add an activatable widget as a button in the dialog - you can also add a non-activatable widget by accessing the action area directly. (gtk_dialog_add_button): add a simple button - stock ID or label - to the action area (gtk_dialog_response): emit response signal (gtk_dialog_run): block waiting for the dialog, return the response. Override normal delete_event behavior, so that delete_event does nothing inside gtk_dialog_run(). * gtk/gtkdialog.h, gtk/gtkdialog.c: Add "response" signal emitted when an action widget is clicked or the dialog gets delete_event * gtk/gtk.h: add gtkmessagedialog.h * gtk/Makefile.am: add gtkmessagedialog.[hc] 2000-10-20 Havoc Pennington <hp@redhat.com> * gtk/gtk-sections.txt: Add dialog docs
2000-10-20 23:14:41 +00:00
<!-- ##### FUNCTION gtk_window_set_destroy_with_parent ##### -->
<para>
</para>
@window:
@setting:
<!-- ##### FUNCTION gtk_window_list_toplevels ##### -->
<para>
</para>
@Returns:
<!-- ##### FUNCTION gtk_window_add_mnemonic ##### -->
<para>
</para>
@window:
@keyval:
@target:
<!-- ##### FUNCTION gtk_window_remove_mnemonic ##### -->
<para>
</para>
@window:
@keyval:
@target:
<!-- ##### FUNCTION gtk_window_mnemonic_activate ##### -->
<para>
</para>
@window:
@keyval:
@modifier:
@Returns:
<!-- ##### FUNCTION gtk_window_get_focus ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gtk_window_set_focus ##### -->
<para>
</para>
@window:
@focus:
<!-- ##### FUNCTION gtk_window_set_default ##### -->
<para>
</para>
@window:
@default_widget:
<!-- ##### FUNCTION gtk_window_present ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION gtk_window_iconify ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION gtk_window_deiconify ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION gtk_window_stick ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION gtk_window_unstick ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION gtk_window_maximize ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION gtk_window_unmaximize ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION gtk_window_begin_resize_drag ##### -->
<para>
</para>
@window:
@edge:
@button:
@root_x:
@root_y:
@timestamp:
<!-- ##### FUNCTION gtk_window_begin_move_drag ##### -->
<para>
</para>
@window:
@button:
@root_x:
@root_y:
@timestamp:
<!-- ##### FUNCTION gtk_window_set_decorated ##### -->
<para>
</para>
@window:
@setting:
<!-- ##### FUNCTION gtk_window_set_frame_dimensions ##### -->
<para>
</para>
@window:
@left:
@top:
@right:
@bottom:
<!-- ##### FUNCTION gtk_window_set_has_frame ##### -->
<para>
</para>
@window:
@setting:
<!-- ##### FUNCTION gtk_window_set_mnemonic_modifier ##### -->
<para>
</para>
@window:
@modifier:
<!-- ##### FUNCTION gtk_window_set_role ##### -->
<para>
</para>
@window:
@role:
<!-- ##### FUNCTION gtk_window_set_type_hint ##### -->
<para>
</para>
@window:
@hint:
<!-- ##### FUNCTION gtk_window_get_decorated ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gtk_window_get_default_icon_list ##### -->
<para>
</para>
@Returns:
<!-- ##### FUNCTION gtk_window_get_default_size ##### -->
<para>
</para>
@window:
@width:
@height:
<!-- ##### FUNCTION gtk_window_get_destroy_with_parent ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gtk_window_get_frame_dimensions ##### -->
<para>
</para>
@window:
@left:
@top:
@right:
@bottom:
<!-- ##### FUNCTION gtk_window_get_has_frame ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gtk_window_get_icon ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gtk_window_get_icon_list ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gtk_window_get_mnemonic_modifier ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gtk_window_get_modal ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gtk_window_get_position ##### -->
<para>
</para>
@window:
@root_x:
@root_y:
<!-- # Unused Parameters # -->
@x:
@y:
<!-- ##### FUNCTION gtk_window_get_role ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gtk_window_get_size ##### -->
<para>
</para>
@window:
@width:
@height:
<!-- ##### FUNCTION gtk_window_get_title ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gtk_window_get_transient_for ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gtk_window_get_type_hint ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gtk_window_move ##### -->
<para>
</para>
@window:
@x:
@y:
<!-- ##### FUNCTION gtk_window_parse_geometry ##### -->
<para>
</para>
@window:
@geometry:
@Returns:
<!-- ##### FUNCTION gtk_window_reshow_with_initial_size ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION gtk_window_resize ##### -->
<para>
</para>
@window:
@width:
@height:
<!-- ##### FUNCTION gtk_window_set_default_icon_list ##### -->
<para>
</para>
@list:
<!-- ##### FUNCTION gtk_window_set_icon ##### -->
<para>
</para>
@window:
@icon:
<!-- ##### FUNCTION gtk_window_set_icon_list ##### -->
<para>
</para>
@window:
@list:
<!-- ##### FUNCTION gtk_decorated_window_init ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION gtk_decorated_window_calculate_frame_size ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION gtk_decorated_window_set_title ##### -->
<para>
</para>
@window:
@title:
<!-- ##### FUNCTION gtk_decorated_window_move_resize_window ##### -->
<para>
</para>
@window:
@x:
@y:
@width:
@height:
applied patch from owen to get rid of accel map notifiers. changed things Tue Nov 20 21:25:08 2001 Tim Janik <timj@gtk.org> * applied patch from owen to get rid of accel map notifiers. changed things to fix reentrancy and API as discussed on gtk-devel. * gtk/gtkaccelgroup.[hc]: (gtk_accel_group_finalize): unregister this accel group from all accel map paths. (accel_closure_invalidate): handle invalidation of closures by disconnecting their accelerators. (quick_accel_add): move closure connection and changed notification into this function to reduce code duplication. don't emit change notification on closurers without accelerators. (quick_accel_remove): rewrite, do the exact opposite of quick_accel_add for a GtkAccelGroupEntry. (gtk_accel_group_connect): get rid of the accel_path_quark argument. (gtk_accel_group_connect_by_path): new function to add accelerators with an accel path. (gtk_accel_group_disconnect_closure): new function, disconnect a closure from of an accel group. (gtk_accel_group_disconnect): loop over all closure for a accel_ley, accel_mods pair and remove them. (_gtk_accel_group_reconnect): new function that basically does gtk_accel_group_disconnect_closure() and gtk_accel_group_connect_by_path() once an accel path changed. (gtk_accel_groups_disconnect_closure): remove this, there's gtk_accel_group_disconnect_closure(). * gtk/gtkaccelmap.[hc]: keep list of accel groups per entry now, nuke notifiers. (_gtk_accel_path_is_valid): make this non-static for gtkwidget.c and gtkaccelgroup.c assertions. (gtk_accel_map_add_notifer): removed this function. (gtk_accel_map_remove_notifer): same. (_gtk_accel_map_add_group): (_gtk_accel_map_remove_group): (un-)register accel groups, with accel paths for correct propagation. (gtk_accel_map_add_entry): return void. (gtk_accel_map_lookup): return gboolean instead of GQuark. * gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): always set accel_path on widgets. * gtk/gtkwidget.[hc]: (accel_path_changed): got rid of this, changes are handled by accel maps internally now. (_gtk_widget_set_accel_path): get things to work without notifiers. (gtk_widget_list_accel_closures): list accel closures of a widget. * gtk/gtkwindow.[hc]: rename ::accels_changed, to ::keys_changed.
2001-11-20 23:43:03 +00:00
<!-- ##### SIGNAL GtkWindow::activate-default ##### -->
added gtkaccelmap.sgml. other updates. Mon Nov 12 23:06:38 2001 Tim Janik <timj@gtk.org> * added gtkaccelmap.sgml. other updates. Mon Nov 12 23:08:37 2001 Tim Janik <timj@gtk.org> * gtk/maketypes.awk: fix type utils generation on unix. * gtk/gtkaccelmap.[hc]: new files, implementing a global accelerator registry. * gtk/gtkaccelgroup.[hc]: major API/implementation revamp: removed GTK_ACCEL_SIGNAL_VISIBLE, gtk_accel_group_get_default, gtk_accel_group_get_entry, gtk_accel_group_(un)lock_entry, gtk_accel_group_add/remove, gtk_accel_group_handle_add/remove, gtk_accel_group_create_add/remove, gtk_accel_group_entries_from_object. introduced ::accel_changed signal for change notification, and gtk_accel_group_connect/disconnect to connect closures to accel groups. made gtk_accel_group_attach/detach and gtk_accel_group_activate private functions. deprecated gtk_accel_group_ref/unref. * gtk/gtkaccellabel.[hc]: changes to make accellabels pay attention to accel group changed notification and basically operate on closures. removed gtk_accel_label_get_accel_object and gtk_accel_label_set_accel_object. introduced gtk_accel_label_set_accel_closure, and for convenience, gtk_accel_label_set_accel_widget. * gtk/gtkitemfactory.[hc]: removed accelerator propagation code which mostly moved into gtkaccelmap.[hc]. removed gtk_item_factory_parse_rc*, gtk_item_factory_dump_* and gtk_item_factory_print_func. * gtk/gtkmain.c: call _gtk_accel_map_init(). * gtk/gtkmenuitem.[hc]: introduced gtk_menu_item_set_accel_path(), that associates an accelerator path with menu items, through which persistent accelerator settings on menu items are enabled. * gtk/gtkmenu.[hc]: added gtk_menu_set_accel_path() so accelerator paths of menu item can be default constructed to allow installation of accelerators on menu items that don't come with an accelerator binding by default. * gtk/gtksettings.c: fix STRING type rc settings by special casing them appropriately in the parser. * gtk/gtksignal.[hc]: allow a class function offset of 0 for gtk_signal_newv(). * gtk/gtkwidget.[hc]: accelerator API revamp. removed ::accelerator_add/remove signals, gtk_widget_accelerator_signal, gtk_widget_accelerators_locked, gtk_widget_remove_accelerators and gtk_widget_(un)lock_accelerators. accelerators maintained through gtk_widget_add/remove_accelerator() are not runtime changable now, the correct sequence to setup a widget for runtime changable accelerators is now: gtk_accel_map_add_entry(accel_path, key, mods); _gtk_widget_set_accel_path(widget, accel_path, accel_group); * gtk/gtkwindow.[hc]: accelerator changes, proxy and coalesce accel group changes (as well as mnemonic changes) through the new signal ::accels_changed. Sat Nov 10 12:08:56 2001 Tim Janik <timj@gtk.org> * gtk/gtksettings.c (_gtk_settings_parse_convert): properly handle GString->string conversions.
2001-11-13 00:53:47 +00:00
<para>
</para>
@window: the object which received the signal.
applied patch from owen to get rid of accel map notifiers. changed things Tue Nov 20 21:25:08 2001 Tim Janik <timj@gtk.org> * applied patch from owen to get rid of accel map notifiers. changed things to fix reentrancy and API as discussed on gtk-devel. * gtk/gtkaccelgroup.[hc]: (gtk_accel_group_finalize): unregister this accel group from all accel map paths. (accel_closure_invalidate): handle invalidation of closures by disconnecting their accelerators. (quick_accel_add): move closure connection and changed notification into this function to reduce code duplication. don't emit change notification on closurers without accelerators. (quick_accel_remove): rewrite, do the exact opposite of quick_accel_add for a GtkAccelGroupEntry. (gtk_accel_group_connect): get rid of the accel_path_quark argument. (gtk_accel_group_connect_by_path): new function to add accelerators with an accel path. (gtk_accel_group_disconnect_closure): new function, disconnect a closure from of an accel group. (gtk_accel_group_disconnect): loop over all closure for a accel_ley, accel_mods pair and remove them. (_gtk_accel_group_reconnect): new function that basically does gtk_accel_group_disconnect_closure() and gtk_accel_group_connect_by_path() once an accel path changed. (gtk_accel_groups_disconnect_closure): remove this, there's gtk_accel_group_disconnect_closure(). * gtk/gtkaccelmap.[hc]: keep list of accel groups per entry now, nuke notifiers. (_gtk_accel_path_is_valid): make this non-static for gtkwidget.c and gtkaccelgroup.c assertions. (gtk_accel_map_add_notifer): removed this function. (gtk_accel_map_remove_notifer): same. (_gtk_accel_map_add_group): (_gtk_accel_map_remove_group): (un-)register accel groups, with accel paths for correct propagation. (gtk_accel_map_add_entry): return void. (gtk_accel_map_lookup): return gboolean instead of GQuark. * gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): always set accel_path on widgets. * gtk/gtkwidget.[hc]: (accel_path_changed): got rid of this, changes are handled by accel maps internally now. (_gtk_widget_set_accel_path): get things to work without notifiers. (gtk_widget_list_accel_closures): list accel closures of a widget. * gtk/gtkwindow.[hc]: rename ::accels_changed, to ::keys_changed.
2001-11-20 23:43:03 +00:00
<!-- ##### SIGNAL GtkWindow::activate-focus ##### -->
<para>
</para>
@window: the object which received the signal.
applied patch from owen to get rid of accel map notifiers. changed things Tue Nov 20 21:25:08 2001 Tim Janik <timj@gtk.org> * applied patch from owen to get rid of accel map notifiers. changed things to fix reentrancy and API as discussed on gtk-devel. * gtk/gtkaccelgroup.[hc]: (gtk_accel_group_finalize): unregister this accel group from all accel map paths. (accel_closure_invalidate): handle invalidation of closures by disconnecting their accelerators. (quick_accel_add): move closure connection and changed notification into this function to reduce code duplication. don't emit change notification on closurers without accelerators. (quick_accel_remove): rewrite, do the exact opposite of quick_accel_add for a GtkAccelGroupEntry. (gtk_accel_group_connect): get rid of the accel_path_quark argument. (gtk_accel_group_connect_by_path): new function to add accelerators with an accel path. (gtk_accel_group_disconnect_closure): new function, disconnect a closure from of an accel group. (gtk_accel_group_disconnect): loop over all closure for a accel_ley, accel_mods pair and remove them. (_gtk_accel_group_reconnect): new function that basically does gtk_accel_group_disconnect_closure() and gtk_accel_group_connect_by_path() once an accel path changed. (gtk_accel_groups_disconnect_closure): remove this, there's gtk_accel_group_disconnect_closure(). * gtk/gtkaccelmap.[hc]: keep list of accel groups per entry now, nuke notifiers. (_gtk_accel_path_is_valid): make this non-static for gtkwidget.c and gtkaccelgroup.c assertions. (gtk_accel_map_add_notifer): removed this function. (gtk_accel_map_remove_notifer): same. (_gtk_accel_map_add_group): (_gtk_accel_map_remove_group): (un-)register accel groups, with accel paths for correct propagation. (gtk_accel_map_add_entry): return void. (gtk_accel_map_lookup): return gboolean instead of GQuark. * gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): always set accel_path on widgets. * gtk/gtkwidget.[hc]: (accel_path_changed): got rid of this, changes are handled by accel maps internally now. (_gtk_widget_set_accel_path): get things to work without notifiers. (gtk_widget_list_accel_closures): list accel closures of a widget. * gtk/gtkwindow.[hc]: rename ::accels_changed, to ::keys_changed.
2001-11-20 23:43:03 +00:00
<!-- ##### SIGNAL GtkWindow::frame-event ##### -->
<para>
</para>
@window: the object which received the signal.
applied patch from owen to get rid of accel map notifiers. changed things Tue Nov 20 21:25:08 2001 Tim Janik <timj@gtk.org> * applied patch from owen to get rid of accel map notifiers. changed things to fix reentrancy and API as discussed on gtk-devel. * gtk/gtkaccelgroup.[hc]: (gtk_accel_group_finalize): unregister this accel group from all accel map paths. (accel_closure_invalidate): handle invalidation of closures by disconnecting their accelerators. (quick_accel_add): move closure connection and changed notification into this function to reduce code duplication. don't emit change notification on closurers without accelerators. (quick_accel_remove): rewrite, do the exact opposite of quick_accel_add for a GtkAccelGroupEntry. (gtk_accel_group_connect): get rid of the accel_path_quark argument. (gtk_accel_group_connect_by_path): new function to add accelerators with an accel path. (gtk_accel_group_disconnect_closure): new function, disconnect a closure from of an accel group. (gtk_accel_group_disconnect): loop over all closure for a accel_ley, accel_mods pair and remove them. (_gtk_accel_group_reconnect): new function that basically does gtk_accel_group_disconnect_closure() and gtk_accel_group_connect_by_path() once an accel path changed. (gtk_accel_groups_disconnect_closure): remove this, there's gtk_accel_group_disconnect_closure(). * gtk/gtkaccelmap.[hc]: keep list of accel groups per entry now, nuke notifiers. (_gtk_accel_path_is_valid): make this non-static for gtkwidget.c and gtkaccelgroup.c assertions. (gtk_accel_map_add_notifer): removed this function. (gtk_accel_map_remove_notifer): same. (_gtk_accel_map_add_group): (_gtk_accel_map_remove_group): (un-)register accel groups, with accel paths for correct propagation. (gtk_accel_map_add_entry): return void. (gtk_accel_map_lookup): return gboolean instead of GQuark. * gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): always set accel_path on widgets. * gtk/gtkwidget.[hc]: (accel_path_changed): got rid of this, changes are handled by accel maps internally now. (_gtk_widget_set_accel_path): get things to work without notifiers. (gtk_widget_list_accel_closures): list accel closures of a widget. * gtk/gtkwindow.[hc]: rename ::accels_changed, to ::keys_changed.
2001-11-20 23:43:03 +00:00
@event:
@Returns:
applied patch from owen to get rid of accel map notifiers. changed things Tue Nov 20 21:25:08 2001 Tim Janik <timj@gtk.org> * applied patch from owen to get rid of accel map notifiers. changed things to fix reentrancy and API as discussed on gtk-devel. * gtk/gtkaccelgroup.[hc]: (gtk_accel_group_finalize): unregister this accel group from all accel map paths. (accel_closure_invalidate): handle invalidation of closures by disconnecting their accelerators. (quick_accel_add): move closure connection and changed notification into this function to reduce code duplication. don't emit change notification on closurers without accelerators. (quick_accel_remove): rewrite, do the exact opposite of quick_accel_add for a GtkAccelGroupEntry. (gtk_accel_group_connect): get rid of the accel_path_quark argument. (gtk_accel_group_connect_by_path): new function to add accelerators with an accel path. (gtk_accel_group_disconnect_closure): new function, disconnect a closure from of an accel group. (gtk_accel_group_disconnect): loop over all closure for a accel_ley, accel_mods pair and remove them. (_gtk_accel_group_reconnect): new function that basically does gtk_accel_group_disconnect_closure() and gtk_accel_group_connect_by_path() once an accel path changed. (gtk_accel_groups_disconnect_closure): remove this, there's gtk_accel_group_disconnect_closure(). * gtk/gtkaccelmap.[hc]: keep list of accel groups per entry now, nuke notifiers. (_gtk_accel_path_is_valid): make this non-static for gtkwidget.c and gtkaccelgroup.c assertions. (gtk_accel_map_add_notifer): removed this function. (gtk_accel_map_remove_notifer): same. (_gtk_accel_map_add_group): (_gtk_accel_map_remove_group): (un-)register accel groups, with accel paths for correct propagation. (gtk_accel_map_add_entry): return void. (gtk_accel_map_lookup): return gboolean instead of GQuark. * gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): always set accel_path on widgets. * gtk/gtkwidget.[hc]: (accel_path_changed): got rid of this, changes are handled by accel maps internally now. (_gtk_widget_set_accel_path): get things to work without notifiers. (gtk_widget_list_accel_closures): list accel closures of a widget. * gtk/gtkwindow.[hc]: rename ::accels_changed, to ::keys_changed.
2001-11-20 23:43:03 +00:00
<!-- ##### SIGNAL GtkWindow::keys-changed ##### -->
<para>
</para>
@window: the object which received the signal.
<!-- ##### SIGNAL GtkWindow::move-focus ##### -->
<para>
</para>
@window: the object which received the signal.
@arg1:
1999-08-16 18:51:52 +00:00
<!-- ##### SIGNAL GtkWindow::set-focus ##### -->
<para>
</para>
@window: the object which received the signal.
@widget:
<!-- ##### ARG GtkWindow:type ##### -->
<para>
The type of the window.
</para>
<!-- ##### ARG GtkWindow:title ##### -->
<para>
The title of the window.
</para>
<!-- ##### ARG GtkWindow:allow-shrink ##### -->
1999-08-16 18:51:52 +00:00
<para>
If the window can be resized to a smaller size by the user.
</para>
<!-- ##### ARG GtkWindow:allow-grow ##### -->
1999-08-16 18:51:52 +00:00
<para>
If the window can be resized to a larger size by the user.
</para>
<!-- ##### ARG GtkWindow:resizable ##### -->
<para>
</para>
1999-08-16 18:51:52 +00:00
<!-- ##### ARG GtkWindow:modal ##### -->
<para>
If the window is modal, i.e. it grabs all GTK+ events.
</para>
<!-- ##### ARG GtkWindow:window-position ##### -->
1999-08-16 18:51:52 +00:00
<para>
The position of the window.
</para>
<!-- ##### ARG GtkWindow:default-width ##### -->
<para>
</para>
<!-- ##### ARG GtkWindow:default-height ##### -->
<para>
</para>
<!-- ##### ARG GtkWindow:destroy-with-parent ##### -->
create some stock buttons with the default accel group (create_image): 2000-10-04 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c (create_buttons): create some stock buttons with the default accel group (create_image): test some new GtkImage features (make_message_dialog): test GtkMessageDialog (create_modal_window): fix someone's bizzarro indentation * gtk/gtkwindow.h, gtk/gtkwindow.c: Implement GTK_WIN_POS_CENTER_ON_PARENT. Add "destroy with parent" setting, which means the window goes away with its transient parent. (gtk_window_get_default_accel_group): get the default accel group for the window. (gtk_window_set_destroy_with_parent): set/unset destroy with parent flag (gtk_window_read_rcfiles): invalidate icon set caches after reloading rcfiles * gtk/gtkenums.h (GtkWindowPosition): add GTK_WIN_POS_CENTER_ON_PARENT, which centers a dialog on its parent window when the dialog is mapped for the first time. * gtk/gtkmessagedialog.h, gtk/gtkmessagedialog.c: Add a simple message dialog class * gtk/gtkdialog.c (gtk_dialog_init): Connect delete event handler to emit response signal, and maybe later it would honor a hide_on_delete flag - though that isn't there yet. Set border width on the vbox to 2, so we get some padding. Use a button box for the action area. (gtk_dialog_key_press): synthesize a delete event if Esc is pressed and the GtkWidget key press handler didn't handle the escape key. (gtk_dialog_new_with_buttons): new function creates a dialog with some default buttons in it. (gtk_dialog_add_action_widget): add an activatable widget as a button in the dialog - you can also add a non-activatable widget by accessing the action area directly. (gtk_dialog_add_button): add a simple button - stock ID or label - to the action area (gtk_dialog_response): emit response signal (gtk_dialog_run): block waiting for the dialog, return the response. Override normal delete_event behavior, so that delete_event does nothing inside gtk_dialog_run(). * gtk/gtkdialog.h, gtk/gtkdialog.c: Add "response" signal emitted when an action widget is clicked or the dialog gets delete_event * gtk/gtk.h: add gtkmessagedialog.h * gtk/Makefile.am: add gtkmessagedialog.[hc] 2000-10-20 Havoc Pennington <hp@redhat.com> * gtk/gtk-sections.txt: Add dialog docs
2000-10-20 23:14:41 +00:00
<para>
</para>
<!-- ##### ARG GtkWindow:icon ##### -->
<para>
</para>