From 3a33240e301a02fa6ee0aa0bd41780a0e3a28633 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Fri, 18 Jan 2013 19:48:04 +0100 Subject: Add IndicatorNg IndicatorNg is an indicator object that reads an indicator service file and watches the bus for a corresponding service to appear. It turns the menus and actions exported by the service into an indicator entry. --- libindicator/indicator-ng.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 libindicator/indicator-ng.h (limited to 'libindicator/indicator-ng.h') diff --git a/libindicator/indicator-ng.h b/libindicator/indicator-ng.h new file mode 100644 index 0000000..2187443 --- /dev/null +++ b/libindicator/indicator-ng.h @@ -0,0 +1,21 @@ +#ifndef __INDICATOR_NG_H__ +#define __INDICATOR_NG_H__ + +#include + +#define INDICATOR_TYPE_NG (indicator_ng_get_type ()) +#define INDICATOR_NG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_TYPE_NG, IndicatorNg)) +#define INDICATOR_NG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_TYPE_NG, IndicatorNgClass)) +#define INDICATOR_IS_NG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_TYPE_NG)) +#define INDICATOR_IS_NG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_TYPE_NG)) +#define INDICATOR_NG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_TYPE_NG, IndicatorNgClass)) + +typedef struct _IndicatorNg IndicatorNg; +typedef IndicatorObjectClass IndicatorNgClass; + +GType indicator_ng_get_type (void); + +IndicatorNg * indicator_ng_new (const gchar *service_file, + GError **error); + +#endif -- cgit v1.2.3 From ca52243cf50336e0ef9cb0d1dd867cb657580f1b Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Mon, 21 Jan 2013 10:58:26 +0100 Subject: indicator-ng.h: use local include --- libindicator/indicator-ng.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libindicator/indicator-ng.h') diff --git a/libindicator/indicator-ng.h b/libindicator/indicator-ng.h index 2187443..4dd333e 100644 --- a/libindicator/indicator-ng.h +++ b/libindicator/indicator-ng.h @@ -1,7 +1,7 @@ #ifndef __INDICATOR_NG_H__ #define __INDICATOR_NG_H__ -#include +#include "indicator-object.h" #define INDICATOR_TYPE_NG (indicator_ng_get_type ()) #define INDICATOR_NG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_TYPE_NG, IndicatorNg)) -- cgit v1.2.3 From 4b301ff893da66cb0a8f5e4c541efa7e70ee67a3 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Mon, 21 Jan 2013 17:04:02 +0100 Subject: indicator-ng: add indicator_ng_new_for_profile --- libindicator/indicator-ng.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'libindicator/indicator-ng.h') diff --git a/libindicator/indicator-ng.h b/libindicator/indicator-ng.h index 4dd333e..fb4553f 100644 --- a/libindicator/indicator-ng.h +++ b/libindicator/indicator-ng.h @@ -13,9 +13,13 @@ typedef struct _IndicatorNg IndicatorNg; typedef IndicatorObjectClass IndicatorNgClass; -GType indicator_ng_get_type (void); +GType indicator_ng_get_type (void); -IndicatorNg * indicator_ng_new (const gchar *service_file, - GError **error); +IndicatorNg * indicator_ng_new (const gchar *service_file, + GError **error); + +IndicatorNg * indicator_ng_new_for_profile (const gchar *service_file, + const gchar *profile, + GError **error); #endif -- cgit v1.2.3 From 1585adb6c7da6c021285bcca0cacbb1976c04d15 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Mon, 21 Jan 2013 17:09:55 +0100 Subject: indicator-ng: add getters --- libindicator/indicator-ng.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libindicator/indicator-ng.h') diff --git a/libindicator/indicator-ng.h b/libindicator/indicator-ng.h index fb4553f..9f19958 100644 --- a/libindicator/indicator-ng.h +++ b/libindicator/indicator-ng.h @@ -22,4 +22,8 @@ IndicatorNg * indicator_ng_new_for_profile (const gchar *service_file, const gchar *profile, GError **error); +const gchar * indicator_ng_get_service_file (IndicatorNg *indicator); + +const gchar * indicator_ng_get_profile (IndicatorNg *indicator); + #endif -- cgit v1.2.3 From 40d7c42d5212dc97ce6b07f05828fb62440d0694 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Thu, 14 Feb 2013 16:16:48 -0500 Subject: indicator-ng: add license header --- libindicator/indicator-ng.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'libindicator/indicator-ng.h') diff --git a/libindicator/indicator-ng.h b/libindicator/indicator-ng.h index 9f19958..f074a47 100644 --- a/libindicator/indicator-ng.h +++ b/libindicator/indicator-ng.h @@ -1,3 +1,22 @@ +/* + * Copyright 2013 Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + * + * Authors: + * Lars Uebernickel + */ + #ifndef __INDICATOR_NG_H__ #define __INDICATOR_NG_H__ -- cgit v1.2.3