Types

Types — Types that are used by both client and server.

Stability Level

Unstable, unless otherwise indicated

Synopsis

#include <libdbusmenu-glib/types.h>

#define             DBUSMENU_TYPE_STATUS
#define             DBUSMENU_TYPE_TEXT_DIRECTION
enum                DbusmenuStatus;
enum                DbusmenuTextDirection;
const gchar *       dbusmenu_status_get_nick            (DbusmenuStatus value);
GType               dbusmenu_status_get_type            (void);
DbusmenuStatus      dbusmenu_status_get_value_from_nick (const gchar *nick);
const gchar *       dbusmenu_text_direction_get_nick    (DbusmenuTextDirection value);
GType               dbusmenu_text_direction_get_type    (void);
DbusmenuTextDirection dbusmenu_text_direction_get_value_from_nick
                                                        (const gchar *nick);

Description

Enums that are used to describe states of the server across the bus. They are sent over dbus using their nicks but then turned back into enums by the client.

Details

DBUSMENU_TYPE_STATUS

#define DBUSMENU_TYPE_STATUS (dbusmenu_status_get_type())

Gets the GType value for the type associated with the DbusmenuStatus enumerated type.


DBUSMENU_TYPE_TEXT_DIRECTION

#define DBUSMENU_TYPE_TEXT_DIRECTION (dbusmenu_text_direction_get_type())

Gets the GType value for the type associated with the DbusmenuTextDirection enumerated type.


enum DbusmenuStatus

typedef enum {
 /*< prefix=DBUSMENU_STATUS >*/
	DBUSMENU_STATUS_NORMAL,   /*< nick=normal >*/
	DBUSMENU_STATUS_NOTICE    /*< nick=notice >*/
} DbusmenuStatus;

Tracks how the menus should be presented to the user.

DBUSMENU_STATUS_NORMAL

Everything is normal

DBUSMENU_STATUS_NOTICE

The menus should be shown at a higher priority

enum DbusmenuTextDirection

typedef enum {
 /*< prefix=DBUSMENU_TEXT_DIRECTION >*/
	DBUSMENU_TEXT_DIRECTION_NONE, /*< nick=none >*/
	DBUSMENU_TEXT_DIRECTION_LTR,  /*< nick=ltr  >*/
	DBUSMENU_TEXT_DIRECTION_RTL   /*< nick=rtl  >*/
} DbusmenuTextDirection;

The direction of text that the strings that this server will be sending strings as.

DBUSMENU_TEXT_DIRECTION_NONE

Unspecified text direction

DBUSMENU_TEXT_DIRECTION_LTR

Left-to-right text direction

DBUSMENU_TEXT_DIRECTION_RTL

Right-to-left text direction

dbusmenu_status_get_nick ()

const gchar *       dbusmenu_status_get_nick            (DbusmenuStatus value);

Looks up in the enum table for the nick of value.

value :

The value of DbusmenuStatus to get the nick of

Returns :

The nick for the given value or NULL on error

dbusmenu_status_get_type ()

GType               dbusmenu_status_get_type            (void);

Builds a GLib type for the DbusmenuStatus enumeration.

Returns :

A unique GType for the DbusmenuStatus enum.

dbusmenu_status_get_value_from_nick ()

DbusmenuStatus      dbusmenu_status_get_value_from_nick (const gchar *nick);

Looks up in the enum table for the value of nick.

nick :

The enum nick to lookup

Returns :

The value for the given nick

dbusmenu_text_direction_get_nick ()

const gchar *       dbusmenu_text_direction_get_nick    (DbusmenuTextDirection value);

Looks up in the enum table for the nick of value.

value :

The value of DbusmenuTextDirection to get the nick of

Returns :

The nick for the given value or NULL on error

dbusmenu_text_direction_get_type ()

GType               dbusmenu_text_direction_get_type    (void);

Builds a GLib type for the DbusmenuTextDirection enumeration.

Returns :

A unique GType for the DbusmenuTextDirection enum.

dbusmenu_text_direction_get_value_from_nick ()

DbusmenuTextDirection dbusmenu_text_direction_get_value_from_nick
                                                        (const gchar *nick);

Looks up in the enum table for the value of nick.

nick :

The enum nick to lookup

Returns :

The value for the given nick