summaryrefslogtreecommitdiff
path: root/frontends/atari
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/atari')
-rw-r--r--frontends/atari/Makefile19
-rw-r--r--frontends/atari/Makefile.tools19
-rw-r--r--frontends/atari/bitmap.c96
-rw-r--r--frontends/atari/bitmap.h2
-rw-r--r--frontends/atari/certview.c293
-rw-r--r--frontends/atari/certview.h51
-rw-r--r--frontends/atari/cookies.c8
-rw-r--r--frontends/atari/file.c12
-rw-r--r--frontends/atari/gui.c31
-rw-r--r--frontends/atari/history.c5
-rw-r--r--frontends/atari/hotlist.c8
-rw-r--r--frontends/atari/plot/font_freetype.c1
-rw-r--r--frontends/atari/plot/font_internal.c1
-rwxr-xr-xfrontends/atari/res/netsurf.rsh3
-rwxr-xr-xfrontends/atari/res/netsurf.rsm3
-rw-r--r--frontends/atari/settings.c29
-rw-r--r--frontends/atari/treeview.c13
-rw-r--r--frontends/atari/treeview.h4
-rw-r--r--frontends/atari/verify_ssl.c273
-rw-r--r--frontends/atari/verify_ssl.h24
20 files changed, 75 insertions, 820 deletions
diff --git a/frontends/atari/Makefile b/frontends/atari/Makefile
index 7a3573d9f..2f6d7118b 100644
--- a/frontends/atari/Makefile
+++ b/frontends/atari/Makefile
@@ -85,7 +85,6 @@ S_FRONTEND := \
clipboard.c \
ctxmenu.c \
cookies.c \
- certview.c \
deskmenu.c \
download.c \
encoding.c \
@@ -124,8 +123,16 @@ S_FRONTEND := \
# Note this is deliberately *not* expanded here as common and image
# are not yet available
SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_FRONTEND)
+
+# ---------------------------------------------------------------------------
+# Target setup
+# ---------------------------------------------------------------------------
+
EXETARGET := ns$(SUBTARGET)$(PRGSUFFIX)
+# The filter and target for split messages
+MESSAGES_FILTER=atari
+
# ----------------------------------------------------------------------------
# Install target
# ----------------------------------------------------------------------------
@@ -141,10 +148,6 @@ ATARI_FONT_SOURCE_DIR := $(ATARI_FONT_TMP_DIR)$(ATARI_FONT_NAME)/
ATARI_GENERIC_RESOURCES := de en it ja nl
ATARI_RESOURCES := $(addprefix resources/,$(ATARI_GENERIC_RESOURCES))
-# ----------------------------------------------------------------------------
-# Install target
-# ----------------------------------------------------------------------------
-
install-atari:
# ----------------------------------------------------------------------------
@@ -158,7 +161,7 @@ $(ATARI_FONT_TMP_DIR)$(ATARI_FONT_NAME):
package-atari: $(ATARI_FONT_TMP_DIR)$(ATARI_FONT_NAME) $(PKGNAME)
$(VQ)echo Creating $(PKGNAME)
-$(PKGNAME): $(EXETARGET)
+$(PKGNAME): $(EXETARGET) $(POSTEXES)
ifneq ($(strip $(STRIP)),)
$(Q)echo Stripping symbols from $(EXETARGET) with $(STRIP)
$(Q)$(STRIP) $(EXETARGET)
@@ -197,10 +200,8 @@ endif
$(Q)cp resources/internal.css $(ATARI_TARGET_DIR)res/internal.css
$(Q)cp resources/SearchEngines $(ATARI_TARGET_DIR)res/search
$(Q)cp resources/ca-bundle $(ATARI_TARGET_DIR)res/cabundle
- $(Q)$(RM) $(ATARI_TARGET_DIR)res/messages
- $(Q)$(SPLIT_MESSAGES) -l en -p atari -f messages -o $(ATARI_TARGET_DIR)res/messages resources/FatMessages
+ $(Q)$(INSTALL) -m 644 -T $(MESSAGES_TARGET)/en/Messages $(ATARI_TARGET_DIR)res/messages
$(Q)cp resources/en/welcome.html $(ATARI_TARGET_DIR)res/welcome.html
- $(Q)cp resources/en/maps.html $(ATARI_TARGET_DIR)res/maps.html
$(Q)cp resources/en/licence.html $(ATARI_TARGET_DIR)res/licence.html
$(Q)cp resources/en/credits.html $(ATARI_TARGET_DIR)res/credits.html
diff --git a/frontends/atari/Makefile.tools b/frontends/atari/Makefile.tools
new file mode 100644
index 000000000..971ab21be
--- /dev/null
+++ b/frontends/atari/Makefile.tools
@@ -0,0 +1,19 @@
+# -*- mode: makefile-gmake -*-
+##
+## atari target tool setup
+##
+
+ifeq ($(HOST),atari)
+ PKG_CONFIG := pkg-config
+else
+ ifeq ($(HOST),mint)
+ PKG_CONFIG := pkg-config
+ else
+ GCCSDK_INSTALL_ENV ?= /opt/netsurf/m68k-atari-mint/env
+ GCCSDK_INSTALL_CROSSBIN ?= /opt/netsurf/m68k-atari-mint/cross/bin
+
+ CC := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
+
+ PKG_CONFIG := PKG_CONFIG_LIBDIR="$(GCCSDK_INSTALL_ENV)/lib/pkgconfig" pkg-config
+ endif
+endif \ No newline at end of file
diff --git a/frontends/atari/bitmap.c b/frontends/atari/bitmap.c
index ae42da837..9b5a016a5 100644
--- a/frontends/atari/bitmap.c
+++ b/frontends/atari/bitmap.c
@@ -77,36 +77,36 @@ int init_mfdb(int bpp, int w, int h, uint32_t flags, MFDB * out )
* \param pixdata NULL or an memory address to use as the bitmap pixdata
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-static void *atari_bitmap_create_ex( int w, int h, short bpp, int rowstride, unsigned int state, void * pixdata )
+static void *atari_bitmap_create_ex( int w, int h, short bpp, int rowstride, enum gui_bitmap_flags flags, void * pixdata )
{
- struct bitmap * bitmap;
+ struct bitmap * bitmap;
- NSLOG(netsurf, INFO,
- "width %d (rowstride: %d, bpp: %d), height %d, state %u", w,
- rowstride, bpp, h, state);
+ NSLOG(netsurf, INFO,
+ "width %d (rowstride: %d, bpp: %d), height %d, flags %u", w,
+ rowstride, bpp, h, (unsigned)flags);
if( rowstride == 0) {
rowstride = bpp * w;
}
assert( rowstride >= (w * bpp) );
- bitmap = calloc(1 , sizeof(struct bitmap) );
- if (bitmap) {
+ bitmap = calloc(1 , sizeof(struct bitmap) );
+ if (bitmap) {
if( pixdata == NULL) {
- bitmap->pixdata = calloc(1, (rowstride * h)+128);
+ bitmap->pixdata = calloc(1, (rowstride * h)+128);
}
else {
bitmap->pixdata = pixdata;
}
- if (bitmap->pixdata != NULL) {
+ if (bitmap->pixdata != NULL) {
bitmap->width = w;
bitmap->height = h;
- bitmap->opaque = (state & BITMAP_OPAQUE) ? true : false;
+ bitmap->opaque = (flags & BITMAP_OPAQUE) ? true : false;
bitmap->bpp = bpp;
bitmap->resized = NULL;
bitmap->rowstride = rowstride;
- } else {
+ } else {
free(bitmap);
bitmap=NULL;
NSLOG(netsurf, INFO, "Out of memory!");
@@ -118,9 +118,9 @@ static void *atari_bitmap_create_ex( int w, int h, short bpp, int rowstride, uns
/* exported interface documented in atari/bitmap.h */
-void *atari_bitmap_create(int w, int h, unsigned int state)
+void *atari_bitmap_create(int w, int h, enum gui_bitmap_flags flags)
{
- return atari_bitmap_create_ex( w, h, NS_BMP_DEFAULT_BPP, w * NS_BMP_DEFAULT_BPP, state, NULL );
+ return atari_bitmap_create_ex( w, h, NS_BMP_DEFAULT_BPP, w * NS_BMP_DEFAULT_BPP, flags, NULL );
}
/**
@@ -249,21 +249,6 @@ void atari_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;
-}
-
-
-/**
* Sets whether a bitmap should be plotted opaque
*
* \param bitmap a bitmap, as returned by bitmap_create()
@@ -284,40 +269,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;
- }
-
- if( nsoption_int(atari_transparency) == 0 ){
- return( true );
- }
-
- 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;
-}
-
-
/* exported interface documented in atari/bitmap.h */
bool atari_bitmap_get_opaque(void *bitmap)
{
@@ -358,22 +309,12 @@ int atari_bitmap_get_height(void *bitmap)
return(bm->height);
}
-
-/**
- * Gets the number of BYTES per pixel.
- */
-static size_t bitmap_get_bpp(void *bitmap)
-{
- struct bitmap *bm = bitmap;
- return bm->bpp;
-}
-
/* exported interface documented in atari/bitmap.h */
bool atari_bitmap_resize(struct bitmap *img, HermesHandle hermes_h,
HermesFormat *fmt, int nw, int nh)
{
- unsigned int state = 0;
- short bpp = bitmap_get_bpp( img );
+ enum gui_bitmap_flags flags = 0;
+ short bpp = img->bpp;
int stride = atari_bitmap_get_rowstride( img );
int err;
@@ -389,9 +330,9 @@ bool atari_bitmap_resize(struct bitmap *img, HermesHandle hermes_h,
/* allocate the mem for resized bitmap */
if (img->opaque == true) {
- state |= BITMAP_OPAQUE;
+ flags |= BITMAP_OPAQUE;
}
- img->resized = atari_bitmap_create_ex( nw, nh, bpp, nw*bpp, state, NULL );
+ img->resized = atari_bitmap_create_ex( nw, nh, bpp, nw*bpp, flags, NULL );
if( img->resized == NULL ) {
printf("W: %d, H: %d, bpp: %d\n", nw, nh, bpp);
assert(img->resized);
@@ -439,13 +380,10 @@ static struct gui_bitmap_table bitmap_table = {
.destroy = atari_bitmap_destroy,
.set_opaque = bitmap_set_opaque,
.get_opaque = atari_bitmap_get_opaque,
- .test_opaque = bitmap_test_opaque,
.get_buffer = bitmap_get_buffer,
.get_rowstride = atari_bitmap_get_rowstride,
.get_width = atari_bitmap_get_width,
.get_height = atari_bitmap_get_height,
- .get_bpp = bitmap_get_bpp,
- .save = bitmap_save,
.modified = bitmap_modified,
.render = bitmap_render,
};
diff --git a/frontends/atari/bitmap.h b/frontends/atari/bitmap.h
index 72bad555e..88985ad3c 100644
--- a/frontends/atari/bitmap.h
+++ b/frontends/atari/bitmap.h
@@ -90,7 +90,7 @@ int init_mfdb(int bpp, int w, int h, uint32_t flags, MFDB * out );
* \param state a flag word indicating the initial state
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-void *atari_bitmap_create(int w, int h, unsigned int state);
+void *atari_bitmap_create(int w, int h, enum gui_bitmap_flags flags);
/**
* Find the width of a pixel row in bytes.
diff --git a/frontends/atari/certview.c b/frontends/atari/certview.c
deleted file mode 100644
index 80d18a059..000000000
--- a/frontends/atari/certview.c
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * Copyright 2013 Ole Loots <ole@monochrom.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <ctype.h>
-#include <string.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-
-#include "utils/nsoption.h"
-#include "utils/log.h"
-#include "utils/messages.h"
-#include "utils/utils.h"
-#include "desktop/sslcert_viewer.h"
-
-#include "atari/gui.h"
-#include "atari/misc.h"
-#include "atari/treeview.h"
-#include "atari/certview.h"
-#include "atari/findfile.h"
-#include "atari/gemtk/gemtk.h"
-#include "atari/res/netsurf.rsh"
-
-extern GRECT desk_area;
-
-
-/* Setup Atari Treeview Callbacks: */
-static nserror atari_sslcert_viewer_init_phase2(struct core_window *cw,
- struct core_window_callback_table * default_callbacks);
-static void atari_sslcert_viewer_finish(struct core_window *cw);
-static void atari_sslcert_viewer_keypress(struct core_window *cw,
- uint32_t ucs4);
-static void atari_sslcert_viewer_mouse_action(struct core_window *cw,
- browser_mouse_state mouse,
- int x, int y);
-static void atari_sslcert_viewer_draw(struct core_window *cw, int x,
- int y, struct rect *clip,
- const struct redraw_context *ctx);
-static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8]);
-
-static struct atari_treeview_callbacks atari_sslcert_viewer_treeview_callbacks = {
- .init_phase2 = atari_sslcert_viewer_init_phase2,
- .finish = atari_sslcert_viewer_finish,
- .draw = atari_sslcert_viewer_draw,
- .keypress = atari_sslcert_viewer_keypress,
- .mouse_action = atari_sslcert_viewer_mouse_action,
- .gemtk_user_func = handle_event
-};
-
-/* static functions */
-static void atari_sslcert_viewer_destroy(struct atari_sslcert_viewer_s * cvwin);
-
-
-static nserror atari_sslcert_viewer_init_phase2(struct core_window *cw,
- struct core_window_callback_table *cb_t)
-{
- struct atari_sslcert_viewer_s *cvwin;
- struct sslcert_session_data *ssl_d;
-
- cvwin = (struct atari_sslcert_viewer_s *)atari_treeview_get_user_data(cw);
-
- assert(cvwin);
-
- ssl_d = cvwin->ssl_session_data;
-
- assert(ssl_d);
-
- NSLOG(netsurf, INFO, "cw %p", cw);
-
- return(sslcert_viewer_init(cb_t, cw, ssl_d));
-}
-
-static void atari_sslcert_viewer_finish(struct core_window *cw)
-{
- struct atari_sslcert_viewer_s *cvwin;
-
- assert(cw);
-
- cvwin = (struct atari_sslcert_viewer_s *)atari_treeview_get_user_data(cw);
-
- /* This will also free the session data: */
- sslcert_viewer_fini(cvwin->ssl_session_data);
-
- NSLOG(netsurf, INFO, "cw %p", cw);
-}
-
-static void atari_sslcert_viewer_draw(struct core_window *cw, int x,
- int y, struct rect *clip,
- const struct redraw_context *ctx)
-{
- struct atari_sslcert_viewer_s *cvwin;
-
- assert(cw);
-
- cvwin = (struct atari_sslcert_viewer_s *)atari_treeview_get_user_data(cw);
-
- assert(cvwin);
-
- sslcert_viewer_redraw(cvwin->ssl_session_data, x, y, clip, ctx);
-}
-
-static void atari_sslcert_viewer_keypress(struct core_window *cw, uint32_t ucs4)
-{
- struct atari_sslcert_viewer_s *cvwin;
-
- assert(cw);
-
- cvwin = (struct atari_sslcert_viewer_s *)atari_treeview_get_user_data(cw);
-
- NSLOG(netsurf, INFO, "ucs4: %"PRIu32, ucs4);
- sslcert_viewer_keypress(cvwin->ssl_session_data, ucs4);
-}
-
-static void atari_sslcert_viewer_mouse_action(struct core_window *cw,
- browser_mouse_state mouse,
- int x, int y)
-{
- struct atari_sslcert_viewer_s *cvwin;
-
- assert(cw);
-
- cvwin = (struct atari_sslcert_viewer_s *)atari_treeview_get_user_data(cw);
-
- sslcert_viewer_mouse_action(cvwin->ssl_session_data, mouse, x, y);
-}
-
-
-static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
-{
- struct core_window *tv=NULL;
- GRECT tb_area;
- GUIWIN * gemtk_win;
- struct atari_sslcert_viewer_s *cvwin = NULL;
- short retval = 0;
- OBJECT *toolbar;
-
- NSLOG(netsurf, INFO, "win %p", win);
-
- if(ev_out->emo_events & MU_MESAG){
- switch (msg[0]) {
-
- case WM_TOOLBAR:
- toolbar = gemtk_obj_get_tree(TOOLBAR_SSL_CERT);
- NSLOG(netsurf, INFO, "CERTVIEWER WM_TOOLBAR");
- tv = (struct core_window*) gemtk_wm_get_user_data(win);
- assert(tv);
- cvwin = (struct atari_sslcert_viewer_s *)
- atari_treeview_get_user_data(tv);
- switch (msg[4]) {
-
- case TOOLBAR_SSL_CERT_TRUSTED:
-
- if (toolbar[msg[4]].ob_state & OS_SELECTED) {
-
- } else {
-
- }
- break;
- }
-
-
- gemtk_win = atari_treeview_get_gemtk_window(tv);
- assert(gemtk_win);
- //gemtk_obj_get_tree(TOOLBAR_HOTLIST)[msg[4]].ob_state &= ~OS_SELECTED;
- atari_treeview_get_grect(tv, TREEVIEW_AREA_TOOLBAR, &tb_area);
- evnt_timer(150);
- gemtk_wm_exec_redraw(gemtk_win, &tb_area);
- retval = 1;
- break;
-
- case WM_CLOSED:
- // TODO set perrmissions
- toolbar = gemtk_obj_get_tree(TOOLBAR_SSL_CERT);
- tv = (struct core_window*) gemtk_wm_get_user_data(win);
- assert(tv);
- cvwin = (struct atari_sslcert_viewer_s *)
- atari_treeview_get_user_data(tv);
- if (toolbar[TOOLBAR_SSL_CERT_TRUSTED].ob_state & OS_SELECTED) {
- sslcert_viewer_accept(cvwin->ssl_session_data);
- } else {
- sslcert_viewer_reject(cvwin->ssl_session_data);
- }
- atari_sslcert_viewer_destroy(cvwin);
- retval = 1;
- break;
-
- default: break;
- }
- }
-
- return(retval);
-}
-
-static void atari_sslcert_viewer_init(struct atari_sslcert_viewer_s * cvwin,
- struct sslcert_session_data *ssl_d)
-{
- assert(cvwin->init == false);
- assert(cvwin->window == NULL);
- assert(cvwin->tv == NULL);
-
- int flags = ATARI_TREEVIEW_WIDGETS;
- short handle = -1;
- OBJECT * tree = gemtk_obj_get_tree(TOOLBAR_SSL_CERT);
- assert( tree );
-
- handle = wind_create(flags, 0, 0, desk_area.g_w, desk_area.g_h);
- cvwin->window = gemtk_wm_add(handle,
- GEMTK_WM_FLAG_DEFAULTS, NULL);
- if (cvwin->window == NULL ) {
- gemtk_msg_box_show(GEMTK_MSG_BOX_ALERT,
- "Failed to allocate Treeview:\nCertviewer");
- return;
- }
- wind_set_str(handle, WF_NAME, (char*)"SSL Certificate");
- gemtk_wm_set_toolbar(cvwin->window, tree, 0, 0);
- gemtk_wm_unlink(cvwin->window);
-
- cvwin->ssl_session_data = ssl_d;
- cvwin->tv = atari_treeview_create(cvwin->window,
- &atari_sslcert_viewer_treeview_callbacks,
- cvwin, flags);
-
- if (cvwin->tv == NULL) {
- /* handle it properly, clean up previous allocs */
- NSLOG(netsurf, INFO, "Failed to allocate treeview");
- return;
- }
-
- cvwin->init = true;
-}
-
-/*
- * documented in certview.h
- */
-void atari_sslcert_viewer_open(struct sslcert_session_data *ssl_d)
-{
- struct atari_sslcert_viewer_s * cvwin;
-
- cvwin = calloc(1, sizeof(struct atari_sslcert_viewer_s));
-
- assert(cvwin);
-
- atari_sslcert_viewer_init(cvwin, ssl_d);
-
- if (atari_treeview_is_open(cvwin->tv) == false) {
-
- GRECT pos;
- pos.g_x = desk_area.g_w - desk_area.g_w / 4;
- pos.g_y = desk_area.g_y;
- pos.g_w = desk_area.g_w / 4;
- pos.g_h = desk_area.g_h;
-
- atari_treeview_open(cvwin->tv, &pos);
- } else {
- wind_set(gemtk_wm_get_handle(cvwin->window), WF_TOP, 1, 0,
- 0, 0);
- }
-}
-
-
-static void atari_sslcert_viewer_destroy(struct atari_sslcert_viewer_s * cvwin)
-{
- assert(cvwin);
- assert(cvwin->init);
- assert(cvwin->window);
-
- NSLOG(netsurf, INFO, "cvwin %p", cvwin);
-
- if (atari_treeview_is_open(cvwin->tv))
- atari_treeview_close(cvwin->tv);
- wind_delete(gemtk_wm_get_handle(cvwin->window));
- gemtk_wm_remove(cvwin->window);
- cvwin->window = NULL;
- atari_treeview_delete(cvwin->tv);
- free(cvwin);
- NSLOG(netsurf, INFO, "done");
-}
diff --git a/frontends/atari/certview.h b/frontends/atari/certview.h
deleted file mode 100644
index ff15d8076..000000000
--- a/frontends/atari/certview.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2013 Ole Loots <ole@monochrom.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef CERTVIEW_H_INCLUDED
-#define CERTVIEW_H_INCLUDED
-
-#include <inttypes.h>
-#include <sys/types.h>
-#include <string.h>
-
-
-#include "assert.h"
-#include "utils/nsoption.h"
-#include "utils/log.h"
-#include "desktop/sslcert_viewer.h"
-
-struct core_window;
-
-struct atari_sslcert_viewer_s {
- GUIWIN * window;
- //struct atari_treeview_window *tv;/*< The hotlist treeview handle. */
- struct core_window *tv;
- struct sslcert_session_data *ssl_session_data;
- bool init;
-};
-
-/**
- * Initializes and opens an certificate inspector window
- * \param ssl_d ssl session data created by sslcert_viewer_create_session_data
- *
- * The window takes ownership of the session data and free's the memory on exit.
- */
-void atari_sslcert_viewer_open(struct sslcert_session_data *ssl_d);
-
-
-#endif // CERTVIEW_H_INCLUDED
diff --git a/frontends/atari/cookies.c b/frontends/atari/cookies.c
index df2de0d4c..05ec8550b 100644
--- a/frontends/atari/cookies.c
+++ b/frontends/atari/cookies.c
@@ -36,8 +36,7 @@ struct atari_cookie_manager_s atari_cookie_manager;
/* Setup Atari Treeview Callbacks: */
-static nserror atari_cookie_manager_init_phase2(struct core_window *cw,
- struct core_window_callback_table * default_callbacks);
+static nserror atari_cookie_manager_init_phase2(struct core_window *cw);
static void atari_cookie_manager_finish(struct core_window *cw);
static void atari_cookie_manager_keypress(struct core_window *cw,
uint32_t ucs4);
@@ -60,11 +59,10 @@ static struct atari_treeview_callbacks atari_cookie_manager_treeview_callbacks =
static nserror
-atari_cookie_manager_init_phase2(struct core_window *cw,
- struct core_window_callback_table *cb_t)
+atari_cookie_manager_init_phase2(struct core_window *cw)
{
NSLOG(netsurf, INFO, "cw %p", cw);
- return(cookie_manager_init(cb_t, cw));
+ return(cookie_manager_init(cw));
}
diff --git a/frontends/atari/file.c b/frontends/atari/file.c
index 235d8240f..81b67e86c 100644
--- a/frontends/atari/file.c
+++ b/frontends/atari/file.c
@@ -234,7 +234,7 @@ static nserror atari_mkdir_all(const char *fname)
dname = strdup(fname);
- sep = strrchr(dname, '/');
+ sep = strrchr(dname, '\\');
if (sep == NULL) {
/* no directory separator path is just filename so its ok */
free(dname);
@@ -251,13 +251,13 @@ static nserror atari_mkdir_all(const char *fname)
}
return NSERROR_NOT_DIRECTORY;
}
- *sep = '/'; /* restore separator */
+ *sep = '\\'; /* restore separator */
sep = dname;
- while (*sep == '/') {
+ while (*sep == '\\') {
sep++;
}
- while ((sep = strchr(sep, '/')) != NULL) {
+ while ((sep = strchr(sep, '\\')) != NULL) {
*sep = 0;
if (stat(dname, &sb) != 0) {
if (nsmkdir(dname, S_IRWXU) != 0) {
@@ -272,9 +272,9 @@ static nserror atari_mkdir_all(const char *fname)
return NSERROR_NOT_DIRECTORY;
}
}
- *sep = '/'; /* restore separator */
+ *sep = '\\'; /* restore separator */
/* skip directory separators */
- while (*sep == '/') {
+ while (*sep == '\\') {
sep++;
}
}
diff --git a/frontends/atari/gui.c b/frontends/atari/gui.c
index a5df8fcb0..3e4893bb0 100644
--- a/frontends/atari/gui.c
+++ b/frontends/atari/gui.c
@@ -29,6 +29,7 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/corestrings.h"
+#include "utils/nsoption.h"
#include "netsurf/browser_window.h"
#include "netsurf/layout.h"
#include "netsurf/window.h"
@@ -52,7 +53,6 @@
#include "atari/toolbar.h"
#include "atari/hotlist.h"
#include "atari/cookies.h"
-#include "atari/certview.h"
#include "atari/history.h"
#include "atari/encoding.h"
#include "atari/res/netsurf.rsh"
@@ -66,6 +66,7 @@
#include "atari/filetype.h"
#include "atari/bitmap.h"
#include "atari/font.h"
+#include "atari/treeview.h"
#include "cflib.h"
static bool atari_quit = false;
@@ -761,33 +762,6 @@ static void gui_set_clipboard(const char *buffer, size_t length,
}
}
-static nserror
-gui_cert_verify(nsurl *url, const struct ssl_cert_info *certs,
- unsigned long num, nserror (*cb)(bool proceed, void *pw),
- void *cbpw)
-{
- struct sslcert_session_data *data;
- NSLOG(netsurf, INFO, "url %s", nsurl_access(url));
-
- // TODO: localize string
- int b = form_alert(1, "[2][SSL Verify failed, continue?][Continue|Abort|Details...]");
- if(b == 1){
- // Accept
- urldb_set_cert_permissions(url, true);
- cb(true, cbpw);
- } else if(b == 2) {
- // Reject
- urldb_set_cert_permissions(url, false);
- cb(false, cbpw);
- } else if(b == 3) {
- // Inspect
- sslcert_viewer_create_session_data(num, url, cb, cbpw, certs,
- &data);
- atari_sslcert_viewer_open(data);
- }
- return NSERROR_OK;
-}
-
void gui_set_input_gui_window(struct gui_window *gw)
{
NSLOG(netsurf, INFO, "Setting input window from: %p to %p\n",
@@ -1134,6 +1108,7 @@ int main(int argc, char** argv)
struct netsurf_table atari_table = {
.misc = &atari_misc_table,
.window = &atari_window_table,
+ .corewindow = atari_core_window_table,
.clipboard = &atari_clipboard_table,
.download = atari_download_table,
.fetch = &atari_fetch_table,
diff --git a/frontends/atari/history.c b/frontends/atari/history.c
index ec602684f..100d1a192 100644
--- a/frontends/atari/history.c
+++ b/frontends/atari/history.c
@@ -36,11 +36,10 @@ struct atari_global_history_s atari_global_history;
/* Setup Atari Treeview Callbacks: */
static nserror
-atari_global_history_init_phase2(struct core_window *cw,
- struct core_window_callback_table *cb_t)
+atari_global_history_init_phase2(struct core_window *cw)
{
NSLOG(netsurf, INFO, "cw %p", cw);
- return(global_history_init(cb_t, cw));
+ return(global_history_init(cw));
}
static void atari_global_history_finish(struct core_window *cw)
diff --git a/frontends/atari/hotlist.c b/frontends/atari/hotlist.c
index 3a54c98eb..920490b7e 100644
--- a/frontends/atari/hotlist.c
+++ b/frontends/atari/hotlist.c
@@ -47,8 +47,7 @@ const char *tree_hotlist_path;
struct atari_hotlist hl;
/* Setup Atari Treeview Callbacks: */
-static nserror atari_hotlist_init_phase2(struct core_window *cw,
- struct core_window_callback_table * default_callbacks);
+static nserror atari_hotlist_init_phase2(struct core_window *cw);
static void atari_hotlist_finish(struct core_window *cw);
static void atari_hotlist_keypress(struct core_window *cw,
uint32_t ucs4);
@@ -69,11 +68,10 @@ static struct atari_treeview_callbacks atari_hotlist_treeview_callbacks = {
.gemtk_user_func = handle_event
};
-static nserror atari_hotlist_init_phase2(struct core_window *cw,
- struct core_window_callback_table *cb_t)
+static nserror atari_hotlist_init_phase2(struct core_window *cw)
{
NSLOG(netsurf, INFO, "cw:%p", cw);
- return hotlist_manager_init(cb_t, cw);
+ return hotlist_manager_init(cw);
}
static void atari_hotlist_finish(struct core_window *cw)
diff --git a/frontends/atari/plot/font_freetype.c b/frontends/atari/plot/font_freetype.c
index f8109f6f2..3ff4ab115 100644
--- a/frontends/atari/plot/font_freetype.c
+++ b/frontends/atari/plot/font_freetype.c
@@ -25,6 +25,7 @@
#include "utils/log.h"
#include "utils/nsoption.h"
#include "netsurf/mouse.h"
+#include "netsurf/bitmap.h"
#include "netsurf/plot_style.h"
#include "atari/gui.h"
diff --git a/frontends/atari/plot/font_internal.c b/frontends/atari/plot/font_internal.c
index 709697f74..11732c5ea 100644
--- a/frontends/atari/plot/font_internal.c
+++ b/frontends/atari/plot/font_internal.c
@@ -25,6 +25,7 @@
#include "utils/utf8.h"
#include "utils/log.h"
#include "netsurf/mouse.h"
+#include "netsurf/bitmap.h"
#include "netsurf/plot_style.h"
#include "atari/gui.h"
diff --git a/frontends/atari/res/netsurf.rsh b/frontends/atari/res/netsurf.rsh
index c856501ae..be2bc949c 100755
--- a/frontends/atari/res/netsurf.rsh
+++ b/frontends/atari/res/netsurf.rsh
@@ -147,9 +147,6 @@
#define SETTINGS_EDIT_MIN_FONT_SIZE 28 /* FTEXT in tree SETTINGS */
#define SETTINGS_DEC_MIN_FONT_SIZE 29 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_INC_MIN_FONT_SIZE 30 /* BOXCHAR in tree SETTINGS */
-#define SETTINGS_EDIT_MIN_GIF_DELAY 35 /* FTEXT in tree SETTINGS */
-#define SETTINGS_INC_GIF_DELAY 36 /* BOXCHAR in tree SETTINGS */
-#define SETTINGS_DEC_GIF_DELAY 37 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_CB_ENABLE_ANIMATION 40 /* BUTTON in tree SETTINGS */
#define SETTINGS_CB_BG_IMAGES 42 /* BUTTON in tree SETTINGS */
#define SETTINGS_CB_FG_IMAGES 44 /* BUTTON in tree SETTINGS */
diff --git a/frontends/atari/res/netsurf.rsm b/frontends/atari/res/netsurf.rsm
index 6c240d371..3122791f7 100755
--- a/frontends/atari/res/netsurf.rsm
+++ b/frontends/atari/res/netsurf.rsm
@@ -132,9 +132,6 @@ ResourceMaster v3.651
#O 28@29@EDIT_MIN_FONT_SIZE@@
#O 29@27@DEC_MIN_FONT_SIZE@@
#O 30@27@INC_MIN_FONT_SIZE@@
-#O 35@29@EDIT_MIN_GIF_DELAY@@
-#O 36@27@INC_GIF_DELAY@@
-#O 37@27@DEC_GIF_DELAY@@
#O 40@26@CB_ENABLE_ANIMATION@@
#O 42@26@CB_BG_IMAGES@@
#O 44@26@CB_FG_IMAGES@@
diff --git a/frontends/atari/settings.c b/frontends/atari/settings.c
index 7084bacf7..d76468c17 100644
--- a/frontends/atari/settings.c
+++ b/frontends/atari/settings.c
@@ -48,7 +48,6 @@
extern char options[PATH_MAX];
extern GRECT desk_area;
-static float tmp_option_minimum_gif_delay;
static unsigned tmp_option_memory_cache_size;
static unsigned int tmp_option_disc_cache_size;
static unsigned int tmp_option_expire_url;
@@ -308,10 +307,6 @@ static void display_settings(void)
INPUT_MIN_REFLOW_PERIOD_MAX_LEN );
- tmp_option_minimum_gif_delay = (float)nsoption_int(minimum_gif_delay) / (float)100;
- snprintf( spare, 255, "%01.1f", tmp_option_minimum_gif_delay );
- set_text( SETTINGS_EDIT_MIN_GIF_DELAY, spare, 3 );
-
/* "Network" tab: */
set_text( SETTINGS_EDIT_PROXY_HOST, nsoption_charp(http_proxy_host),
INPUT_PROXY_HOST_MAX_LEN );
@@ -464,11 +459,6 @@ static void form_event(int index, int external)
break;
case SETTINGS_CB_ENABLE_ANIMATION:
- if( checked ) {
- ENABLE_OBJ( SETTINGS_EDIT_MIN_GIF_DELAY );
- } else {
- DISABLE_OBJ( SETTINGS_EDIT_MIN_GIF_DELAY );
- }
break;
case SETTINGS_BT_SEL_FONT_RENDERER:
@@ -697,23 +687,6 @@ static void form_event(int index, int external)
OBJ_REDRAW(SETTINGS_EDIT_HISTORY_AGE);
break;
- case SETTINGS_INC_GIF_DELAY:
- case SETTINGS_DEC_GIF_DELAY:
- if( index == SETTINGS_INC_GIF_DELAY )
- tmp_option_minimum_gif_delay += 0.1;
- else
- tmp_option_minimum_gif_delay -= 0.1;
-
- if( tmp_option_minimum_gif_delay < 0.1 )
- tmp_option_minimum_gif_delay = 0.1;
- if( tmp_option_minimum_gif_delay > 9.0 )
- tmp_option_minimum_gif_delay = 9.0;
- snprintf( spare, 255, "%01.1f", tmp_option_minimum_gif_delay );
- set_text( SETTINGS_EDIT_MIN_GIF_DELAY, spare, 3 );
- is_button = true;
- OBJ_REDRAW(SETTINGS_EDIT_MIN_GIF_DELAY);
- break;
-
case SETTINGS_INC_MIN_FONT_SIZE:
case SETTINGS_DEC_MIN_FONT_SIZE:
if( index == SETTINGS_INC_MIN_FONT_SIZE )
@@ -817,8 +790,6 @@ static void apply_settings(void)
OBJ_SELECTED(SETTINGS_CB_TRANSPARENCY));
nsoption_set_bool(animate_images,
OBJ_SELECTED(SETTINGS_CB_ENABLE_ANIMATION));
- nsoption_set_int(minimum_gif_delay,
- (int)(tmp_option_minimum_gif_delay*100+0.5));
/* nsoption_set_bool(incremental_reflow,
OBJ_SELECTED(SETTINGS_CB_INCREMENTAL_REFLOW));*/
nsoption_set_int(min_reflow_period, tmp_option_min_reflow_period);
diff --git a/frontends/atari/treeview.c b/frontends/atari/treeview.c
index 49d26ef5b..77c980f04 100644
--- a/frontends/atari/treeview.c
+++ b/frontends/atari/treeview.c
@@ -484,7 +484,7 @@ atari_treeview_set_scroll(struct core_window *cw, int x, int y)
}
static nserror
-atari_treeview_get_scroll(struct core_window *cw, int *x, int *y)
+atari_treeview_get_scroll(const struct core_window *cw, int *x, int *y)
{
/* TODO */
return NSERROR_NOT_IMPLEMENTED;
@@ -499,7 +499,7 @@ atari_treeview_get_scroll(struct core_window *cw, int *x, int *y)
* \param height to be set to viewport height in px, if non NULL
*/
static nserror
-atari_treeview_get_window_dimensions(struct core_window *cw,
+atari_treeview_get_window_dimensions(const struct core_window *cw,
int *width,
int *height)
{
@@ -531,15 +531,16 @@ atari_treeview_drag_status(struct core_window *cw, core_window_drag_status ds)
/**
* Declare Core Window Callbacks:
*/
-static struct core_window_callback_table cw_t = {
+static struct core_window_table cw_t = {
.invalidate = atari_treeview_invalidate_area,
- .update_size = atari_treeview_update_size,
+ .set_extent = atari_treeview_update_size,
.set_scroll = atari_treeview_set_scroll,
.get_scroll = atari_treeview_get_scroll,
- .get_window_dimensions = atari_treeview_get_window_dimensions,
+ .get_dimensions = atari_treeview_get_window_dimensions,
.drag_status = atari_treeview_drag_status
};
+struct core_window_table *atari_core_window_table = &cw_t;
/* exported interface documented in atari/treeview.h */
struct core_window *
@@ -586,7 +587,7 @@ atari_treeview_create(GUIWIN *win, struct atari_treeview_callbacks * callbacks,
/* event handlers of the treeview: */
/* It would be more simple to not pass around the callbacks */
/* but the treeview constructor requires them for initialization... */
- nserror err = tv->io->init_phase2((struct core_window *)tv, &cw_t);
+ nserror err = tv->io->init_phase2((struct core_window *)tv);
if (err != NSERROR_OK) {
free(tv);
tv = NULL;
diff --git a/frontends/atari/treeview.h b/frontends/atari/treeview.h
index fe267b122..59d718478 100644
--- a/frontends/atari/treeview.h
+++ b/frontends/atari/treeview.h
@@ -22,7 +22,7 @@
#include "atari/gui.h"
#include "atari/gemtk/gemtk.h"
-struct core_window_callback_table;
+extern struct core_window_table *atari_core_window_table;
/**
* Default AES Window widgets for a treeview window, can be passed to
@@ -50,7 +50,7 @@ struct atari_treeview_window;
*/
/** \todo atari add drag_status callback */
-typedef nserror (*atari_treeview_init2_callback)(struct core_window *cw, struct core_window_callback_table * default_callbacks);
+typedef nserror (*atari_treeview_init2_callback)(struct core_window *cw);
typedef void (*atari_treeview_finish_callback)(struct core_window *cw);
typedef void (*atari_treeview_keypress_callback)(struct core_window *cw, uint32_t ucs4);
typedef void (*atari_treeview_mouse_action_callback)(struct core_window *cw, browser_mouse_state mouse, int x, int y);
diff --git a/frontends/atari/verify_ssl.c b/frontends/atari/verify_ssl.c
deleted file mode 100644
index b099fe488..000000000
--- a/frontends/atari/verify_ssl.c
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * Copyright 2010 Ole Loots <ole@monochrom.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdbool.h>
-#include <windom.h>
-
-#include "utils/errors.h"
-#include "utils/utils.h"
-#include "utils/log.h"
-#include "utils/messages.h"
-
-#include "atari/res/netsurf.rsh"
-#include "atari/verify_ssl.h"
-
-/*
- todo: this file need to use the treeview api - complete rework,
- current implementation is not used in any way.
-*/
-
-extern void * h_gem_rsrc;
-extern short atari_plot_vdi_handle;
-
-
-#define CERT_INF_LINES 8
-
-static struct ssl_info_draw_param
-{
- struct ssl_cert_info * cert_infos_n;
- unsigned long num_certs;
- int current;
- int scrollx;
- int cols;
- int scrolly;
- int rows; /* assumed to be 8 */
- OBJECT * tree;
-} dp;
-
-
-static int cert_display_width( struct ssl_cert_info * cert_info )
-{
- int l1, l2;
- int add = 16; /* strlen("Issuer: "); */
-
- l1 = strlen(cert_info->issuer) + add;
- l2 = strlen(cert_info->subject) + add;
- return( MAX(l1, l2) );
-}
-
-
-static void __CDECL cert_info_draw( WINDOW * win, short buf[8], void * data)
-{
- struct ssl_info_draw_param * dp = (struct ssl_info_draw_param *)data;
- GRECT work;
- short pxy[4];
- int maxchars;
- short d, cbh, cbw;
- int i = 0;
- short x,y,w,h;
- int px_ypos;
- char * line = malloc(512);
- if( line == NULL )
- return;
-
- NSLOG(netsurf, INFO,
- "Cert info draw, win: %p, data: %p, scrollx: %d", win, data,
- dp->scrollx);
-
- WindGet( win, WF_WORKXYWH, &x, &y, &w, &h );
- /*using static values here, as RsrcUserDraw has mem leaks & a very small stack */
- pxy[0] = work.g_x = x + 8;
- pxy[1] = work.g_y = y + 80;
- pxy[2] = x + 8 + 272;
- pxy[3] = y + 80 + 176;
- work.g_w = 272;
- work.g_h = 176;
-
- maxchars = (work.g_w / 8)+1;
- vs_clip( atari_plot_vdi_handle, 1,(short*) &pxy );
- vswr_mode( atari_plot_vdi_handle, MD_REPLACE );
- vsf_interior( atari_plot_vdi_handle, 1 );
- vsf_color( atari_plot_vdi_handle, LWHITE );
- v_bar( atari_plot_vdi_handle, (short*)&pxy );
- vst_height( atari_plot_vdi_handle, 16, &d, &d, &cbw, &cbh );
- vst_alignment(atari_plot_vdi_handle, 0, 5, &d, &d );
- vst_color( atari_plot_vdi_handle, BLACK );
- vst_effects( atari_plot_vdi_handle, 0 );
- px_ypos = 0;
- for(i=0; i<CERT_INF_LINES; i++ ) {
- switch( i ) {
- case 0:
- sprintf(line, "Cert Version: %d", dp->cert_infos_n[dp->current].version );
- break;
-
- case 1:
- sprintf(line, "Invalid before: %s", &dp->cert_infos_n[dp->current].not_before );
- break;
-
- case 2:
- sprintf(line, "Invalid after: %s", &dp->cert_infos_n[dp->current].not_after );
- break;
-
- case 3:
- sprintf(line, "Signature type: %d", dp->cert_infos_n[dp->current].sig_type );
- break;
-
- case 4:
- sprintf(line, "Serial: %d", dp->cert_infos_n[dp->current].serial );
- break;
-
- case 5:
- sprintf(line, "Issuer: %s", &dp->cert_infos_n[dp->current].issuer );
- break;
-
- case 6:
- sprintf(line, "Subject: %s", &dp->cert_infos_n[dp->current].subject );
- break;
-
- case 7:
- sprintf(line, "Cert type: %d", dp->cert_infos_n[dp->current].cert_type );
- break;
-
- default:
- break;
- }
- if( (int)strlen(line) > dp->scrollx ) {
- if( dp->scrollx + maxchars < 511 && ( (signed int)strlen(line) - dp->scrollx) > maxchars )
- line[dp->scrollx + maxchars] = 0;
- v_gtext(atari_plot_vdi_handle, work.g_x + 1, work.g_y + px_ypos, &line[dp->scrollx]);
- }
- px_ypos += cbh;
- }
- vst_alignment(atari_plot_vdi_handle, 0, 0, &d, &d );
- vs_clip( atari_plot_vdi_handle, 0, (short*)&pxy );
- free( line );
-}
-
-
-static void do_popup( WINDOW *win, int index, int mode, void *data)
-{
- struct ssl_info_draw_param * dp = (struct ssl_info_draw_param *)data;
- char * items[dp->num_certs];
- short x, y;
- unsigned int i;
- NSLOG(netsurf, INFO, "do_popup: num certs: %d", dp->num_certs);
- for( i = 0; i<dp->num_certs; i++) {
- items[i] = malloc( 48 );
- strncpy(items[i], (char*)&dp->cert_infos_n[i].issuer, 46 );
- }
- objc_offset( FORM(win), index, &x, &y );
- dp->current = MenuPopUp( items, x, y,
- dp->num_certs, MIN( 3, dp->num_certs), 0,
- P_LIST + P_WNDW + P_CHCK );
- ObjcChange( OC_FORM, win, index, NORMAL, TRUE );
- dp->cols = cert_display_width( &dp->cert_infos_n[dp->current] );
- dp->rows = 8;
- dp->scrollx = 0;
- dp->scrolly = 0;
-
- /* Send (!) redraw ( OC_MSG ) */
- ObjcDrawParent( OC_FORM, FORM(win), VERIFY_BOX_DETAILS, 1, 7 | OC_MSG );
- for( i = 0; i<dp->num_certs; i++) {
- free( items[i] );
- }
-}
-
-
-
-bool
-verify_ssl_form_do(const char * url,
- const struct ssl_cert_info * cert_infos_n,
- unsigned long num_certs)
-{
- OBJECT *tree;
- WINDOW * form;
-
- bool bres = false;
- bool cont = true;
- int res = 0;
-
- RsrcGaddr (h_gem_rsrc , R_TREE, VERIFY, &tree);
- ObjcString( tree, VERIFY_LBL_HOST, (char*)url );
- ObjcChange( OC_OBJC, tree, VERIFY_BT_ACCEPT, 0, 0 );
- ObjcChange( OC_OBJC, tree, VERIFY_BT_REJECT, 0, 0 );
- form = FormWindBegin( tree, (char*)"SSL Verify failed" );
-
- dp.cert_infos_n = (struct ssl_cert_info *)cert_infos_n;
- dp.num_certs = num_certs;
- dp.scrollx = 0;
- dp.scrolly = 0;
- dp.current = 0;
- dp.cols = cert_display_width( &dp.cert_infos_n[dp.current] );
- dp.rows = 8;
- dp.tree = tree;
- EvntDataAdd( form, WM_REDRAW, cert_info_draw, (void*)&dp, EV_BOT );
- /* this results in some extended objects which can not be freed: :( */
- /* RsrcUserDraw( OC_FORM, tree, VERIFY_BOX_DETAILS, cert_info_draw,(void*)&dp ) ; */
- ObjcAttachFormFunc( form, VERIFY_BT_NEXT_CERT, do_popup, &dp );
- /*
- ObjcAttachFormFunc( form, VERIFY_BT_NEXT_CERT, do_popup, &dp );
- ObjcAttachFormFunc( form, VERIFY_BT_NEXT_CERT, do_popup, &dp );
- */
- while( cont ) {
- res = FormWindDo( MU_MESAG );
- cont = false;
- switch( res ){
- case VERIFY_BT_ACCEPT:
- bres = true;
- break;
-
- case VERIFY_BT_NEXT_CERT:
- /* select box clicked or dragged... */
- cont = true;
- break;
-
- case VERIFY_BT_REJECT:
- bres = false;
- break;
-
- case VERIFY_BT_SCROLL_D:
- cont = true;
- dp.scrolly += 1;
- ObjcDrawParent( OC_FORM, form, VERIFY_BOX_DETAILS, 1, 7 | OC_MSG );
- break;
-
- case VERIFY_BT_SCROLL_U:
- cont = true;
- dp.scrolly -= 1;
- ObjcDrawParent( OC_FORM, form, VERIFY_BOX_DETAILS, 1, 7 | OC_MSG );
- break;
-
- case VERIFY_BT_SCROLL_R:
- NSLOG(netsurf, INFO, "scroll r!");
- cont = true;
- dp.scrollx += 1;
- if( dp.scrollx > (dp.cols - (272 / 8 )) )
- dp.scrollx -= 1;
- ObjcDrawParent( OC_FORM, form, VERIFY_BOX_DETAILS, 1, 7 | OC_MSG);
- break;
-
- case VERIFY_BT_SCROLL_L:
- cont = true;
- dp.scrollx -= 1;
- if( dp.scrollx < 0 )
- dp.scrollx = 0;
- ObjcDrawParent( OC_FORM, form, VERIFY_BOX_DETAILS, 1, 7 | OC_MSG );
- break;
-
- default:
- break;
- }
- }
- FormWindEnd( );
- return( bres );
-}
diff --git a/frontends/atari/verify_ssl.h b/frontends/atari/verify_ssl.h
deleted file mode 100644
index b69bc9cfb..000000000
--- a/frontends/atari/verify_ssl.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2010 Ole Loots <ole@monochrom.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef NS_VERIFY_SSL_H_INCLUDED
-#define NS_VERIFY_SSL_H_INCLUDED
-
-bool verify_ssl_form_do( const char * url, const struct ssl_cert_info * cert_infos_n , unsigned long num_certs );
-
-#endif