NetkApplication
3
LIBXFCEGUI4 Library

# NetkApplication

represents an application

## Synopsis

    #include <libxfcegui4/libxfcegui4.h>

                        NetkApplication;
    GType               netk_application_get_type           (void);
    NetkApplication*    netk_application_get                (gulong xwindow);
    gulong              netk_application_get_xid            (NetkApplication *app);
    GList*              netk_application_get_windows        (NetkApplication *app);
    int                 netk_application_get_n_windows      (NetkApplication *app);
    const char*         netk_application_get_name           (NetkApplication *app);
    const char*         netk_application_get_icon_name      (NetkApplication *app);
    int                 netk_application_get_pid            (NetkApplication *app);
    GdkPixbuf*          netk_application_get_icon           (NetkApplication *app);
    gboolean            netk_application_get_icon_is_fallback
                                                            (NetkApplication *app);

## Description

NetkApplication represents an application (for the window manager)

## Details

### NetkApplication

    typedef struct {
        GObject parent_instance;

        NetkApplicationPrivate *priv;
    } NetkApplication;

### netk_application_get_type ()

    GType               netk_application_get_type           (void);

Returns :

  the gtype for the NetkApplication class

### netk_application_get ()

    NetkApplication*    netk_application_get                (gulong xwindow);

`xwindow` :

  the X window id

Returns :

  the NetkApplication, or NULL

### netk_application_get_xid ()

    gulong              netk_application_get_xid            (NetkApplication *app);

Gets the X id of the group leader window for the app.

`app` :

  a NetkApplication

Returns :

  X id for the app

### netk_application_get_windows ()

    GList*              netk_application_get_windows        (NetkApplication *app);

Gets a list of all windows belonging to `app`. The list is returned by reference and should not be freed.

`app` :

  a NetkApplication

Returns :

  list of NetkWindow in this app

### netk_application_get_n_windows ()

    int                 netk_application_get_n_windows      (NetkApplication *app);

`app` :

  the NetkApplication instance

Returns :

  number of windows, or 0 on failure

### netk_application_get_name ()

    const char*         netk_application_get_name           (NetkApplication *app);

Gets the name of an application, employing various suboptimal heuristics to try to figure it out. Probably GTK should have a function to allow apps to set _NET_WM_NAME on the group leader as the app name, and the WM spec should say that's where the app name goes.

`app` :

  a NetkApplication

Returns :

  name of the application

### netk_application_get_icon_name ()

    const char*         netk_application_get_icon_name      (NetkApplication *app);

Gets the icon name of an application, employing various suboptimal heuristics to try to figure it out.

`app` :

  a NetkApplication

Returns :

  name of the application when minimized

### netk_application_get_pid ()

    int                 netk_application_get_pid            (NetkApplication *app);

Gets the process ID of an application, or 0 if none is available.

`app` :

  a NetkApplication

Returns :

  process ID or 0

### netk_application_get_icon ()

    GdkPixbuf*          netk_application_get_icon           (NetkApplication *app);

`app` :

  the NetkApplication instance

Returns :

  a pixbuf with the icon. its refcount is not touched. NULL on failure.

  Either returns the icon of the NetkApplication, or, failing that, returns the icon of a window belonging to the application

### netk_application_get_icon_is_fallback ()

    gboolean            netk_application_get_icon_is_fallback
                                                            (NetkApplication *app);

Checks if we are using a default fallback icon because none was set on the application.

`app` :

  the NetkApplication instance

Returns :

  `TRUE` if icon is a fallback