qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Classes | Macros | Typedefs | Enumerations | Functions
statusnotifier.h File Reference
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gio/gio.h>
#include <glib-object.h>
#include <glib.h>
Include dependency graph for statusnotifier.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _StatusNotifier
 
struct  _StatusNotifierClass
 

Macros

#define TYPE_STATUS_NOTIFIER   (status_notifier_get_type())
 
#define STATUS_NOTIFIER(obj)   (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_STATUS_NOTIFIER, StatusNotifier))
 
#define STATUS_NOTIFIER_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_STATUS_NOTIFIER, StatusNotiferClass))
 
#define IS_STATUS_NOTIFIER(obj)   (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_STATUS_NOTIFIER))
 
#define IS_STATUS_NOTIFIER_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((obj), TYPE_STATUS_NOTIFIER))
 
#define STATUS_NOTIFIER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_STATUS_NOTIFIER, StatusNotifierClass))
 
#define STATUS_NOTIFIER_ERROR   g_quark_from_static_string("StatusNotifier error")
 

Typedefs

typedef typedefG_BEGIN_DECLS struct _StatusNotifier StatusNotifier
 
typedef struct _StatusNotifierPrivate StatusNotifierPrivate
 
typedef struct _StatusNotifierClass StatusNotifierClass
 

Enumerations

enum  StatusNotifierError { STATUS_NOTIFIER_ERROR_NO_CONNECTION = 0, STATUS_NOTIFIER_ERROR_NO_NAME, STATUS_NOTIFIER_ERROR_NO_WATCHER, STATUS_NOTIFIER_ERROR_NO_HOST }
 
enum  StatusNotifierState { STATUS_NOTIFIER_STATE_NOT_REGISTERED = 0, STATUS_NOTIFIER_STATE_REGISTERING, STATUS_NOTIFIER_STATE_REGISTERED, STATUS_NOTIFIER_STATE_FAILED }
 
enum  StatusNotifierIcon {
  STATUS_NOTIFIER_ICON = 0, STATUS_NOTIFIER_ATTENTION_ICON, STATUS_NOTIFIER_OVERLAY_ICON, STATUS_NOTIFIER_TOOLTIP_ICON,
  _NB_STATUS_NOTIFIER_ICONS
}
 
enum  StatusNotifierCategory { STATUS_NOTIFIER_CATEGORY_APPLICATION_STATUS = 0, STATUS_NOTIFIER_CATEGORY_COMMUNICATIONS, STATUS_NOTIFIER_CATEGORY_SYSTEM_SERVICES, STATUS_NOTIFIER_CATEGORY_HARDWARE }
 
enum  StatusNotifierStatus { STATUS_NOTIFIER_STATUS_PASSIVE = 0, STATUS_NOTIFIER_STATUS_ACTIVE, STATUS_NOTIFIER_STATUS_NEEDS_ATTENTION }
 
enum  StatusNotifierScrollOrientation { STATUS_NOTIFIER_SCROLL_ORIENTATION_HORIZONTAL = 0, STATUS_NOTIFIER_SCROLL_ORIENTATION_VERTICAL }
 

Functions

GType status_notifier_get_type (void) G_GNUC_CONST
 
StatusNotifierstatus_notifier_new_from_pixbuf (const gchar *id, StatusNotifierCategory category, GdkPixbuf *pixbuf)
 
StatusNotifierstatus_notifier_new_from_icon_name (const gchar *id, StatusNotifierCategory category, const gchar *icon_name)
 
const gchar * status_notifier_get_id (StatusNotifier *sn)
 
StatusNotifierCategory status_notifier_get_category (StatusNotifier *sn)
 
void status_notifier_set_from_pixbuf (StatusNotifier *sn, StatusNotifierIcon icon, GdkPixbuf *pixbuf)
 
void status_notifier_set_from_icon_name (StatusNotifier *sn, StatusNotifierIcon icon, const gchar *icon_name)
 
gboolean status_notifier_has_pixbuf (StatusNotifier *sn, StatusNotifierIcon icon)
 
GdkPixbuf * status_notifier_get_pixbuf (StatusNotifier *sn, StatusNotifierIcon icon)
 
gchar * status_notifier_get_icon_name (StatusNotifier *sn, StatusNotifierIcon icon)
 
void status_notifier_set_attention_movie_name (StatusNotifier *sn, const gchar *movie_name)
 
gchar * status_notifier_get_attention_movie_name (StatusNotifier *sn)
 
void status_notifier_set_title (StatusNotifier *sn, const gchar *title)
 
gchar * status_notifier_get_title (StatusNotifier *sn)
 
void status_notifier_set_status (StatusNotifier *sn, StatusNotifierStatus status)
 
StatusNotifierStatus status_notifier_get_status (StatusNotifier *sn)
 
void status_notifier_set_window_id (StatusNotifier *sn, guint32 window_id)
 
guint32 status_notifier_get_window_id (StatusNotifier *sn)
 
void status_notifier_freeze_tooltip (StatusNotifier *sn)
 
void status_notifier_thaw_tooltip (StatusNotifier *sn)
 
void status_notifier_set_tooltip (StatusNotifier *sn, const gchar *icon_name, const gchar *title, const gchar *body)
 
void status_notifier_set_tooltip_title (StatusNotifier *sn, const gchar *title)
 
gchar * status_notifier_get_tooltip_title (StatusNotifier *sn)
 
void status_notifier_set_tooltip_body (StatusNotifier *sn, const gchar *body)
 
gchar * status_notifier_get_tooltip_body (StatusNotifier *sn)
 
void status_notifier_register (StatusNotifier *sn)
 
StatusNotifierState status_notifier_get_state (StatusNotifier *sn)
 

Macro Definition Documentation

◆ IS_STATUS_NOTIFIER

#define IS_STATUS_NOTIFIER (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_STATUS_NOTIFIER))

Definition at line 41 of file statusnotifier.h.

◆ IS_STATUS_NOTIFIER_CLASS

#define IS_STATUS_NOTIFIER_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE((obj), TYPE_STATUS_NOTIFIER))

Definition at line 42 of file statusnotifier.h.

◆ STATUS_NOTIFIER

#define STATUS_NOTIFIER (   obj)    (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_STATUS_NOTIFIER, StatusNotifier))

Definition at line 37 of file statusnotifier.h.

◆ STATUS_NOTIFIER_CLASS

#define STATUS_NOTIFIER_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_STATUS_NOTIFIER, StatusNotiferClass))

Definition at line 39 of file statusnotifier.h.

◆ STATUS_NOTIFIER_ERROR

#define STATUS_NOTIFIER_ERROR   g_quark_from_static_string("StatusNotifier error")

Definition at line 48 of file statusnotifier.h.

◆ STATUS_NOTIFIER_GET_CLASS

#define STATUS_NOTIFIER_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_STATUS_NOTIFIER, StatusNotifierClass))

Definition at line 43 of file statusnotifier.h.

◆ TYPE_STATUS_NOTIFIER

#define TYPE_STATUS_NOTIFIER   (status_notifier_get_type())

Definition at line 36 of file statusnotifier.h.

Typedef Documentation

◆ StatusNotifier

typedef typedefG_BEGIN_DECLS struct _StatusNotifier StatusNotifier

Definition at line 32 of file statusnotifier.h.

◆ StatusNotifierClass

Definition at line 34 of file statusnotifier.h.

◆ StatusNotifierPrivate

typedef struct _StatusNotifierPrivate StatusNotifierPrivate

Definition at line 33 of file statusnotifier.h.

Enumeration Type Documentation

◆ StatusNotifierCategory

StatusNotifierCategory: @STATUS_NOTIFIER_CATEGORY_APPLICATION_STATUS: The item describes the status of a generic application, for instance the current state of a media player. In the case where the category of the item can not be known, such as when the item is being proxied from another incompatible or emulated system, this can be used a sensible default fallback. @STATUS_NOTIFIER_CATEGORY_COMMUNICATIONS: The item describes the status of communication oriented applications, like an instant messenger or an email client. @STATUS_NOTIFIER_CATEGORY_SYSTEM_SERVICES: The item describes services of the system not seen as a stand alone application by the user, such as an indicator for the activity of a disk indexing service. @STATUS_NOTIFIER_CATEGORY_HARDWARE: The item describes the state and control of a particular hardware, such as an indicator of the battery charge or sound card volume control.

The category of the status notifier item.

Enumerator
STATUS_NOTIFIER_CATEGORY_APPLICATION_STATUS 
STATUS_NOTIFIER_CATEGORY_COMMUNICATIONS 
STATUS_NOTIFIER_CATEGORY_SYSTEM_SERVICES 
STATUS_NOTIFIER_CATEGORY_HARDWARE 

Definition at line 136 of file statusnotifier.h.

◆ StatusNotifierError

StatusNotifierError: @STATUS_NOTIFIER_ERROR_NO_CONNECTION: Failed to establish connection to register service on session bus @STATUS_NOTIFIER_ERROR_NO_NAME: Failed to acquire name for the item on the session bus @STATUS_NOTIFIER_ERROR_NO_WATCHER: No StatusNotifierWatcher found on the session bus @STATUS_NOTIFIER_ERROR_NO_HOST: No StatusNotifierHost registered with the StatusNotifierWatcher

Errors that can occur while trying to register the item. Note that errors other the StatusNotifierError might be returned.

Enumerator
STATUS_NOTIFIER_ERROR_NO_CONNECTION 
STATUS_NOTIFIER_ERROR_NO_NAME 
STATUS_NOTIFIER_ERROR_NO_WATCHER 
STATUS_NOTIFIER_ERROR_NO_HOST 

Definition at line 63 of file statusnotifier.h.

◆ StatusNotifierIcon

StatusNotifierIcon: @STATUS_NOTIFIER_ICON: The icon that can be used by the visualization to identify the item. @STATUS_NOTIFIER_ATTENTION_ICON: The icon that can be used by the visualization when the item's status is STATUS_NOTIFIER_STATUS_NEEDS_ATTENTION. @STATUS_NOTIFIER_OVERLAY_ICON: This can be used by the visualization to indicate extra state information, for instance as an overlay for the main icon. @STATUS_NOTIFIER_TOOLTIP_ICON: The icon that can be used be the visualization in the tooltip of the item.

Possible icons that can be used on a status notifier item.

Enumerator
STATUS_NOTIFIER_ICON 
STATUS_NOTIFIER_ATTENTION_ICON 
STATUS_NOTIFIER_OVERLAY_ICON 
STATUS_NOTIFIER_TOOLTIP_ICON 
_NB_STATUS_NOTIFIER_ICONS 

Definition at line 108 of file statusnotifier.h.

◆ StatusNotifierScrollOrientation

StatusNotifierScrollOrientation: @STATUS_NOTIFIER_SCROLL_ORIENTATION_HORIZONTAL: Scroll request was horizontal. @STATUS_NOTIFIER_SCROLL_ORIENTATION_VERTICAL: Scroll request was vertical.

The orientation of a scroll request performed on the representation of the item in the visualization.

Enumerator
STATUS_NOTIFIER_SCROLL_ORIENTATION_HORIZONTAL 
STATUS_NOTIFIER_SCROLL_ORIENTATION_VERTICAL 

Definition at line 172 of file statusnotifier.h.

◆ StatusNotifierState

StatusNotifierState: @STATUS_NOTIFIER_STATE_NOT_REGISTERED: Item hasn't yet been asked to register, i.e. no call to status_notifier_register() have been made yet @STATUS_NOTIFIER_STATE_REGISTERING: Item is in the process of registering. This state is also valid after #StatusNotifier::registration-failed was emitted, if the item is waiting for possible "recovery" (e.g. if no host was registered on watcher, waiting for one to do so) @STATUS_NOTIFIER_STATE_REGISTERED: Item was sucessfully registered on DBus and StatusNotifierWatcher @STATUS_NOTIFIER_STATE_FAILED: Registration failed, with no possible pending recovery

State in which a StatusNotifier item can be. See status_notifier_register() for more

Enumerator
STATUS_NOTIFIER_STATE_NOT_REGISTERED 
STATUS_NOTIFIER_STATE_REGISTERING 
STATUS_NOTIFIER_STATE_REGISTERED 
STATUS_NOTIFIER_STATE_FAILED 

Definition at line 86 of file statusnotifier.h.

◆ StatusNotifierStatus

StatusNotifierStatus: @STATUS_NOTIFIER_STATUS_PASSIVE: The item doesn't convey important information to the user, it can be considered an "idle" status and is likely that visualizations will chose to hide it. @STATUS_NOTIFIER_STATUS_ACTIVE: The item is active, is more important that the item will be shown in some way to the user. @STATUS_NOTIFIER_STATUS_NEEDS_ATTENTION: The item carries really important information for the user, such as battery charge running out and is wants to incentive the direct user intervention. Visualizations should emphasize in some way the items with this status.

The status of the status notifier item or its associated application.

Enumerator
STATUS_NOTIFIER_STATUS_PASSIVE 
STATUS_NOTIFIER_STATUS_ACTIVE 
STATUS_NOTIFIER_STATUS_NEEDS_ATTENTION 

Definition at line 157 of file statusnotifier.h.

Function Documentation

◆ status_notifier_freeze_tooltip()

void status_notifier_freeze_tooltip ( StatusNotifier sn)

◆ status_notifier_get_attention_movie_name()

gchar* status_notifier_get_attention_movie_name ( StatusNotifier sn)

◆ status_notifier_get_category()

StatusNotifierCategory status_notifier_get_category ( StatusNotifier sn)

◆ status_notifier_get_icon_name()

gchar* status_notifier_get_icon_name ( StatusNotifier sn,
StatusNotifierIcon  icon 
)

◆ status_notifier_get_id()

const gchar* status_notifier_get_id ( StatusNotifier sn)

◆ status_notifier_get_pixbuf()

GdkPixbuf* status_notifier_get_pixbuf ( StatusNotifier sn,
StatusNotifierIcon  icon 
)

◆ status_notifier_get_state()

StatusNotifierState status_notifier_get_state ( StatusNotifier sn)

◆ status_notifier_get_status()

StatusNotifierStatus status_notifier_get_status ( StatusNotifier sn)

◆ status_notifier_get_title()

gchar* status_notifier_get_title ( StatusNotifier sn)

◆ status_notifier_get_tooltip_body()

gchar* status_notifier_get_tooltip_body ( StatusNotifier sn)

◆ status_notifier_get_tooltip_title()

gchar* status_notifier_get_tooltip_title ( StatusNotifier sn)

◆ status_notifier_get_type()

GType status_notifier_get_type ( void  )

◆ status_notifier_get_window_id()

guint32 status_notifier_get_window_id ( StatusNotifier sn)

◆ status_notifier_has_pixbuf()

gboolean status_notifier_has_pixbuf ( StatusNotifier sn,
StatusNotifierIcon  icon 
)

◆ status_notifier_new_from_icon_name()

StatusNotifier* status_notifier_new_from_icon_name ( const gchar *  id,
StatusNotifierCategory  category,
const gchar *  icon_name 
)

◆ status_notifier_new_from_pixbuf()

StatusNotifier* status_notifier_new_from_pixbuf ( const gchar *  id,
StatusNotifierCategory  category,
GdkPixbuf *  pixbuf 
)

◆ status_notifier_register()

void status_notifier_register ( StatusNotifier sn)

◆ status_notifier_set_attention_movie_name()

void status_notifier_set_attention_movie_name ( StatusNotifier sn,
const gchar *  movie_name 
)

◆ status_notifier_set_from_icon_name()

void status_notifier_set_from_icon_name ( StatusNotifier sn,
StatusNotifierIcon  icon,
const gchar *  icon_name 
)

◆ status_notifier_set_from_pixbuf()

void status_notifier_set_from_pixbuf ( StatusNotifier sn,
StatusNotifierIcon  icon,
GdkPixbuf *  pixbuf 
)

◆ status_notifier_set_status()

void status_notifier_set_status ( StatusNotifier sn,
StatusNotifierStatus  status 
)

◆ status_notifier_set_title()

void status_notifier_set_title ( StatusNotifier sn,
const gchar *  title 
)

◆ status_notifier_set_tooltip()

void status_notifier_set_tooltip ( StatusNotifier sn,
const gchar *  icon_name,
const gchar *  title,
const gchar *  body 
)

◆ status_notifier_set_tooltip_body()

void status_notifier_set_tooltip_body ( StatusNotifier sn,
const gchar *  body 
)

◆ status_notifier_set_tooltip_title()

void status_notifier_set_tooltip_title ( StatusNotifier sn,
const gchar *  title 
)

◆ status_notifier_set_window_id()

void status_notifier_set_window_id ( StatusNotifier sn,
guint32  window_id 
)

◆ status_notifier_thaw_tooltip()

void status_notifier_thaw_tooltip ( StatusNotifier sn)