summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2004-01-26 20:21:09 +0000
committerFederico Mena Quintero <federico@src.gnome.org>2004-01-26 20:21:09 +0000
commit5ebb6b04f20f98f614d890afbd864bbeec04dd5d (patch)
tree0e2bc4248da49e19d54fc90c0bf4126a95046a05
parent790106c7e75046c6d03358393d1e8b795836e24e (diff)
downloadgtk+-5ebb6b04f20f98f614d890afbd864bbeec04dd5d.tar.gz
Fix #105497; constify uses of GdkColor.
2004-01-26 Federico Mena Quintero <federico@ximian.com> Fix #105497; constify uses of GdkColor. * gdk/gdkgc.c (gdk_gc_set_rgb_fg_color): Constify. (gdk_gc_set_rgb_bg_color): Constify. (gdk_gc_set_foreground): Constify. * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Constify. * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Constify. * gdk/linux-fb/gdkcursor-fb.c (gdk_cursor_new_from_pixmap): Constify. * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_create_from_data): Constify. * gdk/win32/gdkpixmap-win32.c (gdk_pixmap_create_from_data): Constify. * gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_create_from_data): Constify. * gdk/x11/gdkwindow-x11.c (gdk_window_set_background): Constify. * gdk/win32/gdkwindow-win32.c (gdk_window_set_background): Constify. * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_background): Constify. * gdk/gdkpango.c (gdk_draw_layout_line_with_colors): Constify. (gdk_draw_layout_with_colors): Constify. * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): Constify. (gdk_pixmap_colormap_create_from_xpm): Constify. (gdk_pixmap_create_from_xpm): Constify. (gdk_pixmap_colormap_create_from_xpm_d): Constify. (gdk_pixmap_create_from_xpm_d): Constify. * gtk/gtkcellview.c (gtk_cell_view_set_background_color): Constify. * gtk/gtkclist.c (gtk_clist_set_foreground): Constify. (gtk_clist_set_background): Constify. * gtk/gtkcolorbutton.c (gtk_color_button_new_with_color): Constify. (gtk_color_button_set_color): Constify. * gtk/gtkcolorsel.c (gtk_color_selection_set_current_color): Constify and add a check for color != NULL. (gtk_color_selection_get_current_color): Add a check for color != NULL. (gtk_color_selection_set_previous_color): Constify and add a check for color != NULL. (gtk_color_selection_get_previous_color): Add a check for color != NULL. * gtk/gtkctree.c (gtk_ctree_node_set_foreground): Constify. (gtk_ctree_node_set_background): Constify. * gtk/gtktext.c (gtk_text_insert): Constify. (insert_text_property): Constify. (text_properties_equal): Constify. (new_text_property): Constify. * gtk/gtkwidget.c (gtk_widget_modify_color_component): Constify. (gtk_widget_modify_fg): Constify. (gtk_widget_modify_bg): Constify. (gtk_widget_modify_text): Constify. (gtk_widget_modify_base): Constify.
-rw-r--r--ChangeLog58
-rw-r--r--ChangeLog.pre-2-1058
-rw-r--r--ChangeLog.pre-2-458
-rw-r--r--ChangeLog.pre-2-658
-rw-r--r--ChangeLog.pre-2-858
-rw-r--r--gdk/gdkcursor.h4
-rw-r--r--gdk/gdkdrawable.h8
-rw-r--r--gdk/gdkgc.c14
-rw-r--r--gdk/gdkgc.h20
-rw-r--r--gdk/gdkpango.c8
-rw-r--r--gdk/gdkpixmap.c44
-rw-r--r--gdk/gdkpixmap.h52
-rw-r--r--gdk/gdkwindow.h2
-rw-r--r--gdk/linux-fb/gdkcursor-fb.c12
-rw-r--r--gdk/linux-fb/gdkpixmap-fb.c14
-rw-r--r--gdk/linux-fb/gdkwindow-fb.c4
-rw-r--r--gdk/win32/gdkcursor-win32.c12
-rw-r--r--gdk/win32/gdkpixmap-win32.c14
-rw-r--r--gdk/win32/gdkwindow-win32.c4
-rw-r--r--gdk/x11/gdkcursor-x11.c12
-rw-r--r--gdk/x11/gdkpixmap-x11.c14
-rw-r--r--gdk/x11/gdkwindow-x11.c4
-rw-r--r--gtk/gtkcellview.c4
-rw-r--r--gtk/gtkcellview.h2
-rw-r--r--gtk/gtkclist.c12
-rw-r--r--gtk/gtkclist.h12
-rw-r--r--gtk/gtkcolorbutton.c4
-rw-r--r--gtk/gtkcolorbutton.h4
-rw-r--r--gtk/gtkcolorsel.c8
-rw-r--r--gtk/gtkcolorsel.h4
-rw-r--r--gtk/gtkctree.c12
-rw-r--r--gtk/gtkctree.h12
-rw-r--r--gtk/gtktext.c24
-rw-r--r--gtk/gtktext.h12
-rw-r--r--gtk/gtkwidget.c32
-rw-r--r--gtk/gtkwidget.h8
36 files changed, 489 insertions, 193 deletions
diff --git a/ChangeLog b/ChangeLog
index e33c34de73..9029bf3113 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,61 @@
+2004-01-26 Federico Mena Quintero <federico@ximian.com>
+
+ Fix #105497; constify uses of GdkColor.
+
+ * gdk/gdkgc.c (gdk_gc_set_rgb_fg_color): Constify.
+ (gdk_gc_set_rgb_bg_color): Constify.
+ (gdk_gc_set_foreground): Constify.
+
+ * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/linux-fb/gdkcursor-fb.c (gdk_cursor_new_from_pixmap): Constify.
+
+ * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/win32/gdkpixmap-win32.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_create_from_data): Constify.
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_set_background): Constify.
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_background): Constify.
+ * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_background): Constify.
+
+ * gdk/gdkpango.c (gdk_draw_layout_line_with_colors): Constify.
+ (gdk_draw_layout_with_colors): Constify.
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): Constify.
+ (gdk_pixmap_colormap_create_from_xpm): Constify.
+ (gdk_pixmap_create_from_xpm): Constify.
+ (gdk_pixmap_colormap_create_from_xpm_d): Constify.
+ (gdk_pixmap_create_from_xpm_d): Constify.
+
+ * gtk/gtkcellview.c (gtk_cell_view_set_background_color): Constify.
+
+ * gtk/gtkclist.c (gtk_clist_set_foreground): Constify.
+ (gtk_clist_set_background): Constify.
+
+ * gtk/gtkcolorbutton.c (gtk_color_button_new_with_color): Constify.
+ (gtk_color_button_set_color): Constify.
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_set_current_color):
+ Constify and add a check for color != NULL.
+ (gtk_color_selection_get_current_color): Add a check for color != NULL.
+ (gtk_color_selection_set_previous_color): Constify and add a check
+ for color != NULL.
+ (gtk_color_selection_get_previous_color): Add a check for color != NULL.
+
+ * gtk/gtkctree.c (gtk_ctree_node_set_foreground): Constify.
+ (gtk_ctree_node_set_background): Constify.
+
+ * gtk/gtktext.c (gtk_text_insert): Constify.
+ (insert_text_property): Constify.
+ (text_properties_equal): Constify.
+ (new_text_property): Constify.
+
+ * gtk/gtkwidget.c (gtk_widget_modify_color_component): Constify.
+ (gtk_widget_modify_fg): Constify.
+ (gtk_widget_modify_bg): Constify.
+ (gtk_widget_modify_text): Constify.
+ (gtk_widget_modify_base): Constify.
+
2004-01-26 Christian Rose <menthos@menthos.com>
* configure.in: Added "mi" to ALL_LINGUAS.
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index e33c34de73..9029bf3113 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,61 @@
+2004-01-26 Federico Mena Quintero <federico@ximian.com>
+
+ Fix #105497; constify uses of GdkColor.
+
+ * gdk/gdkgc.c (gdk_gc_set_rgb_fg_color): Constify.
+ (gdk_gc_set_rgb_bg_color): Constify.
+ (gdk_gc_set_foreground): Constify.
+
+ * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/linux-fb/gdkcursor-fb.c (gdk_cursor_new_from_pixmap): Constify.
+
+ * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/win32/gdkpixmap-win32.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_create_from_data): Constify.
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_set_background): Constify.
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_background): Constify.
+ * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_background): Constify.
+
+ * gdk/gdkpango.c (gdk_draw_layout_line_with_colors): Constify.
+ (gdk_draw_layout_with_colors): Constify.
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): Constify.
+ (gdk_pixmap_colormap_create_from_xpm): Constify.
+ (gdk_pixmap_create_from_xpm): Constify.
+ (gdk_pixmap_colormap_create_from_xpm_d): Constify.
+ (gdk_pixmap_create_from_xpm_d): Constify.
+
+ * gtk/gtkcellview.c (gtk_cell_view_set_background_color): Constify.
+
+ * gtk/gtkclist.c (gtk_clist_set_foreground): Constify.
+ (gtk_clist_set_background): Constify.
+
+ * gtk/gtkcolorbutton.c (gtk_color_button_new_with_color): Constify.
+ (gtk_color_button_set_color): Constify.
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_set_current_color):
+ Constify and add a check for color != NULL.
+ (gtk_color_selection_get_current_color): Add a check for color != NULL.
+ (gtk_color_selection_set_previous_color): Constify and add a check
+ for color != NULL.
+ (gtk_color_selection_get_previous_color): Add a check for color != NULL.
+
+ * gtk/gtkctree.c (gtk_ctree_node_set_foreground): Constify.
+ (gtk_ctree_node_set_background): Constify.
+
+ * gtk/gtktext.c (gtk_text_insert): Constify.
+ (insert_text_property): Constify.
+ (text_properties_equal): Constify.
+ (new_text_property): Constify.
+
+ * gtk/gtkwidget.c (gtk_widget_modify_color_component): Constify.
+ (gtk_widget_modify_fg): Constify.
+ (gtk_widget_modify_bg): Constify.
+ (gtk_widget_modify_text): Constify.
+ (gtk_widget_modify_base): Constify.
+
2004-01-26 Christian Rose <menthos@menthos.com>
* configure.in: Added "mi" to ALL_LINGUAS.
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index e33c34de73..9029bf3113 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,61 @@
+2004-01-26 Federico Mena Quintero <federico@ximian.com>
+
+ Fix #105497; constify uses of GdkColor.
+
+ * gdk/gdkgc.c (gdk_gc_set_rgb_fg_color): Constify.
+ (gdk_gc_set_rgb_bg_color): Constify.
+ (gdk_gc_set_foreground): Constify.
+
+ * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/linux-fb/gdkcursor-fb.c (gdk_cursor_new_from_pixmap): Constify.
+
+ * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/win32/gdkpixmap-win32.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_create_from_data): Constify.
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_set_background): Constify.
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_background): Constify.
+ * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_background): Constify.
+
+ * gdk/gdkpango.c (gdk_draw_layout_line_with_colors): Constify.
+ (gdk_draw_layout_with_colors): Constify.
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): Constify.
+ (gdk_pixmap_colormap_create_from_xpm): Constify.
+ (gdk_pixmap_create_from_xpm): Constify.
+ (gdk_pixmap_colormap_create_from_xpm_d): Constify.
+ (gdk_pixmap_create_from_xpm_d): Constify.
+
+ * gtk/gtkcellview.c (gtk_cell_view_set_background_color): Constify.
+
+ * gtk/gtkclist.c (gtk_clist_set_foreground): Constify.
+ (gtk_clist_set_background): Constify.
+
+ * gtk/gtkcolorbutton.c (gtk_color_button_new_with_color): Constify.
+ (gtk_color_button_set_color): Constify.
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_set_current_color):
+ Constify and add a check for color != NULL.
+ (gtk_color_selection_get_current_color): Add a check for color != NULL.
+ (gtk_color_selection_set_previous_color): Constify and add a check
+ for color != NULL.
+ (gtk_color_selection_get_previous_color): Add a check for color != NULL.
+
+ * gtk/gtkctree.c (gtk_ctree_node_set_foreground): Constify.
+ (gtk_ctree_node_set_background): Constify.
+
+ * gtk/gtktext.c (gtk_text_insert): Constify.
+ (insert_text_property): Constify.
+ (text_properties_equal): Constify.
+ (new_text_property): Constify.
+
+ * gtk/gtkwidget.c (gtk_widget_modify_color_component): Constify.
+ (gtk_widget_modify_fg): Constify.
+ (gtk_widget_modify_bg): Constify.
+ (gtk_widget_modify_text): Constify.
+ (gtk_widget_modify_base): Constify.
+
2004-01-26 Christian Rose <menthos@menthos.com>
* configure.in: Added "mi" to ALL_LINGUAS.
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index e33c34de73..9029bf3113 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,61 @@
+2004-01-26 Federico Mena Quintero <federico@ximian.com>
+
+ Fix #105497; constify uses of GdkColor.
+
+ * gdk/gdkgc.c (gdk_gc_set_rgb_fg_color): Constify.
+ (gdk_gc_set_rgb_bg_color): Constify.
+ (gdk_gc_set_foreground): Constify.
+
+ * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/linux-fb/gdkcursor-fb.c (gdk_cursor_new_from_pixmap): Constify.
+
+ * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/win32/gdkpixmap-win32.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_create_from_data): Constify.
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_set_background): Constify.
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_background): Constify.
+ * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_background): Constify.
+
+ * gdk/gdkpango.c (gdk_draw_layout_line_with_colors): Constify.
+ (gdk_draw_layout_with_colors): Constify.
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): Constify.
+ (gdk_pixmap_colormap_create_from_xpm): Constify.
+ (gdk_pixmap_create_from_xpm): Constify.
+ (gdk_pixmap_colormap_create_from_xpm_d): Constify.
+ (gdk_pixmap_create_from_xpm_d): Constify.
+
+ * gtk/gtkcellview.c (gtk_cell_view_set_background_color): Constify.
+
+ * gtk/gtkclist.c (gtk_clist_set_foreground): Constify.
+ (gtk_clist_set_background): Constify.
+
+ * gtk/gtkcolorbutton.c (gtk_color_button_new_with_color): Constify.
+ (gtk_color_button_set_color): Constify.
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_set_current_color):
+ Constify and add a check for color != NULL.
+ (gtk_color_selection_get_current_color): Add a check for color != NULL.
+ (gtk_color_selection_set_previous_color): Constify and add a check
+ for color != NULL.
+ (gtk_color_selection_get_previous_color): Add a check for color != NULL.
+
+ * gtk/gtkctree.c (gtk_ctree_node_set_foreground): Constify.
+ (gtk_ctree_node_set_background): Constify.
+
+ * gtk/gtktext.c (gtk_text_insert): Constify.
+ (insert_text_property): Constify.
+ (text_properties_equal): Constify.
+ (new_text_property): Constify.
+
+ * gtk/gtkwidget.c (gtk_widget_modify_color_component): Constify.
+ (gtk_widget_modify_fg): Constify.
+ (gtk_widget_modify_bg): Constify.
+ (gtk_widget_modify_text): Constify.
+ (gtk_widget_modify_base): Constify.
+
2004-01-26 Christian Rose <menthos@menthos.com>
* configure.in: Added "mi" to ALL_LINGUAS.
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index e33c34de73..9029bf3113 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,61 @@
+2004-01-26 Federico Mena Quintero <federico@ximian.com>
+
+ Fix #105497; constify uses of GdkColor.
+
+ * gdk/gdkgc.c (gdk_gc_set_rgb_fg_color): Constify.
+ (gdk_gc_set_rgb_bg_color): Constify.
+ (gdk_gc_set_foreground): Constify.
+
+ * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/linux-fb/gdkcursor-fb.c (gdk_cursor_new_from_pixmap): Constify.
+
+ * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/win32/gdkpixmap-win32.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_create_from_data): Constify.
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_set_background): Constify.
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_background): Constify.
+ * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_background): Constify.
+
+ * gdk/gdkpango.c (gdk_draw_layout_line_with_colors): Constify.
+ (gdk_draw_layout_with_colors): Constify.
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): Constify.
+ (gdk_pixmap_colormap_create_from_xpm): Constify.
+ (gdk_pixmap_create_from_xpm): Constify.
+ (gdk_pixmap_colormap_create_from_xpm_d): Constify.
+ (gdk_pixmap_create_from_xpm_d): Constify.
+
+ * gtk/gtkcellview.c (gtk_cell_view_set_background_color): Constify.
+
+ * gtk/gtkclist.c (gtk_clist_set_foreground): Constify.
+ (gtk_clist_set_background): Constify.
+
+ * gtk/gtkcolorbutton.c (gtk_color_button_new_with_color): Constify.
+ (gtk_color_button_set_color): Constify.
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_set_current_color):
+ Constify and add a check for color != NULL.
+ (gtk_color_selection_get_current_color): Add a check for color != NULL.
+ (gtk_color_selection_set_previous_color): Constify and add a check
+ for color != NULL.
+ (gtk_color_selection_get_previous_color): Add a check for color != NULL.
+
+ * gtk/gtkctree.c (gtk_ctree_node_set_foreground): Constify.
+ (gtk_ctree_node_set_background): Constify.
+
+ * gtk/gtktext.c (gtk_text_insert): Constify.
+ (insert_text_property): Constify.
+ (text_properties_equal): Constify.
+ (new_text_property): Constify.
+
+ * gtk/gtkwidget.c (gtk_widget_modify_color_component): Constify.
+ (gtk_widget_modify_fg): Constify.
+ (gtk_widget_modify_bg): Constify.
+ (gtk_widget_modify_text): Constify.
+ (gtk_widget_modify_base): Constify.
+
2004-01-26 Christian Rose <menthos@menthos.com>
* configure.in: Added "mi" to ALL_LINGUAS.
diff --git a/gdk/gdkcursor.h b/gdk/gdkcursor.h
index 6c8fcac65b..f15db970f1 100644
--- a/gdk/gdkcursor.h
+++ b/gdk/gdkcursor.h
@@ -113,8 +113,8 @@ GdkCursor* gdk_cursor_new (GdkCursorType cursor_type);
#endif
GdkCursor* gdk_cursor_new_from_pixmap (GdkPixmap *source,
GdkPixmap *mask,
- GdkColor *fg,
- GdkColor *bg,
+ const GdkColor *fg,
+ const GdkColor *bg,
gint x,
gint y);
GdkCursor* gdk_cursor_new_from_pixbuf (GdkDisplay *display,
diff --git a/gdk/gdkdrawable.h b/gdk/gdkdrawable.h
index 170a6f89ec..89f2d43c44 100644
--- a/gdk/gdkdrawable.h
+++ b/gdk/gdkdrawable.h
@@ -328,15 +328,15 @@ void gdk_draw_layout_line_with_colors (GdkDrawable *drawable,
gint x,
gint y,
PangoLayoutLine *line,
- GdkColor *foreground,
- GdkColor *background);
+ const GdkColor *foreground,
+ const GdkColor *background);
void gdk_draw_layout_with_colors (GdkDrawable *drawable,
GdkGC *gc,
gint x,
gint y,
PangoLayout *layout,
- GdkColor *foreground,
- GdkColor *background);
+ const GdkColor *foreground,
+ const GdkColor *background);
#ifndef GDK_DISABLE_DEPRECATED
#define gdk_draw_pixmap gdk_draw_drawable
diff --git a/gdk/gdkgc.c b/gdk/gdkgc.c
index e1757e4bd1..d04de3bbbe 100644
--- a/gdk/gdkgc.c
+++ b/gdk/gdkgc.c
@@ -199,8 +199,8 @@ gdk_gc_set_values (GdkGC *gc,
}
void
-gdk_gc_set_foreground (GdkGC *gc,
- GdkColor *color)
+gdk_gc_set_foreground (GdkGC *gc,
+ const GdkColor *color)
{
GdkGCValues values;
@@ -212,8 +212,8 @@ gdk_gc_set_foreground (GdkGC *gc,
}
void
-gdk_gc_set_background (GdkGC *gc,
- GdkColor *color)
+gdk_gc_set_background (GdkGC *gc,
+ const GdkColor *color)
{
GdkGCValues values;
@@ -496,7 +496,8 @@ gdk_gc_get_colormap_warn (GdkGC *gc)
* Calling this function for a GC without a colormap is an error.
**/
void
-gdk_gc_set_rgb_fg_color (GdkGC *gc, GdkColor *color)
+gdk_gc_set_rgb_fg_color (GdkGC *gc,
+ const GdkColor *color)
{
GdkColormap *cmap;
GdkColor tmp_color;
@@ -527,7 +528,8 @@ gdk_gc_set_rgb_fg_color (GdkGC *gc, GdkColor *color)
* Calling this function for a GC without a colormap is an error.
**/
void
-gdk_gc_set_rgb_bg_color (GdkGC *gc, GdkColor *color)
+gdk_gc_set_rgb_bg_color (GdkGC *gc,
+ const GdkColor *color)
{
GdkColormap *cmap;
GdkColor tmp_color;
diff --git a/gdk/gdkgc.h b/gdk/gdkgc.h
index eb2fc91b01..c17033e1b5 100644
--- a/gdk/gdkgc.h
+++ b/gdk/gdkgc.h
@@ -209,9 +209,9 @@ void gdk_gc_set_values (GdkGC *gc,
GdkGCValues *values,
GdkGCValuesMask values_mask);
void gdk_gc_set_foreground (GdkGC *gc,
- GdkColor *color);
+ const GdkColor *color);
void gdk_gc_set_background (GdkGC *gc,
- GdkColor *color);
+ const GdkColor *color);
#ifndef GDK_DISABLE_DEPRECATED
void gdk_gc_set_font (GdkGC *gc,
GdkFont *font);
@@ -256,14 +256,14 @@ void gdk_gc_copy (GdkGC *dst_gc,
GdkGC *src_gc);
-void gdk_gc_set_colormap (GdkGC *gc,
- GdkColormap *colormap);
-GdkColormap *gdk_gc_get_colormap (GdkGC *gc);
-void gdk_gc_set_rgb_fg_color (GdkGC *gc,
- GdkColor *color);
-void gdk_gc_set_rgb_bg_color (GdkGC *gc,
- GdkColor *color);
-GdkScreen * gdk_gc_get_screen (GdkGC *gc);
+void gdk_gc_set_colormap (GdkGC *gc,
+ GdkColormap *colormap);
+GdkColormap *gdk_gc_get_colormap (GdkGC *gc);
+void gdk_gc_set_rgb_fg_color (GdkGC *gc,
+ const GdkColor *color);
+void gdk_gc_set_rgb_bg_color (GdkGC *gc,
+ const GdkColor *color);
+GdkScreen * gdk_gc_get_screen (GdkGC *gc);
#ifndef GDK_DISABLE_DEPRECATED
#define gdk_gc_destroy gdk_gc_unref
diff --git a/gdk/gdkpango.c b/gdk/gdkpango.c
index 0f24309d36..24ec81b615 100644
--- a/gdk/gdkpango.c
+++ b/gdk/gdkpango.c
@@ -214,8 +214,8 @@ gdk_draw_layout_line_with_colors (GdkDrawable *drawable,
gint x,
gint y,
PangoLayoutLine *line,
- GdkColor *foreground,
- GdkColor *background)
+ const GdkColor *foreground,
+ const GdkColor *background)
{
GSList *tmp_list = line->runs;
PangoRectangle overall_rect;
@@ -451,8 +451,8 @@ gdk_draw_layout_with_colors (GdkDrawable *drawable,
int x,
int y,
PangoLayout *layout,
- GdkColor *foreground,
- GdkColor *background)
+ const GdkColor *foreground,
+ const GdkColor *background)
{
PangoLayoutIter *iter;
diff --git a/gdk/gdkpixmap.c b/gdk/gdkpixmap.c
index b7e126b802..efc9763086 100644
--- a/gdk/gdkpixmap.c
+++ b/gdk/gdkpixmap.c
@@ -501,10 +501,10 @@ make_solid_mask (GdkScreen *screen, gint width, gint height)
((c)->blue >> 8))
static GdkPixmap *
-gdk_pixmap_colormap_new_from_pixbuf (GdkColormap *colormap,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- GdkPixbuf *pixbuf)
+gdk_pixmap_colormap_new_from_pixbuf (GdkColormap *colormap,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ GdkPixbuf *pixbuf)
{
GdkPixmap *pixmap;
GdkPixbuf *render_pixbuf;
@@ -551,11 +551,11 @@ gdk_pixmap_colormap_new_from_pixbuf (GdkColormap *colormap,
}
GdkPixmap*
-gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable,
- GdkColormap *colormap,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- const gchar *filename)
+gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable,
+ GdkColormap *colormap,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ const gchar *filename)
{
GdkPixbuf *pixbuf;
GdkPixmap *pixmap;
@@ -579,21 +579,21 @@ gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable,
}
GdkPixmap*
-gdk_pixmap_create_from_xpm (GdkDrawable *drawable,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- const gchar *filename)
+gdk_pixmap_create_from_xpm (GdkDrawable *drawable,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ const gchar *filename)
{
return gdk_pixmap_colormap_create_from_xpm (drawable, NULL, mask,
transparent_color, filename);
}
GdkPixmap*
-gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable,
- GdkColormap *colormap,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- gchar **data)
+gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable,
+ GdkColormap *colormap,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ gchar **data)
{
GdkPixbuf *pixbuf;
GdkPixmap *pixmap;
@@ -617,10 +617,10 @@ gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable,
}
GdkPixmap*
-gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- gchar **data)
+gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ gchar **data)
{
return gdk_pixmap_colormap_create_from_xpm_d (drawable, NULL, mask,
transparent_color, data);
diff --git a/gdk/gdkpixmap.h b/gdk/gdkpixmap.h
index ca2c4d535b..9da2c91c26 100644
--- a/gdk/gdkpixmap.h
+++ b/gdk/gdkpixmap.h
@@ -46,32 +46,32 @@ GdkBitmap* gdk_bitmap_create_from_data (GdkDrawable *drawable,
const gchar *data,
gint width,
gint height);
-GdkPixmap* gdk_pixmap_create_from_data (GdkDrawable *drawable,
- const gchar *data,
- gint width,
- gint height,
- gint depth,
- GdkColor *fg,
- GdkColor *bg);
-
-GdkPixmap* gdk_pixmap_create_from_xpm (GdkDrawable *drawable,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- const gchar *filename);
-GdkPixmap* gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable,
- GdkColormap *colormap,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- const gchar *filename);
-GdkPixmap* gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- gchar **data);
-GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable,
- GdkColormap *colormap,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- gchar **data);
+GdkPixmap* gdk_pixmap_create_from_data (GdkDrawable *drawable,
+ const gchar *data,
+ gint width,
+ gint height,
+ gint depth,
+ const GdkColor *fg,
+ const GdkColor *bg);
+
+GdkPixmap* gdk_pixmap_create_from_xpm (GdkDrawable *drawable,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ const gchar *filename);
+GdkPixmap* gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable,
+ GdkColormap *colormap,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ const gchar *filename);
+GdkPixmap* gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ gchar **data);
+GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable,
+ GdkColormap *colormap,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ gchar **data);
/* Functions to create/lookup pixmaps from their native equivalents
*/
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h
index 7568a330b9..bbc54c881c 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -432,7 +432,7 @@ void gdk_window_set_role (GdkWindow *window,
void gdk_window_set_transient_for (GdkWindow *window,
GdkWindow *parent);
void gdk_window_set_background (GdkWindow *window,
- GdkColor *color);
+ const GdkColor *color);
void gdk_window_set_back_pixmap (GdkWindow *window,
GdkPixmap *pixmap,
gboolean parent_relative);
diff --git a/gdk/linux-fb/gdkcursor-fb.c b/gdk/linux-fb/gdkcursor-fb.c
index 20b0a040f2..9212662d50 100644
--- a/gdk/linux-fb/gdkcursor-fb.c
+++ b/gdk/linux-fb/gdkcursor-fb.c
@@ -246,12 +246,12 @@ gdk_cursor_new_for_display (GdkDisplay *display,
}
GdkCursor*
-gdk_cursor_new_from_pixmap (GdkPixmap *source,
- GdkPixmap *mask,
- GdkColor *fg,
- GdkColor *bg,
- gint x,
- gint y)
+gdk_cursor_new_from_pixmap (GdkPixmap *source,
+ GdkPixmap *mask,
+ const GdkColor *fg,
+ const GdkColor *bg,
+ gint x,
+ gint y)
{
GdkCursorPrivateFB *private;
GdkCursor *cursor;
diff --git a/gdk/linux-fb/gdkpixmap-fb.c b/gdk/linux-fb/gdkpixmap-fb.c
index 1b1120cc09..c15ebadaf6 100644
--- a/gdk/linux-fb/gdkpixmap-fb.c
+++ b/gdk/linux-fb/gdkpixmap-fb.c
@@ -170,13 +170,13 @@ gdk_bitmap_create_from_data (GdkDrawable *window,
}
GdkPixmap*
-gdk_pixmap_create_from_data (GdkDrawable *window,
- const gchar *data,
- gint width,
- gint height,
- gint depth,
- GdkColor *fg,
- GdkColor *bg)
+gdk_pixmap_create_from_data (GdkDrawable *window,
+ const gchar *data,
+ gint width,
+ gint height,
+ gint depth,
+ const GdkColor *fg,
+ const GdkColor *bg)
{
GdkPixmap *pixmap;
diff --git a/gdk/linux-fb/gdkwindow-fb.c b/gdk/linux-fb/gdkwindow-fb.c
index 140aba2d23..42ba7ef52a 100644
--- a/gdk/linux-fb/gdkwindow-fb.c
+++ b/gdk/linux-fb/gdkwindow-fb.c
@@ -1440,8 +1440,8 @@ gdk_window_set_transient_for (GdkWindow *window,
}
void
-gdk_window_set_background (GdkWindow *window,
- GdkColor *color)
+gdk_window_set_background (const GdkWindow *window,
+ const GdkColor *color)
{
GdkWindowObject *private = (GdkWindowObject *)window;
diff --git a/gdk/win32/gdkcursor-win32.c b/gdk/win32/gdkcursor-win32.c
index fbd721a923..0970cd61d5 100644
--- a/gdk/win32/gdkcursor-win32.c
+++ b/gdk/win32/gdkcursor-win32.c
@@ -119,12 +119,12 @@ color_is_white (GdkColor *color)
}
GdkCursor*
-gdk_cursor_new_from_pixmap (GdkPixmap *source,
- GdkPixmap *mask,
- GdkColor *fg,
- GdkColor *bg,
- gint x,
- gint y)
+gdk_cursor_new_from_pixmap (GdkPixmap *source,
+ GdkPixmap *mask,
+ const GdkColor *fg,
+ const GdkColor *bg,
+ gint x,
+ gint y)
{
GdkCursorPrivate *private;
GdkCursor *cursor;
diff --git a/gdk/win32/gdkpixmap-win32.c b/gdk/win32/gdkpixmap-win32.c
index ebdc9f0bc1..a997cea990 100644
--- a/gdk/win32/gdkpixmap-win32.c
+++ b/gdk/win32/gdkpixmap-win32.c
@@ -389,13 +389,13 @@ gdk_bitmap_create_from_data (GdkDrawable *drawable,
}
GdkPixmap*
-gdk_pixmap_create_from_data (GdkDrawable *drawable,
- const gchar *data,
- gint width,
- gint height,
- gint depth,
- GdkColor *fg,
- GdkColor *bg)
+gdk_pixmap_create_from_data (GdkDrawable *drawable,
+ const gchar *data,
+ gint width,
+ gint height,
+ gint depth,
+ const GdkColor *fg,
+ const GdkColor *bg)
{
/* Oh wow. I struggled with dozens of lines of code trying to get
* this right using a monochrome Win32 bitmap created from data, and
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 0afe387950..4034ea8906 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -1649,8 +1649,8 @@ gdk_window_set_transient_for (GdkWindow *window,
}
void
-gdk_window_set_background (GdkWindow *window,
- GdkColor *color)
+gdk_window_set_background (GdkWindow *window,
+ const GdkColor *color)
{
GdkWindowObject *private = (GdkWindowObject *)window;
diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c
index f86cbfea31..e69bb28232 100644
--- a/gdk/x11/gdkcursor-x11.c
+++ b/gdk/x11/gdkcursor-x11.c
@@ -188,12 +188,12 @@ gdk_cursor_new_for_display (GdkDisplay *display,
* Return value: a new #GdkCursor.
**/
GdkCursor*
-gdk_cursor_new_from_pixmap (GdkPixmap *source,
- GdkPixmap *mask,
- GdkColor *fg,
- GdkColor *bg,
- gint x,
- gint y)
+gdk_cursor_new_from_pixmap (GdkPixmap *source,
+ GdkPixmap *mask,
+ const GdkColor *fg,
+ const GdkColor *bg,
+ gint x,
+ gint y)
{
GdkCursorPrivate *private;
GdkCursor *cursor;
diff --git a/gdk/x11/gdkpixmap-x11.c b/gdk/x11/gdkpixmap-x11.c
index f28ad72af5..9b42234251 100644
--- a/gdk/x11/gdkpixmap-x11.c
+++ b/gdk/x11/gdkpixmap-x11.c
@@ -256,13 +256,13 @@ gdk_bitmap_create_from_data (GdkDrawable *drawable,
}
GdkPixmap*
-gdk_pixmap_create_from_data (GdkDrawable *drawable,
- const gchar *data,
- gint width,
- gint height,
- gint depth,
- GdkColor *fg,
- GdkColor *bg)
+gdk_pixmap_create_from_data (GdkDrawable *drawable,
+ const gchar *data,
+ gint width,
+ gint height,
+ gint depth,
+ const GdkColor *fg,
+ const GdkColor *bg)
{
GdkPixmap *pixmap;
GdkDrawableImplX11 *draw_impl;
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index fe9f42020c..4eca373035 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -2400,8 +2400,8 @@ gdk_window_set_transient_for (GdkWindow *window,
*
**/
void
-gdk_window_set_background (GdkWindow *window,
- GdkColor *color)
+gdk_window_set_background (GdkWindow *window,
+ const GdkColor *color)
{
GdkWindowObject *private = (GdkWindowObject *)window;
diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c
index 84cdf16b17..3ebd912a9d 100644
--- a/gtk/gtkcellview.c
+++ b/gtk/gtkcellview.c
@@ -932,8 +932,8 @@ gtk_cell_view_get_size_of_row (GtkCellView *cell_view,
}
void
-gtk_cell_view_set_background_color (GtkCellView *view,
- GdkColor *color)
+gtk_cell_view_set_background_color (GtkCellView *view,
+ const GdkColor *color)
{
g_return_if_fail (GTK_IS_CELL_VIEW (view));
diff --git a/gtk/gtkcellview.h b/gtk/gtkcellview.h
index f8d2d8007f..5212b351a5 100644
--- a/gtk/gtkcellview.h
+++ b/gtk/gtkcellview.h
@@ -75,7 +75,7 @@ gboolean gtk_cell_view_get_size_of_row (GtkCellView *cell_v
GtkRequisition *requisition);
void gtk_cell_view_set_background_color (GtkCellView *cell_view,
- GdkColor *color);
+ const GdkColor *color);
G_END_DECLS
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index fe02be59d3..27de2ab46f 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -3215,9 +3215,9 @@ gtk_clist_row_is_visible (GtkCList *clist,
}
void
-gtk_clist_set_foreground (GtkCList *clist,
- gint row,
- GdkColor *color)
+gtk_clist_set_foreground (GtkCList *clist,
+ gint row,
+ const GdkColor *color)
{
GtkCListRow *clist_row;
@@ -3244,9 +3244,9 @@ gtk_clist_set_foreground (GtkCList *clist,
}
void
-gtk_clist_set_background (GtkCList *clist,
- gint row,
- GdkColor *color)
+gtk_clist_set_background (GtkCList *clist,
+ gint row,
+ const GdkColor *color)
{
GtkCListRow *clist_row;
diff --git a/gtk/gtkclist.h b/gtk/gtkclist.h
index ae7cbaed6b..384ee3e7d4 100644
--- a/gtk/gtkclist.h
+++ b/gtk/gtkclist.h
@@ -631,16 +631,16 @@ gint gtk_clist_get_pixtext (GtkCList *clist,
/* sets the foreground color of a row, the color must already
* be allocated
*/
-void gtk_clist_set_foreground (GtkCList *clist,
- gint row,
- GdkColor *color);
+void gtk_clist_set_foreground (GtkCList *clist,
+ gint row,
+ const GdkColor *color);
/* sets the background color of a row, the color must already
* be allocated
*/
-void gtk_clist_set_background (GtkCList *clist,
- gint row,
- GdkColor *color);
+void gtk_clist_set_background (GtkCList *clist,
+ gint row,
+ const GdkColor *color);
/* set / get cell styles */
void gtk_clist_set_cell_style (GtkCList *clist,
diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c
index ab0e69873f..27e79a6aee 100644
--- a/gtk/gtkcolorbutton.c
+++ b/gtk/gtkcolorbutton.c
@@ -660,7 +660,7 @@ gtk_color_button_new (void)
* Since: 2.4
*/
GtkWidget *
-gtk_color_button_new_with_color (GdkColor *color)
+gtk_color_button_new_with_color (const GdkColor *color)
{
return g_object_new (GTK_TYPE_COLOR_BUTTON, "color", color, NULL);
}
@@ -776,7 +776,7 @@ gtk_color_button_clicked (GtkButton *button)
**/
void
gtk_color_button_set_color (GtkColorButton *color_button,
- GdkColor *color)
+ const GdkColor *color)
{
g_return_if_fail (GTK_IS_COLOR_BUTTON (color_button));
diff --git a/gtk/gtkcolorbutton.h b/gtk/gtkcolorbutton.h
index be8ec8fe7d..b6a00fdf4e 100644
--- a/gtk/gtkcolorbutton.h
+++ b/gtk/gtkcolorbutton.h
@@ -77,9 +77,9 @@ struct _GtkColorButtonClass {
GType gtk_color_button_get_type (void) G_GNUC_CONST;
GtkWidget *gtk_color_button_new (void);
-GtkWidget *gtk_color_button_new_with_color (GdkColor *color);
+GtkWidget *gtk_color_button_new_with_color (const GdkColor *color);
void gtk_color_button_set_color (GtkColorButton *color_button,
- GdkColor *color);
+ const GdkColor *color);
void gtk_color_button_set_alpha (GtkColorButton *color_button,
guint16 alpha);
void gtk_color_button_get_color (GtkColorButton *color_button,
diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c
index 6a5d752e69..5f4dad56e2 100644
--- a/gtk/gtkcolorsel.c
+++ b/gtk/gtkcolorsel.c
@@ -2209,13 +2209,14 @@ gtk_color_selection_set_has_palette (GtkColorSelection *colorsel,
**/
void
gtk_color_selection_set_current_color (GtkColorSelection *colorsel,
- GdkColor *color)
+ const GdkColor *color)
{
ColorSelectionPrivate *priv;
gint i;
gboolean previous_changed;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
+ g_return_if_fail (color != NULL);
priv = colorsel->private_data;
priv->changing = TRUE;
@@ -2301,6 +2302,7 @@ gtk_color_selection_get_current_color (GtkColorSelection *colorsel,
ColorSelectionPrivate *priv;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
+ g_return_if_fail (color != NULL);
priv = colorsel->private_data;
color->red = UNSCALE (priv->color[COLORSEL_RED]);
@@ -2363,11 +2365,12 @@ gtk_color_selection_get_color (GtkColorSelection *colorsel,
**/
void
gtk_color_selection_set_previous_color (GtkColorSelection *colorsel,
- GdkColor *color)
+ const GdkColor *color)
{
ColorSelectionPrivate *priv;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
+ g_return_if_fail (color != NULL);
priv = colorsel->private_data;
priv->changing = TRUE;
@@ -2424,6 +2427,7 @@ gtk_color_selection_get_previous_color (GtkColorSelection *colorsel,
ColorSelectionPrivate *priv;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
+ g_return_if_fail (color != NULL);
priv = colorsel->private_data;
color->red = UNSCALE (priv->old_color[COLORSEL_RED]);
diff --git a/gtk/gtkcolorsel.h b/gtk/gtkcolorsel.h
index 4057ea353f..dbdddf6166 100644
--- a/gtk/gtkcolorsel.h
+++ b/gtk/gtkcolorsel.h
@@ -88,14 +88,14 @@ void gtk_color_selection_set_has_palette (GtkColorSelection *color
void gtk_color_selection_set_current_color (GtkColorSelection *colorsel,
- GdkColor *color);
+ const GdkColor *color);
void gtk_color_selection_set_current_alpha (GtkColorSelection *colorsel,
guint16 alpha);
void gtk_color_selection_get_current_color (GtkColorSelection *colorsel,
GdkColor *color);
guint16 gtk_color_selection_get_current_alpha (GtkColorSelection *colorsel);
void gtk_color_selection_set_previous_color (GtkColorSelection *colorsel,
- GdkColor *color);
+ const GdkColor *color);
void gtk_color_selection_set_previous_alpha (GtkColorSelection *colorsel,
guint16 alpha);
void gtk_color_selection_get_previous_color (GtkColorSelection *colorsel,
diff --git a/gtk/gtkctree.c b/gtk/gtkctree.c
index 2f5df8ced9..c8ace08432 100644
--- a/gtk/gtkctree.c
+++ b/gtk/gtkctree.c
@@ -5099,9 +5099,9 @@ gtk_ctree_node_get_row_style (GtkCTree *ctree,
}
void
-gtk_ctree_node_set_foreground (GtkCTree *ctree,
- GtkCTreeNode *node,
- GdkColor *color)
+gtk_ctree_node_set_foreground (GtkCTree *ctree,
+ GtkCTreeNode *node,
+ const GdkColor *color)
{
g_return_if_fail (GTK_IS_CTREE (ctree));
g_return_if_fail (node != NULL);
@@ -5121,9 +5121,9 @@ gtk_ctree_node_set_foreground (GtkCTree *ctree,
}
void
-gtk_ctree_node_set_background (GtkCTree *ctree,
- GtkCTreeNode *node,
- GdkColor *color)
+gtk_ctree_node_set_background (GtkCTree *ctree,
+ GtkCTreeNode *node,
+ const GdkColor *color)
{
g_return_if_fail (GTK_IS_CTREE (ctree));
g_return_if_fail (node != NULL);
diff --git a/gtk/gtkctree.h b/gtk/gtkctree.h
index 5f5594ba6e..9f6bd2a7e6 100644
--- a/gtk/gtkctree.h
+++ b/gtk/gtkctree.h
@@ -382,12 +382,12 @@ void gtk_ctree_node_set_cell_style (GtkCTree *ctree,
GtkStyle * gtk_ctree_node_get_cell_style (GtkCTree *ctree,
GtkCTreeNode *node,
gint column);
-void gtk_ctree_node_set_foreground (GtkCTree *ctree,
- GtkCTreeNode *node,
- GdkColor *color);
-void gtk_ctree_node_set_background (GtkCTree *ctree,
- GtkCTreeNode *node,
- GdkColor *color);
+void gtk_ctree_node_set_foreground (GtkCTree *ctree,
+ GtkCTreeNode *node,
+ const GdkColor *color);
+void gtk_ctree_node_set_background (GtkCTree *ctree,
+ GtkCTreeNode *node,
+ const GdkColor *color);
void gtk_ctree_node_set_row_data (GtkCTree *ctree,
GtkCTreeNode *node,
gpointer data);
diff --git a/gtk/gtktext.c b/gtk/gtktext.c
index ef304a8d90..1d09a9f038 100644
--- a/gtk/gtktext.c
+++ b/gtk/gtktext.c
@@ -267,9 +267,9 @@ static GtkTextFont* get_text_font (GdkFont* gfont);
static void text_font_unref (GtkTextFont *text_font);
static void insert_text_property (GtkText* text, GdkFont* font,
- GdkColor *fore, GdkColor* back, guint len);
+ const GdkColor *fore, const GdkColor* back, guint len);
static TextProperty* new_text_property (GtkText *text, GdkFont* font,
- GdkColor* fore, GdkColor* back, guint length);
+ const GdkColor* fore, const GdkColor* back, guint length);
static void destroy_text_property (TextProperty *prop);
static void init_properties (GtkText *text);
static void realize_property (GtkText *text, TextProperty *prop);
@@ -958,12 +958,12 @@ gtk_text_thaw (GtkText *text)
}
void
-gtk_text_insert (GtkText *text,
- GdkFont *font,
- GdkColor *fore,
- GdkColor *back,
- const char *chars,
- gint nchars)
+gtk_text_insert (GtkText *text,
+ GdkFont *font,
+ const GdkColor *fore,
+ const GdkColor *back,
+ const char *chars,
+ gint nchars)
{
GtkOldEditable *old_editable = GTK_OLD_EDITABLE (text);
gboolean frozen = FALSE;
@@ -2876,7 +2876,7 @@ text_font_unref (GtkTextFont *text_font)
}
static gint
-text_properties_equal (TextProperty* prop, GdkFont* font, GdkColor *fore, GdkColor *back)
+text_properties_equal (TextProperty* prop, GdkFont* font, const GdkColor *fore, const GdkColor *back)
{
if (prop->flags & PROPERTY_FONT)
{
@@ -2970,8 +2970,8 @@ unrealize_properties (GtkText *text)
}
static TextProperty*
-new_text_property (GtkText *text, GdkFont *font, GdkColor* fore,
- GdkColor* back, guint length)
+new_text_property (GtkText *text, GdkFont *font, const GdkColor* fore,
+ const GdkColor* back, guint length)
{
TextProperty *prop;
@@ -3104,7 +3104,7 @@ make_forward_space (GtkText* text, guint len)
* point. */
static void
insert_text_property (GtkText* text, GdkFont* font,
- GdkColor *fore, GdkColor* back, guint len)
+ const GdkColor *fore, const GdkColor* back, guint len)
{
GtkPropertyMark *mark = &text->point;
TextProperty* forward_prop = MARK_CURRENT_PROPERTY(mark);
diff --git a/gtk/gtktext.h b/gtk/gtktext.h
index 24c0634756..c3ba9e1293 100644
--- a/gtk/gtktext.h
+++ b/gtk/gtktext.h
@@ -197,12 +197,12 @@ guint gtk_text_get_point (GtkText *text);
guint gtk_text_get_length (GtkText *text);
void gtk_text_freeze (GtkText *text);
void gtk_text_thaw (GtkText *text);
-void gtk_text_insert (GtkText *text,
- GdkFont *font,
- GdkColor *fore,
- GdkColor *back,
- const char *chars,
- gint length);
+void gtk_text_insert (GtkText *text,
+ GdkFont *font,
+ const GdkColor *fore,
+ const GdkColor *back,
+ const char *chars,
+ gint length);
gboolean gtk_text_backward_delete (GtkText *text,
guint nchars);
gboolean gtk_text_forward_delete (GtkText *text,
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 6e55c67998..f43e994345 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -4481,10 +4481,10 @@ gtk_widget_get_modifier_style (GtkWidget *widget)
}
static void
-gtk_widget_modify_color_component (GtkWidget *widget,
- GtkRcFlags component,
- GtkStateType state,
- GdkColor *color)
+gtk_widget_modify_color_component (GtkWidget *widget,
+ GtkRcFlags component,
+ GtkStateType state,
+ const GdkColor *color)
{
GtkRcStyle *rc_style = gtk_widget_get_modifier_style (widget);
@@ -4529,9 +4529,9 @@ gtk_widget_modify_color_component (GtkWidget *widget,
* gtk_widget_modify_style().
**/
void
-gtk_widget_modify_fg (GtkWidget *widget,
- GtkStateType state,
- GdkColor *color)
+gtk_widget_modify_fg (GtkWidget *widget,
+ GtkStateType state,
+ const GdkColor *color)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (state >= GTK_STATE_NORMAL && state <= GTK_STATE_INSENSITIVE);
@@ -4552,9 +4552,9 @@ gtk_widget_modify_fg (GtkWidget *widget,
* gtk_widget_modify_style().
**/
void
-gtk_widget_modify_bg (GtkWidget *widget,
- GtkStateType state,
- GdkColor *color)
+gtk_widget_modify_bg (GtkWidget *widget,
+ GtkStateType state,
+ const GdkColor *color)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (state >= GTK_STATE_NORMAL && state <= GTK_STATE_INSENSITIVE);
@@ -4577,9 +4577,9 @@ gtk_widget_modify_bg (GtkWidget *widget,
* gtk_widget_modify_style().
**/
void
-gtk_widget_modify_text (GtkWidget *widget,
- GtkStateType state,
- GdkColor *color)
+gtk_widget_modify_text (GtkWidget *widget,
+ GtkStateType state,
+ const GdkColor *color)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (state >= GTK_STATE_NORMAL && state <= GTK_STATE_INSENSITIVE);
@@ -4602,9 +4602,9 @@ gtk_widget_modify_text (GtkWidget *widget,
* and #GtkTextView. See also gtk_widget_modify_style().
**/
void
-gtk_widget_modify_base (GtkWidget *widget,
- GtkStateType state,
- GdkColor *color)
+gtk_widget_modify_base (GtkWidget *widget,
+ GtkStateType state,
+ const GdkColor *color)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (state >= GTK_STATE_NORMAL && state <= GTK_STATE_INSENSITIVE);
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index f4bd4d125f..f1d8b8023c 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -650,16 +650,16 @@ void gtk_widget_modify_style (GtkWidget *widget,
GtkRcStyle *gtk_widget_get_modifier_style (GtkWidget *widget);
void gtk_widget_modify_fg (GtkWidget *widget,
GtkStateType state,
- GdkColor *color);
+ const GdkColor *color);
void gtk_widget_modify_bg (GtkWidget *widget,
GtkStateType state,
- GdkColor *color);
+ const GdkColor *color);
void gtk_widget_modify_text (GtkWidget *widget,
GtkStateType state,
- GdkColor *color);
+ const GdkColor *color);
void gtk_widget_modify_base (GtkWidget *widget,
GtkStateType state,
- GdkColor *color);
+ const GdkColor *color);
void gtk_widget_modify_font (GtkWidget *widget,
PangoFontDescription *font_desc);