AccelGroupRef

public struct AccelGroupRef : AccelGroupProtocol, GWeakCapturing

A GtkAccelGroup represents a group of keyboard accelerators, typically attached to a toplevel GtkWindow (with gtk_window_add_accel_group()). Usually you won’t need to create a GtkAccelGroup directly; instead, when using GtkUIManager, GTK+ automatically sets up the accelerators for your menus in the ui manager’s GtkAccelGroup.

Note that “accelerators” are different from “mnemonics”. Accelerators are shortcuts for activating a menu item; they appear alongside the menu item they’re a shortcut for. For example “Ctrl+Q” might appear alongside the “Quit” menu item. Mnemonics are shortcuts for GUI elements such as text entries or buttons; they appear as underlined characters. See gtk_label_new_with_mnemonic(). Menu items can have both accelerators and mnemonics, of course.

The AccelGroupRef type acts as a lightweight Swift reference to an underlying GtkAccelGroup instance. It exposes methods that can operate on this data type through AccelGroupProtocol conformance. Use AccelGroupRef only as an unowned reference to an existing GtkAccelGroup instance.

  • ptr
    Untyped pointer to the underlying `GtkAccelGroup` instance.
    

    For type-safe access, use the generated, typed pointer accel_group_ptr property instead.

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!

AccelGroup Class

  • Designated initialiser from the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafeMutablePointer<GtkAccelGroup>)
  • Designated initialiser from a constant pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafePointer<GtkAccelGroup>)
  • Conditional initialiser from an optional pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafeMutablePointer<GtkAccelGroup>?)
  • Conditional initialiser from an optional, non-mutable pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafePointer<GtkAccelGroup>?)
  • Conditional initialiser from an optional gpointer

    Declaration

    Swift

    @inlinable
    init!(gpointer g: gpointer?)
  • Conditional initialiser from an optional, non-mutable gconstpointer

    Declaration

    Swift

    @inlinable
    init!(gconstpointer g: gconstpointer?)
  • Reference intialiser for a related type that implements AccelGroupProtocol

    Declaration

    Swift

    @inlinable
    init<T>(_ other: T) where T : AccelGroupProtocol
  • This factory is syntactic sugar for setting weak pointers wrapped in GWeak<T>

    Declaration

    Swift

    @inlinable
    static func unowned<T>(_ other: T) -> AccelGroupRef where T : AccelGroupProtocol
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to AccelGroupProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(cPointer: UnsafeMutablePointer<T>)
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to AccelGroupProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(constPointer: UnsafePointer<T>)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to AccelGroupProtocol.

    Declaration

    Swift

    @inlinable
    init(mutating raw: UnsafeRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to AccelGroupProtocol.

    Declaration

    Swift

    @inlinable
    init(raw: UnsafeMutableRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to AccelGroupProtocol.

    Declaration

    Swift

    @inlinable
    init(opaquePointer: OpaquePointer)
  • Creates a new GtkAccelGroup.

    Declaration

    Swift

    @inlinable
    init()
  • Finds the GtkAccelGroup to which closure is connected; see gtk_accel_group_connect().

    Declaration

    Swift

    @inlinable
    static func fromAccel<ClosureT>(accelClosure closure: ClosureT) -> AccelGroupRef! where ClosureT : ClosureProtocol