Removed files added by mistake.

This commit is contained in:
Ole Loots 2013-04-25 23:06:59 +02:00
parent aeba307180
commit 9641837022
4 changed files with 0 additions and 4926 deletions

View File

@ -1,120 +0,0 @@
# ----------------------------------------------------------------------------
# Atari target setup
# ----------------------------------------------------------------------------
ifeq ($(ATARI_ARCH),68000)
PRGSUFFIX := 000.app
PKGNAME := ns000.zip
endif
ifeq ($(ATARI_ARCH),68020-60)
CFLAGS += -m68020-60
LDFLAGS += -m68020-60
PRGSUFFIX := 020.app
PKGNAME := ns020.zip
endif
ifeq ($(ATARI_ARCH),5475)
CFLAGS += -mcpu=5475
LDFLAGS += -mcpu=5475
PRGSUFFIX := v4e.app
PKGNAME := nsv4e.zip
endif
# non-pkgconfig components
FREETYPE_FONT_CFLAGS := $(shell freetype-config --cflags) -DWITH_FREETYPE_FONT_DRIVER
SPIDERMONKEY_CFLAGS := -DWITH_MOZJS -DXP_UNIX -DJS_HAS_FILE_OBJECT=0 -DJSOPTION_JIT=0 -DPOSIX_SOURCE -D_BSD_SOURCE
$(eval $(call feature_enabled,MNG,-DWITH_MNG,-lmng,PNG/MNG/JNG (libmng)))
$(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng)))
$(eval $(call feature_enabled,MOZJS,$(SPIDERMONKEY_CFLAGS),-ljs,JavaScript (Spidermonkey)))
$(eval $(call feature_enabled,ATARI_FREETYPE_FONT,$(FREETYPE_FONT_CFLAGS),-lfreetype,(Freetype)))
$(eval $(call feature_enabled,ATARI_NETSURF_FONT,-DWITH_INTERNAL_FONT_DRIVER,,(Internal Font)))
$(eval $(call feature_enabled,ATARI_8BPP_SUPPORT,-DWITH_8BPP_SUPPORT,,(Indexed screen format support)))
# define additional CFLAGS and LDFLAGS requirements for pkg-configed libs here
NETSURF_FEATURE_RSVG_CFLAGS := -DWITH_RSVG
NETSURF_FEATURE_HUBBUB_CFLAGS := -DWITH_HUBBUB
NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
NETSURF_FEATURE_JS_CFLAGS := -DWITH_JS -DJS_HAS_FILE_OBJECT=0
NETSURF_FEATURE_MOZJS_CFLAGS := -DWITH_MOZJS -DJS_HAS_FILE_OBJECT=0
ifeq ($(NETSURF_USE_MOZJS),YES)
NETSURF_USE_JS:=YES
NETSURF_USE_MOZJS:=YES
endif
$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
CFLAGS += -U__STRICT_ANSI__ -std=c99 -I. -Dsmall $(WARNFLAGS) -Dnsatari \
-D_BSD_SOURCE \
-D_XOPEN_SOURCE=600 \
-D_POSIX_C_SOURCE=200112L \
$(shell $(PKG_CONFIG) --cflags libhubbub libcss openssl ) \
$(shell $(PKG_CONFIG) --cflags libxml-2.0 ) \
$(shell $(PKG_CONFIG) --cflags libcurl )
LDFLAGS += -lcflib -lcurl
LDFLAGS += -lcss -lparserutils -ldom -lwapcaplet -lhubbub
LDFLAGS += -lssl -lcrypto
LDFLAGS += -lxml2 -lz -liconv -lcares -lHermes -lwindom -lgem -lm
LDFLAGS += -L$(GCCSDK_INSTALL_ENV)/lib
# S_ATARI are sources purely for the Atari FreeMiNT build
S_ATARI := gui.c findfile.c filetype.c misc.c bitmap.c schedule.c \
download.c thumbnail.c login.c verify_ssl.c treeview.c hotlist.c history.c\
search.c font.c \
plot/plot.c plot/fontplot.c plot/eddi.s \
plot/font_freetype.c plot/font_internal.c \
redrawslots.c encoding.c \
browser_win.c toolbar.c statusbar.c browser.c \
global_evnt.c osspec.c dragdrop.c system_colour.c \
ctxmenu.c save.c settings.c
S_ATARI := $(addprefix atari/,$(S_ATARI))
# This is the final source build list
# Note this is deliberately *not* expanded here as common and image
# are not yet available
SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_ATARI)
EXETARGET := ns$(SUBTARGET)$(PRGSUFFIX)
# ----------------------------------------------------------------------------
# Install target
# ----------------------------------------------------------------------------
<<<<<<< Updated upstream
install-atari:
# ----------------------------------------------------------------------------
# Package target
# ----------------------------------------------------------------------------
package-atari:
=======
ATARI_INSTALL_TARGET_DIR := nsatari.package
ATARI_RES_DIR := atari/res
install-atari: $(PKGNAME)
$(VQ)echo Creating $(PKGNAME)
$(PKGNAME): $(EXETARGET)
$(Q)rm -rf $(ATARI_INSTALL_TARGET_DIR)
$(Q)mkdir $(ATARI_INSTALL_TARGET_DIR)/
$(Q)mkdir $(ATARI_INSTALL_TARGET_DIR)/netsurf
$(Q)mkdir $(ATARI_INSTALL_TARGET_DIR)/netsurf/doc
$(Q)mkdir $(ATARI_INSTALL_TARGET_DIR)/netsurf/download
$(Q)mkdir $(ATARI_INSTALL_TARGET_DIR)/netsurf/res
$(Q)mkdir $(ATARI_INSTALL_TARGET_DIR)/netsurf/res/fonts
#$(Q)mkdir $(ATARI_INSTALL_TARGET_DIR)/netsurf/res/icons
$(Q)touch $(ATARI_INSTALL_TARGET_DIR)/netsurf/res/cookies
$(Q)cp $(ATARI_RES_DIR)/netsurf.rsc $(ATARI_INSTALL_TARGET_DIR)/netsurf/res/netsurf.rsc
$(Q)cp $(ATARI_RES_DIR)/icons/ $(ATARI_INSTALL_TARGET_DIR)/netsurf/res/icons/ -R
$(Q)cp $(EXETARGET) $(ATARI_INSTALL_TARGET_DIR)/netsurf
>>>>>>> Stashed changes

File diff suppressed because it is too large Load Diff

View File

@ -1,375 +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/>.
*
* Module Description:
*
*
*
*/
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdbool.h>
#include <assert.h>
#include "desktop/gui.h"
#include "desktop/browser.h"
#include "desktop/browser_private.h"
#include "desktop/search.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "atari/gui.h"
#include "atari/rootwin.h"
#include "atari/misc.h"
#include "atari/search.h"
#include "atari/gemtk/gemtk.h"
#include "atari/res/netsurf.rsh"
extern struct gui_window * input_window;
extern void * h_gem_rsrc;
extern GRECT desk_area;
static SEARCH_FORM_SESSION current;
static OBJECT *dlgtree;
static GUIWIN *searchwin;
static short h_aes_win;
static void nsatari_search_set_status(bool found, void *p);
static void nsatari_search_set_hourglass(bool active, void *p);
static void nsatari_search_add_recent(const char *string, void *p);
void nsatari_search_set_forward_state(bool active, void *p);
void nsatari_search_set_back_state(bool active, void *p);
static struct gui_search_callbacks nsatari_search_callbacks = {
nsatari_search_set_forward_state,
nsatari_search_set_back_state,
nsatari_search_set_status,
nsatari_search_set_hourglass,
nsatari_search_add_recent
};
/**
* Change the displayed search status.
* \param found search pattern matched in text
* \param p the pointer sent to search_verify_new() / search_create_context()
*/
void nsatari_search_set_status(bool found, void *p)
{
LOG(("%p set status: %d\n", p, found));
}
/**
* display hourglass while searching
* \param active start/stop indicator
* \param p the pointer sent to search_verify_new() / search_create_context()
*/
void nsatari_search_set_hourglass(bool active, void *p)
{
SEARCH_FORM_SESSION s = (SEARCH_FORM_SESSION)p;
LOG((""));
if (active && current != NULL)
gui_window_set_pointer(s->bw->window, GUI_POINTER_PROGRESS);
else
gui_window_set_pointer(s->bw->window, GUI_POINTER_DEFAULT);
}
/**
* add search string to recent searches list
* front is at liberty how to implement the bare notification
* should normally store a strdup() of the string;
* core gives no guarantee of the integrity of the const char *
* \param string search pattern
* \param p the pointer sent to search_verify_new() / search_create_context()
*/
void nsatari_search_add_recent(const char *string, void *p)
{
LOG(("%p add recent: %s\n", p, string));
}
/**
* activate search forwards button in gui
* \param active activate/inactivate
* \param p the pointer sent to search_verify_new() / search_create_context()
*/
void nsatari_search_set_forward_state(bool active, void *p)
{
SEARCH_FORM_SESSION s = (SEARCH_FORM_SESSION)p;
/* deactivate back cb */
LOG(("%p: set forward state: %d\n", p, active));
}
/**
* activate search back button in gui
* \param active activate/inactivate
* \param p the pointer sent to search_verify_new() / search_create_context()
*/
void nsatari_search_set_back_state(bool active, void *p)
{
SEARCH_FORM_SESSION s = (SEARCH_FORM_SESSION)p;
/* deactivate back cb */
LOG(("%p: set back state: %d\n", p, active));
}
/*
void search_redraw(void *session, GRECT *clip)
{
GRECT area, clipped_area;
struct gui_window *gw = input_window;
short pxy[4];
VdiHdl vh;
if(gw == NULL)
return;
window_get_grect(gw->root, BROWSER_AREA_SEARCH, &area);
clipped_area = area;
if (!rc_intersect(clip, &clipped_area)) {
return;
}
OBJECT * tree = get_tree(SEARCH);
tree->ob_x = area.g_x;
tree->ob_y = area.g_y;
tree->ob_width = area.g_w;
tree->ob_height = area.g_h;
objc_draw_grect(tree, 0, 8, &clipped_area);
}
*/
static SEARCH_FORM_SESSION get_search_session(GUIWIN * win)
{
return (current);
}
static void set_text( short idx, char * text, int len )
{
char spare[255];
if( len > 254 )
len = 254;
if( text != NULL ){
strncpy(spare, text, 254);
} else {
strcpy(spare, "");
}
set_string(dlgtree, idx, spare);
}
static void destroy_search_session(SEARCH_FORM_SESSION s)
{
if(s != NULL ){
LOG((""));
free(s);
}
}
static int apply_form(GUIWIN *win, struct s_search_form_state * s)
{
OBJECT * obj = dlgtree;
char * cstr;
if( obj == NULL ){
goto error;
}
s->flags = 0;
if( (obj[SEARCH_CB_FWD].ob_state & OS_SELECTED) != 0 )
s->flags = SEARCH_FLAG_FORWARDS;
if( (obj[SEARCH_CB_CASESENSE].ob_state & OS_SELECTED) != 0 )
s->flags |= SEARCH_FLAG_CASE_SENSITIVE;
if( (obj[SEARCH_CB_SHOWALL].ob_state & OS_SELECTED) != 0 )
s->flags |= SEARCH_FLAG_SHOWALL;
cstr = get_text(dlgtree, SEARCH_TB_SRCH);
snprintf(s->text, 31, "%s", cstr);
return ( 0 );
error:
s->flags = SEARCH_FLAG_FORWARDS;
strncpy((char*)&s->text[0], "", 31 );
return( 1 );
}
/* checks for search parameters changes */
static bool form_changed(GUIWIN * w)
{
bool check;
struct s_search_form_state cur;
SEARCH_FORM_SESSION s = get_search_session(w);
if( s == NULL )
return false;
OBJECT * obj = dlgtree;
assert(s != NULL && obj != NULL);
uint32_t flags_old = s->state.flags;
apply_form(w, &cur);
/* adjust the forward flag, it should not init an new search */
flags_old |= SEARCH_FLAG_FORWARDS;
cur.flags |= SEARCH_FLAG_FORWARDS;
if( cur.flags != flags_old ){
return( true );
}
char * cstr;
cstr = get_text(obj, SEARCH_TB_SRCH);
if (cstr != NULL){
if (strcmp(cstr, (char*)&s->state.text) != 0) {
return (true);
}
}
return( false );
}
static void __CDECL evnt_bt_srch_click(GUIWIN * win, int index, int unused, void *unused2)
{
bool fwd;
SEARCH_FORM_SESSION s = get_search_session(searchwin);
OBJECT * obj = dlgtree;
search_flags_t flags = 0;
if( form_changed(searchwin) ){
browser_window_search_destroy_context(s->bw);
apply_form(searchwin, &s->state);
} else {
/* get search direction manually: */
if( (obj[SEARCH_CB_FWD].ob_state & OS_SELECTED) != 0 )
s->state.flags |= SEARCH_FLAG_FORWARDS;
else
s->state.flags &= (~SEARCH_FLAG_FORWARDS);
}
if( browser_window_search_verify_new(s->bw, &nsatari_search_callbacks, s) ){
browser_window_search_step(s->bw, s->state.flags, get_text(obj, SEARCH_TB_SRCH));
}
}
static void __CDECL evnt_cb_click(GUIWIN *win, int index, int unused, void *unused2)
{
short newstate;
}
static void __CDECL evnt_close(GUIWIN *win, short buff[8])
{
}
void search_destroy(struct gui_window *gw)
{
/* Free Search Contexts */
/* todo: destroy search context, if any? */
LOG((""));
if (current != NULL){
destroy_search_session(current);
current = NULL;
}
guiwin_remove(searchwin);
searchwin = NULL;
wind_close(h_aes_win);
wind_delete(h_aes_win);
h_aes_win = -1;
LOG(("done"));
}
SEARCH_FORM_SESSION open_browser_search(struct gui_window * gw)
{
char * title;
SEARCH_FORM_SESSION sfs;
GRECT pos, treesize;
uint32_t kind = CLOSER | NAME | MOVER;
if (dlgtree == NULL) {
dlgtree = get_tree(SEARCH);
if (dlgtree == NULL) {
return( NULL );
}
}
if(searchwin){
search_destroy(gw);
}
sfs = calloc(1, sizeof(struct s_search_form_session));
if( sfs == NULL )
return( NULL );
title = (char*)messages_get("FindTextNS");
if (title == NULL)
title = (char*)"Find text ...";
/* setup dipslay position: right corner */
treesize.g_x = 0;
treesize.g_y = 0;
treesize.g_w = dlgtree->ob_width;
treesize.g_h = dlgtree->ob_height;
wind_calc_grect(WC_BORDER, kind, &treesize, &pos);
pos.g_x = desk_area.g_w - pos.g_w;
pos.g_y = desk_area.g_h - pos.g_h;
/* create the dialog: */
h_aes_win = wind_create_grect(kind, &pos);
wind_set_str(h_aes_win, WF_NAME, title);
current = sfs;
sfs->bw = gw->browser->bw;
/*
sfs->formwind = mt_FormCreate( &app, tree, WAT_FORM,
NULL, title,
&pos, true, false);
*/
/*
ObjcAttachFormFunc(sfs->formwind, SEARCH_BT_SEARCH, evnt_bt_srch_click,
NULL);
ObjcAttachFormFunc(sfs->formwind, SEARCH_CB_CASESENSE, evnt_cb_click, NULL);
ObjcAttachFormFunc(sfs->formwind, SEARCH_CB_SHOWALL, evnt_cb_click, NULL);
ObjcAttachFormFunc(sfs->formwind, SEARCH_CB_FWD, evnt_cb_click, NULL);
EvntAdd(sfs->formwind, WM_CLOSED, evnt_close, EV_TOP);
*/
apply_form(searchwin, &sfs->state );
set_text(SEARCH_TB_SRCH, (char*)"", 31);
return(current);
}

View File

@ -1,52 +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/>.
*
* Module Description:
*
*
*
*/
#ifndef NS_ATARI_SEARCH_H
#define NS_ATARI_SEARCH_H
#define SEARCH_MAX_SLEN 24
struct gui_window;
struct browser_window;
struct s_search_form_state
{
char text[32];
uint32_t flags;
};
struct s_search_form_session {
struct browser_window * bw;
struct s_search_form_state state;
};
typedef struct s_search_form_session * SEARCH_FORM_SESSION;
SEARCH_FORM_SESSION open_browser_search(struct gui_window * gw);
void search_destroy(struct gui_window * gw);
struct s_search_session
#endif