GTK+ Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# Keyboard Accelerators

## Name

Keyboard Accelerators --

## Synopsis

    #include <gtk/gtk.h>

    struct      GtkAccelGroup;
    struct      GtkAccelEntry;
    GtkAccelGroup* gtk_accel_group_new          (void);
    GtkAccelGroup* gtk_accel_group_get_default  (void);
    GtkAccelGroup* gtk_accel_group_ref          (GtkAccelGroup *accel_group);
    void        gtk_accel_group_unref           (GtkAccelGroup *accel_group);
    gboolean    gtk_accel_group_activate        (GtkAccelGroup *accel_group,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods);
    gboolean    gtk_accel_groups_activate       (GtkObject *object,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods);
    void        gtk_accel_group_attach          (GtkAccelGroup *accel_group,
                                                 GtkObject *object);
    void        gtk_accel_group_detach          (GtkAccelGroup *accel_group,
                                                 GtkObject *object);
    void        gtk_accel_group_lock            (GtkAccelGroup *accel_group);
    void        gtk_accel_group_unlock          (GtkAccelGroup *accel_group);
    GtkAccelEntry* gtk_accel_group_get_entry    (GtkAccelGroup *accel_group,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods);
    void        gtk_accel_group_lock_entry      (GtkAccelGroup *accel_group,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods);
    void        gtk_accel_group_unlock_entry    (GtkAccelGroup *accel_group,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods);
    void        gtk_accel_group_add             (GtkAccelGroup *accel_group,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods,
                                                 GtkAccelFlags accel_flags,
                                                 GtkObject *object,
                                                 const gchar *accel_signal);
    void        gtk_accel_group_remove          (GtkAccelGroup *accel_group,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods,
                                                 GtkObject *object);
    void        gtk_accel_group_handle_add      (GtkObject *object,
                                                 guint accel_signal_id,
                                                 GtkAccelGroup *accel_group,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods,
                                                 GtkAccelFlags accel_flags);
    void        gtk_accel_group_handle_remove   (GtkObject *object,
                                                 GtkAccelGroup *accel_group,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods);
    guint       gtk_accel_group_create_add      (GtkType class_type,
                                                 GtkSignalRunType signal_flags,
                                                 guint handler_offset);
    guint       gtk_accel_group_create_remove   (GtkType class_type,
                                                 GtkSignalRunType signal_flags,
                                                 guint handler_offset);
    void        gtk_accel_group_marshal_add     (GtkObject *object,
                                                 GtkSignalFunc func,
                                                 gpointer func_data,
                                                 GtkArg *args);
    void        gtk_accel_group_marshal_remove  (GtkObject *object,
                                                 GtkSignalFunc func,
                                                 gpointer func_data,
                                                 GtkArg *args);
    GSList*     gtk_accel_groups_from_object    (GtkObject *object);
    GSList*     gtk_accel_group_entries_from_object
                                                (GtkObject *object);
    gboolean    gtk_accelerator_valid           (guint keyval,
                                                 GdkModifierType modifiers);
    void        gtk_accelerator_parse           (const gchar *accelerator,
                                                 guint *accelerator_key,
                                                 GdkModifierType *accelerator_mods);
    gchar*      gtk_accelerator_name            (guint accelerator_key,
                                                 GdkModifierType accelerator_mods);
    void        gtk_accelerator_set_default_mod_mask
                                                (GdkModifierType default_mod_mask);
    guint       gtk_accelerator_get_default_mod_mask
                                                (void);

## Description

## Details

### struct GtkAccelGroup

    struct GtkAccelGroup
    {
      guint	          ref_count;
      guint	          lock_count;
      GdkModifierType modifier_mask;
      GSList         *attach_objects;
    };

### struct GtkAccelEntry

    struct GtkAccelEntry
    {
      /* key portion
       */
      GtkAccelGroup		*accel_group;
      guint			 accelerator_key;
      GdkModifierType	 accelerator_mods;

      GtkAccelFlags		 accel_flags;
      GtkObject		*object;
      guint			 signal_id;
    };

### gtk_accel_group_new ()

    GtkAccelGroup* gtk_accel_group_new          (void);

Returns : |

### gtk_accel_group_get_default ()

    GtkAccelGroup* gtk_accel_group_get_default  (void);

Returns : |

### gtk_accel_group_ref ()

    GtkAccelGroup* gtk_accel_group_ref          (GtkAccelGroup *accel_group);

`accel_group` : |
Returns : |

### gtk_accel_group_unref ()

    void        gtk_accel_group_unref           (GtkAccelGroup *accel_group);

`accel_group` : |

### gtk_accel_group_activate ()

    gboolean    gtk_accel_group_activate        (GtkAccelGroup *accel_group,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods);

`accel_group` : |
`accel_key` : |
`accel_mods` : |
Returns : |

### gtk_accel_groups_activate ()

    gboolean    gtk_accel_groups_activate       (GtkObject *object,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods);

`object` : |
`accel_key` : |
`accel_mods` : |
Returns : |

### gtk_accel_group_attach ()

    void        gtk_accel_group_attach          (GtkAccelGroup *accel_group,
                                                 GtkObject *object);

`accel_group` : |
`object` : |

### gtk_accel_group_detach ()

    void        gtk_accel_group_detach          (GtkAccelGroup *accel_group,
                                                 GtkObject *object);

`accel_group` : |
`object` : |

### gtk_accel_group_lock ()

    void        gtk_accel_group_lock            (GtkAccelGroup *accel_group);

`accel_group` : |

### gtk_accel_group_unlock ()

    void        gtk_accel_group_unlock          (GtkAccelGroup *accel_group);

`accel_group` : |

### gtk_accel_group_get_entry ()

    GtkAccelEntry* gtk_accel_group_get_entry    (GtkAccelGroup *accel_group,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods);

`accel_group` : |
`accel_key` : |
`accel_mods` : |
Returns : |

### gtk_accel_group_lock_entry ()

    void        gtk_accel_group_lock_entry      (GtkAccelGroup *accel_group,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods);

`accel_group` : |
`accel_key` : |
`accel_mods` : |

### gtk_accel_group_unlock_entry ()

    void        gtk_accel_group_unlock_entry    (GtkAccelGroup *accel_group,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods);

`accel_group` : |
`accel_key` : |
`accel_mods` : |

### gtk_accel_group_add ()

    void        gtk_accel_group_add             (GtkAccelGroup *accel_group,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods,
                                                 GtkAccelFlags accel_flags,
                                                 GtkObject *object,
                                                 const gchar *accel_signal);

`accel_group` : |
`accel_key` : |
`accel_mods` : |
`accel_flags` : |
`object` : |
`accel_signal` : |

### gtk_accel_group_remove ()

    void        gtk_accel_group_remove          (GtkAccelGroup *accel_group,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods,
                                                 GtkObject *object);

`accel_group` : |
`accel_key` : |
`accel_mods` : |
`object` : |

### gtk_accel_group_handle_add ()

    void        gtk_accel_group_handle_add      (GtkObject *object,
                                                 guint accel_signal_id,
                                                 GtkAccelGroup *accel_group,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods,
                                                 GtkAccelFlags accel_flags);

`object` : |
`accel_signal_id` : |
`accel_group` : |
`accel_key` : |
`accel_mods` : |
`accel_flags` : |

### gtk_accel_group_handle_remove ()

    void        gtk_accel_group_handle_remove   (GtkObject *object,
                                                 GtkAccelGroup *accel_group,
                                                 guint accel_key,
                                                 GdkModifierType accel_mods);

`object` : |
`accel_group` : |
`accel_key` : |
`accel_mods` : |

### gtk_accel_group_create_add ()

    guint       gtk_accel_group_create_add      (GtkType class_type,
                                                 GtkSignalRunType signal_flags,
                                                 guint handler_offset);

`class_type` : |
`signal_flags` : |
`handler_offset` : |
Returns : |

### gtk_accel_group_create_remove ()

    guint       gtk_accel_group_create_remove   (GtkType class_type,
                                                 GtkSignalRunType signal_flags,
                                                 guint handler_offset);

`class_type` : |
`signal_flags` : |
`handler_offset` : |
Returns : |

### gtk_accel_group_marshal_add ()

    void        gtk_accel_group_marshal_add     (GtkObject *object,
                                                 GtkSignalFunc func,
                                                 gpointer func_data,
                                                 GtkArg *args);

`object` : |
`func` : |
`func_data` : |
`args` : |

### gtk_accel_group_marshal_remove ()

    void        gtk_accel_group_marshal_remove  (GtkObject *object,
                                                 GtkSignalFunc func,
                                                 gpointer func_data,
                                                 GtkArg *args);

`object` : |
`func` : |
`func_data` : |
`args` : |

### gtk_accel_groups_from_object ()

    GSList*     gtk_accel_groups_from_object    (GtkObject *object);

`object` : |
Returns : |

### gtk_accel_group_entries_from_object ()

    GSList*     gtk_accel_group_entries_from_object
                                                (GtkObject *object);

`object` : |
Returns : |

### gtk_accelerator_valid ()

    gboolean    gtk_accelerator_valid           (guint keyval,
                                                 GdkModifierType modifiers);

`keyval` : |
`modifiers` : |
Returns : |

### gtk_accelerator_parse ()

    void        gtk_accelerator_parse           (const gchar *accelerator,
                                                 guint *accelerator_key,
                                                 GdkModifierType *accelerator_mods);

`accelerator` : |
`accelerator_key` : |
`accelerator_mods` : |

### gtk_accelerator_name ()

    gchar*      gtk_accelerator_name            (guint accelerator_key,
                                                 GdkModifierType accelerator_mods);

`accelerator_key` : |
`accelerator_mods` : |
Returns : |

### gtk_accelerator_set_default_mod_mask ()

    void        gtk_accelerator_set_default_mod_mask
                                                (GdkModifierType default_mod_mask);

`default_mod_mask` : |

### gtk_accelerator_get_default_mod_mask ()

    guint       gtk_accelerator_get_default_mod_mask
                                                (void);

Returns : |

<<< Previous Page | Home | Up | Next Page >>>
Resource Files | Selections