MenuShellRef
public struct MenuShellRef : MenuShellProtocol, GWeakCapturing
A GtkMenuShell is the abstract base class used to derive the
GtkMenu and GtkMenuBar subclasses.
A GtkMenuShell is a container of GtkMenuItem objects arranged
in a list which can be navigated, selected, and activated by the
user to perform application functions. A GtkMenuItem can have a
submenu associated with it, allowing for nested hierarchical menus.
Terminology
A menu item can be “selected”, this means that it is displayed in the prelight state, and if it has a submenu, that submenu will be popped up.
A menu is “active” when it is visible onscreen and the user is selecting from it. A menubar is not active until the user clicks on one of its menuitems. When a menu is active, passing the mouse over a submenu will pop it up.
There is also is a concept of the current menu and a current menu item. The current menu item is the selected menu item that is furthest down in the hierarchy. (Every active menu shell does not necessarily contain a selected menu item, but if it does, then the parent menu shell must also contain a selected menu item.) The current menu is the menu that contains the current menu item. It will always have a GTK grab and receive all key presses.
The MenuShellRef type acts as a lightweight Swift reference to an underlying GtkMenuShell instance.
It exposes methods that can operate on this data type through MenuShellProtocol conformance.
Use MenuShellRef only as an unowned reference to an existing GtkMenuShell instance.
-
Untyped pointer to the underlying `GtkMenuShell` instance.For type-safe access, use the generated, typed pointer
menu_shell_ptrproperty instead.Declaration
Swift
public let ptr: UnsafeMutableRawPointer!
-
Designated initialiser from the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<GtkMenuShell>) -
Designated initialiser from a constant pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<GtkMenuShell>) -
Conditional initialiser from an optional pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<GtkMenuShell>?) -
Conditional initialiser from an optional, non-mutable pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafePointer<GtkMenuShell>?) -
Conditional initialiser from an optional
gpointerDeclaration
Swift
@inlinable init!(gpointer g: gpointer?) -
Conditional initialiser from an optional, non-mutable
gconstpointerDeclaration
Swift
@inlinable init!(gconstpointer g: gconstpointer?) -
Reference intialiser for a related type that implements
MenuShellProtocolDeclaration
Swift
@inlinable init<T>(_ other: T) where T : MenuShellProtocol -
This factory is syntactic sugar for setting weak pointers wrapped in
GWeak<T>Declaration
Swift
@inlinable static func unowned<T>(_ other: T) -> MenuShellRef where T : MenuShellProtocol -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
MenuShellProtocol.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
MenuShellProtocol.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
MenuShellProtocol.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
MenuShellProtocol.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
MenuShellProtocol.Declaration
Swift
@inlinable init(opaquePointer: OpaquePointer)
View on GitHub
Install in Dash
MenuShellRef Structure Reference