diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-02-15 18:43:59 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-02-15 18:44:50 +0000 |
commit | a38a63a37ef8bdc62661d398fb485296c0bed470 (patch) | |
tree | 11a1279537f28f51de2fca4c410ecc9b96629a3d /windows | |
parent | a55957b1c975e96a60d96d9a70c3b64bf02f96fd (diff) | |
download | netsurf-a38a63a37ef8bdc62661d398fb485296c0bed470.tar.gz netsurf-a38a63a37ef8bdc62661d398fb485296c0bed470.tar.bz2 |
Make history internal to browser_window module.
Diffstat (limited to 'windows')
-rw-r--r-- | windows/gui.c | 14 | ||||
-rw-r--r-- | windows/localhistory.c | 17 |
2 files changed, 14 insertions, 17 deletions
diff --git a/windows/gui.c b/windows/gui.c index 2559bf21e..92ff400ba 100644 --- a/windows/gui.c +++ b/windows/gui.c @@ -32,8 +32,8 @@ #include "content/urldb.h" #include "content/fetch.h" #include "css/utils.h" +#include "desktop/browser_history.h" #include "desktop/browser_private.h" -#include "desktop/local_history.h" #include "desktop/mouse.h" #include "desktop/netsurf.h" #include "utils/nsoption.h" @@ -342,8 +342,8 @@ static void nsws_window_update_forward_back(struct gui_window *w) if (w->bw == NULL) return; - bool forward = history_forward_available(w->bw->history); - bool back = history_back_available(w->bw->history); + bool forward = browser_window_history_forward_available(w->bw); + bool back = browser_window_history_back_available(w->bw); if (w->mainmenu != NULL) { EnableMenuItem(w->mainmenu, IDM_NAV_FORWARD, @@ -851,16 +851,16 @@ nsws_window_command(HWND hwnd, case IDM_NAV_BACK: if ((gw->bw != NULL) && - (history_back_available(gw->bw->history))) { - history_back(gw->bw->history, false); + (browser_window_history_back_available(gw->bw))) { + browser_window_history_back(gw->bw, false); } nsws_window_update_forward_back(gw); break; case IDM_NAV_FORWARD: if ((gw->bw != NULL) && - (history_forward_available(gw->bw->history))) { - history_forward(gw->bw->history, false); + (browser_window_history_forward_available(gw->bw))) { + browser_window_history_forward(gw->bw, false); } nsws_window_update_forward_back(gw); break; diff --git a/windows/localhistory.c b/windows/localhistory.c index d2be2c377..fb582b4aa 100644 --- a/windows/localhistory.c +++ b/windows/localhistory.c @@ -22,8 +22,7 @@ #include <windowsx.h> #include <commctrl.h> -#include "desktop/browser_private.h" -#include "desktop/local_history.h" +#include "desktop/browser_history.h" #include "desktop/plotters.h" #include "utils/utils.h" #include "utils/log.h" @@ -56,7 +55,7 @@ static void nsws_localhistory_scroll_check(struct nsws_localhistory *l, struct g if ((gw->bw == NULL) || (l->hwnd == NULL)) return; - history_size(gw->bw->history, &(l->width), &(l->height)); + browser_window_history_size(gw->bw, &(l->width), &(l->height)); si.cbSize = sizeof(si); si.fMask = SIF_ALL; @@ -97,7 +96,7 @@ static void nsws_localhistory_up(struct nsws_localhistory *l, struct gui_window tmp_hdc = plot_hdc; plot_hdc = GetDC(l->hwnd); - history_redraw(gw->bw->history, &ctx); + browser_window_history_redraw(gw->bw, &ctx); ReleaseDC(l->hwnd, plot_hdc); @@ -167,7 +166,7 @@ nsws_localhistory_event_callback(HWND hwnd, UINT msg, x = GET_X_LPARAM(lparam); y = GET_Y_LPARAM(lparam); - if (history_click(gw->bw->history, + if (browser_window_history_click(gw->bw, gw->localhistory->hscroll + x, gw->localhistory->vscroll + y, false)) { @@ -179,8 +178,6 @@ nsws_localhistory_event_callback(HWND hwnd, UINT msg, case WM_MOUSEMOVE: x = GET_X_LPARAM(lparam); y = GET_Y_LPARAM(lparam); -/* if (gw->bw != NULL) - history_hover(gw->bw->history, x, y, (void *)hwnd);*/ return DefWindowProc(hwnd, msg, wparam, lparam); break; @@ -286,7 +283,7 @@ nsws_localhistory_event_callback(HWND hwnd, UINT msg, tmp_hdc = plot_hdc; plot_hdc = hdc; - history_redraw_rectangle(gw->bw->history, + browser_window_history_redraw_rectangle(gw->bw, gw->localhistory->hscroll + ps.rcPaint.left, gw->localhistory->vscroll + ps.rcPaint.top, gw->localhistory->hscroll + (ps.rcPaint.right - ps.rcPaint.left), @@ -346,8 +343,8 @@ struct nsws_localhistory *nsws_window_create_localhistory(struct gui_window *gw) localhistory->width = 0; localhistory->height = 0; - if ((gw->bw != NULL) && (gw->bw->history != NULL)) { - history_size(gw->bw->history, + if (gw->bw != NULL) { + browser_window_history_size(gw->bw, &(localhistory->width), &(localhistory->height)); } |