SwfdecAsObjectClass is gone now
[swfdec.git] / swfdec / swfdec_rectangle.h
blobb1ddc385199a3358bfd596735c78d4edcb2cd542
1 /* Swfdec
2 * Copyright (C) 2007 Benjamin Otte <otte@gnome.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301 USA
20 #ifndef __SWFDEC_RECTANGLE_H__
21 #define __SWFDEC_RECTANGLE_H__
23 #include <glib-object.h>
25 G_BEGIN_DECLS
27 #define SWFDEC_TYPE_RECTANGLE swfdec_rectangle_get_type ()
29 typedef struct _SwfdecRectangle SwfdecRectangle;
31 struct _SwfdecRectangle {
32 int x; /* x coordinate of top-left point */
33 int y; /* y coordinate of top left point */
34 int width; /* width of rectangle or 0 for empty */
35 int height; /* height of rectangle or 0 for empty */
38 GType swfdec_rectangle_get_type (void);
40 void swfdec_rectangle_init_empty (SwfdecRectangle * rectangle);
42 gboolean swfdec_rectangle_is_empty (const SwfdecRectangle * rectangle);
44 gboolean swfdec_rectangle_intersect (SwfdecRectangle * dest,
45 const SwfdecRectangle * a,
46 const SwfdecRectangle * b);
47 void swfdec_rectangle_union (SwfdecRectangle * dest,
48 const SwfdecRectangle * a,
49 const SwfdecRectangle * b);
50 gboolean swfdec_rectangle_contains (const SwfdecRectangle * container,
51 const SwfdecRectangle * content);
52 gboolean swfdec_rectangle_contains_point (const SwfdecRectangle * rectangle,
53 int x,
54 int y);
57 G_END_DECLS
58 #endif