## CCMWindow CCMWindow |

## Synopsis

    #define             CCM_WINDOW_XWINDOW                  (obj)
                        CCMWindow;
    CCMWindow*          ccm_window_new                      (CCMScreen *screen,
                                                             Window xwindow);
    gboolean            ccm_window_is_viewable              (CCMWindow *self);
    gboolean            ccm_window_is_input_only            (CCMWindow *self);
    gboolean            ccm_window_is_managed               (CCMWindow *self);
    void                ccm_window_make_output_only         (CCMWindow *self);
    void                ccm_window_make_input_output        (CCMWindow *self);
    void                ccm_window_redirect                 (CCMWindow *self);
    void                ccm_window_redirect_subwindows      (CCMWindow *self);
    void                ccm_window_unredirect               (CCMWindow *self);
    void                ccm_window_unredirect_subwindows    (CCMWindow *self);
    void                ccm_window_redirect_input           (CCMWindow *self);
    void                ccm_window_unredirect_input         (CCMWindow *self);
    CCMPixmap *         ccm_window_get_pixmap               (CCMWindow *self);
    CCMPixmap *         ccm_window_create_pixmap            (CCMWindow *self,
                                                             int width,
                                                             int height,
                                                             int depth);
    gboolean            ccm_window_paint                    (CCMWindow *self,
                                                             cairo_t *ctx,
                                                             gboolean buffered);
    void                ccm_window_map                      (CCMWindow *self);
    void                ccm_window_unmap                    (CCMWindow *self);
    void                ccm_window_query_opacity            (CCMWindow *self,
                                                             gboolean deleted);
    void                ccm_window_query_transient_for      (CCMWindow *self);
    void                ccm_window_query_wm_hints           (CCMWindow *self);
    void                ccm_window_query_hint_type          (CCMWindow *self);
    CCMWindowType       ccm_window_get_hint_type            (CCMWindow *self);
    const gchar *       ccm_window_get_name                 (CCMWindow *self);
    void                ccm_window_set_alpha                (CCMWindow *self);
    void                ccm_window_set_opaque               (CCMWindow *self);
    const CCMRegion *   ccm_window_get_opaque_region        (CCMWindow *self);
    gboolean            ccm_window_get_opaque_clipbox       (CCMWindow *self,
                                                             cairo_rectangle_t *clipbox);
    void                ccm_window_set_opaque_region        (CCMWindow *self,
                                                             const CCMRegion *region);
    gfloat              ccm_window_get_opacity              (CCMWindow *self);
    void                ccm_window_set_opacity              (CCMWindow *self,
                                                             gfloat opacity);
    void                ccm_window_query_state              (CCMWindow *self);
    gboolean            ccm_window_set_state                (CCMWindow *self,
                                                             Atom state_atom);
    void                ccm_window_unset_state              (CCMWindow *self,
                                                             Atom state_atom);
    void                ccm_window_switch_state             (CCMWindow *self,
                                                             Atom state_atom);
    gboolean            ccm_window_is_shaded                (CCMWindow *self);
    gboolean            ccm_window_is_fullscreen            (CCMWindow *self);
    void                ccm_window_query_mwm_hints          (CCMWindow *self);
    gboolean            ccm_window_is_decorated             (CCMWindow *self);
    gboolean            ccm_window_skip_taskbar             (CCMWindow *self);
    gboolean            ccm_window_skip_pager               (CCMWindow *self);
    gboolean            ccm_window_keep_above               (CCMWindow *self);
    gboolean            ccm_window_keep_below               (CCMWindow *self);
    const CCMWindow *   ccm_window_transient_for            (CCMWindow *self);
    const CCMWindow *   ccm_window_get_group_leader         (CCMWindow *self);
    const cairo_rectangle_t * ccm_window_get_area           (CCMWindow *self);
    void                ccm_window_query_frame_extends      (CCMWindow *self);
    void                ccm_window_get_frame_extends        (CCMWindow *self,
                                                             int *left_frame,
                                                             int *right_frame,
                                                             int *top_frame,
                                                             int *bottom_frame);
    gboolean            ccm_window_transform                (CCMWindow *self,
                                                             cairo_t *ctx,
                                                             gboolean y_invert);
    guint32 *           ccm_window_get_property             (CCMWindow *self,
                                                             Atom property_atom,
                                                             Atom req_type,
                                                             guint *n_items);
    guint32 *           ccm_window_get_child_property       (CCMWindow *self,
                                                             Atom property_atom,
                                                             Atom req_type,
                                                             guint *n_items);
    Window              ccm_window_redirect_event           (CCMWindow *self,
                                                             XEvent *event,
                                                             Window over);
    void                ccm_window_activate                 (CCMWindow *self,
                                                             Time timestamp);
    GSList *            ccm_window_get_transients           (CCMWindow *self);

## Object Hierarchy

      GObject
       +----CCMDrawable
             +----CCMWindow

## Implemented Interfaces

CCMWindow implements CCMWindowPlugin.

## Properties

      "block-mouse-redirect-event" gboolean              : Write
      "child"                    gpointer              : Read / Write
      "input"                    gpointer              : Read
      "mask"                     gpointer              : Read / Write
      "mask-height"              gint                  : Read / Write
      "mask-width"               gint                  : Read / Write
      "mask-y-invert"            gboolean              : Read / Write
      "no-undamage-sibling"      gboolean              : Read / Write
      "pixmap"                   gpointer              : Write
      "redirect"                 gboolean              : Write
      "use-image"                gboolean              : Write

## Signals

      "error"                                          : Run Last
      "opacity-changed"                                : Run Last
      "property-changed"                               : Run Last
      "redirect-input"                                 : Run Last

## Description

## Details

### CCM_WINDOW_XWINDOW()

    #define CCM_WINDOW_XWINDOW(obj)     (ccm_drawable_get_xid(CCM_DRAWABLE(obj)))

`obj` : |

### CCMWindow

    typedef struct _CCMWindow CCMWindow;

### ccm_window_new ()

    CCMWindow*          ccm_window_new                      (CCMScreen *screen,
                                                             Window xwindow);

Create a new CCMWindow reference which point on `xwindow`

`screen` : | CCMScreen of window
`xwindow` : | window xid
Returns : | CCMWindow

### ccm_window_is_viewable ()

    gboolean            ccm_window_is_viewable              (CCMWindow *self);

Indicate if window is visible

`self` : | CCMWindow
Returns : | window is visible

### ccm_window_is_input_only ()

    gboolean            ccm_window_is_input_only            (CCMWindow *self);

Indicate if window is input only

`self` : | CCMWindow
Returns : | window is input only

### ccm_window_is_managed ()

    gboolean            ccm_window_is_managed               (CCMWindow *self);

Indicate if window is managed by WM

`self` : | CCMWindow
Returns : | window is managed

### ccm_window_make_output_only ()

    void                ccm_window_make_output_only         (CCMWindow *self);

`self` : |

### ccm_window_make_input_output ()

    void                ccm_window_make_input_output        (CCMWindow *self);

`self` : |

### ccm_window_redirect ()

    void                ccm_window_redirect                 (CCMWindow *self);

`self` : |

### ccm_window_redirect_subwindows ()

    void                ccm_window_redirect_subwindows      (CCMWindow *self);

`self` : |

### ccm_window_unredirect ()

    void                ccm_window_unredirect               (CCMWindow *self);

`self` : |

### ccm_window_unredirect_subwindows ()

    void                ccm_window_unredirect_subwindows    (CCMWindow *self);

`self` : |

### ccm_window_redirect_input ()

    void                ccm_window_redirect_input           (CCMWindow *self);

`self` : |

### ccm_window_unredirect_input ()

    void                ccm_window_unredirect_input         (CCMWindow *self);

`self` : |

### ccm_window_get_pixmap ()

    CCMPixmap *         ccm_window_get_pixmap               (CCMWindow *self);

`self` : |
Returns : |

### ccm_window_create_pixmap ()

    CCMPixmap *         ccm_window_create_pixmap            (CCMWindow *self,
                                                             int width,
                                                             int height,
                                                             int depth);

`self` : |
`width` : |
`height` : |
`depth` : |
Returns : |

### ccm_window_paint ()

    gboolean            ccm_window_paint                    (CCMWindow *self,
                                                             cairo_t *ctx,
                                                             gboolean buffered);

`self` : |
`ctx` : |
`buffered` : |
Returns : |

### ccm_window_map ()

    void                ccm_window_map                      (CCMWindow *self);

`self` : |

### ccm_window_unmap ()

    void                ccm_window_unmap                    (CCMWindow *self);

`self` : |

### ccm_window_query_opacity ()

    void                ccm_window_query_opacity            (CCMWindow *self,
                                                             gboolean deleted);

`self` : |
`deleted` : |

### ccm_window_query_transient_for ()

    void                ccm_window_query_transient_for      (CCMWindow *self);

`self` : |

### ccm_window_query_wm_hints ()

    void                ccm_window_query_wm_hints           (CCMWindow *self);

`self` : |

### ccm_window_query_hint_type ()

    void                ccm_window_query_hint_type          (CCMWindow *self);

`self` : |

### ccm_window_get_hint_type ()

    CCMWindowType       ccm_window_get_hint_type            (CCMWindow *self);

`self` : |
Returns : |

### ccm_window_get_name ()

    const gchar *       ccm_window_get_name                 (CCMWindow *self);

`self` : |
Returns : |

### ccm_window_set_alpha ()

    void                ccm_window_set_alpha                (CCMWindow *self);

`self` : |

### ccm_window_set_opaque ()

    void                ccm_window_set_opaque               (CCMWindow *self);

`self` : |

### ccm_window_get_opaque_region ()

    const CCMRegion *   ccm_window_get_opaque_region        (CCMWindow *self);

Get opaque region of window

`self` : | CCMWindow
Returns : | const CCMRegion

### ccm_window_get_opaque_clipbox ()

    gboolean            ccm_window_get_opaque_clipbox       (CCMWindow *self,
                                                             cairo_rectangle_t *clipbox);

Get opaque clipbox of window

`self` : | CCMWindow
`clipbox` : | cairo_rectangle_t
Returns : | TRUE if window have opaque region

### ccm_window_set_opaque_region ()

    void                ccm_window_set_opaque_region        (CCMWindow *self,
                                                             const CCMRegion *region);

`self` : |
`region` : |

### ccm_window_get_opacity ()

    gfloat              ccm_window_get_opacity              (CCMWindow *self);

`self` : |
Returns : |

### ccm_window_set_opacity ()

    void                ccm_window_set_opacity              (CCMWindow *self,
                                                             gfloat opacity);

`self` : |
`opacity` : |

### ccm_window_query_state ()

    void                ccm_window_query_state              (CCMWindow *self);

`self` : |

### ccm_window_set_state ()

    gboolean            ccm_window_set_state                (CCMWindow *self,
                                                             Atom state_atom);

`self` : |
`state_atom` : |
Returns : |

### ccm_window_unset_state ()

    void                ccm_window_unset_state              (CCMWindow *self,
                                                             Atom state_atom);

`self` : |
`state_atom` : |

### ccm_window_switch_state ()

    void                ccm_window_switch_state             (CCMWindow *self,
                                                             Atom state_atom);

`self` : |
`state_atom` : |

### ccm_window_is_shaded ()

    gboolean            ccm_window_is_shaded                (CCMWindow *self);

`self` : |
Returns : |

### ccm_window_is_fullscreen ()

    gboolean            ccm_window_is_fullscreen            (CCMWindow *self);

`self` : |
Returns : |

### ccm_window_query_mwm_hints ()

    void                ccm_window_query_mwm_hints          (CCMWindow *self);

`self` : |

### ccm_window_is_decorated ()

    gboolean            ccm_window_is_decorated             (CCMWindow *self);

`self` : |
Returns : |

### ccm_window_skip_taskbar ()

    gboolean            ccm_window_skip_taskbar             (CCMWindow *self);

`self` : |
Returns : |

### ccm_window_skip_pager ()

    gboolean            ccm_window_skip_pager               (CCMWindow *self);

`self` : |
Returns : |

### ccm_window_keep_above ()

    gboolean            ccm_window_keep_above               (CCMWindow *self);

`self` : |
Returns : |

### ccm_window_keep_below ()

    gboolean            ccm_window_keep_below               (CCMWindow *self);

`self` : |
Returns : |

### ccm_window_transient_for ()

    const CCMWindow *   ccm_window_transient_for            (CCMWindow *self);

`self` : |
Returns : |

### ccm_window_get_group_leader ()

    const CCMWindow *   ccm_window_get_group_leader         (CCMWindow *self);

`self` : |
Returns : |

### ccm_window_get_area ()

    const cairo_rectangle_t * ccm_window_get_area           (CCMWindow *self);

`self` : |
Returns : |

### ccm_window_query_frame_extends ()

    void                ccm_window_query_frame_extends      (CCMWindow *self);

`self` : |

### ccm_window_get_frame_extends ()

    void                ccm_window_get_frame_extends        (CCMWindow *self,
                                                             int *left_frame,
                                                             int *right_frame,
                                                             int *top_frame,
                                                             int *bottom_frame);

`self` : |
`left_frame` : |
`right_frame` : |
`top_frame` : |
`bottom_frame` : |

### ccm_window_transform ()

    gboolean            ccm_window_transform                (CCMWindow *self,
                                                             cairo_t *ctx,
                                                             gboolean y_invert);

`self` : |
`ctx` : |
`y_invert` : |
Returns : |

### ccm_window_get_property ()

    guint32 *           ccm_window_get_property             (CCMWindow *self,
                                                             Atom property_atom,
                                                             Atom req_type,
                                                             guint *n_items);

`self` : |
`property_atom` : |
`req_type` : |
`n_items` : |
Returns : |

### ccm_window_get_child_property ()

    guint32 *           ccm_window_get_child_property       (CCMWindow *self,
                                                             Atom property_atom,
                                                             Atom req_type,
                                                             guint *n_items);

`self` : |
`property_atom` : |
`req_type` : |
`n_items` : |
Returns : |

### ccm_window_redirect_event ()

    Window              ccm_window_redirect_event           (CCMWindow *self,
                                                             XEvent *event,
                                                             Window over);

`self` : |
`event` : |
`over` : |
Returns : |

### ccm_window_activate ()

    void                ccm_window_activate                 (CCMWindow *self,
                                                             Time timestamp);

`self` : |
`timestamp` : |

### ccm_window_get_transients ()

    GSList *            ccm_window_get_transients           (CCMWindow *self);

`self` : |
Returns : |

## Property Details

### The `"block-mouse-redirect-event"` property

      "block-mouse-redirect-event" gboolean              : Write

Unblock/Block redirected pointer event when window is transformed.

Default value: FALSE

### The `"child"` property

      "child"                    gpointer              : Read / Write

The main child of window, it is only set with decorated window and it point on real window.

### The `"input"` property

      "input"                    gpointer              : Read

The input redirection window it is only set when window is transformed and need to be have input event redirected.

### The `"mask"` property

      "mask"                     gpointer              : Read / Write

Mask surface.

### The `"mask-height"` property

      "mask-height"              gint                  : Read / Write

Window mask height.

Default value: 0

### The `"mask-width"` property

      "mask-width"               gint                  : Read / Write

Window mask width.

Default value: 0

### The `"mask-y-invert"` property

      "mask-y-invert"            gboolean              : Read / Write

Get if mask is y inverted.

Default value: FALSE

### The `"no-undamage-sibling"` property

      "no-undamage-sibling"      gboolean              : Read / Write

Get if window undamage sibling.

Default value: FALSE

### The `"pixmap"` property

      "pixmap"                   gpointer              : Write

The redirect pixmap of window.

### The `"redirect"` property

      "redirect"                 gboolean              : Write

If is unset the window isn't redirected when it have transformation.

Default value: TRUE

### The `"use-image"` property

      "use-image"                gboolean              : Write

Use image backend for pixmap.

Default value: FALSE

## Signal Details

### The `"error"` signal

    void                user_function                      (CCMWindow *arg0,
                                                            gpointer   user_data)      : Run Last

Emitted when an error occur on a window request.

`user_data` : | user data set when the signal handler was connected.

### The `"opacity-changed"` signal

    void                user_function                      (CCMWindow *arg0,
                                                            gpointer   user_data)      : Run Last

Emitted when the window opacity changed.

`user_data` : | user data set when the signal handler was connected.

### The `"property-changed"` signal

    void                user_function                      (CCMWindow *property,
                                                            gint       arg1,
                                                            gpointer   user_data)      : Run Last

Emitted when a window property changed.

`property` : | CCMPropertyType
`user_data` : | user data set when the signal handler was connected.

### The `"redirect-input"` signal

    void                user_function                      (CCMWindow *arg0,
                                                            gboolean   arg1,
                                                            gpointer   user_data)      : Run Last

Emitted when the window redirect input changed.

`user_data` : | user data set when the signal handler was connected.