2005-08-06  Kristian Høgsberg  <krh@redhat.com>

        * glib/poppler-page.cc:
        * glib/poppler-page.h: Use GdkColor for specifying selection
        colors, we alreay depend on GDK anyway.
diff --git a/ChangeLog b/ChangeLog
index 1cb5711..35d04fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-06  Kristian Høgsberg  <krh@redhat.com>
+
+	* glib/poppler-page.cc:
+	* glib/poppler-page.h: Use GdkColor for specifying selection
+	colors, we alreay depend on GDK anyway.
+
 2005-08-06  Albert Astals Cid  <aacid@kde.org>
 
 	* poppler/PDFDoc.cc: Increase the range for searching %%EOF up to
diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc
index e685ffa..8329d8e 100644
--- a/glib/poppler-page.cc
+++ b/glib/poppler-page.cc
@@ -491,9 +491,7 @@
  * Render the selection specified by @selection for @page into
  * @pixbuf.  The selection will be rendered at @scale, using
  * @glyph_color for the glyphs and @background_color for the selection
- * background.  The colors are specified as 24 bit words,
- * specifically, the red component in bits 16-23, the green component
- * in bits 8-15 and the blue component in bits 0-7.
+ * background.
  *
  * If non-NULL, @old_selection specifies the selection that is already
  * rendered in @pixbuf, in which case this function will (some day)
@@ -505,8 +503,8 @@
 			       GdkPixbuf        *pixbuf,
 			       PopplerRectangle *selection,
 			       PopplerRectangle *old_selection,
-			       guint32           glyph_color,
-			       guint32           background_color)
+			       GdkColor         *glyph_color,
+			       GdkColor         *background_color)
 {
   TextOutputDev *text_dev;
   OutputDev *output_dev;
@@ -515,14 +513,14 @@
 			     selection->x2, selection->y2);
 
   GfxColor gfx_background_color = { 
-    ((background_color >> 16) & 0xff) / 255.0,
-    ((background_color >>  8) & 0xff) / 255.0,
-    ((background_color >>  0) & 0xff) / 255.0
+    background_color->red / 65535.0,
+    background_color->green / 65535.0,
+    background_color->blue / 65535.0
   };
   GfxColor gfx_glyph_color = {
-    ((glyph_color >> 16) & 0xff) / 255.0,
-    ((glyph_color >>  8) & 0xff) / 255.0,
-    ((glyph_color >>  0) & 0xff) / 255.0
+    glyph_color->red / 65535.0,
+    glyph_color->green / 65535.0,
+    glyph_color->blue / 65535.0
   };
 
   text_dev = poppler_page_get_text_output_dev (page);
diff --git a/glib/poppler-page.h b/glib/poppler-page.h
index 0ba0227..3a042fb 100644
--- a/glib/poppler-page.h
+++ b/glib/poppler-page.h
@@ -21,6 +21,7 @@
 
 #include <glib-object.h>
 #include <gdk/gdkregion.h>
+#include <gdk/gdkcolor.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
 #include "poppler.h"
@@ -68,8 +69,8 @@
 						       GdkPixbuf          *pixbuf,
 						       PopplerRectangle   *selection,
 						       PopplerRectangle   *old_selection,
-						       guint32             glyph_color,
-						       guint32             background_color);
+						       GdkColor         *glyph_color,
+						       GdkColor         *background_color);
 
 
 /* A rectangle on a page, with coordinates in PDF points. */