Gjsify LogoGjsify Logo

Index

Functions

  • A wrapper function for g_action_map_add_action_entries() that checks duplicates.

    This function first checks - for each entry - that the action_map doesn't already contain a #GAction with the same name. A warning is printed if an old action will be dropped. In any case, it then calls g_action_map_add_action_entries() with the same arguments as passed to this function.

    This function also checks if there are duplicates in the entries array itself.

    Parameters

    • actionMap: ActionMap

      a #GActionMap.

    • entries: Gio.ActionEntry[]

      a pointer to the first item in an array of #GActionEntry structs.

    • userData: object

      the user data for signal connections.

    Returns void

  • Gets the list of default candidate encodings to try when loading a file. See gtk_source_file_loader_set_candidate_encodings().

    This function returns a different list depending on the current locale (i.e. language, country and default encoding). The UTF-8 encoding and the current locale encoding are guaranteed to be present in the returned list.

    Returns Gtef.Encoding[]

  • fileLoaderErrorQuark(): Quark
  • fileSaverErrorQuark(): Quark
  • Gets the indentation, as a string, of the line at iter. iter can be anywhere in the line.

    Possible use-case: to implement an action that inserts some text in a #GtkTextBuffer. If the text to insert spans multiple lines, it is usually desired to keep the same indentation level.

    Parameters

    Returns string

  • menuItemGetLongDescription(menuItem: Gtk.MenuItem): string | null
  • menuItemSetIconName(item: Gtk.MenuItem, iconName: string): void
  • Sets an icon to a #GtkMenuItem.

    If the child widget of item is already a #GtkBox, all #GtkImage widgets inside that box are first destroyed. A #GtkImage for icon_name is then inserted to the box.

    If the child widget of item is not a #GtkBox (it's usually the #GtkAccelLabel), it is replaced by a new #GtkBox and the initial child widget is inserted to the #GtkBox, alongside the icon.

    As a consequence, if you want to call functions on the #GtkAccelLabel, it's easier to do it before calling this function.

    Parameters

    • item: Gtk.MenuItem

      a #GtkMenuItem.

    • iconName: string

      an icon name.

    Returns void

  • menuItemSetLongDescription(menuItem: Gtk.MenuItem, longDescription: string): void
  • Sets the long description of menu_item. A possible use-case is to display it in a #GtkStatusbar, or as a tooltip.

    Parameters

    • menuItem: Gtk.MenuItem

      a #GtkMenuItem.

    • longDescription: string

      the long description, or %NULL to unset it.

    Returns void

  • metadataManagerInit(metadataPath: string): void
  • This function initializes the metadata manager.

    The metadata_path must be different for each process. It is advised for your application to rely on #GApplication process uniqueness.

    A good place to store the metadata is in a sub-directory of the user data directory. See g_get_user_data_dir().

    Parameters

    • metadataPath: string

      the filename where the metadata is stored.

    Returns void

  • metadataManagerShutdown(): void
  • This function saves synchronously metadata if they need to be saved, and frees the internal data of the metadata manager.

    Returns void

  • Gets the URI of item. item must be a child of menu. menu must be a #GtkRecentChooserMenu.

    This function has been written because the value returned by gtk_recent_chooser_get_current_uri() is not updated when #GtkMenuItem's of a #GtkRecentChooserMenu are selected/deselected.

    Parameters

    Returns string

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method