File: gf-rectangle.h

package info (click to toggle)
gnome-flashback 3.58.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,196 kB
  • sloc: ansic: 109,631; sh: 5,515; makefile: 1,794; xml: 1,010; sed: 39
file content (51 lines) | stat: -rw-r--r-- 1,492 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
 * Copyright (C) 2005, 2006 Elijah Newren
 * Copyright (C) 2017 Alberts Muktupāvels
 *
 * 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 3 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, see <http://www.gnu.org/licenses/>.
 *
 * Adapted from mutter:
 * - src/meta/boxes.h
 */

#ifndef GF_RECTANGLE_H
#define GF_RECTANGLE_H

#include <glib.h>

G_BEGIN_DECLS

typedef struct
{
  gint x;
  gint y;
  gint width;
  gint height;
} GfRectangle;

gboolean gf_rectangle_equal         (const GfRectangle *src1,
                                     const GfRectangle *src2);

gboolean gf_rectangle_vert_overlap  (const GfRectangle *rect1,
                                     const GfRectangle *rect2);

gboolean gf_rectangle_horiz_overlap (const GfRectangle *rect1,
                                     const GfRectangle *rect2);

gboolean gf_rectangle_contains_rect (const GfRectangle *outer_rect,
                                     const GfRectangle *inner_rect);

G_END_DECLS

#endif