summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-06-10 20:46:47 (GMT)
committer Vincent Sanders <vince@kyllikki.org>2017-06-11 10:46:50 (GMT)
commitee749f2b11276533f3c7fd139bb96f69103ae08f (patch)
treea02cfa05136c2b07488b90d479044adb2c1e65b0
parent38c10c85cbfbc47eaaf64a58fb50d60e136af673 (diff)
downloadnetsurf-ee749f2b11276533f3c7fd139bb96f69103ae08f.tar.gz
netsurf-ee749f2b11276533f3c7fd139bb96f69103ae08f.tar.bz2
cleanup use of internal frames scrollbar widget header
-rw-r--r--desktop/scrollbar.h10
-rw-r--r--frontends/amiga/gui.c7
-rw-r--r--frontends/riscos/window.c7
3 files changed, 18 insertions, 6 deletions
diff --git a/desktop/scrollbar.h b/desktop/scrollbar.h
index f715331..fa5e167 100644
--- a/desktop/scrollbar.h
+++ b/desktop/scrollbar.h
@@ -19,6 +19,8 @@
/**
* \file
* Scrollbar widget interface.
+ *
+ * Scrollbar widgets used in frames code, not for frontend use
*/
#ifndef NETSURF_DESKTOP_SCROLLBAR_H
@@ -30,10 +32,10 @@
#define SCROLLBAR_WIDTH 16
/* Region dependent values for scrollbar_scroll function */
-#define SCROLL_TOP INT_MIN
-#define SCROLL_PAGE_UP INT_MIN + 1
-#define SCROLL_PAGE_DOWN INT_MAX - 1
-#define SCROLL_BOTTOM INT_MAX
+#define SCROLL_TOP INT_MIN
+#define SCROLL_PAGE_UP (INT_MIN + 1)
+#define SCROLL_PAGE_DOWN (INT_MAX - 1)
+#define SCROLL_BOTTOM INT_MAX
struct scrollbar;
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 2d5a27c..5c6700a 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -90,6 +90,7 @@
#include <math.h>
#include <string.h>
#include <stdlib.h>
+#include <limits.h>
/* NetSurf core includes */
#include "utils/log.h"
@@ -115,7 +116,6 @@
#include "desktop/hotlist.h"
#include "desktop/version.h"
#include "desktop/save_complete.h"
-#include "desktop/scrollbar.h"
#include "desktop/searchweb.h"
/* NetSurf Amiga platform includes */
@@ -158,6 +158,11 @@
#define NSA_KBD_SCROLL_PX 10
#define NSA_MAX_HOTLIST_BUTTON_LEN 20
+#define SCROLL_TOP INT_MIN
+#define SCROLL_PAGE_UP (INT_MIN + 1)
+#define SCROLL_PAGE_DOWN (INT_MAX - 1)
+#define SCROLL_BOTTOM (INT_MAX)
+
/* Extra mouse button defines to match those in intuition/intuition.h */
#define SIDEDOWN (IECODE_4TH_BUTTON)
#define SIDEUP (IECODE_4TH_BUTTON | IECODE_UP_PREFIX)
diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c
index 4fb404e..c827106 100644
--- a/frontends/riscos/window.c
+++ b/frontends/riscos/window.c
@@ -35,6 +35,7 @@
#include <stdint.h>
#include <time.h>
#include <string.h>
+#include <limits.h>
#include <oslib/colourtrans.h>
#include <oslib/osbyte.h>
#include <oslib/osfile.h>
@@ -63,7 +64,6 @@
#include "netsurf/keypress.h"
#include "desktop/browser_history.h"
#include "desktop/cookie_manager.h"
-#include "desktop/scrollbar.h"
#include "riscos/bitmap.h"
#include "riscos/buffer.h"
@@ -167,6 +167,11 @@ static void ro_gui_window_process_form_select_menu(struct gui_window *g,
#define SCROLL_VISIBLE_PADDING 32
+#define SCROLL_TOP INT_MIN
+#define SCROLL_PAGE_UP (INT_MIN + 1)
+#define SCROLL_PAGE_DOWN (INT_MAX - 1)
+#define SCROLL_BOTTOM INT_MAX
+
/** Remembers which iconised sprite numbers are in use */
static bool iconise_used[64];
static int iconise_next = 0;