Fixed documentation to work with Gtk-Doc 1.14 and produce as few warnings as possible
[rodin/chimara.git] / libchimara / graphics.c
index 21fcd09067937b6820d33069877f6d798758033b..abcab4a4a07e58344d54754c28d17ed5b6ef1078 100644 (file)
@@ -139,7 +139,6 @@ image_cache_find(struct image_info* to_find)
        /* Empty cache */
        if(link == NULL) {
                gdk_threads_leave();
-               printf("Cache miss for image %d\n", to_find->resource_number);
                return NULL;
        }
 
@@ -154,7 +153,6 @@ image_cache_find(struct image_info* to_find)
                                if(info->width == to_find->width && info->height == to_find->height) {
                                        /* Prescaled image found */
                                        gdk_threads_leave();
-                                       printf("Exact cache hit for image %d\n", to_find->resource_number);
                                        return info;
                                }
                                else if(info->width >= to_find->width && info->height >= to_find->height) {
@@ -165,7 +163,6 @@ image_cache_find(struct image_info* to_find)
                        } else {
                                if(!info->scaled) {
                                        gdk_threads_leave();
-                                       printf("Exact cache hit for image %d\n", to_find->resource_number);
                                        return info; /* Found a match */
                                }
                        }
@@ -174,11 +171,6 @@ image_cache_find(struct image_info* to_find)
 
        gdk_threads_leave();
 
-       if(match == NULL)
-               printf("Cache miss for image %d\n", to_find->resource_number);
-       else
-               printf("Approx cache hit for image %d\n", to_find->resource_number);
-
        return match;
 }
 
@@ -423,7 +415,7 @@ draw_image_common(winid_t win, GdkPixbuf *pixbuf, glsi32 val1, glsi32 val2)
  * <note><para>
  *   This function may only be used with graphics windows. To set background 
  *   colors in a text window, use text styles with color hints; see <link 
- *   linkend="Styles">Styles</link>.
+ *   linkend="chimara-Styles">Styles</link>.
  * </para></note>
  */
 void
@@ -454,14 +446,15 @@ glk_window_fill_rect(winid_t win, glui32 color, glsi32 left, glsi32 top, glui32
        VALID_WINDOW(win, return);
        g_return_if_fail(win->type == wintype_Graphics);
 
-
        gdk_threads_enter();
 
        GdkPixmap *map;
        gtk_image_get_pixmap( GTK_IMAGE(win->widget), &map, NULL );
 
        GdkGC *gc = gdk_gc_new(map);
-       gdk_gc_set_foreground( gc, glkcolor_to_gdkcolor(color) );
+       GdkColor gdkcolor;
+       glkcolor_to_gdkcolor(color, &gdkcolor);
+       gdk_gc_set_rgb_fg_color(gc, &gdkcolor);
        gdk_draw_rectangle( GDK_DRAWABLE(map), gc, TRUE, left, top, width, height);
        gtk_widget_queue_draw(win->widget);
        g_object_unref(gc);