Gjsify LogoGjsify Logo

Index

Enumerations

Classes

Interfaces

Functions

Functions

  • action_map_add_action_entries_check_dups(action_map: ActionMap, entries: Gio.ActionEntry[], user_data: object): void
  • 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

    • action_map: ActionMap

      a #GActionMap.

    • entries: Gio.ActionEntry[]

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

    • user_data: 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[]

  • file_loader_error_quark(): Quark
  • file_saver_error_quark(): 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

  • menu_item_get_long_description(menu_item: Gtk.MenuItem): string | null
  • menu_item_set_icon_name(item: Gtk.MenuItem, icon_name: 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.

    • icon_name: string

      an icon name.

    Returns void

  • menu_item_set_long_description(menu_item: Gtk.MenuItem, long_description: 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

    • menu_item: Gtk.MenuItem

      a #GtkMenuItem.

    • long_description: string

      the long description, or %NULL to unset it.

    Returns void

  • metadata_manager_init(metadata_path: 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

    • metadata_path: string

      the filename where the metadata is stored.

    Returns void

  • metadata_manager_shutdown(): 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