Fix a small doc issues.

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.


svn path=/trunk/; revision=19579
This commit is contained in:
Matthias Clasen
2008-02-15 19:02:44 +00:00
committed by Matthias Clasen
parent 66f0e87506
commit 741cd0e2ae
4 changed files with 43 additions and 37 deletions

View File

@@ -1,3 +1,9 @@
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.
2008-02-15 Matthias Clasen <mclasen@redhat.com> 2008-02-15 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdktestutils-x11.c: * gdk/x11/gdktestutils-x11.c:

View File

@@ -450,7 +450,7 @@ PtsToRegion (int numFullPtBlocks,
/** /**
* gdk_region_polygon: * gdk_region_polygon:
* @points: an array of #GdkPoint structs * @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 * @fill_rule: specifies which pixels are included in the region when the
* polygon overlaps itself. * polygon overlaps itself.
* *
@@ -460,9 +460,9 @@ PtsToRegion (int numFullPtBlocks,
* Returns: a new #GdkRegion based on the given polygon * Returns: a new #GdkRegion based on the given polygon
*/ */
GdkRegion * GdkRegion *
gdk_region_polygon (const GdkPoint *Pts, gdk_region_polygon (const GdkPoint *points,
gint Count, gint n_points,
GdkFillRule rule) GdkFillRule fill_rule)
{ {
GdkRegion *region; GdkRegion *region;
EdgeTableEntry *pAET; /* Active Edge Table */ EdgeTableEntry *pAET; /* Active Edge Table */
@@ -484,20 +484,20 @@ gdk_region_polygon (const GdkPoint *Pts,
region = gdk_region_new (); region = gdk_region_new ();
/* special case a rectangle */ /* special case a rectangle */
if (((Count == 4) || if (((n_points == 4) ||
((Count == 5) && (Pts[4].x == Pts[0].x) && (Pts[4].y == Pts[0].y))) && ((n_points == 5) && (points[4].x == points[0].x) && (points[4].y == points[0].y))) &&
(((Pts[0].y == Pts[1].y) && (((points[0].y == points[1].y) &&
(Pts[1].x == Pts[2].x) && (points[1].x == points[2].x) &&
(Pts[2].y == Pts[3].y) && (points[2].y == points[3].y) &&
(Pts[3].x == Pts[0].x)) || (points[3].x == points[0].x)) ||
((Pts[0].x == Pts[1].x) && ((points[0].x == points[1].x) &&
(Pts[1].y == Pts[2].y) && (points[1].y == points[2].y) &&
(Pts[2].x == Pts[3].x) && (points[2].x == points[3].x) &&
(Pts[3].y == Pts[0].y)))) { (points[3].y == points[0].y)))) {
region->extents.x1 = MIN(Pts[0].x, Pts[2].x); region->extents.x1 = MIN(points[0].x, points[2].x);
region->extents.y1 = MIN(Pts[0].y, Pts[2].y); region->extents.y1 = MIN(points[0].y, points[2].y);
region->extents.x2 = MAX(Pts[0].x, Pts[2].x); region->extents.x2 = MAX(points[0].x, points[2].x);
region->extents.y2 = MAX(Pts[0].y, Pts[2].y); region->extents.y2 = MAX(points[0].y, points[2].y);
if ((region->extents.x1 != region->extents.x2) && if ((region->extents.x1 != region->extents.x2) &&
(region->extents.y1 != region->extents.y2)) { (region->extents.y1 != region->extents.y2)) {
region->numRects = 1; region->numRects = 1;
@@ -506,14 +506,14 @@ gdk_region_polygon (const GdkPoint *Pts,
return(region); return(region);
} }
pETEs = g_new (EdgeTableEntry, Count); pETEs = g_new (EdgeTableEntry, n_points);
pts = FirstPtBlock.pts; pts = FirstPtBlock.pts;
CreateETandAET(Count, Pts, &ET, &AET, pETEs, &SLLBlock); CreateETandAET(n_points, points, &ET, &AET, pETEs, &SLLBlock);
pSLL = ET.scanlines.next; pSLL = ET.scanlines.next;
curPtBlock = &FirstPtBlock; curPtBlock = &FirstPtBlock;
if (rule == GDK_EVEN_ODD_RULE) { if (fill_rule == GDK_EVEN_ODD_RULE) {
/* /*
* for each scanline * for each scanline
*/ */

View File

@@ -644,14 +644,14 @@ gdk_colors_free (GdkColormap *colormap,
* gdk_colormap_free_colors: * gdk_colormap_free_colors:
* @colormap: a #GdkColormap. * @colormap: a #GdkColormap.
* @colors: the colors to free. * @colors: the colors to free.
* @ncolors: the number of colors in @colors. * @n_colors: the number of colors in @colors.
* *
* Frees previously allocated colors. * Frees previously allocated colors.
**/ **/
void void
gdk_colormap_free_colors (GdkColormap *colormap, gdk_colormap_free_colors (GdkColormap *colormap,
const GdkColor *colors, const GdkColor *colors,
gint ncolors) gint n_colors)
{ {
GdkColormapPrivateX11 *private; GdkColormapPrivateX11 *private;
gulong *pixels; gulong *pixels;
@@ -667,9 +667,9 @@ gdk_colormap_free_colors (GdkColormap *colormap,
(colormap->visual->type != GDK_VISUAL_GRAYSCALE)) (colormap->visual->type != GDK_VISUAL_GRAYSCALE))
return; 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; gulong pixel = colors[i].pixel;
@@ -1038,7 +1038,7 @@ gdk_colormap_alloc_colors_pseudocolor (GdkColormap *colormap,
* @colormap: a #GdkColormap. * @colormap: a #GdkColormap.
* @colors: The color values to allocate. On return, the pixel * @colors: The color values to allocate. On return, the pixel
* values for allocated colors will be filled in. * 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 * @writeable: If %TRUE, the colors are allocated writeable
* (their values can later be changed using gdk_color_change()). * (their values can later be changed using gdk_color_change()).
* Writeable colors cannot be shared between applications. * Writeable colors cannot be shared between applications.
@@ -1056,7 +1056,7 @@ gdk_colormap_alloc_colors_pseudocolor (GdkColormap *colormap,
gint gint
gdk_colormap_alloc_colors (GdkColormap *colormap, gdk_colormap_alloc_colors (GdkColormap *colormap,
GdkColor *colors, GdkColor *colors,
gint ncolors, gint n_colors,
gboolean writeable, gboolean writeable,
gboolean best_match, gboolean best_match,
gboolean *success) gboolean *success)
@@ -1067,16 +1067,16 @@ gdk_colormap_alloc_colors (GdkColormap *colormap,
gint nremaining = 0; gint nremaining = 0;
XColor xcolor; XColor xcolor;
g_return_val_if_fail (GDK_IS_COLORMAP (colormap), ncolors); g_return_val_if_fail (GDK_IS_COLORMAP (colormap), n_colors);
g_return_val_if_fail (colors != NULL, ncolors); g_return_val_if_fail (colors != NULL, n_colors);
g_return_val_if_fail (success != NULL, ncolors); g_return_val_if_fail (success != NULL, n_colors);
private = GDK_COLORMAP_PRIVATE_DATA (colormap); private = GDK_COLORMAP_PRIVATE_DATA (colormap);
if (private->screen->closed) 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; success[i] = FALSE;
switch (colormap->visual->type) switch (colormap->visual->type)
@@ -1084,10 +1084,10 @@ gdk_colormap_alloc_colors (GdkColormap *colormap,
case GDK_VISUAL_PSEUDO_COLOR: case GDK_VISUAL_PSEUDO_COLOR:
case GDK_VISUAL_GRAYSCALE: case GDK_VISUAL_GRAYSCALE:
if (writeable) 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); writeable, best_match, success);
else else
return gdk_colormap_alloc_colors_pseudocolor (colormap, colors, ncolors, return gdk_colormap_alloc_colors_pseudocolor (colormap, colors, n_colors,
writeable, best_match, success); writeable, best_match, success);
break; break;
@@ -1095,7 +1095,7 @@ gdk_colormap_alloc_colors (GdkColormap *colormap,
case GDK_VISUAL_TRUE_COLOR: case GDK_VISUAL_TRUE_COLOR:
visual = colormap->visual; 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, /* If bits not used for color are used for something other than padding,
* it's likely alpha, so we set them to 1s. * it's likely alpha, so we set them to 1s.
@@ -1119,7 +1119,7 @@ gdk_colormap_alloc_colors (GdkColormap *colormap,
break; break;
case GDK_VISUAL_STATIC_GRAY: case GDK_VISUAL_STATIC_GRAY:
case GDK_VISUAL_STATIC_COLOR: case GDK_VISUAL_STATIC_COLOR:
for (i = 0; i < ncolors; i++) for (i = 0; i < n_colors; i++)
{ {
xcolor.red = colors[i].red; xcolor.red = colors[i].red;
xcolor.green = colors[i].green; xcolor.green = colors[i].green;

View File

@@ -719,7 +719,7 @@ _gdk_keymap_keys_changed (GdkDisplay *display)
* *
* Returns the direction of effective layout of the keymap. * 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 * if it can determine the direction. %PANGO_DIRECTION_NEUTRAL
* otherwise. * otherwise.
**/ **/