diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2006-11-27 17:13:24 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2006-11-27 17:13:24 +0000 |
commit | 5aae53ef919c695136ee52ce30435820d8dc1771 (patch) | |
tree | 0236cd51036ec7691d242f2ee420dab09af818a8 /gtk/gtk_plotters.c | |
parent | 052e8e7ea86744bdbb06b3402dda51bd6349d072 (diff) | |
download | netsurf-5aae53ef919c695136ee52ce30435820d8dc1771.tar.gz netsurf-5aae53ef919c695136ee52ce30435820d8dc1771.tar.bz2 |
Merge GTK frames branch to trunk.
svn path=/trunk/netsurf/; revision=3075
Diffstat (limited to 'gtk/gtk_plotters.c')
-rw-r--r-- | gtk/gtk_plotters.c | 27 |
1 files changed, 26 insertions, 1 deletions
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); +} + |