gtk+ r19579 - in trunk: . gdk gdk/x11
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r19579 - in trunk: . gdk gdk/x11
- Date: Fri, 15 Feb 2008 19:02:44 +0000 (GMT)
Author: matthiasc
Date: Fri Feb 15 19:02:44 2008
New Revision: 19579
URL: http://svn.gnome.org/viewvc/gtk+?rev=19579&view=rev
Log:
2008-02-15 Matthias Clasen <mclasen redhat com>
* gdk/x11/gdkkeys-x11.c:
* gdk/x11/gdkcolor-x11.c:
* gdk/gdkpolyreg-generic.c: Fix a small doc issues.
Modified:
trunk/ChangeLog
trunk/gdk/gdkpolyreg-generic.c
trunk/gdk/x11/gdkcolor-x11.c
trunk/gdk/x11/gdkkeys-x11.c
Modified: trunk/gdk/gdkpolyreg-generic.c
==============================================================================
--- trunk/gdk/gdkpolyreg-generic.c (original)
+++ trunk/gdk/gdkpolyreg-generic.c Fri Feb 15 19:02:44 2008
@@ -450,7 +450,7 @@
/**
* gdk_region_polygon:
* @points: an array of #GdkPoint structs
- * @npoints: the number of elements in the @points array
+ * @n_points: the number of elements in the @points array
* @fill_rule: specifies which pixels are included in the region when the
* polygon overlaps itself.
*
@@ -460,9 +460,9 @@
* Returns: a new #GdkRegion based on the given polygon
*/
GdkRegion *
-gdk_region_polygon (const GdkPoint *Pts,
- gint Count,
- GdkFillRule rule)
+gdk_region_polygon (const GdkPoint *points,
+ gint n_points,
+ GdkFillRule fill_rule)
{
GdkRegion *region;
EdgeTableEntry *pAET; /* Active Edge Table */
@@ -484,20 +484,20 @@
region = gdk_region_new ();
/* special case a rectangle */
- if (((Count == 4) ||
- ((Count == 5) && (Pts[4].x == Pts[0].x) && (Pts[4].y == Pts[0].y))) &&
- (((Pts[0].y == Pts[1].y) &&
- (Pts[1].x == Pts[2].x) &&
- (Pts[2].y == Pts[3].y) &&
- (Pts[3].x == Pts[0].x)) ||
- ((Pts[0].x == Pts[1].x) &&
- (Pts[1].y == Pts[2].y) &&
- (Pts[2].x == Pts[3].x) &&
- (Pts[3].y == Pts[0].y)))) {
- region->extents.x1 = MIN(Pts[0].x, Pts[2].x);
- region->extents.y1 = MIN(Pts[0].y, Pts[2].y);
- region->extents.x2 = MAX(Pts[0].x, Pts[2].x);
- region->extents.y2 = MAX(Pts[0].y, Pts[2].y);
+ if (((n_points == 4) ||
+ ((n_points == 5) && (points[4].x == points[0].x) && (points[4].y == points[0].y))) &&
+ (((points[0].y == points[1].y) &&
+ (points[1].x == points[2].x) &&
+ (points[2].y == points[3].y) &&
+ (points[3].x == points[0].x)) ||
+ ((points[0].x == points[1].x) &&
+ (points[1].y == points[2].y) &&
+ (points[2].x == points[3].x) &&
+ (points[3].y == points[0].y)))) {
+ region->extents.x1 = MIN(points[0].x, points[2].x);
+ region->extents.y1 = MIN(points[0].y, points[2].y);
+ region->extents.x2 = MAX(points[0].x, points[2].x);
+ region->extents.y2 = MAX(points[0].y, points[2].y);
if ((region->extents.x1 != region->extents.x2) &&
(region->extents.y1 != region->extents.y2)) {
region->numRects = 1;
@@ -506,14 +506,14 @@
return(region);
}
- pETEs = g_new (EdgeTableEntry, Count);
+ pETEs = g_new (EdgeTableEntry, n_points);
pts = FirstPtBlock.pts;
- CreateETandAET(Count, Pts, &ET, &AET, pETEs, &SLLBlock);
+ CreateETandAET(n_points, points, &ET, &AET, pETEs, &SLLBlock);
pSLL = ET.scanlines.next;
curPtBlock = &FirstPtBlock;
- if (rule == GDK_EVEN_ODD_RULE) {
+ if (fill_rule == GDK_EVEN_ODD_RULE) {
/*
* for each scanline
*/
Modified: trunk/gdk/x11/gdkcolor-x11.c
==============================================================================
--- trunk/gdk/x11/gdkcolor-x11.c (original)
+++ trunk/gdk/x11/gdkcolor-x11.c Fri Feb 15 19:02:44 2008
@@ -644,14 +644,14 @@
* gdk_colormap_free_colors:
* @colormap: a #GdkColormap.
* @colors: the colors to free.
- * @ncolors: the number of colors in @colors.
+ * @n_colors: the number of colors in @colors.
*
* Frees previously allocated colors.
**/
void
gdk_colormap_free_colors (GdkColormap *colormap,
const GdkColor *colors,
- gint ncolors)
+ gint n_colors)
{
GdkColormapPrivateX11 *private;
gulong *pixels;
@@ -667,9 +667,9 @@
(colormap->visual->type != GDK_VISUAL_GRAYSCALE))
return;
- pixels = g_new (gulong, ncolors);
+ pixels = g_new (gulong, n_colors);
- for (i = 0; i < ncolors; i++)
+ for (i = 0; i < n_colors; i++)
{
gulong pixel = colors[i].pixel;
@@ -1038,7 +1038,7 @@
* @colormap: a #GdkColormap.
* @colors: The color values to allocate. On return, the pixel
* values for allocated colors will be filled in.
- * @ncolors: The number of colors in @colors.
+ * @n_colors: The number of colors in @colors.
* @writeable: If %TRUE, the colors are allocated writeable
* (their values can later be changed using gdk_color_change()).
* Writeable colors cannot be shared between applications.
@@ -1056,7 +1056,7 @@
gint
gdk_colormap_alloc_colors (GdkColormap *colormap,
GdkColor *colors,
- gint ncolors,
+ gint n_colors,
gboolean writeable,
gboolean best_match,
gboolean *success)
@@ -1067,16 +1067,16 @@
gint nremaining = 0;
XColor xcolor;
- g_return_val_if_fail (GDK_IS_COLORMAP (colormap), ncolors);
- g_return_val_if_fail (colors != NULL, ncolors);
- g_return_val_if_fail (success != NULL, ncolors);
+ g_return_val_if_fail (GDK_IS_COLORMAP (colormap), n_colors);
+ g_return_val_if_fail (colors != NULL, n_colors);
+ g_return_val_if_fail (success != NULL, n_colors);
private = GDK_COLORMAP_PRIVATE_DATA (colormap);
if (private->screen->closed)
- return ncolors;
+ return n_colors;
- for (i = 0; i < ncolors; i++)
+ for (i = 0; i < n_colors; i++)
success[i] = FALSE;
switch (colormap->visual->type)
@@ -1084,10 +1084,10 @@
case GDK_VISUAL_PSEUDO_COLOR:
case GDK_VISUAL_GRAYSCALE:
if (writeable)
- return gdk_colormap_alloc_colors_writeable (colormap, colors, ncolors,
+ return gdk_colormap_alloc_colors_writeable (colormap, colors, n_colors,
writeable, best_match, success);
else
- return gdk_colormap_alloc_colors_pseudocolor (colormap, colors, ncolors,
+ return gdk_colormap_alloc_colors_pseudocolor (colormap, colors, n_colors,
writeable, best_match, success);
break;
@@ -1095,7 +1095,7 @@
case GDK_VISUAL_TRUE_COLOR:
visual = colormap->visual;
- for (i = 0; i < ncolors; i++)
+ for (i = 0; i < n_colors; i++)
{
/* If bits not used for color are used for something other than padding,
* it's likely alpha, so we set them to 1s.
@@ -1119,7 +1119,7 @@
break;
case GDK_VISUAL_STATIC_GRAY:
case GDK_VISUAL_STATIC_COLOR:
- for (i = 0; i < ncolors; i++)
+ for (i = 0; i < n_colors; i++)
{
xcolor.red = colors[i].red;
xcolor.green = colors[i].green;
Modified: trunk/gdk/x11/gdkkeys-x11.c
==============================================================================
--- trunk/gdk/x11/gdkkeys-x11.c (original)
+++ trunk/gdk/x11/gdkkeys-x11.c Fri Feb 15 19:02:44 2008
@@ -719,7 +719,7 @@
*
* Returns the direction of effective layout of the keymap.
*
- * @Returns: %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL
+ * Returns: %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL
* if it can determine the direction. %PANGO_DIRECTION_NEUTRAL
* otherwise.
**/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]