Merge branch 'master' of ssh+git://git.claws-mail.org/home/git/claws
[claws.git] / src / plugins / litehtml_viewer / lh_widget.h
index e6b784a5ce6b30f16ee802173246597e6bbba922..cc0b12ef2a88a68b9a6b219740dc75a5b088a722 100644 (file)
@@ -18,6 +18,7 @@
 #include <gtk/gtk.h>
 #include <glib.h>
 #include <gio/gio.h>
 #include <gtk/gtk.h>
 #include <glib.h>
 #include <gio/gio.h>
+#include <atomic>
 
 #include "procmime.h"
 
 
 #include "procmime.h"
 
@@ -54,13 +55,15 @@ class lh_widget : public container_linux
                void draw_text(litehtml::uint_ptr hdc, const litehtml::tchar_t* text, litehtml::uint_ptr hFont, litehtml::web_color color, const litehtml::position& pos);
 
                void draw(cairo_t *cr);
                void draw_text(litehtml::uint_ptr hdc, const litehtml::tchar_t* text, litehtml::uint_ptr hFont, litehtml::web_color color, const litehtml::position& pos);
 
                void draw(cairo_t *cr);
-               void redraw(gboolean force_render);
+               void rerender();
+               void redraw();
                void open_html(const gchar *contents);
                void clear();
                void open_html(const gchar *contents);
                void clear();
-               void update_cursor();
+               void update_cursor(const litehtml::tchar_t* cursor);
                void update_font();
                void print();
 
                void update_font();
                void print();
 
+               const litehtml::tchar_t *get_href_at(litehtml::element::ptr element) const;
                const litehtml::tchar_t *get_href_at(const gint x, const gint y) const;
                void popup_context_menu(const litehtml::tchar_t *url, GdkEventButton *event);
                const litehtml::tstring fullurl(const litehtml::tchar_t *url) const;
                const litehtml::tchar_t *get_href_at(const gint x, const gint y) const;
                void popup_context_menu(const litehtml::tchar_t *url, GdkEventButton *event);
                const litehtml::tstring fullurl(const litehtml::tchar_t *url) const;
@@ -73,8 +76,6 @@ class lh_widget : public container_linux
                litehtml::tstring m_base_url;
 
        private:
                litehtml::tstring m_base_url;
 
        private:
-               void paint_white();
-
                gint m_rendered_width;
                GtkWidget *m_drawing_area;
                GtkWidget *m_scrolled_window;
                gint m_rendered_width;
                GtkWidget *m_drawing_area;
                GtkWidget *m_scrolled_window;
@@ -82,9 +83,12 @@ class lh_widget : public container_linux
                GtkWidget *m_context_menu;
                litehtml::context m_context;
                gint m_height;
                GtkWidget *m_context_menu;
                litehtml::context m_context;
                gint m_height;
-               litehtml::tstring m_cursor;
+               litehtml::element::ptr m_over_element;
+               gboolean m_showing_url;
                MimeInfo *m_partinfo;
 
                litehtml::tchar_t *m_font_name;
                int m_font_size;
                MimeInfo *m_partinfo;
 
                litehtml::tchar_t *m_font_name;
                int m_font_size;
+               std::atomic<bool> m_force_render;
+               std::atomic<bool> m_blank;
 };
 };