BamfView

## BamfView BamfView — The base class for all views |

## Synopsis

    enum                BamfClickBehavior;
    struct              BamfView;
    struct              BamfViewClass;
    GList *             bamf_view_get_children              (BamfView *view);
    BamfClickBehavior   bamf_view_get_click_suggestion      (BamfView *view);
    gchar *             bamf_view_get_icon                  (BamfView *view);
    gchar *             bamf_view_get_name                  (BamfView *view);
    const gchar *       bamf_view_get_view_type             (BamfView *view);
    gboolean            bamf_view_is_active                 (BamfView *view);
    gboolean            bamf_view_is_closed                 (BamfView *view);
    gboolean            bamf_view_is_running                (BamfView *view);
    gboolean            bamf_view_is_sticky                 (BamfView *view);
    gboolean            bamf_view_is_urgent                 (BamfView *view);
    void                bamf_view_set_sticky                (BamfView *view,
                                                             gboolean value);
    gboolean            bamf_view_user_visible              (BamfView *view);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----BamfView
                   +----BamfApplication
                   +----BamfWindow

## Properties

      "active"                   gboolean              : Read
      "path"                     gchar*                : Read
      "running"                  gboolean              : Read
      "urgent"                   gboolean              : Read
      "user-visible"             gboolean              : Read

## Signals

      "active-changed"                                 : Run First
      "child-added"                                    : Run First
      "child-removed"                                  : Run First
      "closed"                                         : Run First
      "name-changed"
      "running-changed"                                : Run First
      "urgent-changed"                                 : Run First
      "user-visible-changed"                           : Run First

## Description

BamfView is the base class that all views need to derive from.

## Details

### enum BamfClickBehavior

    typedef enum {
      BAMF_CLICK_BEHAVIOR_NONE,
      BAMF_CLICK_BEHAVIOR_OPEN,
      BAMF_CLICK_BEHAVIOR_FOCUS,
      BAMF_CLICK_BEHAVIOR_FOCUS_ALL,
      BAMF_CLICK_BEHAVIOR_MINIMIZE,
      BAMF_CLICK_BEHAVIOR_RESTORE,
      BAMF_CLICK_BEHAVIOR_RESTORE_ALL,
      BAMF_CLICK_BEHAVIOR_PICKER,
    } BamfClickBehavior;

### struct BamfView

    struct BamfView;

### struct BamfViewClass

    struct BamfViewClass {
      GInitiallyUnownedClass parent_class;

      GList            * (*get_children)        (BamfView *view);
      gboolean           (*is_active)           (BamfView *view);
      gboolean           (*is_running)          (BamfView *view);
      gboolean           (*is_urgent)           (BamfView *view);
      gchar            * (*get_name)            (BamfView *view);
      gchar            * (*get_icon)            (BamfView *view);
      const gchar      * (*view_type)           (BamfView *view);
      void               (*set_path)            (BamfView *view, const gchar *path);
      BamfClickBehavior  (*click_behavior)      (BamfView *view);

      /*< signals >*/
      void (*active_changed)              (BamfView *view, gboolean active);
      void (*closed)                      (BamfView *view);
      void (*child_added)                 (BamfView *view, BamfView *child);
      void (*child_removed)               (BamfView *view, BamfView *child);
      void (*running_changed)             (BamfView *view, gboolean running);
      void (*urgent_changed)              (BamfView *view, gboolean urgent);
      void (*user_visible_changed)        (BamfView *view, gboolean user_visible);
      void (*name_changed)                (BamfView *view, gchar* old_name, gchar* new_name);
    };

### bamf_view_get_children ()

    GList *             bamf_view_get_children              (BamfView *view);

Note: Makes sever dbus calls the first time this is called on a view. Dbus messaging is reduced afterwards.

`view` : | a BamfView
Returns : | Returns a list of BamfView which must be freed after usage. Elements of the list are owned by bamf and should not be unreffed. [element-type Bamf.View][transfer container]

### bamf_view_get_click_suggestion ()

    BamfClickBehavior   bamf_view_get_click_suggestion      (BamfView *view);

### bamf_view_get_icon ()

    gchar *             bamf_view_get_icon                  (BamfView *view);

Gets the icon of a view. This icon is used to visually represent the view.

`view` : | a BamfView

### bamf_view_get_name ()

    gchar *             bamf_view_get_name                  (BamfView *view);

Gets the name of a view. This name is a short name best used to represent the view with text.

`view` : | a BamfView

### bamf_view_get_view_type ()

    const gchar *       bamf_view_get_view_type             (BamfView *view);

The view type of a window is a short string used to represent all views of the same class. These descriptions should not be used to do casting as they are not considered stable.

`view` : | a BamfView
Returns : | A gchar*. [transfer full]

### bamf_view_is_active ()

    gboolean            bamf_view_is_active                 (BamfView *view);

Determines if the view is currently active and focused by the user. Useful for an active window indicator.

`view` : | a BamfView

### bamf_view_is_closed ()

    gboolean            bamf_view_is_closed                 (BamfView *view);

### bamf_view_is_running ()

    gboolean            bamf_view_is_running                (BamfView *view);

Determines if the view is currently requiring attention. Useful for a running window indicator.

`view` : | a BamfView

### bamf_view_is_sticky ()

    gboolean            bamf_view_is_sticky                 (BamfView *view);

### bamf_view_is_urgent ()

    gboolean            bamf_view_is_urgent                 (BamfView *view);

### bamf_view_set_sticky ()

    void                bamf_view_set_sticky                (BamfView *view,
                                                             gboolean value);

### bamf_view_user_visible ()

    gboolean            bamf_view_user_visible              (BamfView *view);

`view` : | a BamfView
Returns : | a boolean useful for determining if a particular view is "user visible". User visible is a concept relating to whether or not a window should be shown in a launcher tasklist.

## Property Details

### The `"active"` property

      "active"                   gboolean              : Read

active.

Default value: FALSE

### The `"path"` property

      "path"                     gchar*                : Read

path.

Default value: NULL

### The `"running"` property

      "running"                  gboolean              : Read

running.

Default value: FALSE

### The `"urgent"` property

      "urgent"                   gboolean              : Read

urgent.

Default value: FALSE

### The `"user-visible"` property

      "user-visible"             gboolean              : Read

user-visible.

Default value: FALSE

## Signal Details

### The `"active-changed"` signal

    void                user_function                      (BamfView *bamfview,
                                                            gboolean  arg1,
                                                            gpointer  user_data)      : Run First

`bamfview` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"child-added"` signal

    void                user_function                      (BamfView *bamfview,
                                                            BamfView *arg1,
                                                            gpointer  user_data)      : Run First

`bamfview` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"child-removed"` signal

    void                user_function                      (BamfView *bamfview,
                                                            BamfView *arg1,
                                                            gpointer  user_data)      : Run First

`bamfview` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"closed"` signal

    void                user_function                      (BamfView *bamfview,
                                                            gpointer  user_data)      : Run First

`bamfview` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"name-changed"` signal

    void                user_function                      (BamfView *bamfview,
                                                            gchar    *arg1,
                                                            gchar    *arg2,
                                                            gpointer  user_data)

`bamfview` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"running-changed"` signal

    void                user_function                      (BamfView *bamfview,
                                                            gboolean  arg1,
                                                            gpointer  user_data)      : Run First

`bamfview` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"urgent-changed"` signal

    void                user_function                      (BamfView *bamfview,
                                                            gboolean  arg1,
                                                            gpointer  user_data)      : Run First

`bamfview` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"user-visible-changed"` signal

    void                user_function                      (BamfView *bamfview,
                                                            gboolean  arg1,
                                                            gpointer  user_data)      : Run First

`bamfview` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.