summaryrefslogtreecommitdiff
path: root/gtk/gtk_window.h
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtk_window.h')
-rw-r--r--gtk/gtk_window.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/gtk/gtk_window.h b/gtk/gtk_window.h
index 0a030e8e7..43f292404 100644
--- a/gtk/gtk_window.h
+++ b/gtk/gtk_window.h
@@ -23,6 +23,45 @@
#include "desktop/browser.h"
#include "gtk/gtk_scaffolding.h"
+struct gui_window {
+ /* All gui_window objects have an ultimate scaffold */
+ nsgtk_scaffolding *scaffold;
+ /* A gui_window is the rendering of a browser_window */
+ struct browser_window *bw;
+ struct browser_mouse *mouse;
+
+ /* These are the storage for the rendering */
+ int caretx, carety, careth;
+ gui_pointer_shape current_pointer;
+ int last_x, last_y;
+
+ /* Within GTK, a gui_window is a scrolled window
+ * with a viewport inside
+ * with a gtkfixed in that
+ * with a drawing area in that
+ * The scrolled window is optional and only chosen
+ * for frames which need it. Otherwise we just use
+ * a viewport.
+ */
+ GtkScrolledWindow *scrolledwindow;
+ GtkViewport *viewport;
+ GtkFixed *fixed;
+ GtkDrawingArea *drawing_area;
+
+ /* Keep gui_windows in a list for cleanup later */
+ struct gui_window *next, *prev;
+};
+
+struct browser_mouse {
+ struct gui_window *gui;
+ struct box *box;
+
+ gdouble pressed_x;
+ gdouble pressed_y;
+ gboolean waiting;
+ browser_mouse_state state;
+};
+
void nsgtk_reflow_all_windows(void);
void nsgtk_window_process_reformats(void);