AwnApplet

AwnApplet

Synopsis

struct              AwnApplet;
struct              AwnAppletClass;
gboolean            (*AwnAppletInitFunc)                (AwnApplet *applet);
AwnApplet *         (*AwnAppletInitPFunc)               (const gchar *canonical_name,
                                                         const gchar *uid,
                                                         gint panel_id);
AwnApplet *         awn_applet_new                      (const gchar *canonical_name,
                                                         const gchar *uid,
                                                         gint panel_id);
const gchar *       awn_applet_get_canonical_name       (AwnApplet *applet);
GtkPositionType     awn_applet_get_pos_type             (AwnApplet *applet);
void                awn_applet_set_pos_type             (AwnApplet *applet,
                                                         GtkPositionType position);
AwnPathType         awn_applet_get_path_type            (AwnApplet *applet);
void                awn_applet_set_path_type            (AwnApplet *applet,
                                                         AwnPathType path);
gint                awn_applet_get_offset               (AwnApplet *applet);
gint                awn_applet_get_offset_at            (AwnApplet *applet,
                                                         gint x,
                                                         gint y);
void                awn_applet_set_offset               (AwnApplet *applet,
                                                         gint offset);
gint                awn_applet_get_size                 (AwnApplet *applet);
void                awn_applet_set_size                 (AwnApplet *applet,
                                                         gint size);
const gchar *       awn_applet_get_uid                  (AwnApplet *applet);
void                awn_applet_set_uid                  (AwnApplet *applet,
                                                         const gchar *uid);
AwnAppletFlags      awn_applet_get_behavior             (AwnApplet *applet);
void                awn_applet_set_behavior             (AwnApplet *applet,
                                                         AwnAppletFlags flags);
GtkWidget *         awn_applet_create_default_menu      (AwnApplet *applet);
guint               awn_applet_inhibit_autohide         (AwnApplet *applet,
                                                         const gchar *reason);
void                awn_applet_uninhibit_autohide       (AwnApplet *applet,
                                                         guint cookie);
GdkNativeWindow     awn_applet_docklet_request          (AwnApplet *applet,
                                                         gint min_size,
                                                         gboolean shrink,
                                                         gboolean expand);
GtkWidget *         awn_applet_create_pref_item         (void);
GtkWidget *         awn_applet_create_about_item        (AwnApplet *applet,
                                                         const gchar *copyright,
                                                         AwnAppletLicense license,
                                                         const gchar *version,
                                                         const gchar *comments,
                                                         const gchar *website,
                                                         const gchar *website_label,
                                                         const gchar *icon_name,
                                                         const gchar *translator_credits,
                                                         const gchar **authors,
                                                         const gchar **artists,
                                                         const gchar **documenters);
GtkWidget *         awn_applet_create_about_item_simple (AwnApplet *applet,
                                                         const gchar *copyright,
                                                         AwnAppletLicense license,
                                                         const gchar *version);
void                awn_applet_popup_gtk_menu           (AwnApplet *applet,
                                                         GtkWidget *menu,
                                                         guint button,
                                                         guint32 activate_time);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkWindow
                                       +----GtkPlug
                                             +----AwnApplet
                                                   +----AwnAppletSimple

Implemented Interfaces

AwnApplet implements AtkImplementorIface and GtkBuildable.

Properties

  "canonical-name"           gchar*                : Read / Write / Construct Only
  "display-name"             gchar*                : Read / Write
  "max-size"                 gint                  : Read / Write
  "offset"                   gint                  : Read / Write
  "offset-modifier"          gfloat                : Read / Write
  "panel-id"                 gint                  : Read / Write / Construct Only
  "panel-xid"                gint64                : Read
  "path-type"                gint                  : Read / Write / Construct
  "position"                 GtkPositionType       : Read / Write
  "quit-on-delete"           gboolean              : Read / Write
  "show-all-on-embed"        gboolean              : Read / Write
  "size"                     gint                  : Read / Write
  "uid"                      gchar*                : Read / Write / Construct

Signals

  "applet-deleted"                                 : Run First
  "flags-changed"                                  : Run First
  "menu-creation"                                  : Run First
  "offset-changed"                                 : Run First
  "origin-changed"                                 : Run Last
  "panel-configure-event"                          : Run Last
  "position-changed"                               : Run First
  "size-changed"                                   : Run First

Description

Details

struct AwnApplet

struct AwnApplet;


struct AwnAppletClass

struct AwnAppletClass {
    GtkPlugClass parent_class;

    void (*position_changed)(AwnApplet* applet, GtkPositionType position);
    void (*offset_changed)(AwnApplet* applet, gint offset);
    void (*size_changed)(AwnApplet* applet, gint size);
    void (*deleted)(AwnApplet* applet);
    void (*menu_creation)(AwnApplet* applet, GtkMenu* menu);
    void (*flags_changed)(AwnApplet* applet, AwnAppletFlags flags);
    void (*panel_configure)(AwnApplet* applet, GdkEventConfigure* event);
    void (*origin_changed)(AwnApplet* applet, GdkRectangle* rect);

    void (*_applet0)(void);
    void (*_applet1)(void);
    void (*_applet2)(void);
    void (*_applet3)(void);
};


AwnAppletInitFunc ()

gboolean            (*AwnAppletInitFunc)                (AwnApplet *applet);

Function prototype used as entry point for applets. Hook to have an AwnApplet built for you.

applet :

AwnApplet instance created for you.

Returns :

return TRUE if applet construction was successful, FALSE otherwise.

AwnAppletInitPFunc ()

AwnApplet *         (*AwnAppletInitPFunc)               (const gchar *canonical_name,
                                                         const gchar *uid,
                                                         gint panel_id);

Function prototype used as entry point for applets. Hook to build your own AwnApplet.

canonical_name :

applet's canonical name.

uid :

applet's unique ID.

panel_id :

ID of AwnPanel associated with this applet.

Returns :

return the constructed AwnApplet (or its subclass) or NULL.

awn_applet_new ()

AwnApplet *         awn_applet_new                      (const gchar *canonical_name,
                                                         const gchar *uid,
                                                         gint panel_id);


awn_applet_get_canonical_name ()

const gchar *       awn_applet_get_canonical_name       (AwnApplet *applet);


awn_applet_get_pos_type ()

GtkPositionType     awn_applet_get_pos_type             (AwnApplet *applet);


awn_applet_set_pos_type ()

void                awn_applet_set_pos_type             (AwnApplet *applet,
                                                         GtkPositionType position);


awn_applet_get_path_type ()

AwnPathType         awn_applet_get_path_type            (AwnApplet *applet);


awn_applet_set_path_type ()

void                awn_applet_set_path_type            (AwnApplet *applet,
                                                         AwnPathType path);


awn_applet_get_offset ()

gint                awn_applet_get_offset               (AwnApplet *applet);


awn_applet_get_offset_at ()

gint                awn_applet_get_offset_at            (AwnApplet *applet,
                                                         gint x,
                                                         gint y);


awn_applet_set_offset ()

void                awn_applet_set_offset               (AwnApplet *applet,
                                                         gint offset);


awn_applet_get_size ()

gint                awn_applet_get_size                 (AwnApplet *applet);


awn_applet_set_size ()

void                awn_applet_set_size                 (AwnApplet *applet,
                                                         gint size);


awn_applet_get_uid ()

const gchar *       awn_applet_get_uid                  (AwnApplet *applet);


awn_applet_set_uid ()

void                awn_applet_set_uid                  (AwnApplet *applet,
                                                         const gchar *uid);


awn_applet_get_behavior ()

AwnAppletFlags      awn_applet_get_behavior             (AwnApplet *applet);


awn_applet_set_behavior ()

void                awn_applet_set_behavior             (AwnApplet *applet,
                                                         AwnAppletFlags flags);


awn_applet_create_default_menu ()

GtkWidget *         awn_applet_create_default_menu      (AwnApplet *applet);


awn_applet_inhibit_autohide ()

guint               awn_applet_inhibit_autohide         (AwnApplet *applet,
                                                         const gchar *reason);


awn_applet_uninhibit_autohide ()

void                awn_applet_uninhibit_autohide       (AwnApplet *applet,
                                                         guint cookie);


awn_applet_docklet_request ()

GdkNativeWindow     awn_applet_docklet_request          (AwnApplet *applet,
                                                         gint min_size,
                                                         gboolean shrink,
                                                         gboolean expand);


awn_applet_create_pref_item ()

GtkWidget *         awn_applet_create_pref_item         (void);


awn_applet_create_about_item ()

GtkWidget *         awn_applet_create_about_item        (AwnApplet *applet,
                                                         const gchar *copyright,
                                                         AwnAppletLicense license,
                                                         const gchar *version,
                                                         const gchar *comments,
                                                         const gchar *website,
                                                         const gchar *website_label,
                                                         const gchar *icon_name,
                                                         const gchar *translator_credits,
                                                         const gchar **authors,
                                                         const gchar **artists,
                                                         const gchar **documenters);


awn_applet_create_about_item_simple ()

GtkWidget *         awn_applet_create_about_item_simple (AwnApplet *applet,
                                                         const gchar *copyright,
                                                         AwnAppletLicense license,
                                                         const gchar *version);


awn_applet_popup_gtk_menu ()

void                awn_applet_popup_gtk_menu           (AwnApplet *applet,
                                                         GtkWidget *menu,
                                                         guint button,
                                                         guint32 activate_time);

Property Details

The "canonical-name" property

  "canonical-name"           gchar*                : Read / Write / Construct Only

Canonical name for the applet, this should be also be the name of the directory the applet is in.

Default value: NULL


The "display-name" property

  "display-name"             gchar*                : Read / Write

Display name for the applet.

Default value: NULL


The "max-size" property

  "max-size"                 gint                  : Read / Write

The maximum visible size of the applet.

Allowed values: >= 0

Default value: 48


The "offset" property

  "offset"                   gint                  : Read / Write

Icon offset set on the bar.

Allowed values: >= 0

Default value: 0


The "offset-modifier" property

  "offset-modifier"          gfloat                : Read / Write

Offset modifier for non-linear path types.

Default value: 1


The "panel-id" property

  "panel-id"                 gint                  : Read / Write / Construct Only

The id of AwnPanel this applet connects to.

Allowed values: >= 0

Default value: 0


The "panel-xid" property

  "panel-xid"                gint64                : Read

The XID of AwnPanel this applet is connected to.

Default value: 0


The "path-type" property

  "path-type"                gint                  : Read / Write / Construct

Path used on the panel.

Allowed values: [0,1]

Default value: 0


The "position" property

  "position"                 GtkPositionType       : Read / Write

The current bar position.

Default value: GTK_POS_BOTTOM


The "quit-on-delete" property

  "quit-on-delete"           gboolean              : Read / Write

Quit the applet when it's socket is destroyed.

Default value: TRUE


The "show-all-on-embed" property

  "show-all-on-embed"        gboolean              : Read / Write

The applet will automatically call show_all when it's embedded in the socket.

Default value: TRUE


The "size" property

  "size"                     gint                  : Read / Write

The current visible size of the bar.

Allowed values: >= 0

Default value: 48


The "uid" property

  "uid"                      gchar*                : Read / Write / Construct

Awn's Unique ID for this applet instance.

Default value: NULL

Signal Details

The "applet-deleted" signal

void                user_function                      (AwnApplet *awnapplet,
                                                        gpointer   user_data)      : Run First

awnapplet :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "flags-changed" signal

void                user_function                      (AwnApplet *awnapplet,
                                                        gint       arg1,
                                                        gpointer   user_data)      : Run First

awnapplet :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "menu-creation" signal

void                user_function                      (AwnApplet *awnapplet,
                                                        GtkMenu   *arg1,
                                                        gpointer   user_data)      : Run First

awnapplet :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "offset-changed" signal

void                user_function                      (AwnApplet *awnapplet,
                                                        gint       arg1,
                                                        gpointer   user_data)      : Run First

awnapplet :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "origin-changed" signal

void                user_function                      (AwnApplet    *awnapplet,
                                                        GdkRectangle *arg1,
                                                        gpointer      user_data)      : Run Last

awnapplet :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "panel-configure-event" signal

void                user_function                      (AwnApplet *awnapplet,
                                                        GdkEvent  *arg1,
                                                        gpointer   user_data)      : Run Last

awnapplet :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "position-changed" signal

void                user_function                      (AwnApplet      *awnapplet,
                                                        GtkPositionType arg1,
                                                        gpointer        user_data)      : Run First

awnapplet :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "size-changed" signal

void                user_function                      (AwnApplet *awnapplet,
                                                        gint       arg1,
                                                        gpointer   user_data)      : Run First

awnapplet :

the object which received the signal.

user_data :

user data set when the signal handler was connected.