/** * The GIR-derived widget VOCABULARY for GPluginGtk4-1.0. * * GENERATED — do not edit. Provenance: GPluginGtk4-1.0 — library 0.44.2 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object * * 4 concrete widgets, 4 declarations, 0 enum nick unions, 0 slot candidates. * * Module-scoped exports only. There is no `JSX` namespace here, no tag spelling and * no `on` prop name: those are DIALECT, and every framework answers them * differently. The shape to avoid is the GLOBAL AUGMENT — a `declare global` on * `React.JSX` collides with every other library on a shared tag — while a * module-scoped `JSX` behind a `jsxImportSource` does not. This package is used by * projects that want nothing to do with JSX, so it emits neither; a consumer declaring * a module-scoped namespace over these names is doing it right. * * Three things this is and `ConstructorProps` is not: WRITABLE-only (measured on * Gtk-4.0, `ConstructorProps` offers 150 read-only properties across 68 classes as * settable, and GTK's failure mode for writing one is exit 0), OPTIONAL, and keyed * by the name GObject actually REGISTERED — the dashed spelling `g_object_set`, * GtkBuilder XML and Blueprint all use. * * Signal handler types are not re-derived: `X.SignalSignatures`, which this package * already emits for every class with the parent chain, every implemented interface * and the `notify::` keys folded in, is what `Widgets[G]['signals']` points at. */ import type GObject from '@girs/gobject-2.0'; import type GPlugin from '@girs/gplugin-1.0'; import type GPluginGtk4 from './gplugingtk4-1.0.js'; import type Gio from '@girs/gio-2.0'; import type { GtkAccessibleConstructOnly, GtkAccessibleProps, GtkActionableConstructOnly, GtkActionableProps, GtkBoxConstructOnly, GtkBoxProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkConstraintTargetConstructOnly, GtkConstraintTargetProps, GtkListBoxRowConstructOnly, GtkListBoxRowProps, GtkOrientableConstructOnly, GtkOrientableProps, GtkWidgetConstructOnly, GtkWidgetProps } from '@girs/gtk-4.0/surface'; // --------------------------------------------------------------------------- // Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`. // // Not derived from the member name. Substituting underscores for dashes is not a law: // some nicks keep an underscore the substitution would have replaced, and only the // attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is // how a derived nick passes review and breaks elsewhere. // Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir. // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- // Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own // inheritance rather than flattening per widget. // // The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties // of its own and `orientation` is not among them — it lives on `Gtk.Orientable`, // because GObject installs interface properties on the implementor at runtime while // GIR keeps them once, on the interface. // --------------------------------------------------------------------------- /** A widget that displays a single [iface@GPlugin.Plugin] in a user friendly way, intended to be placed in a [class@GPluginGtk4.View]. */ export interface GPluginGtkPluginPageProps extends GtkBoxProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps, GtkOrientableProps { /** * The [iface@GPlugin.Plugin] whose info should be displayed. * @since 0.39 */ plugin?: GObject.Object | null; /** * The [class@Gio.SettingsBackend] to use when viewing plugin settings. * @since 0.40 */ 'settings-backend'?: Gio.SettingsBackend; } /** Settable only at construction — a renderer must REBUILD, not patch. */ export type GPluginGtkPluginPageConstructOnly = GtkBoxConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | GtkOrientableConstructOnly; /** A widget that displays a [iface@GPlugin.Plugin] in a user friendly way, intended to be placed in a [class@Gtk.ListBox]. */ export interface GPluginGtkPluginRowProps extends GtkListBoxRowProps, GtkAccessibleProps, GtkActionableProps, GtkBuildableProps, GtkConstraintTargetProps { /** * The [iface@GPlugin.Plugin] whose info should be displayed. * @since 0.38 */ plugin?: GObject.Object | null; } /** Settable only at construction — a renderer must REBUILD, not patch. */ export type GPluginGtkPluginRowConstructOnly = GtkListBoxRowConstructOnly | GtkAccessibleConstructOnly | GtkActionableConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly; /** A [class@Gtk.ListBox] widget that displays all the settings from a plugin. */ export interface GPluginGtkPluginSettingsListProps extends GtkBoxProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps, GtkOrientableProps { /** The [class@Gio.Settings] to display. */ settings?: Gio.Settings; } /** Settable only at construction — a renderer must REBUILD, not patch. */ export type GPluginGtkPluginSettingsListConstructOnly = GtkBoxConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | GtkOrientableConstructOnly; /** A widget that displays all the plugins and some basic information about them. */ export interface GPluginGtkViewProps extends GtkBoxProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps, GtkOrientableProps { /** The plugin manager to display. */ manager?: GPlugin.Manager; /** The [class@Gio.SettingsBackend] to use when viewing plugin settings. */ 'settings-backend'?: Gio.SettingsBackend; /** Whether or not to show internal plugins. */ 'show-internal'?: boolean; } /** Settable only at construction — a renderer must REBUILD, not patch. */ export type GPluginGtkViewConstructOnly = GtkBoxConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | GtkOrientableConstructOnly; // --------------------------------------------------------------------------- // The GType-keyed widget map. // // Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A // consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal // for a Vue `GlobalComponents`, the class itself for a renderer whose element type // is the class. None of those is baked in here. // // `slotCandidates` is a candidate list and never an answer: derived from methods // taking exactly one widget argument. The GIR cannot tell adoption from reference — // `set_title_widget` parents its argument and `set_activatable_widget` does not, and // both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides; // this is what notices when a release adds a candidate. // --------------------------------------------------------------------------- export interface Widgets { GPluginGtkPluginPage: { class: GPluginGtk4.PluginPage; props: GPluginGtkPluginPageProps; signals: GPluginGtk4.PluginPage.SignalSignatures; constructOnly: GPluginGtkPluginPageConstructOnly; slotCandidates: {}; }; GPluginGtkPluginRow: { class: GPluginGtk4.PluginRow; props: GPluginGtkPluginRowProps; signals: GPluginGtk4.PluginRow.SignalSignatures; constructOnly: GPluginGtkPluginRowConstructOnly; slotCandidates: {}; }; GPluginGtkPluginSettingsList: { class: GPluginGtk4.PluginSettingsList; props: GPluginGtkPluginSettingsListProps; signals: GPluginGtk4.PluginSettingsList.SignalSignatures; constructOnly: GPluginGtkPluginSettingsListConstructOnly; slotCandidates: {}; }; GPluginGtkView: { class: GPluginGtk4.View; props: GPluginGtkViewProps; signals: GPluginGtk4.View.SignalSignatures; constructOnly: GPluginGtkViewConstructOnly; slotCandidates: {}; }; } /** Every GType this namespace can create. A consumer derives its own tag map. */ export type WidgetGType = keyof Widgets; // --------------------------------------------------------------------------- // Child holders — the same shape, for objects that CARRY a widget without being one. // // `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from // `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places // them exactly like a container, so they belong in the vocabulary; a check asking "is // this a widget" must still be able to say no. Hence a sibling table rather than four // more rows in `Widgets`: concatenate them when you mean both. // --------------------------------------------------------------------------- export interface ChildHolders { } /** Every GType this namespace holds a child in without it being a widget. */ export type ChildHolderGType = keyof ChildHolders; /** The writable, optional, GObject-keyed property surface of one GType. */ export type PropsOf = Widgets[G]['props']; /** The signal table this package already emits, reached by GType. */ export type SignalsOf = Widgets[G]['signals']; /** The instance type — what a `ref`-shaped prop should infer. */ export type InstanceOf = Widgets[G]['class']; /** Property names that can only be set at construction. */ export type ConstructOnlyOf = Widgets[G]['constructOnly']; /** Candidate child slots — see the note above; curation decides. */ export type SlotCandidatesOf = keyof Widgets[G]['slotCandidates']; /** * The same facts as runtime data, for a consumer that CHECKS them. * * Types are erased, so a spec that asks the installed GTK whether every property * here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup` * and every nick resolvable through an enum lookup cannot read the interfaces * above. Emitted headlessly with no GTK present, which is exactly why the checking * belongs to the consumer and the DATA belongs here. */ export const SURFACE_PROVENANCE: string; /** Declaration GType -> its own settable properties, as GObject registered them. */ export const OWN_PROPS: Readonly>; /** Widget GType -> its own signals. */ export const OWN_SIGNALS: Readonly>; /** Widget GType -> every declaration its members come from, self first. */ export const DECLS: Readonly>; /** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */ export const CHILD_HOLDERS: readonly string[]; /** Enum GType -> the nicks this surface offers. */ export const ENUM_NICKS: Readonly>; /** Widget GType -> slot name -> the method that may adopt a child there. */ export const SLOT_CANDIDATES: Readonly>>>; /** * `Type.property` -> the release that introduced it. * * What keeps a runtime cross-check honest across a version gap without an * allowlist: a member the installed library lacks is a defect UNLESS the version * here is newer than the one running. */ export const SINCE: Readonly>;