summaryrefslogtreecommitdiff
path: root/frontends/windows
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-02-19 11:39:47 +0000
committerVincent Sanders <vince@kyllikki.org>2017-02-19 11:39:47 +0000
commitae45b18b459fa4f490501a93459e49f1f1038073 (patch)
treef0d8a3356a74c0a448f6d8ad5f4e4b22fc3c384c /frontends/windows
parent67b22a811128f5a0635430151a73442d1f100735 (diff)
parent0f69965805dda51cc7b6ea8404226d5f75a3b533 (diff)
downloadnetsurf-ae45b18b459fa4f490501a93459e49f1f1038073.tar.gz
netsurf-ae45b18b459fa4f490501a93459e49f1f1038073.tar.bz2
Merge branch 'vince/localhist-corewin'
Diffstat (limited to 'frontends/windows')
-rw-r--r--frontends/windows/cookies.c17
-rw-r--r--frontends/windows/global_history.c2
-rw-r--r--frontends/windows/hotlist.c2
-rw-r--r--frontends/windows/localhistory.c14
-rw-r--r--frontends/windows/localhistory.h22
-rw-r--r--frontends/windows/ssl_cert.c10
-rw-r--r--frontends/windows/window.c7
7 files changed, 52 insertions, 22 deletions
diff --git a/frontends/windows/cookies.c b/frontends/windows/cookies.c
index 27949fac1..c4880fa1c 100644
--- a/frontends/windows/cookies.c
+++ b/frontends/windows/cookies.c
@@ -58,6 +58,7 @@ nsw32_cookie_key(struct nsw32_corewindow *nsw32_cw, uint32_t nskey)
return NSERROR_NOT_IMPLEMENTED;
}
+
/**
* callback for mouse action on cookie window
*
@@ -69,18 +70,21 @@ nsw32_cookie_key(struct nsw32_corewindow *nsw32_cw, uint32_t nskey)
*/
static nserror
nsw32_cookie_mouse(struct nsw32_corewindow *nsw32_cw,
- browser_mouse_state mouse_state,
- int x, int y)
+ browser_mouse_state mouse_state,
+ int x, int y)
{
cookie_manager_mouse_action(mouse_state, x, y);
return NSERROR_OK;
}
+
/**
* callback on draw event for cookie window
*
* \param nsw32_cw The nsw32 core window structure.
+ * \param scrollx The horizontal scroll offset.
+ * \param scrolly The vertical scroll offset.
* \param r The rectangle of the window that needs updating.
* \return NSERROR_OK on success otherwise apropriate error code
*/
@@ -102,6 +106,12 @@ nsw32_cookie_draw(struct nsw32_corewindow *nsw32_cw,
}
+/**
+ * callback on close event for cookie window
+ *
+ * \param nsw32_cw The nsw32 core window structure.
+ * \return NSERROR_OK on success otherwise apropriate error code
+ */
static nserror
nsw32_cookie_close(struct nsw32_corewindow *nsw32_cw)
{
@@ -110,9 +120,11 @@ nsw32_cookie_close(struct nsw32_corewindow *nsw32_cw)
return NSERROR_OK;
}
+
/**
* Creates the window for the cookie tree.
*
+ * \param hInstance The application instance
* \return NSERROR_OK on success else appropriate error code on faliure.
*/
static nserror nsw32_cookie_init(HINSTANCE hInstance)
@@ -169,6 +181,7 @@ nserror nsw32_cookies_present(HINSTANCE hInstance)
return res;
}
+
/* exported interface documented in windows/cookie.h */
nserror nsw32_cookies_finalise(void)
{
diff --git a/frontends/windows/global_history.c b/frontends/windows/global_history.c
index 4e90a77ff..0ba013bf0 100644
--- a/frontends/windows/global_history.c
+++ b/frontends/windows/global_history.c
@@ -81,6 +81,8 @@ nsw32_global_history_mouse(struct nsw32_corewindow *nsw32_cw,
* callback on draw event for global_history window
*
* \param nsw32_cw The nsw32 core window structure.
+ * \param scrollx The horizontal scroll offset.
+ * \param scrolly The vertical scroll offset.
* \param r The rectangle of the window that needs updating.
* \return NSERROR_OK on success otherwise apropriate error code
*/
diff --git a/frontends/windows/hotlist.c b/frontends/windows/hotlist.c
index c184619bf..07804fee2 100644
--- a/frontends/windows/hotlist.c
+++ b/frontends/windows/hotlist.c
@@ -85,6 +85,8 @@ nsw32_hotlist_mouse(struct nsw32_corewindow *nsw32_cw,
* callback on draw event for hotlist window
*
* \param nsw32_cw The nsw32 core window structure.
+ * \param scrollx The horizontal scroll offset.
+ * \param scrolly The vertical scroll offset.
* \param r The rectangle of the window that needs updating.
* \return NSERROR_OK on success otherwise apropriate error code
*/
diff --git a/frontends/windows/localhistory.c b/frontends/windows/localhistory.c
index 8921b2b31..e145cf79b 100644
--- a/frontends/windows/localhistory.c
+++ b/frontends/windows/localhistory.c
@@ -129,16 +129,12 @@ nsws_localhistory_up(struct nsws_localhistory *l, struct gui_window *gw)
}
-/**
- * close local history window
- *
- * \param gw the gui window to close history for
- */
-void nsws_localhistory_close(struct gui_window *w)
+/* exported interface documented in windows/localhistory.h */
+void nsws_localhistory_close(struct gui_window *gw)
{
- struct nsws_localhistory *l = gui_window_localhistory(w);
- if (l != NULL) {
- CloseWindow(l->hwnd);
+ struct nsws_localhistory *lh = gui_window_localhistory(gw);
+ if (lh != NULL) {
+ CloseWindow(lh->hwnd);
}
}
diff --git a/frontends/windows/localhistory.h b/frontends/windows/localhistory.h
index b0ad07491..eed417f28 100644
--- a/frontends/windows/localhistory.h
+++ b/frontends/windows/localhistory.h
@@ -16,17 +16,31 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _NETSURF_WINDOWS_LOCALHISTORY_H_
-#define _NETSURF_WINDOWS_LOCALHISTORY_H_
+#ifndef NETSURF_WINDOWS_LOCALHISTORY_H
+#define NETSURF_WINDOWS_LOCALHISTORY_H
struct nsws_localhistory;
-void nsws_localhistory_open(struct gui_window *gw);
+/**
+ * Close win32 localhistory window.
+ *
+ * \param gw The win32 gui window to close local history for.
+ */
void nsws_localhistory_close(struct gui_window *gw);
-/* creates localhistory window */
+/**
+ * creates localhistory window
+ *
+ * \param gw The win32 gui window to create a local history for.
+ */
struct nsws_localhistory *nsws_window_create_localhistory(struct gui_window *gw);
+/**
+ * Create the win32 window class
+ *
+ * \param hinstance The application instance to create the window class under
+ * \return NSERROR_OK on success else error code.
+ */
nserror nsws_create_localhistory_class(HINSTANCE hinstance);
#endif
diff --git a/frontends/windows/ssl_cert.c b/frontends/windows/ssl_cert.c
index efbdf453b..b48d4f5ef 100644
--- a/frontends/windows/ssl_cert.c
+++ b/frontends/windows/ssl_cert.c
@@ -124,6 +124,8 @@ nsw32_sslcert_viewer_mouse(struct nsw32_corewindow *nsw32_cw,
* callback on draw event for ssl certificate window
*
* \param nsw32_cw The nsw32 core window structure.
+ * \param scrollx The horizontal scroll offset.
+ * \param scrolly The vertical scroll offset.
* \param r The rectangle of the window that needs updating.
* \return NSERROR_OK on success otherwise appropriate error code
*/
@@ -357,11 +359,11 @@ static nserror nsw32_crtvrfy_destroy(struct nsw32_sslcert_window *crtwin)
/**
- * handle command message on certificate viewing window
+ * handle command message on ssl certificate viewing window.
*
- * \param hwnd The win32 window handle
- * \param gw win32 gui window
- * \param notification_code notification code
+ * \param hwnd The win32 window handle.
+ * \param crtwin certificate window context.
+ * \param notification_code notifiction code
* \param identifier notification identifier
* \param ctrl_window The win32 control window handle
* \return appropriate response for command
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index 74b84e320..b4cafaab3 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -809,11 +809,12 @@ static void nsws_update_edit(struct gui_window *w)
*
* \param gw win32 frontends graphical window.
* \param hwnd The win32 window handle
- * \param int x The x coordinate of the event.
+ * \param x The x coordinate of the event.
* \param y the y coordinate of the event.
+ * \return true if menu displayed else false
*/
static bool
-nsws_ctx_menu(struct gui_window *w, HWND hwnd, int x, int y)
+nsws_ctx_menu(struct gui_window *gw, HWND hwnd, int x, int y)
{
RECT rc; /* client area of window */
POINT pt = { x, y }; /* location of mouse click */
@@ -828,7 +829,7 @@ nsws_ctx_menu(struct gui_window *w, HWND hwnd, int x, int y)
if (PtInRect(&rc, pt)) {
ClientToScreen(hwnd, &pt);
nsws_update_edit(w);
- TrackPopupMenu(GetSubMenu(w->rclick, 0),
+ TrackPopupMenu(GetSubMenu(gw->rclick, 0),
TPM_CENTERALIGN | TPM_TOPALIGN,
x,
y,