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

## Synopsis

    #define             BAMF_VIEW_SIGNAL_ACTIVE_CHANGED
    #define             BAMF_VIEW_SIGNAL_RUNNING_CHANGED
    #define             BAMF_VIEW_SIGNAL_URGENT_CHANGED
    #define             BAMF_VIEW_SIGNAL_USER_VISIBLE_CHANGED
    #define             BAMF_VIEW_SIGNAL_NAME_CHANGED
    #define             BAMF_VIEW_SIGNAL_ICON_CHANGED
    #define             BAMF_VIEW_SIGNAL_CHILD_ADDED
    #define             BAMF_VIEW_SIGNAL_CHILD_REMOVED
    #define             BAMF_VIEW_SIGNAL_CHILD_MOVED
    #define             BAMF_VIEW_SIGNAL_CLOSED
    enum                BamfClickBehavior;
    struct              BamfView;
    struct              BamfViewClass;
    GList *             bamf_view_get_children              (BamfView *view);
    gboolean            bamf_view_is_closed                 (BamfView *view);
    gboolean            bamf_view_is_active                 (BamfView *view);
    gboolean            bamf_view_is_running                (BamfView *view);
    gboolean            bamf_view_is_urgent                 (BamfView *view);
    gboolean            bamf_view_is_user_visible           (BamfView *view);
    gchar *             bamf_view_get_name                  (BamfView *view);
    gchar *             bamf_view_get_icon                  (BamfView *view);
    const gchar *       bamf_view_get_view_type             (BamfView *view);
    void                bamf_view_set_sticky                (BamfView *view,
                                                             gboolean value);
    gboolean            bamf_view_is_sticky                 (BamfView *view);
    BamfClickBehavior   bamf_view_get_click_suggestion      (BamfView *view);
    gboolean            bamf_view_user_visible              (BamfView *view);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----BamfView
                   +----BamfApplication
                   +----BamfTab
                   +----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-moved"                                    : Run First
      "child-removed"                                  : Run First
      "closed"                                         : Run Last
      "icon-changed"
      "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

### BAMF_VIEW_SIGNAL_ACTIVE_CHANGED

    #define BAMF_VIEW_SIGNAL_ACTIVE_CHANGED       "active-changed"

### BAMF_VIEW_SIGNAL_RUNNING_CHANGED

    #define BAMF_VIEW_SIGNAL_RUNNING_CHANGED      "running-changed"

### BAMF_VIEW_SIGNAL_URGENT_CHANGED

    #define BAMF_VIEW_SIGNAL_URGENT_CHANGED       "urgent-changed"

### BAMF_VIEW_SIGNAL_USER_VISIBLE_CHANGED

    #define BAMF_VIEW_SIGNAL_USER_VISIBLE_CHANGED "user-visible-changed"

### BAMF_VIEW_SIGNAL_NAME_CHANGED

    #define BAMF_VIEW_SIGNAL_NAME_CHANGED         "name-changed"

### BAMF_VIEW_SIGNAL_ICON_CHANGED

    #define BAMF_VIEW_SIGNAL_ICON_CHANGED         "icon-changed"

### BAMF_VIEW_SIGNAL_CHILD_ADDED

    #define BAMF_VIEW_SIGNAL_CHILD_ADDED          "child-added"

### BAMF_VIEW_SIGNAL_CHILD_REMOVED

    #define BAMF_VIEW_SIGNAL_CHILD_REMOVED        "child-removed"

### BAMF_VIEW_SIGNAL_CHILD_MOVED

    #define BAMF_VIEW_SIGNAL_CHILD_MOVED          "child-moved"

### BAMF_VIEW_SIGNAL_CLOSED

    #define BAMF_VIEW_SIGNAL_CLOSED               "closed"

### 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;

`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` |

### 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);
      gboolean           (*is_user_visible)     (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);
      void               (*set_sticky)          (BamfView *view, gboolean value);
      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);
      void (*icon_changed)                (BamfView *view, gchar* icon);
      void (*child_moved)                 (BamfView *view, BamfView *child);
    };

### 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_is_closed ()

    gboolean            bamf_view_is_closed                 (BamfView *view);

Determines if the view is closed or not.

`view` : | a BamfView

### 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_running ()

    gboolean            bamf_view_is_running                (BamfView *view);

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

`view` : | a BamfView

### bamf_view_is_urgent ()

    gboolean            bamf_view_is_urgent                 (BamfView *view);

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

`view` : | a BamfView

### bamf_view_is_user_visible ()

    gboolean            bamf_view_is_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.

Since 0.4.0

### 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_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_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.

Virtual: view_type

`view` : | a BamfView

### bamf_view_set_sticky ()

    void                bamf_view_set_sticky                (BamfView *view,
                                                             gboolean value);

### bamf_view_is_sticky ()

    gboolean            bamf_view_is_sticky                 (BamfView *view);

### bamf_view_get_click_suggestion ()

    BamfClickBehavior   bamf_view_get_click_suggestion      (BamfView *view);

### bamf_view_user_visible ()

    gboolean            bamf_view_user_visible              (BamfView *view);

### Warning

`bamf_view_user_visible` is deprecated and should not be used in newly-written code. 0.4.0

`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-moved"` 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 Last

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

### The `"icon-changed"` signal

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

`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.