first step at rewriting the button code - nothing works, but it compiles
[swfdec.git] / libswfdec / swfdec_rectangle.h
blob4d34ae6b87c47de66db973c2dab6acc01dc63980
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 #define SWFDEC_TYPE_RECTANGLE swfdec_rectangle_get_type ()
27 typedef struct _SwfdecRectangle SwfdecRectangle;
29 struct _SwfdecRectangle {
30 int x; /* x coordinate of top-left point */
31 int y; /* y coordinate of top left point */
32 int width; /* width of rectangle or 0 for empty */
33 int height; /* height of rectangle or 0 for empty */
36 GType swfdec_rectangle_get_type (void);
38 void swfdec_rectangle_init_empty (SwfdecRectangle * rectangle);
40 gboolean swfdec_rectangle_is_empty (const SwfdecRectangle * rectangle);
42 gboolean swfdec_rectangle_intersect (SwfdecRectangle * dest,
43 const SwfdecRectangle * a,
44 const SwfdecRectangle * b);
45 void swfdec_rectangle_union (SwfdecRectangle * dest,
46 const SwfdecRectangle * a,
47 const SwfdecRectangle * b);
48 gboolean swfdec_rectangle_contains (const SwfdecRectangle * container,
49 const SwfdecRectangle * content);
50 gboolean swfdec_rectangle_contains_point (const SwfdecRectangle * rectangle,
51 int x,
52 int y);
55 #endif