summaryrefslogtreecommitdiff
path: root/frontends/windows
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/windows')
-rw-r--r--frontends/windows/Makefile2
-rw-r--r--frontends/windows/bitmap.c65
-rw-r--r--frontends/windows/bitmap.h2
-rw-r--r--frontends/windows/download.c1
-rw-r--r--frontends/windows/prefs.c1
-rw-r--r--frontends/windows/res/installer.nsi8
-rw-r--r--frontends/windows/window.c8
-rw-r--r--frontends/windows/window.h1
8 files changed, 18 insertions, 70 deletions
diff --git a/frontends/windows/Makefile b/frontends/windows/Makefile
index 4e74edd7a..524f716fe 100644
--- a/frontends/windows/Makefile
+++ b/frontends/windows/Makefile
@@ -90,7 +90,7 @@ $(OBJROOT)/messages-en: $(MESSAGES_TARGET)/en/Messages
$(VQ)echo " MSGCP: $< $@"
$(Q)$(INSTALL) -m 644 -T $< $@
-netsurf-installer.exe: $(EXETARGET) $(WIN_RES_INS_OBJ)
+netsurf-installer.exe: $(EXETARGET) $(POSTEXES) $(WIN_RES_INS_OBJ)
$(VQ)echo "MAKENSIS: $@"
$(Q)makensis -V$(NSIS_VERBOSE) -NOCD -DOBJROOT=$(OBJROOT) -DRESDIR=$(FRONTEND_RESOURCES_DIR) -DVERSIONMAJOR=$(VERSION_MAJ) -DVERSIONMINOR=$(VERSION_MIN) -DOUTFNAME=$@ $(FRONTEND_RESOURCES_DIR)/installer.nsi
diff --git a/frontends/windows/bitmap.c b/frontends/windows/bitmap.c
index eed3d3a15..a52f29ad9 100644
--- a/frontends/windows/bitmap.c
+++ b/frontends/windows/bitmap.c
@@ -41,19 +41,19 @@
* Create a bitmap.
*
* \param width width of image in pixels
- * \param height width of image in pixels
- * \param state a flag word indicating the initial state
+ * \param height height of image in pixels
+ * \param state flags flags for bitmap creation
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-void *win32_bitmap_create(int width, int height, unsigned int state)
+static void *win32_bitmap_create(int width, int height, enum gui_bitmap_flags flags)
{
struct bitmap *bitmap;
BITMAPV5HEADER *pbmi;
HBITMAP windib;
uint8_t *pixdata;
- NSLOG(netsurf, INFO, "width %d, height %d, state %u", width, height,
- state);
+ NSLOG(netsurf, INFO, "width %d, height %d, flags %u", width, height,
+ (unsigned)flags);
pbmi = calloc(1, sizeof(BITMAPV5HEADER));
if (pbmi == NULL) {
@@ -91,7 +91,7 @@ void *win32_bitmap_create(int width, int height, unsigned int state)
bitmap->windib = windib;
bitmap->pbmi = pbmi;
bitmap->pixdata = pixdata;
- if ((state & BITMAP_OPAQUE) != 0) {
+ if ((flags & BITMAP_OPAQUE) != 0) {
bitmap->opaque = true;
} else {
bitmap->opaque = false;
@@ -164,20 +164,6 @@ void win32_bitmap_destroy(void *bitmap)
/**
- * Save a bitmap in the platform's native format.
- *
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \param path pathname for file
- * \param flags flags controlling how the bitmap is saved.
- * \return true on success, false on error and error reported
- */
-static bool bitmap_save(void *bitmap, const char *path, unsigned flags)
-{
- return true;
-}
-
-
-/**
* The bitmap image has changed, so flush any persistant cache.
*
* \param bitmap a bitmap, as returned by bitmap_create()
@@ -207,35 +193,6 @@ static void bitmap_set_opaque(void *bitmap, bool opaque)
/**
- * Tests whether a bitmap has an opaque alpha channel
- *
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
- */
-static bool bitmap_test_opaque(void *bitmap)
-{
- int tst;
- struct bitmap *bm = bitmap;
-
- if (bitmap == NULL) {
- NSLOG(netsurf, INFO, "NULL bitmap!");
- return false;
- }
-
- tst = bm->width * bm->height;
-
- while (tst-- > 0) {
- if (bm->pixdata[(tst << 2) + 3] != 0xff) {
- NSLOG(netsurf, INFO, "bitmap %p has transparency", bm);
- return false;
- }
- }
- NSLOG(netsurf, INFO, "bitmap %p is opaque", bm);
- return true;
-}
-
-
-/**
* Gets whether a bitmap should be plotted opaque
*
* \param bitmap a bitmap, as returned by bitmap_create()
@@ -276,11 +233,6 @@ static int bitmap_get_height(void *bitmap)
return(bm->height);
}
-static size_t bitmap_get_bpp(void *bitmap)
-{
- return 4;
-}
-
struct bitmap *bitmap_scale(struct bitmap *prescale, int width, int height)
{
struct bitmap *ret = malloc(sizeof(struct bitmap));
@@ -346,7 +298,7 @@ bitmap_render(struct bitmap *bitmap, struct hlcache_handle *content)
}
/* create a full size bitmap and plot into it */
- fsbitmap = win32_bitmap_create(width, height, BITMAP_NEW | BITMAP_CLEAR_MEMORY | BITMAP_OPAQUE);
+ fsbitmap = win32_bitmap_create(width, height, BITMAP_CLEAR | BITMAP_OPAQUE);
SelectObject(bufferdc, fsbitmap->windib);
@@ -375,13 +327,10 @@ static struct gui_bitmap_table bitmap_table = {
.destroy = win32_bitmap_destroy,
.set_opaque = bitmap_set_opaque,
.get_opaque = bitmap_get_opaque,
- .test_opaque = bitmap_test_opaque,
.get_buffer = bitmap_get_buffer,
.get_rowstride = bitmap_get_rowstride,
.get_width = bitmap_get_width,
.get_height = bitmap_get_height,
- .get_bpp = bitmap_get_bpp,
- .save = bitmap_save,
.modified = bitmap_modified,
.render = bitmap_render,
};
diff --git a/frontends/windows/bitmap.h b/frontends/windows/bitmap.h
index c57061d77..a370dd619 100644
--- a/frontends/windows/bitmap.h
+++ b/frontends/windows/bitmap.h
@@ -33,8 +33,6 @@ struct bitmap {
struct bitmap *bitmap_scale(struct bitmap *prescale, int width, int height);
-void *win32_bitmap_create(int width, int height, unsigned int state);
-
void win32_bitmap_destroy(void *bitmap);
#endif
diff --git a/frontends/windows/download.c b/frontends/windows/download.c
index f0163cef7..cfd2bbbb7 100644
--- a/frontends/windows/download.c
+++ b/frontends/windows/download.c
@@ -169,6 +169,7 @@ nsws_download_event_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
case IDOK:
if (download1->downloaded != download1->size)
return TRUE;
+ fallthrough;
case IDCANCEL:
nsws_download_clear_data(download1);
diff --git a/frontends/windows/prefs.c b/frontends/windows/prefs.c
index 37f558477..d6855f5da 100644
--- a/frontends/windows/prefs.c
+++ b/frontends/windows/prefs.c
@@ -277,6 +277,7 @@ static BOOL CALLBACK options_appearance_dialog_handler(HWND hwnd,
}
break;
}
+ break;
case WM_COMMAND:
diff --git a/frontends/windows/res/installer.nsi b/frontends/windows/res/installer.nsi
index 7a03192f5..2f8b757d8 100644
--- a/frontends/windows/res/installer.nsi
+++ b/frontends/windows/res/installer.nsi
@@ -13,16 +13,16 @@
!define VERSIONMAJOR 3
!endif
!ifndef VERSIONMINOR
- !define VERSIONMINOR 10
+ !define VERSIONMINOR 11
!endif
!ifndef VERSIONBUILD
!define VERSIONBUILD 0
!endif
# These will be displayed by the "Click here for support information" link in "Add/Remove Programs"
-!define HELPURL "http://www.netsurf-browser.org/" # "Support Information" link
-!define UPDATEURL "http://www.netsurf-browser.org/" # "Product Updates" link
-!define ABOUTURL "http://www.netsurf-browser.org/" # "Publisher" link
+!define HELPURL "https://www.netsurf-browser.org/" # "Support Information" link
+!define UPDATEURL "https://www.netsurf-browser.org/" # "Product Updates" link
+!define ABOUTURL "https://www.netsurf-browser.org/" # "Publisher" link
# This is the size (in kB) of all the files copied into "Program Files"
!define INSTALLSIZE 9000
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index 750c57703..00e5a7e05 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -432,7 +432,7 @@ nsws_window_urlbar_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
NSLOG(netsurf, INFO, "Destroyed font object");
DeleteObject(hFont);
}
-
+ fallthrough;
case WM_NCDESTROY:
/* remove properties if window is being destroyed */
@@ -1250,17 +1250,17 @@ nsws_window_command(HWND hwnd,
case IDM_HELP_CONTENTS:
nsws_window_go(hwnd,
- "http://www.netsurf-browser.org/documentation/");
+ "https://www.netsurf-browser.org/documentation/");
break;
case IDM_HELP_GUIDE:
nsws_window_go(hwnd,
- "http://www.netsurf-browser.org/documentation/guide");
+ "https://www.netsurf-browser.org/documentation/guide");
break;
case IDM_HELP_INFO:
nsws_window_go(hwnd,
- "http://www.netsurf-browser.org/documentation/info");
+ "https://www.netsurf-browser.org/documentation/info");
break;
case IDM_HELP_ABOUT:
diff --git a/frontends/windows/window.h b/frontends/windows/window.h
index 5f4349427..97be710f3 100644
--- a/frontends/windows/window.h
+++ b/frontends/windows/window.h
@@ -26,7 +26,6 @@ extern struct gui_window_table *win32_window_table;
struct browser_mouse {
struct gui_window *gui;
- struct box *box;
double pressed_x;
double pressed_y;