/usr/include/gdkmm-2.4/gdkmm/region.h is in libgtkmm-2.4-dev 1:2.24.5-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | // -*- c++ -*-
// Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
#ifndef _GDKMM_REGION_H
#define _GDKMM_REGION_H
#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>
/* $Id: region.hg,v 1.3 2004/02/03 11:06:48 murrayc Exp $ */
/* region.h
*
* Copyright (C) 1998-2002 The gtkmm Development Team
*
* This library 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 library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
// We use GdkSpanFunc in the (deprecated) API, so we must temporarily undef GDK_DISABLE_DEPRECATED.
// We shouldn't have used that C type in the API anyway, but we can't break API.
// Temporarily undef GDK_DISABLE_DEPRECATED, redefining it later if appropriate.
// We need this to use _GtkBoxChild, which we use in our (deprecated) API.
#if defined(GDK_DISABLE_DEPRECATED) && !defined(GTKMM_GDK_DISABLE_DEPRECATED_UNDEFED)
#undef GDK_DISABLE_DEPRECATED
#define GTKMM_GDK_DISABLE_DEPRECATED_UNDEFED 1
#endif
// This is for dragcontext which is often included after color.h, which we can't avoid.
// We use GdkDragContext members in the (deprecated) API, for which there are no replacements,
// so we must temporarily undef GSEAL_ENABLE.
// Temporarily undef GSEAL_ENABLE, redefining it later if appropriate.
#if defined(GSEAL_ENABLE) && !defined(GTKMM_GSEAL_ENABLE_UNDEFED)
#undef GSEAL_ENABLE
#define GTKMM_GSEAL_ENABLE_UNDEFED 1
#endif
#include <gdk/gdk.h>
// Redefine GDK_DISABLE_DEPRECATED if it was defined before we temporarily undefed it:
#if defined(GTKMM_GDK_DISABLE_DEPRECATED_UNDEFED)
#define GDK_DISABLE_DEPRECATED 1
#undef GTKMM_GDK_DISABLE_DEPRECATED_UNDEFED
#endif
// Redefine GSEAL_ENABLE if it was defined before we temporarily undefed it:
#if defined(GTKMM_GSEAL_ENABLE_UNDEFED)
#define GSEAL_ENABLE 1
#undef GTKMM_GSEAL_ENABLE_UNDEFED
#endif
extern "C" { typedef struct _GdkRegion GdkRegion; }
#include <glibmm/arrayhandle.h>
#include <gdkmm/types.h>
#include <gdkmm/rectangle.h>
namespace Gdk
{
/** @addtogroup gdkmmEnums gdkmm Enums and Flags */
/**
*
* @ingroup gdkmmEnums
*/
enum FillRule
{
EVEN_ODD_RULE,
WINDING_RULE
};
} // namespace Gdk
#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Glib
{
template <>
class Value<Gdk::FillRule> : public Glib::Value_Enum<Gdk::FillRule>
{
public:
static GType value_type() G_GNUC_CONST;
};
} // namespace Glib
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gdk
{
/**
*
* @ingroup gdkmmEnums
*/
enum OverlapType
{
OVERLAP_RECTANGLE_IN,
OVERLAP_RECTANGLE_OUT,
OVERLAP_RECTANGLE_PART
};
} // namespace Gdk
#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Glib
{
template <>
class Value<Gdk::OverlapType> : public Glib::Value_Enum<Gdk::OverlapType>
{
public:
static GType value_type() G_GNUC_CONST;
};
} // namespace Glib
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gdk
{
/** This is an opaque data type holding a set of arbitrary pixels, and is usually used for clipping graphical operations
* (see Gdk::GC::set_clip_region()).
*/
class Region
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Region CppObjectType;
typedef GdkRegion BaseObjectType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
/** Constructs an invalid object.
* E.g. for output arguments to methods. There is not much you can do with
* the object before it has been assigned a valid value.
*/
Region();
// Use make_a_copy=true when getting it directly from a struct.
explicit Region(GdkRegion* castitem, bool make_a_copy = false);
Region(const Region& src);
Region& operator=(const Region& src);
~Region();
GdkRegion* gobj() { return gobject_; }
const GdkRegion* gobj() const { return gobject_; }
///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
GdkRegion* gobj_copy() const;
protected:
GdkRegion* gobject_;
private:
public:
Region(const Glib::ArrayHandle<Gdk::Point>& points, FillRule fill_rule);
explicit Region(const Rectangle& rectangle);
/** Obtains the smallest rectangle which includes the entire Gdk::Region.
*
* @param rectangle Return location for the clipbox.
*/
void get_clipbox(const Rectangle& rectangle);
Glib::ArrayHandle<Rectangle> get_rectangles() const;
/** Finds out if the Gdk::Region is empty.
*
* @return <tt>true</tt> if @a region is empty.
*/
bool empty();
/** Finds out if a point is in a region.
*
* @param x The x coordinate of a point.
* @param y The y coordinate of a point.
* @return <tt>true</tt> if the point is in @a region.
*/
bool point_in(int x, int y);
/** Tests whether a rectangle is within a region.
*
* @param rectangle A Gdk::Rectangle.
* @return Gdk::OVERLAP_RECTANGLE_IN, Gdk::OVERLAP_RECTANGLE_OUT, or
* Gdk::OVERLAP_RECTANGLE_PART, depending on whether the rectangle is inside,
* outside, or partly inside the Gdk::Region, respectively.
*/
OverlapType rect_in(const Rectangle& rect);
/** Moves a region the specified distance.
*
* @param dx The distance to move the region horizontally.
* @param dy The distance to move the region vertically.
*/
void offset(int dx, int dy);
/** Resizes a region by the specified amount.
* Positive values shrink the region. Negative values expand it.
*
* Deprecated: 2.22: There is no replacement for this function.
*
* @param dx The number of pixels to shrink the region horizontally.
* @param dy The number of pixels to shrink the region vertically.
*/
void shrink(int dx, int dy);
/** Sets the area of @a region to the union of the areas of @a region and
* @a rect. The resulting area is the set of pixels contained in
* either @a region or @a rect.
*
* @param rect A Gdk::Rectangle.
*/
void union_with_rect(const Rectangle& rect);
/** Sets the area of @a source1 to the intersection of the areas of @a source1
* and @a source2. The resulting area is the set of pixels contained in
* both @a source1 and @a source2.
*
* @param source2 Another Gdk::Region.
*/
void intersect(const Region& source2);
/** Sets the area of @a source1 to the union of the areas of @a source1 and
* @a source2. The resulting area is the set of pixels contained in
* either @a source1 or @a source2.
*
* @param source2 A Gdk::Region.
*/
void union_(const Region& source2); //union is a keyword.
/** Subtracts the area of @a source2 from the area @a source1. The resulting
* area is the set of pixels contained in @a source1 but not in @a source2.
*
* @param source2 Another Gdk::Region.
*/
void subtract(const Region& source2);
/** Sets the area of @a source1 to the exclusive-OR of the areas of @a source1
* and @a source2. The resulting area is the set of pixels contained in one
* or the other of the two sources but not in both.
*
* @param source2 Another Gdk::Region.
*/
void xor_(const Region& source2); //xor is a keyword
//Note: The spans parameter was made const in GTK+ 2.16, but we can't change that in our C++ API. TODO: Change it when we can do an ABI break.
/** Calls a function on each span in the intersection of @a region and @a spans.
*
* Deprecated: 2.22: There is no replacement.
*
* @param spans An array of Gdk::Spans.
* @param n_spans The length of @a spans.
* @param sorted <tt>true</tt> if @a spans is sorted wrt. the y coordinate.
* @param function Function to call on each span in the intersection.
* @param data Data to pass to @a function.
*/
void spans_intersect_foreach(GdkSpan* spans, int n_spans, bool sorted, GdkSpanFunc function, gpointer data);
};
} //namespace Gdk
namespace Gdk
{
/** @relates Gdk::Region
* @param lhs The left-hand side
* @param rhs The right-hand side
* @result The result
*/
bool operator==(const Region& lhs, const Region& rhs);
/** @relates Gdk::Region
* @param lhs The left-hand side
* @param rhs The right-hand side
* @result The result
*/
bool operator!=(const Region& lhs, const Region& rhs);
} // namespace Gdk
namespace Glib
{
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates Gdk::Region
*/
Gdk::Region wrap(GdkRegion* object, bool take_copy = false);
} // namespace Glib
#endif /* _GDKMM_REGION_H */
|