initial commit

This commit is contained in:
Xanazf 2024-09-28 02:35:19 +03:00
commit 6844038616
294 changed files with 37788 additions and 0 deletions

View file

@ -0,0 +1,236 @@
{
"name": "Notification",
"module": "Quickshell.Services.Notifications",
"type": "class",
"super": {
"type": "qt",
"module": "qml.QtQml",
"name": "QtObject"
},
"description": "A notification emitted by a NotificationServer.",
"details": "A notification emitted by a NotificationServer.\n\n{{< callout type=\"info\" >}}\n This type is {{< qmltypelink type=\"local\" module=\"Quickshell\" name=\"Retainable\" mtype=\"\" mname=\"\" >}}. It\ncan be retained after destruction if necessary.\n\n{{< /callout >}}",
"flags": [
"uncreatable"
],
"properties": {
"hasActionIcons": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If actions associated with this notification have icons available.\n\nSee {{< qmltypelink type=\"local\" module=\"Quickshell.Services.Notifications\" name=\"NotificationAction\" mtype=\"prop\" mname=\"identifier\" >}} for details.\n",
"flags": [
"readonly"
]
},
"urgency": {
"type": {
"type": "local",
"module": "Quickshell.Services.Notifications",
"name": "NotificationUrgency"
},
"details": null,
"flags": [
"readonly"
]
},
"appIcon": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "The sending application's icon. If none was provided, then the icon from an associated\ndesktop entry will be retrieved. If none was found then \"\".\n",
"flags": [
"readonly"
]
},
"desktopEntry": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "The name of the sender's desktop entry or \"\" if none was supplied.\n",
"flags": [
"readonly"
]
},
"appName": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "The sending application's name.\n",
"flags": [
"readonly"
]
},
"body": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": null,
"flags": [
"readonly"
]
},
"resident": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If true, the notification will not be destroyed after an action is invoked.\n",
"flags": [
"readonly"
]
},
"expireTimeout": {
"type": {
"type": "qt",
"module": "qml",
"name": "real"
},
"details": "Time in seconds the notification should be valid for\n",
"flags": [
"readonly"
]
},
"summary": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "The image associated with this notification, or \"\" if none.\n",
"flags": [
"readonly"
]
},
"lastGeneration": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If this notification was carried over from the last generation\nwhen quickshell reloaded.\n\nNotifications from the last generation will only be emitted\nif {{< qmltypelink type=\"local\" module=\"Quickshell.Services.Notifications\" name=\"NotificationServer\" mtype=\"prop\" mname=\"keepOnReload\" >}} is true.\n",
"flags": [
"readonly"
]
},
"hints": {
"type": {
"type": "unknown",
"module": "",
"name": ""
},
"details": "All hints sent by the client application as a javascript object.\nMany common hints are exposed via other properties.\n",
"flags": [
"readonly"
]
},
"id": {
"type": {
"type": "qt",
"module": "qml",
"name": "int"
},
"details": "Id of the notification as given to the client.\n",
"flags": [
"readonly"
]
},
"transient": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If true, the notification should skip any kind of persistence function like a notification area.\n",
"flags": [
"readonly"
]
},
"actions": {
"type": {
"type": "qt",
"module": "qml",
"name": "list",
"of": {
"type": "local",
"module": "Quickshell.Services.Notifications",
"name": "NotificationAction"
}
},
"details": "Actions that can be taken for this notification.\n",
"flags": [
"readonly"
]
},
"image": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "An image associated with the notification.\n\nThis image is often something like a profile picture in instant messaging applications.\n",
"flags": [
"readonly"
]
},
"tracked": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If the notification is tracked by the notification server.\n\nSetting this property to false is equivalent to calling {{< qmltypelink type=\"\" module=\"\" name=\"\" mtype=\"func\" mname=\"dismiss\" >}}.\n"
}
},
"functions": [
{
"ret": {
"type": "qt",
"module": "qml",
"name": "void"
},
"name": "dismiss",
"id": "dismiss",
"details": "Destroy the notification and hint to the remote application that it was\nexplicitly closed by the user.\n",
"params": []
},
{
"ret": {
"type": "qt",
"module": "qml",
"name": "void"
},
"name": "expire",
"id": "expire",
"details": "Destroy the notification and hint to the remote application that it has\ntimed out an expired.\n",
"params": []
}
],
"signals": {
"closed": {
"name": "closed",
"details": "Sent when a notification has been closed.\n\nThe notification object will be destroyed as soon as all signal handlers exit.\n",
"params": [
{
"name": "reason",
"type": {
"type": "local",
"module": "Quickshell.Services.Notifications",
"name": "NotificationCloseReason"
}
}
]
}
},
"variants": {}
}

View file

@ -0,0 +1,54 @@
{
"name": "NotificationAction",
"module": "Quickshell.Services.Notifications",
"type": "class",
"super": {
"type": "qt",
"module": "qml.QtQml",
"name": "QtObject"
},
"description": "An action associated with a Notification.",
"details": "See {{< qmltypelink type=\"local\" module=\"Quickshell.Services.Notifications\" name=\"Notification\" mtype=\"prop\" mname=\"actions\" >}}.\n",
"flags": [
"uncreatable"
],
"properties": {
"identifier": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "The identifier of the action.\n\nWhen {{< qmltypelink type=\"local\" module=\"Quickshell.Services.Notifications\" name=\"Notification\" mtype=\"prop\" mname=\"hasActionIcons\" >}} is true, this property will be an icon name.\nWhen it is false, this property is irrelevant.\n",
"flags": [
"readonly"
]
},
"text": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "The localized text that should be displayed on a button.\n",
"flags": [
"readonly"
]
}
},
"functions": [
{
"ret": {
"type": "qt",
"module": "qml",
"name": "void"
},
"name": "invoke",
"id": "invoke",
"details": "Invoke the action. If {{< qmltypelink type=\"local\" module=\"Quickshell.Services.Notifications\" name=\"Notification\" mtype=\"prop\" mname=\"resident\" >}} is false it will be dismissed.\n",
"params": []
}
],
"signals": {},
"variants": {}
}

View file

@ -0,0 +1,50 @@
{
"name": "NotificationCloseReason",
"module": "Quickshell.Services.Notifications",
"type": "class",
"super": {
"type": "qt",
"module": "qml.QtQml",
"name": "QtObject"
},
"description": "The reason a Notification was closed.",
"details": "See {{< qmltypelink type=\"local\" module=\"Quickshell.Services.Notifications\" name=\"Notification\" mtype=\"signal\" mname=\"closed\" >}}.\n",
"flags": [
"enum"
],
"properties": {},
"functions": [
{
"ret": {
"type": "qt",
"module": "qml",
"name": "string"
},
"name": "toString",
"id": "toString",
"details": null,
"params": [
{
"name": "value",
"type": {
"type": "local",
"module": "Quickshell.Services.Notifications",
"name": "NotificationCloseReason"
}
}
]
}
],
"signals": {},
"variants": {
"CloseRequested": {
"details": "The remote application requested the notification be removed.\n"
},
"Dismissed": {
"details": "The notification was explicitly dismissed by the user.\n"
},
"Expired": {
"details": "The notification expired due to a timeout.\n"
}
}
}

View file

@ -0,0 +1,133 @@
{
"name": "NotificationServer",
"module": "Quickshell.Services.Notifications",
"type": "class",
"super": {
"type": "qt",
"module": "qml.QtQml",
"name": "QtObject"
},
"description": "Desktop Notifications Server.",
"details": "An implementation of the [Desktop Notifications Specification] for receiving notifications\nfrom external applications.\n\nThe server does not advertise most capabilities by default. See the individual properties for details.\n\n[Desktop Notifications Specification]: https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html\n",
"properties": {
"persistenceSupported": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If the notification server should advertise that it can persist notifications in the background\nafter going offscreen. Defaults to false.\n"
},
"imageSupported": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If the notification server should advertise that it supports images. Defaults to false.\n"
},
"bodyImagesSupported": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If notification body text should be advertised as supporting images as described in [the specification]\nDefaults to false.\n\nNote that returned notifications may still contain images if this property is false, as it is only a hint.\n\n[the specification]: https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html#images\n"
},
"trackedNotifications": {
"type": {
"type": "local",
"module": "Quickshell",
"name": "ObjectModel",
"of": {
"type": "local",
"module": "Quickshell.Services.Notifications",
"name": "Notification"
}
},
"details": "All notifications currently tracked by the server.\n",
"flags": [
"readonly"
]
},
"actionsSupported": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If notification actions should be advertised as supported by the notification server. Defaults to false.\n"
},
"bodyHyperlinksSupported": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If notification body text should be advertised as supporting hyperlinks as described in [the specification]\nDefaults to false.\n\nNote that returned notifications may still contain hyperlinks if this property is false, as it is only a hint.\n\n[the specification]: https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html#hyperlinks\n"
},
"bodySupported": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If notification body text should be advertised as supported by the notification server.\nDefaults to true.\n\nNote that returned notifications are likely to return body text even if this property is false,\nas it is only a hint.\n"
},
"extraHints": {
"type": {
"type": "qt",
"module": "qml",
"name": "list",
"of": {
"type": "qt",
"module": "qml",
"name": "string"
}
},
"details": "Extra hints to expose to notification clients.\n"
},
"keepOnReload": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If notifications should be re-emitted when quickshell reloads. Defaults to true.\n\nThe {{< qmltypelink type=\"local\" module=\"Quickshell.Services.Notifications\" name=\"Notification\" mtype=\"prop\" mname=\"lastGeneration\" >}} flag will be\nset on notifications from the prior generation for further filtering/handling.\n"
},
"bodyMarkupSupported": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If notification body text should be advertised as supporting markup as described in [the specification]\nDefaults to false.\n\nNote that returned notifications may still contain markup if this property is false,\nas it is only a hint. By default Text objects will try to render markup. To avoid this\nif any is sent, change {{< qmltypelink type=\"qt\" module=\"qml.QtQuick\" name=\"Text\" mtype=\"prop\" mname=\"textFormat\" >}} to `PlainText`.\n"
},
"actionIconsSupported": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If notification actions should be advertised as supporting the display of icons. Defaults to false.\n"
}
},
"functions": [],
"signals": {
"notification": {
"name": "notification",
"details": "Sent when a notification is received by the server.\n\nIf this notification should not be discarded, set its `tracked` property to true.\n",
"params": [
{
"name": "notification",
"type": {
"type": "local",
"module": "Quickshell.Services.Notifications",
"name": "Notification"
}
}
]
}
},
"variants": {}
}

View file

@ -0,0 +1,50 @@
{
"name": "NotificationUrgency",
"module": "Quickshell.Services.Notifications",
"type": "class",
"super": {
"type": "qt",
"module": "qml.QtQml",
"name": "QtObject"
},
"description": "The urgency level of a Notification.",
"details": "See {{< qmltypelink type=\"local\" module=\"Quickshell.Services.Notifications\" name=\"Notification\" mtype=\"prop\" mname=\"urgency\" >}}.\n",
"flags": [
"enum"
],
"properties": {},
"functions": [
{
"ret": {
"type": "qt",
"module": "qml",
"name": "string"
},
"name": "toString",
"id": "toString",
"details": null,
"params": [
{
"name": "value",
"type": {
"type": "local",
"module": "Quickshell.Services.Notifications",
"name": "NotificationUrgency"
}
}
]
}
],
"signals": {},
"variants": {
"Normal": {
"details": null
},
"Low": {
"details": null
},
"Critical": {
"details": null
}
}
}

View file

@ -0,0 +1,5 @@
{
"name": "Quickshell.Services.Notifications",
"description": "Types for implementing a notification daemon",
"details": ""
}