portalreq

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package portalreq is what the desktop-portal backend tells a shell dialog about the request it serves.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Caller

type Caller struct {
	Handle, AppID, ParentWindow string
	Modal                       bool
}

Caller identifies the portal request behind a shell dialog: Handle is the request's object path, the key the services' Dismiss names; AppID is the app asking ("" for a host app); ParentWindow is the app's window identifier ("wayland:<xdg-foreign handle>", or ""); Modal is whether the dialog should hold the keyboard until answered (the portal's modal option, true unless the app said otherwise). Over D-Bus it is the struct (sssb).

type Choice

type Choice struct {
	ID, Label string
	Options   []Option
	Initial   string
}

Choice is one of the extra questions a portal dialog may carry (the FileChooser's and Access' choices option, (ssa(ss)s)): an id, a label, the options, and the initial option ("" lets the dialog pick). No options is a yes/no question with the values "true" and "false".

func (Choice) Boolean

func (c Choice) Boolean() bool

Boolean reports whether the choice is a yes/no question.

func (Choice) Start

func (c Choice) Start() string

Start is the value the choice starts at: the initial option when it is one of the options, else the first (or "false" for a yes/no).

type Option

type Option struct{ ID, Label string }

Option is one entry of a Choice: its id and its label, (ss).

type Selection

type Selection struct{ ID, Value string }

Selection is one answered choice, (ss): the choice's id and the option picked.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL