Fix few wrong string lengths when matching URI schemes, add more known
[claws.git] / src / plugins / litehtml_viewer / lh_widget.h
index 204d612732acc706b6a02ee4e05ee98a09ceb181..cc0b12ef2a88a68b9a6b219740dc75a5b088a722 100644 (file)
@@ -18,6 +18,9 @@
 #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 "container_linux.h"
 
 
 #include "container_linux.h"
 
@@ -52,24 +55,27 @@ 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;
 
+               void set_partinfo(MimeInfo *partinfo);
+               GdkPixbuf *get_local_image(const litehtml::tstring url) const;
+
                litehtml::document::ptr m_html;
                litehtml::tstring m_clicked_url;
                litehtml::tstring m_base_url;
 
        private:
                litehtml::document::ptr m_html;
                litehtml::tstring m_clicked_url;
                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;
@@ -77,8 +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;
 
                litehtml::tchar_t *m_font_name;
                int m_font_size;
+               std::atomic<bool> m_force_render;
+               std::atomic<bool> m_blank;
 };
 };