///
///
///
///
///
/**
* Type Definitions for Gjs (https://gjs.guide/)
*
* These type definitions are automatically generated, do not edit them by hand.
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
*
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
*/
declare module 'gi://Garcon?version=1.0' {
// Module dependencies
import type Libxfce4util from 'gi://Libxfce4util?version=1.0';
import type Gio from 'gi://Gio?version=2.0';
import type GObject from 'gi://GObject?version=2.0';
import type GLib from 'gi://GLib?version=2.0';
import type GModule from 'gi://GModule?version=2.0';
export namespace Garcon {
/**
* Garcon-1.0
*/
export namespace MenuLayoutMergeType {
export const $gtype: GObject.GType;
}
enum MenuLayoutMergeType {
MENUS,
FILES,
ALL,
}
export namespace MenuMergeFileType {
export const $gtype: GObject.GType;
}
enum MenuMergeFileType {
PATH,
PARENT,
}
export namespace MenuNodeType {
export const $gtype: GObject.GType;
}
enum MenuNodeType {
INVALID,
MENU,
NAME,
DIRECTORY,
DIRECTORYDIR,
DEFAULTDIRECTORYDIRS,
APPDIR,
DEFAULTAPPDIRS,
ONLYUNALLOCATED,
NOTONLYUNALLOCATED,
DELETED,
NOTDELETED,
INCLUDE,
EXCLUDE,
ALL,
FILENAME,
CATEGORY,
OR,
AND,
NOT,
MOVE,
OLD,
NEW,
DEFAULTLAYOUT,
LAYOUT,
MENUNAME,
SEPARATOR,
MERGE,
MERGEFILE,
MERGEDIR,
MERGEDIRS,
}
/**
* Macro for garcon_set_environment or garcon_set_environment_xdg
* to set the Xfce Desktop Environment.
*/
const ENVIRONMENT_XFCE: string;
/**
* The major version number of the garcon library.
* Like garcon_major_version, but from the headers used at
* application compile time, rather than from the library
* linked against at application run time.
*/
const MAJOR_VERSION: number;
/**
* The micro version number of the garcon library.
* Like garcon_micro_version, but from the headers used at
* application compile time, rather than from the library
* linked against at application run time.
*/
const MICRO_VERSION: number;
/**
* The minor version number of the garcon library.
* Like garcon_minor_version, but from the headers used at
* application compile time, rather than from the library
* linked against at application run time.
*/
const MINOR_VERSION: number;
/**
* Checks that the garcon
* library in use is compatible with the given version. Generally you
* would pass in the constants #GARCON_MAJOR_VERSION,
* #GARCON_MINOR_VERSION and #GARCON_MICRO_VERSION as the three
* arguments to this function; that produces a check that the library
* in use is compatible with the version of
* garcon the application was
* compiled against.
*
*
* Checking the runtime version of the garcon library
*
* const gchar *mismatch;
* mismatch = garcon_check_version (GARCON_VERSION_MAJOR,
* GARCON_VERSION_MINOR,
* GARCON_VERSION_MICRO);
* if (G_UNLIKELY (mismatch != NULL))
* g_error ("Version mismatch: %s", mismatch);
*
*
* @param required_major the required major version.
* @param required_minor the required minor version.
* @param required_micro the required micro version.
* @returns %NULL if the library is compatible with the given version, or a string describing the version mismatch. The returned string is owned by the library and must not be freed or modified by the caller.
*/
function check_version(required_major: number, required_minor: number, required_micro: number): string;
function config_build_paths(filename: string): string[];
/**
* Looks for the filename in the users' config directory and then
* the system config directories.
* @param filename relative filename of the config resource.
* @returns the absolute path to the first file in the search path, that matches @filename or %NULL if no such file or directory could be found.
*/
function config_lookup(filename: string): string;
/**
* Get the environment set with garcon_set_environment().
* @returns Name of the desktop environment (e.g. XFCE, KDE, GNOME) which is used or %NULL.
*/
function get_environment(): string;
function marshal_VOID__OBJECT_OBJECT(
closure: GObject.Closure,
return_value: GObject.Value | any,
n_param_values: number,
param_values: GObject.Value | any,
invocation_hint?: any | null,
marshal_data?: any | null,
): void;
/**
* Sets (or unsets) the desktop environment for which menus will generated.
* Menus and menu items belonging to other desktop environments will be
* ignored. If set to %NULL, all menu items are used.
* @param env Name of the desktop environment for which menus will be generated (e.g. XFCE, KDE, GNOME or %NULL).
*/
function set_environment(env: string): void;
/**
* Set the desktop environment to the envvar XDG_CURRENT_DESKTOP.
* If this variables is not set, it falls back to `default_env`.
*
* For `fallback_env` you can use for example #GARCON_ENVIRONMENT_XFCE.
* @param fallback_env fallback value
*/
function set_environment_xdg(fallback_env: string): void;
namespace Menu {
// Signal callback interfaces
interface DirectoryChanged {
(object: MenuDirectory, p0: MenuDirectory): void;
}
interface ReloadRequired {
(): void;
}
// Constructor properties interface
interface ConstructorProps extends GObject.Object.ConstructorProps, MenuElement.ConstructorProps {
directory: MenuDirectory;
file: Gio.File;
}
}
class Menu extends GObject.Object implements MenuElement {
static $gtype: GObject.GType