mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
2007-10-12 Tomas Frydrych <tf@o-hand.com>
* clutter/clutter-actor.c: * clutter/clutter-backend.c: * clutter/clutter-behaviour-depth.c: * clutter/clutter-box.c: * clutter/clutter-clone-texture.c: * clutter/clutter-container.c: * clutter/clutter-entry.c: * clutter/clutter-feature.c: * clutter/clutter-fixed.c: * clutter/clutter-group.c: * clutter/clutter-hbox.c: * clutter/clutter-label.c: * clutter/clutter-layout.c: * clutter/clutter-media.c: * clutter/clutter-rectangle.c: * clutter/clutter-score.c: * clutter/clutter-script.c: * clutter/clutter-stage.c: * clutter/clutter-texture.c: * clutter/clutter-timeline.c: * clutter/clutter-timeout-pool.c: * clutter/clutter-vbox.c: * clutter/cogl/gl/cogl.c: * clutter/cogl/gles/cogl.c: * clutter/eglnative/clutter-backend-egl.c: * clutter/eglnative/clutter-event-egl.c: * clutter/eglnative/clutter-stage-egl.c: * clutter/eglx/clutter-backend-egl.c: * clutter/eglx/clutter-event-egl.c: * clutter/eglx/clutter-stage-egl.c: * clutter/glx/clutter-event-glx.c: * clutter/json/json-array.c: * clutter/json/json-generator.c: * clutter/json/json-node.c: * clutter/json/json-object.c: * clutter/json/json-parser.c: * clutter/sdl/clutter-backend-sdl.c: * clutter/sdl/clutter-event-sdl.c: * clutter/sdl/clutter-stage-sdl.c: Fixedup config.h inclusion (must always be bracketed with #ifdef HAVE_CONFIG_H).
This commit is contained in:
@ -29,11 +29,13 @@
|
||||
*
|
||||
* #ClutterRectangle is an Actor which draws simple filled rectangles.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "clutter-rectangle.h"
|
||||
#include "clutter-main.h"
|
||||
#include "clutter-private.h"
|
||||
#include "clutter-private.h"
|
||||
#include "clutter-debug.h"
|
||||
|
||||
#include "cogl.h"
|
||||
@ -86,7 +88,7 @@ clutter_rectangle_paint (ClutterActor *self)
|
||||
|
||||
clutter_actor_get_geometry (self, &geom);
|
||||
|
||||
/* parent paint call will have translated us into position so
|
||||
/* parent paint call will have translated us into position so
|
||||
* paint from 0, 0
|
||||
*/
|
||||
if (priv->has_border)
|
||||
@ -103,17 +105,17 @@ clutter_rectangle_paint (ClutterActor *self)
|
||||
geom.width - priv->border_width,
|
||||
priv->border_width);
|
||||
|
||||
cogl_rectangle (geom.width - priv->border_width,
|
||||
cogl_rectangle (geom.width - priv->border_width,
|
||||
priv->border_width,
|
||||
priv->border_width,
|
||||
geom.height - priv->border_width);
|
||||
|
||||
cogl_rectangle (0, geom.height - priv->border_width,
|
||||
geom.width - priv->border_width,
|
||||
geom.width - priv->border_width,
|
||||
priv->border_width);
|
||||
|
||||
cogl_rectangle (0, 0,
|
||||
priv->border_width,
|
||||
priv->border_width,
|
||||
geom.height - priv->border_width);
|
||||
|
||||
tmp_col.red = priv->color.red;
|
||||
@ -143,17 +145,17 @@ clutter_rectangle_paint (ClutterActor *self)
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_rectangle_set_property (GObject *object,
|
||||
clutter_rectangle_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
ClutterRectangle *rectangle = CLUTTER_RECTANGLE(object);
|
||||
|
||||
switch (prop_id)
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_COLOR:
|
||||
clutter_rectangle_set_color (rectangle, g_value_get_boxed (value));
|
||||
clutter_rectangle_set_color (rectangle, g_value_get_boxed (value));
|
||||
break;
|
||||
case PROP_BORDER_COLOR:
|
||||
clutter_rectangle_set_border_color (rectangle,
|
||||
@ -173,15 +175,15 @@ clutter_rectangle_set_property (GObject *object,
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_rectangle_get_property (GObject *object,
|
||||
clutter_rectangle_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
ClutterRectangle *rectangle = CLUTTER_RECTANGLE(object);
|
||||
ClutterColor color;
|
||||
|
||||
switch (prop_id)
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_COLOR:
|
||||
clutter_rectangle_get_color (rectangle, &color);
|
||||
@ -200,17 +202,17 @@ clutter_rectangle_get_property (GObject *object,
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
static void
|
||||
clutter_rectangle_finalize (GObject *object)
|
||||
{
|
||||
G_OBJECT_CLASS (clutter_rectangle_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
clutter_rectangle_dispose (GObject *object)
|
||||
{
|
||||
G_OBJECT_CLASS (clutter_rectangle_parent_class)->dispose (object);
|
||||
@ -260,7 +262,7 @@ clutter_rectangle_class_init (ClutterRectangleClass *klass)
|
||||
* ClutterRectangle:border-width:
|
||||
*
|
||||
* The width of the border of the rectangle, in pixels.
|
||||
*
|
||||
*
|
||||
* Since: 0.2
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
@ -353,7 +355,7 @@ clutter_rectangle_get_color (ClutterRectangle *rectangle,
|
||||
ClutterColor *color)
|
||||
{
|
||||
ClutterRectanglePrivate *priv;
|
||||
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_RECTANGLE (rectangle));
|
||||
g_return_if_fail (color != NULL);
|
||||
|
||||
@ -377,7 +379,7 @@ clutter_rectangle_set_color (ClutterRectangle *rectangle,
|
||||
const ClutterColor *color)
|
||||
{
|
||||
ClutterRectanglePrivate *priv;
|
||||
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_RECTANGLE (rectangle));
|
||||
g_return_if_fail (color != NULL);
|
||||
|
||||
|
Reference in New Issue
Block a user