summaryrefslogtreecommitdiff
path: root/docs/reference
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>2001-11-20 23:43:03 +0000
committerTim Janik <timj@src.gnome.org>2001-11-20 23:43:03 +0000
commit9800f731e09e28defb46994ae11674d2553f0cc0 (patch)
treef212fba144769eedf92541cd4dbe9843d24ed97a /docs/reference
parent9ea603f15dccb57a8b763fda35b929dbb70914d6 (diff)
downloadgtk+-9800f731e09e28defb46994ae11674d2553f0cc0.tar.gz
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.
Diffstat (limited to 'docs/reference')
-rw-r--r--docs/reference/gtk/gtk-sections.txt27
-rw-r--r--docs/reference/gtk/tmpl/gtk-unused.sgml39
-rw-r--r--docs/reference/gtk/tmpl/gtkaccelgroup.sgml48
-rw-r--r--docs/reference/gtk/tmpl/gtkaccellabel.sgml9
-rw-r--r--docs/reference/gtk/tmpl/gtkwidget.sgml9
-rw-r--r--docs/reference/gtk/tmpl/gtkwindow.sgml12
6 files changed, 111 insertions, 33 deletions
diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt
index fc97655694..40ea35c2f1 100644
--- a/docs/reference/gtk/gtk-sections.txt
+++ b/docs/reference/gtk/gtk-sections.txt
@@ -8,12 +8,14 @@ GtkAccelGroup
gtk_accel_group_get_type
gtk_accel_group_new
gtk_accel_group_connect
+gtk_accel_group_connect_by_path
gtk_accel_group_disconnect
+gtk_accel_group_disconnect_key
gtk_accel_group_query
-gtk_accel_group_activate
-gtk_accel_groups_activate
gtk_accel_group_lock
gtk_accel_group_unlock
+gtk_accel_group_from_accel_closure
+gtk_accel_groups_activate
gtk_accelerator_valid
gtk_accelerator_parse
gtk_accelerator_name
@@ -33,18 +35,16 @@ GTK_ACCEL_GROUP_GET_CLASS
<SECTION>
<FILE>gtkaccelmap</FILE>
<TITLE>Accelerator Maps</TITLE>
-GtkAccelMapNotify
GtkAccelMapForeach
gtk_accel_map_add_entry
gtk_accel_map_lookup_entry
gtk_accel_map_change_entry
-gtk_accel_map_add_notifer
-gtk_accel_map_remove_notifer
gtk_accel_map_load
gtk_accel_map_save
gtk_accel_map_foreach
gtk_accel_map_load_fd
gtk_accel_map_save_fd
+gtk_accel_map_load_scanner
</SECTION>
<SECTION>
@@ -52,8 +52,8 @@ gtk_accel_map_save_fd
<TITLE>GtkAccelLabel</TITLE>
GtkAccelLabel
gtk_accel_label_new
-gtk_accel_label_get_accel_object
-gtk_accel_label_set_accel_object
+gtk_accel_label_get_accel_closure
+gtk_accel_label_set_accel_closure
gtk_accel_label_get_accel_widget
gtk_accel_label_set_accel_widget
gtk_accel_label_get_accel_width
@@ -1290,9 +1290,6 @@ GtkItemFactoryEntry
GtkItemFactoryItem
gtk_item_factory_new
gtk_item_factory_construct
-gtk_item_factory_parse_rc
-gtk_item_factory_parse_rc_string
-gtk_item_factory_parse_rc_scanner
gtk_item_factory_add_foreign
gtk_item_factory_from_widget
gtk_item_factory_path_from_widget
@@ -1300,9 +1297,6 @@ gtk_item_factory_get_item
gtk_item_factory_get_widget
gtk_item_factory_get_widget_by_action
gtk_item_factory_get_item_by_action
-gtk_item_factory_dump_items
-gtk_item_factory_dump_rc
-gtk_item_factory_print_func
gtk_item_factory_create_item
gtk_item_factory_create_items
gtk_item_factory_create_items_ac
@@ -1674,7 +1668,6 @@ GTK_OBJECT_TYPE
GTK_OBJECT_TYPE_NAME
GtkObjectFlags
GTK_OBJECT_FLAGS
-GTK_OBJECT_DESTROYED
GTK_OBJECT_FLOATING
GTK_OBJECT_CONNECTED
GTK_OBJECT_SET_FLAGS
@@ -3467,8 +3460,7 @@ gtk_widget_get_child_requisition
gtk_widget_size_allocate
gtk_widget_add_accelerator
gtk_widget_remove_accelerator
-gtk_widget_remove_accelerators
-gtk_widget_accelerator_signal
+gtk_widget_list_accel_closures
gtk_widget_event
gtk_widget_activate
gtk_widget_reparent
@@ -3519,7 +3511,6 @@ gtk_widget_shape_combine_mask
gtk_widget_path
gtk_widget_class_path
gtk_widget_get_composite_name
-gtk_widget_lock_accelerators
gtk_widget_modify_style
gtk_widget_get_modifier_style
gtk_widget_modify_fg
@@ -3541,8 +3532,6 @@ gtk_widget_set_app_paintable
gtk_widget_set_double_buffered
gtk_widget_set_composite_name
gtk_widget_set_scroll_adjustments
-gtk_widget_unlock_accelerators
-gtk_widget_accelerators_locked
gtk_widget_mnemonic_activate
gtk_widget_class_install_style_property
gtk_widget_class_install_style_property_parser
diff --git a/docs/reference/gtk/tmpl/gtk-unused.sgml b/docs/reference/gtk/tmpl/gtk-unused.sgml
index 3bb9d320f3..6f3500c43b 100644
--- a/docs/reference/gtk/tmpl/gtk-unused.sgml
+++ b/docs/reference/gtk/tmpl/gtk-unused.sgml
@@ -514,6 +514,19 @@ This is a private struct used by GTK+ internally, don't worry about it.
</para>
+<!-- ##### USER_FUNCTION GtkAccelMapNotify ##### -->
+<para>
+
+</para>
+
+@data:
+@accel_path_quark:
+@accel_key:
+@accel_mods:
+@accel_group:
+@old_accel_key:
+@old_accel_mods:
+
<!-- ##### ENUM GtkAnchorType ##### -->
<para>
@@ -1299,6 +1312,13 @@ the #GtkAdjustment which sets the range of the scale.
</para>
+<!-- ##### SIGNAL GtkWindow::accels-changed ##### -->
+<para>
+
+</para>
+
+@window: the object which received the signal.
+
<!-- ##### ARG GtkWindow:auto-shrink ##### -->
<para>
If the window shrinks automatically when widgets within it shrink.
@@ -1484,6 +1504,25 @@ If the window shrinks automatically when widgets within it shrink.
@accel_label:
@accel_object:
+<!-- ##### FUNCTION gtk_accel_map_add_notifer ##### -->
+<para>
+
+</para>
+
+@accel_path:
+@notify_data:
+@notify_func:
+@accel_group:
+
+<!-- ##### FUNCTION gtk_accel_map_remove_notifer ##### -->
+<para>
+
+</para>
+
+@accel_path:
+@notify_data:
+@notify_func:
+
<!-- ##### FUNCTION gtk_arg_copy ##### -->
<para>
It will either copy data into an existing argument or allocate a new argument
diff --git a/docs/reference/gtk/tmpl/gtkaccelgroup.sgml b/docs/reference/gtk/tmpl/gtkaccelgroup.sgml
index b069f7e738..f397377766 100644
--- a/docs/reference/gtk/tmpl/gtkaccelgroup.sgml
+++ b/docs/reference/gtk/tmpl/gtkaccelgroup.sgml
@@ -64,23 +64,35 @@ An object representing and maintaining a group of accelerators.
@accel_mods:
@accel_flags:
@closure:
-@accel_path_quark:
<!-- # Unused Parameters # -->
+@accel_path_quark:
@path_quark:
+<!-- ##### FUNCTION gtk_accel_group_connect_by_path ##### -->
+<para>
+
+</para>
+
+@accel_group:
+@accel_path:
+@closure:
+
+
<!-- ##### FUNCTION gtk_accel_group_disconnect ##### -->
<para>
</para>
@accel_group:
+@closure:
+@Returns:
+<!-- # Unused Parameters # -->
@accel_key:
@accel_mods:
-@Returns:
-<!-- ##### FUNCTION gtk_accel_group_query ##### -->
+<!-- ##### FUNCTION gtk_accel_group_disconnect_key ##### -->
<para>
</para>
@@ -88,21 +100,19 @@ An object representing and maintaining a group of accelerators.
@accel_group:
@accel_key:
@accel_mods:
-@n_entries:
@Returns:
-<!-- ##### FUNCTION gtk_accel_groups_activate ##### -->
+<!-- ##### FUNCTION gtk_accel_group_query ##### -->
<para>
</para>
-@acceleratable:
+@accel_group:
@accel_key:
@accel_mods:
+@n_entries:
@Returns:
-<!-- # Unused Parameters # -->
-@object:
<!-- ##### FUNCTION gtk_accel_group_lock ##### -->
@@ -121,6 +131,28 @@ An object representing and maintaining a group of accelerators.
@accel_group:
+<!-- ##### FUNCTION gtk_accel_group_from_accel_closure ##### -->
+<para>
+
+</para>
+
+@closure:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_accel_groups_activate ##### -->
+<para>
+
+</para>
+
+@acceleratable:
+@accel_key:
+@accel_mods:
+@Returns:
+<!-- # Unused Parameters # -->
+@object:
+
+
<!-- ##### FUNCTION gtk_accelerator_valid ##### -->
<para>
diff --git a/docs/reference/gtk/tmpl/gtkaccellabel.sgml b/docs/reference/gtk/tmpl/gtkaccellabel.sgml
index 4587cf7515..dac75d7438 100644
--- a/docs/reference/gtk/tmpl/gtkaccellabel.sgml
+++ b/docs/reference/gtk/tmpl/gtkaccellabel.sgml
@@ -94,6 +94,15 @@ Creates a new #GtkAccelLabel.
@Returns: a new #GtkAccelLabel.
+<!-- ##### FUNCTION gtk_accel_label_set_accel_closure ##### -->
+<para>
+
+</para>
+
+@accel_label:
+@closure:
+
+
<!-- ##### FUNCTION gtk_accel_label_get_accel_widget ##### -->
<para>
diff --git a/docs/reference/gtk/tmpl/gtkwidget.sgml b/docs/reference/gtk/tmpl/gtkwidget.sgml
index 76769b73b5..dbe5a82a33 100644
--- a/docs/reference/gtk/tmpl/gtkwidget.sgml
+++ b/docs/reference/gtk/tmpl/gtkwidget.sgml
@@ -530,6 +530,15 @@ GtkWidget
@Returns:
+<!-- ##### FUNCTION gtk_widget_list_accel_closures ##### -->
+<para>
+
+</para>
+
+@widget:
+@Returns:
+
+
<!-- ##### FUNCTION gtk_widget_event ##### -->
<para>
diff --git a/docs/reference/gtk/tmpl/gtkwindow.sgml b/docs/reference/gtk/tmpl/gtkwindow.sgml
index b8111b4362..d5a4f46478 100644
--- a/docs/reference/gtk/tmpl/gtkwindow.sgml
+++ b/docs/reference/gtk/tmpl/gtkwindow.sgml
@@ -694,35 +694,35 @@ it's larger
@height:
-<!-- ##### SIGNAL GtkWindow::accels-changed ##### -->
+<!-- ##### SIGNAL GtkWindow::activate-default ##### -->
<para>
</para>
@window: the object which received the signal.
-<!-- ##### SIGNAL GtkWindow::activate-default ##### -->
+<!-- ##### SIGNAL GtkWindow::activate-focus ##### -->
<para>
</para>
@window: the object which received the signal.
-<!-- ##### SIGNAL GtkWindow::activate-focus ##### -->
+<!-- ##### SIGNAL GtkWindow::frame-event ##### -->
<para>
</para>
@window: the object which received the signal.
+@event:
+@Returns:
-<!-- ##### SIGNAL GtkWindow::frame-event ##### -->
+<!-- ##### SIGNAL GtkWindow::keys-changed ##### -->
<para>
</para>
@window: the object which received the signal.
-@event:
-@Returns:
<!-- ##### SIGNAL GtkWindow::move-focus ##### -->
<para>