From 5aae53ef919c695136ee52ce30435820d8dc1771 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 27 Nov 2006 17:13:24 +0000 Subject: Merge GTK frames branch to trunk. svn path=/trunk/netsurf/; revision=3075 --- gtk/gtk_plotters.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'gtk/gtk_plotters.c') diff --git a/gtk/gtk_plotters.c b/gtk/gtk_plotters.c index d782d6d13..b78bcd5e6 100644 --- a/gtk/gtk_plotters.c +++ b/gtk/gtk_plotters.c @@ -21,13 +21,20 @@ #include "netsurf/desktop/plotters.h" #include "netsurf/gtk/font_pango.h" #include "netsurf/gtk/gtk_plotters.h" -#include "netsurf/gtk/gtk_window.h" +#include "netsurf/gtk/gtk_scaffolding.h" #include "netsurf/render/font.h" #include "netsurf/utils/log.h" #include "netsurf/desktop/options.h" #include "netsurf/gtk/options.h" #include "netsurf/gtk/gtk_bitmap.h" +GtkWidget *current_widget; +GdkDrawable *current_drawable; +GdkGC *current_gc; +#ifdef CAIRO_VERSION +cairo_t *current_cr; +#endif + static bool nsgtk_plot_clg(colour c); static bool nsgtk_plot_rectangle(int x0, int y0, int width, int height, int line_width, colour c, bool dotted, bool dashed); @@ -436,3 +443,21 @@ float nsgtk_plot_get_scale(void) return nsgtk_plot_scale; } +/** Plot a caret. It is assumed that the plotters have been set up. */ +void nsgtk_plot_caret(int x, int y, int h) +{ + GdkColor colour; + + colour.red = 0; + colour.green = 0; + colour.blue = 0; + colour.pixel = 0; + gdk_color_alloc(gdk_colormap_get_system(), + &colour); + gdk_gc_set_foreground(current_gc, &colour); + + gdk_draw_line(current_drawable, current_gc, + x, y, + x, y + h - 1); +} + -- cgit v1.2.3