Added ccDaemon documentation
This commit is contained in:
@@ -21,18 +21,32 @@ namespace SwayNotificatonCenter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when Dot Not Disturb state changes and when
|
||||||
|
* notification gets added/removed
|
||||||
|
*/
|
||||||
public signal void subscribe (uint count, bool dnd);
|
public signal void subscribe (uint count, bool dnd);
|
||||||
|
|
||||||
|
/** Reloads the CSS file */
|
||||||
public bool reload_css () throws Error {
|
public bool reload_css () throws Error {
|
||||||
bool result = Functions.load_css (style_path);
|
bool result = Functions.load_css (style_path);
|
||||||
if (result) controlCenter.reload_notifications_style ();
|
if (result) controlCenter.reload_notifications_style ();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Reloads the config file */
|
||||||
public void reload_config () throws Error {
|
public void reload_config () throws Error {
|
||||||
ConfigModel.reload_config ();
|
ConfigModel.reload_config ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Changes `name` to `value`.
|
||||||
|
*
|
||||||
|
* If `write_to_file` is True, it will write to the users
|
||||||
|
* config file (`~/.config/swaync/config.json`) or `path`
|
||||||
|
* if it's a valid path. Otherwise the changes will only
|
||||||
|
* apply to the current instance.
|
||||||
|
*/
|
||||||
public void change_config_value (string name,
|
public void change_config_value (string name,
|
||||||
Variant value,
|
Variant value,
|
||||||
bool write_to_file = true,
|
bool write_to_file = true,
|
||||||
@@ -43,41 +57,50 @@ namespace SwayNotificatonCenter {
|
|||||||
path);
|
path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Gets the controlcenter visibility */
|
||||||
public bool get_visibility () throws DBusError, IOError {
|
public bool get_visibility () throws DBusError, IOError {
|
||||||
return controlCenter.get_visibility ();
|
return controlCenter.get_visibility ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Closes all popup and controlcenter notifications */
|
||||||
public void close_all_notifications () throws DBusError, IOError {
|
public void close_all_notifications () throws DBusError, IOError {
|
||||||
notiDaemon.close_all_notifications ();
|
notiDaemon.close_all_notifications ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Gets the current controlcenter notification count */
|
||||||
public uint notification_count () throws DBusError, IOError {
|
public uint notification_count () throws DBusError, IOError {
|
||||||
return controlCenter.notification_count ();
|
return controlCenter.notification_count ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Toggles the visibility of the controlcenter */
|
||||||
public void toggle_visibility () throws DBusError, IOError {
|
public void toggle_visibility () throws DBusError, IOError {
|
||||||
if (controlCenter.toggle_visibility ()) {
|
if (controlCenter.toggle_visibility ()) {
|
||||||
notiDaemon.set_noti_window_visibility (false);
|
notiDaemon.set_noti_window_visibility (false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Toggles the current Do Not Disturb state */
|
||||||
public bool toggle_dnd () throws DBusError, IOError {
|
public bool toggle_dnd () throws DBusError, IOError {
|
||||||
return notiDaemon.toggle_dnd ();
|
return notiDaemon.toggle_dnd ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Sets the current Do Not Disturb state */
|
||||||
public void set_dnd (bool state) throws DBusError, IOError {
|
public void set_dnd (bool state) throws DBusError, IOError {
|
||||||
notiDaemon.set_dnd (state);
|
notiDaemon.set_dnd (state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Gets the current Do Not Disturb state */
|
||||||
public bool get_dnd () throws DBusError, IOError {
|
public bool get_dnd () throws DBusError, IOError {
|
||||||
return notiDaemon.get_dnd ();
|
return notiDaemon.get_dnd ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Adds a new notification */
|
||||||
public void add_notification (NotifyParams param)
|
public void add_notification (NotifyParams param)
|
||||||
throws DBusError, IOError {
|
throws DBusError, IOError {
|
||||||
controlCenter.add_notification (param, notiDaemon);
|
controlCenter.add_notification (param, notiDaemon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Closes a specific notification with the `id` */
|
||||||
public void close_notification (uint32 id) throws DBusError, IOError {
|
public void close_notification (uint32 id) throws DBusError, IOError {
|
||||||
controlCenter.close_notification (id);
|
controlCenter.close_notification (id);
|
||||||
}
|
}
|
||||||
|
@@ -29,9 +29,10 @@ namespace SwayNotificatonCenter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes the popup-notification window visibility.
|
* Changes the popup-notification window visibility.
|
||||||
* Closes all notifications and hides window if `value` is false */
|
* Closes all notifications and hides window if `value` is false
|
||||||
|
*/
|
||||||
public void set_noti_window_visibility (bool value)
|
public void set_noti_window_visibility (bool value)
|
||||||
throws DBusError, IOError {
|
throws DBusError, IOError {
|
||||||
notiWindow.change_visibility (value);
|
notiWindow.change_visibility (value);
|
||||||
|
Reference in New Issue
Block a user