2010-10-18 15:34:08 -04:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
/*
|
|
|
|
* MetaShadowFactory:
|
|
|
|
*
|
|
|
|
* Create and cache shadow textures for arbitrary window shapes
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
* 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2010-11-11 10:21:36 -05:00
|
|
|
#ifndef __META_SHADOW_FACTORY_PRIVATE_H__
|
|
|
|
#define __META_SHADOW_FACTORY_PRIVATE_H__
|
2010-10-18 15:34:08 -04:00
|
|
|
|
2010-11-11 10:21:36 -05:00
|
|
|
#include <cairo.h>
|
2010-10-18 15:34:08 -04:00
|
|
|
#include <clutter/clutter.h>
|
|
|
|
#include "meta-window-shape.h"
|
2010-11-11 10:21:36 -05:00
|
|
|
#include "meta-shadow-factory.h"
|
2010-11-04 17:26:24 -04:00
|
|
|
|
2010-10-18 15:34:08 -04:00
|
|
|
/**
|
|
|
|
* MetaShadow:
|
|
|
|
* #MetaShadow holds a shadow texture along with information about how to
|
|
|
|
* apply that texture to draw a window texture. (E.g., it knows how big the
|
|
|
|
* unscaled borders are on each side of the shadow texture.)
|
|
|
|
*/
|
|
|
|
typedef struct _MetaShadow MetaShadow;
|
|
|
|
|
|
|
|
MetaShadow *meta_shadow_ref (MetaShadow *shadow);
|
|
|
|
void meta_shadow_unref (MetaShadow *shadow);
|
|
|
|
CoglHandle meta_shadow_get_texture (MetaShadow *shadow);
|
|
|
|
void meta_shadow_paint (MetaShadow *shadow,
|
|
|
|
int window_x,
|
|
|
|
int window_y,
|
|
|
|
int window_width,
|
|
|
|
int window_height,
|
|
|
|
guint8 opacity);
|
|
|
|
void meta_shadow_get_bounds (MetaShadow *shadow,
|
|
|
|
int window_x,
|
|
|
|
int window_y,
|
|
|
|
int window_width,
|
|
|
|
int window_height,
|
|
|
|
cairo_rectangle_int_t *bounds);
|
|
|
|
|
2010-11-11 10:21:36 -05:00
|
|
|
MetaShadowFactory *meta_shadow_factory_new (void);
|
2010-11-04 17:26:24 -04:00
|
|
|
|
2010-10-18 15:34:08 -04:00
|
|
|
MetaShadow * meta_shadow_factory_get_shadow (MetaShadowFactory *factory,
|
|
|
|
MetaWindowShape *shape,
|
|
|
|
int width,
|
|
|
|
int height,
|
2010-11-04 17:02:23 -04:00
|
|
|
int radius,
|
|
|
|
int top_fade);
|
2010-10-18 15:34:08 -04:00
|
|
|
|
2010-11-11 10:21:36 -05:00
|
|
|
#endif /* __META_SHADOW_FACTORY_PRIVATE_H__ */
|