summaryrefslogtreecommitdiff
path: root/lib/notifd
diff options
context:
space:
mode:
Diffstat (limited to 'lib/notifd')
l---------lib/notifd/gir.py1
-rw-r--r--lib/notifd/meson.build90
-rw-r--r--lib/notifd/notifd.vala8
-rw-r--r--lib/notifd/notification.vala34
4 files changed, 44 insertions, 89 deletions
diff --git a/lib/notifd/gir.py b/lib/notifd/gir.py
new file mode 120000
index 0000000..b5b4f1d
--- /dev/null
+++ b/lib/notifd/gir.py
@@ -0,0 +1 @@
+../gir.py \ No newline at end of file
diff --git a/lib/notifd/meson.build b/lib/notifd/meson.build
index b6ef59a..e09a371 100644
--- a/lib/notifd/meson.build
+++ b/lib/notifd/meson.build
@@ -3,7 +3,7 @@ project(
'vala',
'c',
version: run_command('cat', join_paths(meson.project_source_root(), 'version')).stdout().strip(),
- meson_version: '>= 0.62.0',
+ meson_version: '>= 0.63.0',
default_options: [
'warning_level=2',
'werror=false',
@@ -53,84 +53,28 @@ if get_option('lib')
meson.project_name(),
sources,
dependencies: deps,
- vala_args: ['--vapi-comments', '--ccode'],
+ vala_args: ['--vapi-comments'],
vala_header: meson.project_name() + '.h',
vala_vapi: meson.project_name() + '-' + api_version + '.vapi',
- vala_gir: gir,
version: meson.project_version(),
install: true,
- install_dir: [true, true, true, true],
+ install_dir: [true, true, true],
)
- # import('gnome').generate_gir(
- # lib,
- # sources: [],
- # nsversion: api_version,
- # namespace: namespace,
- # symbol_prefix: meson.project_name().replace('-', '_'),
- # identifier_prefix: namespace,
- # includes: ['GObject-2.0'],
- # header: meson.project_name() + '.h',
- # export_packages: meson.project_name() + '-' + api_version,
- # install: true,
- # )
+ pkgs = []
+ foreach dep : deps
+ pkgs += ['--pkg=' + dep.name()]
+ endforeach
- # custom_target(
- # gir,
- # command: [
- # find_program('g-ir-scanner'),
- # '--namespace=' + namespace,
- # '--nsversion=' + api_version,
- # '--library=' + meson.project_name(),
- # '--include=GObject-2.0',
- # '--output=' + gir,
- # '--symbol-prefix=' + meson.project_name().replace('-', '_'),
- # '--identifier-prefix=' + namespace,
- # ]
- # + pkgs
- # + ['@INPUT@'],
- # output: gir,
- # depends: lib,
- # input: meson.current_build_dir() / meson.project_name() + '.h',
- # install: true,
- # install_dir: get_option('datadir') / 'gir-1.0',
- # )
-
- # custom_target(
- # gir,
- # command: [
- # find_program('g-ir-scanner'),
- # '--namespace=' + namespace,
- # '--nsversion=' + api_version,
- # '--library=' + meson.project_name(),
- # '--include=GObject-2.0',
- # '--output=' + gir,
- # '--symbol-prefix=' + meson.project_name().replace('-', '_'),
- # '--identifier-prefix=' + namespace,
- # ]
- # + pkgs
- # + ['@INPUT@'],
- # input: lib.extract_all_objects(),
- # output: gir,
- # depends: lib,
- # install: true,
- # install_dir: get_option('datadir') / 'gir-1.0',
- # )
-
- # pkgs = []
- # foreach dep : deps
- # pkgs += ['--pkg=' + dep.name()]
- # endforeach
- #
- # gir_tgt = custom_target(
- # gir,
- # command: [find_program('valadoc'), '-o', 'docs', '--gir', gir] + pkgs + sources,
- # input: sources,
- # depends: lib,
- # output: gir,
- # install: true,
- # install_dir: get_option('datadir') / 'gir-1.0',
- # )
+ gir_tgt = custom_target(
+ gir,
+ command: [find_program('python3'), files('gir.py'), gir] + pkgs + sources,
+ input: sources,
+ depends: lib,
+ output: gir,
+ install: true,
+ install_dir: get_option('datadir') / 'gir-1.0',
+ )
custom_target(
typelib,
@@ -142,7 +86,7 @@ if get_option('lib')
],
input: lib,
output: typelib,
- depends: lib,
+ depends: [lib, gir_tgt],
install: true,
install_dir: get_option('libdir') / 'girepository-1.0',
)
diff --git a/lib/notifd/notifd.vala b/lib/notifd/notifd.vala
index 6ca25fa..807e40a 100644
--- a/lib/notifd/notifd.vala
+++ b/lib/notifd/notifd.vala
@@ -1,5 +1,5 @@
/**
- * Get the singleton instance of {@link Notifd}
+ * Get the singleton instance of [[email protected]]
*/
namespace AstalNotifd {
public Notifd get_default() {
@@ -74,7 +74,7 @@ public class AstalNotifd.Notifd : Object {
}
/**
- * Gets the {@link Notification} with id or null if there is no such Notification.
+ * Gets the [[email protected]] with id or null if there is no such Notification.
*/
public Notification get_notification(uint id) {
return proxy != null ? proxy.get_notification(id) : daemon.get_notification(id);
@@ -85,7 +85,7 @@ public class AstalNotifd.Notifd : Object {
}
/**
- * Emitted when the daemon receives a {@link Notification}.
+ * Emitted when the daemon receives a [[email protected]].
*
* @param id The ID of the Notification.
* @param replaced Indicates if an existing Notification was replaced.
@@ -93,7 +93,7 @@ public class AstalNotifd.Notifd : Object {
public signal void notified(uint id, bool replaced);
/**
- * Emitted when a {@link Notification} is resolved.
+ * Emitted when a [[email protected]] is resolved.
*
* @param id The ID of the Notification.
* @param reason The reason how the Notification was resolved.
diff --git a/lib/notifd/notification.vala b/lib/notifd/notification.vala
index 5db3fe2..527a352 100644
--- a/lib/notifd/notification.vala
+++ b/lib/notifd/notification.vala
@@ -38,19 +38,24 @@ public class AstalNotifd.Notification : Object {
public int expire_timeout { internal set; get; }
/**
- * List of {@link Action} of the notification.
+ * List of [[email protected]] of the notification.
*
- * Can be invoked by calling {@link Notification.invoke} with the action's id.
+ * Can be invoked by calling [[email protected]] with the action's id.
*/
public List<Action?> actions { get { return _actions; } }
/** Path of an image */
public string image { get { return get_str_hint("image-path"); } }
- /** Indicates whether {@link Action} identifier should be interpreted as a named icon. */
+ /**
+ * Indicates whether [[email protected]]
+ * identifier should be interpreted as a named icon.
+ */
public bool action_icons { get { return get_bool_hint("action-icons"); } }
- /** [[https://specifications.freedesktop.org/notification-spec/latest/categories.html|Category of the notification.]] */
+ /**
+ * [[https://specifications.freedesktop.org/notification-spec/latest/categories.html]]
+ */
public string category { get { return get_str_hint("category"); } }
/** Specifies the name of the desktop filename representing the calling program. */
@@ -71,13 +76,19 @@ public class AstalNotifd.Notification : Object {
/** Indicates that the notification should be excluded from persistency. */
public bool transient { get { return get_bool_hint("transient"); } }
- /** Specifies the X location on the screen that the notification should point to. The "y" hint must also be specified. */
+ /**
+ * Specifies the X location on the screen that the notification should point to.
+ * The "y" hint must also be specified.
+ */
public int x { get { return get_int_hint("x"); } }
- /** Specifies the Y location on the screen that the notification should point to. The "x" hint must also be specified. */
+ /**
+ * Specifies the Y location on the screen that the notification should point to.
+ * The "x" hint must also be specified.
+ */
public int y { get { return get_int_hint("y"); } }
- /** {@link Urgency} level of the notification. */
+ /** [[email protected]] level of the notification. */
public Urgency urgency { get { return get_byte_hint("urgency"); } }
internal Notification(
@@ -141,24 +152,23 @@ public class AstalNotifd.Notification : Object {
}
/**
- * Emitted when this {@link Notification} is resolved.
+ * Emitted when this this notification is resolved.
*
* @param reason The reason how the Notification was resolved.
*/
public signal void resolved(ClosedReason reason);
/**
- * Emitted when the user dismisses this {@link Notification}
+ * Emitted when the user dismisses this notification.
*
* @see dismiss
*/
public signal void dismissed();
/**
- * Emitted when an {@link Action} of this {@link Notification} is invoked.
+ * Emitted when an [[email protected]] of this notification is invoked.
*
* @param action_id id of the invoked action
- * @see invoke
*/
public signal void invoked(string action_id);
@@ -171,7 +181,7 @@ public class AstalNotifd.Notification : Object {
public void dismiss() { dismissed(); }
/**
- * Invoke an {@link Action} of this {@link Notification}
+ * Invoke an [[email protected]] of this notification.
*
* Note that this method just notifies the client that this action was invoked
* by the user. If for example this notification persists through the lifetime