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>
* gdk/x11/gdktestutils-x11.c:

View File

@ -450,7 +450,7 @@ PtsToRegion (int numFullPtBlocks,
/**
* 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 @@ PtsToRegion (int numFullPtBlocks,
* 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 @@ gdk_region_polygon (const GdkPoint *Pts,
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 @@ gdk_region_polygon (const GdkPoint *Pts,
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
*/

View File

@ -644,14 +644,14 @@ gdk_colors_free (GdkColormap *colormap,
* 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 @@ gdk_colormap_free_colors (GdkColormap *colormap,
(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 @@ gdk_colormap_alloc_colors_pseudocolor (GdkColormap *colormap,
* @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 @@ gdk_colormap_alloc_colors_pseudocolor (GdkColormap *colormap,
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 @@ gdk_colormap_alloc_colors (GdkColormap *colormap,
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 @@ gdk_colormap_alloc_colors (GdkColormap *colormap,
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 @@ gdk_colormap_alloc_colors (GdkColormap *colormap,
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 @@ gdk_colormap_alloc_colors (GdkColormap *colormap,
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;

View File

@ -719,7 +719,7 @@ _gdk_keymap_keys_changed (GdkDisplay *display)
*
* 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.
**/