2002-10-29 Matthias Clasen <maclas@gmx.de>
+ * gdk/x11/gdkcolor-x11.c (gdk_colors_free): Use the same parameter
+ names in header, docs and implementation.
+
+ * gdk/gdkcolor.c (gdk_colors_store): Doc comment fix.
+
+ * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Fix
+ example in doc comment.
+
* gtk/gtkiconfactory.c (gtk_icon_size_lookup_for_settings):
* gtk/gtkfilesel.c (gtk_file_selection_get_selections): Doc
comment fixes. (#97136, #97125, Vitaly Tishkov)
2002-10-29 Matthias Clasen <maclas@gmx.de>
+ * gdk/x11/gdkcolor-x11.c (gdk_colors_free): Use the same parameter
+ names in header, docs and implementation.
+
+ * gdk/gdkcolor.c (gdk_colors_store): Doc comment fix.
+
+ * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Fix
+ example in doc comment.
+
* gtk/gtkiconfactory.c (gtk_icon_size_lookup_for_settings):
* gtk/gtkfilesel.c (gtk_file_selection_get_selections): Doc
comment fixes. (#97136, #97125, Vitaly Tishkov)
2002-10-29 Matthias Clasen <maclas@gmx.de>
+ * gdk/x11/gdkcolor-x11.c (gdk_colors_free): Use the same parameter
+ names in header, docs and implementation.
+
+ * gdk/gdkcolor.c (gdk_colors_store): Doc comment fix.
+
+ * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Fix
+ example in doc comment.
+
* gtk/gtkiconfactory.c (gtk_icon_size_lookup_for_settings):
* gtk/gtkfilesel.c (gtk_file_selection_get_selections): Doc
comment fixes. (#97136, #97125, Vitaly Tishkov)
2002-10-29 Matthias Clasen <maclas@gmx.de>
+ * gdk/x11/gdkcolor-x11.c (gdk_colors_free): Use the same parameter
+ names in header, docs and implementation.
+
+ * gdk/gdkcolor.c (gdk_colors_store): Doc comment fix.
+
+ * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Fix
+ example in doc comment.
+
* gtk/gtkiconfactory.c (gtk_icon_size_lookup_for_settings):
* gtk/gtkfilesel.c (gtk_file_selection_get_selections): Doc
comment fixes. (#97136, #97125, Vitaly Tishkov)
2002-10-29 Matthias Clasen <maclas@gmx.de>
+ * gdk/x11/gdkcolor-x11.c (gdk_colors_free): Use the same parameter
+ names in header, docs and implementation.
+
+ * gdk/gdkcolor.c (gdk_colors_store): Doc comment fix.
+
+ * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Fix
+ example in doc comment.
+
* gtk/gtkiconfactory.c (gtk_icon_size_lookup_for_settings):
* gtk/gtkfilesel.c (gtk_file_selection_get_selections): Doc
comment fixes. (#97136, #97125, Vitaly Tishkov)
2002-10-29 Matthias Clasen <maclas@gmx.de>
+ * gdk/x11/gdkcolor-x11.c (gdk_colors_free): Use the same parameter
+ names in header, docs and implementation.
+
+ * gdk/gdkcolor.c (gdk_colors_store): Doc comment fix.
+
+ * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Fix
+ example in doc comment.
+
* gtk/gtkiconfactory.c (gtk_icon_size_lookup_for_settings):
* gtk/gtkfilesel.c (gtk_file_selection_get_selections): Doc
comment fixes. (#97136, #97125, Vitaly Tishkov)
* Changes the value of the first @ncolors colors in
* a private colormap. This function is obsolete and
* should not be used. See gdk_color_change().
- *
- * Return value:
**/
void
gdk_colors_store (GdkColormap *colormap,
/**
* gdk_colors_free:
* @colormap: a #GdkColormap.
- * @in_pixels: the pixel values of the colors to free.
- * @in_npixels: the number of values in @pixels.
+ * @pixels: the pixel values of the colors to free.
+ * @npixels: the number of values in @pixels.
* @planes: the plane masks for all planes to free, OR'd together.
*
* Frees colors allocated with gdk_colors_alloc(). This
**/
void
gdk_colors_free (GdkColormap *colormap,
- gulong *in_pixels,
- gint in_npixels,
+ gulong *pixels,
+ gint npixels,
gulong planes)
{
GdkColormapPrivateX11 *private;
- gulong *pixels;
- gint npixels = 0;
+ gulong *pixels_to_free;
+ gint npixels_to_free = 0;
gint i;
g_return_if_fail (GDK_IS_COLORMAP (colormap));
- g_return_if_fail (in_pixels != NULL);
+ g_return_if_fail (pixels != NULL);
private = GDK_COLORMAP_PRIVATE_DATA (colormap);
(colormap->visual->type != GDK_VISUAL_GRAYSCALE))
return;
- pixels = g_new (gulong, in_npixels);
+ pixels_to_free = g_new (gulong, npixels);
- for (i=0; i<in_npixels; i++)
+ for (i=0; i<npixels; i++)
{
- gulong pixel = in_pixels[i];
+ gulong pixel = pixels[i];
if (private->info[pixel].ref_count)
{
if (private->info[pixel].ref_count == 0)
{
- pixels[npixels++] = pixel;
+ pixels_to_free[npixels_to_free++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colormap->colors[pixel]);
private->info[pixel].flags = 0;
}
}
- if (npixels && !private->screen->closed)
+ if (npixels_to_free && !private->screen->closed)
XFreeColors (GDK_SCREEN_XDISPLAY (private->screen), private->xcolormap,
- pixels, npixels, planes);
- g_free (pixels);
+ pixels_to_free, npixels_to_free, planes);
+ g_free (pixels_to_free);
}
/* This is almost identical to gdk_colors_free.
* 0x80, 0x01, 0x40, 0x02, 0x20, 0x04, 0x10, 0x08, 0x08, 0x10, 0x04, 0x20,
* 0x82, 0x41, 0x41, 0x82, 0x41, 0x82, 0x82, 0x41, 0x04, 0x20, 0x08, 0x10,
* 0x10, 0x08, 0x20, 0x04, 0x40, 0x02, 0x80, 0x01};
- *
+ *
* static unsigned char cursor1mask_bits[] = {
* 0x80, 0x01, 0xc0, 0x03, 0x60, 0x06, 0x30, 0x0c, 0x18, 0x18, 0x8c, 0x31,
* 0xc6, 0x63, 0x63, 0xc6, 0x63, 0xc6, 0xc6, 0x63, 0x8c, 0x31, 0x18, 0x18,
* 0x30, 0x0c, 0x60, 0x06, 0xc0, 0x03, 0x80, 0x01};
- *
- *
+ *
+ *
* GdkCursor *cursor;
* GdkPixmap *source, *mask;
* GdkColor fg = { 0, 65535, 0, 0 }; /<!-- -->* Red. *<!-- -->/
* GdkColor bg = { 0, 0, 0, 65535 }; /<!-- -->* Blue. *<!-- -->/
- *
- *
+ *
+ *
* source = gdk_bitmap_create_from_data (NULL, cursor1_bits,
* cursor1_width, cursor1_height);
* mask = gdk_bitmap_create_from_data (NULL, cursor1mask_bits,
* cursor = gdk_cursor_new_from_pixmap (source, mask, &fg, &bg, 8, 8);
* gdk_pixmap_unref (source);
* gdk_pixmap_unref (mask);
- *
- *
+ *
+ *
* gdk_window_set_cursor (widget->window, cursor);
* </programlisting>
* </example>