GpeSKWindow

GpeSKWindow — GPE Softkey Window

Synopsis




#define     DBUS_SOFTKEYS_INTERFACE
#define     DBUS_SOFTKEYS_PATH
            GpeSKWindow;
GtkWidget*  gpe_skwindow_new                (void);
void        gpe_skwindow_softkey_activated  (GpeSKWindow *window,
                                             gint key_number);
guint       gpe_skwindow_get_softkey_count  (GpeSKWindow *window);
const gchar* gpe_skwindow_get_softkey_label (GpeSKWindow *window,
                                             gint key_number);
void        gpe_skwindow_set_softkey_label  (GpeSKWindow *window,
                                             gint key_number,
                                             const gchar *label);
void        gpe_skwindow_set_softkey_menu   (GpeSKWindow *window,
                                             gint key_number,
                                             GtkWidget *menu);
GtkWidget*  gpe_skwindow_get_softkey_menu   (GpeSKWindow *window,
                                             gint key_number);
void        gpe_skwindow_softkey_popup_menu (GpeSKWindow *window,
                                             gint key_number);

Description

The GPE Softkey Window is intended to be used with gpe-applauncher as the softkeys DBus service provider on devices with softkeys. It automatically handles softkey configuration and provides an easy to use softkey signal.

Details

DBUS_SOFTKEYS_INTERFACE

#define DBUS_SOFTKEYS_INTERFACE  "org.gpe.applauncher.softkeys"

DBus remote interface the widget connects to.


DBUS_SOFTKEYS_PATH

#define DBUS_SOFTKEYS_PATH       "/org/gpe/applauncher/softkeys"

DBus interface path used for communication.


GpeSKWindow

typedef struct {
} GpeSKWindow;

This struct contains the internal status data of the widget.


gpe_skwindow_new ()

GtkWidget*  gpe_skwindow_new                (void);

Create a new GpeSKWindow instance. The communication to the softkey service provider is initiated automatically on object creation.

Returns : A new GpeSKWindow instance.

gpe_skwindow_softkey_activated ()

void        gpe_skwindow_softkey_activated  (GpeSKWindow *window,
                                             gint key_number);

Emits the softkey_activated signal with a given softkey. Invalid softkey values will be ignored.

window : Softkey window
key_number : Softkey index to activate.

gpe_skwindow_get_softkey_count ()

guint       gpe_skwindow_get_softkey_count  (GpeSKWindow *window);

Retrieve the amount of available softkeys from a GpeSKWindow widget. The actual amount is defined by the communication peer (which is usually gpe-applauncher.

window : Softkey window
Returns : Number of available softkeys.

gpe_skwindow_get_softkey_label ()

const gchar* gpe_skwindow_get_softkey_label (GpeSKWindow *window,
                                             gint key_number);

Get the current label of a softkey from a GpeSKWindow widget. Invalid indices are ignored and return NULL. The returned value may not be altered or freed.

window : Softkey window
key_number : Index of softkey
Returns : Pointer to softkey label text if label is set, NULL otherwise.

gpe_skwindow_set_softkey_label ()

void        gpe_skwindow_set_softkey_label  (GpeSKWindow *window,
                                             gint key_number,
                                             const gchar *label);

Set the current label of a softkey from a GpeSKWindow widget. Invalid indices are ignored.

window : Softkey window
key_number : Index of softkey
label : New label text.

gpe_skwindow_set_softkey_menu ()

void        gpe_skwindow_set_softkey_menu   (GpeSKWindow *window,
                                             gint key_number,
                                             GtkWidget *menu);

Set the current menu associated to a softkey from a GpeSKWindow widget. Invalid indices are ignored.

window : Softkey window
key_number : Index of softkey
menu : Menu widget

gpe_skwindow_get_softkey_menu ()

GtkWidget*  gpe_skwindow_get_softkey_menu   (GpeSKWindow *window,
                                             gint key_number);

Get the current menu widget of a softkey from a GpeSKWindow widget. Invalid indices are ignored and return NULL.

window : Softkey window
key_number : Index of softkey
Returns : Window widget if widget is set, NULL otherwise.

gpe_skwindow_softkey_popup_menu ()

void        gpe_skwindow_softkey_popup_menu (GpeSKWindow *window,
                                             gint key_number);

Open the popup menu of a given softkey.

window : Softkey window
key_number : Softkey index with popup to activate.