internal

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FDN_PATH            = "/org/freedesktop/Notifications"
	FDN_IFAC            = "org.freedesktop.Notifications"
	FDN_NAME            = "org.freedesktop.Notifications"
	INTROSPECTABLE_IFAC = "org.freedesktop.DBus.Introspectable"

	FDN_SPEC_VERSION = "1.2"
	MAX_UINT32       = ^uint32(0)
)
View Source
const (
	VERSION = "0.7.0"
	PACKAGE = "hyprnotify"
	VENDOR  = "hyprnotify"
)
View Source
const DBUS_XML = `<node name="` + FDN_PATH + `">
  <interface name="` + FDN_IFAC + `">

      <method name="GetCapabilities">
          <arg direction="out" name="capabilities"    type="as" />
      </method>

      <method name="Notify">
          <arg direction="in"  name="app_name"        type="s"/>
          <arg direction="in"  name="replaces_id"     type="u"/>
          <arg direction="in"  name="app_icon"        type="s"/>
          <arg direction="in"  name="summary"         type="s"/>
          <arg direction="in"  name="body"            type="s"/>
          <arg direction="in"  name="actions"         type="as"/>
          <arg direction="in"  name="hints"           type="a{sv}"/>
          <arg direction="in"  name="expire_timeout"  type="i"/>
          <arg direction="out" name="id"              type="u"/>
      </method> 

      <method name="GetServerInformation">
          <arg direction="out" name="name"            type="s"/>
          <arg direction="out" name="vendor"          type="s"/>
          <arg direction="out" name="version"         type="s"/>
          <arg direction="out" name="spec_version"    type="s"/>
      </method>

      <method name="CloseNotification">
          <arg direction="in"  name="id"              type="u"/>
      </method>

     <signal name="NotificationClosed">
          <arg name="id"         type="u"/>
          <arg name="reason"     type="u"/>
      </signal>

      <signal name="ActionInvoked">
          <arg name="id"         type="u"/>
          <arg name="action_key" type="s"/>
      </signal>
  </interface>
` + introspect.IntrospectDataString + `
</node>`

Variables

This section is empty.

Functions

func GetHyprSocket

func GetHyprSocket(hypr *HyprConn)

func GetHyprSocketAddr

func GetHyprSocketAddr() string

func InitDBus

func InitDBus(enable_sound bool)

func InitSpeaker added in v0.6.0

func InitSpeaker()

func PlayAudio added in v0.6.0

func PlayAudio()

func SendCloseSignal

func SendCloseSignal(timeout int32, id uint32, reason uint32, flag chan uint32)

Types

type DBusNotify added in v0.4.1

type DBusNotify string

func (DBusNotify) CloseNotification added in v0.4.1

func (n DBusNotify) CloseNotification(id uint32) *dbus.Error

func (DBusNotify) GetCapabilities added in v0.4.1

func (n DBusNotify) GetCapabilities() ([]string, *dbus.Error)

func (DBusNotify) GetServerInformation added in v0.4.1

func (n DBusNotify) GetServerInformation() (string, string, string, string, *dbus.Error)

func (DBusNotify) Notify added in v0.4.1

func (n DBusNotify) Notify(
	app_name string,
	replaces_id uint32,
	app_icon string,
	summary string,
	body string,
	actions []string,
	hints map[string]dbus.Variant,
	expire_timeout int32,
) (uint32, *dbus.Error)

type HyprConn

type HyprConn struct {
	// contains filtered or unexported fields
}

func (HyprConn) DismissNotify

func (hypr HyprConn) DismissNotify(last int)

func (HyprConn) HyprCtl

func (hypr HyprConn) HyprCtl(args ...string)

func (HyprConn) SendNotification added in v0.4.1

func (hypr HyprConn) SendNotification(nf *Notification)

type Notification added in v0.4.1

type Notification struct {
	// contains filtered or unexported fields
}

func NewNotification added in v0.4.1

func NewNotification() Notification

Jump to

Keyboard shortcuts

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