mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
8860615d9a
2001-03-02 Havoc Pennington <hp@redhat.com> * gdk/x11/gdkgc-x11.c (_gdk_x11_gc_flush): use _gdk_region_get_xrectangles() * gdk/x11/gdkmain-x11.c (_gdk_region_get_xrectangles): new function * gtk/testgtk.c (create_shapes): add test for shape_combine_region * gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_region): new function, contributed by Ron Steinke * gdk/x11/gdkevents-x11.c (gdk_wmspec_supported): rename gdk_net_wm_supports * gdk/gdkregion-generic.c (gdk_region_get_rectangles): New function, contributed by Ron Steinke * gtk/gtkentry.c (gtk_entry_get_layout_offsets): New function, used to line up the text in the entry when using the entry for editable sheet cell hacks * gtk/testgtk.c (create_entry): test the activate_default setting on GtkEntry * gtk/gtkentry.c (gtk_entry_set_activates_default): New function to cause the entry to activate the default button for a dialog when activated (gtk_entry_get_activates_default): new function
88 lines
2.5 KiB
C
88 lines
2.5 KiB
C
#ifndef __GDK_REGION_H__
|
|
#define __GDK_REGION_H__
|
|
|
|
#include <gdk/gdktypes.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif /* __cplusplus */
|
|
|
|
/* GC fill rule for polygons
|
|
* EvenOddRule
|
|
* WindingRule
|
|
*/
|
|
typedef enum
|
|
{
|
|
GDK_EVEN_ODD_RULE,
|
|
GDK_WINDING_RULE
|
|
} GdkFillRule;
|
|
|
|
/* Types of overlapping between a rectangle and a region
|
|
* GDK_OVERLAP_RECTANGLE_IN: rectangle is in region
|
|
* GDK_OVERLAP_RECTANGLE_OUT: rectangle in not in region
|
|
* GDK_OVERLAP_RECTANGLE_PART: rectangle in partially in region
|
|
*/
|
|
typedef enum
|
|
{
|
|
GDK_OVERLAP_RECTANGLE_IN,
|
|
GDK_OVERLAP_RECTANGLE_OUT,
|
|
GDK_OVERLAP_RECTANGLE_PART
|
|
} GdkOverlapType;
|
|
|
|
typedef void (*GdkSpanFunc) (GdkSpan *span,
|
|
gpointer data);
|
|
|
|
GdkRegion *gdk_region_new (void);
|
|
GdkRegion *gdk_region_polygon (GdkPoint *points,
|
|
gint npoints,
|
|
GdkFillRule fill_rule);
|
|
GdkRegion *gdk_region_copy (GdkRegion *region);
|
|
GdkRegion *gdk_region_rectangle (GdkRectangle *rectangle);
|
|
void gdk_region_destroy (GdkRegion *region);
|
|
|
|
void gdk_region_get_clipbox (GdkRegion *region,
|
|
GdkRectangle *rectangle);
|
|
void gdk_region_get_rectangles (GdkRegion *region,
|
|
GdkRectangle **rectangles,
|
|
gint *n_rectangles);
|
|
|
|
gboolean gdk_region_empty (GdkRegion *region);
|
|
gboolean gdk_region_equal (GdkRegion *region1,
|
|
GdkRegion *region2);
|
|
gboolean gdk_region_point_in (GdkRegion *region,
|
|
int x,
|
|
int y);
|
|
GdkOverlapType gdk_region_rect_in (GdkRegion *region,
|
|
GdkRectangle *rect);
|
|
|
|
void gdk_region_offset (GdkRegion *region,
|
|
gint dx,
|
|
gint dy);
|
|
void gdk_region_shrink (GdkRegion *region,
|
|
gint dx,
|
|
gint dy);
|
|
void gdk_region_union_with_rect (GdkRegion *region,
|
|
GdkRectangle *rect);
|
|
void gdk_region_intersect (GdkRegion *source1,
|
|
GdkRegion *source2);
|
|
void gdk_region_union (GdkRegion *source1,
|
|
GdkRegion *source2);
|
|
void gdk_region_subtract (GdkRegion *source1,
|
|
GdkRegion *source2);
|
|
void gdk_region_xor (GdkRegion *source1,
|
|
GdkRegion *source2);
|
|
|
|
void gdk_region_spans_intersect_foreach (GdkRegion *region,
|
|
GdkSpan *spans,
|
|
int n_spans,
|
|
gboolean sorted,
|
|
GdkSpanFunc function,
|
|
gpointer data);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* __GDK_REGION_H__ */
|
|
|