diff options
author | Jonathan Riddell <jriddell@canonical.com> | 2009-08-05 00:19:38 +0100 |
---|---|---|
committer | Jonathan Riddell <jriddell@canonical.com> | 2009-08-05 00:19:38 +0100 |
commit | cb9d427cb789f34348e9697459c3c41b0e7046f3 (patch) | |
tree | 2d5388d2653052bbf9aef4e41e82711eb39cdcd4 /libindicate/indicator.h | |
parent | d10264bc6f04f75ec0c48643c68d0179cd3ffc70 (diff) | |
parent | 42ba02f7916c1f77f7fb33c4c8cd7c64729312e5 (diff) | |
download | libayatana-indicator-cb9d427cb789f34348e9697459c3c41b0e7046f3.tar.gz libayatana-indicator-cb9d427cb789f34348e9697459c3c41b0e7046f3.tar.bz2 libayatana-indicator-cb9d427cb789f34348e9697459c3c41b0e7046f3.zip |
merge current package for upload, https://code.edge.launchpad.net/~indicator-applet-developers/indicator-applet/applet-packaging/+merge/9671
Diffstat (limited to 'libindicate/indicator.h')
-rw-r--r-- | libindicate/indicator.h | 72 |
1 files changed, 68 insertions, 4 deletions
diff --git a/libindicate/indicator.h b/libindicate/indicator.h index 8af5568..20b998d 100644 --- a/libindicate/indicator.h +++ b/libindicate/indicator.h @@ -33,8 +33,6 @@ License version 3 and version 2.1 along with this program. If not, see #include <glib.h> #include <glib-object.h> -#include <gdk-pixbuf/gdk-pixbuf.h> - G_BEGIN_DECLS /* Boilerplate */ @@ -56,10 +54,45 @@ G_BEGIN_DECLS typedef struct _IndicateIndicator IndicateIndicator; typedef struct _IndicateIndicatorClass IndicateIndicatorClass; +/** + IndicateIndicator: + + The indicator object represents a single item that is shared over the + indicator bus. This could be something like one IM, one e-mail or + a single system update. It should be accessed only through its + accessors. +*/ struct _IndicateIndicator { GObject parent; }; +#include "server.h" + +/** + IndicateIndicatorClass: + @parent_class: Parent class #GObjectClass. + @hide: Slot for #IndicateIndicator::hide. + @show: Slot for #IndicateIndicator::show. + @user_display: Slot for #IndicateIndicator::user-display. + @modified: Slot for #IndicateIndicator::modified. + @get_type: Returns a constant string for the type of this indicator. + Typically gets overridden by subclasses and defines the type of + the indicator. Is called by indicate_indicator_get_indicator_type(). + @set_property: Called when indicate_indicator_set_property() is called + and should set the value. While typically it is overridden by + subclasses they usually handle special properties themselves and + then call the superclass for storage. + @get_property: Called when indicate_indicator_get_property() is called + and should return the value requested. Many times this is left alone. + @list_properties: Called when indicate_indicator_list_properties() is called + and returns a list of the properties available. Again this can be + overridden by subclasses to handle special properties. + + All of the functions that are used to modify or change data that is + in the indicator. Typically gets subclassed by other types of + indicators, for example #IndicateIndicatorMessages. + +*/ struct _IndicateIndicatorClass { GObjectClass parent_class; @@ -76,7 +109,9 @@ struct _IndicateIndicatorClass { GType indicate_indicator_get_type(void) G_GNUC_CONST; +/* New Indicator Functions */ IndicateIndicator * indicate_indicator_new (void); +IndicateIndicator * indicate_indicator_new_with_server (IndicateServer * server); /* Show and hide this indicator */ void indicate_indicator_show (IndicateIndicator * indicator); @@ -95,12 +130,41 @@ void indicate_indicator_user_display (IndicateIndicator * indicator); /* Properties handling */ void indicate_indicator_set_property (IndicateIndicator * indicator, const gchar * key, const gchar * data); -void indicate_indicator_set_property_icon (IndicateIndicator * indicator, const gchar * key, const GdkPixbuf * data); void indicate_indicator_set_property_time (IndicateIndicator * indicator, const gchar * key, GTimeVal * time); const gchar * indicate_indicator_get_property (IndicateIndicator * indicator, const gchar * key); GPtrArray * indicate_indicator_list_properties (IndicateIndicator * indicator); +/** + SECTION:indicator + @short_description: A representation of state for applications + @stability: Unstable + @include: libindicate/indicator.h + + An indicator is designed to represent a single instance of something + in your application. So this might be an IM or Email using #IndicateIndicatorMessage + or any other thing that is a small unit of information to pass on + to the user. + + Indicators make no promises about how they are preceived by the + user, it's up to the listener to represent them in an intutive and + visually appealling way. But, what we can do is provide information + on the indicator to provide enough information for the listener + to do that. + + Mostly this is done through properties. The only property that is + defined for the base indicator is the 'type' property. And this + is only available to set by creating a subclass of the + #IndicateIndicator object. It is assumed that you can look at the + definitions of the various subtypes to determine which properties + they support. + + It may be that some users don't want to create objects for every + indicator as it could be a lot of overhead if there are large numbers + and there is already a data structure representing them all. In that + case it is recommended that you ignore the #IndicateIndicator object + tree in general and move to subclassing #IndicateServer directly. +*/ + G_END_DECLS #endif /* INDICATE_INDICATOR_H_INCLUDED__ */ - |