2009-11-21 03:19:56 +00:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
2010-11-10 22:00:45 +00:00
|
|
|
/*
|
|
|
|
* st-shadow.h: Boxed type holding for -st-shadow attributes
|
|
|
|
*
|
|
|
|
* Copyright 2009, 2010 Florian Müllner
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 2.1 of
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope it will be useful, but WITHOUT ANY
|
|
|
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2009-11-21 03:19:56 +00:00
|
|
|
#ifndef __ST_SHADOW__
|
|
|
|
#define __ST_SHADOW__
|
|
|
|
|
|
|
|
#include <clutter/clutter.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define ST_TYPE_SHADOW (st_shadow_get_type ())
|
2012-08-21 19:13:33 +00:00
|
|
|
#define ST_TYPE_SHADOW_HELPER (st_shadow_get_type ())
|
2009-11-21 03:19:56 +00:00
|
|
|
|
|
|
|
typedef struct _StShadow StShadow;
|
2012-08-21 19:13:33 +00:00
|
|
|
typedef struct _StShadowHelper StShadowHelper;
|
2009-11-21 03:19:56 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* StShadow:
|
|
|
|
* @color: shadow's color
|
|
|
|
* @xoffset: horizontal offset - positive values mean placement to the right,
|
|
|
|
* negative values placement to the left of the element.
|
|
|
|
* @yoffset: vertical offset - positive values mean placement below, negative
|
|
|
|
* values placement above the element.
|
|
|
|
* @blur: shadow's blur radius - a value of 0.0 will result in a hard shadow.
|
2010-03-19 10:34:32 +00:00
|
|
|
* @spread: shadow's spread radius - grow the shadow without enlarging the
|
|
|
|
* blur.
|
2009-11-21 03:19:56 +00:00
|
|
|
*
|
|
|
|
* Attributes of the -st-shadow property.
|
|
|
|
*/
|
|
|
|
struct _StShadow {
|
|
|
|
ClutterColor color;
|
|
|
|
gdouble xoffset;
|
|
|
|
gdouble yoffset;
|
|
|
|
gdouble blur;
|
2010-03-19 10:34:32 +00:00
|
|
|
gdouble spread;
|
2011-02-14 01:07:14 +00:00
|
|
|
gboolean inset;
|
2010-09-01 09:16:31 +00:00
|
|
|
volatile int ref_count;
|
2009-11-21 03:19:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
GType st_shadow_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
StShadow *st_shadow_new (ClutterColor *color,
|
|
|
|
gdouble xoffset,
|
|
|
|
gdouble yoffset,
|
2010-03-19 10:34:32 +00:00
|
|
|
gdouble blur,
|
2011-02-14 01:07:14 +00:00
|
|
|
gdouble spread,
|
|
|
|
gboolean inset);
|
2010-09-01 09:16:31 +00:00
|
|
|
StShadow *st_shadow_ref (StShadow *shadow);
|
|
|
|
void st_shadow_unref (StShadow *shadow);
|
2009-11-21 03:19:56 +00:00
|
|
|
|
2010-08-26 18:10:46 +00:00
|
|
|
gboolean st_shadow_equal (StShadow *shadow,
|
|
|
|
StShadow *other);
|
|
|
|
|
2010-06-04 13:21:59 +00:00
|
|
|
void st_shadow_get_box (StShadow *shadow,
|
|
|
|
const ClutterActorBox *actor_box,
|
|
|
|
ClutterActorBox *shadow_box);
|
|
|
|
|
2012-08-21 19:13:33 +00:00
|
|
|
|
|
|
|
GType st_shadow_helper_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
StShadowHelper *st_shadow_helper_new (StShadow *shadow);
|
|
|
|
|
|
|
|
StShadowHelper *st_shadow_helper_copy (StShadowHelper *helper);
|
|
|
|
void st_shadow_helper_free (StShadowHelper *helper);
|
|
|
|
|
|
|
|
void st_shadow_helper_update (StShadowHelper *helper,
|
|
|
|
ClutterActor *source);
|
|
|
|
|
|
|
|
void st_shadow_helper_paint (StShadowHelper *helper,
|
|
|
|
ClutterActorBox *actor_box,
|
|
|
|
guint8 paint_opacity);
|
|
|
|
|
2009-11-21 03:19:56 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __ST_SHADOW__ */
|