netsurf: branch master updated. release/3.6-485-g1a57d0a
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/1a57d0ab7af89b2896fac...
...commit http://git.netsurf-browser.org/netsurf.git/commit/1a57d0ab7af89b2896facbc...
...tree http://git.netsurf-browser.org/netsurf.git/tree/1a57d0ab7af89b2896facbc71...
The branch, master has been updated
via 1a57d0ab7af89b2896facbc71ef9f29584969470 (commit)
from 83b0dd2409cd69dc02bea193625d438c34ca87ab (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=1a57d0ab7af89b2896f...
commit 1a57d0ab7af89b2896facbc71ef9f29584969470
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Updated Italian translation from Samir
diff --git a/resources/FatMessages b/resources/FatMessages
index 8f3c64a..99189db 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -36,8 +36,9 @@
# Globals
en.all.NetSurf:NetSurf
-en.all.NetSurfCopyright:© 2003-2016 The NetSurf Developers
-nl.all.NetSurfCopyright:© 2003-2016 De NetSurf-ontwikkelaars
+en.all.NetSurfCopyright:© 2003-2017 The NetSurf Developers
+nl.all.NetSurfCopyright:© 2003-2017 De NetSurf-ontwikkelaars
+it.all.NetSurfCopyright:© 2003-2017 A cura degli sviluppatori di NetSurf
# Menus
@@ -524,12 +525,12 @@ nl.all.Selection:Selectie
en.ro.SelectAll:Select all ^A
de.ro.SelectAll:Alles auswählen ^A
fr.ro.SelectAll:Tout sélectionner ^A
-it.ro.SelectAll:Seleziona Tutto ^A
+it.ro.SelectAll:Seleziona tutto ^A
nl.ro.SelectAll:Selecteer alles ^A
en.ro.Clear:Clear selection ^Z
de.ro.Clear:Auswahl aufheben ^Z
fr.ro.Clear:Effacer la sélection ^Z
-it.ro.Clear:Cancella selezione ^Z
+it.ro.Clear:Annulla selezione ^Z
nl.ro.Clear:Deselecteer ^Z
en.ro.Copy:Copy to clipboard ^C
de.ro.Copy:Auswahl kopieren ^C
@@ -615,7 +616,7 @@ nl.all.Link:Koppeling
en.all.All:All
de.all.All:Alles
fr.all.All:Tout
-it.all.All:Tutte
+it.all.All:Tutti
nl.all.All:Alles
en.all.Folders:Directories
de.all.Folders:Verzeichnisse
@@ -670,12 +671,12 @@ nl.all.ProxyNoAuth:Eenvoudige proxy
en.all.ProxyBasic:Basic authentication
de.all.ProxyBasic:mit Authentifizierung
fr.all.ProxyBasic:Authentification de base
-it.all.ProxyBasic:Autentificato di base
+it.all.ProxyBasic:Autentificazione base
nl.all.ProxyBasic:Basisauthenticatie
en.all.ProxyNTLM:NTLM authentication
de.all.ProxyNTLM:NTLM Authentifizierung
fr.all.ProxyNTLM:Authentification NTLM
-it.all.ProxyNTLM:Autentificato NTLM
+it.all.ProxyNTLM:Autentificazione NTLM
nl.all.ProxyNTLM:NTLM-authenticatie
#
# Fonts pane
@@ -814,7 +815,7 @@ nl.all.PasteNS:Plak in
en.all.SelectAllNS:Select all
de.all.SelectAllNS:Alles auswählen
fr.all.SelectAllNS:Sélectionner tout
-it.all.SelectAllNS:Seleziona Tutto
+it.all.SelectAllNS:Seleziona tutto
nl.all.SelectAllNS:Selecteer alles
en.all.ClearNS:Clear selection
de.all.ClearNS:Auswahl rückgängig
@@ -969,7 +970,7 @@ nl.ami.SaveIFF:Bewaar als IFF...
en.all.SaveComplete:Save complete...
de.all.SaveComplete:Speichern abgeschlossen...
fr.all.SaveComplete:Enregistrement terminé...
-it.all.SaveComplete:Salva Tutto...
+it.all.SaveComplete:Salva tutto...
nl.all.SaveComplete:Bewaar alles...
en.all.Close:Close
de.all.Close:Schließen
@@ -979,7 +980,7 @@ nl.all.Close:Sluit
en.ami.CloseInactive:Close inactive tabs
de.ami.CloseInactive:Close inactive tabs
fr.ami.CloseInactive:Close inactive tabs
-it.ami.CloseInactive:Close inactive tabs
+it.ami.CloseInactive:Chiudi schede inattive
nl.ami.CloseInactive:Close inactive tabs
en.all.ObjShow:Show object
de.all.ObjShow:Zeige Objekt
@@ -1283,6 +1284,7 @@ nl.all.TreeviewLabelFolder:Map:
# Cookie Manager field values
#
en.all.CookieManagerSession:Session
+it.all.CookieManagerSession:Sessione
en.all.CookieManagerHTTPS:Secure hosts via https only
de.all.CookieManagerHTTPS:Secure hosts via https only
fr.all.CookieManagerHTTPS:Hôtes sécurisés via https uniquement
@@ -1322,7 +1324,7 @@ nl.all.NewFolderName:Nieuwe map
en.all.NoTitle:<No title>
de.all.NoTitle:<No title>
fr.all.NoTitle:<Sans titre>
-it.all.NoTitle:<Nessun titolo>
+it.all.NoTitle:<Senza titolo>
nl.all.NoTitle:<Naamloos>
@@ -1343,12 +1345,12 @@ nl.all.TreeHotlist:NetSurf-favorieten
en.ami.NetSurfDesc:Small as a mouse, fast as a cheetah and available for free. NetSurf is a multi-platform web browser.
fr.ami.NetSurfDesc:Petit comme une souris, rapide comme un guépard. NetSurf est un navigateur Web multi-plate-forme libre.
-it.ami.NetSurfDesc:Piccolo come un mouse, veloce come un ghepardo. NetSurf è un browser web opensource e multi-piattaforma.
+it.ami.NetSurfDesc:Piccolo come un mouse e veloce come un ghepardo! NetSurf, il browser web opensource e multi-piattaforma
nl.ami.NetSurfDesc:Klein als een muis, snel als een cheetah en gratis beschikbaar. NetSurf is een multi-platform webbrowser.
en.gtk.AboutDesc:NetSurf is a small and fast web browser.
fr.gtk.AboutDesc:NetSurf est un navigateur Web multi-plate-forme libre.
-it.gtk.AboutDesc:NetSurf è un browser web opensource e multi-piattaforma.
+it.gtk.AboutDesc:NetSurf, il browser web opensource e multi-piattaforma
nl.gtk.AboutDesc:NetSurf is een kleine, snelle webbrowser met open broncode.
# Hotlist user interface tokens
@@ -1391,7 +1393,7 @@ nl.all.EditFolder:Hernoem map
en.all.HotlistHomepage:NetSurf homepage
de.all.HotlistHomepage:NetSurf Homepage
fr.all.HotlistHomepage:Page d'accueil de NetSurf
-it.all.HotlistHomepage:Home Page di NetSurf
+it.all.HotlistHomepage:Pagina iniziale di NetSurf
nl.all.HotlistHomepage:NetSurf-startpagina
en.all.HotlistDocumentation:Documentation
de.all.HotlistDocumentation:Dokumentation
@@ -1567,7 +1569,7 @@ nl.all.Abort:Breek af
en.ami.amiDownloading:NetSurf: Downloading...
de.ami.amiDownloading:NetSurf: Downloading...
fr.ami.amiDownloading:NetSurf: Downloading...
-it.ami.amiDownloading:NetSurf: Downloading...
+it.ami.amiDownloading:NetSurf: Scaricamento...
nl.ami.amiDownloading:NetSurf: Downloading...
en.ami.amiDownload:%ld of %ld bytes downloaded
de.ami.amiDownload:%ld von %ld Bytes heruntergeladen
@@ -1797,7 +1799,7 @@ nl.gtk.gtkNavigate:_Ga
en.gtk.gtkTools:_Tools
de.gtk.gtkTools:_Tools
fr.gtk.gtkTools:Ou_tils
-it.gtk.gtkTools:_Tools
+it.gtk.gtkTools:_Strumenti
nl.gtk.gtkTools:E_xtra
en.gtk.gtkHelp:_Help
de.gtk.gtkHelp:_Hilfe
@@ -2105,7 +2107,7 @@ nl.gtk.gtkSaveWindowSize:Vensteromvang ops_laan
en.gtk.gtkDeveloper:De_veloper
de.gtk.gtkDeveloper:De_veloper
fr.gtk.gtkDeveloper:Dé_veloppeur
-it.gtk.gtkDeveloper:De_veloper
+it.gtk.gtkDeveloper:S_viluppatore
nl.gtk.gtkDeveloper:_Internet ontwikkeling
en.gtk.gtkToggleDebugging:T_oggle debug rendering
de.gtk.gtkToggleDebugging:T_oggle debug rendering
@@ -2253,17 +2255,17 @@ nl.gtk.gtkContents:_Inhoud
en.gtk.gtkGuide:User _guide…
de.gtk.gtkGuide:H_andbuch
fr.gtk.gtkGuide:_Guide utilisateur
-it.gtk.gtkGuide:_Guida in linea
+it.gtk.gtkGuide:_Guida in linea...
nl.gtk.gtkGuide:Gebruiks_aanwijzing...
en.gtk.gtkUserInformation:User _information…
de.gtk.gtkUserInformation:Benutzer_information
fr.gtk.gtkUserInformation:_Information utilisateur
-it.gtk.gtkUserInformation:Informazioni _utente
+it.gtk.gtkUserInformation:Informazioni _utente...
nl.gtk.gtkUserInformation:Gebruikers_informatie...
en.gtk.gtkAbout:_About…
de.gtk.gtkAbout:Ü_ber
fr.gtk.gtkAbout:_A propos...
-it.gtk.gtkAbout:_Informazioni
+it.gtk.gtkAbout:_Informazioni...
nl.gtk.gtkAbout:_Programma-informatie...
@@ -2290,12 +2292,12 @@ nl.gtk.gtkSavelink:_Koppeling opslaan als...
en.gtk.gtkBookmarklink:Bookmark _Link
de.gtk.gtkBookmarklink:Bookmark _Link
fr.gtk.gtkBookmarklink:Marquer _Lien
-it.gtk.gtkBookmarklink:Bookmark _Link
+it.gtk.gtkBookmarklink:A_ggiungi ai segnalibri
nl.gtk.gtkBookmarklink:B_ladwijzer voor de koppeling maken
en.gtk.gtkCopylink:Copy link loc_ation
de.gtk.gtkCopylink:Copy link loc_ation
fr.gtk.gtkCopylink:_Copier le lien
-it.gtk.gtkCopylink:Copy link loc_ation
+it.gtk.gtkCopylink:Copia in_dirizzo link
nl.gtk.gtkCopylink:Koppelingsloc_atie kopiëren
@@ -3135,7 +3137,7 @@ nl.all.FrameDrag:frames aan het aanpassen
en.all.Not2xx:Server returned an error
de.all.Not2xx:Server meldet Fehler zurück
fr.all.Not2xx:Le serveur a renvoyé une erreur
-it.all.Not2xx:Il Server ha riportato un errore
+it.all.Not2xx:Il server ha riportato un errore
nl.all.Not2xx:Server meldt een fout
en.all.InvalidURL:The address <em>%s</em> could not be understood.
de.all.InvalidURL:Die Adresse <em>%s</em> konnte nicht ausgewertet werden.
@@ -3222,7 +3224,7 @@ nl.all.NoMemory:NetSurf heeft gebrek aan voldoende geheugen. Maak wat geheugen v
en.ro.LongURL:The URL for this page is too long for NetSurf to display.
de.ro.LongURL:The URL for this page is too long for NetSurf to display.
fr.ro.LongURL:The URL for this page is too long for NetSurf to display.
-it.ro.LongURL:The URL for this page is too long for NetSurf to display.
+it.ro.LongURL:L'URL di questa pagina è troppo lungo per essere visualizzato su NetSurf.
nl.ro.LongURL:Het adres van deze pagina is te lang voor NetSurf om te kunnen tonen.
en.ro.FontBadInst:An error occurred when initialising fonts due to the presence of obsolete copies of the ROM fonts on disc. NetSurf will exit and launch a program which will attempt to fix this.
de.ro.FontBadInst:Font-Initialisierung fehlerhaft. Obsolete Kopien von ROM Fonts auf dem lokalem Speichermedium. Fehlerbehebung startet.
@@ -3312,7 +3314,7 @@ nl.all.EncNotRec:Codeertype is niet herkend.
en.all.FileOpenError:could not open file '%s'
de.all.FileOpenError:Datei ist nicht zu öffnen: '%s'
fr.all.FileOpenError:ne parvient pas à ouvrir le fichier '%s'
-it.all.FileOpenError:impossibile aprire il file '%s'
+it.all.FileOpenError:Impossibile aprire il file '%s'
nl.all.FileOpenError:kan bestand '%s' niet openen
en.all.DirectoryError:directory '%s' already exists
de.all.DirectoryError:Verzeichnis '%s' existiert bereits.
@@ -3332,7 +3334,7 @@ nl.ami.CompError:Niet te openen
en.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
de.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
fr.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
-it.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
+it.ami.BMConvErr:NetSurf richiede guigfx.library per la visualizzazione delle immagini in questa modalità
nl.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
en.ami.MultiTabClose:Are you sure you want to close multiple tabs?
de.ami.MultiTabClose:Are you sure you want to close multiple tabs?
@@ -3375,7 +3377,7 @@ nl.all.OverwriteFile:Een bestand met deze naam bestaat al en zal door deze actie
en.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
de.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
fr.all.RemoveHotlist:Êtes-vous sûr de vouloir supprimer l'adresse de la liste critique?
-it.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
+it.all.RemoveHotlist:Sei sicuro di voler rimuovere questo indirizzo dai segnalibri?
nl.all.RemoveHotlist:Zeker weten dat dit adres uit de favorietenlijst verwijderd moet worden?
# Page fetching
@@ -3483,10 +3485,12 @@ nl.all.ParsingFail:fout bij ontleden van dit document.
en.all.CSSGeneric:Error processing CSS
fr.all.CSSGeneric:Erreur lors du traitement CSS
nl.all.CSSGeneric:fout bij het verwerken van de CSS
+it.all.CSSGeneric:Errore nell'elaborazione del CSS
en.all.CSSBase:Base stylesheet failed to load
fr.all.CSSBase:Échec de chargement de la feuille de style de base
nl.all.CSSBase:basisstijlblad kan niet worden geladen
+it.all.CSSBase:Impossibile caricare il foglio di stile base
en.all.BadGIF:Reading GIF failed.
de.all.BadGIF:Lesen einer GIF Datei fehlgeschlagen.
@@ -3639,7 +3643,7 @@ nl.all.HTTP407:Authenticatie op de proxy-server verplicht
en.all.HTTP408:Request timeout
de.all.HTTP408:Request timeout
fr.all.HTTP408:Délai de requête trop long
-it.all.HTTP408:Richiesta TimeOut
+it.all.HTTP408:Timeout della richiesta
nl.all.HTTP408:Aanvraagtijd verstreken
en.all.HTTP409:Conflict
de.all.HTTP409:Conflict
@@ -3709,7 +3713,7 @@ nl.all.HTTP503:Dienst niet beschikbaar
en.all.HTTP504:Gateway timeout
de.all.HTTP504:Gateway timeout
fr.all.HTTP504:Délai passerelle expiré
-it.all.HTTP504:TimeOut Gateway
+it.all.HTTP504:Timeout Gateway
nl.all.HTTP504:Aanvraagtijd bij Gateway verstreken
en.all.HTTP505:HTTP version not supported
de.all.HTTP505:HTTP version not supported
@@ -3925,12 +3929,12 @@ nl.all.DontReplace:Annuleer bewaaractie
en.all.Remove:Remove address
de.all.Remove:Remove address
fr.all.Remove:Enlever/retirer une adresse
-it.all.Remove:Remove address
+it.all.Remove:Rimuovi indirizzo
nl.all.Remove:Verwijder adres
en.all.DontRemove:Don't remove
de.all.DontRemove:Don't remove
fr.all.DontRemove:Ne pas enlever/retirer
-it.all.DontRemove:Don't remove
+it.all.DontRemove:Non rimuovere
nl.all.DontRemove:Niet verwijderen
en.all.obj:object
de.all.obj:Objekt
@@ -3960,7 +3964,7 @@ nl.all.OK:OK
en.ami.More:More
de.ami.More:More
fr.ami.More:More
-it.ami.More:More
+it.ami.More:Di più
nl.ami.More:Meer
@@ -4047,12 +4051,12 @@ nl.ro.HelpToolbar16:Dit is de Activiteitsindicator.|MDeze indicator beweegt zola
en.ro.HelpToolbarFav:\TFavicon: a small logo supplied by the current site, if available.
de.ro.HelpToolbarFav:\TFavicon: a small logo supplied by the current site, if available.
fr.ro.HelpToolbarFav:\TFavicon: a small logo supplied by the current site, if available.
-it.ro.HelpToolbarFav:\TFavicon: a small logo supplied by the current site, if available.
+it.ro.HelpToolbarFav:\TFavicon: un piccolo logo fornito dal sito, se disponibile.
nl.ro.HelpToolbarFav:Dit is het websitesymbool: een kleine logo dat meegeleverd wordt met de website, voorzover beschikbaar.
en.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
de.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
fr.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
-it.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
+it.ro.HelpToolbarHot:\Tindicatore segnalibri: se acceso significa che il corrente indirizzo � presente nei segnalibri.|M\Sper aggiungere il corrente indirizzo ai segnalibri.|M\Aper rimuovere il corrente indirizzo dai segnalibri.
nl.ro.HelpToolbarHot:Dit is de favorietenindicator: wanneer deze oplicht, staat het webadres al in de favorietenlijst.|MKlik met KIES om het adres aan de favorietenlijst toe te voegen.|MKlik met PASAAN om het adres uit de favorietenlijst te verwijderen.
en.ro.HelpStatus0:\Tstatus bar resizer.|MDrag to alter the size of the status bar.
@@ -4180,7 +4184,7 @@ nl.ro.HelpBrowserMenu0-6:Klik met KIES om deze pagina in een nieuw browservenste
en.ro.HelpBrowserMenu0-7:\Rsearch for instances of a string of text on the page.
de.ro.HelpBrowserMenu0-7:Erlaubt das Suchen einer Zeichenkette im Text des aktuellen Browserfensters.
fr.ro.HelpBrowserMenu0-7:\Rchercher un fragment de texte sur la page.
-it.ro.HelpBrowserMenu0-7:\Rcerca una stringa di testo all'interno della pagina web
+it.ro.HelpBrowserMenu0-7:\Rcerca una stringa di testo all'interno della pagina
nl.ro.HelpBrowserMenu0-7:Verplaats de muispijl naar rechts om een stuk tekst binnen de pagina op te zoeken.
en.ro.HelpBrowserMenu0-8:\Sview the source code of the current page in a text editor.
de.ro.HelpBrowserMenu0-8:Lädt den Quellcode der Seite in einen Editor.
@@ -4190,12 +4194,12 @@ nl.ro.HelpBrowserMenu0-8:Klik met KIES om de broncode van deze pagina in een tek
en.ro.HelpBrowserMenu1:\Rsee the options relating to the current item.
de.ro.HelpBrowserMenu1:Untermenü Objekt.|MMenöpunkte beziehen sich auf das aktuelle Objekt.
fr.ro.HelpBrowserMenu1:\Rvoir les options correspondant à l'objet courant.
-it.ro.HelpBrowserMenu1:\Rmostra opzioni relative al corrente oggetto
+it.ro.HelpBrowserMenu1:\Rmostra opzioni relative all'oggetto corrente.
nl.ro.HelpBrowserMenu1:Verplaats de muispijl naar rechts om de mogelijkheden bij dit item te tonen.
en.ro.HelpBrowserMenu1-0-0:\Rsee information about the current item.
de.ro.HelpBrowserMenu1-0-0:Informationen zum aktuellen Objekt zeigen.
fr.ro.HelpBrowserMenu1-0-0:\Rvoir les informations sur l'objet en cours.
-it.ro.HelpBrowserMenu1-0-0:\Rmostra informazioni relative al corrente oggetto
+it.ro.HelpBrowserMenu1-0-0:\Rmostra informazioni relative all'oggetto corrente.
nl.ro.HelpBrowserMenu1-0-0:Verplaats de muispijl naar rechts om informatie over dit item te tonen.
en.ro.HelpBrowserMenu1-0-1:\Rsave the current item.
de.ro.HelpBrowserMenu1-0-1:Abspeichern des Objektes (Original).
@@ -4220,22 +4224,22 @@ nl.ro.HelpBrowserMenu1-0-2-1:Verplaats de muispijl naar rechts om de afbeelding
en.ro.HelpBrowserMenu1-0-3:\Rsave the address of the current item.
de.ro.HelpBrowserMenu1-0-3:Die Adresse des Objektes speichern.
fr.ro.HelpBrowserMenu1-0-3:\Rsauver l'adresse de l'objet courant.
-it.ro.HelpBrowserMenu1-0-3:\Rsalva l'indirizzo del corrente oggetto
+it.ro.HelpBrowserMenu1-0-3:\Rsalva l'indirizzo dell'oggetto corrente.
nl.ro.HelpBrowserMenu1-0-3:Verplaats de muispijl naar rechts om het adres van dit item te bewaren.
en.ro.HelpBrowserMenu1-0-3-0:\Rsave the current item's address in Acorn URI format.
de.ro.HelpBrowserMenu1-0-3-0:Speichert die Adresse des Objektes im Acorn URI Format.
fr.ro.HelpBrowserMenu1-0-3-0:\Rsauver l'adresse de l'objet courant au format Acorn URI.
-it.ro.HelpBrowserMenu1-0-3-0:\Rsalva l'indirizzo del corrente oggetto nel formato Acorn URI
+it.ro.HelpBrowserMenu1-0-3-0:\Rsalva l'indirizzo dell'oggetto corrente nel formato Acorn URI
nl.ro.HelpBrowserMenu1-0-3-0:Verplaats de muispijl naar rechts om het adres van dit item in AcornURI-vorm te bewaren.
en.ro.HelpBrowserMenu1-0-3-1:\Rsave the current item's address in Ant URL format.
de.ro.HelpBrowserMenu1-0-3-1:Speichert die Adresse des Objektes im Ant URL Format.
fr.ro.HelpBrowserMenu1-0-3-1:\Rsauver l'adresse de l'objet courant au format Ant URL.
-it.ro.HelpBrowserMenu1-0-3-1:\Rsalva l'indirizzo del corrente oggetto nel formato Ant URL
+it.ro.HelpBrowserMenu1-0-3-1:\Rsalva l'indirizzo dell'oggetto corrente nel formato Ant URL
nl.ro.HelpBrowserMenu1-0-3-1:Verplaats de muispijl naar rechts om het adres van dit item in AntURL-vorm te bewaren.
en.ro.HelpBrowserMenu1-0-3-2:\Rsave the current item's address as plain text.
de.ro.HelpBrowserMenu1-0-3-2:Speichert die Adresse des Objektes als Text.
fr.ro.HelpBrowserMenu1-0-3-2:\Rsauver l'adresse de l'objet courant en texte simple.
-it.ro.HelpBrowserMenu1-0-3-2:\Rsalva l'indirizzo del corrente oggetto come file di testo
+it.ro.HelpBrowserMenu1-0-3-2:\Rsalva l'indirizzo dell'oggetto corrente come file di testo
nl.ro.HelpBrowserMenu1-0-3-2:Verplaats de muispijl naar rechts om het adres van dit item als platte tekst te bewaren.
en.ro.HelpBrowserMenu1-0-4:\Sreload all the items on this page.
de.ro.HelpBrowserMenu1-0-4:Anklicken mit AUSWAHL um alle Objekte der Seite erneut zu laden.
@@ -4245,7 +4249,7 @@ nl.ro.HelpBrowserMenu1-0-4:Klik met KIES om alle items van deze pagina opnieuw o
en.ro.HelpBrowserMenu1-1:\Rsee the options relating to the current link.
de.ro.HelpBrowserMenu1-1:Optionen für den aktuellen Verweis
fr.ro.HelpBrowserMenu1-1:\Rsee the options relating to the current link.
-it.ro.HelpBrowserMenu1-1:\Rmostra opzioni relative al corrente link
+it.ro.HelpBrowserMenu1-1:\Rmostra opzioni relative al link corrente.
nl.ro.HelpBrowserMenu1-1:Verplaats de muispijl naar rechts om de mogelijkheden bij deze koppeling te tonen.
en.ro.HelpBrowserMenu1-1-0:\Rsave the current link.
de.ro.HelpBrowserMenu1-1-0:Die Adresse des aktuellen Verweises abspeichern.
@@ -4280,7 +4284,7 @@ nl.ro.HelpBrowserMenu1-1-2:Klik met KIES om deze koppeling in een nieuw browserv
en.ro.HelpBrowserMenu2:\Rsee the selection options.
de.ro.HelpBrowserMenu2:Optionen für die manuell markierten Webseitenbereiche
fr.ro.HelpBrowserMenu2:\Rsee the selection options.
-it.ro.HelpBrowserMenu2:\Rmostra opzioni di selezione
+it.ro.HelpBrowserMenu2:\Rmostra le opzioni di selezione
nl.ro.HelpBrowserMenu2:Verplaats de muispijl naar rechts om de selectiemogelijkheden te tonen.
en.ro.HelpBrowserMenu2-0:\Rsave the current selection.
de.ro.HelpBrowserMenu2-0:Die aktuell markierten Bereiche abspeichern.
@@ -4305,12 +4309,12 @@ nl.ro.HelpBrowserMenu2-3:Klik met KIES om de tekst van het klembord hier in te v
en.ro.HelpBrowserMenu2-4:\Sdeselect the current selection.
de.ro.HelpBrowserMenu2-4:\Sdeselect the current selection.
fr.ro.HelpBrowserMenu2-4:\Sdeselect the current selection.
-it.ro.HelpBrowserMenu2-4:\Sdeselect the current selection.
+it.ro.HelpBrowserMenu2-4:\Sdeseleziona la selezione corrente.
nl.ro.HelpBrowserMenu2-4:Klik met KIES om de gekozen selectie te deselecteren.
en.ro.HelpBrowserMenu2-5:\Sselect all text on the current page, without the contents of text input fields.|MWhen the carret is at a text input field, all text in that field is selected.
de.ro.HelpBrowserMenu2-5:\Sselect all text on the current page, without the contents of text input fields.|MWhen the carret is at a text input field, all text in that field is selected.
fr.ro.HelpBrowserMenu2-5:\Sselect all text on the current page, without the contents of text input fields.|MWhen the carret is at a text input field, all text in that field is selected.
-it.ro.HelpBrowserMenu2-5:\Sselect all text on the current page, without the contents of text input fields.|MWhen the carret is at a text input field, all text in that field is selected.
+it.ro.HelpBrowserMenu2-5:\Sseleziona tutto il testo della pagina corrente escludendo i contenuti di testo nei campi di input.|MQualora il caret sia in un campo di inserimento testo allora verrà selezionato tutto il testo in quel campo.
nl.ro.HelpBrowserMenu2-5:Klik met KIES om alle tekst op de pagina, uitgezonderd de invoervelden te selecteren.|MWanneer het inlasteken in een invoerveld staat, wordt alle tekst in het veld geselecteerd.
en.ro.HelpBrowserMenu3:\Rsee the navigation options.
de.ro.HelpBrowserMenu3:Untermenü Navigieren.
@@ -4340,7 +4344,7 @@ nl.ro.HelpBrowserMenu3-3:Klik met KIES om 1 niveau omhoog te gaan in de websiteh
en.ro.HelpBrowserMenu3-4:\Sfetch the current page again.
de.ro.HelpBrowserMenu3-4:Lädt die aktuelle Seite erneut.|MDie Seite wird aktualisiert. Ältere Informationen zu dieser Seite, die noch im lokalen Zwischenpuffer gespeichert sind, werden dabei überschrieben.
fr.ro.HelpBrowserMenu3-4:\Srecommencer le chargement de la page courante.
-it.ro.HelpBrowserMenu3-4:\Sottieni nuovamente la corrente pagina.
+it.ro.HelpBrowserMenu3-4:\Sottieni nuovamente la pagina corrente.
nl.ro.HelpBrowserMenu3-4:Klik met KIES om deze pagina opnieuw op te halen.
en.ro.HelpBrowserMenu3-5:\Sstop NetSurf from continuing to load this page.
de.ro.HelpBrowserMenu3-5:Unterbricht den Ladevorgang und alle anderen Prozesse im aktuellen Browserfenster.
@@ -4365,7 +4369,7 @@ nl.ro.HelpBrowserMenu4-1:Verplaats de muispijl naar rechts om de afbeeldingsmoge
en.ro.HelpBrowserMenu4-1-0:\Stoggle the display of foreground images.
de.ro.HelpBrowserMenu4-1-0:\Stoggle the display of foreground images.
fr.ro.HelpBrowserMenu4-1-0:\Stoggle the display of foreground images.
-it.ro.HelpBrowserMenu4-1-0:\Stoggle the display of foreground images.
+it.ro.HelpBrowserMenu4-1-0:\SAlterna la visualizzazione delle immagini in primo piano.
nl.ro.HelpBrowserMenu4-1-0:Klik met KIES om het tonen van voorgrondafbeeldingen aan of uit te zetten.
en.ro.HelpBrowserMenu4-1-1:\Stoggle the display of background images.
de.ro.HelpBrowserMenu4-1-1:Schaltet Hintergrundbilder ein/aus.
@@ -4410,12 +4414,12 @@ nl.ro.HelpBrowserMenu4-3:Verplaats de muispijl naar rechts om de pagina-opbouwme
en.ro.HelpBrowserMenu4-3-0:\Stoggle whether animations are not displayed until all calculations are complete.
de.ro.HelpBrowserMenu4-3-0:Schaltet das Puffern von Objekten ein/aus.|MNachzuzeichnende Objekte, z.B. Bildanimationen oder Textbereiche, werden zwischengespeichert um Flackern zu vermeiden.
fr.ro.HelpBrowserMenu4-3-0:\Sdécider si les animations sont affichées quand tous les calculs sont terminés (ou avant).
-it.ro.HelpBrowserMenu4-3-0:\Simposta la non visualizzazione delle animazioni fino al completamento dei calcoli.
+it.ro.HelpBrowserMenu4-3-0:\Simposta la non visualizzazione delle animazioni fino al completamento della procedura di calcolo.
nl.ro.HelpBrowserMenu4-3-0:Klik met KIES om animaties pas te tonen, nadat alle opgehaalde paginagegevens zijn verwerkt, aan of uit te zetten.
en.ro.HelpBrowserMenu4-3-1:\Stoggle whether everything is not displayed until all calculations are complete.
de.ro.HelpBrowserMenu4-3-1:Schaltet das Puffern der gesamten Seitenberechnung ein/aus.|MDie komplette Seite wird nach Berechnung und Aufbau zwischengespeichert. Das ist vorteilhaft bei großen Hintergrundbildern und vielen sich überschneidenden Seitenelementen.
fr.ro.HelpBrowserMenu4-3-1:\Sdécider si tout doit être affiché quand tous les calculs sont terminés (ou avant).
-it.ro.HelpBrowserMenu4-3-1:\Simposta la non visualizzazione di tutto il processo fino al completamento dei calcoli.
+it.ro.HelpBrowserMenu4-3-1:\Simposta la non visualizzazione di tutto il processo fino al completamento della procedura di calcolo.
nl.ro.HelpBrowserMenu4-3-1:Klik met KIES om het niet eerder tonen van de gehele pagina, nadat alle opgehaalde paginagegevens zijn verwerkt aan of uit te zetten.
en.ro.HelpBrowserMenu4-4:\Smake your local display options the default options for NetSurf.
de.ro.HelpBrowserMenu4-4:Übernimmt die vorgenommenen Anzeigeeinstellungen als globale Standardwerte für die Darstellung aller weiteren Seiten.
@@ -4470,7 +4474,7 @@ nl.ro.HelpBrowserMenu5-0-1:Klik met KIES om de favorietenlijst te openen.
en.ro.HelpBrowserMenu5-1:\Rview the history options.
de.ro.HelpBrowserMenu5-1:Zugriff auf die History Funktionen.|MIn die History werden bereits besuchte Webseiten eingetragen. Dies erlaubt das einfache Wiederfinden einmal gesehener Web-Inhalte.
fr.ro.HelpBrowserMenu5-1:\Rview the history options.
-it.ro.HelpBrowserMenu5-1:\Rmostra opzioni della cronologia
+it.ro.HelpBrowserMenu5-1:\Rmostra le opzioni della cronologia
nl.ro.HelpBrowserMenu5-1:Verplaats de muispijl naar rechts om de geschiedenismogelijkheden te tonen.
en.ro.HelpBrowserMenu5-1-0:\Sopen the local history \w.
de.ro.HelpBrowserMenu5-1-0:Anklicken mit AUSWAHL öffnet das Fenster mit der lokalen History.|MIn der lokalen History werden alle Webseiten notiert, die mit dem aktuellen Browserfenster bereits besucht worden waren.
@@ -4495,12 +4499,12 @@ nl.ro.HelpBrowserMenu5-2-0:Klik met KIES om het cookiesbeheervenster te openen.
en.ro.HelpBrowserMenu5-2-1:\Sdelete all stored cookies.
de.ro.HelpBrowserMenu5-2-1:\Sdelete all stored cookies.
fr.ro.HelpBrowserMenu5-2-1:\Sdelete all stored cookies.
-it.ro.HelpBrowserMenu5-2-1:\Sdelete all stored cookies.
+it.ro.HelpBrowserMenu5-2-1:\Scancella tutti i cookie salvati.
nl.ro.HelpBrowserMenu5-2-1:Klik met KIES om alle opgeslagen cookies te verwijderen.
en.ro.HelpBrowserMenu6:\Rsee the help resources available.
de.ro.HelpBrowserMenu6:Untermenü Hilfe.|MZeigt Informationen zu und über NetSurf.
fr.ro.HelpBrowserMenu6:\Rvoir l'aide disponible.
-it.ro.HelpBrowserMenu6:\Rmostra documentazione disponibile
+it.ro.HelpBrowserMenu6:\Rmostra la documentazione disponibile
nl.ro.HelpBrowserMenu6:Verplaats de muispijl naar rechts om extra hulp en informatie te raadplegen, indien deze beschikbaar is.
en.ro.HelpBrowserMenu6-0:\Sopen the documentation contents page in a new \w.
de.ro.HelpBrowserMenu6-0:Öffnet die NetSurf Dokumentation in einem neuen Browserfenster.
@@ -4600,12 +4604,12 @@ nl.ro.HelpScaleView3:Klik met KIES om de schaal met 10% per keer te vergroten.
en.ro.HelpScaleView5:Choose whether all frames will also be scaled.
de.ro.HelpScaleView5:Choose whether all frames will also be scaled.
fr.ro.HelpScaleView5:Choose whether all frames will also be scaled.
-it.ro.HelpScaleView5:Choose whether all frames will also be scaled.
+it.ro.HelpScaleView5:Scegli se scalare anche tutti i frame.
nl.ro.HelpScaleView5:Selecteer de optie optie om ook de bijbehorende frames mee te schalen.
en.ro.HelpScaleView7:\Scancel changes.|MThe current scale will not be changed.
de.ro.HelpScaleView7:Klicken mit AUSWAHL um die Skalierung nicht durchzuführen.|MDas Dialogfenster wird geschlossen.|MDie Darstellung der Seite wird unverändert beibehalten.
fr.ro.HelpScaleView7:\Sannuler les changements.|ML'échelle en cours ne sera pas modifiée.
-it.ro.HelpScaleView7:\Sannulla tutte le modifiche.|MLa corrente scala non verrà modificata.
+it.ro.HelpScaleView7:\Sannulla tutte le modifiche.|MLa scala corrente non verrà modificata.
nl.ro.HelpScaleView7:Klik met KIES om dit venster te sluiten zonder dat de gemaakte wijzigingen worden ingesteld.|MDeze schaal wordt niet gewijzigd.
en.ro.HelpScaleView8:\Schange the view to the scale you have chosen.
de.ro.HelpScaleView8:Klicken mit AUSWAHL um die Seite skaliert darzustellen.|MDie Seite wird in der gewählten Vergrößerung angezeigt.
@@ -4630,28 +4634,28 @@ nl.ro.HelpSearch1:Kies of een zoekopdracht rekening moet houden met hoofd- en kl
en.ro.HelpSearch2:\Smove to the next match.
de.ro.HelpSearch2:Klicken mit AUSWAHL findet den nächsten Treffer.
fr.ro.HelpSearch2:\Schercher l'occurence suivante.
-it.ro.HelpSearch2:\Smove to the next match.
+it.ro.HelpSearch2:\Spassa alla prossima occorrenza
nl.ro.HelpSearch2:Klik met KIES om naar de volgende gevonden zoekreeks te gaan.
en.ro.HelpSearch3:\Smove to the previous match.
de.ro.HelpSearch3:Klicken mit AUSWAHL sucht rückwärts im Text.
fr.ro.HelpSearch3:\Schercher l'occurence précédente.
-it.ro.HelpSearch3:\Smove to the previous match.
+it.ro.HelpSearch3:\Spassa alla precedente occorrenza
nl.ro.HelpSearch3:Klik met KIES om naar de vorige gevonden zoekreeks te gaan.
en.ro.HelpSearch4:\Sstop searching and close this \w.
de.ro.HelpSearch4:Klicken mit AUSWAHL bricht die Suche ab und schließt das Fenster.
fr.ro.HelpSearch4:\Sarrêter la recherche et fermer cette fenêtre.
-it.ro.HelpSearch4:\Sstop searching and close this \w.
+it.ro.HelpSearch4:\Sinterrompi la ricerca e chiudi \w.
nl.ro.HelpSearch4:Klik met KIES om het zoeken te stoppen en dit venster te sluiten.
en.ro.HelpHotFolder:Use this \w to set the directory name.
de.ro.HelpHotFolder:Dieses Fenster verwenden, um den Verzeichnis-Namen festzulegen.
fr.ro.HelpHotFolder:Utiliser cette \w pour définir le nom de répertoire.
-it.ro.HelpHotFolder:Use this \w to set the directory name.
+it.ro.HelpHotFolder:Usa questa \w per impostare il nome della directory.
nl.ro.HelpHotFolder:Gebruik dit venster om de mapnaam in te voeren.
en.ro.HelpHotEntry:Use this \w to set the entry details.
de.ro.HelpHotEntry:Dieses Fenster verwenden, um die Details des Eintrages festzulegen.
fr.ro.HelpHotEntry:Utiliser cette \w pour définir les détails de cette entrée.
-it.ro.HelpHotEntry:Use this \w to set the entry details.
+it.ro.HelpHotEntry:Usa questa \w per impostare i dettagli dell'immissione.
nl.ro.HelpHotEntry:Gebruik dit om details van dit item in te voeren.
en.ro.HelpHotlist:\Thotlist management window.
de.ro.HelpHotlist:Das ist das Hotlist Fenster.
@@ -4681,28 +4685,28 @@ nl.ro.HelpHotlist3:Klik met KIES om de details van dit item te verbergen.
en.ro.HelpHotlist4:\Sselect this directory.|MDouble-click \s to open this directory.
de.ro.HelpHotlist4:Klicken mit AUSWAHL markiert dieses Verzeichnis.|MDoppelklicken um das Verzeichnis zu öffnen.
fr.ro.HelpHotlist4:\Ssélectionner ce répertoire.|MDouble-cliquer \s pour ouvrir ce répertoire.
-it.ro.HelpHotlist4:\Sselect this directory.|MDouble-click \s to open this directory.
+it.ro.HelpHotlist4:\Sseleziona questa directory.|MDoppio-click \s per aprire questa directory.
nl.ro.HelpHotlist4:Klik met KIES om deze map te selecteren.|MDubbelklik met KIES om deze map te openen en alle bijbehorende items uit te klappen.
en.ro.HelpHotlist5:\Sselect this entry.|MDouble-click \s to launch this URL.
de.ro.HelpHotlist5:Klicken mit AUSWAHL markiert diesen Eintrag.|MDoppelklicken öffnet diesen Eintrag in einem neuen Browserfenster.
fr.ro.HelpHotlist5:\Ssélectionner cette entrée.|MDouble-cliquer \s pour lancer cette URL.
-it.ro.HelpHotlist5:\Sselect this entry.|MDouble-click \s to launch this URL.
+it.ro.HelpHotlist5:\Sseleziona questo elemento.|MDoppio-click \s per avviare questo URL.
nl.ro.HelpHotlist5:Klik met KIES om dit item te selecteren.|MDubbelklik met om de inhoud van dit adres in een nieuw browservenster te openen.
en.ro.HelpHotlist6:Release the mouse buttons to complete your selection.
de.ro.HelpHotlist6:Maustasten loslassen, um die Auswahl abzuschließen.
fr.ro.HelpHotlist6:Lâcher les boutons de souris pour terminer votre sélection.
-it.ro.HelpHotlist6:Release the mouse buttons to complete your selection.
+it.ro.HelpHotlist6:Rilascia il pulsante dei mouse per completare la selezione.
nl.ro.HelpHotlist6:Laat de muisknop(pen) los om de selectie af te ronden.
en.ro.HelpHotlist7:Release the mouse buttons to move the selection.
de.ro.HelpHotlist7:Maustasten loslassen, um das Verschieben auszuführen.
fr.ro.HelpHotlist7:Lâcher les boutons de souris pour déplacer votre sélection.
-it.ro.HelpHotlist7:Release the mouse buttons to move the selection.
+it.ro.HelpHotlist7:Rilascia il pulsante del mouse per spostare la selezione.
nl.ro.HelpHotlist7:Laat de muisknop(pen) los om de selectie te kunnen verplaatsen.
en.ro.HelpHotToolbar0:\Tdelete button.|M\Sdelete the current selection.
de.ro.HelpHotToolbar0:Löscht die markierten Einträge und Verzeichnisse.
fr.ro.HelpHotToolbar0:\Tle bouton Supprimer.|M\Ssupprimer la sélection courante.
-it.ro.HelpHotToolbar0:\Tdelete button.|M\Sdelete the current selection.
+it.ro.HelpHotToolbar0:\Tcancella pulsante.|M\Scancella la selezione corrente.
nl.ro.HelpHotToolbar0:Dit is de Verwijder-knop.|MKlik met KIES om deze selectie te verwijderen.
en.ro.HelpHotToolbar1:\Texpand entries button.|M\Sexpand all addresses in the hotlist.|M\Acollapse all addresses in the hotlist.|MExpanded addresses show additional details, such as a visit counter.
de.ro.HelpHotToolbar1:Expandiert Einträge.|MKlicken mit AUSWAHL expandiert alle / alle markierten Einträge.|MKlicken mit SPEZIAL faltet alle / alle markierten Einträge zusammen.|MBei expandierten Einträgen werden zusätzliche Informationen angezeigt.
@@ -4717,12 +4721,12 @@ nl.ro.HelpHotToolbar2:Dit is de Open map-knop.|MKlik met KIES om alle mappen in
en.ro.HelpHotToolbar3:\Tlaunch button.|M\Slaunch the current selection.
de.ro.HelpHotToolbar3:Lädt alle markierten Einträge in jeweils ein neues Browserfenster.
fr.ro.HelpHotToolbar3:\Tle bouton de lancement.|M\Slancer (ouvrir) la sélection en cours.
-it.ro.HelpHotToolbar3:\Tlaunch button.|M\Slaunch the current selection.
+it.ro.HelpHotToolbar3:\Tpulsante di avvio.|M\Savvia la selezione corrente.
nl.ro.HelpHotToolbar3:Dit is de Ga naar-knop.|MKlik met KIES om alle pagina's in deze selectie in nieuwe browservensters te openen.
en.ro.HelpHotToolbar4:\Tcreate button.|M\Screate a new directory.
de.ro.HelpHotToolbar4:Erzeugt neue Einträge oder Verzeichnisse.|MKlicken mit AUSWAHL erstellt ein neues Verzeichnis.
fr.ro.HelpHotToolbar4:\Tle bouton Créer.|M\Scréer un nouveau répertoire.
-it.ro.HelpHotToolbar4:\Tcreate button.|M\Screate a new directory.
+it.ro.HelpHotToolbar4:\Tcrea pulsante.|M\Screa una nuova directory.
nl.ro.HelpHotToolbar4:Dit is de Nieuwe map-knop.|MKlik met KIES om een nieuwe map aan te maken.
en.ro.HelpHotlistMenu0:\Rperform an operation on the hotlist.
@@ -4753,7 +4757,7 @@ nl.ro.HelpHotlistMenu0-1:Verplaats de muispijl naar rechts om de favorietenlijst
en.ro.HelpHotlistMenu0-2:\Rexpand items within the hotlist.
de.ro.HelpHotlistMenu0-2:Öffnen von Verzeichnissen und Anzeigen von Zusatzinformationen.
fr.ro.HelpHotlistMenu0-2:\Rdéployer les items dans la liste des favoris.
-it.ro.HelpHotlistMenu0-2:\Rexpand items within the hotlist.
+it.ro.HelpHotlistMenu0-2:\Respandi gli elementi all'interno del segnalibro.
nl.ro.HelpHotlistMenu0-2:Verplaats de muispijl naar rechts om bepaalde items in de favorietenlijst uit te klappen.
en.ro.HelpHotlistMenu0-2-0:\Sopen all directories and show all entry details.
de.ro.HelpHotlistMenu0-2-0:Öffnet alle Verzeichnisse und zeigt zu Einträgen die Zusatzinformationen an.
@@ -4773,12 +4777,12 @@ nl.ro.HelpHotlistMenu0-2-2:Klik met KIES om alle details van de favorieten te to
en.ro.HelpHotlistMenu0-3:\Rcollapse items within the hotlist.
de.ro.HelpHotlistMenu0-3:Schließen von Verzeichnissen und Ausblenden der Zusatzinformationen.
fr.ro.HelpHotlistMenu0-3:\Rregrouper les items dans la liste des favoris.
-it.ro.HelpHotlistMenu0-3:\Rcollapse items within the hotlist.
+it.ro.HelpHotlistMenu0-3:\Rraggruppa gli elementi all'interno del segnalibro.
nl.ro.HelpHotlistMenu0-3:Verplaats de muispijl naar rechts om bepaalde items in de favorietenlijst in te klappen.
en.ro.HelpHotlistMenu0-3-0:\Sclose all directories and hide all entry details.
de.ro.HelpHotlistMenu0-3-0:Schließt alle Verzeichnisse und versteckt die Zusatzinformationen bei Einträgen.
fr.ro.HelpHotlistMenu0-3-0:\Sfermer tous les répertoires et cacher les détails sur les entrées.
-it.ro.HelpHotlistMenu0-3-0:\Sclose all directories and hide all entry details.
+it.ro.HelpHotlistMenu0-3-0:\Schiudi tutte le directory e nascondi tutti i dettagli delle immissioni.
nl.ro.HelpHotlistMenu0-3-0:Klik met KIES om alle mappen te sluiten en alle details in de favorietenlijst te verbergen.
en.ro.HelpHotlistMenu0-3-1:\Sclose all directories.
de.ro.HelpHotlistMenu0-3-1:Schließt alle Verzeichnisse.
@@ -4808,12 +4812,12 @@ nl.ro.HelpHotlistMenu0-4-1:Klik met KIES om de aanpasmodus van de gereedschapbal
en.ro.HelpHotlistMenu1:\Roperate on the current selection.
de.ro.HelpHotlistMenu1:Untermenü Auswahl. Bearbeiten der markierten Hotlist Elemente.
fr.ro.HelpHotlistMenu1:\Ragir sur la sélection en cours.
-it.ro.HelpHotlistMenu1:\Roperate on the current selection.
+it.ro.HelpHotlistMenu1:\Ropera nella selezione corrente.
nl.ro.HelpHotlistMenu1:Verplaats de muispijl naar rechts om een operatie op deze selectie uit te voeren.
en.ro.HelpHotlistMenu1-0:\Redit the current item.
de.ro.HelpHotlistMenu1-0:Ändern des markierten Elementes in der Hotlist.
fr.ro.HelpHotlistMenu1-0:\Rééditer l'item en cours.
-it.ro.HelpHotlistMenu1-0:\Redit the current item.
+it.ro.HelpHotlistMenu1-0:\Rmodifica l'oggetto corrente.
nl.ro.HelpHotlistMenu1-0:Klik met KIES om de naam van dit item te wijzigen
en.ro.HelpHotlistMenu1-1:\Slaunch the current selection.
de.ro.HelpHotlistMenu1-1:Öffnet markierte Einträge in je einem neuen Browserfenster.
@@ -4844,7 +4848,7 @@ nl.ro.HelpHotlistMenu3:Klik met KIES om alle geselecteerde items te deselecteren
en.ro.HelpGHistory:\Tglobal history window.
de.ro.HelpGHistory:Das ist das Fenster der globalen History.
fr.ro.HelpGHistory:\Tla fenêtre d'historique global.
-it.ro.HelpGHistory:\Tfinestra cronologia globale.
+it.ro.HelpGHistory:\Tfinestra della cronologia globale.
nl.ro.HelpGHistory:Dit venster toont de browsergeschiedenis.
en.ro.HelpGHistoryToolbar0:\Tdelete button.|M\Sdelete the current selection.
de.ro.HelpGHistoryToolbar0:Entfernt markierte Bereiche.|MAnklicken mit AUSWAHL löscht die vorher markierten Bereiche aus der History.
@@ -4875,17 +4879,17 @@ nl.ro.HelpGHistoryMenu0:Verplaats de muispijl naar rechts om een operatie uit te
en.ro.HelpGHistoryMenu0-0:\Rexport global history as an HTML file.
de.ro.HelpGHistoryMenu0-0:Speichert die History (global) als HTML Datei.
fr.ro.HelpGHistoryMenu0-0:\Rexporter l'historique global en fichier HTML.
-it.ro.HelpGHistoryMenu0-0:\Rexport global history as an HTML file.
+it.ro.HelpGHistoryMenu0-0:\Resporta la cronologia globale come file HTML.
nl.ro.HelpGHistoryMenu0-0:Verplaats de muispijl naar rechts om de browsergeschiedenis te exporteren als een HTML-bestand.
en.ro.HelpGHistoryMenu0-1:\Rexpand items within global history.
de.ro.HelpGHistoryMenu0-1:Mehr Information anzeigen
fr.ro.HelpGHistoryMenu0-1:\Rdéployer les items de l'historique global.
-it.ro.HelpGHistoryMenu0-1:\Rexpand items within global history.
+it.ro.HelpGHistoryMenu0-1:\Respandi gli elementi all'interno della cronologia globale.
nl.ro.HelpGHistoryMenu0-1:Verplaats de muispijl naar rechts om bepaalde items in de browsergeschiedenis uit te klappen.
en.ro.HelpGHistoryMenu0-1-0:\Sopen all directories and show all entry details.
de.ro.HelpGHistoryMenu0-1-0:Öffnet alle Verzeichnisse und zeigt die Details der Einträge an.
fr.ro.HelpGHistoryMenu0-1-0:\Souvrir tous les répertoires et donner le détail de toutes les entrées.
-it.ro.HelpGHistoryMenu0-1-0:\Sapri tutte le directory e mostra in dettaglio tutte le immissioni
+it.ro.HelpGHistoryMenu0-1-0:\Sapri tutte le directory e mostra in dettaglio tutte le immissioni.
nl.ro.HelpGHistoryMenu0-1-0:Klik met KIES om alle mappen te openen en alle itemdetails te tonen.
en.ro.HelpGHistoryMenu0-1-1:\Sopen all directories.
de.ro.HelpGHistoryMenu0-1-1:Öffnet alle Verzeichnisse.
@@ -4900,7 +4904,7 @@ nl.ro.HelpGHistoryMenu0-1-2:Klik met KIES om alle itemdetails te tonen.
en.ro.HelpGHistoryMenu0-2:\Rcollapse items within global history.
de.ro.HelpGHistoryMenu0-2:Weniger Information anzeigen
fr.ro.HelpGHistoryMenu0-2:\Rregrouper les items de l'historique global.
-it.ro.HelpGHistoryMenu0-2:\Rcollapse items within global history.
+it.ro.HelpGHistoryMenu0-2:\Rraggruppa gli elementi all'interno della cronologia globale.
nl.ro.HelpGHistoryMenu0-2:Verplaats de muispijl naar rechts om bepaalde items in de browsergeschiedenis in te klappen.
en.ro.HelpGHistoryMenu0-2-0:\Sclose all directories and hide all entry details.
de.ro.HelpGHistoryMenu0-2-0:Schließt alle Verzeichnisse und versteckt die Details der Einträge.
@@ -4992,12 +4996,12 @@ nl.ro.HelpCookiesMenu0:Verplaats de muispijl naar rechts om een operatie uit te
en.ro.HelpCookiesMenu0-0:\Rexpand items within the cookie list.
de.ro.HelpCookiesMenu0-0:Menü zum Expandieren der Einträge der Liste.
fr.ro.HelpCookiesMenu0-0:\Rdéployer les items dans la liste de cookies.
-it.ro.HelpCookiesMenu0-0:\Rexpand items within the cookie list.
+it.ro.HelpCookiesMenu0-0:\Respandi gli elementi all'interno della lista dei cookie.
nl.ro.HelpCookiesMenu0-0:Verplaats de muispijl naar rechts om bepaalde items in het cookiesbeheervenster uit te klappen.
en.ro.HelpCookiesMenu0-0-0:\Sopen all directories and show all cookie details.
de.ro.HelpCookiesMenu0-0-0:Klicken mit AUSWAHL öffnet alle Verzeichnisse und zeigt Details zu allen angezeigten Cookies.
fr.ro.HelpCookiesMenu0-0-0:\Souvrir tous les répertoires et montrer le détail de tous les cookies.
-it.ro.HelpCookiesMenu0-0-0:\Sapri tutte le directory e mostra i dettagli di tutti i cookie
+it.ro.HelpCookiesMenu0-0-0:\Sapri tutte le directory e mostra in dettaglio tutti i cookie
nl.ro.HelpCookiesMenu0-0-0:Klik met KIES om alle mappen te openen en alle cookiedetails te tonen.
en.ro.HelpCookiesMenu0-0-1:\Sopen all directories.
de.ro.HelpCookiesMenu0-0-1:Klicken mit AUSWAHL öffnet alle Verzeichnisse.
@@ -5007,12 +5011,12 @@ nl.ro.HelpCookiesMenu0-0-1:Klik met KIES om alle mappen te openen en de bijbehor
en.ro.HelpCookiesMenu0-0-2:\Sshow all cookie details.
de.ro.HelpCookiesMenu0-0-2:Klicken mit AUSWAHL zeigt Details zu allen angezeigten Cookies.
fr.ro.HelpCookiesMenu0-0-2:\Smontrer le détail de tous les cookies.
-it.ro.HelpCookiesMenu0-0-2:\Smostra tutti i cookie in dettaglio
+it.ro.HelpCookiesMenu0-0-2:\Smostra in dettaglio tutti i cookie
nl.ro.HelpCookiesMenu0-0-2:Klik met KIES om alle cookiedetails te tonen.
en.ro.HelpCookiesMenu0-1:\Rcollapse items within the cookie list.
de.ro.HelpCookiesMenu0-1:Menü zum Schließen der Einträge der Liste.
fr.ro.HelpCookiesMenu0-1:\Rregrouper les items dans la liste de cookies.
-it.ro.HelpCookiesMenu0-1:\Rcollapse items within the cookie list.
+it.ro.HelpCookiesMenu0-1:\Rragguppa gli elementi all'interno della lista dei cookie.
nl.ro.HelpCookiesMenu0-1:Verplaats de muispijl naar rechts om bepaalde items in het cookiesbeheervenster in te klappen.
en.ro.HelpCookiesMenu0-1-0:\Sclose all directories and hide all cookie details.
de.ro.HelpCookiesMenu0-1-0:Klicken mit AUSWAHL schließt alle Verzeichnisse und versteckt die Cookiedetails.
@@ -5057,7 +5061,7 @@ nl.ro.HelpCookiesMenu1-0:Klik met KIES om deze geselecteerde cookies te verwijde
en.ro.HelpCookiesMenu2:\Sselect all the items in the cookie list.
de.ro.HelpCookiesMenu2:Klicken mit AUSWAHL markiert alle Cookies als gewählt.
fr.ro.HelpCookiesMenu2:\Ssélectionner tous les items dans la liste de cookies.
-it.ro.HelpCookiesMenu2:\Sseleziona tutti gli oggetti nella lista dei cookie.
+it.ro.HelpCookiesMenu2:\Sseleziona tutti gli oggetti dalla lista dei cookie.
nl.ro.HelpCookiesMenu2:Klik met KIES om alle cookies in het cookiesbeheervenster te selecteren.
en.ro.HelpCookiesMenu3:\Sdeselect all selected items.
de.ro.HelpCookiesMenu3:Klicken mit AUSWAHL macht alle Markierungen rückgängig.
@@ -5068,14 +5072,14 @@ nl.ro.HelpCookiesMenu3:Klik met KIES om alle geselecteerde items te deselecteren
en.ro.HelpAppInfo:\TNetSurf information \w.|MSee the about page for the contributor list and credits.
de.ro.HelpAppInfo:Das ist das Info-Fenster zu NetSurf.|MGenauere Angaben zu den Autoren, Grafikern, Übersetzern, genutzten Libraries etc. gibt es bei "Über NetSurf" im Untermenü Hilfe eines Browserfensters.
fr.ro.HelpAppInfo:\Tla \w d'information de NetSurf.|MVoir la page "À propos de" pour une liste des contributeurs et les remerciements.
-it.ro.HelpAppInfo:\TNetSurf information \w.|MSee the about page for the contributor list and credits.
+it.ro.HelpAppInfo:\TInformazioni su NetSurf \w.|MMostra la pagina delle informazioni e la lista dei ringraziamenti.
nl.ro.HelpAppInfo:Dit is het NetSurf-informatievenster.|MOpen de Bijdragen-pagina voor de lijst met degenen die bijdroegen aan het NetSurf-project.
en.ro.HelpConfigure:\Tconfiguration \w for NetSurf
de.ro.HelpConfigure:Dies ist das Konfigurationsfenster von NetSurf.
fr.ro.HelpConfigure:\Tla fenêtre de configuration pour Netsurf
-it.ro.HelpConfigure:\Tconfiguration \w for NetSurf
+it.ro.HelpConfigure:\Tconfigurazione \w per NetSurf
nl.ro.HelpConfigure:Dit is het NetSurf-instellingenvenster.
en.ro.HelpConfigure0:Cache configuration tool
de.ro.HelpConfigure0:Cachespeicher konfigurieren
@@ -5125,18 +5129,18 @@ nl.ro.HelpConfigure8:Thema-instellingen.|MKlik op dit symbool om een weergavethe
en.ro.HelpConfigure9:Security and Privacy configuration tool
de.ro.HelpConfigure9:Sicherheitseinstellungen und Privatsphäre
fr.ro.HelpConfigure9:Outil de configuration de la sécurité et de la confidentialité
-it.ro.HelpConfigure9:Strumento di configurazione della Sicurezza e Privacy
+it.ro.HelpConfigure9:Strumento di configurazione per Sicurezza e la Privacy
nl.ro.HelpConfigure9:Veiligheid en Privacy-instellingen|MKlik op dit symbool om de veiligheids- en privacyinstellingen aan te passen.
en.ro.HelpCacheConfig:\Tcache configuration \w.
de.ro.HelpCacheConfig:Das ist das Fenster der Cache-Konfiguration.
fr.ro.HelpCacheConfig:\Tla fenêtre de configuration du cache.
-it.ro.HelpCacheConfig:\Tcache configuration \w.
+it.ro.HelpCacheConfig:\Tconfigurazione della cache \w.
nl.ro.HelpCacheConfig:Diverse bufferinstelligen kunnen in dit venster gewijzigd worden.
en.ro.HelpCacheConfig3:\Tamount of memory to be used for caching content.
de.ro.HelpCacheConfig3:Speichergröße, die verwendet wird um Inhalte zwischenzuspeichern.
fr.ro.HelpCacheConfig3:\Tla quantité de mémoire à utiliser pour le contenu du cache.
-it.ro.HelpCacheConfig3:\Tamount of memory to be used for caching content.
+it.ro.HelpCacheConfig3:\Tquantit� di memoria da usare per il contenuto della cache.
nl.ro.HelpCacheConfig3:Dit invoerveld toont de hoeveelheid geheugen die wordt gebruikt om de pagina-inhoud te bufferen.
en.ro.HelpCacheConfig4:\Sreduce the amount of memory.
de.ro.HelpCacheConfig4:Klicken mit AUSWAHL verringert die Größe des Cachespeichers.
@@ -5151,7 +5155,7 @@ nl.ro.HelpCacheConfig5:Klik met KIES om de geheugenruimte groter te maken.
en.ro.HelpCacheConfig10:\Tamount of disc space to be used for caching content between sessions.
de.ro.HelpCacheConfig10:\Tamount of disc space to be used for caching content between sessions.
fr.ro.HelpCacheConfig10:\Tamount of disc space to be used for caching content between sessions.
-it.ro.HelpCacheConfig10:\Tamount of disc space to be used for caching content between sessions.
+it.ro.HelpCacheConfig10:\Tquantit� di spazio su disco da usare per il contenuto della cache tra le sessioni.
nl.ro.HelpCacheConfig10:Dit invoerveld toont de hoeveelheid schijfruimte die wordt gebruikt om de pagina-inhoud tussen sessies te bufferen.
en.ro.HelpCacheConfig11:\Sreduce the amount of memory.
de.ro.HelpCacheConfig11:Klicken mit AUSWAHL verringert die Größe des Cachespeichers.
@@ -5171,12 +5175,12 @@ nl.ro.HelpCacheConfig15:Dit is het maximum aantal dagen dat de gebufferde pagina
en.ro.HelpCacheConfig16:\Sreduce the number of days.
de.ro.HelpCacheConfig16:\Sreduce the number of days.
fr.ro.HelpCacheConfig16:\Sreduce the number of days.
-it.ro.HelpCacheConfig16:\Sreduce the number of days.
+it.ro.HelpCacheConfig16:\Sriduce il numero di giorni.
nl.ro.HelpCacheConfig16:Klik met KIES om het aantal dagen te verlagen.
en.ro.HelpCacheConfig17:\Sincrease the number of days.
de.ro.HelpCacheConfig17:\Sincrease the number of days.
fr.ro.HelpCacheConfig17:\Sincrease the number of days.
-it.ro.HelpCacheConfig17:\Sincrease the number of days.
+it.ro.HelpCacheConfig17:\Saumenta il numero di giorni.
nl.ro.HelpCacheConfig17:Klik met KIES om het aantal dagen te verhogen.
en.ro.HelpCacheConfig19:\Sreset the Cache options back to their default values.
de.ro.HelpCacheConfig19:Stellt die Standardeinstellungen wieder her.
@@ -5197,7 +5201,7 @@ nl.ro.HelpCacheConfig21:Klik met KIES om de gemaakte wijzigingen te bewaren en d
en.ro.HelpConnectConfig:\Tconnection configuration \w
de.ro.HelpConnectConfig:Das ist das Fenster zur Einstellung der Parameter für die Netzanbindung.
fr.ro.HelpConnectConfig:\Tla fenêtre de configuration de connexion.
-it.ro.HelpConnectConfig:\Tconnection configuration \w
+it.ro.HelpConnectConfig:\Tconfigurazione della connessione \w
nl.ro.HelpConnectConfig:Diverse verbindingsinstellingen kunnen in dit venster gewijzigd worden.
en.ro.HelpConnectConfig3:\Tcurrently selected proxy type.|MUse the menu to select a proxy type.
de.ro.HelpConnectConfig3:Aktuell gewählter Proxytyp.|MMit dem Menü kann ein anderer Typ eingestellt werden.
@@ -5262,17 +5266,17 @@ nl.ro.HelpConnectConfig22:Klik met KIES om het maximaal aantal simultaan uit te
en.ro.HelpConnectConfig24:\Tmaximum number of persistent connections.
de.ro.HelpConnectConfig24:Das ist die Maximalzahl aufrechtzuerhaltender Verbindungen.
fr.ro.HelpConnectConfig24:\Tle nombre maximum de connexions persistantes.
-it.ro.HelpConnectConfig24:\Tmaximum number of persistent connections.
+it.ro.HelpConnectConfig24:\Tnumero massimo di connessioni persistenti.
nl.ro.HelpConnectConfig24:Dit is het maximum aantal langdurige verbindingen.
en.ro.HelpConnectConfig25:\Sreduce the maximum number of persistent connections.
de.ro.HelpConnectConfig25:Klicken mit AUSWAHL verringert die Maximalzahl offengehaltener Verbindungen.
fr.ro.HelpConnectConfig25:\Sréduire le nombre maximum de connexions persistantes.
-it.ro.HelpConnectConfig25:\Sreduce the maximum number of persistent connections.
+it.ro.HelpConnectConfig25:\Sriduci il numero massimo di connessioni persistenti.
nl.ro.HelpConnectConfig25:Klik met KIES om het maximum aantal langdurige verbindingen te verlagen.
en.ro.HelpConnectConfig26:\Sincrease the maximum number of persistent connections.
de.ro.HelpConnectConfig26:Klicken mit AUSWAHL vergrößert die Maximalzahl offengehaltener Verbindungen.
fr.ro.HelpConnectConfig26:\Saugmenter le nombre maximum de connexions persistantes.
-it.ro.HelpConnectConfig26:\Sincrease the maximum number of persistent connections.
+it.ro.HelpConnectConfig26:\Saumenta il numero massimo di connessioni persistenti.
nl.ro.HelpConnectConfig26:Klik met KIES om het maximum aantal langdurige verbindingen te verhogen.
en.ro.HelpConnectConfig27:\Sreset the Connection options back to their default values.
de.ro.HelpConnectConfig27:Stellt die Standardeinstellungen wieder her.
@@ -5293,7 +5297,7 @@ nl.ro.HelpConnectConfig29:Klik met KIES om de gemaakte wijzigingen te bewaren en
en.ro.HelpContentConfig:\Tcontent configuration \w
de.ro.HelpContentConfig:Fenster zur Einstellung des Browserverhaltens bei bestimmten Seiteninhalten
fr.ro.HelpContentConfig:\Tla fenêtre de configuration du Contenu
-it.ro.HelpContentConfig:\Tcontent configuration \w
+it.ro.HelpContentConfig:\Tconfigurazione dei contenuti \w
nl.ro.HelpContentConfig:Het gedrag van de browser kan in dit venster gewijzigd worden.
en.ro.HelpContentConfig2:This indicates whether NetSurf will attempt to block advertisements on web pages|MIn rare circumstances, this option may cause valid content to be blocked too.
de.ro.HelpContentConfig2:Stellt ein, ob NetSurf versuchen soll, die auf Webseiten eingeblendete Werbung automatisch zu unterdrücken.|MIn seltenen Fällen wird dadurch jedoch auch 'echter' Seiteninhalt geblockt.
@@ -5338,7 +5342,7 @@ nl.ro.HelpContentConfig11:Deze optie geeft aan of het uitvoeren van JavaScript-s
en.ro.HelpFontConfig:\Tfont configuration \w
de.ro.HelpFontConfig:Konfigurationsfenster zur Einstellung der verwendeten Schriftarten
fr.ro.HelpFontConfig:\Tla fenêtre de configuration de Fontes
-it.ro.HelpFontConfig:\Tfont configuration \w
+it.ro.HelpFontConfig:\Tconfigurazione dei font \w
nl.ro.HelpFontConfig:De instellingen voor de verschillende tekststijlen kunnen in dit venster gewijzigd worden.
en.ro.HelpFontConfig3:\Tcurrently selected sans-serif font.|MNetSurf will use this font wherever a web page specifies a sans-serif typeface.
de.ro.HelpFontConfig3:Das ist die aktuell gewählte Schriftart für Sans-serif.|MNetSurf wird diese Schriftart überall dort verwenden, wo von der Webseite ein Schriftbild in Sans-serif vorgegeben wird.
@@ -5413,7 +5417,7 @@ nl.ro.HelpFontConfig24:Klik met KIES om de standaardlettergrootte te verkleinen
en.ro.HelpFontConfig25:\Sincrease the default font size.
de.ro.HelpFontConfig25:Klicken mit AUSWAHL vergrößert die Standardfontgröße.
fr.ro.HelpFontConfig25:\Saugmenter la taille de fonte.
-it.ro.HelpFontConfig25:\Saumenta la dimensione del font predefinito
+it.ro.HelpFontConfig25:\Saumenta la dimensione del font predefinita
nl.ro.HelpFontConfig25:Klik met KIES om de standaardlettergrootte te vergroten.
en.ro.HelpFontConfig28:You can enter a minimum font size here.|MNetSurf will not allow web pages to display smaller text than this.
de.ro.HelpFontConfig28:Hier kann eine minimale Schriftgröße eingestellt werden.|MNetSurf wird keine Darstellung von noch kleineren Schriften zulassen.
@@ -5449,12 +5453,12 @@ nl.ro.HelpFontConfig34:Klik met KIES om de gemaakte wijzigingen te bewaren en di
en.ro.HelpHomeConfig:\Thome page configuration \w
de.ro.HelpHomeConfig:Homepage Konfiguration
fr.ro.HelpHomeConfig:\Tla fenêtre de configuration de Page d'accueil
-it.ro.HelpHomeConfig:\Thome page configuration \w
+it.ro.HelpHomeConfig:\Tconfigurazione della pagina iniziale \w
nl.ro.HelpHomeConfig:De begin/startpagina kan in dit venster gewijzigd worden.
en.ro.HelpHomeConfig3:You can enter a default home page address here.
de.ro.HelpHomeConfig3:Hier kann die Webadresse der Homepage eingegeben werden.
fr.ro.HelpHomeConfig3:Vous pouvez entrer ici une page d'accueil par défaut.
-it.ro.HelpHomeConfig3:You can enter a default home page address here.
+it.ro.HelpHomeConfig3:Puoi inserire l'indirizzo della pagina iniziale qui.
nl.ro.HelpHomeConfig3:Voer hier een standaard begin-/startpagina-adres in.
en.ro.HelpHomeConfig4:\Sselect a recently typed URL.|MThese addresses have recently been typed into a NetSurf browser \w's URL bar.
de.ro.HelpHomeConfig4:Klicken mit AUSWAHL zur schnellen Auswahl einer Adresse.|MDie angezeigten Adressen wurden in letzter Zeit in die Adressleiste eines Browserfensters eingegeben.
@@ -5485,7 +5489,7 @@ nl.ro.HelpHomeConfig8:Klik met KIES om de gemaakte wijzigingen te bewaren en dit
en.ro.HelpImageConfig:\Timage configuration \w
de.ro.HelpImageConfig:Das ist das Fenster zur Konfiguration der Bilddarstellungsoptionen.
fr.ro.HelpImageConfig:\Tla fenêtre de configuration d'Image
-it.ro.HelpImageConfig:\Timage configuration \w
+it.ro.HelpImageConfig:\Tconfigurazione della immagini \w
nl.ro.HelpImageConfig:De verwerking van afbeeldingen kan in dit venster gewijzigd worden.
en.ro.HelpImageConfig3:\Tcurrently selected foreground image quality.
de.ro.HelpImageConfig3:Das ist die aktuell gewählte Qualität für die Darstellung der Vordergrundbilder.
@@ -5520,12 +5524,12 @@ nl.ro.HelpImageConfig12:In dit veld kan de minimumtijd ingevoerd worden tussen d
en.ro.HelpImageConfig13:\Sreduce the minimum time between animation frames.
de.ro.HelpImageConfig13:Klicken mit AUSWAHL verkleinert die minimale Wartezeit zwischen aufeinanderfolgenden Einzelbildern einer Animation.
fr.ro.HelpImageConfig13:\Sréduire le temps minimum entre deux images d'animation.
-it.ro.HelpImageConfig13:\Sreduce the minimum time between animation frames.
+it.ro.HelpImageConfig13:\Sriduce il tempo di intervallo minimo tra i frame di animazione.
nl.ro.HelpImageConfig13:Klik met KIES om de minimumtijd tussen animatie-afbeeldingen te verkleinen.
en.ro.HelpImageConfig14:\Sincrease the minimum time between animation frames.
de.ro.HelpImageConfig14:Klicken mit AUSWAHL vergrößert die minimale Wartezeit zwischen aufeinanderfolgenden Einzelbildern einer Animation.
fr.ro.HelpImageConfig14:\Saugmenter le temps minimum entre deux images d'animation.
-it.ro.HelpImageConfig14:\Sincrease the minimum time between animation frames.
+it.ro.HelpImageConfig14:\Saumenta il tempo di intervallo minimo tra i frame di animazione.
nl.ro.HelpImageConfig14:Klik met KIES om de minimumtijd tussen animatie-afbeeldingen te vergroten.
en.ro.HelpImageConfig16:This indicates whether NetSurf will disable animations on web pages.|MWhen animations are disabled, NetSurf will show the first frame as a static image.
de.ro.HelpImageConfig16:Erlaubt das Abschalten der Animationsdarstellung auf Webseiten.|MSind die Animationen abgeschaltet, wird von NetSurf lediglich das erste Einzelbild der Animationsfolge als einfaches Bild angezeigt.
@@ -5551,7 +5555,7 @@ nl.ro.HelpImageConfig19:Klik met KIES om de gemaakte wijzigingen te bewaren en d
en.ro.HelpInterfaceConfig:\Tinterface configuration \w
de.ro.HelpInterfaceConfig:Fenster zur Einstellung des Programmverhaltens in ausgewählten Situationen
fr.ro.HelpInterfaceConfig:\Tla fenêtre de configuration d'interface
-it.ro.HelpInterfaceConfig:\Tinterface configuration \w
+it.ro.HelpInterfaceConfig:\Tconfigurazione dell'interfaccia \w
nl.ro.HelpInterfaceConfig:De interface-instellingen kunnen in dit venster gewijzigd worden.
en.ro.HelpInterfaceConfig2:This indicates whether NetSurf will strip file extensions when saving files to disc.
de.ro.HelpInterfaceConfig2:Beim Abspeichern von Dateien auf einen Datenträger werden die Dateinamenserweiterungen (Extensions) aus dem Dateinamen entfernt.
@@ -5607,7 +5611,7 @@ nl.ro.HelpInterfaceConfig18:Voer in dit invoerveld het pad in van een extern pro
en.ro.HelpLanguageConfig:\Tlanguage configuration \w
de.ro.HelpLanguageConfig:Konfigurationsfenster für die Spracheinstellungen
fr.ro.HelpLanguageConfig:\Tfenêtre de configuration de langue.
-it.ro.HelpLanguageConfig:\Tlanguage configuration \w
+it.ro.HelpLanguageConfig:\Tconfigurazione della lingua \w
nl.ro.HelpLanguageConfig:Diverse taalinstellingen kunnen in dit venster gewijzigd worden.
en.ro.HelpLanguageConfig3:\Tcurrently selected interface language.|MThe interface language is the language used for NetSurf's messages and dialogue boxes.
de.ro.HelpLanguageConfig3:Das ist die aktuell eingestellte Sprache für die Bedienoberfläche.|MDiese Sprache wird genutzt, um NetSurf's Meldungen und die Texte der Dialogboxen und Menüs darzustellen.
@@ -5617,7 +5621,7 @@ nl.ro.HelpLanguageConfig3:Dit is momenteel de geselecteerde gebruikersinterfacet
en.ro.HelpLanguageConfig4:\Sselect an interface language.
de.ro.HelpLanguageConfig4:Klicken mit AUSWAHL zum Auswählen einer Oberflächensprache.
fr.ro.HelpLanguageConfig4:\Schoisir une langue d'interface.
-it.ro.HelpLanguageConfig4:\Sselect an interface language.
+it.ro.HelpLanguageConfig4:\Sseleziona un'interfaccia di lingua.
nl.ro.HelpLanguageConfig4:Klik met KIES om de gebruikersinterfacetaal te kiezen.
en.ro.HelpLanguageConfig6:\Tcurrently selected web page language.|MIf a web site provides a choice of languages, NetSurf will request the page in your preferred language.
de.ro.HelpLanguageConfig6:Das ist die aktuelle Sprache zur Anzeige auf Webseiten.|MWenn eine Webseite die Darstellung in verschiedenen Sprachen anbietet, wird NetSurf die Webseite in der hier eingestellten bevorzugten Sprache abrufen.
@@ -5627,7 +5631,7 @@ nl.ro.HelpLanguageConfig6:Dit is momenteel de geselecteerde webpaginataal.|MWann
en.ro.HelpLanguageConfig7:\Sselect a preferred web page language.
de.ro.HelpLanguageConfig7:Klicken mit AUSWAHL zum Auswählen einer Webseitensprache.
fr.ro.HelpLanguageConfig7:\Schoisir une langue de page web préférée.
-it.ro.HelpLanguageConfig7:\Sselect a preferred web page language.
+it.ro.HelpLanguageConfig7:\Sseleziona una lingua preferita per le pagine web.
nl.ro.HelpLanguageConfig7:Klik met KIES om de gewenste webpaginataal te kiezen.
en.ro.HelpLanguageConfig8:\Sreset the Language options back to their default values.
de.ro.HelpLanguageConfig8:Stellt die Standardeinstellungen wieder her.
@@ -5648,7 +5652,7 @@ nl.ro.HelpLanguageConfig10:Klik met KIES om de gemaakte wijzigingen te bewaren e
en.ro.HelpSecurityConfig:\Tsecurity configuration \w
de.ro.HelpSecurityConfig:Fenster zur Konfiguration der Sicherheitseinstellungen
fr.ro.HelpSecurityConfig:\Tla fenêtre de configuration de sécurité
-it.ro.HelpSecurityConfig:\Tsecurity configuration \w
+it.ro.HelpSecurityConfig:\Tconfigurazione di sicurezza \w
nl.ro.HelpSecurityConfig:De privacy- en veiligheidsinstellingen kunnen in dit venster gewijzigd worden.
en.ro.HelpSecurityConfig2:This indicates whether NetSurf will send site referral information to web servers.|MWhen this is enabled NetSurf will tell the web server of a new page the address of the site you came from, after following a link.
de.ro.HelpSecurityConfig2:NetSurf sendet Seitenreferenzinformationen an Webserver.|MIst diese Option gewählt, schickt NetSurf an den Server einer neuen Webseite die Adresse der Seite von der aus die aktuelle über einen Link aufgerufen wurde.
@@ -5663,12 +5667,12 @@ nl.ro.HelpSecurityConfig6:In dit veld kan de tijdsduur ingevoerd worden, dat ite
en.ro.HelpSecurityConfig7:\Sreduce the global history duration.
de.ro.HelpSecurityConfig7:Klicken mit AUSWAHL verkürzt die Aufbewahrungszeit von Seiten in der globalen History.
fr.ro.HelpSecurityConfig7:\Sréduire la durée de l'historique global.
-it.ro.HelpSecurityConfig7:\Sreduce the global history duration.
+it.ro.HelpSecurityConfig7:\Sriduce la durata della cronologia globale.
nl.ro.HelpSecurityConfig7:Klik met KIES om de tijdsduur van de browsergeschiedenis per dag te verminderen.
en.ro.HelpSecurityConfig8:\Sincrease the global history duration.
de.ro.HelpSecurityConfig8:Klicken mit AUSWAHL verlängert die Aufbewahrungszeit von Seiten in der globalen History.
fr.ro.HelpSecurityConfig8:\Saugmenter la durée de l'historique global.
-it.ro.HelpSecurityConfig8:\Sincrease the global history duration.
+it.ro.HelpSecurityConfig8:\Saumenta la durata della cronologia globale.
nl.ro.HelpSecurityConfig8:Klik met KIES om de tijdsduur van de browsergeschiedenis per dag te vermeerderen,
en.ro.HelpSecurityConfig10:\Sreset the Security options back to their default values.
de.ro.HelpSecurityConfig10:Stellt die Standardeinstellungen wieder her.
@@ -5689,7 +5693,7 @@ nl.ro.HelpSecurityConfig12:Klik met KIES om de gemaakte wijzigingen te bewaren e
en.ro.HelpThemeConfig:\Ttheme configuration \w
de.ro.HelpThemeConfig:Fenster zur Auswahl des Anzeigethemas
fr.ro.HelpThemeConfig:\Tla fenêtre de configuration de thème
-it.ro.HelpThemeConfig:\Ttheme configuration \w
+it.ro.HelpThemeConfig:\Tconfigurazione del tema \w
nl.ro.HelpThemeConfig:Het thema kan in dit venster gewijzigd worden.
en.ro.HelpThemeConfig2:\Sreset the Theme options back to their default values.
de.ro.HelpThemeConfig2:Stellt die Standardeinstellungen wieder her.
@@ -5787,7 +5791,7 @@ nl.all.con_fonts:Lettertypen
en.all.con_home:Home page
de.all.con_home:Homepage
fr.all.con_home:Page d'accueil
-it.all.con_home:Home Page
+it.all.con_home:Pagina iniziale
nl.all.con_home:Startpagina
en.all.con_image:Images
de.all.con_image:Bilder
@@ -6175,7 +6179,7 @@ nl.ami.FontAntialiasing:Anti-aliasing (indien mogelijk) gebruiken
en.ami.FontBitmap:Allow bitmap fonts
de.ami.FontBitmap:Allow bitmap fonts
fr.ami.FontBitmap:Allow bitmap fonts
-it.ami.FontBitmap:Allow bitmap fonts
+it.ami.FontBitmap:Permetti font bitmap
nl.ami.FontBitmap:Allow bitmap fonts
# Font scanning
@@ -6380,6 +6384,7 @@ nl.all.Bottom:Onder
en.all.MM:mm
fr.all.MM:mm
nl.all.MM:mm
+it.all.MM:mm
en.all.Scaling:Scaling
de.all.Scaling:Skalierung
-----------------------------------------------------------------------
Summary of changes:
resources/FatMessages | 227 +++++++++++++++++++++++++------------------------
1 file changed, 116 insertions(+), 111 deletions(-)
diff --git a/resources/FatMessages b/resources/FatMessages
index 8f3c64a..99189db 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -36,8 +36,9 @@
# Globals
en.all.NetSurf:NetSurf
-en.all.NetSurfCopyright:© 2003-2016 The NetSurf Developers
-nl.all.NetSurfCopyright:© 2003-2016 De NetSurf-ontwikkelaars
+en.all.NetSurfCopyright:© 2003-2017 The NetSurf Developers
+nl.all.NetSurfCopyright:© 2003-2017 De NetSurf-ontwikkelaars
+it.all.NetSurfCopyright:© 2003-2017 A cura degli sviluppatori di NetSurf
# Menus
@@ -524,12 +525,12 @@ nl.all.Selection:Selectie
en.ro.SelectAll:Select all ^A
de.ro.SelectAll:Alles auswählen ^A
fr.ro.SelectAll:Tout sélectionner ^A
-it.ro.SelectAll:Seleziona Tutto ^A
+it.ro.SelectAll:Seleziona tutto ^A
nl.ro.SelectAll:Selecteer alles ^A
en.ro.Clear:Clear selection ^Z
de.ro.Clear:Auswahl aufheben ^Z
fr.ro.Clear:Effacer la sélection ^Z
-it.ro.Clear:Cancella selezione ^Z
+it.ro.Clear:Annulla selezione ^Z
nl.ro.Clear:Deselecteer ^Z
en.ro.Copy:Copy to clipboard ^C
de.ro.Copy:Auswahl kopieren ^C
@@ -615,7 +616,7 @@ nl.all.Link:Koppeling
en.all.All:All
de.all.All:Alles
fr.all.All:Tout
-it.all.All:Tutte
+it.all.All:Tutti
nl.all.All:Alles
en.all.Folders:Directories
de.all.Folders:Verzeichnisse
@@ -670,12 +671,12 @@ nl.all.ProxyNoAuth:Eenvoudige proxy
en.all.ProxyBasic:Basic authentication
de.all.ProxyBasic:mit Authentifizierung
fr.all.ProxyBasic:Authentification de base
-it.all.ProxyBasic:Autentificato di base
+it.all.ProxyBasic:Autentificazione base
nl.all.ProxyBasic:Basisauthenticatie
en.all.ProxyNTLM:NTLM authentication
de.all.ProxyNTLM:NTLM Authentifizierung
fr.all.ProxyNTLM:Authentification NTLM
-it.all.ProxyNTLM:Autentificato NTLM
+it.all.ProxyNTLM:Autentificazione NTLM
nl.all.ProxyNTLM:NTLM-authenticatie
#
# Fonts pane
@@ -814,7 +815,7 @@ nl.all.PasteNS:Plak in
en.all.SelectAllNS:Select all
de.all.SelectAllNS:Alles auswählen
fr.all.SelectAllNS:Sélectionner tout
-it.all.SelectAllNS:Seleziona Tutto
+it.all.SelectAllNS:Seleziona tutto
nl.all.SelectAllNS:Selecteer alles
en.all.ClearNS:Clear selection
de.all.ClearNS:Auswahl rückgängig
@@ -969,7 +970,7 @@ nl.ami.SaveIFF:Bewaar als IFF...
en.all.SaveComplete:Save complete...
de.all.SaveComplete:Speichern abgeschlossen...
fr.all.SaveComplete:Enregistrement terminé...
-it.all.SaveComplete:Salva Tutto...
+it.all.SaveComplete:Salva tutto...
nl.all.SaveComplete:Bewaar alles...
en.all.Close:Close
de.all.Close:Schließen
@@ -979,7 +980,7 @@ nl.all.Close:Sluit
en.ami.CloseInactive:Close inactive tabs
de.ami.CloseInactive:Close inactive tabs
fr.ami.CloseInactive:Close inactive tabs
-it.ami.CloseInactive:Close inactive tabs
+it.ami.CloseInactive:Chiudi schede inattive
nl.ami.CloseInactive:Close inactive tabs
en.all.ObjShow:Show object
de.all.ObjShow:Zeige Objekt
@@ -1283,6 +1284,7 @@ nl.all.TreeviewLabelFolder:Map:
# Cookie Manager field values
#
en.all.CookieManagerSession:Session
+it.all.CookieManagerSession:Sessione
en.all.CookieManagerHTTPS:Secure hosts via https only
de.all.CookieManagerHTTPS:Secure hosts via https only
fr.all.CookieManagerHTTPS:Hôtes sécurisés via https uniquement
@@ -1322,7 +1324,7 @@ nl.all.NewFolderName:Nieuwe map
en.all.NoTitle:<No title>
de.all.NoTitle:<No title>
fr.all.NoTitle:<Sans titre>
-it.all.NoTitle:<Nessun titolo>
+it.all.NoTitle:<Senza titolo>
nl.all.NoTitle:<Naamloos>
@@ -1343,12 +1345,12 @@ nl.all.TreeHotlist:NetSurf-favorieten
en.ami.NetSurfDesc:Small as a mouse, fast as a cheetah and available for free. NetSurf is a multi-platform web browser.
fr.ami.NetSurfDesc:Petit comme une souris, rapide comme un guépard. NetSurf est un navigateur Web multi-plate-forme libre.
-it.ami.NetSurfDesc:Piccolo come un mouse, veloce come un ghepardo. NetSurf è un browser web opensource e multi-piattaforma.
+it.ami.NetSurfDesc:Piccolo come un mouse e veloce come un ghepardo! NetSurf, il browser web opensource e multi-piattaforma
nl.ami.NetSurfDesc:Klein als een muis, snel als een cheetah en gratis beschikbaar. NetSurf is een multi-platform webbrowser.
en.gtk.AboutDesc:NetSurf is a small and fast web browser.
fr.gtk.AboutDesc:NetSurf est un navigateur Web multi-plate-forme libre.
-it.gtk.AboutDesc:NetSurf è un browser web opensource e multi-piattaforma.
+it.gtk.AboutDesc:NetSurf, il browser web opensource e multi-piattaforma
nl.gtk.AboutDesc:NetSurf is een kleine, snelle webbrowser met open broncode.
# Hotlist user interface tokens
@@ -1391,7 +1393,7 @@ nl.all.EditFolder:Hernoem map
en.all.HotlistHomepage:NetSurf homepage
de.all.HotlistHomepage:NetSurf Homepage
fr.all.HotlistHomepage:Page d'accueil de NetSurf
-it.all.HotlistHomepage:Home Page di NetSurf
+it.all.HotlistHomepage:Pagina iniziale di NetSurf
nl.all.HotlistHomepage:NetSurf-startpagina
en.all.HotlistDocumentation:Documentation
de.all.HotlistDocumentation:Dokumentation
@@ -1567,7 +1569,7 @@ nl.all.Abort:Breek af
en.ami.amiDownloading:NetSurf: Downloading...
de.ami.amiDownloading:NetSurf: Downloading...
fr.ami.amiDownloading:NetSurf: Downloading...
-it.ami.amiDownloading:NetSurf: Downloading...
+it.ami.amiDownloading:NetSurf: Scaricamento...
nl.ami.amiDownloading:NetSurf: Downloading...
en.ami.amiDownload:%ld of %ld bytes downloaded
de.ami.amiDownload:%ld von %ld Bytes heruntergeladen
@@ -1797,7 +1799,7 @@ nl.gtk.gtkNavigate:_Ga
en.gtk.gtkTools:_Tools
de.gtk.gtkTools:_Tools
fr.gtk.gtkTools:Ou_tils
-it.gtk.gtkTools:_Tools
+it.gtk.gtkTools:_Strumenti
nl.gtk.gtkTools:E_xtra
en.gtk.gtkHelp:_Help
de.gtk.gtkHelp:_Hilfe
@@ -2105,7 +2107,7 @@ nl.gtk.gtkSaveWindowSize:Vensteromvang ops_laan
en.gtk.gtkDeveloper:De_veloper
de.gtk.gtkDeveloper:De_veloper
fr.gtk.gtkDeveloper:Dé_veloppeur
-it.gtk.gtkDeveloper:De_veloper
+it.gtk.gtkDeveloper:S_viluppatore
nl.gtk.gtkDeveloper:_Internet ontwikkeling
en.gtk.gtkToggleDebugging:T_oggle debug rendering
de.gtk.gtkToggleDebugging:T_oggle debug rendering
@@ -2253,17 +2255,17 @@ nl.gtk.gtkContents:_Inhoud
en.gtk.gtkGuide:User _guide…
de.gtk.gtkGuide:H_andbuch
fr.gtk.gtkGuide:_Guide utilisateur
-it.gtk.gtkGuide:_Guida in linea
+it.gtk.gtkGuide:_Guida in linea...
nl.gtk.gtkGuide:Gebruiks_aanwijzing...
en.gtk.gtkUserInformation:User _information…
de.gtk.gtkUserInformation:Benutzer_information
fr.gtk.gtkUserInformation:_Information utilisateur
-it.gtk.gtkUserInformation:Informazioni _utente
+it.gtk.gtkUserInformation:Informazioni _utente...
nl.gtk.gtkUserInformation:Gebruikers_informatie...
en.gtk.gtkAbout:_About…
de.gtk.gtkAbout:Ü_ber
fr.gtk.gtkAbout:_A propos...
-it.gtk.gtkAbout:_Informazioni
+it.gtk.gtkAbout:_Informazioni...
nl.gtk.gtkAbout:_Programma-informatie...
@@ -2290,12 +2292,12 @@ nl.gtk.gtkSavelink:_Koppeling opslaan als...
en.gtk.gtkBookmarklink:Bookmark _Link
de.gtk.gtkBookmarklink:Bookmark _Link
fr.gtk.gtkBookmarklink:Marquer _Lien
-it.gtk.gtkBookmarklink:Bookmark _Link
+it.gtk.gtkBookmarklink:A_ggiungi ai segnalibri
nl.gtk.gtkBookmarklink:B_ladwijzer voor de koppeling maken
en.gtk.gtkCopylink:Copy link loc_ation
de.gtk.gtkCopylink:Copy link loc_ation
fr.gtk.gtkCopylink:_Copier le lien
-it.gtk.gtkCopylink:Copy link loc_ation
+it.gtk.gtkCopylink:Copia in_dirizzo link
nl.gtk.gtkCopylink:Koppelingsloc_atie kopiëren
@@ -3135,7 +3137,7 @@ nl.all.FrameDrag:frames aan het aanpassen
en.all.Not2xx:Server returned an error
de.all.Not2xx:Server meldet Fehler zurück
fr.all.Not2xx:Le serveur a renvoyé une erreur
-it.all.Not2xx:Il Server ha riportato un errore
+it.all.Not2xx:Il server ha riportato un errore
nl.all.Not2xx:Server meldt een fout
en.all.InvalidURL:The address <em>%s</em> could not be understood.
de.all.InvalidURL:Die Adresse <em>%s</em> konnte nicht ausgewertet werden.
@@ -3222,7 +3224,7 @@ nl.all.NoMemory:NetSurf heeft gebrek aan voldoende geheugen. Maak wat geheugen v
en.ro.LongURL:The URL for this page is too long for NetSurf to display.
de.ro.LongURL:The URL for this page is too long for NetSurf to display.
fr.ro.LongURL:The URL for this page is too long for NetSurf to display.
-it.ro.LongURL:The URL for this page is too long for NetSurf to display.
+it.ro.LongURL:L'URL di questa pagina è troppo lungo per essere visualizzato su NetSurf.
nl.ro.LongURL:Het adres van deze pagina is te lang voor NetSurf om te kunnen tonen.
en.ro.FontBadInst:An error occurred when initialising fonts due to the presence of obsolete copies of the ROM fonts on disc. NetSurf will exit and launch a program which will attempt to fix this.
de.ro.FontBadInst:Font-Initialisierung fehlerhaft. Obsolete Kopien von ROM Fonts auf dem lokalem Speichermedium. Fehlerbehebung startet.
@@ -3312,7 +3314,7 @@ nl.all.EncNotRec:Codeertype is niet herkend.
en.all.FileOpenError:could not open file '%s'
de.all.FileOpenError:Datei ist nicht zu öffnen: '%s'
fr.all.FileOpenError:ne parvient pas à ouvrir le fichier '%s'
-it.all.FileOpenError:impossibile aprire il file '%s'
+it.all.FileOpenError:Impossibile aprire il file '%s'
nl.all.FileOpenError:kan bestand '%s' niet openen
en.all.DirectoryError:directory '%s' already exists
de.all.DirectoryError:Verzeichnis '%s' existiert bereits.
@@ -3332,7 +3334,7 @@ nl.ami.CompError:Niet te openen
en.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
de.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
fr.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
-it.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
+it.ami.BMConvErr:NetSurf richiede guigfx.library per la visualizzazione delle immagini in questa modalità
nl.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
en.ami.MultiTabClose:Are you sure you want to close multiple tabs?
de.ami.MultiTabClose:Are you sure you want to close multiple tabs?
@@ -3375,7 +3377,7 @@ nl.all.OverwriteFile:Een bestand met deze naam bestaat al en zal door deze actie
en.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
de.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
fr.all.RemoveHotlist:Êtes-vous sûr de vouloir supprimer l'adresse de la liste critique?
-it.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
+it.all.RemoveHotlist:Sei sicuro di voler rimuovere questo indirizzo dai segnalibri?
nl.all.RemoveHotlist:Zeker weten dat dit adres uit de favorietenlijst verwijderd moet worden?
# Page fetching
@@ -3483,10 +3485,12 @@ nl.all.ParsingFail:fout bij ontleden van dit document.
en.all.CSSGeneric:Error processing CSS
fr.all.CSSGeneric:Erreur lors du traitement CSS
nl.all.CSSGeneric:fout bij het verwerken van de CSS
+it.all.CSSGeneric:Errore nell'elaborazione del CSS
en.all.CSSBase:Base stylesheet failed to load
fr.all.CSSBase:Échec de chargement de la feuille de style de base
nl.all.CSSBase:basisstijlblad kan niet worden geladen
+it.all.CSSBase:Impossibile caricare il foglio di stile base
en.all.BadGIF:Reading GIF failed.
de.all.BadGIF:Lesen einer GIF Datei fehlgeschlagen.
@@ -3639,7 +3643,7 @@ nl.all.HTTP407:Authenticatie op de proxy-server verplicht
en.all.HTTP408:Request timeout
de.all.HTTP408:Request timeout
fr.all.HTTP408:Délai de requête trop long
-it.all.HTTP408:Richiesta TimeOut
+it.all.HTTP408:Timeout della richiesta
nl.all.HTTP408:Aanvraagtijd verstreken
en.all.HTTP409:Conflict
de.all.HTTP409:Conflict
@@ -3709,7 +3713,7 @@ nl.all.HTTP503:Dienst niet beschikbaar
en.all.HTTP504:Gateway timeout
de.all.HTTP504:Gateway timeout
fr.all.HTTP504:Délai passerelle expiré
-it.all.HTTP504:TimeOut Gateway
+it.all.HTTP504:Timeout Gateway
nl.all.HTTP504:Aanvraagtijd bij Gateway verstreken
en.all.HTTP505:HTTP version not supported
de.all.HTTP505:HTTP version not supported
@@ -3925,12 +3929,12 @@ nl.all.DontReplace:Annuleer bewaaractie
en.all.Remove:Remove address
de.all.Remove:Remove address
fr.all.Remove:Enlever/retirer une adresse
-it.all.Remove:Remove address
+it.all.Remove:Rimuovi indirizzo
nl.all.Remove:Verwijder adres
en.all.DontRemove:Don't remove
de.all.DontRemove:Don't remove
fr.all.DontRemove:Ne pas enlever/retirer
-it.all.DontRemove:Don't remove
+it.all.DontRemove:Non rimuovere
nl.all.DontRemove:Niet verwijderen
en.all.obj:object
de.all.obj:Objekt
@@ -3960,7 +3964,7 @@ nl.all.OK:OK
en.ami.More:More
de.ami.More:More
fr.ami.More:More
-it.ami.More:More
+it.ami.More:Di più
nl.ami.More:Meer
@@ -4047,12 +4051,12 @@ nl.ro.HelpToolbar16:Dit is de Activiteitsindicator.|MDeze indicator beweegt zola
en.ro.HelpToolbarFav:\TFavicon: a small logo supplied by the current site, if available.
de.ro.HelpToolbarFav:\TFavicon: a small logo supplied by the current site, if available.
fr.ro.HelpToolbarFav:\TFavicon: a small logo supplied by the current site, if available.
-it.ro.HelpToolbarFav:\TFavicon: a small logo supplied by the current site, if available.
+it.ro.HelpToolbarFav:\TFavicon: un piccolo logo fornito dal sito, se disponibile.
nl.ro.HelpToolbarFav:Dit is het websitesymbool: een kleine logo dat meegeleverd wordt met de website, voorzover beschikbaar.
en.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
de.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
fr.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
-it.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
+it.ro.HelpToolbarHot:\Tindicatore segnalibri: se acceso significa che il corrente indirizzo � presente nei segnalibri.|M\Sper aggiungere il corrente indirizzo ai segnalibri.|M\Aper rimuovere il corrente indirizzo dai segnalibri.
nl.ro.HelpToolbarHot:Dit is de favorietenindicator: wanneer deze oplicht, staat het webadres al in de favorietenlijst.|MKlik met KIES om het adres aan de favorietenlijst toe te voegen.|MKlik met PASAAN om het adres uit de favorietenlijst te verwijderen.
en.ro.HelpStatus0:\Tstatus bar resizer.|MDrag to alter the size of the status bar.
@@ -4180,7 +4184,7 @@ nl.ro.HelpBrowserMenu0-6:Klik met KIES om deze pagina in een nieuw browservenste
en.ro.HelpBrowserMenu0-7:\Rsearch for instances of a string of text on the page.
de.ro.HelpBrowserMenu0-7:Erlaubt das Suchen einer Zeichenkette im Text des aktuellen Browserfensters.
fr.ro.HelpBrowserMenu0-7:\Rchercher un fragment de texte sur la page.
-it.ro.HelpBrowserMenu0-7:\Rcerca una stringa di testo all'interno della pagina web
+it.ro.HelpBrowserMenu0-7:\Rcerca una stringa di testo all'interno della pagina
nl.ro.HelpBrowserMenu0-7:Verplaats de muispijl naar rechts om een stuk tekst binnen de pagina op te zoeken.
en.ro.HelpBrowserMenu0-8:\Sview the source code of the current page in a text editor.
de.ro.HelpBrowserMenu0-8:Lädt den Quellcode der Seite in einen Editor.
@@ -4190,12 +4194,12 @@ nl.ro.HelpBrowserMenu0-8:Klik met KIES om de broncode van deze pagina in een tek
en.ro.HelpBrowserMenu1:\Rsee the options relating to the current item.
de.ro.HelpBrowserMenu1:Untermenü Objekt.|MMenöpunkte beziehen sich auf das aktuelle Objekt.
fr.ro.HelpBrowserMenu1:\Rvoir les options correspondant à l'objet courant.
-it.ro.HelpBrowserMenu1:\Rmostra opzioni relative al corrente oggetto
+it.ro.HelpBrowserMenu1:\Rmostra opzioni relative all'oggetto corrente.
nl.ro.HelpBrowserMenu1:Verplaats de muispijl naar rechts om de mogelijkheden bij dit item te tonen.
en.ro.HelpBrowserMenu1-0-0:\Rsee information about the current item.
de.ro.HelpBrowserMenu1-0-0:Informationen zum aktuellen Objekt zeigen.
fr.ro.HelpBrowserMenu1-0-0:\Rvoir les informations sur l'objet en cours.
-it.ro.HelpBrowserMenu1-0-0:\Rmostra informazioni relative al corrente oggetto
+it.ro.HelpBrowserMenu1-0-0:\Rmostra informazioni relative all'oggetto corrente.
nl.ro.HelpBrowserMenu1-0-0:Verplaats de muispijl naar rechts om informatie over dit item te tonen.
en.ro.HelpBrowserMenu1-0-1:\Rsave the current item.
de.ro.HelpBrowserMenu1-0-1:Abspeichern des Objektes (Original).
@@ -4220,22 +4224,22 @@ nl.ro.HelpBrowserMenu1-0-2-1:Verplaats de muispijl naar rechts om de afbeelding
en.ro.HelpBrowserMenu1-0-3:\Rsave the address of the current item.
de.ro.HelpBrowserMenu1-0-3:Die Adresse des Objektes speichern.
fr.ro.HelpBrowserMenu1-0-3:\Rsauver l'adresse de l'objet courant.
-it.ro.HelpBrowserMenu1-0-3:\Rsalva l'indirizzo del corrente oggetto
+it.ro.HelpBrowserMenu1-0-3:\Rsalva l'indirizzo dell'oggetto corrente.
nl.ro.HelpBrowserMenu1-0-3:Verplaats de muispijl naar rechts om het adres van dit item te bewaren.
en.ro.HelpBrowserMenu1-0-3-0:\Rsave the current item's address in Acorn URI format.
de.ro.HelpBrowserMenu1-0-3-0:Speichert die Adresse des Objektes im Acorn URI Format.
fr.ro.HelpBrowserMenu1-0-3-0:\Rsauver l'adresse de l'objet courant au format Acorn URI.
-it.ro.HelpBrowserMenu1-0-3-0:\Rsalva l'indirizzo del corrente oggetto nel formato Acorn URI
+it.ro.HelpBrowserMenu1-0-3-0:\Rsalva l'indirizzo dell'oggetto corrente nel formato Acorn URI
nl.ro.HelpBrowserMenu1-0-3-0:Verplaats de muispijl naar rechts om het adres van dit item in AcornURI-vorm te bewaren.
en.ro.HelpBrowserMenu1-0-3-1:\Rsave the current item's address in Ant URL format.
de.ro.HelpBrowserMenu1-0-3-1:Speichert die Adresse des Objektes im Ant URL Format.
fr.ro.HelpBrowserMenu1-0-3-1:\Rsauver l'adresse de l'objet courant au format Ant URL.
-it.ro.HelpBrowserMenu1-0-3-1:\Rsalva l'indirizzo del corrente oggetto nel formato Ant URL
+it.ro.HelpBrowserMenu1-0-3-1:\Rsalva l'indirizzo dell'oggetto corrente nel formato Ant URL
nl.ro.HelpBrowserMenu1-0-3-1:Verplaats de muispijl naar rechts om het adres van dit item in AntURL-vorm te bewaren.
en.ro.HelpBrowserMenu1-0-3-2:\Rsave the current item's address as plain text.
de.ro.HelpBrowserMenu1-0-3-2:Speichert die Adresse des Objektes als Text.
fr.ro.HelpBrowserMenu1-0-3-2:\Rsauver l'adresse de l'objet courant en texte simple.
-it.ro.HelpBrowserMenu1-0-3-2:\Rsalva l'indirizzo del corrente oggetto come file di testo
+it.ro.HelpBrowserMenu1-0-3-2:\Rsalva l'indirizzo dell'oggetto corrente come file di testo
nl.ro.HelpBrowserMenu1-0-3-2:Verplaats de muispijl naar rechts om het adres van dit item als platte tekst te bewaren.
en.ro.HelpBrowserMenu1-0-4:\Sreload all the items on this page.
de.ro.HelpBrowserMenu1-0-4:Anklicken mit AUSWAHL um alle Objekte der Seite erneut zu laden.
@@ -4245,7 +4249,7 @@ nl.ro.HelpBrowserMenu1-0-4:Klik met KIES om alle items van deze pagina opnieuw o
en.ro.HelpBrowserMenu1-1:\Rsee the options relating to the current link.
de.ro.HelpBrowserMenu1-1:Optionen für den aktuellen Verweis
fr.ro.HelpBrowserMenu1-1:\Rsee the options relating to the current link.
-it.ro.HelpBrowserMenu1-1:\Rmostra opzioni relative al corrente link
+it.ro.HelpBrowserMenu1-1:\Rmostra opzioni relative al link corrente.
nl.ro.HelpBrowserMenu1-1:Verplaats de muispijl naar rechts om de mogelijkheden bij deze koppeling te tonen.
en.ro.HelpBrowserMenu1-1-0:\Rsave the current link.
de.ro.HelpBrowserMenu1-1-0:Die Adresse des aktuellen Verweises abspeichern.
@@ -4280,7 +4284,7 @@ nl.ro.HelpBrowserMenu1-1-2:Klik met KIES om deze koppeling in een nieuw browserv
en.ro.HelpBrowserMenu2:\Rsee the selection options.
de.ro.HelpBrowserMenu2:Optionen für die manuell markierten Webseitenbereiche
fr.ro.HelpBrowserMenu2:\Rsee the selection options.
-it.ro.HelpBrowserMenu2:\Rmostra opzioni di selezione
+it.ro.HelpBrowserMenu2:\Rmostra le opzioni di selezione
nl.ro.HelpBrowserMenu2:Verplaats de muispijl naar rechts om de selectiemogelijkheden te tonen.
en.ro.HelpBrowserMenu2-0:\Rsave the current selection.
de.ro.HelpBrowserMenu2-0:Die aktuell markierten Bereiche abspeichern.
@@ -4305,12 +4309,12 @@ nl.ro.HelpBrowserMenu2-3:Klik met KIES om de tekst van het klembord hier in te v
en.ro.HelpBrowserMenu2-4:\Sdeselect the current selection.
de.ro.HelpBrowserMenu2-4:\Sdeselect the current selection.
fr.ro.HelpBrowserMenu2-4:\Sdeselect the current selection.
-it.ro.HelpBrowserMenu2-4:\Sdeselect the current selection.
+it.ro.HelpBrowserMenu2-4:\Sdeseleziona la selezione corrente.
nl.ro.HelpBrowserMenu2-4:Klik met KIES om de gekozen selectie te deselecteren.
en.ro.HelpBrowserMenu2-5:\Sselect all text on the current page, without the contents of text input fields.|MWhen the carret is at a text input field, all text in that field is selected.
de.ro.HelpBrowserMenu2-5:\Sselect all text on the current page, without the contents of text input fields.|MWhen the carret is at a text input field, all text in that field is selected.
fr.ro.HelpBrowserMenu2-5:\Sselect all text on the current page, without the contents of text input fields.|MWhen the carret is at a text input field, all text in that field is selected.
-it.ro.HelpBrowserMenu2-5:\Sselect all text on the current page, without the contents of text input fields.|MWhen the carret is at a text input field, all text in that field is selected.
+it.ro.HelpBrowserMenu2-5:\Sseleziona tutto il testo della pagina corrente escludendo i contenuti di testo nei campi di input.|MQualora il caret sia in un campo di inserimento testo allora verrà selezionato tutto il testo in quel campo.
nl.ro.HelpBrowserMenu2-5:Klik met KIES om alle tekst op de pagina, uitgezonderd de invoervelden te selecteren.|MWanneer het inlasteken in een invoerveld staat, wordt alle tekst in het veld geselecteerd.
en.ro.HelpBrowserMenu3:\Rsee the navigation options.
de.ro.HelpBrowserMenu3:Untermenü Navigieren.
@@ -4340,7 +4344,7 @@ nl.ro.HelpBrowserMenu3-3:Klik met KIES om 1 niveau omhoog te gaan in de websiteh
en.ro.HelpBrowserMenu3-4:\Sfetch the current page again.
de.ro.HelpBrowserMenu3-4:Lädt die aktuelle Seite erneut.|MDie Seite wird aktualisiert. Ältere Informationen zu dieser Seite, die noch im lokalen Zwischenpuffer gespeichert sind, werden dabei überschrieben.
fr.ro.HelpBrowserMenu3-4:\Srecommencer le chargement de la page courante.
-it.ro.HelpBrowserMenu3-4:\Sottieni nuovamente la corrente pagina.
+it.ro.HelpBrowserMenu3-4:\Sottieni nuovamente la pagina corrente.
nl.ro.HelpBrowserMenu3-4:Klik met KIES om deze pagina opnieuw op te halen.
en.ro.HelpBrowserMenu3-5:\Sstop NetSurf from continuing to load this page.
de.ro.HelpBrowserMenu3-5:Unterbricht den Ladevorgang und alle anderen Prozesse im aktuellen Browserfenster.
@@ -4365,7 +4369,7 @@ nl.ro.HelpBrowserMenu4-1:Verplaats de muispijl naar rechts om de afbeeldingsmoge
en.ro.HelpBrowserMenu4-1-0:\Stoggle the display of foreground images.
de.ro.HelpBrowserMenu4-1-0:\Stoggle the display of foreground images.
fr.ro.HelpBrowserMenu4-1-0:\Stoggle the display of foreground images.
-it.ro.HelpBrowserMenu4-1-0:\Stoggle the display of foreground images.
+it.ro.HelpBrowserMenu4-1-0:\SAlterna la visualizzazione delle immagini in primo piano.
nl.ro.HelpBrowserMenu4-1-0:Klik met KIES om het tonen van voorgrondafbeeldingen aan of uit te zetten.
en.ro.HelpBrowserMenu4-1-1:\Stoggle the display of background images.
de.ro.HelpBrowserMenu4-1-1:Schaltet Hintergrundbilder ein/aus.
@@ -4410,12 +4414,12 @@ nl.ro.HelpBrowserMenu4-3:Verplaats de muispijl naar rechts om de pagina-opbouwme
en.ro.HelpBrowserMenu4-3-0:\Stoggle whether animations are not displayed until all calculations are complete.
de.ro.HelpBrowserMenu4-3-0:Schaltet das Puffern von Objekten ein/aus.|MNachzuzeichnende Objekte, z.B. Bildanimationen oder Textbereiche, werden zwischengespeichert um Flackern zu vermeiden.
fr.ro.HelpBrowserMenu4-3-0:\Sdécider si les animations sont affichées quand tous les calculs sont terminés (ou avant).
-it.ro.HelpBrowserMenu4-3-0:\Simposta la non visualizzazione delle animazioni fino al completamento dei calcoli.
+it.ro.HelpBrowserMenu4-3-0:\Simposta la non visualizzazione delle animazioni fino al completamento della procedura di calcolo.
nl.ro.HelpBrowserMenu4-3-0:Klik met KIES om animaties pas te tonen, nadat alle opgehaalde paginagegevens zijn verwerkt, aan of uit te zetten.
en.ro.HelpBrowserMenu4-3-1:\Stoggle whether everything is not displayed until all calculations are complete.
de.ro.HelpBrowserMenu4-3-1:Schaltet das Puffern der gesamten Seitenberechnung ein/aus.|MDie komplette Seite wird nach Berechnung und Aufbau zwischengespeichert. Das ist vorteilhaft bei großen Hintergrundbildern und vielen sich überschneidenden Seitenelementen.
fr.ro.HelpBrowserMenu4-3-1:\Sdécider si tout doit être affiché quand tous les calculs sont terminés (ou avant).
-it.ro.HelpBrowserMenu4-3-1:\Simposta la non visualizzazione di tutto il processo fino al completamento dei calcoli.
+it.ro.HelpBrowserMenu4-3-1:\Simposta la non visualizzazione di tutto il processo fino al completamento della procedura di calcolo.
nl.ro.HelpBrowserMenu4-3-1:Klik met KIES om het niet eerder tonen van de gehele pagina, nadat alle opgehaalde paginagegevens zijn verwerkt aan of uit te zetten.
en.ro.HelpBrowserMenu4-4:\Smake your local display options the default options for NetSurf.
de.ro.HelpBrowserMenu4-4:Übernimmt die vorgenommenen Anzeigeeinstellungen als globale Standardwerte für die Darstellung aller weiteren Seiten.
@@ -4470,7 +4474,7 @@ nl.ro.HelpBrowserMenu5-0-1:Klik met KIES om de favorietenlijst te openen.
en.ro.HelpBrowserMenu5-1:\Rview the history options.
de.ro.HelpBrowserMenu5-1:Zugriff auf die History Funktionen.|MIn die History werden bereits besuchte Webseiten eingetragen. Dies erlaubt das einfache Wiederfinden einmal gesehener Web-Inhalte.
fr.ro.HelpBrowserMenu5-1:\Rview the history options.
-it.ro.HelpBrowserMenu5-1:\Rmostra opzioni della cronologia
+it.ro.HelpBrowserMenu5-1:\Rmostra le opzioni della cronologia
nl.ro.HelpBrowserMenu5-1:Verplaats de muispijl naar rechts om de geschiedenismogelijkheden te tonen.
en.ro.HelpBrowserMenu5-1-0:\Sopen the local history \w.
de.ro.HelpBrowserMenu5-1-0:Anklicken mit AUSWAHL öffnet das Fenster mit der lokalen History.|MIn der lokalen History werden alle Webseiten notiert, die mit dem aktuellen Browserfenster bereits besucht worden waren.
@@ -4495,12 +4499,12 @@ nl.ro.HelpBrowserMenu5-2-0:Klik met KIES om het cookiesbeheervenster te openen.
en.ro.HelpBrowserMenu5-2-1:\Sdelete all stored cookies.
de.ro.HelpBrowserMenu5-2-1:\Sdelete all stored cookies.
fr.ro.HelpBrowserMenu5-2-1:\Sdelete all stored cookies.
-it.ro.HelpBrowserMenu5-2-1:\Sdelete all stored cookies.
+it.ro.HelpBrowserMenu5-2-1:\Scancella tutti i cookie salvati.
nl.ro.HelpBrowserMenu5-2-1:Klik met KIES om alle opgeslagen cookies te verwijderen.
en.ro.HelpBrowserMenu6:\Rsee the help resources available.
de.ro.HelpBrowserMenu6:Untermenü Hilfe.|MZeigt Informationen zu und über NetSurf.
fr.ro.HelpBrowserMenu6:\Rvoir l'aide disponible.
-it.ro.HelpBrowserMenu6:\Rmostra documentazione disponibile
+it.ro.HelpBrowserMenu6:\Rmostra la documentazione disponibile
nl.ro.HelpBrowserMenu6:Verplaats de muispijl naar rechts om extra hulp en informatie te raadplegen, indien deze beschikbaar is.
en.ro.HelpBrowserMenu6-0:\Sopen the documentation contents page in a new \w.
de.ro.HelpBrowserMenu6-0:Öffnet die NetSurf Dokumentation in einem neuen Browserfenster.
@@ -4600,12 +4604,12 @@ nl.ro.HelpScaleView3:Klik met KIES om de schaal met 10% per keer te vergroten.
en.ro.HelpScaleView5:Choose whether all frames will also be scaled.
de.ro.HelpScaleView5:Choose whether all frames will also be scaled.
fr.ro.HelpScaleView5:Choose whether all frames will also be scaled.
-it.ro.HelpScaleView5:Choose whether all frames will also be scaled.
+it.ro.HelpScaleView5:Scegli se scalare anche tutti i frame.
nl.ro.HelpScaleView5:Selecteer de optie optie om ook de bijbehorende frames mee te schalen.
en.ro.HelpScaleView7:\Scancel changes.|MThe current scale will not be changed.
de.ro.HelpScaleView7:Klicken mit AUSWAHL um die Skalierung nicht durchzuführen.|MDas Dialogfenster wird geschlossen.|MDie Darstellung der Seite wird unverändert beibehalten.
fr.ro.HelpScaleView7:\Sannuler les changements.|ML'échelle en cours ne sera pas modifiée.
-it.ro.HelpScaleView7:\Sannulla tutte le modifiche.|MLa corrente scala non verrà modificata.
+it.ro.HelpScaleView7:\Sannulla tutte le modifiche.|MLa scala corrente non verrà modificata.
nl.ro.HelpScaleView7:Klik met KIES om dit venster te sluiten zonder dat de gemaakte wijzigingen worden ingesteld.|MDeze schaal wordt niet gewijzigd.
en.ro.HelpScaleView8:\Schange the view to the scale you have chosen.
de.ro.HelpScaleView8:Klicken mit AUSWAHL um die Seite skaliert darzustellen.|MDie Seite wird in der gewählten Vergrößerung angezeigt.
@@ -4630,28 +4634,28 @@ nl.ro.HelpSearch1:Kies of een zoekopdracht rekening moet houden met hoofd- en kl
en.ro.HelpSearch2:\Smove to the next match.
de.ro.HelpSearch2:Klicken mit AUSWAHL findet den nächsten Treffer.
fr.ro.HelpSearch2:\Schercher l'occurence suivante.
-it.ro.HelpSearch2:\Smove to the next match.
+it.ro.HelpSearch2:\Spassa alla prossima occorrenza
nl.ro.HelpSearch2:Klik met KIES om naar de volgende gevonden zoekreeks te gaan.
en.ro.HelpSearch3:\Smove to the previous match.
de.ro.HelpSearch3:Klicken mit AUSWAHL sucht rückwärts im Text.
fr.ro.HelpSearch3:\Schercher l'occurence précédente.
-it.ro.HelpSearch3:\Smove to the previous match.
+it.ro.HelpSearch3:\Spassa alla precedente occorrenza
nl.ro.HelpSearch3:Klik met KIES om naar de vorige gevonden zoekreeks te gaan.
en.ro.HelpSearch4:\Sstop searching and close this \w.
de.ro.HelpSearch4:Klicken mit AUSWAHL bricht die Suche ab und schließt das Fenster.
fr.ro.HelpSearch4:\Sarrêter la recherche et fermer cette fenêtre.
-it.ro.HelpSearch4:\Sstop searching and close this \w.
+it.ro.HelpSearch4:\Sinterrompi la ricerca e chiudi \w.
nl.ro.HelpSearch4:Klik met KIES om het zoeken te stoppen en dit venster te sluiten.
en.ro.HelpHotFolder:Use this \w to set the directory name.
de.ro.HelpHotFolder:Dieses Fenster verwenden, um den Verzeichnis-Namen festzulegen.
fr.ro.HelpHotFolder:Utiliser cette \w pour définir le nom de répertoire.
-it.ro.HelpHotFolder:Use this \w to set the directory name.
+it.ro.HelpHotFolder:Usa questa \w per impostare il nome della directory.
nl.ro.HelpHotFolder:Gebruik dit venster om de mapnaam in te voeren.
en.ro.HelpHotEntry:Use this \w to set the entry details.
de.ro.HelpHotEntry:Dieses Fenster verwenden, um die Details des Eintrages festzulegen.
fr.ro.HelpHotEntry:Utiliser cette \w pour définir les détails de cette entrée.
-it.ro.HelpHotEntry:Use this \w to set the entry details.
+it.ro.HelpHotEntry:Usa questa \w per impostare i dettagli dell'immissione.
nl.ro.HelpHotEntry:Gebruik dit om details van dit item in te voeren.
en.ro.HelpHotlist:\Thotlist management window.
de.ro.HelpHotlist:Das ist das Hotlist Fenster.
@@ -4681,28 +4685,28 @@ nl.ro.HelpHotlist3:Klik met KIES om de details van dit item te verbergen.
en.ro.HelpHotlist4:\Sselect this directory.|MDouble-click \s to open this directory.
de.ro.HelpHotlist4:Klicken mit AUSWAHL markiert dieses Verzeichnis.|MDoppelklicken um das Verzeichnis zu öffnen.
fr.ro.HelpHotlist4:\Ssélectionner ce répertoire.|MDouble-cliquer \s pour ouvrir ce répertoire.
-it.ro.HelpHotlist4:\Sselect this directory.|MDouble-click \s to open this directory.
+it.ro.HelpHotlist4:\Sseleziona questa directory.|MDoppio-click \s per aprire questa directory.
nl.ro.HelpHotlist4:Klik met KIES om deze map te selecteren.|MDubbelklik met KIES om deze map te openen en alle bijbehorende items uit te klappen.
en.ro.HelpHotlist5:\Sselect this entry.|MDouble-click \s to launch this URL.
de.ro.HelpHotlist5:Klicken mit AUSWAHL markiert diesen Eintrag.|MDoppelklicken öffnet diesen Eintrag in einem neuen Browserfenster.
fr.ro.HelpHotlist5:\Ssélectionner cette entrée.|MDouble-cliquer \s pour lancer cette URL.
-it.ro.HelpHotlist5:\Sselect this entry.|MDouble-click \s to launch this URL.
+it.ro.HelpHotlist5:\Sseleziona questo elemento.|MDoppio-click \s per avviare questo URL.
nl.ro.HelpHotlist5:Klik met KIES om dit item te selecteren.|MDubbelklik met om de inhoud van dit adres in een nieuw browservenster te openen.
en.ro.HelpHotlist6:Release the mouse buttons to complete your selection.
de.ro.HelpHotlist6:Maustasten loslassen, um die Auswahl abzuschließen.
fr.ro.HelpHotlist6:Lâcher les boutons de souris pour terminer votre sélection.
-it.ro.HelpHotlist6:Release the mouse buttons to complete your selection.
+it.ro.HelpHotlist6:Rilascia il pulsante dei mouse per completare la selezione.
nl.ro.HelpHotlist6:Laat de muisknop(pen) los om de selectie af te ronden.
en.ro.HelpHotlist7:Release the mouse buttons to move the selection.
de.ro.HelpHotlist7:Maustasten loslassen, um das Verschieben auszuführen.
fr.ro.HelpHotlist7:Lâcher les boutons de souris pour déplacer votre sélection.
-it.ro.HelpHotlist7:Release the mouse buttons to move the selection.
+it.ro.HelpHotlist7:Rilascia il pulsante del mouse per spostare la selezione.
nl.ro.HelpHotlist7:Laat de muisknop(pen) los om de selectie te kunnen verplaatsen.
en.ro.HelpHotToolbar0:\Tdelete button.|M\Sdelete the current selection.
de.ro.HelpHotToolbar0:Löscht die markierten Einträge und Verzeichnisse.
fr.ro.HelpHotToolbar0:\Tle bouton Supprimer.|M\Ssupprimer la sélection courante.
-it.ro.HelpHotToolbar0:\Tdelete button.|M\Sdelete the current selection.
+it.ro.HelpHotToolbar0:\Tcancella pulsante.|M\Scancella la selezione corrente.
nl.ro.HelpHotToolbar0:Dit is de Verwijder-knop.|MKlik met KIES om deze selectie te verwijderen.
en.ro.HelpHotToolbar1:\Texpand entries button.|M\Sexpand all addresses in the hotlist.|M\Acollapse all addresses in the hotlist.|MExpanded addresses show additional details, such as a visit counter.
de.ro.HelpHotToolbar1:Expandiert Einträge.|MKlicken mit AUSWAHL expandiert alle / alle markierten Einträge.|MKlicken mit SPEZIAL faltet alle / alle markierten Einträge zusammen.|MBei expandierten Einträgen werden zusätzliche Informationen angezeigt.
@@ -4717,12 +4721,12 @@ nl.ro.HelpHotToolbar2:Dit is de Open map-knop.|MKlik met KIES om alle mappen in
en.ro.HelpHotToolbar3:\Tlaunch button.|M\Slaunch the current selection.
de.ro.HelpHotToolbar3:Lädt alle markierten Einträge in jeweils ein neues Browserfenster.
fr.ro.HelpHotToolbar3:\Tle bouton de lancement.|M\Slancer (ouvrir) la sélection en cours.
-it.ro.HelpHotToolbar3:\Tlaunch button.|M\Slaunch the current selection.
+it.ro.HelpHotToolbar3:\Tpulsante di avvio.|M\Savvia la selezione corrente.
nl.ro.HelpHotToolbar3:Dit is de Ga naar-knop.|MKlik met KIES om alle pagina's in deze selectie in nieuwe browservensters te openen.
en.ro.HelpHotToolbar4:\Tcreate button.|M\Screate a new directory.
de.ro.HelpHotToolbar4:Erzeugt neue Einträge oder Verzeichnisse.|MKlicken mit AUSWAHL erstellt ein neues Verzeichnis.
fr.ro.HelpHotToolbar4:\Tle bouton Créer.|M\Scréer un nouveau répertoire.
-it.ro.HelpHotToolbar4:\Tcreate button.|M\Screate a new directory.
+it.ro.HelpHotToolbar4:\Tcrea pulsante.|M\Screa una nuova directory.
nl.ro.HelpHotToolbar4:Dit is de Nieuwe map-knop.|MKlik met KIES om een nieuwe map aan te maken.
en.ro.HelpHotlistMenu0:\Rperform an operation on the hotlist.
@@ -4753,7 +4757,7 @@ nl.ro.HelpHotlistMenu0-1:Verplaats de muispijl naar rechts om de favorietenlijst
en.ro.HelpHotlistMenu0-2:\Rexpand items within the hotlist.
de.ro.HelpHotlistMenu0-2:Öffnen von Verzeichnissen und Anzeigen von Zusatzinformationen.
fr.ro.HelpHotlistMenu0-2:\Rdéployer les items dans la liste des favoris.
-it.ro.HelpHotlistMenu0-2:\Rexpand items within the hotlist.
+it.ro.HelpHotlistMenu0-2:\Respandi gli elementi all'interno del segnalibro.
nl.ro.HelpHotlistMenu0-2:Verplaats de muispijl naar rechts om bepaalde items in de favorietenlijst uit te klappen.
en.ro.HelpHotlistMenu0-2-0:\Sopen all directories and show all entry details.
de.ro.HelpHotlistMenu0-2-0:Öffnet alle Verzeichnisse und zeigt zu Einträgen die Zusatzinformationen an.
@@ -4773,12 +4777,12 @@ nl.ro.HelpHotlistMenu0-2-2:Klik met KIES om alle details van de favorieten te to
en.ro.HelpHotlistMenu0-3:\Rcollapse items within the hotlist.
de.ro.HelpHotlistMenu0-3:Schließen von Verzeichnissen und Ausblenden der Zusatzinformationen.
fr.ro.HelpHotlistMenu0-3:\Rregrouper les items dans la liste des favoris.
-it.ro.HelpHotlistMenu0-3:\Rcollapse items within the hotlist.
+it.ro.HelpHotlistMenu0-3:\Rraggruppa gli elementi all'interno del segnalibro.
nl.ro.HelpHotlistMenu0-3:Verplaats de muispijl naar rechts om bepaalde items in de favorietenlijst in te klappen.
en.ro.HelpHotlistMenu0-3-0:\Sclose all directories and hide all entry details.
de.ro.HelpHotlistMenu0-3-0:Schließt alle Verzeichnisse und versteckt die Zusatzinformationen bei Einträgen.
fr.ro.HelpHotlistMenu0-3-0:\Sfermer tous les répertoires et cacher les détails sur les entrées.
-it.ro.HelpHotlistMenu0-3-0:\Sclose all directories and hide all entry details.
+it.ro.HelpHotlistMenu0-3-0:\Schiudi tutte le directory e nascondi tutti i dettagli delle immissioni.
nl.ro.HelpHotlistMenu0-3-0:Klik met KIES om alle mappen te sluiten en alle details in de favorietenlijst te verbergen.
en.ro.HelpHotlistMenu0-3-1:\Sclose all directories.
de.ro.HelpHotlistMenu0-3-1:Schließt alle Verzeichnisse.
@@ -4808,12 +4812,12 @@ nl.ro.HelpHotlistMenu0-4-1:Klik met KIES om de aanpasmodus van de gereedschapbal
en.ro.HelpHotlistMenu1:\Roperate on the current selection.
de.ro.HelpHotlistMenu1:Untermenü Auswahl. Bearbeiten der markierten Hotlist Elemente.
fr.ro.HelpHotlistMenu1:\Ragir sur la sélection en cours.
-it.ro.HelpHotlistMenu1:\Roperate on the current selection.
+it.ro.HelpHotlistMenu1:\Ropera nella selezione corrente.
nl.ro.HelpHotlistMenu1:Verplaats de muispijl naar rechts om een operatie op deze selectie uit te voeren.
en.ro.HelpHotlistMenu1-0:\Redit the current item.
de.ro.HelpHotlistMenu1-0:Ändern des markierten Elementes in der Hotlist.
fr.ro.HelpHotlistMenu1-0:\Rééditer l'item en cours.
-it.ro.HelpHotlistMenu1-0:\Redit the current item.
+it.ro.HelpHotlistMenu1-0:\Rmodifica l'oggetto corrente.
nl.ro.HelpHotlistMenu1-0:Klik met KIES om de naam van dit item te wijzigen
en.ro.HelpHotlistMenu1-1:\Slaunch the current selection.
de.ro.HelpHotlistMenu1-1:Öffnet markierte Einträge in je einem neuen Browserfenster.
@@ -4844,7 +4848,7 @@ nl.ro.HelpHotlistMenu3:Klik met KIES om alle geselecteerde items te deselecteren
en.ro.HelpGHistory:\Tglobal history window.
de.ro.HelpGHistory:Das ist das Fenster der globalen History.
fr.ro.HelpGHistory:\Tla fenêtre d'historique global.
-it.ro.HelpGHistory:\Tfinestra cronologia globale.
+it.ro.HelpGHistory:\Tfinestra della cronologia globale.
nl.ro.HelpGHistory:Dit venster toont de browsergeschiedenis.
en.ro.HelpGHistoryToolbar0:\Tdelete button.|M\Sdelete the current selection.
de.ro.HelpGHistoryToolbar0:Entfernt markierte Bereiche.|MAnklicken mit AUSWAHL löscht die vorher markierten Bereiche aus der History.
@@ -4875,17 +4879,17 @@ nl.ro.HelpGHistoryMenu0:Verplaats de muispijl naar rechts om een operatie uit te
en.ro.HelpGHistoryMenu0-0:\Rexport global history as an HTML file.
de.ro.HelpGHistoryMenu0-0:Speichert die History (global) als HTML Datei.
fr.ro.HelpGHistoryMenu0-0:\Rexporter l'historique global en fichier HTML.
-it.ro.HelpGHistoryMenu0-0:\Rexport global history as an HTML file.
+it.ro.HelpGHistoryMenu0-0:\Resporta la cronologia globale come file HTML.
nl.ro.HelpGHistoryMenu0-0:Verplaats de muispijl naar rechts om de browsergeschiedenis te exporteren als een HTML-bestand.
en.ro.HelpGHistoryMenu0-1:\Rexpand items within global history.
de.ro.HelpGHistoryMenu0-1:Mehr Information anzeigen
fr.ro.HelpGHistoryMenu0-1:\Rdéployer les items de l'historique global.
-it.ro.HelpGHistoryMenu0-1:\Rexpand items within global history.
+it.ro.HelpGHistoryMenu0-1:\Respandi gli elementi all'interno della cronologia globale.
nl.ro.HelpGHistoryMenu0-1:Verplaats de muispijl naar rechts om bepaalde items in de browsergeschiedenis uit te klappen.
en.ro.HelpGHistoryMenu0-1-0:\Sopen all directories and show all entry details.
de.ro.HelpGHistoryMenu0-1-0:Öffnet alle Verzeichnisse und zeigt die Details der Einträge an.
fr.ro.HelpGHistoryMenu0-1-0:\Souvrir tous les répertoires et donner le détail de toutes les entrées.
-it.ro.HelpGHistoryMenu0-1-0:\Sapri tutte le directory e mostra in dettaglio tutte le immissioni
+it.ro.HelpGHistoryMenu0-1-0:\Sapri tutte le directory e mostra in dettaglio tutte le immissioni.
nl.ro.HelpGHistoryMenu0-1-0:Klik met KIES om alle mappen te openen en alle itemdetails te tonen.
en.ro.HelpGHistoryMenu0-1-1:\Sopen all directories.
de.ro.HelpGHistoryMenu0-1-1:Öffnet alle Verzeichnisse.
@@ -4900,7 +4904,7 @@ nl.ro.HelpGHistoryMenu0-1-2:Klik met KIES om alle itemdetails te tonen.
en.ro.HelpGHistoryMenu0-2:\Rcollapse items within global history.
de.ro.HelpGHistoryMenu0-2:Weniger Information anzeigen
fr.ro.HelpGHistoryMenu0-2:\Rregrouper les items de l'historique global.
-it.ro.HelpGHistoryMenu0-2:\Rcollapse items within global history.
+it.ro.HelpGHistoryMenu0-2:\Rraggruppa gli elementi all'interno della cronologia globale.
nl.ro.HelpGHistoryMenu0-2:Verplaats de muispijl naar rechts om bepaalde items in de browsergeschiedenis in te klappen.
en.ro.HelpGHistoryMenu0-2-0:\Sclose all directories and hide all entry details.
de.ro.HelpGHistoryMenu0-2-0:Schließt alle Verzeichnisse und versteckt die Details der Einträge.
@@ -4992,12 +4996,12 @@ nl.ro.HelpCookiesMenu0:Verplaats de muispijl naar rechts om een operatie uit te
en.ro.HelpCookiesMenu0-0:\Rexpand items within the cookie list.
de.ro.HelpCookiesMenu0-0:Menü zum Expandieren der Einträge der Liste.
fr.ro.HelpCookiesMenu0-0:\Rdéployer les items dans la liste de cookies.
-it.ro.HelpCookiesMenu0-0:\Rexpand items within the cookie list.
+it.ro.HelpCookiesMenu0-0:\Respandi gli elementi all'interno della lista dei cookie.
nl.ro.HelpCookiesMenu0-0:Verplaats de muispijl naar rechts om bepaalde items in het cookiesbeheervenster uit te klappen.
en.ro.HelpCookiesMenu0-0-0:\Sopen all directories and show all cookie details.
de.ro.HelpCookiesMenu0-0-0:Klicken mit AUSWAHL öffnet alle Verzeichnisse und zeigt Details zu allen angezeigten Cookies.
fr.ro.HelpCookiesMenu0-0-0:\Souvrir tous les répertoires et montrer le détail de tous les cookies.
-it.ro.HelpCookiesMenu0-0-0:\Sapri tutte le directory e mostra i dettagli di tutti i cookie
+it.ro.HelpCookiesMenu0-0-0:\Sapri tutte le directory e mostra in dettaglio tutti i cookie
nl.ro.HelpCookiesMenu0-0-0:Klik met KIES om alle mappen te openen en alle cookiedetails te tonen.
en.ro.HelpCookiesMenu0-0-1:\Sopen all directories.
de.ro.HelpCookiesMenu0-0-1:Klicken mit AUSWAHL öffnet alle Verzeichnisse.
@@ -5007,12 +5011,12 @@ nl.ro.HelpCookiesMenu0-0-1:Klik met KIES om alle mappen te openen en de bijbehor
en.ro.HelpCookiesMenu0-0-2:\Sshow all cookie details.
de.ro.HelpCookiesMenu0-0-2:Klicken mit AUSWAHL zeigt Details zu allen angezeigten Cookies.
fr.ro.HelpCookiesMenu0-0-2:\Smontrer le détail de tous les cookies.
-it.ro.HelpCookiesMenu0-0-2:\Smostra tutti i cookie in dettaglio
+it.ro.HelpCookiesMenu0-0-2:\Smostra in dettaglio tutti i cookie
nl.ro.HelpCookiesMenu0-0-2:Klik met KIES om alle cookiedetails te tonen.
en.ro.HelpCookiesMenu0-1:\Rcollapse items within the cookie list.
de.ro.HelpCookiesMenu0-1:Menü zum Schließen der Einträge der Liste.
fr.ro.HelpCookiesMenu0-1:\Rregrouper les items dans la liste de cookies.
-it.ro.HelpCookiesMenu0-1:\Rcollapse items within the cookie list.
+it.ro.HelpCookiesMenu0-1:\Rragguppa gli elementi all'interno della lista dei cookie.
nl.ro.HelpCookiesMenu0-1:Verplaats de muispijl naar rechts om bepaalde items in het cookiesbeheervenster in te klappen.
en.ro.HelpCookiesMenu0-1-0:\Sclose all directories and hide all cookie details.
de.ro.HelpCookiesMenu0-1-0:Klicken mit AUSWAHL schließt alle Verzeichnisse und versteckt die Cookiedetails.
@@ -5057,7 +5061,7 @@ nl.ro.HelpCookiesMenu1-0:Klik met KIES om deze geselecteerde cookies te verwijde
en.ro.HelpCookiesMenu2:\Sselect all the items in the cookie list.
de.ro.HelpCookiesMenu2:Klicken mit AUSWAHL markiert alle Cookies als gewählt.
fr.ro.HelpCookiesMenu2:\Ssélectionner tous les items dans la liste de cookies.
-it.ro.HelpCookiesMenu2:\Sseleziona tutti gli oggetti nella lista dei cookie.
+it.ro.HelpCookiesMenu2:\Sseleziona tutti gli oggetti dalla lista dei cookie.
nl.ro.HelpCookiesMenu2:Klik met KIES om alle cookies in het cookiesbeheervenster te selecteren.
en.ro.HelpCookiesMenu3:\Sdeselect all selected items.
de.ro.HelpCookiesMenu3:Klicken mit AUSWAHL macht alle Markierungen rückgängig.
@@ -5068,14 +5072,14 @@ nl.ro.HelpCookiesMenu3:Klik met KIES om alle geselecteerde items te deselecteren
en.ro.HelpAppInfo:\TNetSurf information \w.|MSee the about page for the contributor list and credits.
de.ro.HelpAppInfo:Das ist das Info-Fenster zu NetSurf.|MGenauere Angaben zu den Autoren, Grafikern, Übersetzern, genutzten Libraries etc. gibt es bei "Über NetSurf" im Untermenü Hilfe eines Browserfensters.
fr.ro.HelpAppInfo:\Tla \w d'information de NetSurf.|MVoir la page "À propos de" pour une liste des contributeurs et les remerciements.
-it.ro.HelpAppInfo:\TNetSurf information \w.|MSee the about page for the contributor list and credits.
+it.ro.HelpAppInfo:\TInformazioni su NetSurf \w.|MMostra la pagina delle informazioni e la lista dei ringraziamenti.
nl.ro.HelpAppInfo:Dit is het NetSurf-informatievenster.|MOpen de Bijdragen-pagina voor de lijst met degenen die bijdroegen aan het NetSurf-project.
en.ro.HelpConfigure:\Tconfiguration \w for NetSurf
de.ro.HelpConfigure:Dies ist das Konfigurationsfenster von NetSurf.
fr.ro.HelpConfigure:\Tla fenêtre de configuration pour Netsurf
-it.ro.HelpConfigure:\Tconfiguration \w for NetSurf
+it.ro.HelpConfigure:\Tconfigurazione \w per NetSurf
nl.ro.HelpConfigure:Dit is het NetSurf-instellingenvenster.
en.ro.HelpConfigure0:Cache configuration tool
de.ro.HelpConfigure0:Cachespeicher konfigurieren
@@ -5125,18 +5129,18 @@ nl.ro.HelpConfigure8:Thema-instellingen.|MKlik op dit symbool om een weergavethe
en.ro.HelpConfigure9:Security and Privacy configuration tool
de.ro.HelpConfigure9:Sicherheitseinstellungen und Privatsphäre
fr.ro.HelpConfigure9:Outil de configuration de la sécurité et de la confidentialité
-it.ro.HelpConfigure9:Strumento di configurazione della Sicurezza e Privacy
+it.ro.HelpConfigure9:Strumento di configurazione per Sicurezza e la Privacy
nl.ro.HelpConfigure9:Veiligheid en Privacy-instellingen|MKlik op dit symbool om de veiligheids- en privacyinstellingen aan te passen.
en.ro.HelpCacheConfig:\Tcache configuration \w.
de.ro.HelpCacheConfig:Das ist das Fenster der Cache-Konfiguration.
fr.ro.HelpCacheConfig:\Tla fenêtre de configuration du cache.
-it.ro.HelpCacheConfig:\Tcache configuration \w.
+it.ro.HelpCacheConfig:\Tconfigurazione della cache \w.
nl.ro.HelpCacheConfig:Diverse bufferinstelligen kunnen in dit venster gewijzigd worden.
en.ro.HelpCacheConfig3:\Tamount of memory to be used for caching content.
de.ro.HelpCacheConfig3:Speichergröße, die verwendet wird um Inhalte zwischenzuspeichern.
fr.ro.HelpCacheConfig3:\Tla quantité de mémoire à utiliser pour le contenu du cache.
-it.ro.HelpCacheConfig3:\Tamount of memory to be used for caching content.
+it.ro.HelpCacheConfig3:\Tquantit� di memoria da usare per il contenuto della cache.
nl.ro.HelpCacheConfig3:Dit invoerveld toont de hoeveelheid geheugen die wordt gebruikt om de pagina-inhoud te bufferen.
en.ro.HelpCacheConfig4:\Sreduce the amount of memory.
de.ro.HelpCacheConfig4:Klicken mit AUSWAHL verringert die Größe des Cachespeichers.
@@ -5151,7 +5155,7 @@ nl.ro.HelpCacheConfig5:Klik met KIES om de geheugenruimte groter te maken.
en.ro.HelpCacheConfig10:\Tamount of disc space to be used for caching content between sessions.
de.ro.HelpCacheConfig10:\Tamount of disc space to be used for caching content between sessions.
fr.ro.HelpCacheConfig10:\Tamount of disc space to be used for caching content between sessions.
-it.ro.HelpCacheConfig10:\Tamount of disc space to be used for caching content between sessions.
+it.ro.HelpCacheConfig10:\Tquantit� di spazio su disco da usare per il contenuto della cache tra le sessioni.
nl.ro.HelpCacheConfig10:Dit invoerveld toont de hoeveelheid schijfruimte die wordt gebruikt om de pagina-inhoud tussen sessies te bufferen.
en.ro.HelpCacheConfig11:\Sreduce the amount of memory.
de.ro.HelpCacheConfig11:Klicken mit AUSWAHL verringert die Größe des Cachespeichers.
@@ -5171,12 +5175,12 @@ nl.ro.HelpCacheConfig15:Dit is het maximum aantal dagen dat de gebufferde pagina
en.ro.HelpCacheConfig16:\Sreduce the number of days.
de.ro.HelpCacheConfig16:\Sreduce the number of days.
fr.ro.HelpCacheConfig16:\Sreduce the number of days.
-it.ro.HelpCacheConfig16:\Sreduce the number of days.
+it.ro.HelpCacheConfig16:\Sriduce il numero di giorni.
nl.ro.HelpCacheConfig16:Klik met KIES om het aantal dagen te verlagen.
en.ro.HelpCacheConfig17:\Sincrease the number of days.
de.ro.HelpCacheConfig17:\Sincrease the number of days.
fr.ro.HelpCacheConfig17:\Sincrease the number of days.
-it.ro.HelpCacheConfig17:\Sincrease the number of days.
+it.ro.HelpCacheConfig17:\Saumenta il numero di giorni.
nl.ro.HelpCacheConfig17:Klik met KIES om het aantal dagen te verhogen.
en.ro.HelpCacheConfig19:\Sreset the Cache options back to their default values.
de.ro.HelpCacheConfig19:Stellt die Standardeinstellungen wieder her.
@@ -5197,7 +5201,7 @@ nl.ro.HelpCacheConfig21:Klik met KIES om de gemaakte wijzigingen te bewaren en d
en.ro.HelpConnectConfig:\Tconnection configuration \w
de.ro.HelpConnectConfig:Das ist das Fenster zur Einstellung der Parameter für die Netzanbindung.
fr.ro.HelpConnectConfig:\Tla fenêtre de configuration de connexion.
-it.ro.HelpConnectConfig:\Tconnection configuration \w
+it.ro.HelpConnectConfig:\Tconfigurazione della connessione \w
nl.ro.HelpConnectConfig:Diverse verbindingsinstellingen kunnen in dit venster gewijzigd worden.
en.ro.HelpConnectConfig3:\Tcurrently selected proxy type.|MUse the menu to select a proxy type.
de.ro.HelpConnectConfig3:Aktuell gewählter Proxytyp.|MMit dem Menü kann ein anderer Typ eingestellt werden.
@@ -5262,17 +5266,17 @@ nl.ro.HelpConnectConfig22:Klik met KIES om het maximaal aantal simultaan uit te
en.ro.HelpConnectConfig24:\Tmaximum number of persistent connections.
de.ro.HelpConnectConfig24:Das ist die Maximalzahl aufrechtzuerhaltender Verbindungen.
fr.ro.HelpConnectConfig24:\Tle nombre maximum de connexions persistantes.
-it.ro.HelpConnectConfig24:\Tmaximum number of persistent connections.
+it.ro.HelpConnectConfig24:\Tnumero massimo di connessioni persistenti.
nl.ro.HelpConnectConfig24:Dit is het maximum aantal langdurige verbindingen.
en.ro.HelpConnectConfig25:\Sreduce the maximum number of persistent connections.
de.ro.HelpConnectConfig25:Klicken mit AUSWAHL verringert die Maximalzahl offengehaltener Verbindungen.
fr.ro.HelpConnectConfig25:\Sréduire le nombre maximum de connexions persistantes.
-it.ro.HelpConnectConfig25:\Sreduce the maximum number of persistent connections.
+it.ro.HelpConnectConfig25:\Sriduci il numero massimo di connessioni persistenti.
nl.ro.HelpConnectConfig25:Klik met KIES om het maximum aantal langdurige verbindingen te verlagen.
en.ro.HelpConnectConfig26:\Sincrease the maximum number of persistent connections.
de.ro.HelpConnectConfig26:Klicken mit AUSWAHL vergrößert die Maximalzahl offengehaltener Verbindungen.
fr.ro.HelpConnectConfig26:\Saugmenter le nombre maximum de connexions persistantes.
-it.ro.HelpConnectConfig26:\Sincrease the maximum number of persistent connections.
+it.ro.HelpConnectConfig26:\Saumenta il numero massimo di connessioni persistenti.
nl.ro.HelpConnectConfig26:Klik met KIES om het maximum aantal langdurige verbindingen te verhogen.
en.ro.HelpConnectConfig27:\Sreset the Connection options back to their default values.
de.ro.HelpConnectConfig27:Stellt die Standardeinstellungen wieder her.
@@ -5293,7 +5297,7 @@ nl.ro.HelpConnectConfig29:Klik met KIES om de gemaakte wijzigingen te bewaren en
en.ro.HelpContentConfig:\Tcontent configuration \w
de.ro.HelpContentConfig:Fenster zur Einstellung des Browserverhaltens bei bestimmten Seiteninhalten
fr.ro.HelpContentConfig:\Tla fenêtre de configuration du Contenu
-it.ro.HelpContentConfig:\Tcontent configuration \w
+it.ro.HelpContentConfig:\Tconfigurazione dei contenuti \w
nl.ro.HelpContentConfig:Het gedrag van de browser kan in dit venster gewijzigd worden.
en.ro.HelpContentConfig2:This indicates whether NetSurf will attempt to block advertisements on web pages|MIn rare circumstances, this option may cause valid content to be blocked too.
de.ro.HelpContentConfig2:Stellt ein, ob NetSurf versuchen soll, die auf Webseiten eingeblendete Werbung automatisch zu unterdrücken.|MIn seltenen Fällen wird dadurch jedoch auch 'echter' Seiteninhalt geblockt.
@@ -5338,7 +5342,7 @@ nl.ro.HelpContentConfig11:Deze optie geeft aan of het uitvoeren van JavaScript-s
en.ro.HelpFontConfig:\Tfont configuration \w
de.ro.HelpFontConfig:Konfigurationsfenster zur Einstellung der verwendeten Schriftarten
fr.ro.HelpFontConfig:\Tla fenêtre de configuration de Fontes
-it.ro.HelpFontConfig:\Tfont configuration \w
+it.ro.HelpFontConfig:\Tconfigurazione dei font \w
nl.ro.HelpFontConfig:De instellingen voor de verschillende tekststijlen kunnen in dit venster gewijzigd worden.
en.ro.HelpFontConfig3:\Tcurrently selected sans-serif font.|MNetSurf will use this font wherever a web page specifies a sans-serif typeface.
de.ro.HelpFontConfig3:Das ist die aktuell gewählte Schriftart für Sans-serif.|MNetSurf wird diese Schriftart überall dort verwenden, wo von der Webseite ein Schriftbild in Sans-serif vorgegeben wird.
@@ -5413,7 +5417,7 @@ nl.ro.HelpFontConfig24:Klik met KIES om de standaardlettergrootte te verkleinen
en.ro.HelpFontConfig25:\Sincrease the default font size.
de.ro.HelpFontConfig25:Klicken mit AUSWAHL vergrößert die Standardfontgröße.
fr.ro.HelpFontConfig25:\Saugmenter la taille de fonte.
-it.ro.HelpFontConfig25:\Saumenta la dimensione del font predefinito
+it.ro.HelpFontConfig25:\Saumenta la dimensione del font predefinita
nl.ro.HelpFontConfig25:Klik met KIES om de standaardlettergrootte te vergroten.
en.ro.HelpFontConfig28:You can enter a minimum font size here.|MNetSurf will not allow web pages to display smaller text than this.
de.ro.HelpFontConfig28:Hier kann eine minimale Schriftgröße eingestellt werden.|MNetSurf wird keine Darstellung von noch kleineren Schriften zulassen.
@@ -5449,12 +5453,12 @@ nl.ro.HelpFontConfig34:Klik met KIES om de gemaakte wijzigingen te bewaren en di
en.ro.HelpHomeConfig:\Thome page configuration \w
de.ro.HelpHomeConfig:Homepage Konfiguration
fr.ro.HelpHomeConfig:\Tla fenêtre de configuration de Page d'accueil
-it.ro.HelpHomeConfig:\Thome page configuration \w
+it.ro.HelpHomeConfig:\Tconfigurazione della pagina iniziale \w
nl.ro.HelpHomeConfig:De begin/startpagina kan in dit venster gewijzigd worden.
en.ro.HelpHomeConfig3:You can enter a default home page address here.
de.ro.HelpHomeConfig3:Hier kann die Webadresse der Homepage eingegeben werden.
fr.ro.HelpHomeConfig3:Vous pouvez entrer ici une page d'accueil par défaut.
-it.ro.HelpHomeConfig3:You can enter a default home page address here.
+it.ro.HelpHomeConfig3:Puoi inserire l'indirizzo della pagina iniziale qui.
nl.ro.HelpHomeConfig3:Voer hier een standaard begin-/startpagina-adres in.
en.ro.HelpHomeConfig4:\Sselect a recently typed URL.|MThese addresses have recently been typed into a NetSurf browser \w's URL bar.
de.ro.HelpHomeConfig4:Klicken mit AUSWAHL zur schnellen Auswahl einer Adresse.|MDie angezeigten Adressen wurden in letzter Zeit in die Adressleiste eines Browserfensters eingegeben.
@@ -5485,7 +5489,7 @@ nl.ro.HelpHomeConfig8:Klik met KIES om de gemaakte wijzigingen te bewaren en dit
en.ro.HelpImageConfig:\Timage configuration \w
de.ro.HelpImageConfig:Das ist das Fenster zur Konfiguration der Bilddarstellungsoptionen.
fr.ro.HelpImageConfig:\Tla fenêtre de configuration d'Image
-it.ro.HelpImageConfig:\Timage configuration \w
+it.ro.HelpImageConfig:\Tconfigurazione della immagini \w
nl.ro.HelpImageConfig:De verwerking van afbeeldingen kan in dit venster gewijzigd worden.
en.ro.HelpImageConfig3:\Tcurrently selected foreground image quality.
de.ro.HelpImageConfig3:Das ist die aktuell gewählte Qualität für die Darstellung der Vordergrundbilder.
@@ -5520,12 +5524,12 @@ nl.ro.HelpImageConfig12:In dit veld kan de minimumtijd ingevoerd worden tussen d
en.ro.HelpImageConfig13:\Sreduce the minimum time between animation frames.
de.ro.HelpImageConfig13:Klicken mit AUSWAHL verkleinert die minimale Wartezeit zwischen aufeinanderfolgenden Einzelbildern einer Animation.
fr.ro.HelpImageConfig13:\Sréduire le temps minimum entre deux images d'animation.
-it.ro.HelpImageConfig13:\Sreduce the minimum time between animation frames.
+it.ro.HelpImageConfig13:\Sriduce il tempo di intervallo minimo tra i frame di animazione.
nl.ro.HelpImageConfig13:Klik met KIES om de minimumtijd tussen animatie-afbeeldingen te verkleinen.
en.ro.HelpImageConfig14:\Sincrease the minimum time between animation frames.
de.ro.HelpImageConfig14:Klicken mit AUSWAHL vergrößert die minimale Wartezeit zwischen aufeinanderfolgenden Einzelbildern einer Animation.
fr.ro.HelpImageConfig14:\Saugmenter le temps minimum entre deux images d'animation.
-it.ro.HelpImageConfig14:\Sincrease the minimum time between animation frames.
+it.ro.HelpImageConfig14:\Saumenta il tempo di intervallo minimo tra i frame di animazione.
nl.ro.HelpImageConfig14:Klik met KIES om de minimumtijd tussen animatie-afbeeldingen te vergroten.
en.ro.HelpImageConfig16:This indicates whether NetSurf will disable animations on web pages.|MWhen animations are disabled, NetSurf will show the first frame as a static image.
de.ro.HelpImageConfig16:Erlaubt das Abschalten der Animationsdarstellung auf Webseiten.|MSind die Animationen abgeschaltet, wird von NetSurf lediglich das erste Einzelbild der Animationsfolge als einfaches Bild angezeigt.
@@ -5551,7 +5555,7 @@ nl.ro.HelpImageConfig19:Klik met KIES om de gemaakte wijzigingen te bewaren en d
en.ro.HelpInterfaceConfig:\Tinterface configuration \w
de.ro.HelpInterfaceConfig:Fenster zur Einstellung des Programmverhaltens in ausgewählten Situationen
fr.ro.HelpInterfaceConfig:\Tla fenêtre de configuration d'interface
-it.ro.HelpInterfaceConfig:\Tinterface configuration \w
+it.ro.HelpInterfaceConfig:\Tconfigurazione dell'interfaccia \w
nl.ro.HelpInterfaceConfig:De interface-instellingen kunnen in dit venster gewijzigd worden.
en.ro.HelpInterfaceConfig2:This indicates whether NetSurf will strip file extensions when saving files to disc.
de.ro.HelpInterfaceConfig2:Beim Abspeichern von Dateien auf einen Datenträger werden die Dateinamenserweiterungen (Extensions) aus dem Dateinamen entfernt.
@@ -5607,7 +5611,7 @@ nl.ro.HelpInterfaceConfig18:Voer in dit invoerveld het pad in van een extern pro
en.ro.HelpLanguageConfig:\Tlanguage configuration \w
de.ro.HelpLanguageConfig:Konfigurationsfenster für die Spracheinstellungen
fr.ro.HelpLanguageConfig:\Tfenêtre de configuration de langue.
-it.ro.HelpLanguageConfig:\Tlanguage configuration \w
+it.ro.HelpLanguageConfig:\Tconfigurazione della lingua \w
nl.ro.HelpLanguageConfig:Diverse taalinstellingen kunnen in dit venster gewijzigd worden.
en.ro.HelpLanguageConfig3:\Tcurrently selected interface language.|MThe interface language is the language used for NetSurf's messages and dialogue boxes.
de.ro.HelpLanguageConfig3:Das ist die aktuell eingestellte Sprache für die Bedienoberfläche.|MDiese Sprache wird genutzt, um NetSurf's Meldungen und die Texte der Dialogboxen und Menüs darzustellen.
@@ -5617,7 +5621,7 @@ nl.ro.HelpLanguageConfig3:Dit is momenteel de geselecteerde gebruikersinterfacet
en.ro.HelpLanguageConfig4:\Sselect an interface language.
de.ro.HelpLanguageConfig4:Klicken mit AUSWAHL zum Auswählen einer Oberflächensprache.
fr.ro.HelpLanguageConfig4:\Schoisir une langue d'interface.
-it.ro.HelpLanguageConfig4:\Sselect an interface language.
+it.ro.HelpLanguageConfig4:\Sseleziona un'interfaccia di lingua.
nl.ro.HelpLanguageConfig4:Klik met KIES om de gebruikersinterfacetaal te kiezen.
en.ro.HelpLanguageConfig6:\Tcurrently selected web page language.|MIf a web site provides a choice of languages, NetSurf will request the page in your preferred language.
de.ro.HelpLanguageConfig6:Das ist die aktuelle Sprache zur Anzeige auf Webseiten.|MWenn eine Webseite die Darstellung in verschiedenen Sprachen anbietet, wird NetSurf die Webseite in der hier eingestellten bevorzugten Sprache abrufen.
@@ -5627,7 +5631,7 @@ nl.ro.HelpLanguageConfig6:Dit is momenteel de geselecteerde webpaginataal.|MWann
en.ro.HelpLanguageConfig7:\Sselect a preferred web page language.
de.ro.HelpLanguageConfig7:Klicken mit AUSWAHL zum Auswählen einer Webseitensprache.
fr.ro.HelpLanguageConfig7:\Schoisir une langue de page web préférée.
-it.ro.HelpLanguageConfig7:\Sselect a preferred web page language.
+it.ro.HelpLanguageConfig7:\Sseleziona una lingua preferita per le pagine web.
nl.ro.HelpLanguageConfig7:Klik met KIES om de gewenste webpaginataal te kiezen.
en.ro.HelpLanguageConfig8:\Sreset the Language options back to their default values.
de.ro.HelpLanguageConfig8:Stellt die Standardeinstellungen wieder her.
@@ -5648,7 +5652,7 @@ nl.ro.HelpLanguageConfig10:Klik met KIES om de gemaakte wijzigingen te bewaren e
en.ro.HelpSecurityConfig:\Tsecurity configuration \w
de.ro.HelpSecurityConfig:Fenster zur Konfiguration der Sicherheitseinstellungen
fr.ro.HelpSecurityConfig:\Tla fenêtre de configuration de sécurité
-it.ro.HelpSecurityConfig:\Tsecurity configuration \w
+it.ro.HelpSecurityConfig:\Tconfigurazione di sicurezza \w
nl.ro.HelpSecurityConfig:De privacy- en veiligheidsinstellingen kunnen in dit venster gewijzigd worden.
en.ro.HelpSecurityConfig2:This indicates whether NetSurf will send site referral information to web servers.|MWhen this is enabled NetSurf will tell the web server of a new page the address of the site you came from, after following a link.
de.ro.HelpSecurityConfig2:NetSurf sendet Seitenreferenzinformationen an Webserver.|MIst diese Option gewählt, schickt NetSurf an den Server einer neuen Webseite die Adresse der Seite von der aus die aktuelle über einen Link aufgerufen wurde.
@@ -5663,12 +5667,12 @@ nl.ro.HelpSecurityConfig6:In dit veld kan de tijdsduur ingevoerd worden, dat ite
en.ro.HelpSecurityConfig7:\Sreduce the global history duration.
de.ro.HelpSecurityConfig7:Klicken mit AUSWAHL verkürzt die Aufbewahrungszeit von Seiten in der globalen History.
fr.ro.HelpSecurityConfig7:\Sréduire la durée de l'historique global.
-it.ro.HelpSecurityConfig7:\Sreduce the global history duration.
+it.ro.HelpSecurityConfig7:\Sriduce la durata della cronologia globale.
nl.ro.HelpSecurityConfig7:Klik met KIES om de tijdsduur van de browsergeschiedenis per dag te verminderen.
en.ro.HelpSecurityConfig8:\Sincrease the global history duration.
de.ro.HelpSecurityConfig8:Klicken mit AUSWAHL verlängert die Aufbewahrungszeit von Seiten in der globalen History.
fr.ro.HelpSecurityConfig8:\Saugmenter la durée de l'historique global.
-it.ro.HelpSecurityConfig8:\Sincrease the global history duration.
+it.ro.HelpSecurityConfig8:\Saumenta la durata della cronologia globale.
nl.ro.HelpSecurityConfig8:Klik met KIES om de tijdsduur van de browsergeschiedenis per dag te vermeerderen,
en.ro.HelpSecurityConfig10:\Sreset the Security options back to their default values.
de.ro.HelpSecurityConfig10:Stellt die Standardeinstellungen wieder her.
@@ -5689,7 +5693,7 @@ nl.ro.HelpSecurityConfig12:Klik met KIES om de gemaakte wijzigingen te bewaren e
en.ro.HelpThemeConfig:\Ttheme configuration \w
de.ro.HelpThemeConfig:Fenster zur Auswahl des Anzeigethemas
fr.ro.HelpThemeConfig:\Tla fenêtre de configuration de thème
-it.ro.HelpThemeConfig:\Ttheme configuration \w
+it.ro.HelpThemeConfig:\Tconfigurazione del tema \w
nl.ro.HelpThemeConfig:Het thema kan in dit venster gewijzigd worden.
en.ro.HelpThemeConfig2:\Sreset the Theme options back to their default values.
de.ro.HelpThemeConfig2:Stellt die Standardeinstellungen wieder her.
@@ -5787,7 +5791,7 @@ nl.all.con_fonts:Lettertypen
en.all.con_home:Home page
de.all.con_home:Homepage
fr.all.con_home:Page d'accueil
-it.all.con_home:Home Page
+it.all.con_home:Pagina iniziale
nl.all.con_home:Startpagina
en.all.con_image:Images
de.all.con_image:Bilder
@@ -6175,7 +6179,7 @@ nl.ami.FontAntialiasing:Anti-aliasing (indien mogelijk) gebruiken
en.ami.FontBitmap:Allow bitmap fonts
de.ami.FontBitmap:Allow bitmap fonts
fr.ami.FontBitmap:Allow bitmap fonts
-it.ami.FontBitmap:Allow bitmap fonts
+it.ami.FontBitmap:Permetti font bitmap
nl.ami.FontBitmap:Allow bitmap fonts
# Font scanning
@@ -6380,6 +6384,7 @@ nl.all.Bottom:Onder
en.all.MM:mm
fr.all.MM:mm
nl.all.MM:mm
+it.all.MM:mm
en.all.Scaling:Scaling
de.all.Scaling:Skalierung
--
NetSurf Browser
6 years, 2 months
netsurf: branch svenw/cocoa updated. release/3.6-509-g71fa17b
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/71fa17bae889af29053e4...
...commit http://git.netsurf-browser.org/netsurf.git/commit/71fa17bae889af29053e43e...
...tree http://git.netsurf-browser.org/netsurf.git/tree/71fa17bae889af29053e43e11...
The branch, svenw/cocoa has been updated
via 71fa17bae889af29053e43e11e5099743aa829b8 (commit)
via 83b0dd2409cd69dc02bea193625d438c34ca87ab (commit)
from 78cbfa34b5f714349ce97a8b0e714f257039836b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=71fa17bae889af29053...
commit 71fa17bae889af29053e43e11e5099743aa829b8
Merge: 78cbfa3 83b0dd2
Author: Sven Weidauer <sven(a)5sw.de>
Commit: Sven Weidauer <sven(a)5sw.de>
Merge remote-tracking branch 'origin/master' into svenw/cocoa
-----------------------------------------------------------------------
Summary of changes:
frontends/amiga/gui.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 5c6700a..44bba2d 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -4550,9 +4550,7 @@ static void ami_gui_close_tabs(struct gui_window_2 *gwin, bool other_tabs)
struct gui_window *gw;
if((gwin->tabs > 1) && (nsoption_bool(tab_close_warn) == true)) {
- char *req_body = ami_utf8_easy(messages_get("MultiTabClose"));
- int32 res = amiga_warn_user_multi(req_body, "Yes", "No", gwin->win);
- free(req_body);
+ int32 res = amiga_warn_user_multi(messages_get("MultiTabClose"), "Yes", "No", gwin->win);
if(res == 0) return;
}
--
NetSurf Browser
6 years, 2 months
netsurf: branch master updated. release/3.6-484-g83b0dd2
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/83b0dd2409cd69dc02bea...
...commit http://git.netsurf-browser.org/netsurf.git/commit/83b0dd2409cd69dc02bea19...
...tree http://git.netsurf-browser.org/netsurf.git/tree/83b0dd2409cd69dc02bea1936...
The branch, master has been updated
via 83b0dd2409cd69dc02bea193625d438c34ca87ab (commit)
from 2b2bbbe76502b6cb528752a2dad89d3f1f6c6409 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=83b0dd2409cd69dc02b...
commit 83b0dd2409cd69dc02bea193625d438c34ca87ab
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Don't double-convert string
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 5c6700a..44bba2d 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -4550,9 +4550,7 @@ static void ami_gui_close_tabs(struct gui_window_2 *gwin, bool other_tabs)
struct gui_window *gw;
if((gwin->tabs > 1) && (nsoption_bool(tab_close_warn) == true)) {
- char *req_body = ami_utf8_easy(messages_get("MultiTabClose"));
- int32 res = amiga_warn_user_multi(req_body, "Yes", "No", gwin->win);
- free(req_body);
+ int32 res = amiga_warn_user_multi(messages_get("MultiTabClose"), "Yes", "No", gwin->win);
if(res == 0) return;
}
-----------------------------------------------------------------------
Summary of changes:
frontends/amiga/gui.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 5c6700a..44bba2d 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -4550,9 +4550,7 @@ static void ami_gui_close_tabs(struct gui_window_2 *gwin, bool other_tabs)
struct gui_window *gw;
if((gwin->tabs > 1) && (nsoption_bool(tab_close_warn) == true)) {
- char *req_body = ami_utf8_easy(messages_get("MultiTabClose"));
- int32 res = amiga_warn_user_multi(req_body, "Yes", "No", gwin->win);
- free(req_body);
+ int32 res = amiga_warn_user_multi(messages_get("MultiTabClose"), "Yes", "No", gwin->win);
if(res == 0) return;
}
--
NetSurf Browser
6 years, 2 months
netsurf: branch svenw/cocoa updated. release/3.6-507-g78cbfa3
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/78cbfa34b5f714349ce97...
...commit http://git.netsurf-browser.org/netsurf.git/commit/78cbfa34b5f714349ce97a8...
...tree http://git.netsurf-browser.org/netsurf.git/tree/78cbfa34b5f714349ce97a8b0...
The branch, svenw/cocoa has been updated
via 78cbfa34b5f714349ce97a8b0e714f257039836b (commit)
via c3b7482ce67c7c408bc028b139b651f8b8118ca6 (commit)
from 246326c5b4b926f23c69a6cbf988769b85c9ef98 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=78cbfa34b5f714349ce...
commit 78cbfa34b5f714349ce97a8b0e714f257039836b
Author: Sven Weidauer <sven(a)5sw.de>
Commit: Sven Weidauer <sven(a)5sw.de>
Remove black scroller and replace with regular ones.
diff --git a/frontends/cocoa/BlackScroller.h b/frontends/cocoa/BlackScroller.h
deleted file mode 100644
index 3efe662..0000000
--- a/frontends/cocoa/BlackScroller.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Copyright (c) 1011 Sven Weidauer
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-
-#import <Cocoa/Cocoa.h>
-
-@interface BlackScroller : NSScroller {
- BOOL drawTrack;
- NSTrackingRectTag tag;
-}
-
-@property (readonly, getter=isHorizontal) BOOL horizontal;
-
-@end
diff --git a/frontends/cocoa/BlackScroller.m b/frontends/cocoa/BlackScroller.m
deleted file mode 100644
index df15e91..0000000
--- a/frontends/cocoa/BlackScroller.m
+++ /dev/null
@@ -1,156 +0,0 @@
-/* Copyright (c) 1011 Sven Weidauer
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#import "BlackScroller.h"
-
-@implementation BlackScroller
-
-- (void)setFrame:(NSRect)frameRect
-{
- [super setFrame:frameRect];
- if (tag != 0)
- [self removeTrackingRect:tag];
- tag = [self addTrackingRect:[self bounds] owner:self userData:NULL assumeInside:NO];
-}
-
-- (void)drawRect:(NSRect)dirtyRect
-{
- [[NSColor clearColor] set];
- [NSBezierPath fillRect:dirtyRect];
-
- if (drawTrack)
- [self drawKnobSlotInRect:[self rectForPart:NSScrollerKnobSlot]
- highlight:NO];
- [self drawKnob];
-}
-
-- (void)drawKnobSlotInRect:(NSRect)slotRect highlight:(BOOL)flag
-{
- slotRect = NSInsetRect(slotRect, 2, 2);
- slotRect = [self.window convertRectToScreen:slotRect];
- slotRect.origin.x = floor(slotRect.origin.x) + 0.5;
- slotRect.origin.y = floor(slotRect.origin.y) + 0.5;
- slotRect.size.width = floor(slotRect.size.width);
- slotRect.size.height = floor(slotRect.size.height);
- slotRect = [self.window convertRectFromScreen:slotRect];
-
- NSGradient *gradient = [[NSGradient alloc] initWithColorsAndLocations:
- [NSColor clearColor], 0.0,
- [NSColor clearColor], 0.4,
- [NSColor whiteColor], 1.0,
- nil];
- [[NSColor whiteColor] set];
- const float radius = 0.5 * ([self isHorizontal] ? NSHeight(slotRect) : NSWidth(slotRect));
- NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:slotRect
- xRadius:radius
- yRadius:radius];
- [gradient drawInBezierPath:path angle:[self isHorizontal] ? 90 : 0];
-
- [path stroke];
-}
-
-- (NSUsableScrollerParts)usableParts
-{
- return NSScrollerKnob | NSScrollerKnobSlot;
-}
-
-- (void)drawKnob
-{
- NSRect rect = NSInsetRect([self rectForPart:NSScrollerKnob], 2, 2);
-
- rect = [self.window convertRectToScreen:rect];
- rect.origin.x = floor(rect.origin.x) + 0.5;
- rect.origin.y = floor(rect.origin.y) + 0.5;
- rect.size.width = floor(rect.size.width);
- rect.size.height = floor(rect.size.height);
- rect = [self.window convertRectFromScreen:rect];
-
- [[NSColor colorWithDeviceWhite:1.0 alpha:drawTrack ? 1.0 : 0.6] set];
-
- const float radius = 0.5 * ([self isHorizontal] ? NSHeight(rect) : NSWidth(rect));
- NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:rect
- xRadius:radius
- yRadius:radius];
- [path fill];
- [path stroke];
-}
-
-- (NSRect)rectForPart:(NSScrollerPart)partCode
-{
- const bool horizontal = [self isHorizontal];
-
- NSRect rect = horizontal ? NSInsetRect([self bounds], 4, 0) : NSInsetRect([self bounds], 0, 4);
-
- switch (partCode) {
- case NSScrollerKnobSlot:
- return rect;
-
- case NSScrollerKnob: {
- const CGFloat len = horizontal ? NSWidth(rect) : NSHeight(rect);
- CGFloat knobLen = [self knobProportion] * len;
- const CGFloat minKnobLen = horizontal ? NSHeight(rect) : NSWidth(rect);
- if (knobLen < minKnobLen)
- knobLen = minKnobLen;
-
- const CGFloat start = [self doubleValue] * (len - knobLen);
-
- if (horizontal) {
- rect.origin.x += start;
- rect.size.width = knobLen;
- } else {
- rect.origin.y += start;
- rect.size.height = knobLen;
- }
-
- return rect;
- }
-
- default:
- return [super rectForPart:partCode];
- }
-}
-
-- (BOOL)isOpaque
-{
- return NO;
-}
-
-- (BOOL)isHorizontal
-{
- NSRect bounds = [self bounds];
- return NSWidth(bounds) > NSHeight(bounds);
-}
-
-- (void)mouseEntered:(NSEvent *)theEvent
-{
- drawTrack = YES;
- [self setNeedsDisplay:YES];
-}
-
-- (void)mouseExited:(NSEvent *)theEvent
-{
- drawTrack = NO;
- [self setNeedsDisplay:YES];
-}
-
-@end
diff --git a/frontends/cocoa/Makefile b/frontends/cocoa/Makefile
index 0febfbb..212ed04 100644
--- a/frontends/cocoa/Makefile
+++ b/frontends/cocoa/Makefile
@@ -97,7 +97,6 @@ S_FRONTEND := \
selection.m \
ArrowBox.m \
ArrowWindow.m \
- BlackScroller.m \
LocalHistoryController.m \
apple_image.m
diff --git a/frontends/cocoa/NetSurf.xcodeproj/project.pbxproj b/frontends/cocoa/NetSurf.xcodeproj/project.pbxproj
index bc1bee7..b4475ec 100644
--- a/frontends/cocoa/NetSurf.xcodeproj/project.pbxproj
+++ b/frontends/cocoa/NetSurf.xcodeproj/project.pbxproj
@@ -23,7 +23,6 @@
263A281D1EE40CCF005C52B9 /* ArrowBox.m in Sources */ = {isa = PBXBuildFile; fileRef = 263A26831EE40BFC005C52B9 /* ArrowBox.m */; };
263A281E1EE40CCF005C52B9 /* ArrowWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 263A26841EE40BFC005C52B9 /* ArrowWindow.m */; };
263A281F1EE40CCF005C52B9 /* bitmap.m in Sources */ = {isa = PBXBuildFile; fileRef = 263A26851EE40BFC005C52B9 /* bitmap.m */; };
- 263A28201EE40CCF005C52B9 /* BlackScroller.m in Sources */ = {isa = PBXBuildFile; fileRef = 263A26861EE40BFC005C52B9 /* BlackScroller.m */; };
263A28211EE40CCF005C52B9 /* BookmarksController.m in Sources */ = {isa = PBXBuildFile; fileRef = 263A26871EE40BFC005C52B9 /* BookmarksController.m */; };
263A28221EE40CCF005C52B9 /* BrowserView.m in Sources */ = {isa = PBXBuildFile; fileRef = 263A26881EE40BFC005C52B9 /* BrowserView.m */; };
263A28231EE40CCF005C52B9 /* BrowserViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 263A26891EE40BFC005C52B9 /* BrowserViewController.m */; };
@@ -295,7 +294,6 @@
263A26621EE40BFC005C52B9 /* ArrowBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrowBox.h; sourceTree = SOURCE_ROOT; };
263A26631EE40BFC005C52B9 /* ArrowWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrowWindow.h; sourceTree = SOURCE_ROOT; };
263A26641EE40BFC005C52B9 /* bitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bitmap.h; sourceTree = SOURCE_ROOT; };
- 263A26651EE40BFC005C52B9 /* BlackScroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlackScroller.h; sourceTree = SOURCE_ROOT; };
263A26661EE40BFC005C52B9 /* BookmarksController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BookmarksController.h; sourceTree = SOURCE_ROOT; };
263A26671EE40BFC005C52B9 /* BrowserView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BrowserView.h; sourceTree = SOURCE_ROOT; };
263A26681EE40BFC005C52B9 /* BrowserViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BrowserViewController.h; sourceTree = SOURCE_ROOT; };
@@ -328,7 +326,6 @@
263A26831EE40BFC005C52B9 /* ArrowBox.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArrowBox.m; sourceTree = SOURCE_ROOT; };
263A26841EE40BFC005C52B9 /* ArrowWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArrowWindow.m; sourceTree = SOURCE_ROOT; };
263A26851EE40BFC005C52B9 /* bitmap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = bitmap.m; sourceTree = SOURCE_ROOT; };
- 263A26861EE40BFC005C52B9 /* BlackScroller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BlackScroller.m; sourceTree = SOURCE_ROOT; };
263A26871EE40BFC005C52B9 /* BookmarksController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BookmarksController.m; sourceTree = SOURCE_ROOT; };
263A26881EE40BFC005C52B9 /* BrowserView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BrowserView.m; sourceTree = SOURCE_ROOT; };
263A26891EE40BFC005C52B9 /* BrowserViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BrowserViewController.m; sourceTree = SOURCE_ROOT; };
@@ -748,7 +745,6 @@
263A26621EE40BFC005C52B9 /* ArrowBox.h */,
263A26631EE40BFC005C52B9 /* ArrowWindow.h */,
263A26641EE40BFC005C52B9 /* bitmap.h */,
- 263A26651EE40BFC005C52B9 /* BlackScroller.h */,
263A26661EE40BFC005C52B9 /* BookmarksController.h */,
263A26671EE40BFC005C52B9 /* BrowserView.h */,
263A26681EE40BFC005C52B9 /* BrowserViewController.h */,
@@ -781,7 +777,6 @@
263A26831EE40BFC005C52B9 /* ArrowBox.m */,
263A26841EE40BFC005C52B9 /* ArrowWindow.m */,
263A26851EE40BFC005C52B9 /* bitmap.m */,
- 263A26861EE40BFC005C52B9 /* BlackScroller.m */,
263A26871EE40BFC005C52B9 /* BookmarksController.m */,
263A26881EE40BFC005C52B9 /* BrowserView.m */,
263A26891EE40BFC005C52B9 /* BrowserViewController.m */,
@@ -1723,7 +1718,6 @@
263A28171EE40CCF005C52B9 /* PSMTabDragAssistant.m in Sources */,
263A287A1EE40CFB005C52B9 /* version.c in Sources */,
263A28741EE40CFB005C52B9 /* selection.c in Sources */,
- 263A28201EE40CCF005C52B9 /* BlackScroller.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/frontends/cocoa/res/LocalHistoryPanel.xib b/frontends/cocoa/res/LocalHistoryPanel.xib
index 794d2db..5f2d688 100644
--- a/frontends/cocoa/res/LocalHistoryPanel.xib
+++ b/frontends/cocoa/res/LocalHistoryPanel.xib
@@ -1,357 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
- <data>
- <int key="IBDocument.SystemTarget">1060</int>
- <string key="IBDocument.SystemVersion">10J567</string>
- <string key="IBDocument.InterfaceBuilderVersion">804</string>
- <string key="IBDocument.AppKitVersion">1038.35</string>
- <string key="IBDocument.HIToolboxVersion">462.00</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="NS.object.0">804</string>
- </object>
- <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="2"/>
- </object>
- <object class="NSArray" key="IBDocument.PluginDependencies">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- </object>
- <object class="NSMutableDictionary" key="IBDocument.Metadata">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys" id="0">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSCustomObject" id="1001">
- <string key="NSClassName">LocalHistoryController</string>
- </object>
- <object class="NSCustomObject" id="1003">
- <string key="NSClassName">FirstResponder</string>
- </object>
- <object class="NSCustomObject" id="1004">
- <string key="NSClassName">NSApplication</string>
- </object>
- <object class="NSWindowTemplate" id="1005">
- <int key="NSWindowStyleMask">15</int>
- <int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{196, 240}, {480, 270}}</string>
- <int key="NSWTFlags">1618477056</int>
- <string key="NSWindowTitle">Window</string>
- <string key="NSWindowClass">ArrowWindow</string>
- <nil key="NSViewClass"/>
- <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
- <object class="NSView" key="NSWindowView" id="1006">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSScrollView" id="488267087">
- <reference key="NSNextResponder" ref="1006"/>
- <int key="NSvFlags">274</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSClipView" id="753770525">
- <reference key="NSNextResponder" ref="488267087"/>
- <int key="NSvFlags">2304</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSCustomView" id="820702167">
- <reference key="NSNextResponder" ref="753770525"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrameSize">{480, 270}</string>
- <reference key="NSSuperview" ref="753770525"/>
- <string key="NSClassName">HistoryView</string>
- </object>
- </object>
- <string key="NSFrame">{{1, 1}, {480, 270}}</string>
- <reference key="NSSuperview" ref="488267087"/>
- <reference key="NSNextKeyView" ref="820702167"/>
- <reference key="NSDocView" ref="820702167"/>
- <object class="NSColor" key="NSBGColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlColor</string>
- <object class="NSColor" key="NSColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
- </object>
- </object>
- <int key="NScvFlags">2</int>
- </object>
- <object class="NSScroller" id="84195230">
- <reference key="NSNextResponder" ref="488267087"/>
- <int key="NSvFlags">-2147483392</int>
- <string key="NSFrame">{{470, 1}, {11, 255}}</string>
- <reference key="NSSuperview" ref="488267087"/>
- <int key="NSsFlags">256</int>
- <int key="NSArrowsLoc">2</int>
- <reference key="NSTarget" ref="488267087"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSCurValue">1</double>
- <double key="NSPercent">0.96363627910614014</double>
- </object>
- <object class="NSScroller" id="645365106">
- <reference key="NSNextResponder" ref="488267087"/>
- <int key="NSvFlags">-2147483392</int>
- <string key="NSFrame">{{1, 260}, {465, 11}}</string>
- <reference key="NSSuperview" ref="488267087"/>
- <int key="NSsFlags">257</int>
- <int key="NSArrowsLoc">2</int>
- <reference key="NSTarget" ref="488267087"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.50602412223815918</double>
- </object>
- </object>
- <string key="NSFrame">{{-1, -1}, {482, 272}}</string>
- <reference key="NSSuperview" ref="1006"/>
- <reference key="NSNextKeyView" ref="753770525"/>
- <int key="NSsFlags">562</int>
- <reference key="NSVScroller" ref="84195230"/>
- <reference key="NSHScroller" ref="645365106"/>
- <reference key="NSContentView" ref="753770525"/>
- </object>
- </object>
- <string key="NSFrameSize">{480, 270}</string>
- <reference key="NSSuperview"/>
- </object>
- <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
- <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
- </object>
- </object>
- <object class="IBObjectContainer" key="IBDocument.Objects">
- <object class="NSMutableArray" key="connectionRecords">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">window</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="1005"/>
- </object>
- <int key="connectionID">7</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">history</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="820702167"/>
- </object>
- <int key="connectionID">8</int>
- </object>
- </object>
- <object class="IBMutableOrderedSet" key="objectRecords">
- <object class="NSArray" key="orderedObjects">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBObjectRecord">
- <int key="objectID">0</int>
- <reference key="object" ref="0"/>
- <reference key="children" ref="1000"/>
- <nil key="parent"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-2</int>
- <reference key="object" ref="1001"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">File's Owner</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-1</int>
- <reference key="object" ref="1003"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">First Responder</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-3</int>
- <reference key="object" ref="1004"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">Application</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">1</int>
- <reference key="object" ref="1005"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="1006"/>
- </object>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">2</int>
- <reference key="object" ref="1006"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="488267087"/>
- </object>
- <reference key="parent" ref="1005"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">3</int>
- <reference key="object" ref="488267087"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="84195230"/>
- <reference ref="645365106"/>
- <reference ref="820702167"/>
- </object>
- <reference key="parent" ref="1006"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">4</int>
- <reference key="object" ref="84195230"/>
- <reference key="parent" ref="488267087"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">5</int>
- <reference key="object" ref="645365106"/>
- <reference key="parent" ref="488267087"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">6</int>
- <reference key="object" ref="820702167"/>
- <reference key="parent" ref="488267087"/>
- </object>
- </object>
- </object>
- <object class="NSMutableDictionary" key="flattenedProperties">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>1.IBEditorWindowLastContentRect</string>
- <string>1.IBPluginDependency</string>
- <string>1.IBWindowTemplateEditedContentRect</string>
- <string>1.NSWindowTemplate.visibleAtLaunch</string>
- <string>1.WindowOrigin</string>
- <string>1.editorWindowContentRectSynchronizationRect</string>
- <string>2.IBPluginDependency</string>
- <string>3.IBPluginDependency</string>
- <string>3.IBViewBoundsToFrameTransform</string>
- <string>4.CustomClassName</string>
- <string>4.IBPluginDependency</string>
- <string>5.CustomClassName</string>
- <string>5.IBPluginDependency</string>
- <string>6.IBPluginDependency</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>{{364, 310}, {480, 270}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{364, 310}, {480, 270}}</string>
- <boolean value="NO"/>
- <string>{196, 240}</string>
- <string>{{202, 428}, {480, 270}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAAC/gAAAw4aAAA</bytes>
- </object>
- <string>BlackScroller</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>BlackScroller</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="unlocalizedProperties">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <nil key="activeLocalization"/>
- <object class="NSMutableDictionary" key="localizations">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <nil key="sourceID"/>
- <int key="maxID">8</int>
- </object>
- <object class="IBClassDescriber" key="IBDocument.Classes">
- <object class="NSMutableArray" key="referencedPartialClassDescriptions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">ArrowWindow</string>
- <string key="superclassName">NSWindow</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">ArrowWindow.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">BlackScroller</string>
- <string key="superclassName">NSScroller</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">BlackScroller.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">HistoryView</string>
- <string key="superclassName">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">HistoryView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">LocalHistoryController</string>
- <string key="superclassName">NSWindowController</string>
- <object class="NSMutableDictionary" key="outlets">
- <string key="NS.key.0">history</string>
- <string key="NS.object.0">HistoryView</string>
- </object>
- <object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <string key="NS.key.0">history</string>
- <object class="IBToOneOutletInfo" key="NS.object.0">
- <string key="name">history</string>
- <string key="candidateClassName">HistoryView</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">LocalHistoryController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">PSMTabBarControl/PSMTabDragAssistant.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">PSMTabBarControl/PSMTabBarCell.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">PSMTabBarControl/PSMTabBarControl.h</string>
- </object>
- </object>
- </object>
- </object>
- <int key="IBDocument.localizationMode">0</int>
- <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
- <integer value="3000" key="NS.object.0"/>
- </object>
- <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
- <string key="IBDocument.LastKnownRelativeProjectPath">../NetSurf.xcodeproj</string>
- <int key="IBDocument.defaultPropertyAccessControl">3</int>
- </data>
-</archive>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13122.19" systemVersion="16F73" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+ <dependencies>
+ <deployment identifier="macosx"/>
+ <development version="8000" identifier="xcode"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13122.19"/>
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+ </dependencies>
+ <objects>
+ <customObject id="-2" userLabel="File's Owner" customClass="LocalHistoryController">
+ <connections>
+ <outlet property="history" destination="6" id="8"/>
+ <outlet property="window" destination="1" id="7"/>
+ </connections>
+ </customObject>
+ <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+ <customObject id="-3" userLabel="Application"/>
+ <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="1" customClass="ArrowWindow">
+ <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
+ <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
+ <rect key="contentRect" x="196" y="240" width="480" height="270"/>
+ <rect key="screenRect" x="0.0" y="0.0" width="1680" height="1028"/>
+ <view key="contentView" id="2">
+ <rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <subviews>
+ <scrollView autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="3">
+ <rect key="frame" x="-1" y="-1" width="482" height="272"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="mPm-ZF-vKt">
+ <rect key="frame" x="1" y="1" width="480" height="270"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <subviews>
+ <customView id="6" customClass="HistoryView">
+ <rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
+ <autoresizingMask key="autoresizingMask"/>
+ </customView>
+ </subviews>
+ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+ </clipView>
+ <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" arrowsPosition="none" controlSize="small" horizontal="YES" id="5">
+ <rect key="frame" x="1" y="260" width="465" height="11"/>
+ <autoresizingMask key="autoresizingMask"/>
+ </scroller>
+ <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" arrowsPosition="none" doubleValue="1" controlSize="small" horizontal="NO" id="4">
+ <rect key="frame" x="470" y="1" width="11" height="255"/>
+ <autoresizingMask key="autoresizingMask"/>
+ </scroller>
+ </scrollView>
+ </subviews>
+ </view>
+ </window>
+ </objects>
+</document>
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=c3b7482ce67c7c408bc...
commit c3b7482ce67c7c408bc028b139b651f8b8118ca6
Author: Sven Weidauer <sven(a)5sw.de>
Commit: Sven Weidauer <sven(a)5sw.de>
Close history popover after selecting a page.
diff --git a/frontends/cocoa/HistoryView.m b/frontends/cocoa/HistoryView.m
index 798a308..f935f9f 100644
--- a/frontends/cocoa/HistoryView.m
+++ b/frontends/cocoa/HistoryView.m
@@ -121,7 +121,11 @@ static struct core_window_callback_table history_view_table = {
state = BROWSER_MOUSE_PRESS_2;
}
- local_history_mouse_action(_session, state, cocoa_pt_to_px(location.x), cocoa_pt_to_px(location.y));
+ nserror res = local_history_mouse_action(_session, state, cocoa_pt_to_px(location.x), cocoa_pt_to_px(location.y));
+
+ if (res == NSERROR_OK) {
+ self.browser.historyVisible = NO;
+ }
}
- (BOOL)isFlipped
-----------------------------------------------------------------------
Summary of changes:
frontends/cocoa/BlackScroller.h | 18 -
frontends/cocoa/BlackScroller.m | 156 --------
frontends/cocoa/HistoryView.m | 6 +-
frontends/cocoa/Makefile | 1 -
frontends/cocoa/NetSurf.xcodeproj/project.pbxproj | 6 -
frontends/cocoa/res/LocalHistoryPanel.xib | 409 +++------------------
6 files changed, 58 insertions(+), 538 deletions(-)
delete mode 100644 frontends/cocoa/BlackScroller.h
delete mode 100644 frontends/cocoa/BlackScroller.m
diff --git a/frontends/cocoa/BlackScroller.h b/frontends/cocoa/BlackScroller.h
deleted file mode 100644
index 3efe662..0000000
--- a/frontends/cocoa/BlackScroller.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Copyright (c) 1011 Sven Weidauer
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-
-#import <Cocoa/Cocoa.h>
-
-@interface BlackScroller : NSScroller {
- BOOL drawTrack;
- NSTrackingRectTag tag;
-}
-
-@property (readonly, getter=isHorizontal) BOOL horizontal;
-
-@end
diff --git a/frontends/cocoa/BlackScroller.m b/frontends/cocoa/BlackScroller.m
deleted file mode 100644
index df15e91..0000000
--- a/frontends/cocoa/BlackScroller.m
+++ /dev/null
@@ -1,156 +0,0 @@
-/* Copyright (c) 1011 Sven Weidauer
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#import "BlackScroller.h"
-
-@implementation BlackScroller
-
-- (void)setFrame:(NSRect)frameRect
-{
- [super setFrame:frameRect];
- if (tag != 0)
- [self removeTrackingRect:tag];
- tag = [self addTrackingRect:[self bounds] owner:self userData:NULL assumeInside:NO];
-}
-
-- (void)drawRect:(NSRect)dirtyRect
-{
- [[NSColor clearColor] set];
- [NSBezierPath fillRect:dirtyRect];
-
- if (drawTrack)
- [self drawKnobSlotInRect:[self rectForPart:NSScrollerKnobSlot]
- highlight:NO];
- [self drawKnob];
-}
-
-- (void)drawKnobSlotInRect:(NSRect)slotRect highlight:(BOOL)flag
-{
- slotRect = NSInsetRect(slotRect, 2, 2);
- slotRect = [self.window convertRectToScreen:slotRect];
- slotRect.origin.x = floor(slotRect.origin.x) + 0.5;
- slotRect.origin.y = floor(slotRect.origin.y) + 0.5;
- slotRect.size.width = floor(slotRect.size.width);
- slotRect.size.height = floor(slotRect.size.height);
- slotRect = [self.window convertRectFromScreen:slotRect];
-
- NSGradient *gradient = [[NSGradient alloc] initWithColorsAndLocations:
- [NSColor clearColor], 0.0,
- [NSColor clearColor], 0.4,
- [NSColor whiteColor], 1.0,
- nil];
- [[NSColor whiteColor] set];
- const float radius = 0.5 * ([self isHorizontal] ? NSHeight(slotRect) : NSWidth(slotRect));
- NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:slotRect
- xRadius:radius
- yRadius:radius];
- [gradient drawInBezierPath:path angle:[self isHorizontal] ? 90 : 0];
-
- [path stroke];
-}
-
-- (NSUsableScrollerParts)usableParts
-{
- return NSScrollerKnob | NSScrollerKnobSlot;
-}
-
-- (void)drawKnob
-{
- NSRect rect = NSInsetRect([self rectForPart:NSScrollerKnob], 2, 2);
-
- rect = [self.window convertRectToScreen:rect];
- rect.origin.x = floor(rect.origin.x) + 0.5;
- rect.origin.y = floor(rect.origin.y) + 0.5;
- rect.size.width = floor(rect.size.width);
- rect.size.height = floor(rect.size.height);
- rect = [self.window convertRectFromScreen:rect];
-
- [[NSColor colorWithDeviceWhite:1.0 alpha:drawTrack ? 1.0 : 0.6] set];
-
- const float radius = 0.5 * ([self isHorizontal] ? NSHeight(rect) : NSWidth(rect));
- NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:rect
- xRadius:radius
- yRadius:radius];
- [path fill];
- [path stroke];
-}
-
-- (NSRect)rectForPart:(NSScrollerPart)partCode
-{
- const bool horizontal = [self isHorizontal];
-
- NSRect rect = horizontal ? NSInsetRect([self bounds], 4, 0) : NSInsetRect([self bounds], 0, 4);
-
- switch (partCode) {
- case NSScrollerKnobSlot:
- return rect;
-
- case NSScrollerKnob: {
- const CGFloat len = horizontal ? NSWidth(rect) : NSHeight(rect);
- CGFloat knobLen = [self knobProportion] * len;
- const CGFloat minKnobLen = horizontal ? NSHeight(rect) : NSWidth(rect);
- if (knobLen < minKnobLen)
- knobLen = minKnobLen;
-
- const CGFloat start = [self doubleValue] * (len - knobLen);
-
- if (horizontal) {
- rect.origin.x += start;
- rect.size.width = knobLen;
- } else {
- rect.origin.y += start;
- rect.size.height = knobLen;
- }
-
- return rect;
- }
-
- default:
- return [super rectForPart:partCode];
- }
-}
-
-- (BOOL)isOpaque
-{
- return NO;
-}
-
-- (BOOL)isHorizontal
-{
- NSRect bounds = [self bounds];
- return NSWidth(bounds) > NSHeight(bounds);
-}
-
-- (void)mouseEntered:(NSEvent *)theEvent
-{
- drawTrack = YES;
- [self setNeedsDisplay:YES];
-}
-
-- (void)mouseExited:(NSEvent *)theEvent
-{
- drawTrack = NO;
- [self setNeedsDisplay:YES];
-}
-
-@end
diff --git a/frontends/cocoa/HistoryView.m b/frontends/cocoa/HistoryView.m
index 798a308..f935f9f 100644
--- a/frontends/cocoa/HistoryView.m
+++ b/frontends/cocoa/HistoryView.m
@@ -121,7 +121,11 @@ static struct core_window_callback_table history_view_table = {
state = BROWSER_MOUSE_PRESS_2;
}
- local_history_mouse_action(_session, state, cocoa_pt_to_px(location.x), cocoa_pt_to_px(location.y));
+ nserror res = local_history_mouse_action(_session, state, cocoa_pt_to_px(location.x), cocoa_pt_to_px(location.y));
+
+ if (res == NSERROR_OK) {
+ self.browser.historyVisible = NO;
+ }
}
- (BOOL)isFlipped
diff --git a/frontends/cocoa/Makefile b/frontends/cocoa/Makefile
index 0febfbb..212ed04 100644
--- a/frontends/cocoa/Makefile
+++ b/frontends/cocoa/Makefile
@@ -97,7 +97,6 @@ S_FRONTEND := \
selection.m \
ArrowBox.m \
ArrowWindow.m \
- BlackScroller.m \
LocalHistoryController.m \
apple_image.m
diff --git a/frontends/cocoa/NetSurf.xcodeproj/project.pbxproj b/frontends/cocoa/NetSurf.xcodeproj/project.pbxproj
index bc1bee7..b4475ec 100644
--- a/frontends/cocoa/NetSurf.xcodeproj/project.pbxproj
+++ b/frontends/cocoa/NetSurf.xcodeproj/project.pbxproj
@@ -23,7 +23,6 @@
263A281D1EE40CCF005C52B9 /* ArrowBox.m in Sources */ = {isa = PBXBuildFile; fileRef = 263A26831EE40BFC005C52B9 /* ArrowBox.m */; };
263A281E1EE40CCF005C52B9 /* ArrowWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 263A26841EE40BFC005C52B9 /* ArrowWindow.m */; };
263A281F1EE40CCF005C52B9 /* bitmap.m in Sources */ = {isa = PBXBuildFile; fileRef = 263A26851EE40BFC005C52B9 /* bitmap.m */; };
- 263A28201EE40CCF005C52B9 /* BlackScroller.m in Sources */ = {isa = PBXBuildFile; fileRef = 263A26861EE40BFC005C52B9 /* BlackScroller.m */; };
263A28211EE40CCF005C52B9 /* BookmarksController.m in Sources */ = {isa = PBXBuildFile; fileRef = 263A26871EE40BFC005C52B9 /* BookmarksController.m */; };
263A28221EE40CCF005C52B9 /* BrowserView.m in Sources */ = {isa = PBXBuildFile; fileRef = 263A26881EE40BFC005C52B9 /* BrowserView.m */; };
263A28231EE40CCF005C52B9 /* BrowserViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 263A26891EE40BFC005C52B9 /* BrowserViewController.m */; };
@@ -295,7 +294,6 @@
263A26621EE40BFC005C52B9 /* ArrowBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrowBox.h; sourceTree = SOURCE_ROOT; };
263A26631EE40BFC005C52B9 /* ArrowWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrowWindow.h; sourceTree = SOURCE_ROOT; };
263A26641EE40BFC005C52B9 /* bitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bitmap.h; sourceTree = SOURCE_ROOT; };
- 263A26651EE40BFC005C52B9 /* BlackScroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlackScroller.h; sourceTree = SOURCE_ROOT; };
263A26661EE40BFC005C52B9 /* BookmarksController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BookmarksController.h; sourceTree = SOURCE_ROOT; };
263A26671EE40BFC005C52B9 /* BrowserView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BrowserView.h; sourceTree = SOURCE_ROOT; };
263A26681EE40BFC005C52B9 /* BrowserViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BrowserViewController.h; sourceTree = SOURCE_ROOT; };
@@ -328,7 +326,6 @@
263A26831EE40BFC005C52B9 /* ArrowBox.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArrowBox.m; sourceTree = SOURCE_ROOT; };
263A26841EE40BFC005C52B9 /* ArrowWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArrowWindow.m; sourceTree = SOURCE_ROOT; };
263A26851EE40BFC005C52B9 /* bitmap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = bitmap.m; sourceTree = SOURCE_ROOT; };
- 263A26861EE40BFC005C52B9 /* BlackScroller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BlackScroller.m; sourceTree = SOURCE_ROOT; };
263A26871EE40BFC005C52B9 /* BookmarksController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BookmarksController.m; sourceTree = SOURCE_ROOT; };
263A26881EE40BFC005C52B9 /* BrowserView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BrowserView.m; sourceTree = SOURCE_ROOT; };
263A26891EE40BFC005C52B9 /* BrowserViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BrowserViewController.m; sourceTree = SOURCE_ROOT; };
@@ -748,7 +745,6 @@
263A26621EE40BFC005C52B9 /* ArrowBox.h */,
263A26631EE40BFC005C52B9 /* ArrowWindow.h */,
263A26641EE40BFC005C52B9 /* bitmap.h */,
- 263A26651EE40BFC005C52B9 /* BlackScroller.h */,
263A26661EE40BFC005C52B9 /* BookmarksController.h */,
263A26671EE40BFC005C52B9 /* BrowserView.h */,
263A26681EE40BFC005C52B9 /* BrowserViewController.h */,
@@ -781,7 +777,6 @@
263A26831EE40BFC005C52B9 /* ArrowBox.m */,
263A26841EE40BFC005C52B9 /* ArrowWindow.m */,
263A26851EE40BFC005C52B9 /* bitmap.m */,
- 263A26861EE40BFC005C52B9 /* BlackScroller.m */,
263A26871EE40BFC005C52B9 /* BookmarksController.m */,
263A26881EE40BFC005C52B9 /* BrowserView.m */,
263A26891EE40BFC005C52B9 /* BrowserViewController.m */,
@@ -1723,7 +1718,6 @@
263A28171EE40CCF005C52B9 /* PSMTabDragAssistant.m in Sources */,
263A287A1EE40CFB005C52B9 /* version.c in Sources */,
263A28741EE40CFB005C52B9 /* selection.c in Sources */,
- 263A28201EE40CCF005C52B9 /* BlackScroller.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/frontends/cocoa/res/LocalHistoryPanel.xib b/frontends/cocoa/res/LocalHistoryPanel.xib
index 794d2db..5f2d688 100644
--- a/frontends/cocoa/res/LocalHistoryPanel.xib
+++ b/frontends/cocoa/res/LocalHistoryPanel.xib
@@ -1,357 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
- <data>
- <int key="IBDocument.SystemTarget">1060</int>
- <string key="IBDocument.SystemVersion">10J567</string>
- <string key="IBDocument.InterfaceBuilderVersion">804</string>
- <string key="IBDocument.AppKitVersion">1038.35</string>
- <string key="IBDocument.HIToolboxVersion">462.00</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="NS.object.0">804</string>
- </object>
- <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="2"/>
- </object>
- <object class="NSArray" key="IBDocument.PluginDependencies">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- </object>
- <object class="NSMutableDictionary" key="IBDocument.Metadata">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys" id="0">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSCustomObject" id="1001">
- <string key="NSClassName">LocalHistoryController</string>
- </object>
- <object class="NSCustomObject" id="1003">
- <string key="NSClassName">FirstResponder</string>
- </object>
- <object class="NSCustomObject" id="1004">
- <string key="NSClassName">NSApplication</string>
- </object>
- <object class="NSWindowTemplate" id="1005">
- <int key="NSWindowStyleMask">15</int>
- <int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{196, 240}, {480, 270}}</string>
- <int key="NSWTFlags">1618477056</int>
- <string key="NSWindowTitle">Window</string>
- <string key="NSWindowClass">ArrowWindow</string>
- <nil key="NSViewClass"/>
- <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
- <object class="NSView" key="NSWindowView" id="1006">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSScrollView" id="488267087">
- <reference key="NSNextResponder" ref="1006"/>
- <int key="NSvFlags">274</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSClipView" id="753770525">
- <reference key="NSNextResponder" ref="488267087"/>
- <int key="NSvFlags">2304</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSCustomView" id="820702167">
- <reference key="NSNextResponder" ref="753770525"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrameSize">{480, 270}</string>
- <reference key="NSSuperview" ref="753770525"/>
- <string key="NSClassName">HistoryView</string>
- </object>
- </object>
- <string key="NSFrame">{{1, 1}, {480, 270}}</string>
- <reference key="NSSuperview" ref="488267087"/>
- <reference key="NSNextKeyView" ref="820702167"/>
- <reference key="NSDocView" ref="820702167"/>
- <object class="NSColor" key="NSBGColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlColor</string>
- <object class="NSColor" key="NSColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
- </object>
- </object>
- <int key="NScvFlags">2</int>
- </object>
- <object class="NSScroller" id="84195230">
- <reference key="NSNextResponder" ref="488267087"/>
- <int key="NSvFlags">-2147483392</int>
- <string key="NSFrame">{{470, 1}, {11, 255}}</string>
- <reference key="NSSuperview" ref="488267087"/>
- <int key="NSsFlags">256</int>
- <int key="NSArrowsLoc">2</int>
- <reference key="NSTarget" ref="488267087"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSCurValue">1</double>
- <double key="NSPercent">0.96363627910614014</double>
- </object>
- <object class="NSScroller" id="645365106">
- <reference key="NSNextResponder" ref="488267087"/>
- <int key="NSvFlags">-2147483392</int>
- <string key="NSFrame">{{1, 260}, {465, 11}}</string>
- <reference key="NSSuperview" ref="488267087"/>
- <int key="NSsFlags">257</int>
- <int key="NSArrowsLoc">2</int>
- <reference key="NSTarget" ref="488267087"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.50602412223815918</double>
- </object>
- </object>
- <string key="NSFrame">{{-1, -1}, {482, 272}}</string>
- <reference key="NSSuperview" ref="1006"/>
- <reference key="NSNextKeyView" ref="753770525"/>
- <int key="NSsFlags">562</int>
- <reference key="NSVScroller" ref="84195230"/>
- <reference key="NSHScroller" ref="645365106"/>
- <reference key="NSContentView" ref="753770525"/>
- </object>
- </object>
- <string key="NSFrameSize">{480, 270}</string>
- <reference key="NSSuperview"/>
- </object>
- <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
- <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
- </object>
- </object>
- <object class="IBObjectContainer" key="IBDocument.Objects">
- <object class="NSMutableArray" key="connectionRecords">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">window</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="1005"/>
- </object>
- <int key="connectionID">7</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">history</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="820702167"/>
- </object>
- <int key="connectionID">8</int>
- </object>
- </object>
- <object class="IBMutableOrderedSet" key="objectRecords">
- <object class="NSArray" key="orderedObjects">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBObjectRecord">
- <int key="objectID">0</int>
- <reference key="object" ref="0"/>
- <reference key="children" ref="1000"/>
- <nil key="parent"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-2</int>
- <reference key="object" ref="1001"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">File's Owner</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-1</int>
- <reference key="object" ref="1003"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">First Responder</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-3</int>
- <reference key="object" ref="1004"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">Application</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">1</int>
- <reference key="object" ref="1005"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="1006"/>
- </object>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">2</int>
- <reference key="object" ref="1006"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="488267087"/>
- </object>
- <reference key="parent" ref="1005"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">3</int>
- <reference key="object" ref="488267087"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="84195230"/>
- <reference ref="645365106"/>
- <reference ref="820702167"/>
- </object>
- <reference key="parent" ref="1006"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">4</int>
- <reference key="object" ref="84195230"/>
- <reference key="parent" ref="488267087"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">5</int>
- <reference key="object" ref="645365106"/>
- <reference key="parent" ref="488267087"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">6</int>
- <reference key="object" ref="820702167"/>
- <reference key="parent" ref="488267087"/>
- </object>
- </object>
- </object>
- <object class="NSMutableDictionary" key="flattenedProperties">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>1.IBEditorWindowLastContentRect</string>
- <string>1.IBPluginDependency</string>
- <string>1.IBWindowTemplateEditedContentRect</string>
- <string>1.NSWindowTemplate.visibleAtLaunch</string>
- <string>1.WindowOrigin</string>
- <string>1.editorWindowContentRectSynchronizationRect</string>
- <string>2.IBPluginDependency</string>
- <string>3.IBPluginDependency</string>
- <string>3.IBViewBoundsToFrameTransform</string>
- <string>4.CustomClassName</string>
- <string>4.IBPluginDependency</string>
- <string>5.CustomClassName</string>
- <string>5.IBPluginDependency</string>
- <string>6.IBPluginDependency</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>{{364, 310}, {480, 270}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{364, 310}, {480, 270}}</string>
- <boolean value="NO"/>
- <string>{196, 240}</string>
- <string>{{202, 428}, {480, 270}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAAC/gAAAw4aAAA</bytes>
- </object>
- <string>BlackScroller</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>BlackScroller</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="unlocalizedProperties">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <nil key="activeLocalization"/>
- <object class="NSMutableDictionary" key="localizations">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <nil key="sourceID"/>
- <int key="maxID">8</int>
- </object>
- <object class="IBClassDescriber" key="IBDocument.Classes">
- <object class="NSMutableArray" key="referencedPartialClassDescriptions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">ArrowWindow</string>
- <string key="superclassName">NSWindow</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">ArrowWindow.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">BlackScroller</string>
- <string key="superclassName">NSScroller</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">BlackScroller.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">HistoryView</string>
- <string key="superclassName">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">HistoryView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">LocalHistoryController</string>
- <string key="superclassName">NSWindowController</string>
- <object class="NSMutableDictionary" key="outlets">
- <string key="NS.key.0">history</string>
- <string key="NS.object.0">HistoryView</string>
- </object>
- <object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <string key="NS.key.0">history</string>
- <object class="IBToOneOutletInfo" key="NS.object.0">
- <string key="name">history</string>
- <string key="candidateClassName">HistoryView</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">LocalHistoryController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">PSMTabBarControl/PSMTabDragAssistant.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">PSMTabBarControl/PSMTabBarCell.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">PSMTabBarControl/PSMTabBarControl.h</string>
- </object>
- </object>
- </object>
- </object>
- <int key="IBDocument.localizationMode">0</int>
- <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
- <integer value="3000" key="NS.object.0"/>
- </object>
- <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
- <string key="IBDocument.LastKnownRelativeProjectPath">../NetSurf.xcodeproj</string>
- <int key="IBDocument.defaultPropertyAccessControl">3</int>
- </data>
-</archive>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13122.19" systemVersion="16F73" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+ <dependencies>
+ <deployment identifier="macosx"/>
+ <development version="8000" identifier="xcode"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13122.19"/>
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+ </dependencies>
+ <objects>
+ <customObject id="-2" userLabel="File's Owner" customClass="LocalHistoryController">
+ <connections>
+ <outlet property="history" destination="6" id="8"/>
+ <outlet property="window" destination="1" id="7"/>
+ </connections>
+ </customObject>
+ <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+ <customObject id="-3" userLabel="Application"/>
+ <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="1" customClass="ArrowWindow">
+ <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
+ <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
+ <rect key="contentRect" x="196" y="240" width="480" height="270"/>
+ <rect key="screenRect" x="0.0" y="0.0" width="1680" height="1028"/>
+ <view key="contentView" id="2">
+ <rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <subviews>
+ <scrollView autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="3">
+ <rect key="frame" x="-1" y="-1" width="482" height="272"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="mPm-ZF-vKt">
+ <rect key="frame" x="1" y="1" width="480" height="270"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <subviews>
+ <customView id="6" customClass="HistoryView">
+ <rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
+ <autoresizingMask key="autoresizingMask"/>
+ </customView>
+ </subviews>
+ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+ </clipView>
+ <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" arrowsPosition="none" controlSize="small" horizontal="YES" id="5">
+ <rect key="frame" x="1" y="260" width="465" height="11"/>
+ <autoresizingMask key="autoresizingMask"/>
+ </scroller>
+ <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" arrowsPosition="none" doubleValue="1" controlSize="small" horizontal="NO" id="4">
+ <rect key="frame" x="470" y="1" width="11" height="255"/>
+ <autoresizingMask key="autoresizingMask"/>
+ </scroller>
+ </scrollView>
+ </subviews>
+ </view>
+ </window>
+ </objects>
+</document>
--
NetSurf Browser
6 years, 3 months
libcss: branch master updated. release/0.6.1-37-gcb0f7f3
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/libcss.git/shortlog/cb0f7f373f55455d07f349...
...commit http://git.netsurf-browser.org/libcss.git/commit/cb0f7f373f55455d07f349f5...
...tree http://git.netsurf-browser.org/libcss.git/tree/cb0f7f373f55455d07f349f589...
The branch, master has been updated
via cb0f7f373f55455d07f349f589ce3684d2fda167 (commit)
from a0d2da319d3c13549e24ac012c9dbb2b22fdb957 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/libcss.git/commit/?id=cb0f7f373f55455d07f3...
commit cb0f7f373f55455d07f349f589ce3684d2fda167
Author: Michael Drake <michael.drake(a)codethink.co.uk>
Commit: Michael Drake <michael.drake(a)codethink.co.uk>
Fix: Read beyond allocated memory when removing sheet from selection context.
Thanks to 'effin' on #netsurf.
diff --git a/src/select/select.c b/src/select/select.c
index f1c3637..580c29e 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -388,11 +388,11 @@ css_error css_select_ctx_remove_sheet(css_select_ctx *ctx,
if (index == ctx->n_sheets)
return CSS_INVALID;
+ ctx->n_sheets--;
+
memmove(&ctx->sheets[index], &ctx->sheets[index + 1],
(ctx->n_sheets - index) * sizeof(css_select_sheet));
- ctx->n_sheets--;
-
return CSS_OK;
}
-----------------------------------------------------------------------
Summary of changes:
src/select/select.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/select/select.c b/src/select/select.c
index f1c3637..580c29e 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -388,11 +388,11 @@ css_error css_select_ctx_remove_sheet(css_select_ctx *ctx,
if (index == ctx->n_sheets)
return CSS_INVALID;
+ ctx->n_sheets--;
+
memmove(&ctx->sheets[index], &ctx->sheets[index + 1],
(ctx->n_sheets - index) * sizeof(css_select_sheet));
- ctx->n_sheets--;
-
return CSS_OK;
}
--
Cascading Style Sheets library
6 years, 3 months
netsurf: branch svenw/cocoa updated. release/3.6-505-g246326c
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/246326c5b4b926f23c69a...
...commit http://git.netsurf-browser.org/netsurf.git/commit/246326c5b4b926f23c69a6c...
...tree http://git.netsurf-browser.org/netsurf.git/tree/246326c5b4b926f23c69a6cbf...
The branch, svenw/cocoa has been updated
via 246326c5b4b926f23c69a6cbf988769b85c9ef98 (commit)
via 80075c9368a76b2445900d7dc56d3d6c7cc0ee2d (commit)
from d51af2004b541c1d003fd11e202a10c981d418b6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=246326c5b4b926f23c6...
commit 246326c5b4b926f23c69a6cbf988769b85c9ef98
Author: Sven Weidauer <sven(a)5sw.de>
Commit: Sven Weidauer <sven(a)5sw.de>
Use window background color for history popover.
diff --git a/frontends/cocoa/ArrowBox.m b/frontends/cocoa/ArrowBox.m
index 258a58c..6d6911d 100644
--- a/frontends/cocoa/ArrowBox.m
+++ b/frontends/cocoa/ArrowBox.m
@@ -23,6 +23,15 @@
#import "ArrowBox.h"
+#import "desktop/system_colour.h"
+#import "cocoa/plotter.h"
+
+@interface ArrowBox ()
+
+@property (nonatomic) NSColor *backgroundColor;
+
+@end
+
@implementation ArrowBox
@synthesize arrowPosition;
@@ -30,6 +39,17 @@
@synthesize arrowEdge;
@synthesize cornerRadius;
+- (NSColor *)backgroundColor {
+ if (!_backgroundColor) {
+ colour fill_colour;
+ nserror res = ns_system_colour_char("Window", &fill_colour);
+ NSAssert(res == NSERROR_OK, @"Expect to find the window colour");
+ _backgroundColor = cocoa_convert_colour(fill_colour);
+ }
+
+ return _backgroundColor;
+}
+
- (void)setArrowEdge:(ArrowEdge)newEdge
{
if (arrowEdge == newEdge) {
@@ -140,7 +160,7 @@
[path closePath];
[[NSColor colorWithDeviceWhite:1.0 alpha:0.4] set];
- [[NSColor colorWithDeviceWhite:0.0 alpha:0.75] setFill];
+ [self.backgroundColor setFill];
NSAffineTransform *transform = [NSAffineTransform transform];
[transform translateXBy:bounds.origin.x yBy:bounds.origin.y];
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=80075c9368a76b24459...
commit 80075c9368a76b2445900d7dc56d3d6c7cc0ee2d
Author: Sven Weidauer <sven(a)5sw.de>
Commit: Sven Weidauer <sven(a)5sw.de>
Close window after closing the last tab.
diff --git a/frontends/cocoa/BrowserWindowController.m b/frontends/cocoa/BrowserWindowController.m
index 8607e4d..f44e4fb 100644
--- a/frontends/cocoa/BrowserWindowController.m
+++ b/frontends/cocoa/BrowserWindowController.m
@@ -178,6 +178,9 @@
- (IBAction)closeCurrentTab:(id)sender
{
[self removeTab:activeBrowser];
+ if (tabView.numberOfTabViewItems == 0) {
+ [self.window close];
+ }
}
- (void)setCanGoBack:(BOOL)can
-----------------------------------------------------------------------
Summary of changes:
frontends/cocoa/ArrowBox.m | 22 +++++++++++++++++++++-
frontends/cocoa/BrowserWindowController.m | 3 +++
2 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/frontends/cocoa/ArrowBox.m b/frontends/cocoa/ArrowBox.m
index 258a58c..6d6911d 100644
--- a/frontends/cocoa/ArrowBox.m
+++ b/frontends/cocoa/ArrowBox.m
@@ -23,6 +23,15 @@
#import "ArrowBox.h"
+#import "desktop/system_colour.h"
+#import "cocoa/plotter.h"
+
+@interface ArrowBox ()
+
+@property (nonatomic) NSColor *backgroundColor;
+
+@end
+
@implementation ArrowBox
@synthesize arrowPosition;
@@ -30,6 +39,17 @@
@synthesize arrowEdge;
@synthesize cornerRadius;
+- (NSColor *)backgroundColor {
+ if (!_backgroundColor) {
+ colour fill_colour;
+ nserror res = ns_system_colour_char("Window", &fill_colour);
+ NSAssert(res == NSERROR_OK, @"Expect to find the window colour");
+ _backgroundColor = cocoa_convert_colour(fill_colour);
+ }
+
+ return _backgroundColor;
+}
+
- (void)setArrowEdge:(ArrowEdge)newEdge
{
if (arrowEdge == newEdge) {
@@ -140,7 +160,7 @@
[path closePath];
[[NSColor colorWithDeviceWhite:1.0 alpha:0.4] set];
- [[NSColor colorWithDeviceWhite:0.0 alpha:0.75] setFill];
+ [self.backgroundColor setFill];
NSAffineTransform *transform = [NSAffineTransform transform];
[transform translateXBy:bounds.origin.x yBy:bounds.origin.y];
diff --git a/frontends/cocoa/BrowserWindowController.m b/frontends/cocoa/BrowserWindowController.m
index 8607e4d..f44e4fb 100644
--- a/frontends/cocoa/BrowserWindowController.m
+++ b/frontends/cocoa/BrowserWindowController.m
@@ -178,6 +178,9 @@
- (IBAction)closeCurrentTab:(id)sender
{
[self removeTab:activeBrowser];
+ if (tabView.numberOfTabViewItems == 0) {
+ [self.window close];
+ }
}
- (void)setCanGoBack:(BOOL)can
--
NetSurf Browser
6 years, 3 months
netsurf: branch svenw/cocoa updated. release/3.6-503-gd51af20
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/d51af2004b541c1d003fd...
...commit http://git.netsurf-browser.org/netsurf.git/commit/d51af2004b541c1d003fd11...
...tree http://git.netsurf-browser.org/netsurf.git/tree/d51af2004b541c1d003fd11e2...
The branch, svenw/cocoa has been updated
via d51af2004b541c1d003fd11e202a10c981d418b6 (commit)
via 4051cd95a4c0443d814b9df6938d5bcdb0b6d077 (commit)
from 42bf8a713d8ba06785407671cf5753694289c6b8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=d51af2004b541c1d003...
commit d51af2004b541c1d003fd11e202a10c981d418b6
Author: Sven Weidauer <sven(a)5sw.de>
Commit: Sven Weidauer <sven(a)5sw.de>
Set screen scale factor to 1
diff --git a/frontends/cocoa/plotter.m b/frontends/cocoa/plotter.m
index 1e01a47..f911677 100644
--- a/frontends/cocoa/plotter.m
+++ b/frontends/cocoa/plotter.m
@@ -84,7 +84,7 @@ static nserror plot_line(const struct redraw_context *ctx, const plot_style_t *p
[path lineToPoint:cocoa_point(line->x1, line->y1)];
cocoa_plot_path_set_stroke_pattern(path, pstyle);
- const bool horizontal = y0 == y1;
+ const bool horizontal = line->y0 == line->y1;
const bool vertical = line->x0 == line->x1;
const bool oddThickness = pstyle->stroke_width != 0 ? (pstyle->stroke_width % 2) != 0 : true;
@@ -319,10 +319,9 @@ static CGFloat cocoa_half_pixel;
void cocoa_update_scale_factor(void)
{
- const CGFloat scale = [[NSScreen mainScreen] backingScaleFactor];
- cocoa_scale_factor = scale == 1.0 ? 1.0 : 1.0 / scale;
+ cocoa_scale_factor = 1.0;
cocoa_half_pixel = 0.5 * cocoa_scale_factor;
- browser_set_dpi(points_per_inch * scale);
+ browser_set_dpi(points_per_inch);
}
static inline void cocoa_center_pixel(bool x, bool y)
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=4051cd95a4c0443d814...
commit 4051cd95a4c0443d814b9df6938d5bcdb0b6d077
Author: Sven Weidauer <sven(a)5sw.de>
Commit: Sven Weidauer <sven(a)5sw.de>
Set deployment target independent of base SDK, with default value of 10.7.
diff --git a/frontends/cocoa/Makefile b/frontends/cocoa/Makefile
index c5d329b..0febfbb 100644
--- a/frontends/cocoa/Makefile
+++ b/frontends/cocoa/Makefile
@@ -19,16 +19,14 @@ else
endif
endif
-ifeq ($(SDK_VERSION),)
- # if no SDK_VERSION has been specified select one from those available
- SDK_PARAM := $(shell xcodebuild -showsdks | awk '/^$$/{p=0};p; /(OS X|macOS) SDKs:/{p=1}' | head -1 | cut -f3)
- SDK_VERSION := $(MACOSX_VERSION)
-else
- SDK_PARAM := -sdk macosx$(SDK_VERSION)
+SDK_PARAM := $(shell xcodebuild -showsdks | awk '/^$$/{p=0};p; /(OS X|macOS) SDKs:/{p=1}' | head -1 | cut -f3)
+
+ifeq ($(DEPLOYMENT_TARGET),)
+ DEPLOYMENT_TARGET := 10.7
endif
SDK_PATH ?= $(shell xcodebuild -version $(SDK_PARAM) Path)
-SDK_FLAGS := -isysroot $(SDK_PATH) -mmacosx-version-min=$(SDK_VERSION)
+SDK_FLAGS := -isysroot $(SDK_PATH) -mmacosx-version-min=$(DEPLOYMENT_TARGET)
CFLAGS := $(SDK_FLAGS) $(CFLAGS)
LDFLAGS := $(SDK_FLAGS) -Wl,-syslibroot,$(SDK_PATH) $(LDFLAGS)
CXXFLAGS := $(SDK_FLAGS) $(CXXFLAGS)
@@ -41,7 +39,7 @@ LDFLAGS += -L/usr/X11/lib
LDFLAGS += -lm -lcurl
LDFLAGS += -lssl -lcrypto
-CFLAGS += -Dnscocoa -D_BSD_SOURCE -D_POSIX_C_SOURCE -std=c99 -g -Os -fobjc-arc
+CFLAGS += -Dnscocoa -D_BSD_SOURCE -D_POSIX_C_SOURCE -std=c99 -fobjc-arc
CFLAGS += -I/usr/X11/include
CFLAGS += -include cocoa/Prefix.pch
@@ -61,6 +59,11 @@ ifneq ($(UNIVERSAL),)
CXXFLAGS += $(UNIVERSAL_FLAGS)
endif
+
+ifeq ($(VARIANT),debug)
+ CFLAGS += -g
+endif
+
# ----------------------------------------------------------------------------
# Source file setup
# ----------------------------------------------------------------------------
@@ -220,7 +223,7 @@ NetSurf.app/Contents/Info.plist: $(FRONTEND_RESOURCES_DIR)/NetSurf-Info.plist $(
$(Q)$(MKDIR) -p NetSurf.app/Contents
$(Q)sed -e 's/$${EXECUTABLE_NAME}/$(EXETARGET)/' \
-e 's/$${PRODUCT_NAME.*}/$(EXETARGET)/' \
- -e 's/$${MACOSX_DEPLOYMENT_TARGET}/$(MACOSX_VERSION)/' \
+ -e 's/$${MACOSX_DEPLOYMENT_TARGET}/$(DEPLOYMENT_TARGET)/' \
-e 's/$${NETSURF_VERSION}/$(VERSION_FULL)/' \
-e 's/$${NETSURF_SHORT_VERSION}/$(VERSION_MAJ).$(VERSION_MIN)/' \
< $(FRONTEND_RESOURCES_DIR)/NetSurf-Info.plist > NetSurf.app/Contents/Info.plist
diff --git a/frontends/cocoa/Makefile.defaults b/frontends/cocoa/Makefile.defaults
index 8f5792b..49e570c 100644
--- a/frontends/cocoa/Makefile.defaults
+++ b/frontends/cocoa/Makefile.defaults
@@ -26,5 +26,3 @@ NETSURF_USE_IMAGEIO := YES
MACOSX_VERSION := $(shell sw_vers -productVersion | awk -F '.' '{print $$1 "." $$2}')
-# Optimisation levels
-CFLAGS += -O2
-----------------------------------------------------------------------
Summary of changes:
frontends/cocoa/Makefile | 21 ++++++++++++---------
frontends/cocoa/Makefile.defaults | 2 --
frontends/cocoa/plotter.m | 7 +++----
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/frontends/cocoa/Makefile b/frontends/cocoa/Makefile
index c5d329b..0febfbb 100644
--- a/frontends/cocoa/Makefile
+++ b/frontends/cocoa/Makefile
@@ -19,16 +19,14 @@ else
endif
endif
-ifeq ($(SDK_VERSION),)
- # if no SDK_VERSION has been specified select one from those available
- SDK_PARAM := $(shell xcodebuild -showsdks | awk '/^$$/{p=0};p; /(OS X|macOS) SDKs:/{p=1}' | head -1 | cut -f3)
- SDK_VERSION := $(MACOSX_VERSION)
-else
- SDK_PARAM := -sdk macosx$(SDK_VERSION)
+SDK_PARAM := $(shell xcodebuild -showsdks | awk '/^$$/{p=0};p; /(OS X|macOS) SDKs:/{p=1}' | head -1 | cut -f3)
+
+ifeq ($(DEPLOYMENT_TARGET),)
+ DEPLOYMENT_TARGET := 10.7
endif
SDK_PATH ?= $(shell xcodebuild -version $(SDK_PARAM) Path)
-SDK_FLAGS := -isysroot $(SDK_PATH) -mmacosx-version-min=$(SDK_VERSION)
+SDK_FLAGS := -isysroot $(SDK_PATH) -mmacosx-version-min=$(DEPLOYMENT_TARGET)
CFLAGS := $(SDK_FLAGS) $(CFLAGS)
LDFLAGS := $(SDK_FLAGS) -Wl,-syslibroot,$(SDK_PATH) $(LDFLAGS)
CXXFLAGS := $(SDK_FLAGS) $(CXXFLAGS)
@@ -41,7 +39,7 @@ LDFLAGS += -L/usr/X11/lib
LDFLAGS += -lm -lcurl
LDFLAGS += -lssl -lcrypto
-CFLAGS += -Dnscocoa -D_BSD_SOURCE -D_POSIX_C_SOURCE -std=c99 -g -Os -fobjc-arc
+CFLAGS += -Dnscocoa -D_BSD_SOURCE -D_POSIX_C_SOURCE -std=c99 -fobjc-arc
CFLAGS += -I/usr/X11/include
CFLAGS += -include cocoa/Prefix.pch
@@ -61,6 +59,11 @@ ifneq ($(UNIVERSAL),)
CXXFLAGS += $(UNIVERSAL_FLAGS)
endif
+
+ifeq ($(VARIANT),debug)
+ CFLAGS += -g
+endif
+
# ----------------------------------------------------------------------------
# Source file setup
# ----------------------------------------------------------------------------
@@ -220,7 +223,7 @@ NetSurf.app/Contents/Info.plist: $(FRONTEND_RESOURCES_DIR)/NetSurf-Info.plist $(
$(Q)$(MKDIR) -p NetSurf.app/Contents
$(Q)sed -e 's/$${EXECUTABLE_NAME}/$(EXETARGET)/' \
-e 's/$${PRODUCT_NAME.*}/$(EXETARGET)/' \
- -e 's/$${MACOSX_DEPLOYMENT_TARGET}/$(MACOSX_VERSION)/' \
+ -e 's/$${MACOSX_DEPLOYMENT_TARGET}/$(DEPLOYMENT_TARGET)/' \
-e 's/$${NETSURF_VERSION}/$(VERSION_FULL)/' \
-e 's/$${NETSURF_SHORT_VERSION}/$(VERSION_MAJ).$(VERSION_MIN)/' \
< $(FRONTEND_RESOURCES_DIR)/NetSurf-Info.plist > NetSurf.app/Contents/Info.plist
diff --git a/frontends/cocoa/Makefile.defaults b/frontends/cocoa/Makefile.defaults
index 8f5792b..49e570c 100644
--- a/frontends/cocoa/Makefile.defaults
+++ b/frontends/cocoa/Makefile.defaults
@@ -26,5 +26,3 @@ NETSURF_USE_IMAGEIO := YES
MACOSX_VERSION := $(shell sw_vers -productVersion | awk -F '.' '{print $$1 "." $$2}')
-# Optimisation levels
-CFLAGS += -O2
diff --git a/frontends/cocoa/plotter.m b/frontends/cocoa/plotter.m
index 1e01a47..f911677 100644
--- a/frontends/cocoa/plotter.m
+++ b/frontends/cocoa/plotter.m
@@ -84,7 +84,7 @@ static nserror plot_line(const struct redraw_context *ctx, const plot_style_t *p
[path lineToPoint:cocoa_point(line->x1, line->y1)];
cocoa_plot_path_set_stroke_pattern(path, pstyle);
- const bool horizontal = y0 == y1;
+ const bool horizontal = line->y0 == line->y1;
const bool vertical = line->x0 == line->x1;
const bool oddThickness = pstyle->stroke_width != 0 ? (pstyle->stroke_width % 2) != 0 : true;
@@ -319,10 +319,9 @@ static CGFloat cocoa_half_pixel;
void cocoa_update_scale_factor(void)
{
- const CGFloat scale = [[NSScreen mainScreen] backingScaleFactor];
- cocoa_scale_factor = scale == 1.0 ? 1.0 : 1.0 / scale;
+ cocoa_scale_factor = 1.0;
cocoa_half_pixel = 0.5 * cocoa_scale_factor;
- browser_set_dpi(points_per_inch * scale);
+ browser_set_dpi(points_per_inch);
}
static inline void cocoa_center_pixel(bool x, bool y)
--
NetSurf Browser
6 years, 3 months
netsurf: branch svenw/cocoa updated. release/3.6-501-g42bf8a7
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/42bf8a713d8ba06785407...
...commit http://git.netsurf-browser.org/netsurf.git/commit/42bf8a713d8ba0678540767...
...tree http://git.netsurf-browser.org/netsurf.git/tree/42bf8a713d8ba06785407671c...
The branch, svenw/cocoa has been updated
via 42bf8a713d8ba06785407671cf5753694289c6b8 (commit)
from ef7b8258405761d44731cb4967c923a99bf72e37 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=42bf8a713d8ba067854...
commit 42bf8a713d8ba06785407671cf5753694289c6b8
Author: Sven Weidauer <sven(a)5sw.de>
Commit: Sven Weidauer <sven(a)5sw.de>
Fix nserror return values.
diff --git a/frontends/cocoa/bitmap.m b/frontends/cocoa/bitmap.m
index 554d5e0..089870e 100644
--- a/frontends/cocoa/bitmap.m
+++ b/frontends/cocoa/bitmap.m
@@ -242,7 +242,7 @@ static nserror bitmap_render(struct bitmap *bitmap, struct hlcache_handle *conte
cocoa_bitmap_modified(bitmap);
- return true;
+ return NSERROR_OK;
}
static struct gui_bitmap_table bitmap_table = {
diff --git a/frontends/cocoa/gui.m b/frontends/cocoa/gui.m
index 9c0ccac..f564563 100644
--- a/frontends/cocoa/gui.m
+++ b/frontends/cocoa/gui.m
@@ -129,7 +129,7 @@ static bool gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
static nserror gui_window_set_scroll(struct gui_window *g, const struct rect *rect)
{
[[(__bridge BrowserViewController *)g browserView] scrollPoint:cocoa_point(rect->x0, rect->y0)];
- return 0;
+ return NSERROR_OK;
}
/**
diff --git a/frontends/cocoa/plotter.m b/frontends/cocoa/plotter.m
index f02f772..1e01a47 100644
--- a/frontends/cocoa/plotter.m
+++ b/frontends/cocoa/plotter.m
@@ -74,7 +74,7 @@ static void cocoa_plot_path_set_stroke_pattern(NSBezierPath *path, const plot_st
static nserror plot_line(const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *line)
{
if (pstyle->stroke_type == PLOT_OP_TYPE_NONE)
- return true;
+ return NSERROR_OK;
[NSGraphicsContext saveGraphicsState];
[NSBezierPath clipRect:cocoa_plot_clip_rect];
-----------------------------------------------------------------------
Summary of changes:
frontends/cocoa/bitmap.m | 2 +-
frontends/cocoa/gui.m | 2 +-
frontends/cocoa/plotter.m | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/frontends/cocoa/bitmap.m b/frontends/cocoa/bitmap.m
index 554d5e0..089870e 100644
--- a/frontends/cocoa/bitmap.m
+++ b/frontends/cocoa/bitmap.m
@@ -242,7 +242,7 @@ static nserror bitmap_render(struct bitmap *bitmap, struct hlcache_handle *conte
cocoa_bitmap_modified(bitmap);
- return true;
+ return NSERROR_OK;
}
static struct gui_bitmap_table bitmap_table = {
diff --git a/frontends/cocoa/gui.m b/frontends/cocoa/gui.m
index 9c0ccac..f564563 100644
--- a/frontends/cocoa/gui.m
+++ b/frontends/cocoa/gui.m
@@ -129,7 +129,7 @@ static bool gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
static nserror gui_window_set_scroll(struct gui_window *g, const struct rect *rect)
{
[[(__bridge BrowserViewController *)g browserView] scrollPoint:cocoa_point(rect->x0, rect->y0)];
- return 0;
+ return NSERROR_OK;
}
/**
diff --git a/frontends/cocoa/plotter.m b/frontends/cocoa/plotter.m
index f02f772..1e01a47 100644
--- a/frontends/cocoa/plotter.m
+++ b/frontends/cocoa/plotter.m
@@ -74,7 +74,7 @@ static void cocoa_plot_path_set_stroke_pattern(NSBezierPath *path, const plot_st
static nserror plot_line(const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *line)
{
if (pstyle->stroke_type == PLOT_OP_TYPE_NONE)
- return true;
+ return NSERROR_OK;
[NSGraphicsContext saveGraphicsState];
[NSBezierPath clipRect:cocoa_plot_clip_rect];
--
NetSurf Browser
6 years, 3 months
netsurf: branch svenw/cocoa updated. release/3.6-500-gef7b825
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/ef7b8258405761d44731c...
...commit http://git.netsurf-browser.org/netsurf.git/commit/ef7b8258405761d44731cb4...
...tree http://git.netsurf-browser.org/netsurf.git/tree/ef7b8258405761d44731cb496...
The branch, svenw/cocoa has been updated
via ef7b8258405761d44731cb4967c923a99bf72e37 (commit)
via 2e5519f22742e7f5751d8a6098e8479bfbc9919b (commit)
via 2b2bbbe76502b6cb528752a2dad89d3f1f6c6409 (commit)
via c4c2c22e87ba5018d0a90abfc01af51da996e3b5 (commit)
via 449e760d7162b62790b3cc39692a597d5ace4428 (commit)
via ee749f2b11276533f3c7fd139bb96f69103ae08f (commit)
via 38c10c85cbfbc47eaaf64a58fb50d60e136af673 (commit)
via 98a73379fec8297c840f592db8c9d2b6aed257bc (commit)
via dfa1e0bcd3e48f85214ff2b01909b00454d44d82 (commit)
via d34b0726e38b0ad51bf1b733fd611df0409b5001 (commit)
via 40951d5294c87a85c9ff315ba5ebb13a643cea81 (commit)
via 6511e9f9e0346eb5dc5dfc512b456446d56e2b8c (commit)
via 653ccb78a9d819d21dc8d3e6d57d724215f50605 (commit)
via 92ecc77768dc86ed6a8d2d9aa1b0f49567878b2c (commit)
via 50371731e33d34d587d00e0090018bfea9cb2d9e (commit)
via f7380567103c1e58a5d5a51f4c6de256cb911c1b (commit)
via 12a1d7c36e9a0d296a8ded85eaac1635f76cb711 (commit)
via c06cfd9fae6b0cbc82babf64fe2f6300e6cae1f9 (commit)
via 4b9aaee6cdfe9d38683db75ca0de52f45045596a (commit)
via e25eedab66d218e608d15fda593001b8073f3e67 (commit)
via 79e09943feb298458c503759babef8d6b41a5ded (commit)
via 58d03aeb6fe3519ef12a4cedcc3e47b8daaad9cc (commit)
via f357af4250c706c7f9dfaa36198cf918a58446ff (commit)
via 03ae0ec15ad6fc17d8b9be60da0798c6b0f54672 (commit)
via 38df37565c309c68b50ac04db211df8581cf77c1 (commit)
via fe9104096fd8de9f79338f750a13e0ddccf05429 (commit)
via 7272b59458c02286e1d246ffa09de7386f0d942e (commit)
via 63d53938f106541a68b3ed32103e7088649e5d8d (commit)
via 1d31402dcb0e056b5e66a243c5a02c28596d8684 (commit)
via 772ebc69c95bda5e5c35ab8aedfe9049cca212b7 (commit)
via b0358727d90383d9fee6ccff87f3f2274d9d4225 (commit)
via 56daba58789acddaeb2c6ecf3801eb27a8dc9ccf (commit)
via 368b03bffb8dcf2dc2a306f29756ca882b3fee51 (commit)
via 283d921f346d44bd8d78fdac6a36b5a8516ca722 (commit)
via 5225ca2b90f66b202c520773b0c8c52b0687e6a5 (commit)
via 9bf5ecfa87d022645e986249270c5a89e27f46fe (commit)
via 2bec7f113c11329098a7a9d7dfa8766f82357cd2 (commit)
via 527b19b11146dbb1109f092a93ecbbcbd65a865b (commit)
via 3b18d36b025c8b2a36644391393258034dd9c702 (commit)
via ebab4ee8d6f2b63e600b2ef82f546afba690f00d (commit)
via ea8c5c2fac7cee1cd8d9bce3364469886b7d6480 (commit)
via 2467a0a99080c0d707fcf443a2d91deed1a76c1d (commit)
via 703427a48612bf98fba599dfcd6e91485efd5b77 (commit)
via a8348f3bc930151bd9aa184c8372c6af0c782730 (commit)
from 711dcabe7ca4bd3551b7e4af10b98715f746fb3f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=ef7b8258405761d4473...
commit ef7b8258405761d44731cb4967c923a99bf72e37
Author: Sven Weidauer <sven(a)5sw.de>
Commit: Sven Weidauer <sven(a)5sw.de>
Update history view.
diff --git a/frontends/cocoa/HistoryView.h b/frontends/cocoa/HistoryView.h
index 42e73dd..0fa2af3 100644
--- a/frontends/cocoa/HistoryView.h
+++ b/frontends/cocoa/HistoryView.h
@@ -18,17 +18,13 @@
#import <Cocoa/Cocoa.h>
-@class HistoryView;
@class BrowserView;
-@interface HistoryView : NSView {
- struct browser_window *browser;
- NSMutableArray *toolTips;
-}
+@interface HistoryView : NSView
-@property (readwrite, retain, nonatomic) BrowserView *browser;
+@property (readwrite, nonatomic) BrowserView *browser;
+@property (readonly, nonatomic) NSSize size;
- (void)updateHistory;
-- (NSSize)size;
@end
diff --git a/frontends/cocoa/HistoryView.m b/frontends/cocoa/HistoryView.m
index 94d5261..798a308 100644
--- a/frontends/cocoa/HistoryView.m
+++ b/frontends/cocoa/HistoryView.m
@@ -22,125 +22,111 @@
#import "cocoa/plotter.h"
#import "cocoa/LocalHistoryController.h"
#import "cocoa/BrowserView.h"
-
+#import "utils/errors.h"
+#import "netsurf/core_window.h"
#import "desktop/browser_history.h"
+#import "desktop/local_history.h"
#import "netsurf/plotters.h"
-@implementation HistoryView
-
-@synthesize browser = browserView;
-
-- (void)setBrowser:(BrowserView *)bw
-{
- browserView = bw;
- browser = [bw browser];
- [self updateHistory];
+@interface HistoryView () {
+ struct local_history_session *_session;
}
-- (NSSize)size
-{
- int width, height;
- browser_window_history_size(browser, &width, &height);
+@property (nonatomic) NSMutableArray *toolTips;
+@property (readwrite, nonatomic) NSSize size;
- return cocoa_size(width, height);
-}
+@end
-- (void)updateHistory
+static nserror invalidate(struct core_window *cw, const struct rect *rect)
{
- [self setFrameSize:[self size]];
- [self setNeedsDisplay:YES];
+ return NSERROR_NOT_IMPLEMENTED;
}
-- (void)drawRect:(NSRect)rect
+static void update_size(struct core_window *cw, int width, int height)
{
- [[NSColor clearColor] set];
- [NSBezierPath fillRect:rect];
-
- struct redraw_context ctx = {
- .interactive = true,
- .background_images = true,
- .plot = &cocoa_plotters
- };
-
- cocoa_set_clip(rect);
-
- browser_window_history_redraw(browser, &ctx);
+ HistoryView *view = (__bridge HistoryView *)cw;
+ NSSize size = cocoa_size(width, height);
+ view.size = size;
}
-- (void)mouseUp:(NSEvent *)theEvent
+static void scroll_visible(struct core_window *cw, const struct rect *r)
{
- const NSPoint location = [self convertPoint:[theEvent locationInWindow] fromView:nil];
- const bool newWindow = [theEvent modifierFlags] & NSEventModifierFlagCommand;
- if (browser_window_history_click(browser,
- cocoa_pt_to_px(location.x), cocoa_pt_to_px(location.y),
- newWindow)) {
- [browserView setHistoryVisible:NO];
- }
}
-- (BOOL)isFlipped
+static void get_window_dimensions(struct core_window *cw, int *width, int *height)
{
- return YES;
}
-- (void)mouseEntered:(NSEvent *)event
+static void drag_status(struct core_window *cw, core_window_drag_status ds)
{
- [[NSCursor pointingHandCursor] set];
}
-- (void)mouseExited:(NSEvent *)event
+static struct core_window_callback_table history_view_table = {
+ .invalidate = invalidate,
+ .update_size = update_size,
+ .scroll_visible = scroll_visible,
+ .get_window_dimensions = get_window_dimensions,
+ .drag_status = drag_status
+};
+
+@implementation HistoryView
+
+- (void)updateHistory
{
- [[NSCursor arrowCursor] set];
+ if (_session) {
+ local_history_set(_session, self.browser.browser);
+ } else {
+ local_history_init(&history_view_table, (__bridge void *)self, self.browser.browser, &_session);
+ }
+
+ self.frameSize = self.size;
}
-static bool cursor_rects_cb(const struct browser_window *bw, int x0, int y0, int x1, int y1,
- const struct history_entry *page, void *user_data)
+- (void)dealloc
{
- HistoryView *view = (__bridge HistoryView *)user_data;
-
- NSRect rect = NSIntersectionRect([view visibleRect], cocoa_rect(x0, y0, x1, y1));
- if (!NSIsEmptyRect(rect)) {
-
- NSString *toolTip = [NSString stringWithFormat:@"%s\n%s", browser_window_history_entry_get_title(page),
- browser_window_history_entry_get_url(page)];
-
- [view addToolTipRect:rect owner:toolTip userData:nil];
- NSTrackingArea *area = [[NSTrackingArea alloc] initWithRect:rect
- options:NSTrackingMouseEnteredAndExited | NSTrackingActiveInActiveApp
- owner:view
- userInfo:nil];
- [view addTrackingArea:area];
+ if (_session) {
+ local_history_fini(_session);
}
-
- return true;
}
-- (NSToolTipTag)addToolTipRect:(NSRect)rect owner:(id)owner userData:(void *)userData
+- (void)drawRect:(NSRect)rect
{
- if (toolTips == nil)
- toolTips = [[NSMutableArray alloc] init];
- [toolTips addObject:owner];
+ if (!_session) return;
- return [super addToolTipRect:rect owner:owner userData:userData];
-}
+ struct redraw_context context = {
+ .interactive = true,
+ .background_images = false,
+ .plot = &cocoa_plotters,
+ };
-- (void)removeAllToolTips
-{
- [super removeAllToolTips];
- [toolTips removeAllObjects];
+ cocoa_set_clip(rect);
+
+ struct rect clipRect = {
+ .x0 = cocoa_pt_to_px(CGRectGetMinX(rect)),
+ .y0 = cocoa_pt_to_px(CGRectGetMinY(rect)),
+ .x1 = cocoa_pt_to_px(CGRectGetMaxX(rect)),
+ .y1 = cocoa_pt_to_px(CGRectGetMaxY(rect))
+ };
+ local_history_redraw(_session, 0, 0, &clipRect, &context);
}
-- (void)updateTrackingAreas
+- (void)mouseUp:(NSEvent *)theEvent
{
- [self removeAllToolTips];
+ if (!_session) return;
- for (NSTrackingArea *area in [self trackingAreas]) {
- [self removeTrackingArea:area];
+ CGPoint location = [self convertPoint: theEvent.locationInWindow fromView: nil];
+
+ browser_mouse_state state = BROWSER_MOUSE_PRESS_1;
+ if (theEvent.modifierFlags & NSEventModifierFlagCommand) {
+ state = BROWSER_MOUSE_PRESS_2;
}
- browser_window_history_enumerate(browser, cursor_rects_cb, (__bridge void *)self);
+ local_history_mouse_action(_session, state, cocoa_pt_to_px(location.x), cocoa_pt_to_px(location.y));
+}
- [super updateTrackingAreas];
+- (BOOL)isFlipped
+{
+ return YES;
}
@end
diff --git a/frontends/cocoa/LocalHistoryController.m b/frontends/cocoa/LocalHistoryController.m
index b54359f..1a60783 100644
--- a/frontends/cocoa/LocalHistoryController.m
+++ b/frontends/cocoa/LocalHistoryController.m
@@ -40,9 +40,9 @@
ArrowWindow *box = (ArrowWindow *)[self window];
+ [self.history updateHistory];
box.contentSize = self.history.size;
[box setArrowPosition:50];
- [self.history updateHistory];
[box attachToView:view];
NSRect frame = [box frame];
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=2e5519f22742e7f5751...
commit 2e5519f22742e7f5751d8a6098e8479bfbc9919b
Merge: 711dcab 2b2bbbe
Author: Sven Weidauer <sven(a)5sw.de>
Commit: Sven Weidauer <sven(a)5sw.de>
Merge remote-tracking branch 'origin/master' into svenw/cocoa
diff --cc docs/Doxyfile
index 0000000,f106693..e549981
mode 000000,100644..100644
--- a/docs/Doxyfile
+++ b/docs/Doxyfile
@@@ -1,0 -1,2388 +1,2389 @@@
+ # Doxyfile 1.8.8
+
+ # This file describes the settings to be used by the documentation system
+ # doxygen (www.doxygen.org) for a project.
+ #
+ # All text after a double hash (##) is considered a comment and is placed in
+ # front of the TAG it is preceding.
+ #
+ # All text after a single hash (#) is considered a comment and will be ignored.
+ # The format is:
+ # TAG = value [value, ...]
+ # For lists, items can also be appended using:
+ # TAG += value [value, ...]
+ # Values that contain spaces should be placed between quotes (\" \").
+
+ #---------------------------------------------------------------------------
+ # Project related configuration options
+ #---------------------------------------------------------------------------
+
+ # This tag specifies the encoding used for all characters in the config file
+ # that follow. The default is UTF-8 which is also the encoding used for all text
+ # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+ # built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+ # for the list of possible encodings.
+ # The default value is: UTF-8.
+
+ DOXYFILE_ENCODING = UTF-8
+
+ # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+ # double-quotes, unless you are using Doxywizard) that should identify the
+ # project for which the documentation is generated. This name is used in the
+ # title of most generated pages and in a few other places.
+ # The default value is: My Project.
+
+ PROJECT_NAME = NetSurf
+
+ # The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+ # could be handy for archiving the generated documentation or if some version
+ # control system is used.
+
+ PROJECT_NUMBER =
+
+ # Using the PROJECT_BRIEF tag one can provide an optional one line description
+ # for a project that appears at the top of each page and should give viewer a
+ # quick idea about the purpose of the project. Keep the description short.
+
+ PROJECT_BRIEF =
+
+ # With the PROJECT_LOGO tag one can specify an logo or icon that is included in
+ # the documentation. The maximum height of the logo should not exceed 55 pixels
+ # and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
+ # to the output directory.
+
+ PROJECT_LOGO =
+
+ # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+ # into which the generated documentation will be written. If a relative path is
+ # entered, it will be relative to the location where doxygen was started. If
+ # left blank the current directory will be used.
+
+ OUTPUT_DIRECTORY =
+
+ # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+ # directories (in 2 levels) under the output directory of each output format and
+ # will distribute the generated files over these directories. Enabling this
+ # option can be useful when feeding doxygen a huge amount of source files, where
+ # putting all generated files in the same directory would otherwise causes
+ # performance problems for the file system.
+ # The default value is: NO.
+
+ CREATE_SUBDIRS = NO
+
+ # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+ # characters to appear in the names of generated files. If set to NO, non-ASCII
+ # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+ # U+3044.
+ # The default value is: NO.
+
+ ALLOW_UNICODE_NAMES = NO
+
+ # The OUTPUT_LANGUAGE tag is used to specify the language in which all
+ # documentation generated by doxygen is written. Doxygen will use this
+ # information to generate all constant output in the proper language.
+ # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+ # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+ # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+ # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+ # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+ # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+ # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+ # Ukrainian and Vietnamese.
+ # The default value is: English.
+
+ OUTPUT_LANGUAGE = English
+
+ # If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+ # descriptions after the members that are listed in the file and class
+ # documentation (similar to Javadoc). Set to NO to disable this.
+ # The default value is: YES.
+
+ BRIEF_MEMBER_DESC = YES
+
+ # If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+ # description of a member or function before the detailed description
+ #
+ # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+ # brief descriptions will be completely suppressed.
+ # The default value is: YES.
+
+ REPEAT_BRIEF = YES
+
+ # This tag implements a quasi-intelligent brief description abbreviator that is
+ # used to form the text in various listings. Each string in this list, if found
+ # as the leading text of the brief description, will be stripped from the text
+ # and the result, after processing the whole list, is used as the annotated
+ # text. Otherwise, the brief description is used as-is. If left blank, the
+ # following values are used ($name is automatically replaced with the name of
+ # the entity):The $name class, The $name widget, The $name file, is, provides,
+ # specifies, contains, represents, a, an and the.
+
+ ABBREVIATE_BRIEF =
+
+ # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+ # doxygen will generate a detailed section even if there is only a brief
+ # description.
+ # The default value is: NO.
+
+ ALWAYS_DETAILED_SEC = NO
+
+ # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+ # inherited members of a class in the documentation of that class as if those
+ # members were ordinary class members. Constructors, destructors and assignment
+ # operators of the base classes will not be shown.
+ # The default value is: NO.
+
+ INLINE_INHERITED_MEMB = NO
+
+ # If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+ # before files name in the file list and in the header files. If set to NO the
+ # shortest path that makes the file name unique will be used
+ # The default value is: YES.
+
+ FULL_PATH_NAMES = YES
+
+ # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+ # Stripping is only done if one of the specified strings matches the left-hand
+ # part of the path. The tag can be used to show relative paths in the file list.
+ # If left blank the directory from which doxygen is run is used as the path to
+ # strip.
+ #
+ # Note that you can specify absolute paths here, but also relative paths, which
+ # will be relative from the directory where doxygen is started.
+ # This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+ STRIP_FROM_PATH =
+
+ # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+ # path mentioned in the documentation of a class, which tells the reader which
+ # header file to include in order to use a class. If left blank only the name of
+ # the header file containing the class definition is used. Otherwise one should
+ # specify the list of include paths that are normally passed to the compiler
+ # using the -I flag.
+
+ STRIP_FROM_INC_PATH =
+
+ # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+ # less readable) file names. This can be useful is your file systems doesn't
+ # support long names like on DOS, Mac, or CD-ROM.
+ # The default value is: NO.
+
+ SHORT_NAMES = NO
+
+ # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+ # first line (until the first dot) of a Javadoc-style comment as the brief
+ # description. If set to NO, the Javadoc-style will behave just like regular Qt-
+ # style comments (thus requiring an explicit @brief command for a brief
+ # description.)
+ # The default value is: NO.
+
+ JAVADOC_AUTOBRIEF = YES
+
+ # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+ # line (until the first dot) of a Qt-style comment as the brief description. If
+ # set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+ # requiring an explicit \brief command for a brief description.)
+ # The default value is: NO.
+
+ QT_AUTOBRIEF = NO
+
+ # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+ # multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+ # a brief description. This used to be the default behavior. The new default is
+ # to treat a multi-line C++ comment block as a detailed description. Set this
+ # tag to YES if you prefer the old behavior instead.
+ #
+ # Note that setting this tag to YES also means that rational rose comments are
+ # not recognized any more.
+ # The default value is: NO.
+
+ MULTILINE_CPP_IS_BRIEF = NO
+
+ # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+ # documentation from any documented member that it re-implements.
+ # The default value is: YES.
+
+ INHERIT_DOCS = YES
+
+ # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
+ # new page for each member. If set to NO, the documentation of a member will be
+ # part of the file/class/namespace that contains it.
+ # The default value is: NO.
+
+ SEPARATE_MEMBER_PAGES = NO
+
+ # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+ # uses this value to replace tabs by spaces in code fragments.
+ # Minimum value: 1, maximum value: 16, default value: 4.
+
+ TAB_SIZE = 8
+
+ # This tag can be used to specify a number of aliases that act as commands in
+ # the documentation. An alias has the form:
+ # name=value
+ # For example adding
+ # "sideeffect=@par Side Effects:\n"
+ # will allow you to put the command \sideeffect (or @sideeffect) in the
+ # documentation, which will result in a user-defined paragraph with heading
+ # "Side Effects:". You can put \n's in the value part of an alias to insert
+ # newlines.
+
+ ALIASES =
+
+ # This tag can be used to specify a number of word-keyword mappings (TCL only).
+ # A mapping has the form "name=value". For example adding "class=itcl::class"
+ # will allow you to use the command class in the itcl::class meaning.
+
+ TCL_SUBST =
+
+ # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+ # only. Doxygen will then generate output that is more tailored for C. For
+ # instance, some of the names that are used will be different. The list of all
+ # members will be omitted, etc.
+ # The default value is: NO.
+
+ OPTIMIZE_OUTPUT_FOR_C = YES
+
+ # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+ # Python sources only. Doxygen will then generate output that is more tailored
+ # for that language. For instance, namespaces will be presented as packages,
+ # qualified scopes will look different, etc.
+ # The default value is: NO.
+
+ OPTIMIZE_OUTPUT_JAVA = NO
+
+ # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+ # sources. Doxygen will then generate output that is tailored for Fortran.
+ # The default value is: NO.
+
+ OPTIMIZE_FOR_FORTRAN = NO
+
+ # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+ # sources. Doxygen will then generate output that is tailored for VHDL.
+ # The default value is: NO.
+
+ OPTIMIZE_OUTPUT_VHDL = NO
+
+ # Doxygen selects the parser to use depending on the extension of the files it
+ # parses. With this tag you can assign which parser to use for a given
+ # extension. Doxygen has a built-in mapping, but you can override or extend it
+ # using this tag. The format is ext=language, where ext is a file extension, and
+ # language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+ # C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
+ # FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
+ # Fortran. In the later case the parser tries to guess whether the code is fixed
+ # or free formatted code, this is the default for Fortran type files), VHDL. For
+ # instance to make doxygen treat .inc files as Fortran files (default is PHP),
+ # and .f files as C (default is Fortran), use: inc=Fortran f=C.
+ #
+ # Note For files without extension you can use no_extension as a placeholder.
+ #
+ # Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+ # the files are not read by doxygen.
+
+ EXTENSION_MAPPING =
+
+ # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+ # according to the Markdown format, which allows for more readable
+ # documentation. See http://daringfireball.net/projects/markdown/ for details.
+ # The output of markdown processing is further processed by doxygen, so you can
+ # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+ # case of backward compatibilities issues.
+ # The default value is: YES.
+
+ MARKDOWN_SUPPORT = YES
+
+ # When enabled doxygen tries to link words that correspond to documented
+ # classes, or namespaces to their corresponding documentation. Such a link can
+ # be prevented in individual cases by by putting a % sign in front of the word
+ # or globally by setting AUTOLINK_SUPPORT to NO.
+ # The default value is: YES.
+
+ AUTOLINK_SUPPORT = YES
+
+ # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+ # to include (a tag file for) the STL sources as input, then you should set this
+ # tag to YES in order to let doxygen match functions declarations and
+ # definitions whose arguments contain STL classes (e.g. func(std::string);
+ # versus func(std::string) {}). This also make the inheritance and collaboration
+ # diagrams that involve STL classes more complete and accurate.
+ # The default value is: NO.
+
+ BUILTIN_STL_SUPPORT = NO
+
+ # If you use Microsoft's C++/CLI language, you should set this option to YES to
+ # enable parsing support.
+ # The default value is: NO.
+
+ CPP_CLI_SUPPORT = NO
+
+ # Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+ # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+ # will parse them like normal C++ but will assume all classes use public instead
+ # of private inheritance when no explicit protection keyword is present.
+ # The default value is: NO.
+
+ SIP_SUPPORT = NO
+
+ # For Microsoft's IDL there are propget and propput attributes to indicate
+ # getter and setter methods for a property. Setting this option to YES will make
+ # doxygen to replace the get and set methods by a property in the documentation.
+ # This will only work if the methods are indeed getting or setting a simple
+ # type. If this is not the case, or you want to show the methods anyway, you
+ # should set this option to NO.
+ # The default value is: YES.
+
+ IDL_PROPERTY_SUPPORT = YES
+
+ # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+ # tag is set to YES, then doxygen will reuse the documentation of the first
+ # member in the group (if any) for the other members of the group. By default
+ # all members of a group must be documented explicitly.
+ # The default value is: NO.
+
+ DISTRIBUTE_GROUP_DOC = NO
+
+ # Set the SUBGROUPING tag to YES to allow class member groups of the same type
+ # (for instance a group of public functions) to be put as a subgroup of that
+ # type (e.g. under the Public Functions section). Set it to NO to prevent
+ # subgrouping. Alternatively, this can be done per class using the
+ # \nosubgrouping command.
+ # The default value is: YES.
+
+ SUBGROUPING = YES
+
+ # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+ # are shown inside the group in which they are included (e.g. using \ingroup)
+ # instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+ # and RTF).
+ #
+ # Note that this feature does not work in combination with
+ # SEPARATE_MEMBER_PAGES.
+ # The default value is: NO.
+
+ INLINE_GROUPED_CLASSES = NO
+
+ # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+ # with only public data fields or simple typedef fields will be shown inline in
+ # the documentation of the scope in which they are defined (i.e. file,
+ # namespace, or group documentation), provided this scope is documented. If set
+ # to NO, structs, classes, and unions are shown on a separate page (for HTML and
+ # Man pages) or section (for LaTeX and RTF).
+ # The default value is: NO.
+
+ INLINE_SIMPLE_STRUCTS = NO
+
+ # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+ # enum is documented as struct, union, or enum with the name of the typedef. So
+ # typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+ # with name TypeT. When disabled the typedef will appear as a member of a file,
+ # namespace, or class. And the struct will be named TypeS. This can typically be
+ # useful for C code in case the coding convention dictates that all compound
+ # types are typedef'ed and only the typedef is referenced, never the tag name.
+ # The default value is: NO.
+
+ TYPEDEF_HIDES_STRUCT = NO
+
+ # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+ # cache is used to resolve symbols given their name and scope. Since this can be
+ # an expensive process and often the same symbol appears multiple times in the
+ # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+ # doxygen will become slower. If the cache is too large, memory is wasted. The
+ # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+ # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+ # symbols. At the end of a run doxygen will report the cache usage and suggest
+ # the optimal cache size from a speed point of view.
+ # Minimum value: 0, maximum value: 9, default value: 0.
+
+ LOOKUP_CACHE_SIZE = 0
+
+ #---------------------------------------------------------------------------
+ # Build related configuration options
+ #---------------------------------------------------------------------------
+
+ # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+ # documentation are documented, even if no documentation was available. Private
+ # class members and static file members will be hidden unless the
+ # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+ # Note: This will also disable the warnings about undocumented members that are
+ # normally produced when WARNINGS is set to YES.
+ # The default value is: NO.
+
+ EXTRACT_ALL = YES
+
+ # If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+ # be included in the documentation.
+ # The default value is: NO.
+
+ EXTRACT_PRIVATE = YES
+
+ # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+ # scope will be included in the documentation.
+ # The default value is: NO.
+
+ EXTRACT_PACKAGE = NO
+
+ # If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+ # included in the documentation.
+ # The default value is: NO.
+
+ EXTRACT_STATIC = YES
+
+ # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
+ # locally in source files will be included in the documentation. If set to NO
+ # only classes defined in header files are included. Does not have any effect
+ # for Java sources.
+ # The default value is: YES.
+
+ EXTRACT_LOCAL_CLASSES = YES
+
+ # This flag is only useful for Objective-C code. When set to YES local methods,
+ # which are defined in the implementation section but not in the interface are
+ # included in the documentation. If set to NO only methods in the interface are
+ # included.
+ # The default value is: NO.
+
+ EXTRACT_LOCAL_METHODS = NO
+
+ # If this flag is set to YES, the members of anonymous namespaces will be
+ # extracted and appear in the documentation as a namespace called
+ # 'anonymous_namespace{file}', where file will be replaced with the base name of
+ # the file that contains the anonymous namespace. By default anonymous namespace
+ # are hidden.
+ # The default value is: NO.
+
+ EXTRACT_ANON_NSPACES = NO
+
+ # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+ # undocumented members inside documented classes or files. If set to NO these
+ # members will be included in the various overviews, but no documentation
+ # section is generated. This option has no effect if EXTRACT_ALL is enabled.
+ # The default value is: NO.
+
+ HIDE_UNDOC_MEMBERS = NO
+
+ # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+ # undocumented classes that are normally visible in the class hierarchy. If set
+ # to NO these classes will be included in the various overviews. This option has
+ # no effect if EXTRACT_ALL is enabled.
+ # The default value is: NO.
+
+ HIDE_UNDOC_CLASSES = NO
+
+ # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+ # (class|struct|union) declarations. If set to NO these declarations will be
+ # included in the documentation.
+ # The default value is: NO.
+
+ HIDE_FRIEND_COMPOUNDS = NO
+
+ # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+ # documentation blocks found inside the body of a function. If set to NO these
+ # blocks will be appended to the function's detailed documentation block.
+ # The default value is: NO.
+
+ HIDE_IN_BODY_DOCS = NO
+
+ # The INTERNAL_DOCS tag determines if documentation that is typed after a
+ # \internal command is included. If the tag is set to NO then the documentation
+ # will be excluded. Set it to YES to include the internal documentation.
+ # The default value is: NO.
+
+ INTERNAL_DOCS = NO
+
+ # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+ # names in lower-case letters. If set to YES upper-case letters are also
+ # allowed. This is useful if you have classes or files whose names only differ
+ # in case and if your file system supports case sensitive file names. Windows
+ # and Mac users are advised to set this option to NO.
+ # The default value is: system dependent.
+
+ CASE_SENSE_NAMES = YES
+
+ # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+ # their full class and namespace scopes in the documentation. If set to YES the
+ # scope will be hidden.
+ # The default value is: NO.
+
+ HIDE_SCOPE_NAMES = NO
+
+ # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+ # the files that are included by a file in the documentation of that file.
+ # The default value is: YES.
+
+ SHOW_INCLUDE_FILES = YES
+
+ # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+ # grouped member an include statement to the documentation, telling the reader
+ # which file to include in order to use the member.
+ # The default value is: NO.
+
+ SHOW_GROUPED_MEMB_INC = NO
+
+ # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+ # files with double quotes in the documentation rather than with sharp brackets.
+ # The default value is: NO.
+
+ FORCE_LOCAL_INCLUDES = NO
+
+ # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+ # documentation for inline members.
+ # The default value is: YES.
+
+ INLINE_INFO = YES
+
+ # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+ # (detailed) documentation of file and class members alphabetically by member
+ # name. If set to NO the members will appear in declaration order.
+ # The default value is: YES.
+
+ SORT_MEMBER_DOCS = YES
+
+ # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+ # descriptions of file, namespace and class members alphabetically by member
+ # name. If set to NO the members will appear in declaration order. Note that
+ # this will also influence the order of the classes in the class list.
+ # The default value is: NO.
+
+ SORT_BRIEF_DOCS = NO
+
+ # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+ # (brief and detailed) documentation of class members so that constructors and
+ # destructors are listed first. If set to NO the constructors will appear in the
+ # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+ # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+ # member documentation.
+ # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+ # detailed member documentation.
+ # The default value is: NO.
+
+ SORT_MEMBERS_CTORS_1ST = NO
+
+ # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+ # of group names into alphabetical order. If set to NO the group names will
+ # appear in their defined order.
+ # The default value is: NO.
+
+ SORT_GROUP_NAMES = NO
+
+ # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+ # fully-qualified names, including namespaces. If set to NO, the class list will
+ # be sorted only by class name, not including the namespace part.
+ # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+ # Note: This option applies only to the class list, not to the alphabetical
+ # list.
+ # The default value is: NO.
+
+ SORT_BY_SCOPE_NAME = NO
+
+ # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+ # type resolution of all parameters of a function it will reject a match between
+ # the prototype and the implementation of a member function even if there is
+ # only one candidate or it is obvious which candidate to choose by doing a
+ # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+ # accept a match between prototype and implementation in such cases.
+ # The default value is: NO.
+
+ STRICT_PROTO_MATCHING = NO
+
+ # The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
+ # todo list. This list is created by putting \todo commands in the
+ # documentation.
+ # The default value is: YES.
+
+ GENERATE_TODOLIST = YES
+
+ # The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
+ # test list. This list is created by putting \test commands in the
+ # documentation.
+ # The default value is: YES.
+
+ GENERATE_TESTLIST = YES
+
+ # The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+ # list. This list is created by putting \bug commands in the documentation.
+ # The default value is: YES.
+
+ GENERATE_BUGLIST = YES
+
+ # The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+ # the deprecated list. This list is created by putting \deprecated commands in
+ # the documentation.
+ # The default value is: YES.
+
+ GENERATE_DEPRECATEDLIST= YES
+
+ # The ENABLED_SECTIONS tag can be used to enable conditional documentation
+ # sections, marked by \if <section_label> ... \endif and \cond <section_label>
+ # ... \endcond blocks.
+
+ ENABLED_SECTIONS =
+
+ # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+ # initial value of a variable or macro / define can have for it to appear in the
+ # documentation. If the initializer consists of more lines than specified here
+ # it will be hidden. Use a value of 0 to hide initializers completely. The
+ # appearance of the value of individual variables and macros / defines can be
+ # controlled using \showinitializer or \hideinitializer command in the
+ # documentation regardless of this setting.
+ # Minimum value: 0, maximum value: 10000, default value: 30.
+
+ MAX_INITIALIZER_LINES = 30
+
+ # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+ # the bottom of the documentation of classes and structs. If set to YES the list
+ # will mention the files that were used to generate the documentation.
+ # The default value is: YES.
+
+ SHOW_USED_FILES = YES
+
+ # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+ # will remove the Files entry from the Quick Index and from the Folder Tree View
+ # (if specified).
+ # The default value is: YES.
+
+ SHOW_FILES = YES
+
+ # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+ # page. This will remove the Namespaces entry from the Quick Index and from the
+ # Folder Tree View (if specified).
+ # The default value is: YES.
+
+ SHOW_NAMESPACES = YES
+
+ # The FILE_VERSION_FILTER tag can be used to specify a program or script that
+ # doxygen should invoke to get the current version for each file (typically from
+ # the version control system). Doxygen will invoke the program by executing (via
+ # popen()) the command command input-file, where command is the value of the
+ # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+ # by doxygen. Whatever the program writes to standard output is used as the file
+ # version. For an example see the documentation.
+
+ FILE_VERSION_FILTER =
+
+ # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+ # by doxygen. The layout file controls the global structure of the generated
+ # output files in an output format independent way. To create the layout file
+ # that represents doxygen's defaults, run doxygen with the -l option. You can
+ # optionally specify a file name after the option, if omitted DoxygenLayout.xml
+ # will be used as the name of the layout file.
+ #
+ # Note that if you run doxygen from a directory containing a file called
+ # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+ # tag is left empty.
+
+ LAYOUT_FILE =
+
+ # The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+ # the reference definitions. This must be a list of .bib files. The .bib
+ # extension is automatically appended if omitted. This requires the bibtex tool
+ # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+ # For LaTeX the style of the bibliography can be controlled using
+ # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+ # search path. See also \cite for info how to create references.
+
+ CITE_BIB_FILES =
+
+ #---------------------------------------------------------------------------
+ # Configuration options related to warning and progress messages
+ #---------------------------------------------------------------------------
+
+ # The QUIET tag can be used to turn on/off the messages that are generated to
+ # standard output by doxygen. If QUIET is set to YES this implies that the
+ # messages are off.
+ # The default value is: NO.
+
+ QUIET = NO
+
+ # The WARNINGS tag can be used to turn on/off the warning messages that are
+ # generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+ # this implies that the warnings are on.
+ #
+ # Tip: Turn warnings on while writing the documentation.
+ # The default value is: YES.
+
+ WARNINGS = YES
+
+ # If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+ # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+ # will automatically be disabled.
+ # The default value is: YES.
+
+ WARN_IF_UNDOCUMENTED = YES
+
+ # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+ # potential errors in the documentation, such as not documenting some parameters
+ # in a documented function, or documenting parameters that don't exist or using
+ # markup commands wrongly.
+ # The default value is: YES.
+
+ WARN_IF_DOC_ERROR = YES
+
+ # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+ # are documented, but have no documentation for their parameters or return
+ # value. If set to NO doxygen will only warn about wrong or incomplete parameter
+ # documentation, but not about the absence of documentation.
+ # The default value is: NO.
+
+ WARN_NO_PARAMDOC = YES
+
+ # The WARN_FORMAT tag determines the format of the warning messages that doxygen
+ # can produce. The string should contain the $file, $line, and $text tags, which
+ # will be replaced by the file and line number from which the warning originated
+ # and the warning text. Optionally the format may contain $version, which will
+ # be replaced by the version of the file (if it could be obtained via
+ # FILE_VERSION_FILTER)
+ # The default value is: $file:$line: $text.
+
+ WARN_FORMAT = "$file:$line: $text"
+
+ # The WARN_LOGFILE tag can be used to specify a file to which warning and error
+ # messages should be written. If left blank the output is written to standard
+ # error (stderr).
+
+ WARN_LOGFILE =
+
+ #---------------------------------------------------------------------------
+ # Configuration options related to the input files
+ #---------------------------------------------------------------------------
+
+ # The INPUT tag is used to specify the files and/or directories that contain
+ # documented source files. You may enter file names like myfile.cpp or
+ # directories like /usr/src/myproject. Separate the files or directories with
+ # spaces.
+ # Note: If this tag is empty the current directory is searched.
+
+ INPUT = docs \
+ docs/env.sh \
+ docs/UnimplementedJavascript.txt \
+ frontends/amiga \
+ frontends/amiga/stringview \
+ frontends/atari \
+ frontends/atari/plot \
+ frontends/beos \
++ frontends/cocoa \
+ frontends/framebuffer \
+ frontends/framebuffer/fbtk \
+ frontends/gtk \
+ frontends/monkey \
+ frontends/riscos \
+ frontends/riscos/configure \
+ frontends/riscos/gui \
+ frontends/riscos/content-handlers \
+ frontends/riscos/templates \
+ frontends/riscos/scripts \
+ frontends/windows \
+ include/netsurf \
+ render \
+ desktop \
+ content \
+ content/fetchers \
+ content/handlers/image \
+ content/handlers/css \
+ content/handlers/javascript \
+ content/handlers/javascript/duktape \
+ utils \
+ utils/http
+
+ # This tag can be used to specify the character encoding of the source files
+ # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+ # libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+ # documentation (see: http://www.gnu.org/software/libiconv) for the list of
+ # possible encodings.
+ # The default value is: UTF-8.
+
+ INPUT_ENCODING = UTF-8
+
+ # If the value of the INPUT tag contains directories, you can use the
+ # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+ # *.h) to filter out the source-files in the directories. If left blank the
+ # following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
+ # *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
+ # *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
+ # *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+ # *.qsf, *.as and *.js.
+
+ FILE_PATTERNS = *.c \
+ *.h \
+ *.y \
+ *.l \
+ *.cpp \
+ *.m \
+ *.md
+
+ # The RECURSIVE tag can be used to specify whether or not subdirectories should
+ # be searched for input files as well.
+ # The default value is: NO.
+
+ RECURSIVE = NO
+
+ # The EXCLUDE tag can be used to specify files and/or directories that should be
+ # excluded from the INPUT source files. This way you can easily exclude a
+ # subdirectory from a directory tree whose root is specified with the INPUT tag.
+ #
+ # Note that relative paths are relative to the directory from which doxygen is
+ # run.
+
+ EXCLUDE =
+
+ # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+ # directories that are symbolic links (a Unix file system feature) are excluded
+ # from the input.
+ # The default value is: NO.
+
+ EXCLUDE_SYMLINKS = NO
+
+ # If the value of the INPUT tag contains directories, you can use the
+ # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+ # certain files from those directories.
+ #
+ # Note that the wildcards are matched against the file with absolute path, so to
+ # exclude all test directories for example use the pattern */test/*
+
+ EXCLUDE_PATTERNS =
+
+ # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+ # (namespaces, classes, functions, etc.) that should be excluded from the
+ # output. The symbol name can be a fully qualified name, a word, or if the
+ # wildcard * is used, a substring. Examples: ANamespace, AClass,
+ # AClass::ANamespace, ANamespace::*Test
+ #
+ # Note that the wildcards are matched against the file with absolute path, so to
+ # exclude all test directories use the pattern */test/*
+
+ EXCLUDE_SYMBOLS =
+
+ # The EXAMPLE_PATH tag can be used to specify one or more files or directories
+ # that contain example code fragments that are included (see the \include
+ # command).
+
+ EXAMPLE_PATH =
+
+ # If the value of the EXAMPLE_PATH tag contains directories, you can use the
+ # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+ # *.h) to filter out the source-files in the directories. If left blank all
+ # files are included.
+
+ EXAMPLE_PATTERNS =
+
+ # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+ # searched for input files to be used with the \include or \dontinclude commands
+ # irrespective of the value of the RECURSIVE tag.
+ # The default value is: NO.
+
+ EXAMPLE_RECURSIVE = NO
+
+ # The IMAGE_PATH tag can be used to specify one or more files or directories
+ # that contain images that are to be included in the documentation (see the
+ # \image command).
+
+ IMAGE_PATH =
+
+ # The INPUT_FILTER tag can be used to specify a program that doxygen should
+ # invoke to filter for each input file. Doxygen will invoke the filter program
+ # by executing (via popen()) the command:
+ #
+ # <filter> <input-file>
+ #
+ # where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+ # name of an input file. Doxygen will then use the output that the filter
+ # program writes to standard output. If FILTER_PATTERNS is specified, this tag
+ # will be ignored.
+ #
+ # Note that the filter must not add or remove lines; it is applied before the
+ # code is scanned, but not when the output code is generated. If lines are added
+ # or removed, the anchors will not be placed correctly.
+
+ INPUT_FILTER =
+
+ # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+ # basis. Doxygen will compare the file name with each pattern and apply the
+ # filter if there is a match. The filters are a list of the form: pattern=filter
+ # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+ # filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+ # patterns match the file name, INPUT_FILTER is applied.
+
+ FILTER_PATTERNS =
+
+ # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+ # INPUT_FILTER ) will also be used to filter the input files that are used for
+ # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+ # The default value is: NO.
+
+ FILTER_SOURCE_FILES = NO
+
+ # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+ # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+ # it is also possible to disable source filtering for a specific pattern using
+ # *.ext= (so without naming a filter).
+ # This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+ FILTER_SOURCE_PATTERNS =
+
+ # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+ # is part of the input, its contents will be placed on the main page
+ # (index.html). This can be useful if you have a project on for instance GitHub
+ # and want to reuse the introduction page also for the doxygen output.
+
+ USE_MDFILE_AS_MAINPAGE = mainpage.md
+
+ #---------------------------------------------------------------------------
+ # Configuration options related to source browsing
+ #---------------------------------------------------------------------------
+
+ # If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+ # generated. Documented entities will be cross-referenced with these sources.
+ #
+ # Note: To get rid of all source code in the generated output, make sure that
+ # also VERBATIM_HEADERS is set to NO.
+ # The default value is: NO.
+
+ SOURCE_BROWSER = YES
+
+ # Setting the INLINE_SOURCES tag to YES will include the body of functions,
+ # classes and enums directly into the documentation.
+ # The default value is: NO.
+
+ INLINE_SOURCES = NO
+
+ # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+ # special comment blocks from generated source code fragments. Normal C, C++ and
+ # Fortran comments will always remain visible.
+ # The default value is: YES.
+
+ STRIP_CODE_COMMENTS = NO
+
+ # If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+ # function all documented functions referencing it will be listed.
+ # The default value is: NO.
+
+ REFERENCED_BY_RELATION = YES
+
+ # If the REFERENCES_RELATION tag is set to YES then for each documented function
+ # all documented entities called/used by that function will be listed.
+ # The default value is: NO.
+
+ REFERENCES_RELATION = YES
+
+ # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+ # to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+ # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+ # link to the documentation.
+ # The default value is: YES.
+
+ REFERENCES_LINK_SOURCE = YES
+
+ # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+ # source code will show a tooltip with additional information such as prototype,
+ # brief description and links to the definition and documentation. Since this
+ # will make the HTML file larger and loading of large files a bit slower, you
+ # can opt to disable this feature.
+ # The default value is: YES.
+ # This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+ SOURCE_TOOLTIPS = YES
+
+ # If the USE_HTAGS tag is set to YES then the references to source code will
+ # point to the HTML generated by the htags(1) tool instead of doxygen built-in
+ # source browser. The htags tool is part of GNU's global source tagging system
+ # (see http://www.gnu.org/software/global/global.html). You will need version
+ # 4.8.6 or higher.
+ #
+ # To use it do the following:
+ # - Install the latest version of global
+ # - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+ # - Make sure the INPUT points to the root of the source tree
+ # - Run doxygen as normal
+ #
+ # Doxygen will invoke htags (and that will in turn invoke gtags), so these
+ # tools must be available from the command line (i.e. in the search path).
+ #
+ # The result: instead of the source browser generated by doxygen, the links to
+ # source code will now point to the output of htags.
+ # The default value is: NO.
+ # This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+ USE_HTAGS = NO
+
+ # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+ # verbatim copy of the header file for each class for which an include is
+ # specified. Set to NO to disable this.
+ # See also: Section \class.
+ # The default value is: YES.
+
+ VERBATIM_HEADERS = YES
+
+ # If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the
+ # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
+ # cost of reduced performance. This can be particularly helpful with template
+ # rich C++ code for which doxygen's built-in parser lacks the necessary type
+ # information.
+ # Note: The availability of this option depends on whether or not doxygen was
+ # compiled with the --with-libclang option.
+ # The default value is: NO.
+
+ CLANG_ASSISTED_PARSING = NO
+
+ # If clang assisted parsing is enabled you can provide the compiler with command
+ # line options that you would normally use when invoking the compiler. Note that
+ # the include paths will already be set by doxygen for the files and directories
+ # specified with INPUT and INCLUDE_PATH.
+ # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
+
+ CLANG_OPTIONS =
+
+ #---------------------------------------------------------------------------
+ # Configuration options related to the alphabetical class index
+ #---------------------------------------------------------------------------
+
+ # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+ # compounds will be generated. Enable this if the project contains a lot of
+ # classes, structs, unions or interfaces.
+ # The default value is: YES.
+
+ ALPHABETICAL_INDEX = NO
+
+ # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+ # which the alphabetical index list will be split.
+ # Minimum value: 1, maximum value: 20, default value: 5.
+ # This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+ COLS_IN_ALPHA_INDEX = 5
+
+ # In case all classes in a project start with a common prefix, all classes will
+ # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+ # can be used to specify a prefix (or a list of prefixes) that should be ignored
+ # while generating the index headers.
+ # This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+ IGNORE_PREFIX =
+
+ #---------------------------------------------------------------------------
+ # Configuration options related to the HTML output
+ #---------------------------------------------------------------------------
+
+ # If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+ # The default value is: YES.
+
+ GENERATE_HTML = YES
+
+ # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+ # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+ # it.
+ # The default directory is: html.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ HTML_OUTPUT = codedocs
+
+ # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+ # generated HTML page (for example: .htm, .php, .asp).
+ # The default value is: .html.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ HTML_FILE_EXTENSION = .html
+
+ # The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+ # each generated HTML page. If the tag is left blank doxygen will generate a
+ # standard header.
+ #
+ # To get valid HTML the header file that includes any scripts and style sheets
+ # that doxygen needs, which is dependent on the configuration options used (e.g.
+ # the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+ # default header using
+ # doxygen -w html new_header.html new_footer.html new_stylesheet.css
+ # YourConfigFile
+ # and then modify the file new_header.html. See also section "Doxygen usage"
+ # for information on how to generate the default header that doxygen normally
+ # uses.
+ # Note: The header is subject to change so you typically have to regenerate the
+ # default header when upgrading to a newer version of doxygen. For a description
+ # of the possible markers and block names see the documentation.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ HTML_HEADER =
+
+ # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+ # generated HTML page. If the tag is left blank doxygen will generate a standard
+ # footer. See HTML_HEADER for more information on how to generate a default
+ # footer and what special commands can be used inside the footer. See also
+ # section "Doxygen usage" for information on how to generate the default footer
+ # that doxygen normally uses.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ HTML_FOOTER =
+
+ # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+ # sheet that is used by each HTML page. It can be used to fine-tune the look of
+ # the HTML output. If left blank doxygen will generate a default style sheet.
+ # See also section "Doxygen usage" for information on how to generate the style
+ # sheet that doxygen normally uses.
+ # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+ # it is more robust and this tag (HTML_STYLESHEET) will in the future become
+ # obsolete.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ HTML_STYLESHEET =
+
+ # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+ # cascading style sheets that are included after the standard style sheets
+ # created by doxygen. Using this option one can overrule certain style aspects.
+ # This is preferred over using HTML_STYLESHEET since it does not replace the
+ # standard style sheet and is therefor more robust against future updates.
+ # Doxygen will copy the style sheet files to the output directory.
+ # Note: The order of the extra stylesheet files is of importance (e.g. the last
+ # stylesheet in the list overrules the setting of the previous ones in the
+ # list). For an example see the documentation.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ HTML_EXTRA_STYLESHEET =
+
+ # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+ # other source files which should be copied to the HTML output directory. Note
+ # that these files will be copied to the base HTML output directory. Use the
+ # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+ # files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+ # files will be copied as-is; there are no commands or markers available.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ HTML_EXTRA_FILES =
+
+ # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+ # will adjust the colors in the stylesheet and background images according to
+ # this color. Hue is specified as an angle on a colorwheel, see
+ # http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+ # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+ # purple, and 360 is red again.
+ # Minimum value: 0, maximum value: 359, default value: 220.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ HTML_COLORSTYLE_HUE = 220
+
+ # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+ # in the HTML output. For a value of 0 the output will use grayscales only. A
+ # value of 255 will produce the most vivid colors.
+ # Minimum value: 0, maximum value: 255, default value: 100.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ HTML_COLORSTYLE_SAT = 100
+
+ # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+ # luminance component of the colors in the HTML output. Values below 100
+ # gradually make the output lighter, whereas values above 100 make the output
+ # darker. The value divided by 100 is the actual gamma applied, so 80 represents
+ # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+ # change the gamma.
+ # Minimum value: 40, maximum value: 240, default value: 80.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ HTML_COLORSTYLE_GAMMA = 80
+
+ # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+ # page will contain the date and time when the page was generated. Setting this
+ # to NO can help when comparing the output of multiple runs.
+ # The default value is: YES.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ HTML_TIMESTAMP = YES
+
+ # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+ # documentation will contain sections that can be hidden and shown after the
+ # page has loaded.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ HTML_DYNAMIC_SECTIONS = NO
+
+ # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+ # shown in the various tree structured indices initially; the user can expand
+ # and collapse entries dynamically later on. Doxygen will expand the tree to
+ # such a level that at most the specified number of entries are visible (unless
+ # a fully collapsed tree already exceeds this amount). So setting the number of
+ # entries 1 will produce a full collapsed tree by default. 0 is a special value
+ # representing an infinite number of entries and will result in a full expanded
+ # tree by default.
+ # Minimum value: 0, maximum value: 9999, default value: 100.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ HTML_INDEX_NUM_ENTRIES = 100
+
+ # If the GENERATE_DOCSET tag is set to YES, additional index files will be
+ # generated that can be used as input for Apple's Xcode 3 integrated development
+ # environment (see: http://developer.apple.com/tools/xcode/), introduced with
+ # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+ # Makefile in the HTML output directory. Running make will produce the docset in
+ # that directory and running make install will install the docset in
+ # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+ # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+ # for more information.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ GENERATE_DOCSET = NO
+
+ # This tag determines the name of the docset feed. A documentation feed provides
+ # an umbrella under which multiple documentation sets from a single provider
+ # (such as a company or product suite) can be grouped.
+ # The default value is: Doxygen generated docs.
+ # This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+ DOCSET_FEEDNAME = "Doxygen generated docs"
+
+ # This tag specifies a string that should uniquely identify the documentation
+ # set bundle. This should be a reverse domain-name style string, e.g.
+ # com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+ # The default value is: org.doxygen.Project.
+ # This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+ DOCSET_BUNDLE_ID = org.doxygen.Project
+
+ # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+ # the documentation publisher. This should be a reverse domain-name style
+ # string, e.g. com.mycompany.MyDocSet.documentation.
+ # The default value is: org.doxygen.Publisher.
+ # This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+ DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+ # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+ # The default value is: Publisher.
+ # This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+ DOCSET_PUBLISHER_NAME = Publisher
+
+ # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+ # additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+ # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+ # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+ # Windows.
+ #
+ # The HTML Help Workshop contains a compiler that can convert all HTML output
+ # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+ # files are now used as the Windows 98 help format, and will replace the old
+ # Windows help format (.hlp) on all Windows platforms in the future. Compressed
+ # HTML files also contain an index, a table of contents, and you can search for
+ # words in the documentation. The HTML workshop also contains a viewer for
+ # compressed HTML files.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ GENERATE_HTMLHELP = NO
+
+ # The CHM_FILE tag can be used to specify the file name of the resulting .chm
+ # file. You can add a path in front of the file if the result should not be
+ # written to the html output directory.
+ # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+ CHM_FILE =
+
+ # The HHC_LOCATION tag can be used to specify the location (absolute path
+ # including file name) of the HTML help compiler ( hhc.exe). If non-empty
+ # doxygen will try to run the HTML help compiler on the generated index.hhp.
+ # The file has to be specified with full path.
+ # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+ HHC_LOCATION =
+
+ # The GENERATE_CHI flag controls if a separate .chi index file is generated (
+ # YES) or that it should be included in the master .chm file ( NO).
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+ GENERATE_CHI = NO
+
+ # The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+ # and project file content.
+ # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+ CHM_INDEX_ENCODING =
+
+ # The BINARY_TOC flag controls whether a binary table of contents is generated (
+ # YES) or a normal table of contents ( NO) in the .chm file. Furthermore it
+ # enables the Previous and Next buttons.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+ BINARY_TOC = NO
+
+ # The TOC_EXPAND flag can be set to YES to add extra items for group members to
+ # the table of contents of the HTML help documentation and to the tree view.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+ TOC_EXPAND = NO
+
+ # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+ # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+ # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+ # (.qch) of the generated HTML documentation.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ GENERATE_QHP = NO
+
+ # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+ # the file name of the resulting .qch file. The path specified is relative to
+ # the HTML output folder.
+ # This tag requires that the tag GENERATE_QHP is set to YES.
+
+ QCH_FILE =
+
+ # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+ # Project output. For more information please see Qt Help Project / Namespace
+ # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+ # The default value is: org.doxygen.Project.
+ # This tag requires that the tag GENERATE_QHP is set to YES.
+
+ QHP_NAMESPACE = org.doxygen.Project
+
+ # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+ # Help Project output. For more information please see Qt Help Project / Virtual
+ # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+ # folders).
+ # The default value is: doc.
+ # This tag requires that the tag GENERATE_QHP is set to YES.
+
+ QHP_VIRTUAL_FOLDER = doc
+
+ # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+ # filter to add. For more information please see Qt Help Project / Custom
+ # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+ # filters).
+ # This tag requires that the tag GENERATE_QHP is set to YES.
+
+ QHP_CUST_FILTER_NAME =
+
+ # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+ # custom filter to add. For more information please see Qt Help Project / Custom
+ # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+ # filters).
+ # This tag requires that the tag GENERATE_QHP is set to YES.
+
+ QHP_CUST_FILTER_ATTRS =
+
+ # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+ # project's filter section matches. Qt Help Project / Filter Attributes (see:
+ # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+ # This tag requires that the tag GENERATE_QHP is set to YES.
+
+ QHP_SECT_FILTER_ATTRS =
+
+ # The QHG_LOCATION tag can be used to specify the location of Qt's
+ # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+ # generated .qhp file.
+ # This tag requires that the tag GENERATE_QHP is set to YES.
+
+ QHG_LOCATION =
+
+ # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+ # generated, together with the HTML files, they form an Eclipse help plugin. To
+ # install this plugin and make it available under the help contents menu in
+ # Eclipse, the contents of the directory containing the HTML and XML files needs
+ # to be copied into the plugins directory of eclipse. The name of the directory
+ # within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+ # After copying Eclipse needs to be restarted before the help appears.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ GENERATE_ECLIPSEHELP = NO
+
+ # A unique identifier for the Eclipse help plugin. When installing the plugin
+ # the directory name containing the HTML and XML files should also have this
+ # name. Each documentation set should have its own identifier.
+ # The default value is: org.doxygen.Project.
+ # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ ECLIPSE_DOC_ID = org.doxygen.Project
+
+ # If you want full control over the layout of the generated HTML pages it might
+ # be necessary to disable the index and replace it with your own. The
+ # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+ # of each HTML page. A value of NO enables the index and the value YES disables
+ # it. Since the tabs in the index contain the same information as the navigation
+ # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ DISABLE_INDEX = NO
+
+ # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+ # structure should be generated to display hierarchical information. If the tag
+ # value is set to YES, a side panel will be generated containing a tree-like
+ # index structure (just like the one that is generated for HTML Help). For this
+ # to work a browser that supports JavaScript, DHTML, CSS and frames is required
+ # (i.e. any modern browser). Windows users are probably better off using the
+ # HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+ # further fine-tune the look of the index. As an example, the default style
+ # sheet generated by doxygen has an example that shows how to put an image at
+ # the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+ # the same information as the tab index, you could consider setting
+ # DISABLE_INDEX to YES when enabling this option.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ GENERATE_TREEVIEW = NO
+
+ # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+ # doxygen will group on one line in the generated HTML documentation.
+ #
+ # Note that a value of 0 will completely suppress the enum values from appearing
+ # in the overview section.
+ # Minimum value: 0, maximum value: 20, default value: 4.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ ENUM_VALUES_PER_LINE = 4
+
+ # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+ # to set the initial width (in pixels) of the frame in which the tree is shown.
+ # Minimum value: 0, maximum value: 1500, default value: 250.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ TREEVIEW_WIDTH = 250
+
+ # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+ # external symbols imported via tag files in a separate window.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ EXT_LINKS_IN_WINDOW = NO
+
+ # Use this tag to change the font size of LaTeX formulas included as images in
+ # the HTML documentation. When you change the font size after a successful
+ # doxygen run you need to manually remove any form_*.png images from the HTML
+ # output directory to force them to be regenerated.
+ # Minimum value: 8, maximum value: 50, default value: 10.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ FORMULA_FONTSIZE = 10
+
+ # Use the FORMULA_TRANPARENT tag to determine whether or not the images
+ # generated for formulas are transparent PNGs. Transparent PNGs are not
+ # supported properly for IE 6.0, but are supported on all modern browsers.
+ #
+ # Note that when changing this option you need to delete any form_*.png files in
+ # the HTML output directory before the changes have effect.
+ # The default value is: YES.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ FORMULA_TRANSPARENT = YES
+
+ # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+ # http://www.mathjax.org) which uses client side Javascript for the rendering
+ # instead of using prerendered bitmaps. Use this if you do not have LaTeX
+ # installed or if you want to formulas look prettier in the HTML output. When
+ # enabled you may also need to install MathJax separately and configure the path
+ # to it using the MATHJAX_RELPATH option.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ USE_MATHJAX = NO
+
+ # When MathJax is enabled you can set the default output format to be used for
+ # the MathJax output. See the MathJax site (see:
+ # http://docs.mathjax.org/en/latest/output.html) for more details.
+ # Possible values are: HTML-CSS (which is slower, but has the best
+ # compatibility), NativeMML (i.e. MathML) and SVG.
+ # The default value is: HTML-CSS.
+ # This tag requires that the tag USE_MATHJAX is set to YES.
+
+ MATHJAX_FORMAT = HTML-CSS
+
+ # When MathJax is enabled you need to specify the location relative to the HTML
+ # output directory using the MATHJAX_RELPATH option. The destination directory
+ # should contain the MathJax.js script. For instance, if the mathjax directory
+ # is located at the same level as the HTML output directory, then
+ # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+ # Content Delivery Network so you can quickly see the result without installing
+ # MathJax. However, it is strongly recommended to install a local copy of
+ # MathJax from http://www.mathjax.org before deployment.
+ # The default value is: http://cdn.mathjax.org/mathjax/latest.
+ # This tag requires that the tag USE_MATHJAX is set to YES.
+
+ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
+
+ # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+ # extension names that should be enabled during MathJax rendering. For example
+ # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+ # This tag requires that the tag USE_MATHJAX is set to YES.
+
+ MATHJAX_EXTENSIONS =
+
+ # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+ # of code that will be used on startup of the MathJax code. See the MathJax site
+ # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+ # example see the documentation.
+ # This tag requires that the tag USE_MATHJAX is set to YES.
+
+ MATHJAX_CODEFILE =
+
+ # When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+ # the HTML output. The underlying search engine uses javascript and DHTML and
+ # should work on any modern browser. Note that when using HTML help
+ # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+ # there is already a search function so this one should typically be disabled.
+ # For large projects the javascript based search engine can be slow, then
+ # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+ # search using the keyboard; to jump to the search box use <access key> + S
+ # (what the <access key> is depends on the OS and browser, but it is typically
+ # <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+ # key> to jump into the search results window, the results can be navigated
+ # using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+ # the search. The filter options can be selected when the cursor is inside the
+ # search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+ # to select a filter and <Enter> or <escape> to activate or cancel the filter
+ # option.
+ # The default value is: YES.
+ # This tag requires that the tag GENERATE_HTML is set to YES.
+
+ SEARCHENGINE = NO
+
+ # When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+ # implemented using a web server instead of a web client using Javascript. There
+ # are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+ # setting. When disabled, doxygen will generate a PHP script for searching and
+ # an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+ # and searching needs to be provided by external tools. See the section
+ # "External Indexing and Searching" for details.
+ # The default value is: NO.
+ # This tag requires that the tag SEARCHENGINE is set to YES.
+
+ SERVER_BASED_SEARCH = NO
+
+ # When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+ # script for searching. Instead the search results are written to an XML file
+ # which needs to be processed by an external indexer. Doxygen will invoke an
+ # external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+ # search results.
+ #
+ # Doxygen ships with an example indexer ( doxyindexer) and search engine
+ # (doxysearch.cgi) which are based on the open source search engine library
+ # Xapian (see: http://xapian.org/).
+ #
+ # See the section "External Indexing and Searching" for details.
+ # The default value is: NO.
+ # This tag requires that the tag SEARCHENGINE is set to YES.
+
+ EXTERNAL_SEARCH = NO
+
+ # The SEARCHENGINE_URL should point to a search engine hosted by a web server
+ # which will return the search results when EXTERNAL_SEARCH is enabled.
+ #
+ # Doxygen ships with an example indexer ( doxyindexer) and search engine
+ # (doxysearch.cgi) which are based on the open source search engine library
+ # Xapian (see: http://xapian.org/). See the section "External Indexing and
+ # Searching" for details.
+ # This tag requires that the tag SEARCHENGINE is set to YES.
+
+ SEARCHENGINE_URL =
+
+ # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+ # search data is written to a file for indexing by an external tool. With the
+ # SEARCHDATA_FILE tag the name of this file can be specified.
+ # The default file is: searchdata.xml.
+ # This tag requires that the tag SEARCHENGINE is set to YES.
+
+ SEARCHDATA_FILE = searchdata.xml
+
+ # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+ # EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+ # useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+ # projects and redirect the results back to the right project.
+ # This tag requires that the tag SEARCHENGINE is set to YES.
+
+ EXTERNAL_SEARCH_ID =
+
+ # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+ # projects other than the one defined by this configuration file, but that are
+ # all added to the same external search index. Each project needs to have a
+ # unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+ # to a relative location where the documentation can be found. The format is:
+ # EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+ # This tag requires that the tag SEARCHENGINE is set to YES.
+
+ EXTRA_SEARCH_MAPPINGS =
+
+ #---------------------------------------------------------------------------
+ # Configuration options related to the LaTeX output
+ #---------------------------------------------------------------------------
+
+ # If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
+ # The default value is: YES.
+
+ GENERATE_LATEX = NO
+
+ # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+ # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+ # it.
+ # The default directory is: latex.
+ # This tag requires that the tag GENERATE_LATEX is set to YES.
+
+ LATEX_OUTPUT = latex
+
+ # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+ # invoked.
+ #
+ # Note that when enabling USE_PDFLATEX this option is only used for generating
+ # bitmaps for formulas in the HTML output, but not in the Makefile that is
+ # written to the output directory.
+ # The default file is: latex.
+ # This tag requires that the tag GENERATE_LATEX is set to YES.
+
+ LATEX_CMD_NAME = latex
+
+ # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+ # index for LaTeX.
+ # The default file is: makeindex.
+ # This tag requires that the tag GENERATE_LATEX is set to YES.
+
+ MAKEINDEX_CMD_NAME = makeindex
+
+ # If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
+ # documents. This may be useful for small projects and may help to save some
+ # trees in general.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_LATEX is set to YES.
+
+ COMPACT_LATEX = NO
+
+ # The PAPER_TYPE tag can be used to set the paper type that is used by the
+ # printer.
+ # Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+ # 14 inches) and executive (7.25 x 10.5 inches).
+ # The default value is: a4.
+ # This tag requires that the tag GENERATE_LATEX is set to YES.
+
+ PAPER_TYPE = a4wide
+
+ # The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+ # that should be included in the LaTeX output. To get the times font for
+ # instance you can specify
+ # EXTRA_PACKAGES=times
+ # If left blank no extra packages will be included.
+ # This tag requires that the tag GENERATE_LATEX is set to YES.
+
+ EXTRA_PACKAGES =
+
+ # The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+ # generated LaTeX document. The header should contain everything until the first
+ # chapter. If it is left blank doxygen will generate a standard header. See
+ # section "Doxygen usage" for information on how to let doxygen write the
+ # default header to a separate file.
+ #
+ # Note: Only use a user-defined header if you know what you are doing! The
+ # following commands have a special meaning inside the header: $title,
+ # $datetime, $date, $doxygenversion, $projectname, $projectnumber,
+ # $projectbrief, $projectlogo. Doxygen will replace $title with the empy string,
+ # for the replacement values of the other commands the user is refered to
+ # HTML_HEADER.
+ # This tag requires that the tag GENERATE_LATEX is set to YES.
+
+ LATEX_HEADER =
+
+ # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+ # generated LaTeX document. The footer should contain everything after the last
+ # chapter. If it is left blank doxygen will generate a standard footer. See
+ # LATEX_HEADER for more information on how to generate a default footer and what
+ # special commands can be used inside the footer.
+ #
+ # Note: Only use a user-defined footer if you know what you are doing!
+ # This tag requires that the tag GENERATE_LATEX is set to YES.
+
+ LATEX_FOOTER =
+
+ # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+ # other source files which should be copied to the LATEX_OUTPUT output
+ # directory. Note that the files will be copied as-is; there are no commands or
+ # markers available.
+ # This tag requires that the tag GENERATE_LATEX is set to YES.
+
+ LATEX_EXTRA_FILES =
+
+ # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+ # prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+ # contain links (just like the HTML output) instead of page references. This
+ # makes the output suitable for online browsing using a PDF viewer.
+ # The default value is: YES.
+ # This tag requires that the tag GENERATE_LATEX is set to YES.
+
+ PDF_HYPERLINKS = NO
+
+ # If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+ # the PDF file directly from the LaTeX files. Set this option to YES to get a
+ # higher quality PDF documentation.
+ # The default value is: YES.
+ # This tag requires that the tag GENERATE_LATEX is set to YES.
+
+ USE_PDFLATEX = NO
+
+ # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+ # command to the generated LaTeX files. This will instruct LaTeX to keep running
+ # if errors occur, instead of asking the user for help. This option is also used
+ # when generating formulas in HTML.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_LATEX is set to YES.
+
+ LATEX_BATCHMODE = NO
+
+ # If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+ # index chapters (such as File Index, Compound Index, etc.) in the output.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_LATEX is set to YES.
+
+ LATEX_HIDE_INDICES = NO
+
+ # If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+ # code with syntax highlighting in the LaTeX output.
+ #
+ # Note that which sources are shown also depends on other settings such as
+ # SOURCE_BROWSER.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_LATEX is set to YES.
+
+ LATEX_SOURCE_CODE = NO
+
+ # The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+ # bibliography, e.g. plainnat, or ieeetr. See
+ # http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+ # The default value is: plain.
+ # This tag requires that the tag GENERATE_LATEX is set to YES.
+
+ LATEX_BIB_STYLE = plain
+
+ #---------------------------------------------------------------------------
+ # Configuration options related to the RTF output
+ #---------------------------------------------------------------------------
+
+ # If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
+ # RTF output is optimized for Word 97 and may not look too pretty with other RTF
+ # readers/editors.
+ # The default value is: NO.
+
+ GENERATE_RTF = NO
+
+ # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+ # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+ # it.
+ # The default directory is: rtf.
+ # This tag requires that the tag GENERATE_RTF is set to YES.
+
+ RTF_OUTPUT = rtf
+
+ # If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
+ # documents. This may be useful for small projects and may help to save some
+ # trees in general.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_RTF is set to YES.
+
+ COMPACT_RTF = NO
+
+ # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+ # contain hyperlink fields. The RTF file will contain links (just like the HTML
+ # output) instead of page references. This makes the output suitable for online
+ # browsing using Word or some other Word compatible readers that support those
+ # fields.
+ #
+ # Note: WordPad (write) and others do not support links.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_RTF is set to YES.
+
+ RTF_HYPERLINKS = NO
+
+ # Load stylesheet definitions from file. Syntax is similar to doxygen's config
+ # file, i.e. a series of assignments. You only have to provide replacements,
+ # missing definitions are set to their default value.
+ #
+ # See also section "Doxygen usage" for information on how to generate the
+ # default style sheet that doxygen normally uses.
+ # This tag requires that the tag GENERATE_RTF is set to YES.
+
+ RTF_STYLESHEET_FILE =
+
+ # Set optional variables used in the generation of an RTF document. Syntax is
+ # similar to doxygen's config file. A template extensions file can be generated
+ # using doxygen -e rtf extensionFile.
+ # This tag requires that the tag GENERATE_RTF is set to YES.
+
+ RTF_EXTENSIONS_FILE =
+
+ #---------------------------------------------------------------------------
+ # Configuration options related to the man page output
+ #---------------------------------------------------------------------------
+
+ # If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
+ # classes and files.
+ # The default value is: NO.
+
+ GENERATE_MAN = NO
+
+ # The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+ # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+ # it. A directory man3 will be created inside the directory specified by
+ # MAN_OUTPUT.
+ # The default directory is: man.
+ # This tag requires that the tag GENERATE_MAN is set to YES.
+
+ MAN_OUTPUT = man
+
+ # The MAN_EXTENSION tag determines the extension that is added to the generated
+ # man pages. In case the manual section does not start with a number, the number
+ # 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+ # optional.
+ # The default value is: .3.
+ # This tag requires that the tag GENERATE_MAN is set to YES.
+
+ MAN_EXTENSION = .3
+
+ # The MAN_SUBDIR tag determines the name of the directory created within
+ # MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+ # MAN_EXTENSION with the initial . removed.
+ # This tag requires that the tag GENERATE_MAN is set to YES.
+
+ MAN_SUBDIR =
+
+ # If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+ # will generate one additional man file for each entity documented in the real
+ # man page(s). These additional files only source the real man page, but without
+ # them the man command would be unable to find the correct page.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_MAN is set to YES.
+
+ MAN_LINKS = NO
+
+ #---------------------------------------------------------------------------
+ # Configuration options related to the XML output
+ #---------------------------------------------------------------------------
+
+ # If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
+ # captures the structure of the code including all documentation.
+ # The default value is: NO.
+
+ GENERATE_XML = NO
+
+ # The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+ # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+ # it.
+ # The default directory is: xml.
+ # This tag requires that the tag GENERATE_XML is set to YES.
+
+ XML_OUTPUT = xml
+
+ # If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
+ # listings (including syntax highlighting and cross-referencing information) to
+ # the XML output. Note that enabling this will significantly increase the size
+ # of the XML output.
+ # The default value is: YES.
+ # This tag requires that the tag GENERATE_XML is set to YES.
+
+ XML_PROGRAMLISTING = YES
+
+ #---------------------------------------------------------------------------
+ # Configuration options related to the DOCBOOK output
+ #---------------------------------------------------------------------------
+
+ # If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
+ # that can be used to generate PDF.
+ # The default value is: NO.
+
+ GENERATE_DOCBOOK = NO
+
+ # The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+ # If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+ # front of it.
+ # The default directory is: docbook.
+ # This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+ DOCBOOK_OUTPUT = docbook
+
+ # If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the
+ # program listings (including syntax highlighting and cross-referencing
+ # information) to the DOCBOOK output. Note that enabling this will significantly
+ # increase the size of the DOCBOOK output.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+ DOCBOOK_PROGRAMLISTING = NO
+
+ #---------------------------------------------------------------------------
+ # Configuration options for the AutoGen Definitions output
+ #---------------------------------------------------------------------------
+
+ # If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
+ # Definitions (see http://autogen.sf.net) file that captures the structure of
+ # the code including all documentation. Note that this feature is still
+ # experimental and incomplete at the moment.
+ # The default value is: NO.
+
+ GENERATE_AUTOGEN_DEF = NO
+
+ #---------------------------------------------------------------------------
+ # Configuration options related to the Perl module output
+ #---------------------------------------------------------------------------
+
+ # If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
+ # file that captures the structure of the code including all documentation.
+ #
+ # Note that this feature is still experimental and incomplete at the moment.
+ # The default value is: NO.
+
+ GENERATE_PERLMOD = NO
+
+ # If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
+ # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+ # output from the Perl module output.
+ # The default value is: NO.
+ # This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+ PERLMOD_LATEX = NO
+
+ # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
+ # formatted so it can be parsed by a human reader. This is useful if you want to
+ # understand what is going on. On the other hand, if this tag is set to NO the
+ # size of the Perl module output will be much smaller and Perl will parse it
+ # just the same.
+ # The default value is: YES.
+ # This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+ PERLMOD_PRETTY = YES
+
+ # The names of the make variables in the generated doxyrules.make file are
+ # prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+ # so different doxyrules.make files included by the same Makefile don't
+ # overwrite each other's variables.
+ # This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+ PERLMOD_MAKEVAR_PREFIX =
+
+ #---------------------------------------------------------------------------
+ # Configuration options related to the preprocessor
+ #---------------------------------------------------------------------------
+
+ # If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
+ # C-preprocessor directives found in the sources and include files.
+ # The default value is: YES.
+
+ ENABLE_PREPROCESSING = YES
+
+ # If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
+ # in the source code. If set to NO only conditional compilation will be
+ # performed. Macro expansion can be done in a controlled way by setting
+ # EXPAND_ONLY_PREDEF to YES.
+ # The default value is: NO.
+ # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+ MACRO_EXPANSION = NO
+
+ # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+ # the macro expansion is limited to the macros specified with the PREDEFINED and
+ # EXPAND_AS_DEFINED tags.
+ # The default value is: NO.
+ # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+ EXPAND_ONLY_PREDEF = NO
+
+ # If the SEARCH_INCLUDES tag is set to YES the includes files in the
+ # INCLUDE_PATH will be searched if a #include is found.
+ # The default value is: YES.
+ # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+ SEARCH_INCLUDES = YES
+
+ # The INCLUDE_PATH tag can be used to specify one or more directories that
+ # contain include files that are not input files but should be processed by the
+ # preprocessor.
+ # This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+ INCLUDE_PATH =
+
+ # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+ # patterns (like *.h and *.hpp) to filter out the header-files in the
+ # directories. If left blank, the patterns specified with FILE_PATTERNS will be
+ # used.
+ # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+ INCLUDE_FILE_PATTERNS =
+
+ # The PREDEFINED tag can be used to specify one or more macro names that are
+ # defined before the preprocessor is started (similar to the -D option of e.g.
+ # gcc). The argument of the tag is a list of macros of the form: name or
+ # name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+ # is assumed. To prevent a macro definition from being undefined via #undef or
+ # recursively expanded use the := operator instead of the = operator.
+ # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+ PREDEFINED = gtk \
+ WITH_THEME_INSTALL
+
+ # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+ # tag can be used to specify a list of macro names that should be expanded. The
+ # macro definition that is found in the sources will be used. Use the PREDEFINED
+ # tag if you want to use a different macro definition that overrules the
+ # definition found in the source code.
+ # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+ EXPAND_AS_DEFINED =
+
+ # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+ # remove all references to function-like macros that are alone on a line, have
+ # an all uppercase name, and do not end with a semicolon. Such function macros
+ # are typically used for boiler-plate code, and will confuse the parser if not
+ # removed.
+ # The default value is: YES.
+ # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+ SKIP_FUNCTION_MACROS = YES
+
+ #---------------------------------------------------------------------------
+ # Configuration options related to external references
+ #---------------------------------------------------------------------------
+
+ # The TAGFILES tag can be used to specify one or more tag files. For each tag
+ # file the location of the external documentation should be added. The format of
+ # a tag file without this location is as follows:
+ # TAGFILES = file1 file2 ...
+ # Adding location for the tag files is done as follows:
+ # TAGFILES = file1=loc1 "file2 = loc2" ...
+ # where loc1 and loc2 can be relative or absolute paths or URLs. See the
+ # section "Linking to external documentation" for more information about the use
+ # of tag files.
+ # Note: Each tag file must have a unique name (where the name does NOT include
+ # the path). If a tag file is not located in the directory in which doxygen is
+ # run, you must also specify the path to the tagfile here.
+
+ TAGFILES =
+
+ # When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+ # tag file that is based on the input files it reads. See section "Linking to
+ # external documentation" for more information about the usage of tag files.
+
+ GENERATE_TAGFILE =
+
+ # If the ALLEXTERNALS tag is set to YES all external class will be listed in the
+ # class index. If set to NO only the inherited external classes will be listed.
+ # The default value is: NO.
+
+ ALLEXTERNALS = NO
+
+ # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
+ # the modules index. If set to NO, only the current project's groups will be
+ # listed.
+ # The default value is: YES.
+
+ EXTERNAL_GROUPS = YES
+
+ # If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
+ # the related pages index. If set to NO, only the current project's pages will
+ # be listed.
+ # The default value is: YES.
+
+ EXTERNAL_PAGES = YES
+
+ # The PERL_PATH should be the absolute path and name of the perl script
+ # interpreter (i.e. the result of 'which perl').
+ # The default file (with absolute path) is: /usr/bin/perl.
+
+ PERL_PATH = /usr/bin/perl
+
+ #---------------------------------------------------------------------------
+ # Configuration options related to the dot tool
+ #---------------------------------------------------------------------------
+
+ # If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
+ # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+ # NO turns the diagrams off. Note that this option also works with HAVE_DOT
+ # disabled, but it is recommended to install and use dot, since it yields more
+ # powerful graphs.
+ # The default value is: YES.
+
+ CLASS_DIAGRAMS = YES
+
+ # You can define message sequence charts within doxygen comments using the \msc
+ # command. Doxygen will then run the mscgen tool (see:
+ # http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+ # documentation. The MSCGEN_PATH tag allows you to specify the directory where
+ # the mscgen tool resides. If left empty the tool is assumed to be found in the
+ # default search path.
+
+ MSCGEN_PATH =
+
+ # You can include diagrams made with dia in doxygen documentation. Doxygen will
+ # then run dia to produce the diagram and insert it in the documentation. The
+ # DIA_PATH tag allows you to specify the directory where the dia binary resides.
+ # If left empty dia is assumed to be found in the default search path.
+
+ DIA_PATH =
+
+ # If set to YES, the inheritance and collaboration graphs will hide inheritance
+ # and usage relations if the target is undocumented or is not a class.
+ # The default value is: YES.
+
+ HIDE_UNDOC_RELATIONS = YES
+
+ # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+ # available from the path. This tool is part of Graphviz (see:
+ # http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+ # Bell Labs. The other options in this section have no effect if this option is
+ # set to NO
+ # The default value is: YES.
+
+ HAVE_DOT = YES
+
+ # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+ # to run in parallel. When set to 0 doxygen will base this on the number of
+ # processors available in the system. You can set it explicitly to a value
+ # larger than 0 to get control over the balance between CPU load and processing
+ # speed.
+ # Minimum value: 0, maximum value: 32, default value: 0.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ DOT_NUM_THREADS = 0
+
+ # When you want a differently looking font in the dot files that doxygen
+ # generates you can specify the font name using DOT_FONTNAME. You need to make
+ # sure dot is able to find the font, which can be done by putting it in a
+ # standard location or by setting the DOTFONTPATH environment variable or by
+ # setting DOT_FONTPATH to the directory containing the font.
+ # The default value is: Helvetica.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ DOT_FONTNAME = Helvetica
+
+ # The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+ # dot graphs.
+ # Minimum value: 4, maximum value: 24, default value: 10.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ DOT_FONTSIZE = 10
+
+ # By default doxygen will tell dot to use the default font as specified with
+ # DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+ # the path where dot can find it using this tag.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ DOT_FONTPATH =
+
+ # If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+ # each documented class showing the direct and indirect inheritance relations.
+ # Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+ # The default value is: YES.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ CLASS_GRAPH = YES
+
+ # If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+ # graph for each documented class showing the direct and indirect implementation
+ # dependencies (inheritance, containment, and class references variables) of the
+ # class with other documented classes.
+ # The default value is: YES.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ COLLABORATION_GRAPH = YES
+
+ # If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+ # groups, showing the direct groups dependencies.
+ # The default value is: YES.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ GROUP_GRAPHS = YES
+
+ # If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+ # collaboration diagrams in a style similar to the OMG's Unified Modeling
+ # Language.
+ # The default value is: NO.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ UML_LOOK = NO
+
+ # If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+ # class node. If there are many fields or methods and many nodes the graph may
+ # become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+ # number of items for each type to make the size more manageable. Set this to 0
+ # for no limit. Note that the threshold may be exceeded by 50% before the limit
+ # is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+ # but if the number exceeds 15, the total amount of fields shown is limited to
+ # 10.
+ # Minimum value: 0, maximum value: 100, default value: 10.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ UML_LIMIT_NUM_FIELDS = 10
+
+ # If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+ # collaboration graphs will show the relations between templates and their
+ # instances.
+ # The default value is: NO.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ TEMPLATE_RELATIONS = NO
+
+ # If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+ # YES then doxygen will generate a graph for each documented file showing the
+ # direct and indirect include dependencies of the file with other documented
+ # files.
+ # The default value is: YES.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ INCLUDE_GRAPH = YES
+
+ # If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+ # set to YES then doxygen will generate a graph for each documented file showing
+ # the direct and indirect include dependencies of the file with other documented
+ # files.
+ # The default value is: YES.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ INCLUDED_BY_GRAPH = YES
+
+ # If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+ # dependency graph for every global function or class method.
+ #
+ # Note that enabling this option will significantly increase the time of a run.
+ # So in most cases it will be better to enable call graphs for selected
+ # functions only using the \callgraph command.
+ # The default value is: NO.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ CALL_GRAPH = YES
+
+ # If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+ # dependency graph for every global function or class method.
+ #
+ # Note that enabling this option will significantly increase the time of a run.
+ # So in most cases it will be better to enable caller graphs for selected
+ # functions only using the \callergraph command.
+ # The default value is: NO.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ CALLER_GRAPH = YES
+
+ # If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+ # hierarchy of all classes instead of a textual one.
+ # The default value is: YES.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ GRAPHICAL_HIERARCHY = YES
+
+ # If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+ # dependencies a directory has on other directories in a graphical way. The
+ # dependency relations are determined by the #include relations between the
+ # files in the directories.
+ # The default value is: YES.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ DIRECTORY_GRAPH = YES
+
+ # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+ # generated by dot.
+ # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+ # to make the SVG files visible in IE 9+ (other browsers do not have this
+ # requirement).
+ # Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
+ # png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
+ # gif:cairo:gd, gif:gd, gif:gd:gd and svg.
+ # The default value is: png.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ DOT_IMAGE_FORMAT = svg
+
+ # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+ # enable generation of interactive SVG images that allow zooming and panning.
+ #
+ # Note that this requires a modern browser other than Internet Explorer. Tested
+ # and working are Firefox, Chrome, Safari, and Opera.
+ # Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+ # the SVG files visible. Older versions of IE do not have SVG support.
+ # The default value is: NO.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ INTERACTIVE_SVG = YES
+
+ # The DOT_PATH tag can be used to specify the path where the dot tool can be
+ # found. If left blank, it is assumed the dot tool can be found in the path.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ DOT_PATH =
+
+ # The DOTFILE_DIRS tag can be used to specify one or more directories that
+ # contain dot files that are included in the documentation (see the \dotfile
+ # command).
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ DOTFILE_DIRS =
+
+ # The MSCFILE_DIRS tag can be used to specify one or more directories that
+ # contain msc files that are included in the documentation (see the \mscfile
+ # command).
+
+ MSCFILE_DIRS =
+
+ # The DIAFILE_DIRS tag can be used to specify one or more directories that
+ # contain dia files that are included in the documentation (see the \diafile
+ # command).
+
+ DIAFILE_DIRS =
+
+ # When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+ # path where java can find the plantuml.jar file. If left blank, it is assumed
+ # PlantUML is not used or called during a preprocessing step. Doxygen will
+ # generate a warning when it encounters a \startuml command in this case and
+ # will not generate output for the diagram.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ PLANTUML_JAR_PATH =
+
+ # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+ # that will be shown in the graph. If the number of nodes in a graph becomes
+ # larger than this value, doxygen will truncate the graph, which is visualized
+ # by representing a node as a red box. Note that doxygen if the number of direct
+ # children of the root node in a graph is already larger than
+ # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+ # the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+ # Minimum value: 0, maximum value: 10000, default value: 50.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ DOT_GRAPH_MAX_NODES = 400
+
+ # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+ # generated by dot. A depth value of 3 means that only nodes reachable from the
+ # root by following a path via at most 3 edges will be shown. Nodes that lay
+ # further from the root node will be omitted. Note that setting this option to 1
+ # or 2 may greatly reduce the computation time needed for large code bases. Also
+ # note that the size of a graph can be further restricted by
+ # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+ # Minimum value: 0, maximum value: 1000, default value: 0.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ MAX_DOT_GRAPH_DEPTH = 0
+
+ # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+ # background. This is disabled by default, because dot on Windows does not seem
+ # to support this out of the box.
+ #
+ # Warning: Depending on the platform used, enabling this option may lead to
+ # badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+ # read).
+ # The default value is: NO.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ DOT_TRANSPARENT = NO
+
+ # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+ # files in one run (i.e. multiple -o and -T options on the command line). This
+ # makes dot run faster, but since only newer versions of dot (>1.8.10) support
+ # this, this feature is disabled by default.
+ # The default value is: NO.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ DOT_MULTI_TARGETS = YES
+
+ # If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+ # explaining the meaning of the various boxes and arrows in the dot generated
+ # graphs.
+ # The default value is: YES.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ GENERATE_LEGEND = YES
+
+ # If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
+ # files that are used to generate the various graphs.
+ # The default value is: YES.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+ DOT_CLEANUP = YES
-----------------------------------------------------------------------
Summary of changes:
Docs/JavaScript | 16 -
Docs/QUICK-START | 108 -
Docs/USING-Monkey | 318 -
Docs/core-window-interface | 679 --
Makefile | 2 +-
content/urldb.c | 6 +-
desktop/browser.c | 2 +-
desktop/browser_history.c | 352 +-
desktop/browser_history.h | 142 +-
desktop/browser_private.h | 95 +-
desktop/local_history.c | 341 +-
desktop/local_history.h | 62 +-
desktop/scrollbar.h | 10 +-
{Docs => docs}/Doxyfile | 13 +-
{Docs => docs}/PACKAGING-GTK | 0
{Docs => docs}/UnimplementedJavascript.txt | 0
.../building-AmigaCross.md | 0
Docs/BUILDING-AmigaOS => docs/building-AmigaOS.md | 0
.../building-Framebuffer.md | 0
Docs/BUILDING-GTK => docs/building-GTK.md | 0
Docs/BUILDING-BeOS => docs/building-Haiku.md | 0
Docs/BUILDING-Windows => docs/building-Windows.md | 0
docs/core-window-interface.md | 677 ++
{Docs => docs}/env.sh | 4 +-
{Docs => docs}/gource.sh | 0
{Docs => docs}/ideas/cache.txt | 0
{Docs => docs}/ideas/css-engine.txt | 0
{Docs => docs}/ideas/render-library.txt | 0
docs/mainpage.md | 93 +
{Docs => docs}/netsurf-fb.1 | 0
{Docs => docs}/netsurf-gtk.1 | 0
Docs/LIBRARIES => docs/netsurf-libraries.md | 0
Docs/Options => docs/netsurf-options.md | 0
docs/quick-start.md | 111 +
.../source-object-backing-store.md | 0
{Docs => docs}/unit-testing | 0
{Docs => docs}/updating-duktape.md | 10 +-
.../USING-Framebuffer => docs/using-framebuffer.md | 0
docs/using-monkey.md | 373 ++
frontends/amiga/corewindow.c | 3 +-
frontends/amiga/gui.c | 11 +-
frontends/amiga/gui.h | 7 +-
frontends/amiga/gui_menu.c | 2 +-
frontends/amiga/history_local.c | 519 +-
frontends/amiga/history_local.h | 23 +-
frontends/amiga/os3support.c | 2 +-
frontends/cocoa/HistoryView.h | 10 +-
frontends/cocoa/HistoryView.m | 146 +-
frontends/cocoa/LocalHistoryController.m | 2 +-
frontends/framebuffer/Makefile | 2 +-
frontends/framebuffer/corewindow.c | 262 +
frontends/framebuffer/corewindow.h | 107 +
frontends/framebuffer/framebuffer.c | 5 +-
frontends/framebuffer/gui.c | 4 +-
frontends/framebuffer/gui.h | 18 -
frontends/{gtk => framebuffer}/local_history.c | 133 +-
frontends/{gtk => framebuffer}/local_history.h | 14 +-
frontends/framebuffer/localhistory.c | 144 -
frontends/gtk/bitmap.c | 4 +-
frontends/gtk/cookies.c | 2 +-
frontends/gtk/corewindow.c | 3 +-
frontends/gtk/corewindow.h | 2 +-
frontends/gtk/global_history.c | 2 +-
frontends/gtk/hotlist.c | 2 +-
frontends/gtk/local_history.c | 4 +-
frontends/gtk/window.c | 2 +-
frontends/monkey/401login.c | 32 +-
frontends/monkey/bitmap.c | 112 +-
frontends/monkey/browser.c | 516 +-
frontends/monkey/browser.h | 14 +-
frontends/monkey/cert.c | 32 +-
frontends/monkey/dispatch.c | 110 +-
frontends/monkey/download.c | 46 +-
frontends/monkey/farmer.py | 363 ++
frontends/monkey/fetch.c | 12 +-
frontends/monkey/layout.c | 62 +-
frontends/monkey/main.c | 483 +-
frontends/monkey/plot.c | 54 +-
frontends/monkey/schedule.c | 281 +-
frontends/riscos/cookies.c | 2 +-
frontends/riscos/corewindow.c | 1 +
frontends/riscos/dialog.c | 1 +
frontends/riscos/global_history.c | 2 +-
frontends/riscos/gui.h | 29 -
frontends/riscos/hotlist.c | 2 +-
frontends/riscos/local_history.c | 15 +-
frontends/riscos/save.c | 1 +
frontends/riscos/textselection.c | 1 +
frontends/riscos/url_complete.c | 1 +
frontends/riscos/window.c | 6465 ++++++++++----------
frontends/riscos/window.h | 193 +
frontends/windows/cookies.c | 2 +-
frontends/windows/corewindow.c | 55 +-
frontends/windows/corewindow.h | 2 +-
frontends/windows/global_history.c | 2 +-
frontends/windows/hotlist.c | 2 +-
frontends/windows/local_history.c | 8 +-
render/html.c | 20 +-
98 files changed, 7240 insertions(+), 6530 deletions(-)
delete mode 100644 Docs/JavaScript
delete mode 100644 Docs/QUICK-START
delete mode 100644 Docs/USING-Monkey
delete mode 100644 Docs/core-window-interface
rename {Docs => docs}/Doxyfile (99%)
rename {Docs => docs}/PACKAGING-GTK (100%)
rename {Docs => docs}/UnimplementedJavascript.txt (100%)
rename Docs/BUILDING-AmigaCross => docs/building-AmigaCross.md (100%)
rename Docs/BUILDING-AmigaOS => docs/building-AmigaOS.md (100%)
rename Docs/BUILDING-Framebuffer => docs/building-Framebuffer.md (100%)
rename Docs/BUILDING-GTK => docs/building-GTK.md (100%)
rename Docs/BUILDING-BeOS => docs/building-Haiku.md (100%)
rename Docs/BUILDING-Windows => docs/building-Windows.md (100%)
create mode 100644 docs/core-window-interface.md
rename {Docs => docs}/env.sh (98%)
rename {Docs => docs}/gource.sh (100%)
rename {Docs => docs}/ideas/cache.txt (100%)
rename {Docs => docs}/ideas/css-engine.txt (100%)
rename {Docs => docs}/ideas/render-library.txt (100%)
create mode 100644 docs/mainpage.md
rename {Docs => docs}/netsurf-fb.1 (100%)
rename {Docs => docs}/netsurf-gtk.1 (100%)
rename Docs/LIBRARIES => docs/netsurf-libraries.md (100%)
rename Docs/Options => docs/netsurf-options.md (100%)
create mode 100644 docs/quick-start.md
rename Docs/source-object-backing-store => docs/source-object-backing-store.md (100%)
rename {Docs => docs}/unit-testing (100%)
rename {Docs => docs}/updating-duktape.md (72%)
rename Docs/USING-Framebuffer => docs/using-framebuffer.md (100%)
create mode 100644 docs/using-monkey.md
mode change 100755 => 100644 frontends/amiga/history_local.c
mode change 100755 => 100644 frontends/amiga/history_local.h
create mode 100644 frontends/framebuffer/corewindow.c
create mode 100644 frontends/framebuffer/corewindow.h
copy frontends/{gtk => framebuffer}/local_history.c (55%)
copy frontends/{gtk => framebuffer}/local_history.h (76%)
delete mode 100644 frontends/framebuffer/localhistory.c
create mode 100644 frontends/monkey/farmer.py
diff --git a/Docs/JavaScript b/Docs/JavaScript
deleted file mode 100644
index ced2fbe..0000000
--- a/Docs/JavaScript
+++ /dev/null
@@ -1,16 +0,0 @@
---------------------------------------------------------------------------------
- NetSurf: JavaScript 8 April 2013
---------------------------------------------------------------------------------
-
- NetSurf may be built with primitive support for JavaScript.
-
- | Note: NetSurf's JavaScript handling is currently:
- |
- | * incomplete,
- | * unsupported,
- | * disabled by default.
-
- To test it, you may build NetSurf with JavaScript and ensure NetSurf's
- "enable_javascript" run-time configuration option is set to "1". To do this
- you may set the option in the frontend's settings GUI, create/edit a Choices
- file, or pass --enable_javascript=1 to the executable.
diff --git a/Docs/QUICK-START b/Docs/QUICK-START
deleted file mode 100644
index 9ff3fb5..0000000
--- a/Docs/QUICK-START
+++ /dev/null
@@ -1,108 +0,0 @@
---------------------------------------------------------------------------------
- Quick Build Steps for NetSurf 24 February 2015
---------------------------------------------------------------------------------
-
- This document provides steps for building NetSurf.
-
-
- Grab a temporary env.sh
---------------------------
-
- $ wget http://git.netsurf-browser.org/netsurf.git/plain/Docs/env.sh
- $ source env.sh
-
-
- Install any packages you need
--------------------------------
-
- Installs all packages required to build NetSurf and the NetSurf project
- libraries.
-
- $ ns-package-install
-
- If your package manager is not supported, you will have to install third
- party packages manually.
-
-
- Get the NetSurf project source code from Git
-----------------------------------------------
-
- $ ns-clone
-
-
- Build and install our project libraries
------------------------------------------
-
- Updates NetSurf project library sources to latest, builds and installs them.
-
- $ ns-pull-install
-
-
- Switch to new NetSurf workspace
----------------------------------
-
- $ rm env.sh
- $ cd ~/dev-netsurf/workspace
- $ source env.sh
-
-
- Build and run NetSurf
------------------------
-
- $ cd netsurf
-
- To build the native front end (the GTK front end on Linux, BSDs, etc) you
- could do:
-
- $ make
- $ ./nsgtk
-
- To build the framebuffer front end, you could do:
-
- $ make TARGET=framebuffer
- $ ./nsfb
-
-
- Cross Compiling
-=================
-
- If you are cross compiling, you can follow the above steps, but when sourcing
- env.sh, you should set TARGET_ABI to the appropriate triplet for your cross
- compiler. For example, to cross compile for RISC OS:
-
- $ TARGET_ABI=arm-unknown-riscos source env.sh
-
- After that, the commands such as `ns-package-install` and `ns-pull-install`
- will do what is appropriate for the platform you are building for.
-
- To do the final build of NetSurf, pass the appropriate TARGET to make. For
- example, to cross compile for RISC OS:
-
- $ make TARGET=riscos
-
- Finally, you can package up your build to transfer to the system you are
- developing for. For example, to produce a package for RISC OS:
-
- $ make TARGET=riscos package
-
- Getting a cross compiler set up
----------------------------------
-
- We maintain cross compilation environments and an SDK for a number of
- platforms. These may be found in our toolchains repository.
-
- $ git clone git://git.netsurf-browser.org/toolchains
-
- Pre-built versions of the toolchains for Debian systems are often available
- via our automated build and test infrastructure:
-
- http://ci.netsurf-browser.org/builds/toolchains/
-
-
- Not working?
-==============
-
- If the above steps are inapplicable, or don't work, you can build manually.
- Follow the instructions in the BUILDING-* documents in the Docs/ directory
- the NetSurf browser source tree.
-
diff --git a/Docs/USING-Monkey b/Docs/USING-Monkey
deleted file mode 100644
index 33e5042..0000000
--- a/Docs/USING-Monkey
+++ /dev/null
@@ -1,318 +0,0 @@
---------------------------------------------------------------------------------
- Usage Instructions for Monkey NetSurf 13 March 2011
---------------------------------------------------------------------------------
-
- This document provides usage instructions for the Monkey version of
- NetSurf.
-
- Monkey NetSurf has been tested on Ubuntu.
-
-Overview
-========
-
- What it is
- ----------
-
- The NetSurf Monkey front end is a developer debug tool used to
- test how the core interacts with the user interface. It allows
- the developers to profile NetSurf and to interact with the core
- directly as though the developer were a front end.
-
- What it is not
- --------------
-
- Monkey is not a tool for building web-crawling robots or indeed
- anything other than a debug tool for the NetSurf developers.
-
- How to interact with nsmonkey
- -----------------------------
-
- In brief, monkey will produce tagged output on stdout and expect
- commands on stdin. Windows are numbered and for the most part
- tokens are space separated. In some cases (e.g. title or status)
- the final element on the output line is a string which might have
- spaces embedded within it. As such, output from nsmonkey should be
- parsed a token at a time, so that when such a string is encountered,
- the parser can stop splitting and return the rest.
-
- Commands to Monkey are namespaced. For example commands related to
- browser windows are prefixed by WINDOW.
-
- Top level tags for nsmonkey
- ---------------------------
-
- QUIT
-
- WINDOW
-
- Top level response tags for nsmonkey
- ------------------------------------
-
- GENERIC
-
- WARN, ERROR, DIE
-
- WINDOW
-
- DOWNLOAD_WINDOW
-
- SSLCERT
-
- 401LOGIN
-
- PLOT
-
- In the below, %something% indicates a substitution made by Monkey.
-
- %url% will be a URL
- %id% will be an opaque ID
- %n% will be a number
- %bool% will be TRUE or FALSE
- %str% is a string and will only ever be at the end of an output line.
-
- Warnings, errors etc
- --------------------
-
- Warnings (tagged WARN) come from the NetSurf core.
- Errors (tagged ERROR) tend to come from Monkey's parsers
- Death (tagged DIE) comes from the core and kills Monkey dead.
-
-Commands
-========
-
- Generic commands
- ----------------
-
- QUIT
- Cause monkey to quit cleanly.
- This will cleanly destroy open windows etc.
-
- Window commands
- ---------------
-
- WINDOW NEW [%url%]
- Create a new browser window, optionally giving the core
- a URL to immediately navigate to.
- Minimally you will receive a WINDOW NEW WIN %id% response.
-
- WINDOW DESTROY %id%
- Destroy the given browser window.
- Minimally you will recieve a WINDOW DESTROY WIN %id% response.
-
- WINDOW GO %id% %url% [%url%]
- Cause the given browser window to visit the given URL.
- Optionally you can give a referrer URL to also use (simulating
- a click in the browser on a link).
- Minimally you can expect throbber, url etc responses.
-
- WINDOW REDRAW %id% [%num% %num% %num% %num%]
- Cause a browser window to redraw. Optionally you can give a
- set of coordinates to simulate a partial expose of the window.
- Said coordinates are in traditional X0 Y0 X1 Y1 order.
- The coordinates are in canvas, not window, coordinates. So you
- should take into account the scroll offsets when issuing this
- command.
- Minimally you can expect redraw start/stop messages and you
- can likely expect some number of PLOT results.
-
- WINDOW RELOAD %id%
- Cause a browser window to reload its current content.
- Expect responses similar to a GO command.
-
-
-Responses
-=========
-
- Generic messages
- ----------------
-
- GENERIC STARTED
- Monkey has started and is ready for commands
-
- GENERIC CLOSING_DOWN
- Monkey has been told to shut down and is doing so
-
- GENERIC FINISHED
- Monkey has finished and will now exit
-
- GENERIC LAUNCH URL %url%
- The core asked monkey to launch the given URL
-
- GENERIC THUMBNAIL URL %url%
- The core asked monkey to thumbnail a content without
- a window.
-
- GENERIC POLL BLOCKING
- Monkey reached a point where it could sleep waiting for
- commands or scheduled timeouts. No fetches nor redraws
- were pending.
-
- Window messages
- ---------------
-
- WINDOW NEW WIN %id% FOR %id% CLONE %id% NEWTAB %bool%
- The core asked Monkey to open a new window. The IDs for 'FOR' and
- 'CLONE' are core window IDs, the WIN id is a Monkey window ID.
-
- WINDOW SIZE WIN %id% WIDTH %n% HEIGHT %n%
- The window specified has been set to the shown width and height.
-
- WINDOW DESTROY WIN %id%
- The core has instructed Monkey to destroy the named window.
-
- WINDOW TITLE WIN %id% STR %str%
- The core supplied a titlebar title for the given window.
-
- WINDOW REDRAW WIN %id%
- The core asked that Monkey redraw the given window.
-
- WINDOW GET_DIMENSIONS WIN %id% WIDTH %n% HEIGHT %n%
- The core asked Monkey what the dimensions of the window are.
- Monkey has to respond immediately and returned the supplied width
- and height values to the core.
-
- WINDOW NEW_CONTENT WIN %id%
- The core has informed Monkey that the named window has a new
- content object.
-
- WINDOW NEW_ICON WIN %id%
- The core has informed Monkey that the named window hsa a new
- icon (favicon) available.
-
- WINDOW START_THROBBER WIN %id%
- The core asked Monkey to start the throbber for the named
- window. This indicates to the user that the window is busy.
-
- WINDOW STOP_THROBBER WIN %id%
- The core asked Monkey to stop the throbber for the named
- window. This indicates to the user that the window is finished.
-
- WINDOW SET_SCROLL WIN %id% X %n% Y %n%
- The core asked Monkey to set the named window's scroll offsets
- to the given X and Y position.
-
- WINDOW UPDATE_BOX WIN %id% X %n% Y %n% WIDTH %n% HEIGHT %n%
- The core asked Monkey to redraw the given portion of the content
- display. Note these coordinates refer to the content, not the
- viewport which Monkey is simulating.
-
- WINDOW UPDATE_EXTENT WIN %id% WIDTH %n% HEIGHT %n%
- The core has told us that the content in the given window has a
- total width and height as shown. This allows us (along with the
- window's width and height) to know the scroll limits.
-
- WINDOW SET_STATUS WIN %id% STR %str%
- The core has told us that the given window needs its status bar
- updating with the given message.
-
- WINDOW SET_POINTER WIN %id% POINTER %id%
- The core has told us to update the mouse pointer for the given
- window to the given pointer ID.
-
- WINDOW SET_SCALE WIN %id% SCALE %n%
- The core has asked us to scale the given window by the given scale
- factor.
-
- WINDOW SET_URL WIN %id% URL %url%
- The core has informed us that the given window's URL bar needs
- updating to the given url.
-
- WINDOW GET_SCROLL WIN %id% X %n% Y %n%
- The core asked Monkey for the scroll offsets. Monkey returned the
- numbers shown for the window named.
-
- WINDOW SCROLL_START WIN %id%
- The core asked Monkey to scroll the named window to the top/left.
-
- WINDOW POSITION_FRAME WIN %id% X0 %n% Y0 %n% X1 %n% Y1 %n%
- The core asked Monkey to position the named window as a frame at
- the given coordinates of its parent.
-
- WINDOW SCROLL_VISIBLE WIN %id% X0 %n% Y0 %n% X1 %n% Y1 %n%
- The core asked Monkey to scroll the named window until the
- indicated box is visible.
-
- WINDOW PLACE_CARET WIN %id% X %n% Y %n% HEIGHT %n%
- The core asked Monkey to render a caret in the named window at the
- indicated position with the indicated height.
-
- WINDOW REMOVE_CARET WIN %id%
- The core asked Monkey to remove any caret in the named window.
-
- WINDOW SCROLL_START WIN %id% X0 %n% Y0 %n% X1 %n% Y1 %n%
- The core asked Monkey to scroll the named window to the start of
- the given box.
-
- WINDOW SELECT_MENU WIN %id%
- The core asked Monkey to produce a selection menu for the named
- window.
-
- WINDOW SAVE_LINK WIN %id% URL %url% TITLE %str%
- The core asked Monkey to save a link from the given window with
- the given URL and anchor title.
-
- WINDOW THUMBNAIL WIN %id% URL %url%
- The core asked Monkey to render a thumbnail for the given window
- which is currently at the given URL.
-
- WINDOW REDRAW WIN %id% START
- WINDOW REDRAW WIN %id% STOP
- The core wraps redraws in these messages. Thus PLOT responses can
- be allocated to the appropriate window.
-
- Download window messages
- ------------------------
-
- DOWNLOAD_WINDOW CREATE DWIN %id% WIN %id%
- The core asked Monkey to create a download window owned by the
- given browser window.
-
- DOWNLOAD_WINDOW DATA DWIN %id% SIZE %n% DATA %str%
- The core asked Monkey to update the named download window with
- the given byte size and data string.
-
- DOWNLOAD_WINDOW ERROR DWIN %id% ERROR %str%
- The core asked Monkey to update the named download window with
- the given error message.
-
- DOWNLOAD_WINDOW DONE DWIN %id%
- The core asked Monkey to destroy the named download window.
-
- SSL Certificate messages
- ------------------------
-
- SSLCERT VERIFY CERT %id% URL %url%
- The core asked Monkey to say whether or not a given SSL
- certificate is OK.
-
- 401 Login messages
- ------------------
-
- 401LOGIN OPEN M4 %id% URL %url% REALM %str%
- The core asked Monkey to ask for identification for the named
- realm at the given URL.
-
- Plotter messages
- ----------------
-
- Note, Monkey won't clip coordinates, but sometimes the core does.
-
- PLOT CLIP X0 %n% Y0 %n% X1 %n% Y1 %n%
- The core asked Monkey to clip plotting to the given clipping
- rectangle (X0,Y0) (X1,Y1)
-
- PLOT TEXT X %n% Y %n% STR %str%
- The core asked Monkey to plot the given string at the
- given coordinates.
-
- PLOT LINE X0 %n% Y0 %n% X1 %n% Y1 %n%
- The core asked Monkey to plot a line with the given start
- and end coordinates.
-
- PLOT RECT X0 %n% Y0 %n% X1 %n% Y1 %n%
- The core asked Monkey to plot a rectangle with the given
- coordinates as the corners.
-
- PLOT BITMAP X %n% Y %n% WIDTH %n% HEIGHT %n%
- The core asked Monkey to plot a bitmap at the given
- coordinates, scaled to the given width/height.
diff --git a/Docs/core-window-interface b/Docs/core-window-interface
deleted file mode 100644
index 83c5f58..0000000
--- a/Docs/core-window-interface
+++ /dev/null
@@ -1,679 +0,0 @@
-Core Window Interface
-=====================
-
-The NetSurf core provides an optional API to frontend implementations
-which allows a number of "standard" window content interfaces to be
-provided.
-
-The currently available user interfaces are:
-
- - Cookies
- - Global history
- - Hotlist
- - SSL certificate view
-
-Although not currently included in future additional user interfaces
-will be available for:
-
- - local history
- - browser render
-
-To be clear these are generic implementations of this functionality
-that any frontend may use. Frontends are free to implement these
-interfaces in any manner as they see fit, the corewindow interface
-simply provides a default.
-
-core window API
----------------
-
-The API is fairly simple and simply involves passing a callback table
-and context pointer to the interface element being constructed.
-
-The header that defines the callback interface is netsurf/core_window.h
-
-The callback table contains five function pointer interfaces which the
-frontend must implement for the core.
-
- - invalidate
- invalidate an area of a window
-
- - update_size
- Update the limits of the window
-
- - scroll_visible
- Scroll the window to make area visible
-
- - get_window_dimensions
- Get window viewport dimensions
-
- - drag_status
- Inform corewindow owner of drag status
-
-Each callback will be passed the context pointer for the corewindow
-instance and the relevant additional information necessary to perform
-the operation.
-
-Each exported user interface element wraps this generic interface with
-a concrete implementation. For example the SSL certificate viewer is
-initialised with:
-
-nserror sslcert_viewer_init(struct core_window_callback_table *cw_t,
- void *core_window_handle,
- struct sslcert_session_data *ssl_d);
-
-This call creates a context which will display and navigate the ssl
-session data passed. The frontend must service the callbacks from the
-core to provide the necessary interactions with the frontend windowing
-system.
-
-These actions should ideally use the standard frontend window
-processing. So for the GTK frontend when the core calls the invalidate
-operation it simply marks the area passed as damaged (using
-gtk_widget_queue_draw_area()) and lets the standard expose event cause
-the redraw to occur.
-
-If the frontend needs to redraw an area of a window (perhaps an expose
-event occurred or the window has had an area marked as invalid) it
-must call the core window API wrappers implementation which will
-perform the plot operations required to update an area of the window.
-
-e.g in the case of ssl certificate viewer
-
-void sslcert_viewer_redraw(struct sslcert_session_data *ssl_d,
- int x, int y, struct rect *clip,
- const struct redraw_context *ctx);
-
-would perform the plot operations for that SSL data window.
-
-Usage
------
-
-The usage pattern that is expected is for a frontend to create a core
-window implementation that implements the necessary five API in a
-generic way and allows the frontend to provide the specific
-specialisation for each of the user interface elements it wishes to
-use (cookies, SSL viewer etc).
-
-The GTK frontend for example:
-
-has source corewindow.[ch] which implement the five core callbacks
-using generic GTK operations (invalidate calls
-gtk_widget_queue_draw_area() etc.) and then provides additional
-operations on a GTK drawing area object to attach expose event
-processing, keypress processing etc.
-
-The GTK corewindow (not to be confused with the core window API
-itself, this is purely the gtk wrapper) is used by ssl_cert.c which
-creates a nsgtk_crtvrfy_window structure containing the
-nsgtk_corewindow structure. It attaches actual GTK window handles to
-this structure and populates elements of nsgtk_corewindow and then
-calls sslcert_viewer_init() directly.
-
-frontend skeleton
------------------
-
-An example core window implementation for a frontend ssl certificate
-viewer is presented here. This implements the suggested usage above
-and provides generic corewindow helpers.
-
-
-frontends/example/corewindow.h
-------------------------------
-
-/*
- * Copyright 2016 Vincent Sanders <vince(a)netsurf-browser.org>
- *
- * 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 EXAMPLE_COREWINDOW_H
-#define EXAMPLE_COREWINDOW_H
-
-#include "netsurf/core_window.h"
-
-/**
- * example core window state
- */
-struct example_corewindow {
-
-
- /*
- * Any variables common to any frontend window would go here.
- * e.g. drawing area handles, toolkit pointers or other state
- */
- example_toolkit_widget *tk_widget;
-
-
-
- /** drag status set by core */
- core_window_drag_status drag_staus;
-
- /** table of callbacks for core window operations */
- struct core_window_callback_table *cb_table;
-
- /**
- * callback to draw on drawable area of example core window
- *
- * \param example_cw The example core window structure.
- * \param r The rectangle of the window that needs updating.
- * \return NSERROR_OK on success otherwise apropriate error code
- */
- nserror (*draw)(struct example_corewindow *example_cw, struct rect *r);
-
- /**
- * callback for keypress on example core window
- *
- * \param example_cw The example core window structure.
- * \param nskey The netsurf key code.
- * \return NSERROR_OK if key processed,
- * NSERROR_NOT_IMPLEMENTED if key not processed
- * otherwise apropriate error code
- */
- nserror (*key)(struct example_corewindow *example_cw, uint32_t nskey);
-
- /**
- * callback for mouse event on example core window
- *
- * \param example_cw The example core window structure.
- * \param mouse_state mouse state
- * \param x location of event
- * \param y location of event
- * \return NSERROR_OK on sucess otherwise apropriate error code.
- */
- nserror (*mouse)(struct example_corewindow *example_cw, browser_mouse_state mouse_state, int x, int y);
-};
-
-/**
- * initialise elements of example core window.
- *
- * As a pre-requisite the draw, key and mouse callbacks must be defined
- *
- * \param example_cw A example core window structure to initialise
- * \return NSERROR_OK on successful initialisation otherwise error code.
- */
-nserror example_corewindow_init(struct example_corewindow *example_cw);
-
-/**
- * finalise elements of example core window.
- *
- * \param example_cw A example core window structure to initialise
- * \return NSERROR_OK on successful finalisation otherwise error code.
- */
-nserror example_corewindow_fini(struct example_corewindow *example_cw);
-
-#endif
-
-frontends/example/corewindow.c
-------------------------------
-
-/*
- * Copyright 2016 Vincent Sanders <vince(a)netsurf-browser.org>
- *
- * 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/>.
- */
-
-/**
- * \file
- * EXAMPLE generic core window interface.
- *
- * Provides interface for core renderers to the example toolkit drawable area.
- *
- * This module is an object that must be encapsulated. Client users
- * should embed a struct example_corewindow at the beginning of their
- * context for this display surface, fill in relevant data and then
- * call example_corewindow_init()
- *
- * The example core window structure requires the callback for draw, key and
- * mouse operations.
- */
-
-#include <assert.h>
-#include <string.h>
-#include <math.h>
-
-#include "utils/log.h"
-#include "utils/utils.h"
-#include "utils/messages.h"
-#include "utils/utf8.h"
-#include "netsurf/keypress.h"
-#include "netsurf/mouse.h"
-#include "netsurf/plot_style.h"
-
-/* extremely likely there will be additional headers required in a real frontend */
-#include "example/corewindow.h"
-
-
-/* toolkit event handlers that do generic things and call internal callbacks */
-
-
-static bool
-example_cw_mouse_press_event(toolkit_widget *widget, toolkit_button bt, int x, int y, void *ctx)
-{
- struct example_corewindow *example_cw = (struct example_corewindow *)ctx;
-
- example_cw->mouse(example_cw, state, x, y);
-
- return true;
-}
-
-static bool
-example_cw_keyrelease_event(toolkit_widget *widget, void *ctx)
-{
- struct example_corewindow *example_cw = (struct example_corewindow *)ctx;
-
- example_cw->key(example_cw, keycode);
-
- return true;
-}
-
-
-
-/* signal handler for toolkit window redraw */
-static bool
-example_cw_draw_event(toolkit_widget *widget,
- toolkit_area *tk_area,
- void *ctx)
-{
- struct example_corewindow *example_cw = (struct example_corewindow *)ctx;
- struct rect clip;
-
- clip.x0 = tk_area.x;
- clip.y0 = tk_area.y;
- clip.x1 = tk_area.width;
- clip.y1 = tk_area.height;
-
- example_cw->draw(example_cw, &clip);
-
- return true;
-}
-
-
-/**
- * callback from core to request a redraw
- */
-static nserror
-example_cw_invalidate(struct core_window *cw, const struct rect *r)
-{
- struct example_corewindow *example_cw = (struct example_corewindow *)cw;
-
- toolkit_widget_queue_draw_area(example_cw->widget,
- r->x0, r->y0,
- r->x1 - r->x0, r->y1 - r->y0);
-}
-
-
-static void
-example_cw_update_size(struct core_window *cw, int width, int height)
-{
- struct example_corewindow *example_cw = (struct example_corewindow *)cw;
-
- toolkit_widget_set_size_request(EXAMPLE_WIDGET(example_cw->drawing_area),
- width, height);
-}
-
-
-static void
-example_cw_scroll_visible(struct core_window *cw, const struct rect *r)
-{
- struct example_corewindow *example_cw = (struct example_corewindow *)cw;
-
- toolkit_scroll_widget(example_cw->widget, r);
-}
-
-
-static void
-example_cw_get_window_dimensions(struct core_window *cw, int *width, int *height)
-{
- struct example_corewindow *example_cw = (struct example_corewindow *)cw;
-
- *width = toolkit_get_widget_width(example_cw->widget);
- *height = toolkit_get_widget_height(example_cw->widget);
-}
-
-
-static void
-example_cw_drag_status(struct core_window *cw, core_window_drag_status ds)
-{
- struct example_corewindow *example_cw = (struct example_corewindow *)cw;
- example_cw->drag_staus = ds;
-}
-
-
-struct core_window_callback_table example_cw_cb_table = {
- .invalidate = example_cw_invalidate,
- .update_size = example_cw_update_size,
- .scroll_visible = example_cw_scroll_visible,
- .get_window_dimensions = example_cw_get_window_dimensions,
- .drag_status = example_cw_drag_status
-};
-
-/* exported function documented example/corewindow.h */
-nserror example_corewindow_init(struct example_corewindow *example_cw)
-{
- /* setup the core window callback table */
- example_cw->cb_table = &example_cw_cb_table;
-
- /* frontend toolkit specific method of causing example_cw_draw_event to be called when a drawing operation is required */
- toolkit_connect_draw_event(example_cw->tk_widget,
- example_cw_draw_event,
- example_cw);
-
- /* frontend toolkit specific method of causing example_cw_button_press_event to be called when a button press occours */
- toolkit_connect_button_press_event(example_cw->tk_widget,
- example_cw_button_press_event,
- example_cw);
-
- /* frontend toolkit specific method of causing example_cw_button_release_event to be called when a button release occours */
- toolkit_connect_button_release_event(example_cw->tk_widget,
- example_cw_button_release_event,
- example_cw);
-
- /* frontend toolkit specific method of causing example_cw_motion_notify_event to be called when there is motion over the widget */
- toolkit_connect_motion_event(example_cw->tk_widget,
- example_cw_motion_notify_event,
- example_cw);
-
- /* frontend toolkit specific method of causing example_cw_key_press_event to be called when a key press occours */
- toolkit_connect_button_press_event(example_cw->tk_widget,
- example_cw_key_press_event,
- example_cw);
-
- /* frontend toolkit specific method of causing example_cw_key_release_event to be called when a key release occours */
- toolkit_connect_button_release_event(example_cw->tk_widget,
- example_cw_key_release_event,
- example_cw);
-
-
- return NSERROR_OK;
-}
-
-/* exported interface documented in example/corewindow.h */
-nserror example_corewindow_fini(struct example_corewindow *example_cw)
-{
- return NSERROR_OK;
-}
-
-
-frontends/example/ssl_cert.h
-----------------------------
-
-/*
- * Copyright 2016 Vincent Sanders <vince(a)netsurf-browser.org>
- *
- * 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 NETSURF_EXAMPLE_SSL_CERT_H
-#define NETSURF_EXAMPLE_SSL_CERT_H 1
-
-struct nsurl;
-struct ssl_cert_info;
-
-/**
- * Prompt the user to verify a certificate with issuse.
- *
- * \param url The URL being verified.
- * \param certs The certificate to be verified
- * \param num The number of certificates to be verified.
- * \param cb Callback upon user decision.
- * \param cbpw Context pointer passed to cb
- * \return NSERROR_OK or error code if prompt creation failed.
- */
-nserror example_cert_verify(struct nsurl *url, const struct ssl_cert_info *certs, unsigned long num, nserror (*cb)(bool proceed, void *pw), void *cbpw);
-
-#endif
-
-frontends/example/ssl_cert.c
-----------------------------
-
-/*
- * Copyright 2015 Vincent Sanders <vince(a)netsurf-browser.org>
- *
- * 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/>.
- */
-
-/**
- * \file
- * Implementation of example certificate viewing using example core windows.
- */
-
-#include <stdint.h>
-#include <stdlib.h>
-
-#include "utils/log.h"
-#include "netsurf/keypress.h"
-#include "netsurf/plotters.h"
-#include "desktop/sslcert_viewer.h"
-
-#include "example/corewindow.h"
-
-
-/**
- * EXAMPLE certificate viewing window context
- */
-struct example_crtvrfy_window {
- /** example core window context */
- struct example_corewindow core;
-
- /** SSL certificate viewer context data */
- struct sslcert_session_data *ssl_data;
-};
-
-/**
- * destroy a previously created certificate view
- */
-static nserror example_crtvrfy_destroy(struct example_crtvrfy_window *crtvrfy_win)
-{
- nserror res;
-
- res = sslcert_viewer_fini(crtvrfy_win->ssl_data);
- if (res == NSERROR_OK) {
- res = example_corewindow_fini(&crtvrfy_win->core);
- toolkit_windown_destroy(crtvrfy_win->window);
- free(crtvrfy_win);
- }
- return res;
-}
-
-static void
-example_crtvrfy_accept(ExampleButton *w, gpointer data)
-{
- struct example_crtvrfy_window *crtvrfy_win;
- crtvrfy_win = (struct example_crtvrfy_window *)data;
-
- sslcert_viewer_accept(crtvrfy_win->ssl_data);
-
- example_crtvrfy_destroy(crtvrfy_win);
-}
-
-static void
-example_crtvrfy_reject(ExampleWidget *w, gpointer data)
-{
- struct example_crtvrfy_window *crtvrfy_win;
- crtvrfy_win = (struct example_crtvrfy_window *)data;
-
- sslcert_viewer_reject(crtvrfy_win->ssl_data);
-
- example_crtvrfy_destroy(crtvrfy_win);
-}
-
-
-/**
- * callback for mouse action for certificate verify on core window
- *
- * \param example_cw The example core window structure.
- * \param mouse_state netsurf mouse state on event
- * \param x location of event
- * \param y location of event
- * \return NSERROR_OK on success otherwise apropriate error code
- */
-static nserror
-example_crtvrfy_mouse(struct example_corewindow *example_cw,
- browser_mouse_state mouse_state,
- int x, int y)
-{
- struct example_crtvrfy_window *crtvrfy_win;
- /* technically degenerate container of */
- crtvrfy_win = (struct example_crtvrfy_window *)example_cw;
-
- sslcert_viewer_mouse_action(crtvrfy_win->ssl_data, mouse_state, x, y);
-
- return NSERROR_OK;
-}
-
-/**
- * callback for keypress for certificate verify on core window
- *
- * \param example_cw The example core window structure.
- * \param nskey The netsurf key code
- * \return NSERROR_OK on success otherwise apropriate error code
- */
-static nserror
-example_crtvrfy_key(struct example_corewindow *example_cw, uint32_t nskey)
-{
- struct example_crtvrfy_window *crtvrfy_win;
-
- /* technically degenerate container of */
- crtvrfy_win = (struct example_crtvrfy_window *)example_cw;
-
- if (sslcert_viewer_keypress(crtvrfy_win->ssl_data, nskey)) {
- return NSERROR_OK;
- }
- return NSERROR_NOT_IMPLEMENTED;
-}
-
-/**
- * callback on draw event for certificate verify on core window
- *
- * \param example_cw The example core window structure.
- * \param r The rectangle of the window that needs updating.
- * \return NSERROR_OK on success otherwise apropriate error code
- */
-static nserror
-example_crtvrfy_draw(struct example_corewindow *example_cw, struct rect *r)
-{
- struct redraw_context ctx = {
- .interactive = true,
- .background_images = true,
- .plot = &example_plotters
- };
- struct example_crtvrfy_window *crtvrfy_win;
-
- /* technically degenerate container of */
- crtvrfy_win = (struct example_crtvrfy_window *)example_cw;
-
- sslcert_viewer_redraw(crtvrfy_win->ssl_data, 0, 0, r, &ctx);
-
- return NSERROR_OK;
-}
-
-/* exported interface documented in example/ssl_cert.h */
-nserror example_cert_verify(struct nsurl *url,
- const struct ssl_cert_info *certs,
- unsigned long num,
- nserror (*cb)(bool proceed, void *pw),
- void *cbpw)
-{
- struct example_crtvrfy_window *ncwin;
- nserror res;
-
- ncwin = malloc(sizeof(struct example_crtvrfy_window));
- if (ncwin == NULL) {
- return NSERROR_NOMEM;
- }
-
- res = toolkit_create_window(&ncwin->window);
- if (res != NSERROR_OK) {
- LOG("SSL UI builder init failed");
- free(ncwin);
- return res;
- }
-
- /* store the widget that the toolkit is drawing into */
- ncwin->core.widget = toolkit_get_widget(ncwin->window, "SSLDrawingArea"));
-
- /* would typicaly setup toolkit accept/reject buttons etc. here */
- toolkit_connect_button_press(ncwin->tk_accept_button,
- example_crtvrfy_accept,
- ncwin);
-
-
- /* initialise example core window */
- ncwin->core.draw = example_crtvrfy_draw;
- ncwin->core.key = example_crtvrfy_key;
- ncwin->core.mouse = example_crtvrfy_mouse;
-
- res = example_corewindow_init(&ncwin->core);
- if (res != NSERROR_OK) {
- free(ncwin);
- return res;
- }
-
- /* initialise certificate viewing interface */
- res = sslcert_viewer_create_session_data(num, url, cb, cbpw, certs,
- &ncwin->ssl_data);
- if (res != NSERROR_OK) {
- free(ncwin);
- return res;
- }
-
- res = sslcert_viewer_init(ncwin->core.cb_table,
- (struct core_window *)ncwin,
- ncwin->ssl_data);
- if (res != NSERROR_OK) {
- free(ncwin);
- return res;
- }
-
- toolkit_widget_show(ncwin->window);
-
- return NSERROR_OK;
-}
diff --git a/Makefile b/Makefile
index 97a8128..fa1420b 100644
--- a/Makefile
+++ b/Makefile
@@ -890,7 +890,7 @@ install: all-program install-$(TARGET)
.PHONY: docs
-docs: Docs/Doxyfile
+docs: docs/Doxyfile
doxygen $<
diff --git a/content/urldb.c b/content/urldb.c
index d702e58..313ec31 100644
--- a/content/urldb.c
+++ b/content/urldb.c
@@ -696,8 +696,8 @@ static bool urldb__host_is_ip_address(const char *host)
}
ipv6_addr_len = host_len - 2;
- if (ipv6_addr_len > sizeof(ipv6_addr)) {
- ipv6_addr_len = sizeof(ipv6_addr);
+ if (ipv6_addr_len >= sizeof(ipv6_addr)) {
+ ipv6_addr_len = sizeof(ipv6_addr) - 1;
}
strncpy(ipv6_addr, sane_host + 1, ipv6_addr_len);
ipv6_addr[ipv6_addr_len] = '\0';
@@ -849,7 +849,7 @@ urldb_iterate_partial_host(struct search_node *root,
*
* Given: http://www.example.org/a/b/c/d//e
* and assuming a path tree:
- * .
+ * ^
* / \
* a1 b1
* / \
diff --git a/desktop/browser.c b/desktop/browser.c
index 4b6a5bb..e7ff158 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -593,7 +593,7 @@ static void browser_window_set_selection(struct browser_window *bw,
* scrolls the viewport to ensure the specified rectangle of the
* content is shown.
*
- * \param gw gui_window to scroll
+ * \param bw window to scroll
* \param rect The rectangle to ensure is shown.
* \return NSERROR_OK on success or apropriate error code.
*/
diff --git a/desktop/browser_history.c b/desktop/browser_history.c
index cf70c47..dbbc67d 100644
--- a/desktop/browser_history.c
+++ b/desktop/browser_history.c
@@ -31,13 +31,11 @@
#include "utils/log.h"
#include "utils/utils.h"
#include "netsurf/layout.h"
-#include "netsurf/plotters.h"
#include "netsurf/content.h"
#include "content/hlcache.h"
#include "content/urldb.h"
#include "netsurf/bitmap.h"
-#include "desktop/system_colour.h"
#include "desktop/gui_internal.h"
#include "desktop/browser_history.h"
#include "desktop/browser_private.h"
@@ -47,39 +45,6 @@
#define RIGHT_MARGIN 50
#define BOTTOM_MARGIN 30
-struct history_page {
- nsurl *url; /**< Page URL, never 0. */
- lwc_string *frag_id; /** Fragment identifier, or 0. */
- char *title; /**< Page title, never 0. */
-};
-
-/** A node in the history tree. */
-struct history_entry {
- struct history_page page;
- struct history_entry *back; /**< Parent. */
- struct history_entry *next; /**< Next sibling. */
- struct history_entry *forward; /**< First child. */
- struct history_entry *forward_pref; /**< Child in direction of
- current entry. */
- struct history_entry *forward_last; /**< Last child. */
- unsigned int children; /**< Number of children. */
- int x; /**< Position of node. */
- int y; /**< Position of node. */
- struct bitmap *bitmap; /**< Thumbnail bitmap, or 0. */
-};
-
-/** History tree for a window. */
-struct history {
- /** First page in tree (page that window opened with). */
- struct history_entry *start;
- /** Current position in tree. */
- struct history_entry *current;
- /** Width of layout. */
- int width;
- /** Height of layout. */
- int height;
-};
-
/**
* Clone a history entry
@@ -236,208 +201,9 @@ static void browser_window_history__layout(struct history *history)
history->height += BOTTOM_MARGIN / 2;
}
-/** plot style for drawing lines between nodes */
-static plot_style_t pstyle_line = {
- .stroke_type = PLOT_OP_TYPE_SOLID,
- .stroke_width = 2,
-};
-
-/** plot style for drawing background */
-static plot_style_t pstyle_bg = {
- .fill_type = PLOT_OP_TYPE_SOLID,
-};
-
-/** plot style for drawing rectangle round unselected nodes */
-static plot_style_t pstyle_rect = {
- .stroke_type = PLOT_OP_TYPE_SOLID,
- .stroke_width = 1,
-};
-
-/** plot style for drawing rectangle round selected nodes */
-static plot_style_t pstyle_rect_sel = {
- .stroke_type = PLOT_OP_TYPE_SOLID,
- .stroke_width = 3,
-};
-
-/** plot style for font on unselected nodes */
-static plot_font_style_t pfstyle_node = {
- .family = PLOT_FONT_FAMILY_SANS_SERIF,
- .size = 8 * FONT_SIZE_SCALE,
- .weight = 400,
- .flags = FONTF_NONE,
-};
-
-/** plot style for font on unselected nodes */
-static plot_font_style_t pfstyle_node_sel = {
- .family = PLOT_FONT_FAMILY_SANS_SERIF,
- .size = 8 * FONT_SIZE_SCALE,
- .weight = 900,
- .flags = FONTF_NONE,
-};
-
-/**
- * Recursively redraw a history_entry.
- *
- * \param history history containing the entry
- * \param entry entry to render
- * \param x0 area top left x coordinate
- * \param y0 area top left y coordinate
- * \param x1 area bottom right x coordinate
- * \param y1 area bottom right y coordinate
- * \param x window x offset
- * \param y window y offset
- * \param clip clip redraw
- * \param ctx current redraw context
- */
-static bool
-browser_window_history__redraw_entry(struct history *history,
- struct history_entry *entry,
- int x0, int y0, int x1, int y1,
- int x, int y, bool clip,
- const struct redraw_context *ctx)
-{
- size_t char_offset;
- int actual_x;
- struct history_entry *child;
- int tailsize = 5;
- int xoffset = x - x0;
- int yoffset = y - y0;
-
- plot_style_t *pstyle;
- plot_font_style_t *pfstyle;
- struct rect rect;
- nserror res;
-
- /* setup plot styles */
- if (entry == history->current) {
- pstyle = &pstyle_rect_sel;
- pfstyle = &pfstyle_node_sel;
- } else {
- pstyle = &pstyle_rect;
- pfstyle = &pfstyle_node;
- }
-
- /* setup clip area */
- if (clip) {
- rect.x0 = x0 + xoffset;
- rect.y0 = y0 + yoffset;
- rect.x1 = x1 + xoffset;
- rect.y1 = y1 + yoffset;
- res = ctx->plot->clip(ctx, &rect);
- if (res != NSERROR_OK) {
- return false;
- }
- }
-
- /* Only attempt to plot bitmap if it is present */
- if (entry->bitmap != NULL) {
- res = ctx->plot->bitmap(ctx,
- entry->bitmap,
- entry->x + xoffset,
- entry->y + yoffset,
- WIDTH, HEIGHT,
- 0xffffff,
- 0);
- if (res != NSERROR_OK) {
- return false;
- }
- }
-
- rect.x0 = entry->x - 1 + xoffset;
- rect.y0 = entry->y - 1 + yoffset;
- rect.x1 = entry->x + xoffset + WIDTH;
- rect.y1 = entry->y + yoffset + HEIGHT;
- res = ctx->plot->rectangle(ctx, pstyle, &rect);
- if (res != NSERROR_OK) {
- return false;
- }
-
- res = guit->layout->position(plot_style_font, entry->page.title,
- strlen(entry->page.title), WIDTH,
- &char_offset, &actual_x);
- if (res != NSERROR_OK) {
- return false;
- }
-
- res = ctx->plot->text(ctx,
- pfstyle,
- entry->x + xoffset,
- entry->y + HEIGHT + 12 + yoffset,
- entry->page.title,
- char_offset);
- if (res != NSERROR_OK) {
- return false;
- }
-
- /* for each child node draw a line and recurse redraw into it */
- for (child = entry->forward; child; child = child->next) {
- rect.x0 = entry->x + WIDTH + xoffset;
- rect.y0 = entry->y + HEIGHT / 2 + yoffset;
- rect.x1 = entry->x + WIDTH + tailsize + xoffset;
- rect.y1 = entry->y + HEIGHT / 2 + yoffset;
- res = ctx->plot->line(ctx, &pstyle_line, &rect);
- if (res != NSERROR_OK) {
- return false;
- }
-
- rect.x0 = entry->x + WIDTH + tailsize + xoffset;
- rect.y0 = entry->y + HEIGHT / 2 + yoffset;
- rect.x1 = child->x - tailsize + xoffset;
- rect.y1 = child->y + HEIGHT / 2 + yoffset;
- res = ctx->plot->line(ctx, &pstyle_line, &rect);
- if (res != NSERROR_OK) {
- return false;
- }
-
- rect.x0 = child->x - tailsize + xoffset;
- rect.y0 = child->y + HEIGHT / 2 + yoffset;
- rect.x1 = child->x + xoffset;
- rect.y1 = child->y + HEIGHT / 2 + yoffset;
- res = ctx->plot->line(ctx, &pstyle_line, &rect);
- if (res != NSERROR_OK) {
- return false;
- }
-
- if (!browser_window_history__redraw_entry(history, child,
- x0, y0, x1, y1, x, y, clip, ctx)) {
- return false;
- }
- }
-
- return true;
-}
-
-
-/**
- * Find the history entry at a position.
- *
- * \param entry entry to search from
- * \param x coordinate
- * \param y coordinate
- * \return an entry if found, 0 if none
- */
-
-static struct history_entry *browser_window_history__find_position(
- struct history_entry *entry, int x, int y)
-{
- struct history_entry *child;
- struct history_entry *found;
-
- if (!entry)
- return 0;
- if (entry->x <= x && x <= entry->x + WIDTH &&
- entry->y <= y && y <= entry->y + HEIGHT)
- return entry;
- for (child = entry->forward; child; child = child->next) {
- found = browser_window_history__find_position(child, x, y);
- if (found)
- return found;
- }
- return 0;
-}
/**
* Enumerate subentries in history
@@ -478,29 +244,8 @@ static bool browser_window_history__enumerate_entry(
/* exported interface documented in desktop/browser_history.h */
nserror browser_window_history_create(struct browser_window *bw)
{
- nserror res;
struct history *history;
- res = ns_system_colour_char("Window", &pstyle_bg.fill_colour);
- if (res != NSERROR_OK) {
- return res;
- }
- pfstyle_node.background = pstyle_bg.fill_colour;
- pfstyle_node_sel.background = pstyle_bg.fill_colour;
-
- res = ns_system_colour_char("GrayText", &pstyle_line.stroke_colour);
- if (res != NSERROR_OK) {
- return res;
- }
- pstyle_rect.stroke_colour = pstyle_line.stroke_colour;
- pfstyle_node.foreground = pstyle_line.stroke_colour;
-
- res = ns_system_colour_char("Highlight", &pstyle_rect_sel.stroke_colour);
- if (res != NSERROR_OK) {
- return res;
- }
- pfstyle_node_sel.foreground = pstyle_rect_sel.stroke_colour;
-
bw->history = NULL;
history = calloc(1, sizeof *history);
@@ -769,98 +514,6 @@ nserror browser_window_history_go(struct browser_window *bw,
/* exported interface documented in desktop/browser_history.h */
-void browser_window_history_size(struct browser_window *bw,
- int *width, int *height)
-{
- assert(bw != NULL);
- assert(bw->history != NULL);
-
- *width = bw->history->width;
- *height = bw->history->height;
-}
-
-
-/* exported interface documented in desktop/browser_history.h */
-bool browser_window_history_redraw(struct browser_window *bw,
- const struct redraw_context *ctx)
-{
- struct history *history;
-
- assert(bw != NULL);
- history = bw->history;
-
- if (history == NULL) {
- LOG("Attempt to draw NULL history.");
- return false;
- }
-
- if (!history->start)
- return true;
-
- return browser_window_history__redraw_entry(history, history->start,
- 0, 0, 0, 0, 0, 0, false, ctx);
-}
-
-
-/* exported interface documented in desktop/browser_history.h */
-bool browser_window_history_redraw_rectangle(struct browser_window *bw,
- int x0, int y0, int x1, int y1,
- int x, int y, const struct redraw_context *ctx)
-{
- struct history *history;
-
- assert(bw != NULL);
- history = bw->history;
-
- if (!history->start)
- return true;
-
- return browser_window_history__redraw_entry(history, history->start,
- x0, y0, x1, y1, x, y, true, ctx);
-}
-
-
-/* exported interface documented in desktop/browser_history.h */
-bool browser_window_history_click(struct browser_window *bw,
- int x, int y, bool new_window)
-{
- struct history_entry *entry;
- struct history *history;
-
- assert(bw != NULL);
- history = bw->history;
-
- entry = browser_window_history__find_position(history->start, x, y);
- if (!entry)
- return false;
- if (entry == history->current)
- return false;
-
- browser_window_history_go(bw, entry, new_window);
-
- return true;
-}
-
-
-/* exported interface documented in desktop/browser_history.h */
-const char *browser_window_history_position_url(struct browser_window *bw,
- int x, int y)
-{
- struct history_entry *entry;
- struct history *history;
-
- assert(bw != NULL);
- history = bw->history;
-
- entry = browser_window_history__find_position(history->start, x, y);
- if (!entry)
- return 0;
-
- return nsurl_access(entry->page.url);
-}
-
-
-/* exported interface documented in desktop/browser_history.h */
void browser_window_history_enumerate_forward(const struct browser_window *bw,
browser_window_history_enumerate_cb cb, void *user_data)
{
@@ -907,10 +560,9 @@ void browser_window_history_enumerate(const struct browser_window *bw,
/* exported interface documented in desktop/browser_history.h */
-const char *browser_window_history_entry_get_url(
- const struct history_entry *entry)
+nsurl *browser_window_history_entry_get_url(const struct history_entry *entry)
{
- return nsurl_access(entry->page.url);
+ return nsurl_ref(entry->page.url);
}
diff --git a/desktop/browser_history.h b/desktop/browser_history.h
index 8ffb612..9140e2c 100644
--- a/desktop/browser_history.h
+++ b/desktop/browser_history.h
@@ -16,71 +16,27 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * Browser history tree (interface).
+/**
+ * \file
+ * Interface to browser history operations
+ *
+ * The are operations on a browsing contexts history. These interfaces
+ * allow navigation forward and backwards in the history as well as
+ * enumerating the entries.
+ *
+ * The local history viewing is distinct via corewindow defined in
+ * desktop/local_history.h
*/
-#ifndef _NETSURF_DESKTOP_BROWSER_HISTORY_H_
-#define _NETSURF_DESKTOP_BROWSER_HISTORY_H_
+#ifndef NETSURF_DESKTOP_BROWSER_HISTORY_H
+#define NETSURF_DESKTOP_BROWSER_HISTORY_H
#include <stdbool.h>
-#include <libwapcaplet/libwapcaplet.h>
#include "utils/errors.h"
-struct hlcache_handle;
struct browser_window;
struct history_entry;
-struct redraw_context;
-
-/**
- * Create a new history tree for a browser window window.
- *
- * \param bw browser window to create history for.
- *
- * \return NSERROR_OK or appropriate error otherwise
- */
-nserror browser_window_history_create(struct browser_window *bw);
-
-/**
- * Clone a bw's history tree for new bw
- *
- * \param existing browser window with history to clone.
- * \param clone browser window to make cloned history for.
- *
- * \return NSERROR_OK or appropriate error otherwise
- */
-nserror browser_window_history_clone(const struct browser_window *existing,
- struct browser_window *clone);
-/**
- * Insert a url into the history tree.
- *
- * \param bw browser window with history object
- * \param content content to add to history
- * \param frag_id fragment identifier, or NULL.
- * \return NSERROR_OK or error code on faliure.
- *
- * The page is added after the current entry and becomes current.
- */
-nserror browser_window_history_add(struct browser_window *bw,
- struct hlcache_handle *content, lwc_string *frag_id);
-
-/**
- * Update the thumbnail for the current entry.
- *
- * \param bw The browser window to update the history within.
- * \param content content for current entry
- * \return NSERROR_OK or error code on faliure.
- */
-nserror browser_window_history_update(struct browser_window *bw,
- struct hlcache_handle *content);
-
-/**
- * Free a history structure.
- *
- * \param bw The browser window to destroy the history within.
- */
-void browser_window_history_destroy(struct browser_window *bw);
/**
* Go back in the history.
@@ -91,6 +47,7 @@ void browser_window_history_destroy(struct browser_window *bw);
*/
nserror browser_window_history_back(struct browser_window *bw, bool new_window);
+
/**
* Go forward in the history.
*
@@ -100,6 +57,7 @@ nserror browser_window_history_back(struct browser_window *bw, bool new_window);
*/
nserror browser_window_history_forward(struct browser_window *bw, bool new_window);
+
/**
* Check whether it is pssible to go back in the history.
*
@@ -108,6 +66,7 @@ nserror browser_window_history_forward(struct browser_window *bw, bool new_windo
*/
bool browser_window_history_back_available(struct browser_window *bw);
+
/**
* Check whether it is pssible to go forwards in the history.
*
@@ -116,63 +75,6 @@ bool browser_window_history_back_available(struct browser_window *bw);
*/
bool browser_window_history_forward_available(struct browser_window *bw);
-/**
- * Get the dimensions of a history.
- *
- * \param bw browser window with history object.
- * \param width updated to width
- * \param height updated to height
- */
-void browser_window_history_size(struct browser_window *bw,
- int *width, int *height);
-
-/**
- * Redraw all of a history area.
- *
- * \param bw browser window with history object.
- * \param ctx current redraw context
- */
-bool browser_window_history_redraw(struct browser_window *bw,
- const struct redraw_context *ctx);
-
-/**
- * Redraw part of a history area.
- *
- * \param bw browser window with history object.
- * \param x0 left X co-ordinate of redraw area
- * \param y0 top Y co-ordinate of redraw area
- * \param x1 right X co-ordinate of redraw area
- * \param y1 lower Y co-ordinate of redraw area
- * \param x start X co-ordinate on plot canvas
- * \param y start Y co-ordinate on plot canvas
- * \param ctx current redraw context
- */
-bool browser_window_history_redraw_rectangle(struct browser_window *bw,
- int x0, int y0, int x1, int y1, int x, int y,
- const struct redraw_context *ctx);
-
-/**
- * Handle a mouse click in a history.
- *
- * \param bw browser window containing history
- * \param x click coordinate
- * \param y click coordinate
- * \param new_window open a new window instead of using bw
- * \return true if action was taken, false if click was not on an entry
- */
-bool browser_window_history_click(struct browser_window *bw,
- int x, int y, bool new_window);
-
-/**
- * Determine the URL of the entry at a position.
- *
- * \param bw browser window containing history
- * \param x x coordinate.
- * \param y y coordinate.
- * \return URL, or 0 if no entry at (x, y)
- */
-const char *browser_window_history_position_url(struct browser_window *bw,
- int x, int y);
/**
* Callback function type for history enumeration
@@ -187,6 +89,7 @@ typedef bool (*browser_window_history_enumerate_cb)(
int x0, int y0, int x1, int y1,
const struct history_entry *entry, void *user_data);
+
/**
* Enumerate all entries in the history.
* Do not change the history while it is being enumerated.
@@ -198,6 +101,7 @@ typedef bool (*browser_window_history_enumerate_cb)(
void browser_window_history_enumerate(const struct browser_window *bw,
browser_window_history_enumerate_cb cb, void *user_data);
+
/**
* Enumerate all entries that will be reached by the 'forward' button
*
@@ -208,6 +112,7 @@ void browser_window_history_enumerate(const struct browser_window *bw,
void browser_window_history_enumerate_forward(const struct browser_window *bw,
browser_window_history_enumerate_cb cb, void *user_data);
+
/**
* Enumerate all entries that will be reached by the 'back' button
*
@@ -218,14 +123,15 @@ void browser_window_history_enumerate_forward(const struct browser_window *bw,
void browser_window_history_enumerate_back(const struct browser_window *bw,
browser_window_history_enumerate_cb cb, void *user_data);
+
/**
* Returns the URL to a history entry
*
- * \param entry the history entry to retrieve the URL from
- * \return the URL
+ * \param entry the history entry to retrieve the URL from
+ * \return A referenced nsurl URL
*/
-const char *browser_window_history_entry_get_url(
- const struct history_entry *entry);
+struct nsurl *browser_window_history_entry_get_url(const struct history_entry *entry);
+
/**
* Returns the URL to a history entry
@@ -236,6 +142,7 @@ const char *browser_window_history_entry_get_url(
const char *browser_window_history_entry_get_fragment_id(
const struct history_entry *entry);
+
/**
* Returns the title of a history entry
*
@@ -245,6 +152,7 @@ const char *browser_window_history_entry_get_fragment_id(
const char *browser_window_history_entry_get_title(
const struct history_entry *entry);
+
/**
* Navigate to specified history entry, optionally in new window
*
diff --git a/desktop/browser_private.h b/desktop/browser_private.h
index 5a53e2f..8bbc573 100644
--- a/desktop/browser_private.h
+++ b/desktop/browser_private.h
@@ -35,8 +35,48 @@
struct box;
struct hlcache_handle;
struct gui_window;
-struct history;
struct selection;
+struct nsurl;
+
+/**
+ * history entry page information
+ */
+struct history_page {
+ struct nsurl *url; /**< Page URL, never NULL. */
+ lwc_string *frag_id; /** Fragment identifier, or NULL. */
+ char *title; /**< Page title, never NULL. */
+};
+
+/**
+ * A node in the history tree.
+ */
+struct history_entry {
+ struct history_page page;
+ struct history_entry *back; /**< Parent. */
+ struct history_entry *next; /**< Next sibling. */
+ struct history_entry *forward; /**< First child. */
+ struct history_entry *forward_pref; /**< Child in direction of
+ current entry. */
+ struct history_entry *forward_last; /**< Last child. */
+ unsigned int children; /**< Number of children. */
+ int x; /**< Position of node. */
+ int y; /**< Position of node. */
+ struct bitmap *bitmap; /**< Thumbnail bitmap, or 0. */
+};
+
+/**
+ * History tree for a window.
+ */
+struct history {
+ /** First page in tree (page that window opened with). */
+ struct history_entry *start;
+ /** Current position in tree. */
+ struct history_entry *current;
+ /** Width of layout. */
+ int width;
+ /** Height of layout. */
+ int height;
+};
/**
* Browser window data.
@@ -249,4 +289,57 @@ void browser_window_set_status(struct browser_window *bw, const char *text);
*/
struct browser_window * browser_window_get_root(struct browser_window *bw);
+
+/**
+ * Create a new history tree for a browser window window.
+ *
+ * \param bw browser window to create history for.
+ *
+ * \return NSERROR_OK or appropriate error otherwise
+ */
+nserror browser_window_history_create(struct browser_window *bw);
+
+/**
+ * Clone a bw's history tree for new bw
+ *
+ * \param existing browser window with history to clone.
+ * \param clone browser window to make cloned history for.
+ *
+ * \return NSERROR_OK or appropriate error otherwise
+ */
+nserror browser_window_history_clone(const struct browser_window *existing,
+ struct browser_window *clone);
+
+
+/**
+ * Insert a url into the history tree.
+ *
+ * \param bw browser window with history object
+ * \param content content to add to history
+ * \param frag_id fragment identifier, or NULL.
+ * \return NSERROR_OK or error code on faliure.
+ *
+ * The page is added after the current entry and becomes current.
+ */
+nserror browser_window_history_add(struct browser_window *bw,
+ struct hlcache_handle *content, lwc_string *frag_id);
+
+/**
+ * Update the thumbnail for the current entry.
+ *
+ * \param bw The browser window to update the history within.
+ * \param content content for current entry
+ * \return NSERROR_OK or error code on faliure.
+ */
+nserror browser_window_history_update(struct browser_window *bw,
+ struct hlcache_handle *content);
+
+/**
+ * Free a history structure.
+ *
+ * \param bw The browser window to destroy the history within.
+ */
+void browser_window_history_destroy(struct browser_window *bw);
+
+
#endif
diff --git a/desktop/local_history.c b/desktop/local_history.c
index 6d07c8a..01222e2 100644
--- a/desktop/local_history.c
+++ b/desktop/local_history.c
@@ -22,28 +22,272 @@
*/
#include <stdlib.h>
+#include <string.h>
#include "utils/errors.h"
+#include "utils/nsurl.h"
#include "netsurf/types.h"
+#include "netsurf/layout.h"
#include "netsurf/core_window.h"
+#include "netsurf/plotters.h"
+#include "desktop/gui_internal.h"
+#include "desktop/system_colour.h"
+#include "desktop/browser_private.h"
#include "desktop/browser_history.h"
#include "desktop/local_history.h"
+#define WIDTH 100
+#define HEIGHT 86
+
+/**
+ * local history viewer context
+ */
struct local_history_session {
struct browser_window *bw;
struct core_window_callback_table *cw_t;
void *core_window_handle;
};
+
+/**
+ * plot style for drawing lines between nodes
+ */
+static plot_style_t pstyle_line = {
+ .stroke_type = PLOT_OP_TYPE_SOLID,
+ .stroke_width = 2,
+};
+
+
+/**
+ * plot style for drawing background
+ */
+static plot_style_t pstyle_bg = {
+ .fill_type = PLOT_OP_TYPE_SOLID,
+};
+
+
+/**
+ * plot style for drawing rectangle round unselected nodes
+ */
+static plot_style_t pstyle_rect = {
+ .stroke_type = PLOT_OP_TYPE_SOLID,
+ .stroke_width = 1,
+};
+
+
+/**
+ * plot style for drawing rectangle round selected nodes
+ */
+static plot_style_t pstyle_rect_sel = {
+ .stroke_type = PLOT_OP_TYPE_SOLID,
+ .stroke_width = 3,
+};
+
+
+/**
+ * plot style for font on unselected nodes
+ */
+static plot_font_style_t pfstyle_node = {
+ .family = PLOT_FONT_FAMILY_SANS_SERIF,
+ .size = 8 * FONT_SIZE_SCALE,
+ .weight = 400,
+ .flags = FONTF_NONE,
+};
+
+
+/**
+ * plot style for font on unselected nodes
+ */
+static plot_font_style_t pfstyle_node_sel = {
+ .family = PLOT_FONT_FAMILY_SANS_SERIF,
+ .size = 8 * FONT_SIZE_SCALE,
+ .weight = 900,
+ .flags = FONTF_NONE,
+};
+
+
+/**
+ * Recursively redraw a history entry.
+ *
+ * \param history history containing the entry
+ * \param entry entry to render
+ * \param clip redraw area
+ * \param x window x offset
+ * \param y window y offset
+ * \param ctx current redraw context
+ */
+static nserror
+redraw_entry(struct history *history,
+ struct history_entry *entry,
+ struct rect *clip,
+ int x, int y,
+ const struct redraw_context *ctx)
+{
+ size_t char_offset;
+ int actual_x;
+ struct history_entry *child;
+ int tailsize = 5;
+
+ plot_style_t *pstyle;
+ plot_font_style_t *pfstyle;
+ struct rect rect;
+ nserror res;
+
+ /* setup plot styles */
+ if (entry == history->current) {
+ pstyle = &pstyle_rect_sel;
+ pfstyle = &pfstyle_node_sel;
+ } else {
+ pstyle = &pstyle_rect;
+ pfstyle = &pfstyle_node;
+ }
+
+ /* Only attempt to plot bitmap if it is present */
+ if (entry->bitmap != NULL) {
+ res = ctx->plot->bitmap(ctx,
+ entry->bitmap,
+ entry->x + x,
+ entry->y + y,
+ WIDTH, HEIGHT,
+ 0xffffff,
+ 0);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+ }
+
+ rect.x0 = entry->x - 1 + x;
+ rect.y0 = entry->y - 1 + y;
+ rect.x1 = entry->x + x + WIDTH;
+ rect.y1 = entry->y + y + HEIGHT;
+ res = ctx->plot->rectangle(ctx, pstyle, &rect);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ res = guit->layout->position(plot_style_font, entry->page.title,
+ strlen(entry->page.title), WIDTH,
+ &char_offset, &actual_x);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ res = ctx->plot->text(ctx,
+ pfstyle,
+ entry->x + x,
+ entry->y + HEIGHT + 12 + y,
+ entry->page.title,
+ char_offset);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ /* for each child node draw a line and recurse redraw into it */
+ for (child = entry->forward; child; child = child->next) {
+ rect.x0 = entry->x + WIDTH + x;
+ rect.y0 = entry->y + HEIGHT / 2 + y;
+ rect.x1 = entry->x + WIDTH + tailsize + x;
+ rect.y1 = entry->y + HEIGHT / 2 + y;
+ res = ctx->plot->line(ctx, &pstyle_line, &rect);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ rect.x0 = entry->x + WIDTH + tailsize + x;
+ rect.y0 = entry->y + HEIGHT / 2 + y;
+ rect.x1 = child->x - tailsize + x;
+ rect.y1 = child->y + HEIGHT / 2 + y;
+ res = ctx->plot->line(ctx, &pstyle_line, &rect);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ rect.x0 = child->x - tailsize + x;
+ rect.y0 = child->y + HEIGHT / 2 + y;
+ rect.x1 = child->x + x;
+ rect.y1 = child->y + HEIGHT / 2 + y;
+ res = ctx->plot->line(ctx, &pstyle_line, &rect);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ res = redraw_entry(history, child, clip, x, y, ctx);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+ }
+
+ return NSERROR_OK;
+}
+
+
+/**
+ * Find the history entry at a position.
+ *
+ * \param entry entry to search from
+ * \param x coordinate
+ * \param y coordinate
+ * \return an entry if found, 0 if none
+ */
+static struct history_entry *
+find_entry_position(struct history_entry *entry, int x, int y)
+{
+ struct history_entry *child;
+ struct history_entry *found;
+
+ if (!entry) {
+ return NULL;
+ }
+
+ if ((entry->x <= x) &&
+ (x <= entry->x + WIDTH) &&
+ (entry->y <= y) &&
+ (y <= entry->y + HEIGHT)) {
+ return entry;
+ }
+
+ for (child = entry->forward; child; child = child->next) {
+ found = find_entry_position(child, x, y);
+ if (found) {
+ return found;
+ }
+ }
+
+ return NULL;
+}
+
+
/* exported interface documented in desktop/local_history.h */
-nserror local_history_init(struct core_window_callback_table *cw_t,
- void *core_window_handle,
- struct browser_window *bw,
- struct local_history_session **session)
+nserror
+local_history_init(struct core_window_callback_table *cw_t,
+ void *core_window_handle,
+ struct browser_window *bw,
+ struct local_history_session **session)
{
+ nserror res;
struct local_history_session *nses;
+ res = ns_system_colour_char("Window", &pstyle_bg.fill_colour);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+ pfstyle_node.background = pstyle_bg.fill_colour;
+ pfstyle_node_sel.background = pstyle_bg.fill_colour;
+
+ res = ns_system_colour_char("GrayText", &pstyle_line.stroke_colour);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+ pstyle_rect.stroke_colour = pstyle_line.stroke_colour;
+ pfstyle_node.foreground = pstyle_line.stroke_colour;
+
+ res = ns_system_colour_char("Highlight", &pstyle_rect_sel.stroke_colour);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+ pfstyle_node_sel.foreground = pstyle_rect_sel.stroke_colour;
+
nses = calloc(1, sizeof(struct local_history_session));
if (nses == NULL) {
return NSERROR_NOMEM;
@@ -55,6 +299,7 @@ nserror local_history_init(struct core_window_callback_table *cw_t,
local_history_set(nses, bw);
*session = nses;
+
return NSERROR_OK;
}
@@ -75,26 +320,69 @@ local_history_redraw(struct local_history_session *session,
struct rect *clip,
const struct redraw_context *ctx)
{
- if (session->bw != NULL) {
- browser_window_history_redraw_rectangle(session->bw,
- clip->x0, clip->y0, clip->x1, clip->y1, x, y, ctx);
+ struct rect r = {
+ .x0 = clip->x0 + x,
+ .y0 = clip->y0 + y,
+ .x1 = clip->x1 + x,
+ .y1 = clip->y1 + y,
+ };
+
+ if (session->bw == NULL) {
+ return NSERROR_OK;
}
- return NSERROR_OK;
+
+ if (session->bw->history->start == NULL) {
+ return NSERROR_OK;
+ }
+
+ ctx->plot->clip(ctx, &r);
+ ctx->plot->rectangle(ctx, &pstyle_bg, &r);
+
+ return redraw_entry(session->bw->history,
+ session->bw->history->start,
+ clip,
+ x, y,
+ ctx);
}
/* exported interface documented in desktop/local_history.h */
-void
+nserror
local_history_mouse_action(struct local_history_session *session,
enum browser_mouse_state mouse,
int x,
int y)
{
+ struct history_entry *entry;
+ bool new_window;
+
+ if (session->bw == NULL) {
+ return NSERROR_BAD_PARAMETER;
+ }
+
+ if ((mouse & (BROWSER_MOUSE_PRESS_1 | BROWSER_MOUSE_PRESS_2)) == 0) {
+ return NSERROR_NOT_IMPLEMENTED;
+ }
+
+ entry = find_entry_position(session->bw->history->start, x, y);
+ if (entry == NULL) {
+ return NSERROR_NOT_FOUND;
+ }
+
+ if (entry == session->bw->history->current) {
+ return NSERROR_PERMISSION;
+ }
+
if (mouse & BROWSER_MOUSE_PRESS_1) {
- browser_window_history_click(session->bw, x, y, false);
- } else if (mouse & BROWSER_MOUSE_PRESS_2) {
- browser_window_history_click(session->bw, x, y, true);
+ new_window = false;
+ } else if (mouse & BROWSER_MOUSE_PRESS_2) {
+ new_window = true;
+ } else {
+ new_window = false;
}
+ browser_window_history_go(session->bw, entry, new_window);
+
+ return NSERROR_OK;
}
/* exported interface documented in desktop/local_history.h */
@@ -109,15 +397,13 @@ nserror
local_history_set(struct local_history_session *session,
struct browser_window *bw)
{
- int width;
- int height;
-
session->bw = bw;
if (bw != NULL) {
- browser_window_history_size(session->bw, &width, &height);
+ assert(session->bw->history != NULL);
session->cw_t->update_size(session->core_window_handle,
- width, height);
+ session->bw->history->width,
+ session->bw->history->height);
}
return NSERROR_OK;
@@ -130,10 +416,8 @@ local_history_get_size(struct local_history_session *session,
int *width,
int *height)
{
-
- browser_window_history_size(session->bw, width, height);
- *width += 20;
- *height += 20;
+ *width = session->bw->history->width + 20;
+ *height = session->bw->history->height + 20;
return NSERROR_OK;
}
@@ -143,15 +427,20 @@ local_history_get_size(struct local_history_session *session,
nserror
local_history_get_url(struct local_history_session *session,
int x, int y,
- const char **url_out)
+ nsurl **url_out)
{
- const char *url;
- url = browser_window_history_position_url(session->bw, x, y);
- if (url == NULL) {
+ struct history_entry *entry;
+
+ if (session->bw == NULL) {
+ return NSERROR_BAD_PARAMETER;
+ }
+
+ entry = find_entry_position(session->bw->history->start, x, y);
+ if (entry == NULL) {
return NSERROR_NOT_FOUND;
}
- *url_out = url;
+ *url_out = nsurl_ref(entry->page.url);
return NSERROR_OK;
}
diff --git a/desktop/local_history.h b/desktop/local_history.h
index 2ce2a5c..7f85a63 100644
--- a/desktop/local_history.h
+++ b/desktop/local_history.h
@@ -35,14 +35,15 @@ struct browser_window;
/**
* Initialise the local history.
*
- * This iterates through the URL database, generating the local history data,
- * and creates a treeview.
+ * This iterates through the history object of a browser window and
+ * creates tree of visited pages with thumbnails which may be selected
+ * to cause navigation.
*
* This must be called before any other local_history_* function.
*
- * \param cw_t Callback table for core_window containing the treeview.
- * \param core_window_handle The core_window in which the treeview is shown.
- * \param bw browser window to show history of.
+ * \param[in] cw_t Callback table for core_window containing the treeview.
+ * \param[in] core_window_handle The core_window in which the treeview is shown.
+ * \param[in] bw browser window to show history of.
* \param[out] session The created local history session context.
* \return NSERROR_OK on success and session set, appropriate error code otherwise
*/
@@ -54,12 +55,12 @@ nserror local_history_init(struct core_window_callback_table *cw_t,
/**
* Finalise the local history.
*
- * This destroys the local history treeview and the local history module's
- * internal data. After calling this if ocall history is required again,
- * local_history_init must be called.
+ * This destroys the local history view and the local history module's
+ * internal data. After calling this if local history is required again,
+ * local_history_init must be called to create a new session.
*
* \param session The local history session to finalise.
- * \return NSERROR_OK on success, appropriate error otherwise
+ * \return NSERROR_OK on success and session freed appropriate error otherwise
*/
nserror local_history_fini(struct local_history_session *session);
@@ -67,42 +68,53 @@ nserror local_history_fini(struct local_history_session *session);
/**
* Redraw the local history.
*
- * \param session The local history session context.
- * \param x X coordinate to render history at
- * \param y Y coordinate to render history at
- * \param clip Current clip rectangle (wrt tree origin)
- * \param ctx Current redraw context
+ * Causes the local history viewer to issue plot operations to redraw
+ * the specified area of the viewport.
+ *
+ * \param[in] session The local history session context.
+ * \param[in] x X coordinate to render history at
+ * \param[in] y Y coordinate to render history at
+ * \param[in] clip Current clip rectangle (wrt tree origin)
+ * \param[in] ctx Current redraw context
*/
nserror local_history_redraw(struct local_history_session *session, int x, int y, struct rect *clip, const struct redraw_context *ctx);
+
/**
* Handles all kinds of mouse action
*
- * \param session The local history session context.
- * \param mouse The current mouse state
- * \param x X coordinate
- * \param y Y coordinate
+ * \param[in] session The local history session context.
+ * \param[in] mouse The current mouse state
+ * \param[in] x The current mouse X coordinate
+ * \param[in] y The current mouse Y coordinate
+ * \return NSERROR_OK if mouse action was processed.
+ * NSERROR_NOT_FOUND if nothing under the pointer where it was clicked
+ * NSERROR_NOT_IMPLEMENTED if the action was not processed.
+ * NSERROR_PERMISSION if the clicked item was the current page
*/
-void local_history_mouse_action(struct local_history_session *session, enum browser_mouse_state mouse, int x, int y);
+nserror local_history_mouse_action(struct local_history_session *session, enum browser_mouse_state mouse, int x, int y);
+
/**
* Key press handling.
*
- * \param session The local history session context.
- * \param key The ucs4 character codepoint
+ * \param[in] session The local history session context.
+ * \param[in] key The ucs4 character codepoint
* \return true if the keypress is dealt with, false otherwise.
*/
bool local_history_keypress(struct local_history_session *session, uint32_t key);
+
/**
* Change the browser window to draw local history for.
*
- * \param session The local history session context.
+ * \param[in] session The local history session context.
* \param bw browser window to show history of.
* \return NSERROR_OK or appropriate error code.
*/
nserror local_history_set(struct local_history_session *session, struct browser_window *bw);
+
/**
* get size of local history content area.
*
@@ -113,6 +125,7 @@ nserror local_history_set(struct local_history_session *session, struct browser_
*/
nserror local_history_get_size(struct local_history_session *session, int *width, int *height);
+
/**
* get url of entry at position in local history content area.
*
@@ -121,10 +134,11 @@ nserror local_history_get_size(struct local_history_session *session, int *width
* \param[in] session The local history session context.
* \param[in] x The x coordinate to get url of.
* \param[in] y The y coordinate to get url of.
- * \param[out] url_out string representation of the url at the coordinates.
+ * \param[out] url_out referenced url.
* \return NSERROR_OK and url_out updated or NSERROR_NOT_FOUND if no url at
* location.
*/
-nserror local_history_get_url(struct local_history_session *session, int x, int y, const char **url_out);
+nserror local_history_get_url(struct local_history_session *session, int x, int y, struct nsurl **url_out);
+
#endif
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/Docs/Doxyfile b/docs/Doxyfile
similarity index 99%
rename from Docs/Doxyfile
rename to docs/Doxyfile
index f3fdd1e..e549981 100644
--- a/Docs/Doxyfile
+++ b/docs/Doxyfile
@@ -753,7 +753,10 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.
-INPUT = frontends/amiga \
+INPUT = docs \
+ docs/env.sh \
+ docs/UnimplementedJavascript.txt \
+ frontends/amiga \
frontends/amiga/stringview \
frontends/atari \
frontends/atari/plot \
@@ -780,8 +783,7 @@ INPUT = frontends/amiga \
content/handlers/javascript \
content/handlers/javascript/duktape \
utils \
- utils/http \
- Docs/UnimplementedJavascript.txt
+ utils/http
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -806,7 +808,8 @@ FILE_PATTERNS = *.c \
*.y \
*.l \
*.cpp \
- *.m
+ *.m \
+ *.md
# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.
@@ -922,7 +925,7 @@ FILTER_SOURCE_PATTERNS =
# (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output.
-USE_MDFILE_AS_MAINPAGE =
+USE_MDFILE_AS_MAINPAGE = mainpage.md
#---------------------------------------------------------------------------
# Configuration options related to source browsing
diff --git a/Docs/PACKAGING-GTK b/docs/PACKAGING-GTK
similarity index 100%
rename from Docs/PACKAGING-GTK
rename to docs/PACKAGING-GTK
diff --git a/Docs/UnimplementedJavascript.txt b/docs/UnimplementedJavascript.txt
similarity index 100%
rename from Docs/UnimplementedJavascript.txt
rename to docs/UnimplementedJavascript.txt
diff --git a/Docs/BUILDING-AmigaCross b/docs/building-AmigaCross.md
similarity index 100%
rename from Docs/BUILDING-AmigaCross
rename to docs/building-AmigaCross.md
diff --git a/Docs/BUILDING-AmigaOS b/docs/building-AmigaOS.md
similarity index 100%
rename from Docs/BUILDING-AmigaOS
rename to docs/building-AmigaOS.md
diff --git a/Docs/BUILDING-Framebuffer b/docs/building-Framebuffer.md
similarity index 100%
rename from Docs/BUILDING-Framebuffer
rename to docs/building-Framebuffer.md
diff --git a/Docs/BUILDING-GTK b/docs/building-GTK.md
similarity index 100%
rename from Docs/BUILDING-GTK
rename to docs/building-GTK.md
diff --git a/Docs/BUILDING-BeOS b/docs/building-Haiku.md
similarity index 100%
rename from Docs/BUILDING-BeOS
rename to docs/building-Haiku.md
diff --git a/Docs/BUILDING-Windows b/docs/building-Windows.md
similarity index 100%
rename from Docs/BUILDING-Windows
rename to docs/building-Windows.md
diff --git a/docs/core-window-interface.md b/docs/core-window-interface.md
new file mode 100644
index 0000000..8f6951f
--- /dev/null
+++ b/docs/core-window-interface.md
@@ -0,0 +1,677 @@
+Core Window Interface
+=====================
+
+The NetSurf core provides an optional API to frontend implementations
+which allows a number of "standard" window content interfaces to be
+provided.
+
+The currently available user interfaces are:
+
+ - Cookies
+ - Global history
+ - Hotlist
+ - SSL certificate view
+ - local history
+
+Although not currently included in future additional user interfaces
+will be available for the main browser render.
+
+To be clear these are generic implementations of this functionality
+that any frontend may use. Frontends are free to implement these
+interfaces in any manner as they see fit, the corewindow interface
+simply provides a default.
+
+core window API
+---------------
+
+The API is fairly simple and simply involves passing a callback table
+and context pointer to the interface element being constructed.
+
+The header that defines the callback interface is netsurf/core_window.h
+
+The callback table contains five function pointer interfaces which the
+frontend must implement for the core.
+
+ - invalidate
+ invalidate an area of a window
+
+ - update_size
+ Update the limits of the window
+
+ - scroll_visible
+ Scroll the window to make area visible
+
+ - get_window_dimensions
+ Get window viewport dimensions
+
+ - drag_status
+ Inform corewindow owner of drag status
+
+Each callback will be passed the context pointer for the corewindow
+instance and the relevant additional information necessary to perform
+the operation.
+
+Each exported user interface element wraps this generic interface with
+a concrete implementation. For example the SSL certificate viewer is
+initialised with:
+
+ nserror sslcert_viewer_init(struct core_window_callback_table *cw_t,
+ void *core_window_handle,
+ struct sslcert_session_data *ssl_d);
+
+This call creates a context which will display and navigate the ssl
+session data passed. The frontend must service the callbacks from the
+core to provide the necessary interactions with the frontend windowing
+system.
+
+These actions should ideally use the standard frontend window
+processing. So for the GTK frontend when the core calls the invalidate
+operation it simply marks the area passed as damaged (using
+gtk_widget_queue_draw_area()) and lets the standard expose event cause
+the redraw to occur.
+
+If the frontend needs to redraw an area of a window (perhaps an expose
+event occurred or the window has had an area marked as invalid) it
+must call the core window API wrappers implementation which will
+perform the plot operations required to update an area of the window.
+
+e.g in the case of ssl certificate viewer
+
+ void sslcert_viewer_redraw(struct sslcert_session_data *ssl_d,
+ int x, int y, struct rect *clip,
+ const struct redraw_context *ctx);
+
+would perform the plot operations for that SSL data window.
+
+Usage
+-----
+
+The usage pattern that is expected is for a frontend to create a core
+window implementation that implements the necessary five API in a
+generic way and allows the frontend to provide the specific
+specialisation for each of the user interface elements it wishes to
+use (cookies, SSL viewer etc).
+
+The GTK frontend for example:
+
+has source corewindow.[ch] which implement the five core callbacks
+using generic GTK operations (invalidate calls
+gtk_widget_queue_draw_area() etc.) and then provides additional
+operations on a GTK drawing area object to attach expose event
+processing, keypress processing etc.
+
+The GTK corewindow (not to be confused with the core window API
+itself, this is purely the gtk wrapper) is used by ssl_cert.c which
+creates a nsgtk_crtvrfy_window structure containing the
+nsgtk_corewindow structure. It attaches actual GTK window handles to
+this structure and populates elements of nsgtk_corewindow and then
+calls sslcert_viewer_init() directly.
+
+frontend skeleton
+-----------------
+
+An example core window implementation for a frontend ssl certificate
+viewer is presented here. This implements the suggested usage above
+and provides generic corewindow helpers.
+
+
+frontends/example/corewindow.h
+------------------------------
+
+ /*
+ * Copyright 2016 Vincent Sanders <vince(a)netsurf-browser.org>
+ *
+ * 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 EXAMPLE_COREWINDOW_H
+ #define EXAMPLE_COREWINDOW_H
+
+ #include "netsurf/core_window.h"
+
+ /**
+ * example core window state
+ */
+ struct example_corewindow {
+
+
+ /*
+ * Any variables common to any frontend window would go here.
+ * e.g. drawing area handles, toolkit pointers or other state
+ */
+ example_toolkit_widget *tk_widget;
+
+
+
+ /** drag status set by core */
+ core_window_drag_status drag_status;
+
+ /** table of callbacks for core window operations */
+ struct core_window_callback_table *cb_table;
+
+ /**
+ * callback to draw on drawable area of example core window
+ *
+ * \param example_cw The example core window structure.
+ * \param r The rectangle of the window that needs updating.
+ * \return NSERROR_OK on success otherwise apropriate error code
+ */
+ nserror (*draw)(struct example_corewindow *example_cw, struct rect *r);
+
+ /**
+ * callback for keypress on example core window
+ *
+ * \param example_cw The example core window structure.
+ * \param nskey The netsurf key code.
+ * \return NSERROR_OK if key processed,
+ * NSERROR_NOT_IMPLEMENTED if key not processed
+ * otherwise apropriate error code
+ */
+ nserror (*key)(struct example_corewindow *example_cw, uint32_t nskey);
+
+ /**
+ * callback for mouse event on example core window
+ *
+ * \param example_cw The example core window structure.
+ * \param mouse_state mouse state
+ * \param x location of event
+ * \param y location of event
+ * \return NSERROR_OK on sucess otherwise apropriate error code.
+ */
+ nserror (*mouse)(struct example_corewindow *example_cw, browser_mouse_state mouse_state, int x, int y);
+ };
+
+ /**
+ * initialise elements of example core window.
+ *
+ * As a pre-requisite the draw, key and mouse callbacks must be defined
+ *
+ * \param example_cw A example core window structure to initialise
+ * \return NSERROR_OK on successful initialisation otherwise error code.
+ */
+ nserror example_corewindow_init(struct example_corewindow *example_cw);
+
+ /**
+ * finalise elements of example core window.
+ *
+ * \param example_cw A example core window structure to initialise
+ * \return NSERROR_OK on successful finalisation otherwise error code.
+ */
+ nserror example_corewindow_fini(struct example_corewindow *example_cw);
+
+ #endif
+
+frontends/example/corewindow.c
+------------------------------
+
+ /*
+ * Copyright 2016 Vincent Sanders <vince(a)netsurf-browser.org>
+ *
+ * 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/>.
+ */
+
+ /**
+ * file
+ * EXAMPLE generic core window interface.
+ *
+ * Provides interface for core renderers to the example toolkit drawable area.
+ *
+ * This module is an object that must be encapsulated. Client users
+ * should embed a struct example_corewindow at the beginning of their
+ * context for this display surface, fill in relevant data and then
+ * call example_corewindow_init()
+ *
+ * The example core window structure requires the callback for draw, key and
+ * mouse operations.
+ */
+
+ #include <assert.h>
+ #include <string.h>
+ #include <math.h>
+
+ #include "utils/log.h"
+ #include "utils/utils.h"
+ #include "utils/messages.h"
+ #include "utils/utf8.h"
+ #include "netsurf/keypress.h"
+ #include "netsurf/mouse.h"
+ #include "netsurf/plot_style.h"
+
+ /* extremely likely there will be additional headers required in a real frontend */
+ #include "example/corewindow.h"
+
+
+ /* toolkit event handlers that do generic things and call internal callbacks */
+
+
+ static bool
+ example_cw_mouse_press_event(toolkit_widget *widget, toolkit_button bt, int x, int y, void *ctx)
+ {
+ struct example_corewindow *example_cw = (struct example_corewindow *)ctx;
+
+ example_cw->mouse(example_cw, state, x, y);
+
+ return true;
+ }
+
+ static bool
+ example_cw_keyrelease_event(toolkit_widget *widget, void *ctx)
+ {
+ struct example_corewindow *example_cw = (struct example_corewindow *)ctx;
+
+ example_cw->key(example_cw, keycode);
+
+ return true;
+ }
+
+
+
+ /* signal handler for toolkit window redraw */
+ static bool
+ example_cw_draw_event(toolkit_widget *widget,
+ toolkit_area *tk_area,
+ void *ctx)
+ {
+ struct example_corewindow *example_cw = (struct example_corewindow *)ctx;
+ struct rect clip;
+
+ clip.x0 = tk_area.x;
+ clip.y0 = tk_area.y;
+ clip.x1 = tk_area.width;
+ clip.y1 = tk_area.height;
+
+ example_cw->draw(example_cw, &clip);
+
+ return true;
+ }
+
+
+ /**
+ * callback from core to request a redraw
+ */
+ static nserror
+ example_cw_invalidate(struct core_window *cw, const struct rect *r)
+ {
+ struct example_corewindow *example_cw = (struct example_corewindow *)cw;
+
+ toolkit_widget_queue_draw_area(example_cw->widget,
+ r->x0, r->y0,
+ r->x1 - r->x0, r->y1 - r->y0);
+ }
+
+
+ static void
+ example_cw_update_size(struct core_window *cw, int width, int height)
+ {
+ struct example_corewindow *example_cw = (struct example_corewindow *)cw;
+
+ toolkit_widget_set_size_request(EXAMPLE_WIDGET(example_cw->drawing_area),
+ width, height);
+ }
+
+
+ static void
+ example_cw_scroll_visible(struct core_window *cw, const struct rect *r)
+ {
+ struct example_corewindow *example_cw = (struct example_corewindow *)cw;
+
+ toolkit_scroll_widget(example_cw->widget, r);
+ }
+
+
+ static void
+ example_cw_get_window_dimensions(struct core_window *cw, int *width, int *height)
+ {
+ struct example_corewindow *example_cw = (struct example_corewindow *)cw;
+
+ *width = toolkit_get_widget_width(example_cw->widget);
+ *height = toolkit_get_widget_height(example_cw->widget);
+ }
+
+
+ static void
+ example_cw_drag_status(struct core_window *cw, core_window_drag_status ds)
+ {
+ struct example_corewindow *example_cw = (struct example_corewindow *)cw;
+ example_cw->drag_status = ds;
+ }
+
+
+ struct core_window_callback_table example_cw_cb_table = {
+ .invalidate = example_cw_invalidate,
+ .update_size = example_cw_update_size,
+ .scroll_visible = example_cw_scroll_visible,
+ .get_window_dimensions = example_cw_get_window_dimensions,
+ .drag_status = example_cw_drag_status
+ };
+
+ /* exported function documented example/corewindow.h */
+ nserror example_corewindow_init(struct example_corewindow *example_cw)
+ {
+ /* setup the core window callback table */
+ example_cw->cb_table = &example_cw_cb_table;
+
+ /* frontend toolkit specific method of causing example_cw_draw_event to be called when a drawing operation is required */
+ toolkit_connect_draw_event(example_cw->tk_widget,
+ example_cw_draw_event,
+ example_cw);
+
+ /* frontend toolkit specific method of causing example_cw_button_press_event to be called when a button press occours */
+ toolkit_connect_button_press_event(example_cw->tk_widget,
+ example_cw_button_press_event,
+ example_cw);
+
+ /* frontend toolkit specific method of causing example_cw_button_release_event to be called when a button release occours */
+ toolkit_connect_button_release_event(example_cw->tk_widget,
+ example_cw_button_release_event,
+ example_cw);
+
+ /* frontend toolkit specific method of causing example_cw_motion_notify_event to be called when there is motion over the widget */
+ toolkit_connect_motion_event(example_cw->tk_widget,
+ example_cw_motion_notify_event,
+ example_cw);
+
+ /* frontend toolkit specific method of causing example_cw_key_press_event to be called when a key press occours */
+ toolkit_connect_button_press_event(example_cw->tk_widget,
+ example_cw_key_press_event,
+ example_cw);
+
+ /* frontend toolkit specific method of causing example_cw_key_release_event to be called when a key release occours */
+ toolkit_connect_button_release_event(example_cw->tk_widget,
+ example_cw_key_release_event,
+ example_cw);
+
+
+ return NSERROR_OK;
+ }
+
+ /* exported interface documented in example/corewindow.h */
+ nserror example_corewindow_fini(struct example_corewindow *example_cw)
+ {
+ return NSERROR_OK;
+ }
+
+
+frontends/example/ssl_cert.h
+----------------------------
+
+ /*
+ * Copyright 2016 Vincent Sanders <vince(a)netsurf-browser.org>
+ *
+ * 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 NETSURF_EXAMPLE_SSL_CERT_H
+ #define NETSURF_EXAMPLE_SSL_CERT_H 1
+
+ struct nsurl;
+ struct ssl_cert_info;
+
+ /**
+ * Prompt the user to verify a certificate with issuse.
+ *
+ * \param url The URL being verified.
+ * \param certs The certificate to be verified
+ * \param num The number of certificates to be verified.
+ * \param cb Callback upon user decision.
+ * \param cbpw Context pointer passed to cb
+ * \return NSERROR_OK or error code if prompt creation failed.
+ */
+ nserror example_cert_verify(struct nsurl *url, const struct ssl_cert_info *certs, unsigned long num, nserror (*cb)(bool proceed, void *pw), void *cbpw);
+
+ #endif
+
+frontends/example/ssl_cert.c
+----------------------------
+
+ /*
+ * Copyright 2015 Vincent Sanders <vince(a)netsurf-browser.org>
+ *
+ * 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/>.
+ */
+
+ /**
+ * file
+ * Implementation of example certificate viewing using example core windows.
+ */
+
+ #include <stdint.h>
+ #include <stdlib.h>
+
+ #include "utils/log.h"
+ #include "netsurf/keypress.h"
+ #include "netsurf/plotters.h"
+ #include "desktop/sslcert_viewer.h"
+
+ #include "example/corewindow.h"
+
+
+ /**
+ * EXAMPLE certificate viewing window context
+ */
+ struct example_crtvrfy_window {
+ /** example core window context */
+ struct example_corewindow core;
+
+ /** SSL certificate viewer context data */
+ struct sslcert_session_data *ssl_data;
+ };
+
+ /**
+ * destroy a previously created certificate view
+ */
+ static nserror example_crtvrfy_destroy(struct example_crtvrfy_window *crtvrfy_win)
+ {
+ nserror res;
+
+ res = sslcert_viewer_fini(crtvrfy_win->ssl_data);
+ if (res == NSERROR_OK) {
+ res = example_corewindow_fini(&crtvrfy_win->core);
+ toolkit_windown_destroy(crtvrfy_win->window);
+ free(crtvrfy_win);
+ }
+ return res;
+ }
+
+ static void
+ example_crtvrfy_accept(ExampleButton *w, gpointer data)
+ {
+ struct example_crtvrfy_window *crtvrfy_win;
+ crtvrfy_win = (struct example_crtvrfy_window *)data;
+
+ sslcert_viewer_accept(crtvrfy_win->ssl_data);
+
+ example_crtvrfy_destroy(crtvrfy_win);
+ }
+
+ static void
+ example_crtvrfy_reject(ExampleWidget *w, gpointer data)
+ {
+ struct example_crtvrfy_window *crtvrfy_win;
+ crtvrfy_win = (struct example_crtvrfy_window *)data;
+
+ sslcert_viewer_reject(crtvrfy_win->ssl_data);
+
+ example_crtvrfy_destroy(crtvrfy_win);
+ }
+
+
+ /**
+ * callback for mouse action for certificate verify on core window
+ *
+ * \param example_cw The example core window structure.
+ * \param mouse_state netsurf mouse state on event
+ * \param x location of event
+ * \param y location of event
+ * \return NSERROR_OK on success otherwise apropriate error code
+ */
+ static nserror
+ example_crtvrfy_mouse(struct example_corewindow *example_cw,
+ browser_mouse_state mouse_state,
+ int x, int y)
+ {
+ struct example_crtvrfy_window *crtvrfy_win;
+ /* technically degenerate container of */
+ crtvrfy_win = (struct example_crtvrfy_window *)example_cw;
+
+ sslcert_viewer_mouse_action(crtvrfy_win->ssl_data, mouse_state, x, y);
+
+ return NSERROR_OK;
+ }
+
+ /**
+ * callback for keypress for certificate verify on core window
+ *
+ * \param example_cw The example core window structure.
+ * \param nskey The netsurf key code
+ * \return NSERROR_OK on success otherwise apropriate error code
+ */
+ static nserror
+ example_crtvrfy_key(struct example_corewindow *example_cw, uint32_t nskey)
+ {
+ struct example_crtvrfy_window *crtvrfy_win;
+
+ /* technically degenerate container of */
+ crtvrfy_win = (struct example_crtvrfy_window *)example_cw;
+
+ if (sslcert_viewer_keypress(crtvrfy_win->ssl_data, nskey)) {
+ return NSERROR_OK;
+ }
+ return NSERROR_NOT_IMPLEMENTED;
+ }
+
+ /**
+ * callback on draw event for certificate verify on core window
+ *
+ * \param example_cw The example core window structure.
+ * \param r The rectangle of the window that needs updating.
+ * \return NSERROR_OK on success otherwise apropriate error code
+ */
+ static nserror
+ example_crtvrfy_draw(struct example_corewindow *example_cw, struct rect *r)
+ {
+ struct redraw_context ctx = {
+ .interactive = true,
+ .background_images = true,
+ .plot = &example_plotters
+ };
+ struct example_crtvrfy_window *crtvrfy_win;
+
+ /* technically degenerate container of */
+ crtvrfy_win = (struct example_crtvrfy_window *)example_cw;
+
+ sslcert_viewer_redraw(crtvrfy_win->ssl_data, 0, 0, r, &ctx);
+
+ return NSERROR_OK;
+ }
+
+ /* exported interface documented in example/ssl_cert.h */
+ nserror example_cert_verify(struct nsurl *url,
+ const struct ssl_cert_info *certs,
+ unsigned long num,
+ nserror (*cb)(bool proceed, void *pw),
+ void *cbpw)
+ {
+ struct example_crtvrfy_window *ncwin;
+ nserror res;
+
+ ncwin = malloc(sizeof(struct example_crtvrfy_window));
+ if (ncwin == NULL) {
+ return NSERROR_NOMEM;
+ }
+
+ res = toolkit_create_window(&ncwin->window);
+ if (res != NSERROR_OK) {
+ LOG("SSL UI builder init failed");
+ free(ncwin);
+ return res;
+ }
+
+ /* store the widget that the toolkit is drawing into */
+ ncwin->core.widget = toolkit_get_widget(ncwin->window, "SSLDrawingArea"));
+
+ /* would typicaly setup toolkit accept/reject buttons etc. here */
+ toolkit_connect_button_press(ncwin->tk_accept_button,
+ example_crtvrfy_accept,
+ ncwin);
+
+
+ /* initialise example core window */
+ ncwin->core.draw = example_crtvrfy_draw;
+ ncwin->core.key = example_crtvrfy_key;
+ ncwin->core.mouse = example_crtvrfy_mouse;
+
+ res = example_corewindow_init(&ncwin->core);
+ if (res != NSERROR_OK) {
+ free(ncwin);
+ return res;
+ }
+
+ /* initialise certificate viewing interface */
+ res = sslcert_viewer_create_session_data(num, url, cb, cbpw, certs,
+ &ncwin->ssl_data);
+ if (res != NSERROR_OK) {
+ free(ncwin);
+ return res;
+ }
+
+ res = sslcert_viewer_init(ncwin->core.cb_table,
+ (struct core_window *)ncwin,
+ ncwin->ssl_data);
+ if (res != NSERROR_OK) {
+ free(ncwin);
+ return res;
+ }
+
+ toolkit_widget_show(ncwin->window);
+
+ return NSERROR_OK;
+ }
diff --git a/Docs/env.sh b/docs/env.sh
similarity index 98%
rename from Docs/env.sh
rename to docs/env.sh
index 9cfc956..518123e 100644
--- a/Docs/env.sh
+++ b/docs/env.sh
@@ -272,8 +272,8 @@ ns-clone()
done
# put current env.sh in place in workspace
- if [ ! -f "${TARGET_WORKSPACE}/env.sh" -a -f ${TARGET_WORKSPACE}/${NS_BROWSER}/Docs/env.sh ]; then
- cp ${TARGET_WORKSPACE}/${NS_BROWSER}/Docs/env.sh ${TARGET_WORKSPACE}/env.sh
+ if [ ! -f "${TARGET_WORKSPACE}/env.sh" -a -f ${TARGET_WORKSPACE}/${NS_BROWSER}/docs/env.sh ]; then
+ cp ${TARGET_WORKSPACE}/${NS_BROWSER}/docs/env.sh ${TARGET_WORKSPACE}/env.sh
fi
}
diff --git a/Docs/gource.sh b/docs/gource.sh
similarity index 100%
rename from Docs/gource.sh
rename to docs/gource.sh
diff --git a/Docs/ideas/cache.txt b/docs/ideas/cache.txt
similarity index 100%
rename from Docs/ideas/cache.txt
rename to docs/ideas/cache.txt
diff --git a/Docs/ideas/css-engine.txt b/docs/ideas/css-engine.txt
similarity index 100%
rename from Docs/ideas/css-engine.txt
rename to docs/ideas/css-engine.txt
diff --git a/Docs/ideas/render-library.txt b/docs/ideas/render-library.txt
similarity index 100%
rename from Docs/ideas/render-library.txt
rename to docs/ideas/render-library.txt
diff --git a/docs/mainpage.md b/docs/mainpage.md
new file mode 100644
index 0000000..41f26d4
--- /dev/null
+++ b/docs/mainpage.md
@@ -0,0 +1,93 @@
+NetSurf web browser
+===================
+
+ and
+[monkey](docs/using-monkey.md) frontends.
+
+The [core user options](docs/netsurf-options.md) of the browser are
+documented which are augmented by each frontend in a specific manner.
+
+Documented API
+--------------
+
+There are several documents which detail specific aspects of the
+codebase and APIs.
+
+### Core window
+
+The [core window API](docs/core-window-interface.md) allows frontends
+to use generic core code for user interface elements beyond the
+browser render.
+
+### Source object caching
+
+The [source object caching](docs/source-object-backing-store.md)
+provides a way for downloaded content to be kept on a persistent
+storage medium such as hard disc to make future retrieval of that
+content quickly.
+
+### Javascript
+
+JavaScript is provided by integrating the duktape library. There are [instructions](docs/updating-duktape.md) on how to update the library.
+
+A list of [unimplemented DOM and CSSOM methods](unimplemented.html)
+is available outlining the remaining API that have to be implemented.
+
+Development
+-----------
+
+Compiling a development edition of NetSurf requires a POSIX style
+environment. Typically this means a Linux based system although Free
+BSD, Open BSD, Mac OS X and Haiku all known to work.
+
+### Working with the team
+
+Generally it is sensible to check with the other developers if you are
+planning to make a change to NetSurf intended to be merged.
+
+We are often about on the IRC channel but failing that the developer
+mailing list is a good place to try.
+
+All the project sources are held in [public git repositories](http://source.netsurf-browser.org/)
+
+### Toolchains
+
+Compilation for non POSIX toolkits/frontends (e.g. RISC OS) generally
+relies upon a cross compilation environment which is generated using
+the makefiles found in our
+[toolchains](http://source.netsurf-browser.org/toolchains.git/)
+repository. These toolchains are built by the Continuous Integration
+(CI) system and the
+[results of the system](http://ci.netsurf-browser.org/builds/toolchains/)
+are published as a convenience.
+
+### Quick setup
+
+The [quick start guide](docs/quick-start.md) can be used to get a
+development environment setup quickly and uses the
+[env.sh](env_8sh_source.html) script the core team utilises.
+
+### Manual setup
+
+The Manual environment setup and compilation method is covered by the
+details in the [netsurf libraries](docs/netsurf-libraries.md) document
+for the core libraries and then one of the building documents for the
+specific frontend.
+
+- [Amiga Os cross](docs/building-AmigaCross.md) and [Amiga OS](docs/building-AmigaOS.md)
+- [Framebuffer](docs/building-Framebuffer.md)
+- [GTK](docs/building-GTK.md)
+- [Haiku (BeOS)](docs/building-Haiku.md)
+- [Windows Win32](docs/building-Windows.md)
+
+These documents are sometimes not completely up to
+date and the env.sh script should be considered canonical.
+
diff --git a/Docs/netsurf-fb.1 b/docs/netsurf-fb.1
similarity index 100%
rename from Docs/netsurf-fb.1
rename to docs/netsurf-fb.1
diff --git a/Docs/netsurf-gtk.1 b/docs/netsurf-gtk.1
similarity index 100%
rename from Docs/netsurf-gtk.1
rename to docs/netsurf-gtk.1
diff --git a/Docs/LIBRARIES b/docs/netsurf-libraries.md
similarity index 100%
rename from Docs/LIBRARIES
rename to docs/netsurf-libraries.md
diff --git a/Docs/Options b/docs/netsurf-options.md
similarity index 100%
rename from Docs/Options
rename to docs/netsurf-options.md
diff --git a/docs/quick-start.md b/docs/quick-start.md
new file mode 100644
index 0000000..8bc90de
--- /dev/null
+++ b/docs/quick-start.md
@@ -0,0 +1,111 @@
+Quick Build Steps for NetSurf
+=============================
+
+Last Updated: 24 February 2015
+
+This document provides steps for building NetSurf.
+
+
+Grab a temporary env.sh
+-----------------------
+
+ $ wget http://git.netsurf-browser.org/netsurf.git/plain/docs/env.sh
+ $ source env.sh
+
+
+Install any packages you need
+-----------------------------
+
+Installs all packages required to build NetSurf and the NetSurf project
+libraries.
+
+ $ ns-package-install
+
+If your package manager is not supported, you will have to install third
+ party packages manually.
+
+
+Get the NetSurf project source code from Git
+--------------------------------------------
+
+ $ ns-clone
+
+
+Build and install our project libraries
+---------------------------------------
+
+Updates NetSurf project library sources to latest, builds and installs them.
+
+ $ ns-pull-install
+
+
+Switch to new NetSurf workspace
+-------------------------------
+
+Remove the bootstrack script and use the newly installed one
+
+ $ rm env.sh
+ $ cd ~/dev-netsurf/workspace
+ $ source env.sh
+
+
+Build and run NetSurf
+---------------------
+
+ $ cd netsurf
+
+To build the native front end (the GTK front end on Linux, BSDs, etc) you
+could do:
+
+ $ make
+ $ ./nsgtk
+
+To build the framebuffer front end, you could do:
+
+ $ make TARGET=framebuffer
+ $ ./nsfb
+
+
+Cross Compiling
+===============
+
+If you are cross compiling, you can follow the above steps, but when
+sourcing env.sh, you should set HOST environment variable to the
+appropriate triplet for your cross compiler. For example, to cross
+compile for RISC OS:
+
+ $ HOST=arm-unknown-riscos source env.sh
+
+After that, the commands such as `ns-package-install` and
+`ns-pull-install` will do what is appropriate for the platform you
+are building for.
+
+To do the final build of NetSurf, pass the appropriate TARGET to make.
+For example, to cross compile for RISC OS:
+
+ $ make TARGET=riscos
+
+Finally, you can package up your build to transfer to the system you
+are developing for. For example, to produce a package for RISC OS:
+
+ $ make TARGET=riscos package
+
+Getting a cross compiler set up
+-------------------------------
+
+We maintain cross compilation environments and an SDK for a number of
+platforms. These may be found in our toolchains repository.
+
+ $ git clone git://git.netsurf-browser.org/toolchains
+
+Pre-built versions of the toolchains for Debian systems are often available
+via our [automated build and test infrastructure](http://ci.netsurf-browser.org/builds/toolchains/)
+
+
+Not working?
+============
+
+If the above steps are inapplicable, or don't work, you can build manually.
+Follow the instructions in the BUILDING-* documents in the docs/ directory
+the NetSurf browser source tree.
+
diff --git a/Docs/source-object-backing-store b/docs/source-object-backing-store.md
similarity index 100%
rename from Docs/source-object-backing-store
rename to docs/source-object-backing-store.md
diff --git a/Docs/unit-testing b/docs/unit-testing
similarity index 100%
rename from Docs/unit-testing
rename to docs/unit-testing
diff --git a/Docs/updating-duktape.md b/docs/updating-duktape.md
similarity index 72%
rename from Docs/updating-duktape.md
rename to docs/updating-duktape.md
index a3e5a79..672fccc 100644
--- a/Docs/updating-duktape.md
+++ b/docs/updating-duktape.md
@@ -13,11 +13,11 @@ Updating Duktape
2. Run the following command:
- python2 tools/configure.py \
- --output-directory /tmp/output \
- --source-directory src-input \
- --config-metadata config \
- --fixup-line '#include "duk_custom.h"'
+ python2 tools/configure.py \
+ --output-directory /tmp/output \
+ --source-directory src-input \
+ --config-metadata config \
+ --fixup-line '#include "duk_custom.h"'
3. This generates a suitable set of duktape
sources in `/tmp/output`
diff --git a/Docs/USING-Framebuffer b/docs/using-framebuffer.md
similarity index 100%
rename from Docs/USING-Framebuffer
rename to docs/using-framebuffer.md
diff --git a/docs/using-monkey.md b/docs/using-monkey.md
new file mode 100644
index 0000000..d6082bd
--- /dev/null
+++ b/docs/using-monkey.md
@@ -0,0 +1,373 @@
+Usage Instructions for Monkey NetSurf
+=====================================
+
+This document provides usage instructions for the Monkey version of NetSurf.
+
+Monkey NetSurf has been tested on Ubuntu and Debian.
+
+Overview
+--------
+
+### What it is
+
+The NetSurf Monkey front end is a developer debug tool used to test how the
+core interacts with the user interface. It allows the developers to profile
+NetSurf and to interact with the core directly as though the developer were a
+front end.
+
+### What it is not
+
+Monkey is not a tool for building web-crawling robots or indeed anything other
+than a debug tool for the NetSurf developers.
+
+### How to interact with `nsmonkey`
+
+In brief, `nsmonkey` will produce tagged output on stdout and expect
+commands on stdin. Windows are numbered and for the most part
+tokens are space separated. In some cases (e.g. title or status)
+the final element on the output line is a string which might have
+spaces embedded within it. As such, output from `nsmonkey` should be
+parsed a token at a time, so that when such a string is encountered,
+the parser can stop splitting and return the rest.
+
+Commands to `nsmonkey` are namespaced. For example commands related to
+browser windows are prefixed by `WINDOW`.
+
+### Top level tags for `nsmonkey`
+
+* `QUIT`
+
+* `WINDOW`
+
+* `OPTIONS`
+
+### Top level response tags for nsmonkey
+
+* `GENERIC`: Generic messages such as poll loops etc.
+
+* `WARN`, `ERROR`, `DIE`: Error messages of varying importance
+
+* `WINDOW`: Anything about browser windows in general
+
+* `DOWNLOAD_WINDOW`: Anything about the download window.
+
+* `SSLCERT`: Anything about SSL certificates
+
+* `401LOGIN`: Anything about HTTP Basic Authentication logins
+
+* `PLOT`: Plot calls which come from the core.
+
+In the below, _%something%_ indicates a substitution made by Monkey.
+
+* _%url%_ will be a URL
+* _%id%_ will be an opaque ID
+* _%n%_ will be a number
+* _%bool%_ will be TRUE or FALSE
+* _%str%_ is a string and will only ever be at the end of an output line.
+
+### Warnings, errors etc
+
+* Warnings (tagged `WARN`) come from the NetSurf core.
+* Errors (tagged `ERROR`) tend to come from Monkey's parsers
+* Death (tagged `DIE`) comes from the core and kills Monkey dead.
+
+Commands
+--------
+
+### Generic commands
+
+* `QUIT`
+
+ Cause monkey to quit cleanly.
+ This will cleanly destroy open windows etc.
+
+* `OPTIONS` _%str_
+
+ Cause monkey to set options. The passed options should be in the same
+ form as the command line, e.g. `OPTIONS --enable_javascript=1`
+
+
+### Window commands
+
+* `WINDOW NEW` [_%url%_]
+
+ Create a new browser window, optionally giving the core
+ a URL to immediately navigate to.
+ Minimally you will receive a `WINDOW NEW WIN` _%id%_ response.
+
+* `WINDOW DESTROY` _%id%_
+
+ Destroy the given browser window.
+ Minimally you will receive a `WINDOW DESTROY WIN` _%id%_ response.
+
+* `WINDOW GO` _%id%_ _%url%_ [_%url%_]
+
+ Cause the given browser window to visit the given URL.
+ Optionally you can give a referrer URL to also use (simulating
+ a click in the browser on a link).
+ Minimally you can expect throbber, url etc responses.
+
+* `WINDOW REDRAW` _%id%_ [_%num% %num% %num% %num%_]
+
+ Cause a browser window to redraw. Optionally you can give a
+ set of coordinates to simulate a partial expose of the window.
+ Said coordinates are in traditional X0 Y0 X1 Y1 order.
+ The coordinates are in canvas, not window, coordinates. So you
+ should take into account the scroll offsets when issuing this
+ command.
+ Minimally you can expect redraw start/stop messages and you
+ can likely expect some number of `PLOT` results.
+
+* `WINDOW RELOAD` _%id%_
+
+ Cause a browser window to reload its current content.
+ Expect responses similar to a GO command.
+
+
+Responses
+---------
+
+### Generic messages
+
+* `GENERIC STARTED`
+
+ Monkey has started and is ready for commands
+
+* `GENERIC CLOSING_DOWN`
+
+ Monkey has been told to shut down and is doing so
+
+* `GENERIC FINISHED`
+
+ Monkey has finished and will now exit
+
+* `GENERIC LAUNCH URL` _%url%_
+
+ The core asked monkey to launch the given URL
+
+* `GENERIC THUMBNAIL URL` _%url%_
+
+ The core asked monkey to thumbnail a content without
+ a window.
+
+* `GENERIC POLL BLOCKING`
+* `GENERIC POLL TIMED` _%n%_
+
+ Monkey reached a point where it could sleep waiting for
+ commands or scheduled timeouts. No fetches nor redraws
+ were pending. If there are no timeouts or other pending
+ jobs then this will be a BLOCKING poll, otherwise the number
+ given is in milliseconds.
+
+### Window messages
+
+* `WINDOW NEW WIN` _%id%_ `FOR` _%id%_ `CLONE` _%id%_ `NEWTAB` _%bool%_
+
+ The core asked Monkey to open a new window. The IDs for `FOR` and
+ `CLONE` are core window IDs, the `WIN` id is a Monkey window ID.
+
+* `WINDOW SIZE WIN` _%id%_ `WIDTH` _%n%_ `HEIGHT` _%n%_
+
+ The window specified has been set to the shown width and height.
+
+* `WINDOW DESTROY WIN` _%id%_
+
+ The core has instructed Monkey to destroy the named window.
+
+* `WINDOW TITLE WIN` _%id%_ `STR` _%str%_
+
+ The core supplied a titlebar title for the given window.
+
+* `WINDOW REDRAW WIN` _%id%_
+
+ The core asked that Monkey redraw the given window.
+
+* `WINDOW GET_DIMENSIONS WIN` _%id%_ `WIDTH` _%n%_ `HEIGHT` _%n%_
+
+ The core asked Monkey what the dimensions of the window are.
+ Monkey has to respond immediately and returned the supplied width
+ and height values to the core.
+
+* `WINDOW NEW_CONTENT WIN` _%id%_
+
+ The core has informed Monkey that the named window has a new
+ content object.
+
+* `WINDOW NEW_ICON WIN` _%id%_
+
+ The core has informed Monkey that the named window has a new
+ icon (favicon) available.
+
+* `WINDOW START_THROBBER WIN` _%id%_
+
+ The core asked Monkey to start the throbber for the named
+ window. This indicates to the user that the window is busy.
+
+* `WINDOW STOP_THROBBER WIN` _%id%_
+
+ The core asked Monkey to stop the throbber for the named
+ window. This indicates to the user that the window is finished.
+
+* `WINDOW SET_SCROLL WIN` _%id%_ `X` _%n%_ `Y` _%n%_
+
+ The core asked Monkey to set the named window's scroll offsets
+ to the given X and Y position.
+
+* `WINDOW UPDATE_BOX WIN` _%id%_ `X` _%n%_ `Y` _%n%_ `WIDTH` _%n%_ `HEIGHT` _%n%_
+
+ The core asked Monkey to redraw the given portion of the content
+ display. Note these coordinates refer to the content, not the
+ viewport which Monkey is simulating.
+
+* `WINDOW UPDATE_EXTENT WIN` _%id%_ `WIDTH` _%n%_ `HEIGHT` _%n%_
+
+ The core has told us that the content in the given window has a
+ total width and height as shown. This allows us (along with the
+ window's width and height) to know the scroll limits.
+
+* `WINDOW SET_STATUS WIN` _%id%_ `STR` _%str%_
+
+ The core has told us that the given window needs its status bar
+ updating with the given message.
+
+* `WINDOW SET_POINTER WIN` _%id%_ `POINTER` _%id%_
+
+ The core has told us to update the mouse pointer for the given
+ window to the given pointer ID.
+
+* `WINDOW SET_SCALE WIN` _%id%_ `SCALE` _%n%_
+
+ The core has asked us to scale the given window by the given scale
+ factor.
+
+* `WINDOW SET_URL WIN` _%id%_ `URL` _%url%_
+
+ The core has informed us that the given window's URL bar needs
+ updating to the given url.
+
+* `WINDOW GET_SCROLL WIN` _%id%_ `X` _%n%_ `Y` _%n%_
+
+ The core asked Monkey for the scroll offsets. Monkey returned the
+ numbers shown for the window named.
+
+* `WINDOW SCROLL_START WIN` _%id%_
+
+ The core asked Monkey to scroll the named window to the top/left.
+
+* `WINDOW POSITION_FRAME WIN` _%id%_ `X0` _%n%_ `Y0` _%n%_ `X1` _%n%_ `Y1` _%n%_
+
+ The core asked Monkey to position the named window as a frame at
+ the given coordinates of its parent.
+
+* `WINDOW SCROLL_VISIBLE WIN` _%id%_ `X0` _%n%_ `Y0` _%n%_ `X1` _%n%_ `Y1` _%n%_
+
+ The core asked Monkey to scroll the named window until the
+ indicated box is visible.
+
+* `WINDOW PLACE_CARET WIN` _%id%_ `X` _%n%_ `Y` _%n%_ `HEIGHT` _%n%_
+
+ The core asked Monkey to render a caret in the named window at the
+ indicated position with the indicated height.
+
+* `WINDOW REMOVE_CARET WIN` _%id%_
+
+ The core asked Monkey to remove any caret in the named window.
+
+* `WINDOW SCROLL_START WIN` _%id%_ `X0` _%n%_ `Y0` _%n%_ `X1` _%n%_ `Y1` _%n%_
+
+ The core asked Monkey to scroll the named window to the start of
+ the given box.
+
+* `WINDOW SELECT_MENU WIN` _%id%_
+
+ The core asked Monkey to produce a selection menu for the named
+ window.
+
+* `WINDOW SAVE_LINK WIN` _%id%_ `URL` _%url%_ `TITLE` _%str%_
+
+ The core asked Monkey to save a link from the given window with
+ the given URL and anchor title.
+
+* `WINDOW THUMBNAIL WIN` _%id%_ `URL` _%url%_
+
+ The core asked Monkey to render a thumbnail for the given window
+ which is currently at the given URL.
+
+* `WINDOW REDRAW WIN` _%id%_ `START`
+
+ and
+
+ `WINDOW REDRAW WIN` _%id%_ `STOP`
+
+ The core wraps redraws in these messages. Thus `PLOT` responses can
+ be allocated to the appropriate window.
+
+### Download window messages
+
+* `DOWNLOAD_WINDOW CREATE DWIN` _%id%_ `WIN` _%id%_
+
+ The core asked Monkey to create a download window owned by the
+ given browser window.
+
+* `DOWNLOAD_WINDOW DATA DWIN` _%id%_ `SIZE` _%n%_ `DATA` _%str%_
+
+ The core asked Monkey to update the named download window with
+ the given byte size and data string.
+
+* `DOWNLOAD_WINDOW ERROR DWIN` _%id%_ `ERROR` _%str%_
+
+ The core asked Monkey to update the named download window with
+ the given error message.
+
+* `DOWNLOAD_WINDOW DONE DWIN` _%id%_
+
+ The core asked Monkey to destroy the named download window.
+
+### SSL Certificate messages
+
+* `SSLCERT VERIFY CERT` _%id%_ `URL` _%url%_
+
+ The core asked Monkey to say whether or not a given SSL
+ certificate is OK.
+
+> TODO: Implement the rest of the SSL certificat verification behaviour
+
+### 401 Login messages
+
+* `401LOGIN OPEN M4` _%id%_ `URL` _%url%_ `REALM` _%str%_
+
+ The core asked Monkey to ask for identification for the named
+ realm at the given URL.
+
+> TODO: Implement support to control the 401LOGIN process
+
+### Plotter messages
+
+> **Note, Monkey won't clip coordinates, but sometimes the core does.**
+
+* `PLOT CLIP X0` _%n%_ `Y0` _%n%_ `X1` _%n%_ `Y1` _%n%_
+
+ The core asked Monkey to clip plotting to the given clipping
+ rectangle (X0,Y0) (X1,Y1)
+
+* `PLOT TEXT X` _%n%_ `Y` _%n%_ `STR` _%str%_
+
+ The core asked Monkey to plot the given string at the
+ given coordinates.
+
+* `PLOT LINE X0` _%n%_ `Y0` _%n%_ `X1` _%n%_ `Y1` _%n%_
+
+ The core asked Monkey to plot a line with the given start
+ and end coordinates.
+
+* `PLOT RECT X0` _%n%_ `Y0` _%n%_ `X1` _%n%_ `Y1` _%n%_
+
+ The core asked Monkey to plot a rectangle with the given
+ coordinates as the corners.
+
+* `PLOT BITMAP X` _%n%_ `Y` _%n%_ `WIDTH` _%n%_ `HEIGHT` _%n%_
+
+ The core asked Monkey to plot a bitmap at the given
+ coordinates, scaled to the given width/height.
+
+> TODO: Check if other things are implemented and add them to the docs
diff --git a/frontends/amiga/corewindow.c b/frontends/amiga/corewindow.c
index 6b2d9e8..1a94dd3 100644
--- a/frontends/amiga/corewindow.c
+++ b/frontends/amiga/corewindow.c
@@ -806,7 +806,7 @@ static const struct ami_win_event_table ami_cw_table = {
* invalidated.
*
* \param[in] cw The core window to invalidate.
- * \param[in] rect area to redraw or NULL for the entire window area.
+ * \param[in] r area to redraw or NULL for the entire window area.
* \return NSERROR_OK on success or appropriate error code.
*/
static nserror
@@ -920,6 +920,7 @@ nserror ami_corewindow_init(struct ami_corewindow *ami_cw)
{
/* setup the core window callback table */
ami_cw->cb_table = &ami_cw_cb_table;
+ ami_cw->drag_status = CORE_WINDOW_DRAG_NONE;
/* clear some vars */
ami_cw->mouse_state = BROWSER_MOUSE_HOVER;
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 7eacda7..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)
@@ -4596,7 +4601,7 @@ static void gui_window_destroy(struct gui_window *g)
if(g->hw)
{
- ami_history_close(g->hw);
+ ami_history_local_destroy(g->hw);
win_destroyed = true;
}
@@ -4986,7 +4991,7 @@ static bool gui_window_get_scroll(struct gui_window *g, int *restrict sx, int *r
* content is shown. The amiga implementation scrolls the contents so
* the specified point in the content is at the top of the viewport.
*
- * \param gw gui_window to scroll
+ * \param g gui_window to scroll
* \param rect The rectangle to ensure is shown.
* \return NSERROR_OK on success or apropriate error code.
*/
diff --git a/frontends/amiga/gui.h b/frontends/amiga/gui.h
index 5cec82d..bf4ec91 100644
--- a/frontends/amiga/gui.h
+++ b/frontends/amiga/gui.h
@@ -87,7 +87,8 @@ enum
};
struct find_window;
-struct history_window;
+struct ami_history_local_window;
+struct ami_menu_data;
#define AMI_GUI_TOOLBAR_MAX 20
@@ -110,8 +111,6 @@ struct ami_generic_window {
const struct ami_win_event_table *tbl;
};
-struct ami_menu_data;
-
struct gui_window_2 {
struct ami_generic_window w;
struct Window *win;
@@ -174,7 +173,7 @@ struct gui_window
int c_h_temp;
int scrollx;
int scrolly;
- struct history_window *hw;
+ struct ami_history_local_window *hw;
struct List dllist;
struct hlcache_handle *favicon;
bool throbbing;
diff --git a/frontends/amiga/gui_menu.c b/frontends/amiga/gui_menu.c
index 0469dd5..6ee0800 100644
--- a/frontends/amiga/gui_menu.c
+++ b/frontends/amiga/gui_menu.c
@@ -326,7 +326,7 @@ HOOKF(void, ami_menu_item_browser_localhistory, APTR, window, struct IntuiMessag
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- ami_history_open(gwin->gw);
+ ami_history_local_present(gwin->gw);
}
HOOKF(void, ami_menu_item_browser_globalhistory, APTR, window, struct IntuiMessage *)
diff --git a/frontends/amiga/history_local.c b/frontends/amiga/history_local.c
old mode 100755
new mode 100644
index 368557d..c293f59
--- a/frontends/amiga/history_local.c
+++ b/frontends/amiga/history_local.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2009, 2010 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
+ * Copyright 2017 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -16,341 +16,300 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * Browser history window (AmigaOS implementation).
- *
- * There is only one history window, not one per browser window.
+/**
+ * \file
+ * Implementation of Amiga local history using core windows.
*/
-#include "amiga/os3support.h"
-
-#include <stdbool.h>
+#include <stdint.h>
#include <stdlib.h>
-#include <string.h>
+
#include <proto/intuition.h>
-#include <proto/exec.h>
-#include <proto/graphics.h>
-#include <intuition/icclass.h>
-#include <proto/utility.h>
-#include <proto/window.h>
-#include <proto/space.h>
-#include <proto/layout.h>
+
#include <classes/window.h>
-#include <gadgets/space.h>
+#include <gadgets/button.h>
+#include <gadgets/layout.h>
#include <gadgets/scroller.h>
-#include <reaction/reaction.h>
+#include <gadgets/space.h>
+#include <images/label.h>
+
+#include <intuition/icclass.h>
#include <reaction/reaction_macros.h>
#include "utils/log.h"
-#include "utils/utils.h"
-#include "utils/messages.h"
-#include "desktop/browser_history.h"
-#include "netsurf/browser_window.h"
+#include "netsurf/keypress.h"
#include "netsurf/plotters.h"
-#include "netsurf/window.h"
-#include "graphics/rpattr.h"
+#include "desktop/local_history.h"
+#include "utils/messages.h"
+#include "utils/nsoption.h"
+#include "utils/nsurl.h"
-#include "amiga/libs.h"
-#include "amiga/misc.h"
-#include "amiga/object.h"
-#include "amiga/plotters.h"
+#include "amiga/corewindow.h"
#include "amiga/gui.h"
+#include "amiga/libs.h"
#include "amiga/history_local.h"
+#include "amiga/utf8.h"
-struct history_window {
- struct ami_generic_window w;
- struct Window *win;
- Object *objects[GID_LAST];
- struct gui_window *gw;
- struct Hook scrollerhook;
- struct gui_globals *gg;
-};
-static void ami_history_update_extent(struct history_window *hw);
-HOOKF(void, ami_history_scroller_hook, Object *, object, struct IntuiMessage *);
+/**
+ * Amiga local history viewing window context
+ */
+struct ami_history_local_window {
+ /** Amiga core window context */
+ struct ami_corewindow core;
-static BOOL ami_history_event(void *w);
+ /** Amiga GUI stuff */
+ struct gui_window *gw;
-static const struct ami_win_event_table ami_localhistory_table = {
- ami_history_event,
- NULL, /* we don't explicitly close the local history window on quit */
+ /** local history viewer context data */
+ struct local_history_session *session;
};
+static struct ami_history_local_window *history_local_window = NULL;
+
/**
- * Redraw history window.
+ * destroy a previously created local history view
*/
-
-static void ami_history_redraw(struct history_window *hw)
+nserror
+ami_history_local_destroy(struct ami_history_local_window *history_local_win)
{
- struct IBox *bbox;
- ULONG xs,ys;
- struct redraw_context ctx = {
- .interactive = true,
- .background_images = true,
- .plot = &amiplot,
- .priv = hw->gg
- };
-
- GetAttr(SCROLLER_Top,hw->objects[OID_HSCROLL],(ULONG *)&xs);
- GetAttr(SCROLLER_Top,hw->objects[OID_VSCROLL],(ULONG *)&ys);
- if(ami_gui_get_space_box(hw->objects[GID_BROWSER], &bbox) != NSERROR_OK) {
- amiga_warn_user("NoMemory", "");
- return;
- }
+ nserror res;
-/* core should clear this area for us
- SetRPAttrs(glob->rp, RPTAG_APenColor, 0xffffffff, TAG_DONE);
- RectFill(glob->rp, 0, 0, bbox->Width - 1, bbox->Height - 1);
-*/
+ if (history_local_win == NULL) {
+ return NSERROR_OK;
+ }
- browser_window_history_redraw_rectangle(hw->gw->bw, xs, ys,
- bbox->Width + xs, bbox->Height + ys, 0, 0, &ctx);
+ res = local_history_fini(history_local_win->session);
+ if (res == NSERROR_OK) {
+ history_local_win->gw->hw = NULL;
+ res = ami_corewindow_fini(&history_local_win->core); /* closes the window for us */
+ history_local_window = NULL;
+ }
+ return res;
+}
- ami_clearclipreg(hw->gg);
- ami_history_update_extent(hw);
+/**
+ * callback for mouse action for local history on core window
+ *
+ * \param ami_cw The Amiga core window structure.
+ * \param mouse_state netsurf mouse state on event
+ * \param x location of event
+ * \param y location of event
+ * \return NSERROR_OK on success otherwise apropriate error code
+ */
+static nserror
+ami_history_local_mouse(struct ami_corewindow *ami_cw,
+ browser_mouse_state mouse_state,
+ int x, int y)
+{
+ struct ami_history_local_window *history_local_win;
+ /* technically degenerate container of */
+ history_local_win = (struct ami_history_local_window *)ami_cw;
+
+ nsurl *url;
+
+ if(local_history_get_url(history_local_win->session, x, y, &url) == NSERROR_OK) {
+ if (url == NULL) {
+ SetGadgetAttrs(
+ (struct Gadget *)ami_cw->objects[GID_CW_DRAW],
+ ami_cw->win,
+ NULL,
+ GA_HintInfo,
+ NULL,
+ TAG_DONE);
+ } else {
+ SetGadgetAttrs(
+ (struct Gadget *)ami_cw->objects[GID_CW_DRAW],
+ ami_cw->win,
+ NULL,
+ GA_HintInfo,
+ nsurl_access(url),
+ TAG_DONE);
+ nsurl_unref(url);
+ }
+ }
- BltBitMapRastPort(ami_plot_ra_get_bitmap(hw->gg), 0, 0, hw->win->RPort,
- bbox->Left, bbox->Top, bbox->Width, bbox->Height, 0x0C0);
+ local_history_mouse_action(history_local_win->session, mouse_state, x, y);
- ami_gui_free_space_box(bbox);
+ return NSERROR_OK;
}
-
-/* exported interface documented in amiga/history_local.h */
-void ami_history_open(struct gui_window *gw)
+/**
+ * callback for keypress for local history on core window
+ *
+ * \param ami_cw The Amiga core window structure.
+ * \param nskey The netsurf key code
+ * \return NSERROR_OK on success otherwise apropriate error code
+ */
+static nserror
+ami_history_local_key(struct ami_corewindow *ami_cw, uint32_t nskey)
{
- struct history *history;
- int width, height;
+ struct ami_history_local_window *history_local_win;
- if (gw->bw == NULL)
- return;
-
- history = browser_window_get_history(gw->bw);
- if (history == NULL)
- return;
-
- if(!gw->hw)
- {
- gw->hw = calloc(1, sizeof(struct history_window));
- gw->hw->gg = ami_plot_ra_alloc(scrn->Width, scrn->Height, false, true);
-
- gw->hw->gw = gw;
- browser_window_history_size(gw->bw, &width, &height);
-
- gw->hw->scrollerhook.h_Entry = (void *)ami_history_scroller_hook;
- gw->hw->scrollerhook.h_Data = gw->hw;
-
- gw->hw->objects[OID_MAIN] = WindowObj,
- WA_ScreenTitle, ami_gui_get_screen_title(),
- WA_Title, messages_get("History"),
- WA_Activate, TRUE,
- WA_DepthGadget, TRUE,
- WA_DragBar, TRUE,
- WA_CloseGadget, TRUE,
- WA_SizeGadget, TRUE,
- WA_PubScreen,scrn,
- WA_InnerWidth,width,
- WA_InnerHeight,height + 10,
- WINDOW_SharedPort,sport,
- WINDOW_UserData,gw->hw,
- WINDOW_IconifyGadget, FALSE,
- WINDOW_GadgetHelp, TRUE,
- WINDOW_Position, WPOS_CENTERSCREEN,
- WINDOW_HorizProp,1,
- WINDOW_VertProp,1,
- WINDOW_IDCMPHook,&gw->hw->scrollerhook,
- WINDOW_IDCMPHookBits,IDCMP_IDCMPUPDATE,
-// WA_ReportMouse,TRUE,
- WA_IDCMP,IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE, // | IDCMP_MOUSEMOVE,
- WINDOW_ParentGroup, gw->hw->objects[GID_MAIN] = LayoutVObj,
- LAYOUT_AddChild, gw->hw->objects[GID_BROWSER] = SpaceObj,
- GA_ID,GID_BROWSER,
-// SPACE_MinWidth,width,
-// SPACE_MinHeight,height,
- SpaceEnd,
- EndGroup,
- EndWindow;
-
- gw->hw->win = (struct Window *)RA_OpenWindow(gw->hw->objects[OID_MAIN]);
- ami_gui_win_list_add(gw->hw, AMINS_HISTORYWINDOW, &ami_localhistory_table);
-
- GetAttr(WINDOW_HorizObject,gw->hw->objects[OID_MAIN],(ULONG *)&gw->hw->objects[OID_HSCROLL]);
- GetAttr(WINDOW_VertObject,gw->hw->objects[OID_MAIN],(ULONG *)&gw->hw->objects[OID_VSCROLL]);
-
- RefreshSetGadgetAttrs((APTR)gw->hw->objects[OID_VSCROLL],gw->hw->win,NULL,
- GA_ID,OID_VSCROLL,
- SCROLLER_Top,0,
- ICA_TARGET,ICTARGET_IDCMP,
- TAG_DONE);
-
- RefreshSetGadgetAttrs((APTR)gw->hw->objects[OID_HSCROLL],gw->hw->win,NULL,
- GA_ID,OID_HSCROLL,
- SCROLLER_Top,0,
- ICA_TARGET,ICTARGET_IDCMP,
- TAG_DONE);
- }
+ /* technically degenerate container of */
+ history_local_win = (struct ami_history_local_window *)ami_cw;
- ami_history_redraw(gw->hw);
+ if (local_history_keypress(history_local_win->session, nskey)) {
+ return NSERROR_OK;
+ }
+ return NSERROR_NOT_IMPLEMENTED;
}
-
/**
- * Handle mouse clicks in the history window.
+ * callback on draw event for certificate verify on core window
*
- * \return true if the event was handled, false to pass it on
+ * \param ami_cw The Amiga core window structure.
+ * \param x the x coordinate to draw
+ * \param y the y coordinate to draw
+ * \param r The rectangle of the window that needs updating.
+ * \param ctx The drawing context
+ * \return NSERROR_OK on success otherwise apropriate error code
*/
+static nserror
+ami_history_local_draw(struct ami_corewindow *ami_cw, int x, int y, struct rect *r, struct redraw_context *ctx)
+{
+ struct ami_history_local_window *history_local_win;
-static bool ami_history_click(struct history_window *hw, uint16 code)
+ /* technically degenerate container of */
+ history_local_win = (struct ami_history_local_window *)ami_cw;
+
+ //ctx->plot->clip(ctx, r); //??
+ local_history_redraw(history_local_win->session, x, y, r, ctx);
+
+ return NSERROR_OK;
+}
+
+static nserror
+ami_history_local_create_window(struct ami_history_local_window *history_local_win)
{
- int x, y;
- struct IBox *bbox;
- ULONG xs, ys;
+ struct ami_corewindow *ami_cw = (struct ami_corewindow *)&history_local_win->core;
+ ULONG refresh_mode = WA_SmartRefresh;
- if(ami_gui_get_space_box(hw->objects[GID_BROWSER], &bbox) != NSERROR_OK) {
- amiga_warn_user("NoMemory", "");
- return false;
+ if(nsoption_bool(window_simple_refresh) == true) {
+ refresh_mode = WA_SimpleRefresh;
}
- GetAttr(SCROLLER_Top,hw->objects[OID_HSCROLL],(ULONG *)&xs);
- x = hw->win->MouseX - bbox->Left +xs;
- GetAttr(SCROLLER_Top,hw->objects[OID_VSCROLL],(ULONG *)&ys);
- y = hw->win->MouseY - bbox->Top + ys;
-
- ami_gui_free_space_box(bbox);
-
- switch(code)
- {
- case SELECTUP:
- browser_window_history_click(hw->gw->bw, x, y, false);
- ami_history_redraw(hw);
- ami_schedule_redraw(hw->gw->shared, true);
- break;
-
- case MIDDLEUP:
- browser_window_history_click(hw->gw->bw, x, y, true);
- ami_history_redraw(hw);
- break;
+ ami_cw->objects[GID_CW_WIN] = WindowObj,
+ WA_ScreenTitle, ami_gui_get_screen_title(),
+ WA_Title, ami_cw->wintitle,
+ WA_Activate, TRUE,
+ WA_DepthGadget, TRUE,
+ WA_DragBar, TRUE,
+ WA_CloseGadget, TRUE,
+ WA_SizeGadget, TRUE,
+ WA_SizeBRight, TRUE,
+ WA_Width, 100,
+ WA_Height, 100,
+ WA_PubScreen, scrn,
+ WA_ReportMouse, TRUE,
+ refresh_mode, TRUE,
+ WA_IDCMP, IDCMP_MOUSEMOVE | IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE |
+ IDCMP_RAWKEY | IDCMP_GADGETUP | IDCMP_IDCMPUPDATE |
+ IDCMP_EXTENDEDMOUSE | IDCMP_SIZEVERIFY | IDCMP_REFRESHWINDOW,
+ WINDOW_IDCMPHook, &ami_cw->idcmp_hook,
+ WINDOW_IDCMPHookBits, IDCMP_IDCMPUPDATE | IDCMP_EXTENDEDMOUSE |
+ IDCMP_SIZEVERIFY | IDCMP_REFRESHWINDOW,
+ WINDOW_SharedPort, sport,
+ WINDOW_HorizProp, 1,
+ WINDOW_VertProp, 1,
+ WINDOW_UserData, history_local_win,
+// WINDOW_MenuStrip, NULL,
+ WINDOW_MenuUserData, WGUD_HOOK,
+ WINDOW_IconifyGadget, FALSE,
+ WINDOW_Position, WPOS_CENTERSCREEN,
+ WINDOW_ParentGroup, ami_cw->objects[GID_CW_MAIN] = LayoutVObj,
+ LAYOUT_AddChild, ami_cw->objects[GID_CW_DRAW] = SpaceObj,
+ GA_ID, GID_CW_DRAW,
+ SPACE_Transparent, TRUE,
+ SPACE_BevelStyle, BVS_DISPLAY,
+ GA_RelVerify, TRUE,
+ SpaceEnd,
+ EndGroup,
+ EndWindow;
+
+ if(ami_cw->objects[GID_CW_WIN] == NULL) {
+ return NSERROR_NOMEM;
}
- return true;
+ return NSERROR_OK;
}
-void ami_history_close(struct history_window *hw)
+/* exported interface documented in amiga/history_local.h */
+nserror ami_history_local_present(struct gui_window *gw)
{
- ami_plot_ra_free(hw->gg);
- hw->gw->hw = NULL;
- DisposeObject(hw->objects[OID_MAIN]);
- ami_gui_win_list_remove(hw);
-}
+ struct ami_history_local_window *ncwin;
+ nserror res;
+ int width, height;
-static BOOL ami_history_event(void *w)
-{
- /* return TRUE if window destroyed */
- struct history_window *hw = (struct history_window *)w;
- ULONG result = 0;
- uint16 code;
- const char *url;
- struct IBox *bbox;
- ULONG xs, ys;
-
- while((result = RA_HandleInput(hw->objects[OID_MAIN],&code)) != WMHI_LASTMSG)
- {
- switch(result & WMHI_CLASSMASK) // class
- {
-/* no menus yet, copied in as will probably need it later
- case WMHI_MENUPICK:
- item = ItemAddress(gwin->win->MenuStrip,code);
- while (code != MENUNULL)
- {
- ami_menupick(code,gwin);
- if(win_destroyed) break;
- code = item->NextSelect;
- }
- break;
-*/
-
- case WMHI_MOUSEMOVE:
- GetAttr(SCROLLER_Top, hw->objects[OID_HSCROLL], (ULONG *)&xs);
- GetAttr(SCROLLER_Top, hw->objects[OID_VSCROLL], (ULONG *)&ys);
-
- if(ami_gui_get_space_box(hw->objects[GID_BROWSER], &bbox) != NSERROR_OK) {
- amiga_warn_user("NoMemory", "");
- break;
- }
-
- url = browser_window_history_position_url(hw->gw->bw,
- hw->win->MouseX - bbox->Left + xs,
- hw->win->MouseY - bbox->Top + ys);
-
- ami_gui_free_space_box(bbox);
-
- RefreshSetGadgetAttrs((APTR)hw->objects[GID_BROWSER],
- hw->win, NULL,
- GA_HintInfo, url,
- TAG_DONE);
- break;
-
- case WMHI_NEWSIZE:
- ami_history_redraw(hw);
- break;
-
- case WMHI_MOUSEBUTTONS:
- ami_history_click(hw,code);
- break;
-
- case WMHI_CLOSEWINDOW:
- ami_history_close(hw);
- return TRUE;
- break;
+ if(history_local_window != NULL) {
+ //windowtofront()
+
+ if (gw->hw != NULL) {
+ res = local_history_set(gw->hw->session, gw->bw);
+ return res;
}
+
+ return NSERROR_OK;
}
- return FALSE;
-}
-static void ami_history_update_extent(struct history_window *hw)
-{
- struct IBox *bbox;
- int width, height;
+ ncwin = calloc(1, sizeof(struct ami_history_local_window));
+ if (ncwin == NULL) {
+ return NSERROR_NOMEM;
+ }
- browser_window_history_size(hw->gw->bw, &width, &height);
- if(ami_gui_get_space_box(hw->objects[GID_BROWSER], &bbox) != NSERROR_OK) {
- amiga_warn_user("NoMemory", "");
- return;
+ ncwin->core.wintitle = ami_utf8_easy((char *)messages_get("History"));
+
+ res = ami_history_local_create_window(ncwin);
+ if (res != NSERROR_OK) {
+ LOG("SSL UI builder init failed");
+ ami_utf8_free(ncwin->core.wintitle);
+ free(ncwin);
+ return res;
}
- RefreshSetGadgetAttrs((APTR)hw->objects[OID_VSCROLL], hw->win, NULL,
- GA_ID, OID_VSCROLL,
- SCROLLER_Total, height,
- SCROLLER_Visible, bbox->Height,
- ICA_TARGET, ICTARGET_IDCMP,
- TAG_DONE);
+ /* initialise Amiga core window */
+ ncwin->core.draw = ami_history_local_draw;
+ ncwin->core.key = ami_history_local_key;
+ ncwin->core.mouse = ami_history_local_mouse;
+ ncwin->core.close = ami_history_local_destroy;
+ ncwin->core.event = NULL;
+ ncwin->core.drag_end = NULL;
+ ncwin->core.icon_drop = NULL;
+
+ res = ami_corewindow_init(&ncwin->core);
+ if (res != NSERROR_OK) {
+ ami_utf8_free(ncwin->core.wintitle);
+ DisposeObject(ncwin->core.objects[GID_CW_WIN]);
+ free(ncwin);
+ return res;
+ }
+
+ res = local_history_init(ncwin->core.cb_table,
+ (struct core_window *)ncwin,
+ gw->bw,
+ &ncwin->session);
+ if (res != NSERROR_OK) {
+ ami_utf8_free(ncwin->core.wintitle);
+ DisposeObject(ncwin->core.objects[GID_CW_WIN]);
+ free(ncwin);
+ return res;
+ }
+
+ res = local_history_get_size(ncwin->session,
+ &width,
+ &height);
- RefreshSetGadgetAttrs((APTR)hw->objects[OID_HSCROLL], hw->win, NULL,
- GA_ID, OID_HSCROLL,
- SCROLLER_Total, width,
- SCROLLER_Visible, bbox->Width,
- ICA_TARGET, ICTARGET_IDCMP,
+ /*TODO: Adjust these to account for window borders */
+
+ SetAttrs(ncwin->core.objects[GID_CW_WIN],
+ WA_Width, width,
+ WA_Height, height,
TAG_DONE);
- ami_gui_free_space_box(bbox);
+ ncwin->gw = gw;
+ history_local_window = ncwin;
+ gw->hw = ncwin;
+
+ return NSERROR_OK;
}
-HOOKF(void, ami_history_scroller_hook, Object *, object, struct IntuiMessage *)
-{
- ULONG gid;
- struct history_window *hw = hook->h_Data;
-
- if (msg->Class == IDCMP_IDCMPUPDATE)
- {
- gid = GetTagData( GA_ID, 0, msg->IAddress );
-
- switch( gid )
- {
- case OID_HSCROLL:
- case OID_VSCROLL:
- ami_history_redraw(hw);
- break;
- }
- }
-// ReplyMsg((struct Message *)msg);
-}
diff --git a/frontends/amiga/history_local.h b/frontends/amiga/history_local.h
old mode 100755
new mode 100644
index 97aea05..72ba7fa
--- a/frontends/amiga/history_local.h
+++ b/frontends/amiga/history_local.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2009 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
+ * Copyright 2017 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -16,23 +16,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef AMIGA_HISTORY_LOCAL_H
-#define AMIGA_HISTORY_LOCAL_H
-
-#include <exec/types.h>
-#include <intuition/classusr.h>
+#ifndef AMIGA_HISTORY_GLOBAL_H
+#define AMIGA_HISTORY_GLOBAL_H
struct gui_window;
-struct gui_globals;
-struct history_window;
-
-/**
- * Open history window.
- *
- * \param gw gui_window to open history for
- */
-void ami_history_open(struct gui_window *gw);
+struct ami_history_local_window;
-void ami_history_close(struct history_window *hw);
+/** Open the global history viewer */
+nserror ami_history_local_present(struct gui_window *gw);
+nserror ami_history_local_destroy(struct ami_history_local_window *history_local_win);
#endif
diff --git a/frontends/amiga/os3support.c b/frontends/amiga/os3support.c
index 5c1e40d..6dc9579 100644
--- a/frontends/amiga/os3support.c
+++ b/frontends/amiga/os3support.c
@@ -338,7 +338,7 @@ int64 GetFileSize(BPTR fh)
ExamineFH(fh, fib);
size = fib->fib_Size;
- free(fib);
+ FreeDosObject(DOS_FIB, fib);
return (int64)size;
}
diff --git a/frontends/cocoa/HistoryView.h b/frontends/cocoa/HistoryView.h
index 42e73dd..0fa2af3 100644
--- a/frontends/cocoa/HistoryView.h
+++ b/frontends/cocoa/HistoryView.h
@@ -18,17 +18,13 @@
#import <Cocoa/Cocoa.h>
-@class HistoryView;
@class BrowserView;
-@interface HistoryView : NSView {
- struct browser_window *browser;
- NSMutableArray *toolTips;
-}
+@interface HistoryView : NSView
-@property (readwrite, retain, nonatomic) BrowserView *browser;
+@property (readwrite, nonatomic) BrowserView *browser;
+@property (readonly, nonatomic) NSSize size;
- (void)updateHistory;
-- (NSSize)size;
@end
diff --git a/frontends/cocoa/HistoryView.m b/frontends/cocoa/HistoryView.m
index 94d5261..798a308 100644
--- a/frontends/cocoa/HistoryView.m
+++ b/frontends/cocoa/HistoryView.m
@@ -22,125 +22,111 @@
#import "cocoa/plotter.h"
#import "cocoa/LocalHistoryController.h"
#import "cocoa/BrowserView.h"
-
+#import "utils/errors.h"
+#import "netsurf/core_window.h"
#import "desktop/browser_history.h"
+#import "desktop/local_history.h"
#import "netsurf/plotters.h"
-@implementation HistoryView
-
-@synthesize browser = browserView;
-
-- (void)setBrowser:(BrowserView *)bw
-{
- browserView = bw;
- browser = [bw browser];
- [self updateHistory];
+@interface HistoryView () {
+ struct local_history_session *_session;
}
-- (NSSize)size
-{
- int width, height;
- browser_window_history_size(browser, &width, &height);
+@property (nonatomic) NSMutableArray *toolTips;
+@property (readwrite, nonatomic) NSSize size;
- return cocoa_size(width, height);
-}
+@end
-- (void)updateHistory
+static nserror invalidate(struct core_window *cw, const struct rect *rect)
{
- [self setFrameSize:[self size]];
- [self setNeedsDisplay:YES];
+ return NSERROR_NOT_IMPLEMENTED;
}
-- (void)drawRect:(NSRect)rect
+static void update_size(struct core_window *cw, int width, int height)
{
- [[NSColor clearColor] set];
- [NSBezierPath fillRect:rect];
-
- struct redraw_context ctx = {
- .interactive = true,
- .background_images = true,
- .plot = &cocoa_plotters
- };
-
- cocoa_set_clip(rect);
-
- browser_window_history_redraw(browser, &ctx);
+ HistoryView *view = (__bridge HistoryView *)cw;
+ NSSize size = cocoa_size(width, height);
+ view.size = size;
}
-- (void)mouseUp:(NSEvent *)theEvent
+static void scroll_visible(struct core_window *cw, const struct rect *r)
{
- const NSPoint location = [self convertPoint:[theEvent locationInWindow] fromView:nil];
- const bool newWindow = [theEvent modifierFlags] & NSEventModifierFlagCommand;
- if (browser_window_history_click(browser,
- cocoa_pt_to_px(location.x), cocoa_pt_to_px(location.y),
- newWindow)) {
- [browserView setHistoryVisible:NO];
- }
}
-- (BOOL)isFlipped
+static void get_window_dimensions(struct core_window *cw, int *width, int *height)
{
- return YES;
}
-- (void)mouseEntered:(NSEvent *)event
+static void drag_status(struct core_window *cw, core_window_drag_status ds)
{
- [[NSCursor pointingHandCursor] set];
}
-- (void)mouseExited:(NSEvent *)event
+static struct core_window_callback_table history_view_table = {
+ .invalidate = invalidate,
+ .update_size = update_size,
+ .scroll_visible = scroll_visible,
+ .get_window_dimensions = get_window_dimensions,
+ .drag_status = drag_status
+};
+
+@implementation HistoryView
+
+- (void)updateHistory
{
- [[NSCursor arrowCursor] set];
+ if (_session) {
+ local_history_set(_session, self.browser.browser);
+ } else {
+ local_history_init(&history_view_table, (__bridge void *)self, self.browser.browser, &_session);
+ }
+
+ self.frameSize = self.size;
}
-static bool cursor_rects_cb(const struct browser_window *bw, int x0, int y0, int x1, int y1,
- const struct history_entry *page, void *user_data)
+- (void)dealloc
{
- HistoryView *view = (__bridge HistoryView *)user_data;
-
- NSRect rect = NSIntersectionRect([view visibleRect], cocoa_rect(x0, y0, x1, y1));
- if (!NSIsEmptyRect(rect)) {
-
- NSString *toolTip = [NSString stringWithFormat:@"%s\n%s", browser_window_history_entry_get_title(page),
- browser_window_history_entry_get_url(page)];
-
- [view addToolTipRect:rect owner:toolTip userData:nil];
- NSTrackingArea *area = [[NSTrackingArea alloc] initWithRect:rect
- options:NSTrackingMouseEnteredAndExited | NSTrackingActiveInActiveApp
- owner:view
- userInfo:nil];
- [view addTrackingArea:area];
+ if (_session) {
+ local_history_fini(_session);
}
-
- return true;
}
-- (NSToolTipTag)addToolTipRect:(NSRect)rect owner:(id)owner userData:(void *)userData
+- (void)drawRect:(NSRect)rect
{
- if (toolTips == nil)
- toolTips = [[NSMutableArray alloc] init];
- [toolTips addObject:owner];
+ if (!_session) return;
- return [super addToolTipRect:rect owner:owner userData:userData];
-}
+ struct redraw_context context = {
+ .interactive = true,
+ .background_images = false,
+ .plot = &cocoa_plotters,
+ };
-- (void)removeAllToolTips
-{
- [super removeAllToolTips];
- [toolTips removeAllObjects];
+ cocoa_set_clip(rect);
+
+ struct rect clipRect = {
+ .x0 = cocoa_pt_to_px(CGRectGetMinX(rect)),
+ .y0 = cocoa_pt_to_px(CGRectGetMinY(rect)),
+ .x1 = cocoa_pt_to_px(CGRectGetMaxX(rect)),
+ .y1 = cocoa_pt_to_px(CGRectGetMaxY(rect))
+ };
+ local_history_redraw(_session, 0, 0, &clipRect, &context);
}
-- (void)updateTrackingAreas
+- (void)mouseUp:(NSEvent *)theEvent
{
- [self removeAllToolTips];
+ if (!_session) return;
- for (NSTrackingArea *area in [self trackingAreas]) {
- [self removeTrackingArea:area];
+ CGPoint location = [self convertPoint: theEvent.locationInWindow fromView: nil];
+
+ browser_mouse_state state = BROWSER_MOUSE_PRESS_1;
+ if (theEvent.modifierFlags & NSEventModifierFlagCommand) {
+ state = BROWSER_MOUSE_PRESS_2;
}
- browser_window_history_enumerate(browser, cursor_rects_cb, (__bridge void *)self);
+ local_history_mouse_action(_session, state, cocoa_pt_to_px(location.x), cocoa_pt_to_px(location.y));
+}
- [super updateTrackingAreas];
+- (BOOL)isFlipped
+{
+ return YES;
}
@end
diff --git a/frontends/cocoa/LocalHistoryController.m b/frontends/cocoa/LocalHistoryController.m
index b54359f..1a60783 100644
--- a/frontends/cocoa/LocalHistoryController.m
+++ b/frontends/cocoa/LocalHistoryController.m
@@ -40,9 +40,9 @@
ArrowWindow *box = (ArrowWindow *)[self window];
+ [self.history updateHistory];
box.contentSize = self.history.size;
[box setArrowPosition:50];
- [self.history updateHistory];
[box attachToView:view];
NSRect frame = [box frame];
diff --git a/frontends/framebuffer/Makefile b/frontends/framebuffer/Makefile
index 6d2acb0..760e85b 100644
--- a/frontends/framebuffer/Makefile
+++ b/frontends/framebuffer/Makefile
@@ -146,7 +146,7 @@ $(eval $(foreach V,$(filter FB_FONT_$(NETSURF_FB_FONTLIB)_%,$(.VARIABLES)),$(cal
# S_FRONTEND are sources purely for the framebuffer build
S_FRONTEND := gui.c framebuffer.c schedule.c bitmap.c fetch.c \
- findfile.c localhistory.c clipboard.c
+ findfile.c corewindow.c local_history.c clipboard.c
# toolkit sources
S_FRAMEBUFFER_FBTK := fbtk.c event.c fill.c bitmap.c user.c window.c \
diff --git a/frontends/framebuffer/corewindow.c b/frontends/framebuffer/corewindow.c
new file mode 100644
index 0000000..93f88ff
--- /dev/null
+++ b/frontends/framebuffer/corewindow.c
@@ -0,0 +1,262 @@
+/*
+ * Copyright 2017 Vincent Sanders <vince(a)netsurf-browser.org>
+ *
+ * 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/>.
+ */
+
+/**
+ * \file
+ * framebuffer generic core window interface.
+ *
+ * Provides interface for core renderers to the framebufefr toolkit
+ * drawable area.
+ *
+ * This module is an object that must be encapsulated. Client users
+ * should embed a struct fb_corewindow at the beginning of their
+ * context for this display surface, fill in relevant data and then
+ * call fb_corewindow_init()
+ *
+ * The fb core window structure requires the callback for draw, key and
+ * mouse operations.
+ */
+
+#include <assert.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <limits.h>
+
+#include <libnsfb.h>
+#include <libnsfb_plot.h>
+#include <libnsfb_event.h>
+
+#include "utils/log.h"
+#include "utils/utils.h"
+#include "utils/messages.h"
+#include "utils/utf8.h"
+#include "utils/nsoption.h"
+#include "netsurf/keypress.h"
+#include "netsurf/mouse.h"
+#include "netsurf/plot_style.h"
+
+#include "framebuffer/gui.h"
+#include "framebuffer/fbtk.h"
+#include "framebuffer/corewindow.h"
+
+
+/* toolkit event handlers that do generic things and call internal callbacks */
+
+
+static int
+fb_cw_mouse_press_event(fbtk_widget_t *widget, fbtk_callback_info *cbi)
+{
+ struct fb_corewindow *fb_cw = (struct fb_corewindow *)cbi->context;
+ browser_mouse_state state;
+
+ /** \todo frambuffer corewindow mouse event handling needs improving */
+ if (cbi->event->type != NSFB_EVENT_KEY_UP) {
+ state = BROWSER_MOUSE_HOVER;
+ } else {
+ state = BROWSER_MOUSE_PRESS_1;
+ }
+
+ fb_cw->mouse(fb_cw, state, cbi->x, cbi->y);
+
+ return 1;
+}
+
+/*
+static bool
+fb_cw_input_event(toolkit_widget *widget, void *ctx)
+{
+ struct fb_corewindow *fb_cw = (struct fb_corewindow *)ctx;
+
+ fb_cw->key(fb_cw, keycode);
+
+ return true;
+}
+*/
+
+/**
+ * handler for toolkit window redraw event
+ */
+static int fb_cw_draw_event(fbtk_widget_t *widget, fbtk_callback_info *cbi)
+{
+ struct fb_corewindow *fb_cw;
+ nsfb_bbox_t rbox;
+ struct rect clip;
+
+ fb_cw = (struct fb_corewindow *)cbi->context;
+
+ rbox.x0 = fbtk_get_absx(widget);
+ rbox.y0 = fbtk_get_absy(widget);
+
+ rbox.x1 = rbox.x0 + fbtk_get_width(widget);
+ rbox.y1 = rbox.y0 + fbtk_get_height(widget);
+
+ nsfb_claim(fbtk_get_nsfb(widget), &rbox);
+
+ clip.x0 = fb_cw->scrollx;
+ clip.y0 = fb_cw->scrolly;
+ clip.x1 = fbtk_get_width(widget) + fb_cw->scrollx;
+ clip.y1 = fbtk_get_height(widget) + fb_cw->scrolly;
+
+ fb_cw->draw(fb_cw, &clip);
+
+ nsfb_update(fbtk_get_nsfb(widget), &rbox);
+
+ return 0;
+}
+
+
+/**
+ * callback from core to request a redraw
+ */
+static nserror
+fb_cw_invalidate(struct core_window *cw, const struct rect *r)
+{
+/* struct fb_corewindow *fb_cw = (struct fb_corewindow *)cw;
+
+ toolkit_widget_queue_draw_area(fb_cw->widget,
+ r->x0, r->y0,
+ r->x1 - r->x0, r->y1 - r->y0);
+*/
+ return NSERROR_OK;
+}
+
+
+static void
+fb_cw_update_size(struct core_window *cw, int width, int height)
+{
+/* struct fb_corewindow *fb_cw = (struct fb_corewindow *)cw;
+
+ toolkit_widget_set_size_request(FB_WIDGET(fb_cw->drawing_area),
+ width, height);
+*/
+}
+
+
+static void
+fb_cw_scroll_visible(struct core_window *cw, const struct rect *r)
+{
+/* struct fb_corewindow *fb_cw = (struct fb_corewindow *)cw;
+
+ toolkit_scroll_widget(fb_cw->widget, r);
+*/
+}
+
+
+static void
+fb_cw_get_window_dimensions(struct core_window *cw, int *width, int *height)
+{
+ struct fb_corewindow *fb_cw = (struct fb_corewindow *)cw;
+
+ *width = fbtk_get_width(fb_cw->drawable);
+ *height = fbtk_get_height(fb_cw->drawable);
+}
+
+
+static void
+fb_cw_drag_status(struct core_window *cw, core_window_drag_status ds)
+{
+ struct fb_corewindow *fb_cw = (struct fb_corewindow *)cw;
+ fb_cw->drag_status = ds;
+}
+
+
+struct core_window_callback_table fb_cw_cb_table = {
+ .invalidate = fb_cw_invalidate,
+ .update_size = fb_cw_update_size,
+ .scroll_visible = fb_cw_scroll_visible,
+ .get_window_dimensions = fb_cw_get_window_dimensions,
+ .drag_status = fb_cw_drag_status
+};
+
+/* exported function documented fb/corewindow.h */
+nserror fb_corewindow_init(fbtk_widget_t *parent, struct fb_corewindow *fb_cw)
+{
+ int furniture_width;
+
+ furniture_width = nsoption_int(fb_furniture_size);
+
+ /* setup the core window callback table */
+ fb_cw->cb_table = &fb_cw_cb_table;
+ fb_cw->drag_status = CORE_WINDOW_DRAG_NONE;
+
+ /* container window */
+ fb_cw->wnd = fbtk_create_window(parent, 0, 0, 0, 0, 0);
+
+ fb_cw->drawable = fbtk_create_user(fb_cw->wnd,
+ 0, 0,
+ -furniture_width, -furniture_width,
+ fb_cw);
+
+ fbtk_set_handler(fb_cw->drawable,
+ FBTK_CBT_REDRAW,
+ fb_cw_draw_event,
+ fb_cw);
+
+ fbtk_set_handler(fb_cw->drawable,
+ FBTK_CBT_CLICK,
+ fb_cw_mouse_press_event,
+ fb_cw);
+/*
+ fbtk_set_handler(fb_cw->drawable,
+ FBTK_CBT_INPUT,
+ fb_cw_input_event,
+ fb_cw);
+
+ fbtk_set_handler(fb_cw->drawable,
+ FBTK_CBT_POINTERMOVE,
+ fb_cw_move_event,
+ fb_cw);
+*/
+
+ /* create horizontal scrollbar */
+ fb_cw->hscroll = fbtk_create_hscroll(fb_cw->wnd,
+ 0,
+ fbtk_get_height(fb_cw->wnd) - furniture_width,
+ fbtk_get_width(fb_cw->wnd) - furniture_width,
+ furniture_width,
+ FB_SCROLL_COLOUR,
+ FB_FRAME_COLOUR,
+ NULL,
+ NULL);
+
+ fb_cw->vscroll = fbtk_create_vscroll(fb_cw->wnd,
+ fbtk_get_width(fb_cw->wnd) - furniture_width,
+ 0,
+ furniture_width,
+ fbtk_get_height(fb_cw->wnd) - furniture_width,
+ FB_SCROLL_COLOUR,
+ FB_FRAME_COLOUR,
+ NULL,
+ NULL);
+
+ fbtk_create_fill(fb_cw->wnd,
+ fbtk_get_width(fb_cw->wnd) - furniture_width,
+ fbtk_get_height(fb_cw->wnd) - furniture_width,
+ furniture_width,
+ furniture_width,
+ FB_FRAME_COLOUR);
+
+
+ return NSERROR_OK;
+}
+
+/* exported interface documented in fb/corewindow.h */
+nserror fb_corewindow_fini(struct fb_corewindow *fb_cw)
+{
+ return NSERROR_OK;
+}
diff --git a/frontends/framebuffer/corewindow.h b/frontends/framebuffer/corewindow.h
new file mode 100644
index 0000000..5546c09
--- /dev/null
+++ b/frontends/framebuffer/corewindow.h
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2017 Vincent Sanders <vince(a)netsurf-browser.org>
+ *
+ * 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 FB_COREWINDOW_H
+#define FB_COREWINDOW_H
+
+#include "netsurf/core_window.h"
+
+/**
+ * fb core window state
+ */
+struct fb_corewindow {
+
+ /**
+ * framebuffer toolkit window.
+ */
+ struct fbtk_widget_s *wnd;
+ /**
+ * framebuffer toolkit horizontal scrollbar.
+ */
+ struct fbtk_widget_s *hscroll;
+ /**
+ * framebuffer toolkit vertical scrollbar.
+ */
+ struct fbtk_widget_s *vscroll;
+ /**
+ * framebuffer toolkit user drawable widget.
+ */
+ struct fbtk_widget_s *drawable;
+
+ int scrollx, scrolly; /**< scroll offsets. */
+
+
+ /** drag status set by core */
+ core_window_drag_status drag_status;
+
+ /** table of callbacks for core window operations */
+ struct core_window_callback_table *cb_table;
+
+ /**
+ * callback to draw on drawable area of fb core window
+ *
+ * \param fb_cw The fb core window structure.
+ * \param r The rectangle of the window that needs updating.
+ * \return NSERROR_OK on success otherwise apropriate error code
+ */
+ nserror (*draw)(struct fb_corewindow *fb_cw, struct rect *r);
+
+ /**
+ * callback for keypress on fb core window
+ *
+ * \param fb_cw The fb core window structure.
+ * \param nskey The netsurf key code.
+ * \return NSERROR_OK if key processed,
+ * NSERROR_NOT_IMPLEMENTED if key not processed
+ * otherwise apropriate error code
+ */
+ nserror (*key)(struct fb_corewindow *fb_cw, uint32_t nskey);
+
+ /**
+ * callback for mouse event on fb core window
+ *
+ * \param fb_cw The fb core window structure.
+ * \param mouse_state mouse state
+ * \param x location of event
+ * \param y location of event
+ * \return NSERROR_OK on sucess otherwise apropriate error code.
+ */
+ nserror (*mouse)(struct fb_corewindow *fb_cw, browser_mouse_state mouse_state, int x, int y);
+};
+
+
+/**
+ * initialise elements of fb core window.
+ *
+ * As a pre-requisite the draw, key and mouse callbacks must be defined
+ *
+ * \param fb_cw A fb core window structure to initialise
+ * \return NSERROR_OK on successful initialisation otherwise error code.
+ */
+nserror fb_corewindow_init(fbtk_widget_t *parent, struct fb_corewindow *fb_cw);
+
+
+/**
+ * finalise elements of fb core window.
+ *
+ * \param fb_cw A fb core window structure to initialise
+ * \return NSERROR_OK on successful finalisation otherwise error code.
+ */
+nserror fb_corewindow_fini(struct fb_corewindow *fb_cw);
+
+#endif
diff --git a/frontends/framebuffer/framebuffer.c b/frontends/framebuffer/framebuffer.c
index 649862a..de8a369 100644
--- a/frontends/framebuffer/framebuffer.c
+++ b/frontends/framebuffer/framebuffer.c
@@ -333,7 +333,10 @@ framebuffer_plot_bitmap(const struct redraw_context *ctx,
loc.x1 = loc.x0 + width;
loc.y1 = loc.y0 + height;
- return nsfb_plot_copy(bm, NULL, nsfb, &loc);
+ if (!nsfb_plot_copy(bm, NULL, nsfb, &loc)) {
+ return NSERROR_INVALID;
+ }
+ return NSERROR_OK;
}
nsfb_plot_get_clip(nsfb, &clipbox);
diff --git a/frontends/framebuffer/gui.c b/frontends/framebuffer/gui.c
index 062cb56..1460c77 100644
--- a/frontends/framebuffer/gui.c
+++ b/frontends/framebuffer/gui.c
@@ -54,6 +54,7 @@
#include "framebuffer/clipboard.h"
#include "framebuffer/fetch.h"
#include "framebuffer/bitmap.h"
+#include "framebuffer/local_history.h"
#define NSFB_TOOLBAR_DEFAULT_LAYOUT "blfsrutc"
@@ -1150,7 +1151,7 @@ fb_localhistory_btn_clik(fbtk_widget_t *widget, fbtk_callback_info *cbi)
if (cbi->event->type != NSFB_EVENT_KEY_UP)
return 0;
- fb_localhistory_map(gw->localhistory);
+ fb_local_history_present(fbtk, gw->bw);
return 0;
}
@@ -1782,7 +1783,6 @@ gui_window_create(struct browser_window *bw,
gw->bw = bw;
create_normal_browser_window(gw, nsoption_int(fb_furniture_size));
- gw->localhistory = fb_create_localhistory(bw, fbtk, nsoption_int(fb_furniture_size));
/* map and request redraw of gui window */
fbtk_set_mapping(gw->window, true);
diff --git a/frontends/framebuffer/gui.h b/frontends/framebuffer/gui.h
index 0de1add..abb27c4 100644
--- a/frontends/framebuffer/gui.h
+++ b/frontends/framebuffer/gui.h
@@ -27,17 +27,6 @@ typedef struct fb_cursor_s fb_cursor_t;
/* bounding box */
typedef struct nsfb_bbox_s bbox_t;
-struct gui_localhistory {
- struct browser_window *bw;
-
- struct fbtk_widget_s *window;
- struct fbtk_widget_s *hscroll;
- struct fbtk_widget_s *vscroll;
- struct fbtk_widget_s *history;
-
- int scrollx, scrolly; /**< scroll offsets. */
-};
-
struct gui_window {
struct browser_window *bw;
@@ -59,8 +48,6 @@ struct gui_window {
int throbber_index;
- struct gui_localhistory *localhistory;
-
struct gui_window *next;
struct gui_window *prev;
};
@@ -68,13 +55,8 @@ struct gui_window {
extern struct gui_window *window_list;
-struct gui_localhistory *fb_create_localhistory(struct browser_window *bw,
- struct fbtk_widget_s *parent, int furniture_width);
-void fb_localhistory_map(struct gui_localhistory * glh);
-
void gui_resize(struct fbtk_widget_s *root, int width, int height);
-
#endif /* NETSURF_FB_GUI_H */
/*
diff --git a/frontends/gtk/local_history.c b/frontends/framebuffer/local_history.c
similarity index 55%
copy from frontends/gtk/local_history.c
copy to frontends/framebuffer/local_history.c
index 650cb4f..cc45b1f 100644
--- a/frontends/gtk/local_history.c
+++ b/frontends/framebuffer/local_history.c
@@ -18,58 +18,62 @@
/**
* \file
- * Implementation of GTK local history manager.
+ * Implementation of framebuffer local history manager.
*/
#include <stdint.h>
+#include <stdbool.h>
#include <stdlib.h>
-#include <gtk/gtk.h>
+#include <limits.h>
+
+#include <libnsfb.h>
+#include <libnsfb_plot.h>
+#include <libnsfb_event.h>
#include "utils/log.h"
#include "netsurf/keypress.h"
#include "netsurf/plotters.h"
#include "desktop/local_history.h"
-#include "gtk/compat.h"
-#include "gtk/plotters.h"
-#include "gtk/resources.h"
-#include "gtk/corewindow.h"
-#include "gtk/local_history.h"
-
-struct nsgtk_local_history_window {
- struct nsgtk_corewindow core;
-
- GtkBuilder *builder;
+#include "framebuffer/gui.h"
+#include "framebuffer/fbtk.h"
+#include "framebuffer/framebuffer.h"
+#include "framebuffer/corewindow.h"
+#include "framebuffer/local_history.h"
- GtkWindow *wnd;
+struct fb_local_history_window {
+ struct fb_corewindow core;
struct local_history_session *session;
};
-static struct nsgtk_local_history_window *local_history_window = NULL;
-
+static struct fb_local_history_window *local_history_window = NULL;
/**
* callback for mouse action on local history window
*
- * \param nsgtk_cw The nsgtk core window structure.
+ * \param fb_cw The fb core window structure.
* \param mouse_state netsurf mouse state on event
* \param x location of event
* \param y location of event
* \return NSERROR_OK on success otherwise apropriate error code
*/
static nserror
-nsgtk_local_history_mouse(struct nsgtk_corewindow *nsgtk_cw,
+fb_local_history_mouse(struct fb_corewindow *fb_cw,
browser_mouse_state mouse_state,
int x, int y)
{
- struct nsgtk_local_history_window *lhw;
+ struct fb_local_history_window *lhw;
/* technically degenerate container of */
- lhw = (struct nsgtk_local_history_window *)nsgtk_cw;
+ lhw = (struct fb_local_history_window *)fb_cw;
local_history_mouse_action(lhw->session, mouse_state, x, y);
+ if (mouse_state != BROWSER_MOUSE_HOVER) {
+ fbtk_set_mapping(lhw->core.wnd, false);
+ }
+
return NSERROR_OK;
}
@@ -77,16 +81,16 @@ nsgtk_local_history_mouse(struct nsgtk_corewindow *nsgtk_cw,
/**
* callback for keypress on local history window
*
- * \param nsgtk_cw The nsgtk core window structure.
+ * \param fb_cw The fb core window structure.
* \param nskey The netsurf key code
* \return NSERROR_OK on success otherwise apropriate error code
*/
static nserror
-nsgtk_local_history_key(struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey)
+fb_local_history_key(struct fb_corewindow *fb_cw, uint32_t nskey)
{
- struct nsgtk_local_history_window *lhw;
+ struct fb_local_history_window *lhw;
/* technically degenerate container of */
- lhw = (struct nsgtk_local_history_window *)nsgtk_cw;
+ lhw = (struct fb_local_history_window *)fb_cw;
if (local_history_keypress(lhw->session, nskey)) {
return NSERROR_OK;
@@ -98,25 +102,24 @@ nsgtk_local_history_key(struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey)
/**
* callback on draw event for local history window
*
- * \param nsgtk_cw The nsgtk core window structure.
+ * \param fb_cw The fb core window structure.
* \param r The rectangle of the window that needs updating.
* \return NSERROR_OK on success otherwise apropriate error code
*/
static nserror
-nsgtk_local_history_draw(struct nsgtk_corewindow *nsgtk_cw, struct rect *r)
+fb_local_history_draw(struct fb_corewindow *fb_cw, struct rect *r)
{
struct redraw_context ctx = {
.interactive = true,
.background_images = true,
- .plot = &nsgtk_plotters
+ .plot = &fb_plotters
};
- struct nsgtk_local_history_window *lhw;
+ struct fb_local_history_window *lhw;
/* technically degenerate container of */
- lhw = (struct nsgtk_local_history_window *)nsgtk_cw;
+ lhw = (struct fb_local_history_window *)fb_cw;
- ctx.plot->clip(&ctx, r);
- local_history_redraw(lhw->session, r->x0, r->y0, r, &ctx);
+ local_history_redraw(lhw->session, 0, 0, r, &ctx);
return NSERROR_OK;
}
@@ -127,10 +130,11 @@ nsgtk_local_history_draw(struct nsgtk_corewindow *nsgtk_cw, struct rect *r)
* \return NSERROR_OK on success else appropriate error code on faliure.
*/
static nserror
-nsgtk_local_history_init(struct browser_window *bw,
- struct nsgtk_local_history_window **win_out)
+fb_local_history_init(fbtk_widget_t *parent,
+ struct browser_window *bw,
+ struct fb_local_history_window **win_out)
{
- struct nsgtk_local_history_window *ncwin;
+ struct fb_local_history_window *ncwin;
nserror res;
/* memoise window so it can be represented when necessary
@@ -141,42 +145,16 @@ nsgtk_local_history_init(struct browser_window *bw,
return res;
}
- ncwin = malloc(sizeof(struct nsgtk_local_history_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
- res = nsgtk_builder_new_from_resname("localhistory", &ncwin->builder);
- if (res != NSERROR_OK) {
- LOG("Local history UI builder init failed");
- free(ncwin);
- return res;
- }
-
- gtk_builder_connect_signals(ncwin->builder, NULL);
-
- ncwin->wnd = GTK_WINDOW(gtk_builder_get_object(ncwin->builder,
- "wndHistory"));
-
- ncwin->core.scrolled = GTK_SCROLLED_WINDOW(
- gtk_builder_get_object(ncwin->builder,
- "HistoryScrolled"));
+ ncwin->core.draw = fb_local_history_draw;
+ ncwin->core.key = fb_local_history_key;
+ ncwin->core.mouse = fb_local_history_mouse;
- ncwin->core.drawing_area = GTK_DRAWING_AREA(
- gtk_builder_get_object(ncwin->builder,
- "HistoryDrawingArea"));
-
- /* make the delete event hide the window */
- g_signal_connect(G_OBJECT(ncwin->wnd),
- "delete_event",
- G_CALLBACK(gtk_widget_hide_on_delete),
- NULL);
-
- ncwin->core.draw = nsgtk_local_history_draw;
- ncwin->core.key = nsgtk_local_history_key;
- ncwin->core.mouse = nsgtk_local_history_mouse;
-
- res = nsgtk_corewindow_init(&ncwin->core);
+ res = fb_corewindow_init(parent, &ncwin->core);
if (res != NSERROR_OK) {
free(ncwin);
return res;
@@ -198,17 +176,18 @@ nsgtk_local_history_init(struct browser_window *bw,
/* exported function documented gtk/history.h */
-nserror nsgtk_local_history_present(GtkWindow *parent,
- struct browser_window *bw)
+nserror fb_local_history_present(fbtk_widget_t *parent,
+ struct browser_window *bw)
{
nserror res;
int prnt_width, prnt_height;
int width, height;
- res = nsgtk_local_history_init(bw, &local_history_window);
+
+ res = fb_local_history_init(parent, bw, &local_history_window);
if (res == NSERROR_OK) {
- gtk_window_set_transient_for(local_history_window->wnd, parent);
- gtk_window_get_size(parent, &prnt_width, &prnt_height);
+ prnt_width = fbtk_get_width(parent);
+ prnt_height = fbtk_get_height(parent);
/* resize history widget ensureing the drawing area is
* no larger than parent window
@@ -222,9 +201,10 @@ nserror nsgtk_local_history_present(GtkWindow *parent,
if (height > prnt_height) {
height = prnt_height;
}
- gtk_window_resize(local_history_window->wnd, width, height);
+ /* should update scroll area with contents */
- gtk_window_present(local_history_window->wnd);
+ fbtk_set_zorder(local_history_window->core.wnd, INT_MIN);
+ fbtk_set_mapping(local_history_window->core.wnd, true);
}
return res;
@@ -232,12 +212,12 @@ nserror nsgtk_local_history_present(GtkWindow *parent,
/* exported function documented gtk/history.h */
-nserror nsgtk_local_history_hide(void)
+nserror fb_local_history_hide(void)
{
nserror res = NSERROR_OK;
if (local_history_window != NULL) {
- gtk_widget_hide(GTK_WIDGET(local_history_window->wnd));
+ fbtk_set_mapping(local_history_window->core.wnd, false);
res = local_history_set(local_history_window->session, NULL);
}
@@ -247,7 +227,7 @@ nserror nsgtk_local_history_hide(void)
/* exported function documented gtk/history.h */
-nserror nsgtk_local_history_destroy(void)
+nserror fb_local_history_destroy(void)
{
nserror res;
@@ -257,9 +237,8 @@ nserror nsgtk_local_history_destroy(void)
res = local_history_fini(local_history_window->session);
if (res == NSERROR_OK) {
- res = nsgtk_corewindow_fini(&local_history_window->core);
- gtk_widget_destroy(GTK_WIDGET(local_history_window->wnd));
- g_object_unref(G_OBJECT(local_history_window->builder));
+ res = fb_corewindow_fini(&local_history_window->core);
+ //gtk_widget_destroy(GTK_WIDGET(local_history_window->wnd));
free(local_history_window);
local_history_window = NULL;
}
diff --git a/frontends/gtk/local_history.h b/frontends/framebuffer/local_history.h
similarity index 76%
copy from frontends/gtk/local_history.h
copy to frontends/framebuffer/local_history.h
index 605405d..929eeac 100644
--- a/frontends/gtk/local_history.h
+++ b/frontends/framebuffer/local_history.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Vincent Sanders <vince(a)kyllikki.org>
+ * Copyright 2017 Vincent Sanders <vince(a)netsurf-browser.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -18,11 +18,11 @@
/**
* \file
- * Interface to GTK local history manager
+ * Interface to framebuffer local history manager
*/
-#ifndef NSGTK_LOCAL_HISTORY_H
-#define NSGTK_LOCAL_HISTORY_H
+#ifndef FB_LOCAL_HISTORY_H
+#define FB_LOCAL_HISTORY_H
struct browser_window;
@@ -31,19 +31,19 @@ struct browser_window;
*
* \return NSERROR_OK on success else appropriate error code on faliure.
*/
-nserror nsgtk_local_history_present(GtkWindow *parent, struct browser_window *bw);
+nserror fb_local_history_present(fbtk_widget_t *parent, struct browser_window *bw);
/**
* hide the local history window from being visible.
*
* \return NSERROR_OK on success else appropriate error code on faliure.
*/
-nserror nsgtk_local_history_hide(void);
+nserror fb_local_history_hide(void);
/**
* Destroys the local history window and performs any other necessary cleanup
* actions.
*/
-nserror nsgtk_local_history_destroy(void);
+nserror fb_local_history_destroy(void);
#endif
diff --git a/frontends/framebuffer/localhistory.c b/frontends/framebuffer/localhistory.c
deleted file mode 100644
index 3192f07..0000000
--- a/frontends/framebuffer/localhistory.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright 2010 Vincent Sanders <vince(a)simtec.co.uk>
- *
- * 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 <stdbool.h>
-#include <stdlib.h>
-#include <limits.h>
-
-#include <libnsfb.h>
-#include <libnsfb_plot.h>
-#include <libnsfb_event.h>
-
-#include "desktop/browser_history.h"
-#include "netsurf/plotters.h"
-
-#include "framebuffer/gui.h"
-#include "framebuffer/fbtk.h"
-#include "framebuffer/framebuffer.h"
-
-static int
-localhistory_redraw(fbtk_widget_t *widget, fbtk_callback_info *cbi)
-{
- struct gui_localhistory *glh = cbi->context;
- nsfb_bbox_t rbox;
-
- struct redraw_context ctx = {
- .interactive = true,
- .background_images = true,
- .plot = &fb_plotters
- };
-
- rbox.x0 = fbtk_get_absx(widget);
- rbox.y0 = fbtk_get_absy(widget);
-
- rbox.x1 = rbox.x0 + fbtk_get_width(widget);
- rbox.y1 = rbox.y0 + fbtk_get_height(widget);
-
- nsfb_claim(fbtk_get_nsfb(widget), &rbox);
-
- nsfb_plot_rectangle_fill(fbtk_get_nsfb(widget), &rbox, 0xffffffff);
-
- browser_window_history_redraw_rectangle(glh->bw,
- glh->scrollx,
- glh->scrolly,
- fbtk_get_width(widget) + glh->scrollx,
- fbtk_get_height(widget) + glh->scrolly,
- 0, 0, &ctx);
-
- nsfb_update(fbtk_get_nsfb(widget), &rbox);
-
- return 0;
-}
-
-static int
-localhistory_click(fbtk_widget_t *widget, fbtk_callback_info *cbi)
-{
- struct gui_localhistory *glh = cbi->context;
-
- if (cbi->event->type != NSFB_EVENT_KEY_UP)
- return 0;
-
- browser_window_history_click(glh->bw, cbi->x, cbi->y, false);
-
- fbtk_set_mapping(glh->window, false);
-
- return 1;
-}
-
-struct gui_localhistory *
-fb_create_localhistory(struct browser_window *bw,
- fbtk_widget_t *parent,
- int furniture_width)
-{
- struct gui_localhistory *glh;
- glh = calloc(1, sizeof(struct gui_localhistory));
-
- if (glh == NULL)
- return NULL;
-
- glh->bw = bw;
-
- /* container window */
- glh->window = fbtk_create_window(parent, 0, 0, 0, 0, 0);
-
- glh->history = fbtk_create_user(glh->window, 0, 0, -furniture_width, -furniture_width, glh);
-
- fbtk_set_handler(glh->history, FBTK_CBT_REDRAW, localhistory_redraw, glh);
- fbtk_set_handler(glh->history, FBTK_CBT_CLICK, localhistory_click, glh);
- /*
- fbtk_set_handler(gw->localhistory, FBTK_CBT_INPUT, fb_browser_window_input, gw);
- fbtk_set_handler(gw->localhistory, FBTK_CBT_POINTERMOVE, fb_browser_window_move, bw);
- */
-
- /* create horizontal scrollbar */
- glh->hscroll = fbtk_create_hscroll(glh->window,
- 0,
- fbtk_get_height(glh->window) - furniture_width,
- fbtk_get_width(glh->window) - furniture_width,
- furniture_width,
- FB_SCROLL_COLOUR,
- FB_FRAME_COLOUR,
- NULL,
- NULL);
-
- glh->vscroll = fbtk_create_vscroll(glh->window,
- fbtk_get_width(glh->window) - furniture_width,
- 0,
- furniture_width,
- fbtk_get_height(glh->window) - furniture_width,
- FB_SCROLL_COLOUR,
- FB_FRAME_COLOUR,
- NULL,
- NULL);
-
- fbtk_create_fill(glh->window,
- fbtk_get_width(glh->window) - furniture_width,
- fbtk_get_height(glh->window) - furniture_width,
- furniture_width,
- furniture_width,
- FB_FRAME_COLOUR);
-
- return glh;
-}
-
-void
-fb_localhistory_map(struct gui_localhistory * glh)
-{
- fbtk_set_zorder(glh->window, INT_MIN);
- fbtk_set_mapping(glh->window, true);
-}
diff --git a/frontends/gtk/bitmap.c b/frontends/gtk/bitmap.c
index b428142..36b614c 100644
--- a/frontends/gtk/bitmap.c
+++ b/frontends/gtk/bitmap.c
@@ -18,9 +18,9 @@
/**
* \file
- * Generic bitmap handling (GDK / GTK+ implementation).
+ * GTK bitmap handling.
*
- * This implements the interface given by desktop/bitmap.h using GdkPixbufs.
+ * This implements the bitmap interface using cairo image surfaces
*/
#include <assert.h>
diff --git a/frontends/gtk/cookies.c b/frontends/gtk/cookies.c
index dc77e1c..500cd07 100644
--- a/frontends/gtk/cookies.c
+++ b/frontends/gtk/cookies.c
@@ -246,7 +246,7 @@ static nserror nsgtk_cookies_init(void)
return NSERROR_OK;
}
- ncwin = malloc(sizeof(struct nsgtk_cookie_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/gtk/corewindow.c b/frontends/gtk/corewindow.c
index 9ad644d..ddc61c7 100644
--- a/frontends/gtk/corewindow.c
+++ b/frontends/gtk/corewindow.c
@@ -662,7 +662,7 @@ static void
nsgtk_cw_drag_status(struct core_window *cw, core_window_drag_status ds)
{
struct nsgtk_corewindow *nsgtk_cw = (struct nsgtk_corewindow *)cw;
- nsgtk_cw->drag_staus = ds;
+ nsgtk_cw->drag_status = ds;
}
@@ -682,6 +682,7 @@ static struct core_window_callback_table nsgtk_cw_cb_table = {
nserror nsgtk_corewindow_init(struct nsgtk_corewindow *nsgtk_cw)
{
nsgtk_cw->cb_table = &nsgtk_cw_cb_table;
+ nsgtk_cw->drag_status = CORE_WINDOW_DRAG_NONE;
/* input method setup */
nsgtk_cw->input_method = gtk_im_multicontext_new();
diff --git a/frontends/gtk/corewindow.h b/frontends/gtk/corewindow.h
index 90bfd61..6100e67 100644
--- a/frontends/gtk/corewindow.h
+++ b/frontends/gtk/corewindow.h
@@ -51,7 +51,7 @@ struct nsgtk_corewindow {
/** mouse state */
struct nsgtk_corewindow_mouse mouse_state;
/** drag status set by core */
- core_window_drag_status drag_staus;
+ core_window_drag_status drag_status;
/**
* callback to draw on drawable area of nsgtk core window
diff --git a/frontends/gtk/global_history.c b/frontends/gtk/global_history.c
index 66ba1a6..360eb4e 100644
--- a/frontends/gtk/global_history.c
+++ b/frontends/gtk/global_history.c
@@ -299,7 +299,7 @@ static nserror nsgtk_global_history_init(void)
return NSERROR_OK;
}
- ncwin = malloc(sizeof(struct nsgtk_global_history_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/gtk/hotlist.c b/frontends/gtk/hotlist.c
index 34a1377..936573a 100644
--- a/frontends/gtk/hotlist.c
+++ b/frontends/gtk/hotlist.c
@@ -319,7 +319,7 @@ static nserror nsgtk_hotlist_init(void)
return NSERROR_OK;
}
- ncwin = malloc(sizeof(struct nsgtk_hotlist_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/gtk/local_history.c b/frontends/gtk/local_history.c
index 650cb4f..cc95801 100644
--- a/frontends/gtk/local_history.c
+++ b/frontends/gtk/local_history.c
@@ -116,7 +116,7 @@ nsgtk_local_history_draw(struct nsgtk_corewindow *nsgtk_cw, struct rect *r)
lhw = (struct nsgtk_local_history_window *)nsgtk_cw;
ctx.plot->clip(&ctx, r);
- local_history_redraw(lhw->session, r->x0, r->y0, r, &ctx);
+ local_history_redraw(lhw->session, 0, 0, r, &ctx);
return NSERROR_OK;
}
@@ -141,7 +141,7 @@ nsgtk_local_history_init(struct browser_window *bw,
return res;
}
- ncwin = malloc(sizeof(struct nsgtk_local_history_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/gtk/window.c b/frontends/gtk/window.c
index 78a6f62..de5311e 100644
--- a/frontends/gtk/window.c
+++ b/frontends/gtk/window.c
@@ -1048,7 +1048,7 @@ static void gui_window_set_status(struct gui_window *g, const char *text)
* content is shown. The GTK implementation scrolls the contents so
* the specified point in the content is at the top of the viewport.
*
- * \param gw gui window to scroll
+ * \param g gui window to scroll
* \param rect The rectangle to ensure is shown.
* \return NSERROR_OK on success or apropriate error code.
*/
diff --git a/frontends/monkey/401login.c b/frontends/monkey/401login.c
index 8b4d33d..090f189 100644
--- a/frontends/monkey/401login.c
+++ b/frontends/monkey/401login.c
@@ -24,11 +24,11 @@
#include "monkey/401login.h"
typedef struct monkey401 {
- struct monkey401 *r_next, *r_prev;
- uint32_t num;
- lwc_string *host; /* Ignore */
- nserror (*cb)(bool,void*);
- void *pw;
+ struct monkey401 *r_next, *r_prev;
+ uint32_t num;
+ lwc_string *host; /* Ignore */
+ nserror (*cb)(bool,void*);
+ void *pw;
} monkey401_t;
static monkey401_t *m4_ring = NULL;
@@ -37,19 +37,19 @@ static uint32_t m4_ctr = 0;
void gui_401login_open(nsurl *url, const char *realm,
nserror (*cb)(bool proceed, void *pw), void *cbpw)
{
- monkey401_t *m4t = calloc(sizeof(*m4t), 1);
- if (m4t == NULL) {
- cb(false, cbpw);
- return;
- }
- m4t->cb = cb;
- m4t->pw = cbpw;
- m4t->num = m4_ctr++;
+ monkey401_t *m4t = calloc(sizeof(*m4t), 1);
+ if (m4t == NULL) {
+ cb(false, cbpw);
+ return;
+ }
+ m4t->cb = cb;
+ m4t->pw = cbpw;
+ m4t->num = m4_ctr++;
- RING_INSERT(m4_ring, m4t);
+ RING_INSERT(m4_ring, m4t);
- fprintf(stdout, "401LOGIN OPEN M4 %u URL %s REALM %s\n",
- m4t->num, nsurl_access(url), realm);
+ fprintf(stdout, "401LOGIN OPEN M4 %u URL %s REALM %s\n",
+ m4t->num, nsurl_access(url), realm);
}
diff --git a/frontends/monkey/bitmap.c b/frontends/monkey/bitmap.c
index 3313e11..83b8566 100644
--- a/frontends/monkey/bitmap.c
+++ b/frontends/monkey/bitmap.c
@@ -26,125 +26,125 @@
#include "monkey/bitmap.h"
struct bitmap {
- void *ptr;
- size_t rowstride;
- int width;
- int height;
- unsigned int state;
+ void *ptr;
+ size_t rowstride;
+ int width;
+ int height;
+ unsigned int state;
};
static void *bitmap_create(int width, int height, unsigned int state)
{
- struct bitmap *ret = calloc(sizeof(*ret), 1);
- if (ret == NULL)
- return NULL;
+ struct bitmap *ret = calloc(sizeof(*ret), 1);
+ if (ret == NULL)
+ return NULL;
- ret->width = width;
- ret->height = height;
- ret->state = state;
+ ret->width = width;
+ ret->height = height;
+ ret->state = state;
- ret->ptr = calloc(width, height * 4);
+ ret->ptr = calloc(width, height * 4);
- if (ret->ptr == NULL) {
- free(ret);
- return NULL;
- }
+ if (ret->ptr == NULL) {
+ free(ret);
+ return NULL;
+ }
- return ret;
+ return ret;
}
static void bitmap_destroy(void *bitmap)
{
- struct bitmap *bmap = bitmap;
- free(bmap->ptr);
- free(bmap);
+ struct bitmap *bmap = bitmap;
+ free(bmap->ptr);
+ free(bmap);
}
static void bitmap_set_opaque(void *bitmap, bool opaque)
{
- struct bitmap *bmap = bitmap;
+ struct bitmap *bmap = bitmap;
- if (opaque)
- bmap->state |= (BITMAP_OPAQUE);
- else
- bmap->state &= ~(BITMAP_OPAQUE);
+ if (opaque)
+ bmap->state |= (BITMAP_OPAQUE);
+ else
+ bmap->state &= ~(BITMAP_OPAQUE);
}
static bool bitmap_test_opaque(void *bitmap)
{
- return false;
+ return false;
}
static bool bitmap_get_opaque(void *bitmap)
{
- struct bitmap *bmap = bitmap;
+ struct bitmap *bmap = bitmap;
- return (bmap->state & BITMAP_OPAQUE) == BITMAP_OPAQUE;
+ return (bmap->state & BITMAP_OPAQUE) == BITMAP_OPAQUE;
}
static unsigned char *bitmap_get_buffer(void *bitmap)
{
- struct bitmap *bmap = bitmap;
+ struct bitmap *bmap = bitmap;
- return (unsigned char *)(bmap->ptr);
+ return (unsigned char *)(bmap->ptr);
}
static size_t bitmap_get_rowstride(void *bitmap)
{
- struct bitmap *bmap = bitmap;
- return bmap->width * 4;
+ struct bitmap *bmap = bitmap;
+ return bmap->width * 4;
}
static size_t bitmap_get_bpp(void *bitmap)
{
- /* OMG?! */
- return 4;
+ /* OMG?! */
+ return 4;
}
static bool bitmap_save(void *bitmap, const char *path, unsigned flags)
{
- return true;
+ return true;
}
static void bitmap_modified(void *bitmap)
{
- struct bitmap *bmap = bitmap;
- bmap->state |= BITMAP_MODIFIED;
+ struct bitmap *bmap = bitmap;
+ bmap->state |= BITMAP_MODIFIED;
}
static int bitmap_get_width(void *bitmap)
{
- struct bitmap *bmap = bitmap;
- return bmap->width;
+ struct bitmap *bmap = bitmap;
+ return bmap->width;
}
static int bitmap_get_height(void *bitmap)
{
- struct bitmap *bmap = bitmap;
- return bmap->height;
+ struct bitmap *bmap = bitmap;
+ return bmap->height;
}
static nserror bitmap_render(struct bitmap *bitmap,
struct hlcache_handle *content)
{
- fprintf(stdout, "GENERIC BITMAP RENDER\n");
- return NSERROR_OK;
+ fprintf(stdout, "GENERIC BITMAP RENDER\n");
+ return NSERROR_OK;
}
static struct gui_bitmap_table bitmap_table = {
- .create = bitmap_create,
- .destroy = 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,
+ .create = bitmap_create,
+ .destroy = 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,
};
struct gui_bitmap_table *monkey_bitmap_table = &bitmap_table;
diff --git a/frontends/monkey/browser.c b/frontends/monkey/browser.c
index 93360aa..16d3301 100644
--- a/frontends/monkey/browser.c
+++ b/frontends/monkey/browser.c
@@ -42,71 +42,71 @@ static struct gui_window *gw_ring = NULL;
/* exported function documented in monkey/browser.h */
nserror monkey_warn_user(const char *warning, const char *detail)
{
- fprintf(stderr, "WARN %s %s\n", warning, detail);
- return NSERROR_OK;
+ fprintf(stderr, "WARN %s %s\n", warning, detail);
+ return NSERROR_OK;
}
struct gui_window *
monkey_find_window_by_num(uint32_t win_num)
{
- struct gui_window *ret = NULL;
+ struct gui_window *ret = NULL;
- RING_ITERATE_START(struct gui_window, gw_ring, c_ring) {
- if (c_ring->win_num == win_num) {
- ret = c_ring;
- RING_ITERATE_STOP(gw_ring, c_ring);
- }
- } RING_ITERATE_END(gw_ring, c_ring);
+ RING_ITERATE_START(struct gui_window, gw_ring, c_ring) {
+ if (c_ring->win_num == win_num) {
+ ret = c_ring;
+ RING_ITERATE_STOP(gw_ring, c_ring);
+ }
+ } RING_ITERATE_END(gw_ring, c_ring);
- return ret;
+ return ret;
}
void
monkey_kill_browser_windows(void)
{
- while (gw_ring != NULL) {
- browser_window_destroy(gw_ring->bw);
- }
+ while (gw_ring != NULL) {
+ browser_window_destroy(gw_ring->bw);
+ }
}
static struct gui_window *
gui_window_create(struct browser_window *bw,
- struct gui_window *existing,
- gui_window_create_flags flags)
+ struct gui_window *existing,
+ gui_window_create_flags flags)
{
- struct gui_window *ret = calloc(sizeof(*ret), 1);
- if (ret == NULL)
- return NULL;
+ struct gui_window *ret = calloc(sizeof(*ret), 1);
+ if (ret == NULL)
+ return NULL;
- ret->win_num = win_ctr++;
- ret->bw = bw;
+ ret->win_num = win_ctr++;
+ ret->bw = bw;
- ret->width = 800;
- ret->height = 600;
+ ret->width = 800;
+ ret->height = 600;
- fprintf(stdout, "WINDOW NEW WIN %u FOR %p EXISTING %p NEWTAB %s CLONE %s\n",
- ret->win_num, bw, existing, flags & GW_CREATE_TAB ? "TRUE" : "FALSE",
- flags & GW_CREATE_CLONE ? "TRUE" : "FALSE");
- fprintf(stdout, "WINDOW SIZE WIN %u WIDTH %d HEIGHT %d\n",
- ret->win_num, ret->width, ret->height);
+ fprintf(stdout, "WINDOW NEW WIN %u FOR %p EXISTING %p NEWTAB %s CLONE %s\n",
+ ret->win_num, bw, existing, flags & GW_CREATE_TAB ? "TRUE" : "FALSE",
+ flags & GW_CREATE_CLONE ? "TRUE" : "FALSE");
+ fprintf(stdout, "WINDOW SIZE WIN %u WIDTH %d HEIGHT %d\n",
+ ret->win_num, ret->width, ret->height);
- RING_INSERT(gw_ring, ret);
+ RING_INSERT(gw_ring, ret);
- return ret;
+ return ret;
}
static void
gui_window_destroy(struct gui_window *g)
{
- fprintf(stdout, "WINDOW DESTROY WIN %u\n", g->win_num);
- RING_REMOVE(gw_ring, g);
- free(g);
+ fprintf(stdout, "WINDOW DESTROY WIN %u\n", g->win_num);
+ RING_REMOVE(gw_ring, g);
+ free(g);
}
static void
gui_window_set_title(struct gui_window *g, const char *title)
{
- fprintf(stdout, "WINDOW TITLE WIN %u STR %s\n", g->win_num, title);
+ fprintf(stdout, "WINDOW TITLE WIN %u STR %s\n", g->win_num, title);
}
/**
@@ -122,36 +122,36 @@ static nserror
gui_window_get_dimensions(struct gui_window *g, int *width, int *height,
bool scaled)
{
- fprintf(stdout, "WINDOW GET_DIMENSIONS WIN %u WIDTH %d HEIGHT %d\n",
- g->win_num, g->width, g->height);
- *width = g->width;
- *height = g->height;
+ fprintf(stdout, "WINDOW GET_DIMENSIONS WIN %u WIDTH %d HEIGHT %d\n",
+ g->win_num, g->width, g->height);
+ *width = g->width;
+ *height = g->height;
- return NSERROR_OK;
+ return NSERROR_OK;
}
static void
gui_window_new_content(struct gui_window *g)
{
- fprintf(stdout, "WINDOW NEW_CONTENT WIN %u\n", g->win_num);
+ fprintf(stdout, "WINDOW NEW_CONTENT WIN %u\n", g->win_num);
}
static void
gui_window_set_icon(struct gui_window *g, struct hlcache_handle *icon)
{
- fprintf(stdout, "WINDOW NEW_ICON WIN %u\n", g->win_num);
+ fprintf(stdout, "WINDOW NEW_ICON WIN %u\n", g->win_num);
}
static void
gui_window_start_throbber(struct gui_window *g)
{
- fprintf(stdout, "WINDOW START_THROBBER WIN %u\n", g->win_num);
+ fprintf(stdout, "WINDOW START_THROBBER WIN %u\n", g->win_num);
}
static void
gui_window_stop_throbber(struct gui_window *g)
{
- fprintf(stdout, "WINDOW STOP_THROBBER WIN %u\n", g->win_num);
+ fprintf(stdout, "WINDOW STOP_THROBBER WIN %u\n", g->win_num);
}
@@ -168,12 +168,12 @@ gui_window_stop_throbber(struct gui_window *g)
static nserror
gui_window_set_scroll(struct gui_window *gw, const struct rect *rect)
{
- gw->scrollx = rect->x0;
- gw->scrolly = rect->y0;
+ gw->scrollx = rect->x0;
+ gw->scrolly = rect->y0;
- fprintf(stdout, "WINDOW SET_SCROLL WIN %u X0 %d Y0 %d X1 %d Y1 %d\n",
- gw->win_num, rect->x0, rect->y0, rect->x1, rect->y1);
- return NSERROR_OK;
+ fprintf(stdout, "WINDOW SET_SCROLL WIN %u X %d Y %d\n",
+ gw->win_num, rect->x0, rect->y0);
+ return NSERROR_OK;
}
@@ -204,144 +204,144 @@ monkey_window_invalidate_area(struct gui_window *gw, const struct rect *rect)
static void
gui_window_update_extent(struct gui_window *g)
{
- int width, height;
+ int width, height;
- if (browser_window_get_extents(g->bw, false, &width, &height) != NSERROR_OK)
- return;
+ if (browser_window_get_extents(g->bw, false, &width, &height) != NSERROR_OK)
+ return;
- fprintf(stdout, "WINDOW UPDATE_EXTENT WIN %u WIDTH %d HEIGHT %d\n",
- g->win_num, width, height);
+ fprintf(stdout, "WINDOW UPDATE_EXTENT WIN %u WIDTH %d HEIGHT %d\n",
+ g->win_num, width, height);
}
static void
gui_window_set_status(struct gui_window *g, const char *text)
{
- fprintf(stdout, "WINDOW SET_STATUS WIN %u STR %s\n", g->win_num, text);
+ fprintf(stdout, "WINDOW SET_STATUS WIN %u STR %s\n", g->win_num, text);
}
static void
gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
{
- const char *ptr_name = "UNKNOWN";
+ const char *ptr_name = "UNKNOWN";
- switch (shape) {
- case GUI_POINTER_POINT:
- ptr_name = "POINT";
- break;
- case GUI_POINTER_CARET:
- ptr_name = "CARET";
- break;
- case GUI_POINTER_UP:
- ptr_name = "UP";
- break;
- case GUI_POINTER_DOWN:
- ptr_name = "DOWN";
- break;
- case GUI_POINTER_LEFT:
- ptr_name = "LEFT";
- break;
- case GUI_POINTER_RIGHT:
- ptr_name = "RIGHT";
- break;
- case GUI_POINTER_LD:
- ptr_name = "LD";
- break;
- case GUI_POINTER_RD:
- ptr_name = "RD";
- break;
- case GUI_POINTER_LU:
- ptr_name = "LU";
- break;
- case GUI_POINTER_RU:
- ptr_name = "RU";
- break;
- case GUI_POINTER_CROSS:
- ptr_name = "CROSS";
- break;
- case GUI_POINTER_MOVE:
- ptr_name = "MOVE";
- break;
- case GUI_POINTER_WAIT:
- ptr_name = "WAIT";
- break;
- case GUI_POINTER_HELP:
- ptr_name = "HELP";
- break;
- case GUI_POINTER_MENU:
- ptr_name = "MENU";
- break;
- case GUI_POINTER_PROGRESS:
- ptr_name = "PROGRESS";
- break;
- case GUI_POINTER_NO_DROP:
- ptr_name = "NO_DROP";
- break;
- case GUI_POINTER_NOT_ALLOWED:
- ptr_name = "NOT_ALLOWED";
- break;
- case GUI_POINTER_DEFAULT:
- ptr_name = "DEFAULT";
- break;
- default:
- break;
- }
- fprintf(stdout, "WINDOW SET_POINTER WIN %u POINTER %s\n", g->win_num, ptr_name);
+ switch (shape) {
+ case GUI_POINTER_POINT:
+ ptr_name = "POINT";
+ break;
+ case GUI_POINTER_CARET:
+ ptr_name = "CARET";
+ break;
+ case GUI_POINTER_UP:
+ ptr_name = "UP";
+ break;
+ case GUI_POINTER_DOWN:
+ ptr_name = "DOWN";
+ break;
+ case GUI_POINTER_LEFT:
+ ptr_name = "LEFT";
+ break;
+ case GUI_POINTER_RIGHT:
+ ptr_name = "RIGHT";
+ break;
+ case GUI_POINTER_LD:
+ ptr_name = "LD";
+ break;
+ case GUI_POINTER_RD:
+ ptr_name = "RD";
+ break;
+ case GUI_POINTER_LU:
+ ptr_name = "LU";
+ break;
+ case GUI_POINTER_RU:
+ ptr_name = "RU";
+ break;
+ case GUI_POINTER_CROSS:
+ ptr_name = "CROSS";
+ break;
+ case GUI_POINTER_MOVE:
+ ptr_name = "MOVE";
+ break;
+ case GUI_POINTER_WAIT:
+ ptr_name = "WAIT";
+ break;
+ case GUI_POINTER_HELP:
+ ptr_name = "HELP";
+ break;
+ case GUI_POINTER_MENU:
+ ptr_name = "MENU";
+ break;
+ case GUI_POINTER_PROGRESS:
+ ptr_name = "PROGRESS";
+ break;
+ case GUI_POINTER_NO_DROP:
+ ptr_name = "NO_DROP";
+ break;
+ case GUI_POINTER_NOT_ALLOWED:
+ ptr_name = "NOT_ALLOWED";
+ break;
+ case GUI_POINTER_DEFAULT:
+ ptr_name = "DEFAULT";
+ break;
+ default:
+ break;
+ }
+ fprintf(stdout, "WINDOW SET_POINTER WIN %u POINTER %s\n", g->win_num, ptr_name);
}
static nserror
gui_window_set_url(struct gui_window *g, nsurl *url)
{
- fprintf(stdout, "WINDOW SET_URL WIN %u URL %s\n", g->win_num, nsurl_access(url));
- return NSERROR_OK;
+ fprintf(stdout, "WINDOW SET_URL WIN %u URL %s\n", g->win_num, nsurl_access(url));
+ return NSERROR_OK;
}
static bool
gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
{
- fprintf(stdout, "WINDOW GET_SCROLL WIN %u X %d Y %d\n",
- g->win_num, g->scrollx, g->scrolly);
- *sx = g->scrollx;
- *sy = g->scrolly;
- return true;
+ fprintf(stdout, "WINDOW GET_SCROLL WIN %u X %d Y %d\n",
+ g->win_num, g->scrollx, g->scrolly);
+ *sx = g->scrollx;
+ *sy = g->scrolly;
+ return true;
}
static bool
gui_window_scroll_start(struct gui_window *g)
{
- fprintf(stdout, "WINDOW SCROLL_START WIN %u\n", g->win_num);
- g->scrollx = g->scrolly = 0;
- return true;
+ fprintf(stdout, "WINDOW SCROLL_START WIN %u\n", g->win_num);
+ g->scrollx = g->scrolly = 0;
+ return true;
}
static void
gui_window_place_caret(struct gui_window *g, int x, int y, int height,
- const struct rect *clip)
+ const struct rect *clip)
{
- fprintf(stdout, "WINDOW PLACE_CARET WIN %u X %d Y %d HEIGHT %d\n",
- g->win_num, x, y, height);
+ fprintf(stdout, "WINDOW PLACE_CARET WIN %u X %d Y %d HEIGHT %d\n",
+ g->win_num, x, y, height);
}
static void
gui_window_remove_caret(struct gui_window *g)
{
- fprintf(stdout, "WINDOW REMOVE_CARET WIN %u\n", g->win_num);
+ fprintf(stdout, "WINDOW REMOVE_CARET WIN %u\n", g->win_num);
}
static bool
gui_window_drag_start(struct gui_window *g, gui_drag_type type,
const struct rect *rect)
{
- fprintf(stdout, "WINDOW SCROLL_START WIN %u TYPE %i\n", g->win_num, type);
- return false;
+ fprintf(stdout, "WINDOW SCROLL_START WIN %u TYPE %i\n", g->win_num, type);
+ return false;
}
static nserror
gui_window_save_link(struct gui_window *g, nsurl *url, const char *title)
{
- fprintf(stdout, "WINDOW SAVE_LINK WIN %u URL %s TITLE %s\n",
- g->win_num, nsurl_access(url), title);
- return NSERROR_OK;
+ fprintf(stdout, "WINDOW SAVE_LINK WIN %u URL %s TITLE %s\n",
+ g->win_num, nsurl_access(url), title);
+ return NSERROR_OK;
}
@@ -351,169 +351,169 @@ gui_window_save_link(struct gui_window *g, nsurl *url, const char *title)
static void
monkey_window_handle_new(int argc, char **argv)
{
- nsurl *url = NULL;
- nserror error = NSERROR_OK;
-
- if (argc > 3)
- return;
-
- if (argc == 3) {
- error = nsurl_create(argv[2], &url);
- }
- if (error == NSERROR_OK) {
- error = browser_window_create(BW_CREATE_HISTORY,
- url,
- NULL,
- NULL,
- NULL);
- if (url != NULL) {
- nsurl_unref(url);
- }
- }
- if (error != NSERROR_OK) {
- monkey_warn_user(messages_get_errorcode(error), 0);
- }
+ nsurl *url = NULL;
+ nserror error = NSERROR_OK;
+
+ if (argc > 3)
+ return;
+
+ if (argc == 3) {
+ error = nsurl_create(argv[2], &url);
+ }
+ if (error == NSERROR_OK) {
+ error = browser_window_create(BW_CREATE_HISTORY,
+ url,
+ NULL,
+ NULL,
+ NULL);
+ if (url != NULL) {
+ nsurl_unref(url);
+ }
+ }
+ if (error != NSERROR_OK) {
+ monkey_warn_user(messages_get_errorcode(error), 0);
+ }
}
static void
monkey_window_handle_destroy(int argc, char **argv)
{
- struct gui_window *gw;
- uint32_t nr = atoi((argc > 2) ? argv[2] : "-1");
+ struct gui_window *gw;
+ uint32_t nr = atoi((argc > 2) ? argv[2] : "-1");
- gw = monkey_find_window_by_num(nr);
+ gw = monkey_find_window_by_num(nr);
- if (gw == NULL) {
- fprintf(stdout, "ERROR WINDOW NUM BAD\n");
- } else {
- browser_window_destroy(gw->bw);
- }
+ if (gw == NULL) {
+ fprintf(stdout, "ERROR WINDOW NUM BAD\n");
+ } else {
+ browser_window_destroy(gw->bw);
+ }
}
static void
monkey_window_handle_go(int argc, char **argv)
{
- struct gui_window *gw;
- nsurl *url;
- nsurl *ref_url = NULL;
- nserror error;
+ struct gui_window *gw;
+ nsurl *url;
+ nsurl *ref_url = NULL;
+ nserror error;
- if (argc < 4 || argc > 5) {
- fprintf(stdout, "ERROR WINDOW GO ARGS BAD\n");
- return;
- }
+ if (argc < 4 || argc > 5) {
+ fprintf(stdout, "ERROR WINDOW GO ARGS BAD\n");
+ return;
+ }
- gw = monkey_find_window_by_num(atoi(argv[2]));
+ gw = monkey_find_window_by_num(atoi(argv[2]));
- if (gw == NULL) {
- fprintf(stdout, "ERROR WINDOW NUM BAD\n");
- return;
- }
-
- error = nsurl_create(argv[3], &url);
- if (error == NSERROR_OK) {
- if (argc == 5) {
- error = nsurl_create(argv[4], &ref_url);
- }
-
- if (error == NSERROR_OK) {
- error = browser_window_navigate(gw->bw,
- url,
- ref_url,
- BW_NAVIGATE_HISTORY,
- NULL,
- NULL,
- NULL);
- if (ref_url != NULL) {
- nsurl_unref(ref_url);
- }
- }
- nsurl_unref(url);
- }
-
- if (error != NSERROR_OK) {
- monkey_warn_user(messages_get_errorcode(error), 0);
- }
+ if (gw == NULL) {
+ fprintf(stdout, "ERROR WINDOW NUM BAD\n");
+ return;
+ }
+
+ error = nsurl_create(argv[3], &url);
+ if (error == NSERROR_OK) {
+ if (argc == 5) {
+ error = nsurl_create(argv[4], &ref_url);
+ }
+
+ if (error == NSERROR_OK) {
+ error = browser_window_navigate(gw->bw,
+ url,
+ ref_url,
+ BW_NAVIGATE_HISTORY,
+ NULL,
+ NULL,
+ NULL);
+ if (ref_url != NULL) {
+ nsurl_unref(ref_url);
+ }
+ }
+ nsurl_unref(url);
+ }
+
+ if (error != NSERROR_OK) {
+ monkey_warn_user(messages_get_errorcode(error), 0);
+ }
}
static void
monkey_window_handle_redraw(int argc, char **argv)
{
- struct gui_window *gw;
- struct rect clip;
- struct redraw_context ctx = {
- .interactive = true,
- .background_images = true,
- .plot = monkey_plotters
- };
+ struct gui_window *gw;
+ struct rect clip;
+ struct redraw_context ctx = {
+ .interactive = true,
+ .background_images = true,
+ .plot = monkey_plotters
+ };
- if (argc != 3 && argc != 7) {
- fprintf(stdout, "ERROR WINDOW REDRAW ARGS BAD\n");
- return;
- }
+ if (argc != 3 && argc != 7) {
+ fprintf(stdout, "ERROR WINDOW REDRAW ARGS BAD\n");
+ return;
+ }
- gw = monkey_find_window_by_num(atoi(argv[2]));
+ gw = monkey_find_window_by_num(atoi(argv[2]));
- if (gw == NULL) {
- fprintf(stdout, "ERROR WINDOW NUM BAD\n");
- return;
- }
+ if (gw == NULL) {
+ fprintf(stdout, "ERROR WINDOW NUM BAD\n");
+ return;
+ }
- clip.x0 = 0;
- clip.y0 = 0;
- clip.x1 = gw->width;
- clip.y1 = gw->height;
+ clip.x0 = 0;
+ clip.y0 = 0;
+ clip.x1 = gw->width;
+ clip.y1 = gw->height;
- if (argc == 7) {
- clip.x0 = atoi(argv[3]);
- clip.y0 = atoi(argv[4]);
- clip.x1 = atoi(argv[5]);
- clip.y1 = atoi(argv[6]);
- }
+ if (argc == 7) {
+ clip.x0 = atoi(argv[3]);
+ clip.y0 = atoi(argv[4]);
+ clip.x1 = atoi(argv[5]);
+ clip.y1 = atoi(argv[6]);
+ }
- LOG("Issue redraw");
- fprintf(stdout, "WINDOW REDRAW WIN %d START\n", atoi(argv[2]));
- browser_window_redraw(gw->bw, gw->scrollx, gw->scrolly, &clip, &ctx);
- fprintf(stdout, "WINDOW REDRAW WIN %d STOP\n", atoi(argv[2]));
+ LOG("Issue redraw");
+ fprintf(stdout, "WINDOW REDRAW WIN %d START\n", atoi(argv[2]));
+ browser_window_redraw(gw->bw, gw->scrollx, gw->scrolly, &clip, &ctx);
+ fprintf(stdout, "WINDOW REDRAW WIN %d STOP\n", atoi(argv[2]));
}
static void
monkey_window_handle_reload(int argc, char **argv)
{
- struct gui_window *gw;
- if (argc != 3 && argc != 4) {
- fprintf(stdout, "ERROR WINDOW RELOAD ARGS BAD\n");
- }
+ struct gui_window *gw;
+ if (argc != 3 && argc != 4) {
+ fprintf(stdout, "ERROR WINDOW RELOAD ARGS BAD\n");
+ }
- gw = monkey_find_window_by_num(atoi(argv[2]));
+ gw = monkey_find_window_by_num(atoi(argv[2]));
- if (gw == NULL) {
- fprintf(stdout, "ERROR WINDOW NUM BAD\n");
- } else {
- browser_window_reload(gw->bw, argc == 4);
- }
+ if (gw == NULL) {
+ fprintf(stdout, "ERROR WINDOW NUM BAD\n");
+ } else {
+ browser_window_reload(gw->bw, argc == 4);
+ }
}
void
monkey_window_handle_command(int argc, char **argv)
{
- if (argc == 1)
- return;
+ if (argc == 1)
+ return;
- if (strcmp(argv[1], "NEW") == 0) {
- monkey_window_handle_new(argc, argv);
- } else if (strcmp(argv[1], "DESTROY") == 0) {
- monkey_window_handle_destroy(argc, argv);
- } else if (strcmp(argv[1], "GO") == 0) {
- monkey_window_handle_go(argc, argv);
- } else if (strcmp(argv[1], "REDRAW") == 0) {
- monkey_window_handle_redraw(argc, argv);
- } else if (strcmp(argv[1], "RELOAD") == 0) {
- monkey_window_handle_reload(argc, argv);
- } else {
- fprintf(stdout, "ERROR WINDOW COMMAND UNKNOWN %s\n", argv[1]);
- }
+ if (strcmp(argv[1], "NEW") == 0) {
+ monkey_window_handle_new(argc, argv);
+ } else if (strcmp(argv[1], "DESTROY") == 0) {
+ monkey_window_handle_destroy(argc, argv);
+ } else if (strcmp(argv[1], "GO") == 0) {
+ monkey_window_handle_go(argc, argv);
+ } else if (strcmp(argv[1], "REDRAW") == 0) {
+ monkey_window_handle_redraw(argc, argv);
+ } else if (strcmp(argv[1], "RELOAD") == 0) {
+ monkey_window_handle_reload(argc, argv);
+ } else {
+ fprintf(stdout, "ERROR WINDOW COMMAND UNKNOWN %s\n", argv[1]);
+ }
}
diff --git a/frontends/monkey/browser.h b/frontends/monkey/browser.h
index 2b03402..8cbbb94 100644
--- a/frontends/monkey/browser.h
+++ b/frontends/monkey/browser.h
@@ -25,16 +25,16 @@ extern struct gui_window_table *monkey_window_table;
extern struct gui_download_table *monkey_download_table;
struct gui_window {
- struct gui_window *r_next;
- struct gui_window *r_prev;
+ struct gui_window *r_next;
+ struct gui_window *r_prev;
- uint32_t win_num;
- struct browser_window *bw;
+ uint32_t win_num;
+ struct browser_window *bw;
- int width, height;
- int scrollx, scrolly;
+ int width, height;
+ int scrollx, scrolly;
- char *host; /* Ignore this, it's in case RING*() gets debugging for fetchers */
+ char *host; /* Ignore this, it's in case RING*() gets debugging for fetchers */
};
diff --git a/frontends/monkey/cert.c b/frontends/monkey/cert.c
index 710e710..a199755 100644
--- a/frontends/monkey/cert.c
+++ b/frontends/monkey/cert.c
@@ -25,11 +25,11 @@
#include "monkey/cert.h"
typedef struct monkey_cert {
- struct monkey_cert *r_next, *r_prev;
- uint32_t num;
- char *host; /* Ignore */
- nserror (*cb)(bool,void*);
- void *pw;
+ struct monkey_cert *r_next, *r_prev;
+ uint32_t num;
+ char *host; /* Ignore */
+ nserror (*cb)(bool,void*);
+ void *pw;
} monkey_cert_t;
static monkey_cert_t *cert_ring = NULL;
@@ -40,20 +40,20 @@ gui_cert_verify(nsurl *url, const struct ssl_cert_info *certs,
unsigned long num, nserror (*cb)(bool proceed, void *pw),
void *cbpw)
{
- monkey_cert_t *m4t = calloc(sizeof(*m4t), 1);
- if (m4t == NULL) {
- return NSERROR_NOMEM;
- }
- m4t->cb = cb;
- m4t->pw = cbpw;
- m4t->num = cert_ctr++;
+ monkey_cert_t *m4t = calloc(sizeof(*m4t), 1);
+ if (m4t == NULL) {
+ return NSERROR_NOMEM;
+ }
+ m4t->cb = cb;
+ m4t->pw = cbpw;
+ m4t->num = cert_ctr++;
- RING_INSERT(cert_ring, m4t);
+ RING_INSERT(cert_ring, m4t);
- fprintf(stdout, "SSLCERT VERIFY CERT %u URL %s\n",
- m4t->num, nsurl_access(url));
+ fprintf(stdout, "SSLCERT VERIFY CERT %u URL %s\n",
+ m4t->num, nsurl_access(url));
- return NSERROR_OK;
+ return NSERROR_OK;
}
diff --git a/frontends/monkey/dispatch.c b/frontends/monkey/dispatch.c
index 563534d..b531f05 100644
--- a/frontends/monkey/dispatch.c
+++ b/frontends/monkey/dispatch.c
@@ -28,9 +28,9 @@
#include "monkey/dispatch.h"
typedef struct cmdhandler {
- struct cmdhandler *r_next, *r_prev;
- const char *cmd;
- handle_command_fn fn;
+ struct cmdhandler *r_next, *r_prev;
+ const char *cmd;
+ handle_command_fn fn;
} monkey_cmdhandler_t;
static monkey_cmdhandler_t *handler_ring = NULL;
@@ -38,68 +38,68 @@ static monkey_cmdhandler_t *handler_ring = NULL;
nserror
monkey_register_handler(const char *cmd, handle_command_fn fn)
{
- monkey_cmdhandler_t *ret = calloc(sizeof(*ret), 1);
- if (ret == NULL) {
- LOG("Unable to allocate handler");
- return NSERROR_NOMEM;
- }
- ret->cmd = strdup(cmd);
- ret->fn = fn;
- RING_INSERT(handler_ring, ret);
- return NSERROR_OK;
+ monkey_cmdhandler_t *ret = calloc(sizeof(*ret), 1);
+ if (ret == NULL) {
+ LOG("Unable to allocate handler");
+ return NSERROR_NOMEM;
+ }
+ ret->cmd = strdup(cmd);
+ ret->fn = fn;
+ RING_INSERT(handler_ring, ret);
+ return NSERROR_OK;
}
void
monkey_process_command(void)
{
- char buffer[PATH_MAX];
- int argc = 0;
- char **argv = NULL;
- char *p, *r = NULL;
- handle_command_fn fn = NULL;
- char **nargv;
+ char buffer[PATH_MAX];
+ int argc = 0;
+ char **argv = NULL;
+ char *p, *r = NULL;
+ handle_command_fn fn = NULL;
+ char **nargv;
- if (fgets(buffer, PATH_MAX, stdin) == NULL) {
- /* end of input or read error so issue QUIT */
- sprintf(buffer, "QUIT\n");
- }
+ if (fgets(buffer, PATH_MAX, stdin) == NULL) {
+ /* end of input or read error so issue QUIT */
+ sprintf(buffer, "QUIT\n");
+ }
- /* remove newline */
- buffer[strlen(buffer) - 1] = '\0';
+ /* remove newline */
+ buffer[strlen(buffer) - 1] = '\0';
- argv = malloc(sizeof *argv);
- if (argv == NULL) {
- return;
- }
- argc = 1;
- *argv = buffer;
+ argv = malloc(sizeof *argv);
+ if (argv == NULL) {
+ return;
+ }
+ argc = 1;
+ *argv = buffer;
- for (p = r = buffer; *p != '\0'; p++) {
- if (*p == ' ') {
- nargv = realloc(argv, sizeof(*argv) * (argc + 1));
- if (nargv == NULL) {
- /* reallocation of argument vector failed, try using what is
- * already processed.
- */
- break;
- } else {
- argv = nargv;
- }
- argv[argc++] = r = p + 1;
- *p = '\0';
- }
- }
+ for (p = r = buffer; *p != '\0'; p++) {
+ if (*p == ' ') {
+ nargv = realloc(argv, sizeof(*argv) * (argc + 1));
+ if (nargv == NULL) {
+ /* reallocation of argument vector failed, try using what is
+ * already processed.
+ */
+ break;
+ } else {
+ argv = nargv;
+ }
+ argv[argc++] = r = p + 1;
+ *p = '\0';
+ }
+ }
- RING_ITERATE_START(monkey_cmdhandler_t, handler_ring, handler) {
- if (strcmp(argv[0], handler->cmd) == 0) {
- fn = handler->fn;
- RING_ITERATE_STOP(handler_ring, handler);
- }
- } RING_ITERATE_END(handler_ring, handler);
+ RING_ITERATE_START(monkey_cmdhandler_t, handler_ring, handler) {
+ if (strcmp(argv[0], handler->cmd) == 0) {
+ fn = handler->fn;
+ RING_ITERATE_STOP(handler_ring, handler);
+ }
+ } RING_ITERATE_END(handler_ring, handler);
- if (fn != NULL) {
- fn(argc, argv);
- }
+ if (fn != NULL) {
+ fn(argc, argv);
+ }
- free(argv);
+ free(argv);
}
diff --git a/frontends/monkey/download.c b/frontends/monkey/download.c
index f2e1cbf..5c9ce1b 100644
--- a/frontends/monkey/download.c
+++ b/frontends/monkey/download.c
@@ -30,11 +30,11 @@
static uint32_t dwin_ctr = 0;
struct gui_download_window {
- struct gui_download_window *r_next;
- struct gui_download_window *r_prev;
- struct gui_window *g;
- uint32_t dwin_num;
- char *host; /* ignore */
+ struct gui_download_window *r_next;
+ struct gui_download_window *r_prev;
+ struct gui_window *g;
+ uint32_t dwin_num;
+ char *host; /* ignore */
};
static struct gui_download_window *dw_ring = NULL;
@@ -43,44 +43,44 @@ static struct gui_download_window *
gui_download_window_create(download_context *ctx,
struct gui_window *parent)
{
- struct gui_download_window *ret = calloc(sizeof(*ret), 1);
- if (ret == NULL)
- return NULL;
- ret->g = parent;
- ret->dwin_num = dwin_ctr++;
+ struct gui_download_window *ret = calloc(sizeof(*ret), 1);
+ if (ret == NULL)
+ return NULL;
+ ret->g = parent;
+ ret->dwin_num = dwin_ctr++;
- RING_INSERT(dw_ring, ret);
+ RING_INSERT(dw_ring, ret);
- fprintf(stdout, "DOWNLOAD_WINDOW CREATE DWIN %u WIN %u\n",
- ret->dwin_num, parent->win_num);
+ fprintf(stdout, "DOWNLOAD_WINDOW CREATE DWIN %u WIN %u\n",
+ ret->dwin_num, parent->win_num);
- return ret;
+ return ret;
}
static nserror
gui_download_window_data(struct gui_download_window *dw,
const char *data, unsigned int size)
{
- fprintf(stdout, "DOWNLOAD_WINDOW DATA DWIN %u SIZE %u DATA %s\n",
- dw->dwin_num, size, data);
- return NSERROR_OK;
+ fprintf(stdout, "DOWNLOAD_WINDOW DATA DWIN %u SIZE %u DATA %s\n",
+ dw->dwin_num, size, data);
+ return NSERROR_OK;
}
static void
gui_download_window_error(struct gui_download_window *dw,
const char *error_msg)
{
- fprintf(stdout, "DOWNLOAD_WINDOW ERROR DWIN %u ERROR %s\n",
- dw->dwin_num, error_msg);
+ fprintf(stdout, "DOWNLOAD_WINDOW ERROR DWIN %u ERROR %s\n",
+ dw->dwin_num, error_msg);
}
static void
gui_download_window_done(struct gui_download_window *dw)
{
- fprintf(stdout, "DOWNLOAD_WINDOW DONE DWIN %u\n",
- dw->dwin_num);
- RING_REMOVE(dw_ring, dw);
- free(dw);
+ fprintf(stdout, "DOWNLOAD_WINDOW DONE DWIN %u\n",
+ dw->dwin_num);
+ RING_REMOVE(dw_ring, dw);
+ free(dw);
}
static struct gui_download_table download_table = {
diff --git a/frontends/monkey/farmer.py b/frontends/monkey/farmer.py
new file mode 100644
index 0000000..d4b4b1e
--- /dev/null
+++ b/frontends/monkey/farmer.py
@@ -0,0 +1,363 @@
+#!/usr/bin/python
+
+# Copyright 2017 Daniel Silverstone <dsilvers(a)digital-scurf.org>
+#
+# 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/>.
+
+"""
+Monkey Farmer
+
+The monkey farmer is a wrapper around `nsmonkey` which can be used to simplify
+access to the monkey behaviours and ultimately to write useful tests in an
+expressive but not overcomplicated DSLish way. Tests are, ultimately, still
+Python code.
+
+"""
+
+import asyncore
+import os
+import socket
+import subprocess
+import time
+
+#monkey_cmd = ['./nsmonkey', '--accept_language=fr']
+monkey_cmd = ['./nsmonkey']
+
+class MonkeyFarmer(asyncore.dispatcher):
+ def __init__(self, online, quiet=False):
+ (mine, monkeys) = socket.socketpair()
+
+ asyncore.dispatcher.__init__(self, sock=mine)
+
+ self.monkey = subprocess.Popen(
+ monkey_cmd,
+ stdin=monkeys,
+ stdout=monkeys,
+ close_fds=[mine])
+
+ monkeys.close()
+
+ self.buffer = ""
+ self.incoming = ""
+ self.lines = []
+ self.scheduled = []
+ self.deadmonkey = False
+ self.online = online
+ self.quiet = quiet
+
+ def handle_connect(self):
+ pass
+
+ def handle_read(self):
+ got = self.recv(8192)
+ if got == "" or got is None:
+ self.deadmonkey = True
+ return
+ self.incoming += got
+ if "\n" in self.incoming:
+ lines = self.incoming.split("\n")
+ self.incoming = lines.pop()
+ self.lines = lines
+
+ def writable(self):
+ return (len(self.buffer) > 0)
+
+ def handle_write(self):
+ sent = self.send(self.buffer)
+ self.buffer = self.buffer[sent:]
+
+ def tell_monkey(self, *args):
+ cmd = (" ".join(args))
+ if not self.quiet:
+ print ">>> %s" % cmd
+ self.buffer += "%s\n" % cmd
+
+ def monkey_says(self, line):
+ if not self.quiet:
+ print "<<< %s" % line
+ self.online(line)
+
+ def schedule_event(self, event, secs=None, when=None):
+ assert(secs is not None or when is not None)
+ if when is None:
+ when = time.time() + secs
+ self.scheduled.append((when, event))
+ self.scheduled.sort(lambda a,b: cmp(a[0],b[0]))
+
+ def unschedule_event(self, event):
+ self.scheduled = [x for x in self.scheduled if x[1] != event]
+
+ def loop(self, once=False):
+ if len(self.lines) > 0:
+ self.monkey_says(self.lines.pop(0))
+ if once:
+ return
+ while not self.deadmonkey:
+ now = time.time()
+ while len(self.scheduled) > 0 and now >= self.scheduled[0][0]:
+ func = self.scheduled[0][1]
+ self.scheduled.pop(0)
+ func(self)
+ now = time.time()
+ if len(self.scheduled) > 0:
+ next = self.scheduled[0][0]
+ asyncore.loop(timeout=next-now, count=1)
+ else:
+ asyncore.loop(count=1)
+ if len(self.lines) > 0:
+ self.monkey_says(self.lines.pop(0))
+ if once:
+ break
+
+class Browser:
+ def __init__(self, quiet=False):
+ self.farmer = MonkeyFarmer(online=self.on_monkey_line, quiet=quiet)
+ self.windows = {}
+ self.current_draw_target = None
+
+ def pass_options(self, *opts):
+ if len(opts) > 0:
+ self.farmer.tell_monkey("OPTIONS " + (" ".join(opts)))
+
+ def on_monkey_line(self, line):
+ parts = line.split(" ")
+ handler = getattr(self, "handle_" + parts[0], None)
+ if handler is not None:
+ handler(*parts[1:])
+
+ def quit(self):
+ self.farmer.tell_monkey("QUIT")
+
+ def quit_and_wait(self):
+ self.quit()
+ self.farmer.loop()
+
+ def handle_GENERIC(self, what, *args):
+ pass
+
+ def handle_WINDOW(self, action, _win, winid, *args):
+ if action == "NEW":
+ new_win = BrowserWindow(self, winid, *args)
+ self.windows[winid] = new_win
+ else:
+ win = self.windows.get(winid, None)
+ if win is None:
+ print " Unknown window id %s" % winid
+ else:
+ win.handle(action, *args)
+
+ def handle_PLOT(self, *args):
+ if self.current_draw_target is not None:
+ self.current_draw_target.handle_plot(*args)
+
+ def new_window(self, url=None):
+ if url is None:
+ self.farmer.tell_monkey("WINDOW NEW")
+ else:
+ self.farmer.tell_monkey("WINDOW NEW %s" % url)
+ wins_known = set(self.windows.keys())
+ while len(set(self.windows.keys()).difference(wins_known)) == 0:
+ self.farmer.loop(once=True)
+ poss_wins = set(self.windows.keys()).difference(wins_known)
+ return self.windows[poss_wins.pop()]
+
+
+class BrowserWindow:
+ def __init__(self, browser, winid, _for, coreid, _existing, otherid, _newtab, newtab, _clone, clone):
+ self.alive = True
+ self.browser = browser
+ self.winid = winid
+ self.coreid = coreid
+ self.existing = browser.windows.get(otherid, None)
+ self.newtab = newtab == "TRUE"
+ self.clone = clone == "TRUE"
+ self.width = 0
+ self.height = 0
+ self.title = ""
+ self.throbbing = False
+ self.scrollx = 0
+ self.scrolly = 0
+ self.content_width = 0
+ self.content_height = 0
+ self.status = ""
+ self.pointer = ""
+ self.scale = 1.0
+ self.url = ""
+ self.plotted = []
+ self.plotting = False
+
+ def kill(self):
+ self.browser.farmer.tell_monkey("WINDOW DESTROY %s" % self.winid)
+
+ def go(self, url, referer = None):
+ if referer is None:
+ self.browser.farmer.tell_monkey("WINDOW GO %s %s" % (
+ self.winid, url))
+ else:
+ self.browser.farmer.tell_monkey("WINDOW GO %s %s %s" % (
+ self.winid, url, referer))
+
+ def reload(self):
+ self.browser.farmer.tell_monkey("WINDOW RELOAD %s" % self.winid)
+
+ def redraw(self, coords=None):
+ if coords is None:
+ self.browser.farmer.tell_monkey("WINDOW REDRAW %s" % self.winid)
+ else:
+ self.browser.farmer.tell_monkey("WINDOW REDRAW %s %s" % (
+ self.winid, (" ".join(coords))))
+
+ def handle(self, action, *args):
+ handler = getattr(self, "handle_window_" + action, None)
+ if handler is not None:
+ handler(*args)
+
+ def handle_window_SIZE(self, _width, width, _height, height):
+ self.width = int(width)
+ self.height = int(height)
+
+ def handle_window_DESTROY(self):
+ self.alive = False
+
+ def handle_window_TITLE(self, _str, *title):
+ self.title = " ".join(title)
+
+ def handle_window_REDRAW(self):
+ pass
+
+ def handle_window_GET_DIMENSIONS(self, _width, width, _height, height):
+ self.width = width
+ self.height = height
+
+ def handle_window_NEW_CONTENT(self):
+ pass
+
+ def handle_window_NEW_ICON(self):
+ pass
+
+ def handle_window_START_THROBBER(self):
+ self.throbbing = True
+
+ def handle_window_STOP_THROBBER(self):
+ self.throbbing = False
+
+ def handle_window_SET_SCROLL(self, _x, x, _y, y):
+ self.scrollx = int(x)
+ self.scrolly = int(y)
+
+ def handle_window_UPDATE_BOX(self, _x, x, _y, y, _width, width, _height, height):
+ x = int(x)
+ y = int(y)
+ width = int(width)
+ height = int(height)
+ pass
+
+ def handle_window_UPDATE_EXTENT(self, _width, width, _height, height):
+ self.content_width = int(width)
+ self.content_height = int(height)
+
+ def handle_window_SET_STATUS(self, _str, *status):
+ self.status = (" ".join(status))
+
+ def handle_window_SET_POINTER(self, _ptr, ptr):
+ self.pointer = ptr
+
+ def handle_window_SET_SCALE(self, _scale, scale):
+ self.scale = float(scale)
+
+ def handle_window_SET_URL(self, _url, url):
+ self.url = url
+
+ def handle_window_GET_SCROLL(self, _x, x, _y, y):
+ self.scrollx = int(x)
+ self.scrolly = int(y)
+
+ def handle_window_SCROLL_START(self):
+ self.scrollx = 0
+ self.scrolly = 0
+
+ def handle_window_REDRAW(self, act):
+ if act == "START":
+ self.browser.current_draw_target = self
+ self.plotted = []
+ self.plotting = True
+ else:
+ self.browser.current_draw_target = None
+ self.plotting = False
+
+ def load_page(self, url=None, referer=None):
+ if url is not None:
+ self.go(url, referer)
+ self.wait_loaded()
+
+ def reload(self):
+ self.browser.farmer.tell_monkey("WINDOW RELOAD %s" % self.winid)
+ self.wait_loaded()
+
+ def wait_loaded(self):
+ while not self.throbbing:
+ self.browser.farmer.loop(once=True)
+ while self.throbbing:
+ self.browser.farmer.loop(once=True)
+
+ def handle_plot(self, *args):
+ self.plotted.append(args)
+
+ def redraw(self, coords=None):
+ if coords is None:
+ self.browser.farmer.tell_monkey("WINDOW REDRAW %s" % self.winid)
+ else:
+ self.browser.farmer.tell_monkey("WINDOW REDRAW %s %s" % (
+ self.winid, (" ".join(coords))))
+ while not self.plotting:
+ self.browser.farmer.loop(once=True)
+ while self.plotting:
+ self.browser.farmer.loop(once=True)
+ return self.plotted
+
+
+# Simple test is as follows...
+
+browser = Browser(quiet=True)
+
+win = browser.new_window()
+
+fname = "test/js/inline-doc-write-simple.html"
+full_fname = os.path.join(os.getcwd(), fname)
+
+browser.pass_options("--enable_javascript=0")
+win.load_page("file://" + full_fname)
+
+print("Loaded, URL is %s" % win.url)
+
+cmds = win.redraw()
+print("Received %d plot commands" % len(cmds))
+for cmd in cmds:
+ if cmd[0] == "TEXT":
+ print "%s %s -> %s" % (cmd[2], cmd[4], (" ".join(cmd[6:])))
+
+
+browser.pass_options("--enable_javascript=1")
+win.load_page("file://" + full_fname)
+
+print("Loaded, URL is %s" % win.url)
+
+cmds = win.redraw()
+print("Received %d plot commands" % len(cmds))
+for cmd in cmds:
+ if cmd[0] == "TEXT":
+ print "%s %s -> %s" % (cmd[2], cmd[4], (" ".join(cmd[6:])))
+
+browser.quit_and_wait()
diff --git a/frontends/monkey/fetch.c b/frontends/monkey/fetch.c
index 4985329..256d79b 100644
--- a/frontends/monkey/fetch.c
+++ b/frontends/monkey/fetch.c
@@ -36,18 +36,18 @@ extern char **respaths;
static nsurl *gui_get_resource_url(const char *path)
{
- char buf[PATH_MAX];
- nsurl *url = NULL;
+ char buf[PATH_MAX];
+ nsurl *url = NULL;
- netsurf_path_to_nsurl(filepath_sfind(respaths, buf, path), &url);
+ netsurf_path_to_nsurl(filepath_sfind(respaths, buf, path), &url);
- return url;
+ return url;
}
static struct gui_fetch_table fetch_table = {
- .filetype = monkey_fetch_filetype,
+ .filetype = monkey_fetch_filetype,
- .get_resource_url = gui_get_resource_url,
+ .get_resource_url = gui_get_resource_url,
};
struct gui_fetch_table *monkey_fetch_table = &fetch_table;
diff --git a/frontends/monkey/layout.c b/frontends/monkey/layout.c
index 4bcc51b..7b72231 100644
--- a/frontends/monkey/layout.c
+++ b/frontends/monkey/layout.c
@@ -30,11 +30,11 @@
#include "monkey/layout.h"
static nserror nsfont_width(const plot_font_style_t *fstyle,
- const char *string, size_t length,
- int *width)
+ const char *string, size_t length,
+ int *width)
{
- *width = (fstyle->size * utf8_bounded_length(string, length)) / FONT_SIZE_SCALE;
- return NSERROR_OK;
+ *width = (fstyle->size * utf8_bounded_length(string, length)) / FONT_SIZE_SCALE;
+ return NSERROR_OK;
}
/**
@@ -50,14 +50,14 @@ static nserror nsfont_width(const plot_font_style_t *fstyle,
*/
static nserror nsfont_position_in_string(const plot_font_style_t *fstyle,
- const char *string, size_t length,
- int x, size_t *char_offset, int *actual_x)
+ const char *string, size_t length,
+ int x, size_t *char_offset, int *actual_x)
{
- *char_offset = x / (fstyle->size / FONT_SIZE_SCALE);
- if (*char_offset > length)
- *char_offset = length;
- *actual_x = *char_offset * (fstyle->size / FONT_SIZE_SCALE);
- return NSERROR_OK;
+ *char_offset = x / (fstyle->size / FONT_SIZE_SCALE);
+ if (*char_offset > length)
+ *char_offset = length;
+ *actual_x = *char_offset * (fstyle->size / FONT_SIZE_SCALE);
+ return NSERROR_OK;
}
@@ -85,27 +85,27 @@ static nserror nsfont_position_in_string(const plot_font_style_t *fstyle,
*/
static nserror nsfont_split(const plot_font_style_t *fstyle,
- const char *string, size_t length,
- int x, size_t *char_offset, int *actual_x)
+ const char *string, size_t length,
+ int x, size_t *char_offset, int *actual_x)
{
- int c_off = *char_offset = x / (fstyle->size / FONT_SIZE_SCALE);
- if (*char_offset > length) {
- *char_offset = length;
- } else {
- while (*char_offset > 0) {
- if (string[*char_offset] == ' ')
- break;
- (*char_offset)--;
- }
- if (*char_offset == 0) {
- *char_offset = c_off;
- while (*char_offset < length && string[*char_offset] != ' ') {
- (*char_offset)++;
- }
- }
- }
- *actual_x = *char_offset * (fstyle->size / FONT_SIZE_SCALE);
- return NSERROR_OK;
+ int c_off = *char_offset = x / (fstyle->size / FONT_SIZE_SCALE);
+ if (*char_offset > length) {
+ *char_offset = length;
+ } else {
+ while (*char_offset > 0) {
+ if (string[*char_offset] == ' ')
+ break;
+ (*char_offset)--;
+ }
+ if (*char_offset == 0) {
+ *char_offset = c_off;
+ while (*char_offset < length && string[*char_offset] != ' ') {
+ (*char_offset)++;
+ }
+ }
+ }
+ *actual_x = *char_offset * (fstyle->size / FONT_SIZE_SCALE);
+ return NSERROR_OK;
}
static struct gui_layout_table layout_table = {
diff --git a/frontends/monkey/main.c b/frontends/monkey/main.c
index 0059ff0..1bea024 100644
--- a/frontends/monkey/main.c
+++ b/frontends/monkey/main.c
@@ -66,8 +66,8 @@ static bool monkey_done = false;
*/
static void die(const char * const error)
{
- fprintf(stderr, "DIE %s\n", error);
- exit(EXIT_FAILURE);
+ fprintf(stderr, "DIE %s\n", error);
+ exit(EXIT_FAILURE);
}
/** obtain language from environment
@@ -78,29 +78,29 @@ static void die(const char * const error)
*/
static const char *get_language(void)
{
- const char *lang;
+ const char *lang;
- lang = getenv("LANGUAGE");
- if ((lang != NULL) && (lang[0] != '\0')) {
- return lang;
- }
+ lang = getenv("LANGUAGE");
+ if ((lang != NULL) && (lang[0] != '\0')) {
+ return lang;
+ }
- lang = getenv("LC_ALL");
- if ((lang != NULL) && (lang[0] != '\0')) {
- return lang;
- }
+ lang = getenv("LC_ALL");
+ if ((lang != NULL) && (lang[0] != '\0')) {
+ return lang;
+ }
- lang = getenv("LC_MESSAGES");
- if ((lang != NULL) && (lang[0] != '\0')) {
- return lang;
- }
+ lang = getenv("LC_MESSAGES");
+ if ((lang != NULL) && (lang[0] != '\0')) {
+ return lang;
+ }
- lang = getenv("LANG");
- if ((lang != NULL) && (lang[0] != '\0')) {
- return lang;
- }
+ lang = getenv("LANG");
+ if ((lang != NULL) && (lang[0] != '\0')) {
+ return lang;
+ }
- return NULL;
+ return NULL;
}
@@ -120,92 +120,97 @@ static const char *get_language(void)
*/
static const char * const *get_languagev(void)
{
- static const char *langv[LANGV_SIZE];
- int langidx = 0; /* index of next entry in vector */
- static char langs[LANGS_SIZE];
- char *curp; /* next language parameter in langs string */
- const char *lange; /* language from environment variable */
- int lang_len;
- char *cln; /* colon in lange */
-
- /* return cached vector */
- if (langv[0] != NULL) {
- return &langv[0];
- }
-
- curp = &langs[0];
-
- lange = get_language();
-
- if (lange != NULL) {
- lang_len = strlen(lange) + 1;
- if (lang_len < (LANGS_SIZE - 2)) {
- memcpy(curp, lange, lang_len);
- while ((curp[0] != 0) &&
- (langidx < (LANGV_SIZE - 2))) {
- /* avoid using strchrnul as it is not portable */
- cln = strchr(curp, ':');
- if (cln == NULL) {
- langv[langidx++] = curp;
- curp += lang_len;
- break;
- } else {
- if ((cln - curp) > 1) {
- /* only place non empty entries in vector */
- langv[langidx++] = curp;
- }
- *cln++ = 0; /* null terminate */
- lang_len -= (cln - curp);
- curp = cln;
+ static const char *langv[LANGV_SIZE];
+ int langidx = 0; /* index of next entry in vector */
+ static char langs[LANGS_SIZE];
+ char *curp; /* next language parameter in langs string */
+ const char *lange; /* language from environment variable */
+ int lang_len;
+ char *cln; /* colon in lange */
+
+ /* return cached vector */
+ if (langv[0] != NULL) {
+ return &langv[0];
}
- }
- }
- }
- /* ensure C language is present */
- langv[langidx++] = curp;
- *curp++ = 'C';
- *curp++ = 0;
- langv[langidx] = NULL;
+ curp = &langs[0];
+
+ lange = get_language();
+
+ if (lange != NULL) {
+ lang_len = strlen(lange) + 1;
+ if (lang_len < (LANGS_SIZE - 2)) {
+ memcpy(curp, lange, lang_len);
+ while ((curp[0] != 0) &&
+ (langidx < (LANGV_SIZE - 2))) {
+ /* avoid using strchrnul as it is not portable */
+ cln = strchr(curp, ':');
+ if (cln == NULL) {
+ langv[langidx++] = curp;
+ curp += lang_len;
+ break;
+ } else {
+ if ((cln - curp) > 1) {
+ /* only place non empty entries in vector */
+ langv[langidx++] = curp;
+ }
+ *cln++ = 0; /* null terminate */
+ lang_len -= (cln - curp);
+ curp = cln;
+ }
+ }
+ }
+ }
- return &langv[0];
+ /* ensure C language is present */
+ langv[langidx++] = curp;
+ *curp++ = 'C';
+ *curp++ = 0;
+ langv[langidx] = NULL;
+
+ return &langv[0];
}
/* Stolen from gtk/gui.c */
static char **
nsmonkey_init_resource(const char *resource_path)
{
- const char * const *langv;
- char **pathv; /* resource path string vector */
- char **respath; /* resource paths vector */
+ const char * const *langv;
+ char **pathv; /* resource path string vector */
+ char **respath; /* resource paths vector */
- pathv = filepath_path_to_strvec(resource_path);
+ pathv = filepath_path_to_strvec(resource_path);
- langv = get_languagev();
+ langv = get_languagev();
- respath = filepath_generate(pathv, langv);
+ respath = filepath_generate(pathv, langv);
- filepath_free_strvec(pathv);
+ filepath_free_strvec(pathv);
- return respath;
+ return respath;
}
static void monkey_quit(void)
{
- urldb_save_cookies(nsoption_charp(cookie_jar));
- urldb_save(nsoption_charp(url_file));
- monkey_fetch_filetype_fin();
+ urldb_save_cookies(nsoption_charp(cookie_jar));
+ urldb_save(nsoption_charp(url_file));
+ monkey_fetch_filetype_fin();
}
static nserror gui_launch_url(struct nsurl *url)
{
- fprintf(stdout, "GENERIC LAUNCH URL %s\n", nsurl_access(url));
- return NSERROR_OK;
+ fprintf(stdout, "GENERIC LAUNCH URL %s\n", nsurl_access(url));
+ return NSERROR_OK;
}
static void quit_handler(int argc, char **argv)
{
- monkey_done = true;
+ monkey_done = true;
+}
+
+static void monkey_options_handle_command(int argc, char **argv)
+{
+ nsoption_commandline(&argc, argv, nsoptions);
}
/**
@@ -216,12 +221,12 @@ static void quit_handler(int argc, char **argv)
*/
static nserror set_defaults(struct nsoption_s *defaults)
{
- /* Set defaults for absent option strings */
- nsoption_setnull_charp(cookie_file, strdup("~/.netsurf/Cookies"));
- nsoption_setnull_charp(cookie_jar, strdup("~/.netsurf/Cookies"));
- nsoption_setnull_charp(url_file, strdup("~/.netsurf/URLs"));
+ /* Set defaults for absent option strings */
+ nsoption_setnull_charp(cookie_file, strdup("~/.netsurf/Cookies"));
+ nsoption_setnull_charp(cookie_jar, strdup("~/.netsurf/Cookies"));
+ nsoption_setnull_charp(url_file, strdup("~/.netsurf/URLs"));
- return NSERROR_OK;
+ return NSERROR_OK;
}
@@ -230,170 +235,174 @@ static nserror set_defaults(struct nsoption_s *defaults)
*/
static bool nslog_stream_configure(FILE *fptr)
{
- /* set log stream to be non-buffering */
- setbuf(fptr, NULL);
+ /* set log stream to be non-buffering */
+ setbuf(fptr, NULL);
- return true;
+ return true;
}
static struct gui_misc_table monkey_misc_table = {
- .schedule = monkey_schedule,
- .warning = monkey_warn_user,
+ .schedule = monkey_schedule,
+ .warning = monkey_warn_user,
- .quit = monkey_quit,
- .launch_url = gui_launch_url,
- .cert_verify = gui_cert_verify,
- .login = gui_401login_open,
+ .quit = monkey_quit,
+ .launch_url = gui_launch_url,
+ .cert_verify = gui_cert_verify,
+ .login = gui_401login_open,
};
static void monkey_run(void)
{
- fd_set read_fd_set, write_fd_set, exc_fd_set;
- int max_fd;
- int rdy_fd;
- int schedtm;
- struct timeval tv;
- struct timeval* timeout;
-
- while (!monkey_done) {
-
- /* clears fdset */
- fetch_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
-
- /* add stdin to the set */
- if (max_fd < 0) {
- max_fd = 0;
- }
- FD_SET(0, &read_fd_set);
- FD_SET(0, &exc_fd_set);
-
- /* discover the next scheduled event time */
- schedtm = monkey_schedule_run();
-
- /* setup timeout */
- switch (schedtm) {
- case -1:
- LOG("Iterate blocking");
- fprintf(stdout, "GENERIC POLL BLOCKING\n");
- timeout = NULL;
- break;
-
- case 0:
- LOG("Iterate immediate");
- tv.tv_sec = 0;
- tv.tv_usec = 0;
- timeout = &tv;
- break;
-
- default:
- LOG("Iterate non-blocking");
- fprintf(stdout, "GENERIC POLL TIMED\n");
- tv.tv_sec = schedtm / 1000; /* miliseconds to seconds */
- tv.tv_usec = (schedtm % 1000) * 1000; /* remainder to microseconds */
- timeout = &tv;
- break;
- }
-
- rdy_fd = select(max_fd + 1,
- &read_fd_set,
- &write_fd_set,
- &exc_fd_set,
- timeout);
- if (rdy_fd < 0) {
- monkey_done = true;
- } else if (rdy_fd > 0) {
- if (FD_ISSET(0, &read_fd_set)) {
- monkey_process_command();
- }
- }
- }
-
+ fd_set read_fd_set, write_fd_set, exc_fd_set;
+ int max_fd;
+ int rdy_fd;
+ int schedtm;
+ struct timeval tv;
+ struct timeval* timeout;
+
+ while (!monkey_done) {
+
+ /* clears fdset */
+ fetch_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
+
+ /* add stdin to the set */
+ if (max_fd < 0) {
+ max_fd = 0;
+ }
+ FD_SET(0, &read_fd_set);
+ FD_SET(0, &exc_fd_set);
+
+ /* discover the next scheduled event time */
+ schedtm = monkey_schedule_run();
+
+ /* setup timeout */
+ switch (schedtm) {
+ case -1:
+ LOG("Iterate blocking");
+ fprintf(stdout, "GENERIC POLL BLOCKING\n");
+ timeout = NULL;
+ break;
+
+ case 0:
+ LOG("Iterate immediate");
+ tv.tv_sec = 0;
+ tv.tv_usec = 0;
+ timeout = &tv;
+ break;
+
+ default:
+ LOG("Iterate non-blocking");
+ fprintf(stdout, "GENERIC POLL TIMED %d\n", schedtm);
+ tv.tv_sec = schedtm / 1000; /* miliseconds to seconds */
+ tv.tv_usec = (schedtm % 1000) * 1000; /* remainder to microseconds */
+ timeout = &tv;
+ break;
+ }
+
+ rdy_fd = select(max_fd + 1,
+ &read_fd_set,
+ &write_fd_set,
+ &exc_fd_set,
+ timeout);
+ if (rdy_fd < 0) {
+ monkey_done = true;
+ } else if (rdy_fd > 0) {
+ if (FD_ISSET(0, &read_fd_set)) {
+ monkey_process_command();
+ }
+ }
+ }
}
int
main(int argc, char **argv)
{
- char *messages;
- char *options;
- char buf[PATH_MAX];
- nserror ret;
- struct netsurf_table monkey_table = {
- .misc = &monkey_misc_table,
- .window = monkey_window_table,
- .download = monkey_download_table,
- .fetch = monkey_fetch_table,
- .bitmap = monkey_bitmap_table,
- .layout = monkey_layout_table,
- };
-
- ret = netsurf_register(&monkey_table);
- if (ret != NSERROR_OK) {
- die("NetSurf operation table failed registration");
- }
-
- /* Unbuffer stdin/out/err */
- setbuf(stdin, NULL);
- setbuf(stdout, NULL);
- setbuf(stderr, NULL);
-
- /* Prep the search paths */
- respaths = nsmonkey_init_resource("${HOME}/.netsurf/:${NETSURFRES}:"MONKEY_RESPATH":./monkey/res");
-
- /* initialise logging. Not fatal if it fails but not much we can do
- * about it either.
- */
- nslog_init(nslog_stream_configure, &argc, argv);
-
- /* user options setup */
- ret = nsoption_init(set_defaults, &nsoptions, &nsoptions_default);
- if (ret != NSERROR_OK) {
- die("Options failed to initialise");
- }
- options = filepath_find(respaths, "Choices");
- nsoption_read(options, nsoptions);
- free(options);
- nsoption_commandline(&argc, argv, nsoptions);
-
- messages = filepath_find(respaths, "Messages");
- ret = messages_add_from_file(messages);
- if (ret != NSERROR_OK) {
- LOG("Messages failed to load");
- }
-
- /* common initialisation */
- ret = netsurf_init(NULL);
- free(messages);
- if (ret != NSERROR_OK) {
- die("NetSurf failed to initialise");
- }
-
- filepath_sfinddef(respaths, buf, "mime.types", "/etc/");
- monkey_fetch_filetype_init(buf);
-
- urldb_load(nsoption_charp(url_file));
- urldb_load_cookies(nsoption_charp(cookie_file));
-
- ret = monkey_register_handler("QUIT", quit_handler);
- if (ret != NSERROR_OK) {
- die("quit handler failed to register");
- }
-
- ret = monkey_register_handler("WINDOW", monkey_window_handle_command);
- if (ret != NSERROR_OK) {
- die("window handler fialed to register");
- }
-
- fprintf(stdout, "GENERIC STARTED\n");
- monkey_run();
-
- fprintf(stdout, "GENERIC CLOSING_DOWN\n");
- monkey_kill_browser_windows();
-
- netsurf_exit();
- fprintf(stdout, "GENERIC FINISHED\n");
-
- /* finalise options */
- nsoption_finalise(nsoptions, nsoptions_default);
-
- return 0;
+ char *messages;
+ char *options;
+ char buf[PATH_MAX];
+ nserror ret;
+ struct netsurf_table monkey_table = {
+ .misc = &monkey_misc_table,
+ .window = monkey_window_table,
+ .download = monkey_download_table,
+ .fetch = monkey_fetch_table,
+ .bitmap = monkey_bitmap_table,
+ .layout = monkey_layout_table,
+ };
+
+ ret = netsurf_register(&monkey_table);
+ if (ret != NSERROR_OK) {
+ die("NetSurf operation table failed registration");
+ }
+
+ /* Unbuffer stdin/out/err */
+ setbuf(stdin, NULL);
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+
+ /* Prep the search paths */
+ respaths = nsmonkey_init_resource("${HOME}/.netsurf/:${NETSURFRES}:"MONKEY_RESPATH":./frontends/monkey/res");
+
+ /* initialise logging. Not fatal if it fails but not much we can do
+ * about it either.
+ */
+ nslog_init(nslog_stream_configure, &argc, argv);
+
+ /* user options setup */
+ ret = nsoption_init(set_defaults, &nsoptions, &nsoptions_default);
+ if (ret != NSERROR_OK) {
+ die("Options failed to initialise");
+ }
+ options = filepath_find(respaths, "Choices");
+ nsoption_read(options, nsoptions);
+ free(options);
+ nsoption_commandline(&argc, argv, nsoptions);
+
+ messages = filepath_find(respaths, "Messages");
+ ret = messages_add_from_file(messages);
+ if (ret != NSERROR_OK) {
+ LOG("Messages failed to load");
+ }
+
+ /* common initialisation */
+ ret = netsurf_init(NULL);
+ free(messages);
+ if (ret != NSERROR_OK) {
+ die("NetSurf failed to initialise");
+ }
+
+ filepath_sfinddef(respaths, buf, "mime.types", "/etc/");
+ monkey_fetch_filetype_init(buf);
+
+ urldb_load(nsoption_charp(url_file));
+ urldb_load_cookies(nsoption_charp(cookie_file));
+
+ ret = monkey_register_handler("QUIT", quit_handler);
+ if (ret != NSERROR_OK) {
+ die("quit handler failed to register");
+ }
+
+ ret = monkey_register_handler("WINDOW", monkey_window_handle_command);
+ if (ret != NSERROR_OK) {
+ die("window handler failed to register");
+ }
+
+ ret = monkey_register_handler("OPTIONS", monkey_options_handle_command);
+ if (ret != NSERROR_OK) {
+ die("options handler failed to register");
+ }
+
+ fprintf(stdout, "GENERIC STARTED\n");
+ monkey_run();
+
+ fprintf(stdout, "GENERIC CLOSING_DOWN\n");
+ monkey_kill_browser_windows();
+
+ netsurf_exit();
+ fprintf(stdout, "GENERIC FINISHED\n");
+
+ /* finalise options */
+ nsoption_finalise(nsoptions, nsoptions_default);
+
+ return 0;
}
diff --git a/frontends/monkey/plot.c b/frontends/monkey/plot.c
index 7ed2205..d00dca7 100644
--- a/frontends/monkey/plot.c
+++ b/frontends/monkey/plot.c
@@ -58,8 +58,8 @@ monkey_plot_clip(const struct redraw_context *ctx, const struct rect *clip)
*/
static nserror
monkey_plot_arc(const struct redraw_context *ctx,
- const plot_style_t *style,
- int x, int y, int radius, int angle1, int angle2)
+ const plot_style_t *style,
+ int x, int y, int radius, int angle1, int angle2)
{
fprintf(stdout,
"PLOT ARC X %d Y %d RADIUS %d ANGLE1 %d ANGLE2 %d\n",
@@ -82,8 +82,8 @@ monkey_plot_arc(const struct redraw_context *ctx,
*/
static nserror
monkey_plot_disc(const struct redraw_context *ctx,
- const plot_style_t *style,
- int x, int y, int radius)
+ const plot_style_t *style,
+ int x, int y, int radius)
{
fprintf(stdout,
"PLOT DISC X %d Y %d RADIUS %d\n",
@@ -105,8 +105,8 @@ monkey_plot_disc(const struct redraw_context *ctx,
*/
static nserror
monkey_plot_line(const struct redraw_context *ctx,
- const plot_style_t *style,
- const struct rect *line)
+ const plot_style_t *style,
+ const struct rect *line)
{
fprintf(stdout,
"PLOT LINE X0 %d Y0 %d X1 %d Y1 %d\n",
@@ -130,8 +130,8 @@ monkey_plot_line(const struct redraw_context *ctx,
*/
static nserror
monkey_plot_rectangle(const struct redraw_context *ctx,
- const plot_style_t *style,
- const struct rect *rect)
+ const plot_style_t *style,
+ const struct rect *rect)
{
fprintf(stdout,
"PLOT RECT X0 %d Y0 %d X1 %d Y1 %d\n",
@@ -156,9 +156,9 @@ monkey_plot_rectangle(const struct redraw_context *ctx,
*/
static nserror
monkey_plot_polygon(const struct redraw_context *ctx,
- const plot_style_t *style,
- const int *p,
- unsigned int n)
+ const plot_style_t *style,
+ const int *p,
+ unsigned int n)
{
fprintf(stdout,
"PLOT POLYGON VERTICIES %d\n",
@@ -183,11 +183,11 @@ monkey_plot_polygon(const struct redraw_context *ctx,
*/
static nserror
monkey_plot_path(const struct redraw_context *ctx,
- const plot_style_t *pstyle,
- const float *p,
- unsigned int n,
- float width,
- const float transform[6])
+ const plot_style_t *pstyle,
+ const float *p,
+ unsigned int n,
+ float width,
+ const float transform[6])
{
fprintf(stdout,
"PLOT PATH VERTICIES %d WIDTH %f\n",
@@ -222,12 +222,12 @@ monkey_plot_path(const struct redraw_context *ctx,
*/
static nserror
monkey_plot_bitmap(const struct redraw_context *ctx,
- struct bitmap *bitmap,
- int x, int y,
- int width,
- int height,
- colour bg,
- bitmap_flags_t flags)
+ struct bitmap *bitmap,
+ int x, int y,
+ int width,
+ int height,
+ colour bg,
+ bitmap_flags_t flags)
{
fprintf(stdout,
"PLOT BITMAP X %d Y %d WIDTH %d HEIGHT %d\n",
@@ -249,11 +249,11 @@ monkey_plot_bitmap(const struct redraw_context *ctx,
*/
static nserror
monkey_plot_text(const struct redraw_context *ctx,
- const struct plot_font_style *fstyle,
- int x,
- int y,
- const char *text,
- size_t length)
+ const struct plot_font_style *fstyle,
+ int x,
+ int y,
+ const char *text,
+ size_t length)
{
fprintf(stdout,
"PLOT TEXT X %d Y %d STR %*s\n",
diff --git a/frontends/monkey/schedule.c b/frontends/monkey/schedule.c
index 8c638c0..af1144a 100644
--- a/frontends/monkey/schedule.c
+++ b/frontends/monkey/schedule.c
@@ -38,10 +38,10 @@ static struct nscallback *schedule_list = NULL;
*/
struct nscallback
{
- struct nscallback *next;
- struct timeval tv;
- void (*callback)(void *p);
- void *p;
+ struct nscallback *next;
+ struct timeval tv;
+ void (*callback)(void *p);
+ void *p;
};
/**
@@ -54,170 +54,163 @@ struct nscallback
*/
static nserror schedule_remove(void (*callback)(void *p), void *p)
{
- struct nscallback *cur_nscb;
- struct nscallback *prev_nscb;
- struct nscallback *unlnk_nscb;
-
- /* check there is something on the list to remove */
- if (schedule_list == NULL) {
- return NSERROR_OK;
- }
-
- SRLOG("removing %p, %p", callback, p);
-
- cur_nscb = schedule_list;
- prev_nscb = NULL;
-
- while (cur_nscb != NULL) {
- if ((cur_nscb->callback == callback) &&
- (cur_nscb->p == p)) {
- /* item to remove */
-
- SRLOG("callback entry %p removing %p(%p)",
- cur_nscb, cur_nscb->callback, cur_nscb->p);
-
- /* remove callback */
- unlnk_nscb = cur_nscb;
- cur_nscb = unlnk_nscb->next;
-
- if (prev_nscb == NULL) {
- schedule_list = cur_nscb;
- } else {
- prev_nscb->next = cur_nscb;
- }
- free (unlnk_nscb);
- } else {
- /* move to next element */
- prev_nscb = cur_nscb;
- cur_nscb = prev_nscb->next;
- }
- }
-
- return NSERROR_OK;
+ struct nscallback *cur_nscb;
+ struct nscallback *prev_nscb;
+ struct nscallback *unlnk_nscb;
+
+ /* check there is something on the list to remove */
+ if (schedule_list == NULL) {
+ return NSERROR_OK;
+ }
+
+ SRLOG("removing %p, %p", callback, p);
+
+ cur_nscb = schedule_list;
+ prev_nscb = NULL;
+
+ while (cur_nscb != NULL) {
+ if ((cur_nscb->callback == callback) &&
+ (cur_nscb->p == p)) {
+ /* item to remove */
+
+ SRLOG("callback entry %p removing %p(%p)",
+ cur_nscb, cur_nscb->callback, cur_nscb->p);
+
+ /* remove callback */
+ unlnk_nscb = cur_nscb;
+ cur_nscb = unlnk_nscb->next;
+
+ if (prev_nscb == NULL) {
+ schedule_list = cur_nscb;
+ } else {
+ prev_nscb->next = cur_nscb;
+ }
+ free (unlnk_nscb);
+ } else {
+ /* move to next element */
+ prev_nscb = cur_nscb;
+ cur_nscb = prev_nscb->next;
+ }
+ }
+
+ return NSERROR_OK;
}
-/* exported function documented in framebuffer/schedule.h */
+/* exported function documented in monkey/schedule.h */
nserror monkey_schedule(int tival, void (*callback)(void *p), void *p)
{
- struct nscallback *nscb;
- struct timeval tv;
- nserror ret;
+ struct nscallback *nscb;
+ struct timeval tv;
+ nserror ret;
- /* ensure uniqueness of the callback and context */
- ret = schedule_remove(callback, p);
- if ((tival < 0) || (ret != NSERROR_OK)) {
- return ret;
- }
+ /* ensure uniqueness of the callback and context */
+ ret = schedule_remove(callback, p);
+ if ((tival < 0) || (ret != NSERROR_OK)) {
+ return ret;
+ }
- SRLOG("Adding %p(%p) in %d", callback, p, tival);
+ SRLOG("Adding %p(%p) in %d", callback, p, tival);
- tv.tv_sec = tival / 1000; /* miliseconds to seconds */
- tv.tv_usec = (tival % 1000) * 1000; /* remainder to microseconds */
+ tv.tv_sec = tival / 1000; /* miliseconds to seconds */
+ tv.tv_usec = (tival % 1000) * 1000; /* remainder to microseconds */
- nscb = calloc(1, sizeof(struct nscallback));
+ nscb = calloc(1, sizeof(struct nscallback));
- gettimeofday(&nscb->tv, NULL);
- timeradd(&nscb->tv, &tv, &nscb->tv);
+ gettimeofday(&nscb->tv, NULL);
+ timeradd(&nscb->tv, &tv, &nscb->tv);
- nscb->callback = callback;
- nscb->p = p;
+ nscb->callback = callback;
+ nscb->p = p;
- /* add to list front */
- nscb->next = schedule_list;
- schedule_list = nscb;
+ /* add to list front */
+ nscb->next = schedule_list;
+ schedule_list = nscb;
- return NSERROR_OK;
+ return NSERROR_OK;
}
-/* exported function documented in framebuffer/schedule.h */
+/* exported function documented in monkey/schedule.h */
int monkey_schedule_run(void)
{
- struct timeval tv;
- struct timeval nexttime;
- struct timeval rettime;
- struct nscallback *cur_nscb;
- struct nscallback *prev_nscb;
- struct nscallback *unlnk_nscb;
-
- if (schedule_list == NULL)
- return -1;
-
- /* reset enumeration to the start of the list */
- cur_nscb = schedule_list;
- prev_nscb = NULL;
- nexttime = cur_nscb->tv;
-
- gettimeofday(&tv, NULL);
-
- while (cur_nscb != NULL) {
- if (timercmp(&tv, &cur_nscb->tv, >)) {
- /* scheduled time */
-
- /* remove callback */
- unlnk_nscb = cur_nscb;
-
- if (prev_nscb == NULL) {
- schedule_list = unlnk_nscb->next;
- } else {
- prev_nscb->next = unlnk_nscb->next;
- }
-
- unlnk_nscb->callback(unlnk_nscb->p);
-
- free(unlnk_nscb);
-
- /* need to deal with callback modifying the list. */
- if (schedule_list == NULL)
- return -1; /* no more callbacks scheduled */
-
- /* reset enumeration to the start of the list */
- cur_nscb = schedule_list;
- prev_nscb = NULL;
- nexttime = cur_nscb->tv;
- } else {
- /* if the time to the event is sooner than the
- * currently recorded soonest event record it
- */
- if (timercmp(&nexttime, &cur_nscb->tv, >)) {
+ struct timeval tv;
+ struct timeval nexttime;
+ struct timeval rettime;
+ struct nscallback *cur_nscb;
+ struct nscallback *prev_nscb;
+ struct nscallback *unlnk_nscb;
+
+ if (schedule_list == NULL)
+ return -1;
+
+ /* reset enumeration to the start of the list */
+ cur_nscb = schedule_list;
+ prev_nscb = NULL;
nexttime = cur_nscb->tv;
- }
- /* move to next element */
- prev_nscb = cur_nscb;
- cur_nscb = prev_nscb->next;
- }
- }
- /* make rettime relative to now */
- timersub(&nexttime, &tv, &rettime);
-
- SRLOG("returning time to next event as %ldms",
- (rettime.tv_sec * 1000) + (rettime.tv_usec / 1000));
-
- /* return next event time in milliseconds (24days max wait) */
- return (rettime.tv_sec * 1000) + (rettime.tv_usec / 1000);
+ gettimeofday(&tv, NULL);
+
+ while (cur_nscb != NULL) {
+ if (timercmp(&tv, &cur_nscb->tv, >)) {
+ /* scheduled time */
+
+ /* remove callback */
+ unlnk_nscb = cur_nscb;
+
+ if (prev_nscb == NULL) {
+ schedule_list = unlnk_nscb->next;
+ } else {
+ prev_nscb->next = unlnk_nscb->next;
+ }
+
+ unlnk_nscb->callback(unlnk_nscb->p);
+
+ free(unlnk_nscb);
+
+ /* need to deal with callback modifying the list. */
+ if (schedule_list == NULL)
+ return -1; /* no more callbacks scheduled */
+
+ /* reset enumeration to the start of the list */
+ cur_nscb = schedule_list;
+ prev_nscb = NULL;
+ nexttime = cur_nscb->tv;
+ } else {
+ /* if the time to the event is sooner than the
+ * currently recorded soonest event record it
+ */
+ if (timercmp(&nexttime, &cur_nscb->tv, >)) {
+ nexttime = cur_nscb->tv;
+ }
+ /* move to next element */
+ prev_nscb = cur_nscb;
+ cur_nscb = prev_nscb->next;
+ }
+ }
+
+ /* make rettime relative to now */
+ timersub(&nexttime, &tv, &rettime);
+
+ SRLOG("returning time to next event as %ldms",
+ (rettime.tv_sec * 1000) + (rettime.tv_usec / 1000));
+
+ /* return next event time in milliseconds (24days max wait) */
+ return (rettime.tv_sec * 1000) + (rettime.tv_usec / 1000);
}
void monkey_schedule_list(void)
{
- struct timeval tv;
- struct nscallback *cur_nscb;
+ struct timeval tv;
+ struct nscallback *cur_nscb;
- gettimeofday(&tv, NULL);
+ gettimeofday(&tv, NULL);
- LOG("schedule list at %lld:%ld", (long long)tv.tv_sec, tv.tv_usec);
+ LOG("schedule list at %lld:%ld", (long long)tv.tv_sec, tv.tv_usec);
- cur_nscb = schedule_list;
+ cur_nscb = schedule_list;
- while (cur_nscb != NULL) {
- LOG("Schedule %p at %lld:%ld",
- cur_nscb, (long long)cur_nscb->tv.tv_sec, cur_nscb->tv.tv_usec);
- cur_nscb = cur_nscb->next;
- }
+ while (cur_nscb != NULL) {
+ LOG("Schedule %p at %lld:%ld",
+ cur_nscb, (long long)cur_nscb->tv.tv_sec, cur_nscb->tv.tv_usec);
+ cur_nscb = cur_nscb->next;
+ }
}
-
-
-/*
- * Local Variables:
- * c-basic-offset:2
- * End:
- */
diff --git a/frontends/riscos/cookies.c b/frontends/riscos/cookies.c
index 38963ab..614bc3d 100644
--- a/frontends/riscos/cookies.c
+++ b/frontends/riscos/cookies.c
@@ -377,7 +377,7 @@ static nserror ro_cookie_init(void)
return NSERROR_OK;
}
- ncwin = malloc(sizeof(struct ro_cookie_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/riscos/corewindow.c b/frontends/riscos/corewindow.c
index a885977..77dd1c3 100644
--- a/frontends/riscos/corewindow.c
+++ b/frontends/riscos/corewindow.c
@@ -42,6 +42,7 @@
#include "riscos/wimp_event.h"
#include "riscos/dialog.h"
#include "riscos/gui.h"
+#include "riscos/window.h"
#include "riscos/toolbar.h"
#include "riscos/mouse.h"
#include "riscos/corewindow.h"
diff --git a/frontends/riscos/dialog.c b/frontends/riscos/dialog.c
index 7a0197c..6414778 100644
--- a/frontends/riscos/dialog.c
+++ b/frontends/riscos/dialog.c
@@ -47,6 +47,7 @@
#include "riscos/local_history.h"
#include "riscos/global_history.h"
#include "riscos/gui.h"
+#include "riscos/window.h"
#include "riscos/hotlist.h"
#include "riscos/menus.h"
#include "riscos/save.h"
diff --git a/frontends/riscos/global_history.c b/frontends/riscos/global_history.c
index 94e1d4a..d122a4d 100644
--- a/frontends/riscos/global_history.c
+++ b/frontends/riscos/global_history.c
@@ -405,7 +405,7 @@ static nserror ro_global_history_init(void)
return NSERROR_OK;
}
- ncwin = malloc(sizeof(struct ro_global_history_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/riscos/gui.h b/frontends/riscos/gui.h
index 35be4e1..49a8ba4 100644
--- a/frontends/riscos/gui.h
+++ b/frontends/riscos/gui.h
@@ -139,35 +139,6 @@ void ro_gui_401login_init(void);
void gui_401login_open(struct nsurl *url, const char *realm,
nserror (*cb)(bool proceed, void *pw), void *cbpw);
-/* in window.c */
-void ro_gui_window_set_scale(struct gui_window *g, float scale);
-bool ro_gui_window_dataload(struct gui_window *g, wimp_message *message);
-void ro_gui_window_mouse_at(wimp_pointer *pointer, void *data);
-void ro_gui_window_iconise(struct gui_window *g,
- wimp_full_message_window_info *wi);
-bool ro_gui_toolbar_dataload(struct gui_window *g, wimp_message *message);
-void ro_gui_window_redraw_all(void);
-void ro_gui_window_update_boxes(void);
-void ro_gui_window_quit(void);
-/* void ro_gui_window_close_all(void); */
-#define ro_gui_window_close_all ro_gui_window_quit /* no need for a separate fn */
-void ro_gui_throb(void);
-void ro_gui_window_default_options(struct gui_window *gui);
-struct gui_window *ro_gui_window_lookup(wimp_w window);
-struct gui_window *ro_gui_toolbar_lookup(wimp_w window);
-bool ro_gui_window_to_window_pos(struct gui_window *g, int x, int y,
- os_coord *pos);
-bool ro_gui_window_to_screen_pos(struct gui_window *g, int x, int y,
- os_coord *pos);
-enum browser_mouse_state ro_gui_mouse_click_state(wimp_mouse_state buttons,
- wimp_icon_flags type);
-enum browser_mouse_state ro_gui_mouse_drag_state(wimp_mouse_state buttons,
- wimp_icon_flags type);
-bool ro_gui_shift_pressed(void);
-bool ro_gui_ctrl_pressed(void);
-bool ro_gui_alt_pressed(void);
-void gui_window_set_pointer(struct gui_window *g, enum gui_pointer_shape shape);
-
/* in schedule.c */
extern bool sched_active;
extern os_t sched_time;
diff --git a/frontends/riscos/hotlist.c b/frontends/riscos/hotlist.c
index d348009..b055d1b 100644
--- a/frontends/riscos/hotlist.c
+++ b/frontends/riscos/hotlist.c
@@ -466,7 +466,7 @@ static nserror ro_hotlist_init(void)
return NSERROR_OK;
}
- ncwin = malloc(sizeof(struct ro_hotlist_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/riscos/local_history.c b/frontends/riscos/local_history.c
index fae78e6..f9f1f2e 100644
--- a/frontends/riscos/local_history.c
+++ b/frontends/riscos/local_history.c
@@ -28,6 +28,7 @@
#include "utils/nsoption.h"
#include "utils/messages.h"
#include "utils/log.h"
+#include "utils/nsurl.h"
#include "netsurf/window.h"
#include "netsurf/plotters.h"
#include "netsurf/keypress.h"
@@ -90,7 +91,7 @@ ro_local_history_draw(struct ro_corewindow *ro_cw,
ro_plot_origin_x = originx;
ro_plot_origin_y = originy;
no_font_blending = true;
- local_history_redraw(lhw->session, r->x0, r->y0, r, &ctx);
+ local_history_redraw(lhw->session, 0, 0, r, &ctx);
no_font_blending = false;
return NSERROR_OK;
@@ -127,7 +128,7 @@ static nserror
ro_local_history_tooltip(struct ro_local_history_window *lhw, int x, int y)
{
int width;
- const char *url;
+ nsurl *url;
wimp_window_state state;
wimp_icon_state ic;
os_box box = {0, 0, 0, 0};
@@ -162,17 +163,19 @@ ro_local_history_tooltip(struct ro_local_history_window *lhw, int x, int y)
}
/* get width of string */
- error = xwimptextop_string_width(url,
- strlen(url) > 256 ? 256 : strlen(url),
+ error = xwimptextop_string_width(nsurl_access(url),
+ nsurl_length(url) > 256 ? 256 : nsurl_length(url),
&width);
if (error) {
LOG("xwimptextop_string_width: 0x%x: %s",
error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
+ nsurl_unref(url);
return NSERROR_NOMEM;
}
- ro_gui_set_icon_string(dialog_tooltip, 0, url, true);
+ ro_gui_set_icon_string(dialog_tooltip, 0, nsurl_access(url), true);
+ nsurl_unref(url);
/* resize icon appropriately */
ic.w = dialog_tooltip;
@@ -296,7 +299,7 @@ ro_local_history_init(struct browser_window *bw,
return res;
}
- ncwin = malloc(sizeof(struct ro_local_history_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/riscos/save.c b/frontends/riscos/save.c
index 37474b8..bed0f5d 100644
--- a/frontends/riscos/save.c
+++ b/frontends/riscos/save.c
@@ -56,6 +56,7 @@
#include "riscos/bitmap.h"
#include "riscos/dialog.h"
#include "riscos/gui.h"
+#include "riscos/window.h"
#include "riscos/menus.h"
#include "riscos/message.h"
#include "riscos/mouse.h"
diff --git a/frontends/riscos/textselection.c b/frontends/riscos/textselection.c
index bce3575..5a430c0 100644
--- a/frontends/riscos/textselection.c
+++ b/frontends/riscos/textselection.c
@@ -36,6 +36,7 @@
#include "netsurf/browser_window.h"
#include "riscos/gui.h"
+#include "riscos/window.h"
#include "riscos/menus.h"
#include "riscos/message.h"
#include "riscos/mouse.h"
diff --git a/frontends/riscos/url_complete.c b/frontends/riscos/url_complete.c
index 3ca9be4..16c6e3a 100644
--- a/frontends/riscos/url_complete.c
+++ b/frontends/riscos/url_complete.c
@@ -36,6 +36,7 @@
#include "riscos/global_history.h"
#include "riscos/gui.h"
+#include "riscos/window.h"
#include "riscos/mouse.h"
#include "riscos/toolbar.h"
#include "riscos/url_complete.h"
diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c
index de0fcab..6dbcc32 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"
@@ -91,70 +91,6 @@
#include "riscos/ucstables.h"
#include "riscos/filetype.h"
-static void gui_window_set_extent(struct gui_window *g, int width, int height);
-
-static void ro_gui_window_redraw(wimp_draw *redraw);
-static void ro_gui_window_scroll(wimp_scroll *scroll);
-static void ro_gui_window_pointer_entering(wimp_entering *entering);
-static void ro_gui_window_track_end(wimp_leaving *leaving, void *data);
-static void ro_gui_window_open(wimp_open *open);
-static void ro_gui_window_close(wimp_w w);
-static bool ro_gui_window_click(wimp_pointer *mouse);
-static bool ro_gui_window_keypress(wimp_key *key);
-static bool ro_gui_window_toolbar_keypress(void *data, wimp_key *key);
-static bool ro_gui_window_handle_local_keypress(struct gui_window *g,
- wimp_key *key, bool is_toolbar);
-static bool ro_gui_window_menu_prepare(wimp_w w, wimp_i i, wimp_menu *menu,
- wimp_pointer *pointer);
-static void ro_gui_window_menu_warning(wimp_w w, wimp_i i, wimp_menu *menu,
- wimp_selection *selection, menu_action action);
-static bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
- wimp_selection *selection, menu_action action);
-static void ro_gui_window_menu_close(wimp_w w, wimp_i i, wimp_menu *menu);
-
-static void ro_gui_window_scroll_end(wimp_dragged *drag, void *data);
-
-static void ro_gui_window_scroll_action(struct gui_window *g,
- int scroll_x, int scroll_y);
-
-static void ro_gui_window_toolbar_click(void *data,
- toolbar_action_type action_type, union toolbar_action action);
-
-static bool ro_gui_window_content_export_types(struct hlcache_handle *h,
- bool *export_draw, bool *export_sprite);
-static void ro_gui_window_prepare_pageinfo(struct gui_window *g);
-static void ro_gui_window_prepare_objectinfo(struct hlcache_handle *object,
- nsurl *target_url);
-
-static void ro_gui_window_launch_url(struct gui_window *g, const char *url);
-static void ro_gui_window_action_home(struct gui_window *g);
-static void ro_gui_window_action_new_window(struct gui_window *g);
-static void ro_gui_window_action_local_history(struct gui_window *g);
-static void ro_gui_window_action_save(struct gui_window *g,
- gui_save_type save_type);
-static void ro_gui_window_action_search(struct gui_window *g);
-static void ro_gui_window_action_zoom(struct gui_window *g);
-static void ro_gui_window_action_add_bookmark(struct gui_window *g);
-static void ro_gui_window_action_remove_bookmark(struct gui_window *g);
-static void ro_gui_window_action_print(struct gui_window *g);
-static void ro_gui_window_action_page_info(struct gui_window *g);
-
-static void ro_gui_window_remove_update_boxes(struct gui_window *g);
-static void ro_gui_window_update_toolbar_buttons(struct gui_window *g);
-static void ro_gui_window_update_toolbar(void *data);
-static void ro_gui_window_save_toolbar_buttons(void *data, char *config);
-static void ro_gui_window_update_theme(void *data, bool ok);
-
-static bool ro_gui_window_import_text(struct gui_window *g,
- const char *filename);
-static void ro_gui_window_clone_options(
- struct gui_window *new_gui,
- struct gui_window *old_gui);
-
-static bool ro_gui_window_prepare_form_select_menu(struct gui_window *bw,
- struct form_control *control);
-static void ro_gui_window_process_form_select_menu(struct gui_window *g,
- wimp_selection *selection);
#ifndef wimp_KEY_END
#define wimp_KEY_END wimp_KEY_COPY
@@ -167,6 +103,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;
@@ -205,7 +146,8 @@ struct ro_gui_pointer_entry {
int yactive;
};
-/** Map from gui_pointer_shape to pointer sprite data. Must be ordered as
+/**
+ * Map from gui_pointer_shape to pointer sprite data. Must be ordered as
* enum gui_pointer_shape. */
struct ro_gui_pointer_entry ro_gui_pointer_table[] = {
{ true, "ptr_default", 0, 0 },
@@ -242,143 +184,22 @@ struct update_box {
struct update_box *pending_updates;
#define MARGIN 4
-static const struct toolbar_callbacks ro_gui_window_toolbar_callbacks = {
- ro_gui_window_update_theme,
- ro_gui_window_update_toolbar,
- (void (*)(void *)) ro_gui_window_update_toolbar_buttons,
- ro_gui_window_toolbar_click,
- ro_gui_window_toolbar_keypress,
- ro_gui_window_save_toolbar_buttons
-};
-
-
-/**
- * Initialise the browser window module and its menus.
- */
-
-void ro_gui_window_initialise(void)
-{
- /* Build the browser window menu. */
-
- static const struct ns_menu browser_definition = {
- "NetSurf", {
- { "Page", BROWSER_PAGE, 0 },
- { "Page.PageInfo",BROWSER_PAGE_INFO, &dialog_pageinfo },
- { "Page.Save", BROWSER_SAVE, &dialog_saveas },
- { "Page.SaveComp", BROWSER_SAVE_COMPLETE, &dialog_saveas },
- { "Page.Export", NO_ACTION, 0 },
-#ifdef WITH_DRAW_EXPORT
- { "Page.Export.Draw", BROWSER_EXPORT_DRAW, &dialog_saveas },
-#endif
-#ifdef WITH_PDF_EXPORT
- { "Page.Export.PDF", BROWSER_EXPORT_PDF, &dialog_saveas },
-#endif
- { "Page.Export.Text", BROWSER_EXPORT_TEXT, &dialog_saveas },
- { "Page.SaveURL", NO_ACTION, 0 },
- { "Page.SaveURL.URI", BROWSER_SAVE_URL_URI, &dialog_saveas },
- { "Page.SaveURL.URL", BROWSER_SAVE_URL_URL, &dialog_saveas },
- { "Page.SaveURL.LinkText", BROWSER_SAVE_URL_TEXT, &dialog_saveas },
- { "_Page.Print", BROWSER_PRINT, &dialog_print },
- { "Page.NewWindow", BROWSER_NEW_WINDOW, 0 },
- { "Page.FindText", BROWSER_FIND_TEXT, &dialog_search },
- { "Page.ViewSrc", BROWSER_VIEW_SOURCE, 0 },
- { "Object", BROWSER_OBJECT, 0 },
- { "Object.Object", BROWSER_OBJECT_OBJECT, 0 },
- { "Object.Object.ObjInfo", BROWSER_OBJECT_INFO, &dialog_objinfo },
- { "Object.Object.ObjSave", BROWSER_OBJECT_SAVE, &dialog_saveas },
- { "Object.Object.Export", BROWSER_OBJECT_EXPORT, 0 },
- { "Object.Object.Export.Sprite", BROWSER_OBJECT_EXPORT_SPRITE, &dialog_saveas },
-#ifdef WITH_DRAW_EXPORT
- { "Object.Object.Export.ObjDraw", BROWSER_OBJECT_EXPORT_DRAW, &dialog_saveas },
-#endif
- { "Object.Object.SaveURL", NO_ACTION, 0 },
- { "Object.Object.SaveURL.URI", BROWSER_OBJECT_SAVE_URL_URI, &dialog_saveas },
- { "Object.Object.SaveURL.URL", BROWSER_OBJECT_SAVE_URL_URL, &dialog_saveas },
- { "Object.Object.SaveURL.LinkText", BROWSER_OBJECT_SAVE_URL_TEXT, &dialog_saveas },
- { "Object.Object.ObjPrint", BROWSER_OBJECT_PRINT, 0 },
- { "Object.Object.ObjReload", BROWSER_OBJECT_RELOAD, 0 },
- { "Object.Link", BROWSER_OBJECT_LINK, 0 },
- { "Object.Link.LinkSave", BROWSER_LINK_SAVE, 0 },
- { "Object.Link.LinkSave.URI", BROWSER_LINK_SAVE_URI, &dialog_saveas },
- { "Object.Link.LinkSave.URL", BROWSER_LINK_SAVE_URL, &dialog_saveas },
- { "Object.Link.LinkSave.LinkText", BROWSER_LINK_SAVE_TEXT, &dialog_saveas },
- { "_Object.Link.LinkDload", BROWSER_LINK_DOWNLOAD, 0 },
- { "Object.Link.LinkNew", BROWSER_LINK_NEW_WINDOW, 0 },
- { "Selection", BROWSER_SELECTION, 0 },
- { "_Selection.SelSave", BROWSER_SELECTION_SAVE, &dialog_saveas },
- { "Selection.Copy", BROWSER_SELECTION_COPY, 0 },
- { "Selection.Cut", BROWSER_SELECTION_CUT, 0 },
- { "_Selection.Paste", BROWSER_SELECTION_PASTE, 0 },
- { "Selection.Clear", BROWSER_SELECTION_CLEAR, 0 },
- { "Selection.SelectAll", BROWSER_SELECTION_ALL, 0 },
- { "Navigate", NO_ACTION, 0 },
- { "Navigate.Home", BROWSER_NAVIGATE_HOME, 0 },
- { "Navigate.Back", BROWSER_NAVIGATE_BACK, 0 },
- { "Navigate.Forward", BROWSER_NAVIGATE_FORWARD, 0 },
- { "_Navigate.UpLevel", BROWSER_NAVIGATE_UP, 0 },
- { "Navigate.Reload", BROWSER_NAVIGATE_RELOAD_ALL, 0 },
- { "Navigate.Stop", BROWSER_NAVIGATE_STOP, 0 },
- { "View", NO_ACTION, 0 },
- { "View.ScaleView", BROWSER_SCALE_VIEW, &dialog_zoom },
- { "View.Images", NO_ACTION, 0 },
- { "View.Images.ForeImg", BROWSER_IMAGES_FOREGROUND, 0 },
- { "View.Images.BackImg", BROWSER_IMAGES_BACKGROUND, 0 },
- { "View.Toolbars", NO_ACTION, 0 },
- { "View.Toolbars.ToolButtons", TOOLBAR_BUTTONS, 0 },
- { "View.Toolbars.ToolAddress", TOOLBAR_ADDRESS_BAR, 0 },
- { "_View.Toolbars.ToolThrob", TOOLBAR_THROBBER, 0 },
- { "View.Toolbars.EditToolbar", TOOLBAR_EDIT, 0 },
- { "_View.Render", NO_ACTION, 0 },
- { "View.Render.RenderAnims", BROWSER_BUFFER_ANIMS, 0 },
- { "View.Render.RenderAll", BROWSER_BUFFER_ALL, 0 },
- { "_View.OptDefault", BROWSER_SAVE_VIEW, 0 },
- { "View.Window", NO_ACTION, 0 },
- { "View.Window.WindowSave", BROWSER_WINDOW_DEFAULT, 0 },
- { "View.Window.WindowStagr", BROWSER_WINDOW_STAGGER, 0 },
- { "_View.Window.WindowSize", BROWSER_WINDOW_COPY, 0 },
- { "View.Window.WindowReset", BROWSER_WINDOW_RESET, 0 },
- { "Utilities", NO_ACTION, 0 },
- { "Utilities.Hotlist", HOTLIST_SHOW, 0 },
- { "Utilities.Hotlist.HotlistAdd", HOTLIST_ADD_URL, 0 },
- { "Utilities.Hotlist.HotlistShow", HOTLIST_SHOW, 0 },
- { "Utilities.History", HISTORY_SHOW_GLOBAL, 0 },
- { "Utilities.History.HistLocal", HISTORY_SHOW_LOCAL, 0 },
- { "Utilities.History.HistGlobal", HISTORY_SHOW_GLOBAL, 0 },
- { "Utilities.Cookies", COOKIES_SHOW, 0 },
- { "Utilities.Cookies.ShowCookies", COOKIES_SHOW, 0 },
- { "Utilities.Cookies.DeleteCookies", COOKIES_DELETE, 0 },
- { "Help", HELP_OPEN_CONTENTS, 0 },
- { "Help.HelpContent", HELP_OPEN_CONTENTS, 0 },
- { "Help.HelpGuide", HELP_OPEN_GUIDE, 0 },
- { "_Help.HelpInfo", HELP_OPEN_INFORMATION, 0 },
- { "Help.HelpCredits", HELP_OPEN_CREDITS, 0 },
- { "_Help.HelpLicence", HELP_OPEN_LICENCE, 0 },
- { "Help.HelpInter", HELP_LAUNCH_INTERACTIVE, 0 },
- {NULL, 0, 0}
- }
- };
- ro_gui_browser_window_menu =
- ro_gui_menu_define_menu(&browser_definition);
-
-}
-
-
-/*
- * Interface With Core
- */
/**
* Place the caret in a browser window.
*
- * \param g window with caret
- * \param x coordinates of caret
- * \param y coordinates of caret
- * \param height height of caret
- * \param clip clip rectangle, or NULL if none
+ * \param g window with caret
+ * \param x coordinates of caret
+ * \param y coordinates of caret
+ * \param height height of caret
+ * \param clip clip rectangle, or NULL if none
*/
-
-static void gui_window_place_caret(struct gui_window *g, int x, int y, int height,
- const struct rect *clip)
+static void
+gui_window_place_caret(struct gui_window *g,
+ int x,
+ int y,
+ int height,
+ const struct rect *clip)
{
os_error *error;
@@ -390,1525 +211,1066 @@ static void gui_window_place_caret(struct gui_window *g, int x, int y, int heigh
}
}
+
/**
- * Create and open a new browser window.
+ * Updates a windows extent.
*
- * \param bw bw to create gui_window for
- * \param existing an existing gui_window, may be NULL
- * \param flags flags for gui window creation
- * \return gui window, or NULL on error
+ * \param g the gui_window to update
+ * \param width the minimum width, or -1 to use window width
+ * \param height the minimum height, or -1 to use window height
*/
-
-static struct gui_window *gui_window_create(struct browser_window *bw,
- struct gui_window *existing,
- gui_window_create_flags flags)
+static void gui_window_set_extent(struct gui_window *g, int width, int height)
{
- int screen_width, screen_height;
- static int window_count = 2;
- wimp_window window;
+ int screen_width;
+ int toolbar_height = 0;
wimp_window_state state;
os_error *error;
- bool open_centred = true;
- struct gui_window *g;
- g = malloc(sizeof *g);
- if (!g) {
- ro_warn_user("NoMemory", 0);
- return 0;
+ if (g->toolbar) {
+ toolbar_height = ro_toolbar_full_height(g->toolbar);
}
- g->bw = bw;
- g->toolbar = 0;
- g->status_bar = 0;
- g->old_width = 0;
- g->old_height = 0;
- g->update_extent = true;
- g->active = false;
- strcpy(g->title, "NetSurf");
- g->iconise_icon = -1;
- g->scale = browser_window_get_scale(bw);
- /* Set the window position */
- if (existing != NULL &&
- flags & GW_CREATE_CLONE &&
- nsoption_bool(window_size_clone)) {
- state.w = existing->window;
+ /* get the current state */
+ if ((height == -1) || (width == -1)) {
+ state.w = g->window;
error = xwimp_get_window_state(&state);
if (error) {
LOG("xwimp_get_window_state: 0x%x: %s", error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
+ return;
}
- window.visible.x0 = state.visible.x0;
- window.visible.x1 = state.visible.x1;
- window.visible.y0 = state.visible.y0 - 48;
- window.visible.y1 = state.visible.y1 - 48;
- open_centred = false;
- } else {
- int win_width, win_height;
- ro_gui_screen_size(&screen_width, &screen_height);
-
- /* Check if we have a preferred position */
- if ((nsoption_int(window_screen_width) != 0) &&
- (nsoption_int(window_screen_height) != 0)) {
- win_width = (nsoption_int(window_width) *
- screen_width) /
- nsoption_int(window_screen_width);
- win_height = (nsoption_int(window_height) *
- screen_height) /
- nsoption_int(window_screen_height);
- window.visible.x0 = (nsoption_int(window_x) *
- screen_width) /
- nsoption_int(window_screen_width);
- window.visible.y0 = (nsoption_int(window_y) *
- screen_height) /
- nsoption_int(window_screen_height);
- if (nsoption_bool(window_stagger)) {
- window.visible.y0 += 96 -
- (48 * (window_count % 5));
- }
- open_centred = false;
- if (win_width < 100)
- win_width = 100;
- if (win_height < 100)
- win_height = 100;
- } else {
-
- /* Base how we define the window height/width
- on the compile time options set */
- win_width = screen_width * 3 / 4;
- if (1600 < win_width)
- win_width = 1600;
- win_height = win_width * 3 / 4;
-
- window.visible.x0 = (screen_width - win_width) / 2;
- window.visible.y0 = ((screen_height - win_height) / 2) +
- 96 - (48 * (window_count % 5));
+ if (width == -1)
+ width = state.visible.x1 - state.visible.x0;
+ if (height == -1) {
+ height = state.visible.y1 - state.visible.y0;
+ height -= toolbar_height;
}
- window.visible.x1 = window.visible.x0 + win_width;
- window.visible.y1 = window.visible.y0 + win_height;
}
- /* General flags for a non-movable, non-resizable, no-title bar window */
- window.xscroll = 0;
- window.yscroll = 0;
- window.next = wimp_TOP;
- window.flags = wimp_WINDOW_MOVEABLE |
- wimp_WINDOW_NEW_FORMAT |
- wimp_WINDOW_VSCROLL |
- wimp_WINDOW_HSCROLL |
- wimp_WINDOW_IGNORE_XEXTENT |
- wimp_WINDOW_IGNORE_YEXTENT |
- wimp_WINDOW_SCROLL_REPEAT;
- window.title_fg = wimp_COLOUR_BLACK;
- window.title_bg = wimp_COLOUR_LIGHT_GREY;
- window.work_fg = wimp_COLOUR_LIGHT_GREY;
- window.work_bg = wimp_COLOUR_TRANSPARENT;
- window.scroll_outer = wimp_COLOUR_DARK_GREY;
- window.scroll_inner = wimp_COLOUR_MID_LIGHT_GREY;
- window.highlight_bg = wimp_COLOUR_CREAM;
- window.extra_flags = wimp_WINDOW_USE_EXTENDED_SCROLL_REQUEST |
- wimp_WINDOW_GIVE_SHADED_ICON_INFO;
- window.extent.x0 = 0;
- window.extent.y0 = -(window.visible.y1 - window.visible.y0);
- window.extent.x1 = window.visible.x1 - window.visible.x0;
- window.extent.y1 = 0;
- window.title_flags = wimp_ICON_TEXT |
- wimp_ICON_INDIRECTED |
- wimp_ICON_HCENTRED;
- window.work_flags = wimp_BUTTON_DOUBLE_CLICK_DRAG <<
- wimp_ICON_BUTTON_TYPE_SHIFT;
- window.sprite_area = wimpspriteop_AREA;
- window.xmin = 1;
- window.ymin = 1;
- window.title_data.indirected_text.text = g->title;
- window.title_data.indirected_text.validation = (char *) -1;
- window.title_data.indirected_text.size = 255;
- window.icon_count = 0;
-
- /* Add in flags */
- window.flags |= wimp_WINDOW_SIZE_ICON |
- wimp_WINDOW_BACK_ICON |
- wimp_WINDOW_CLOSE_ICON |
- wimp_WINDOW_TITLE_ICON |
- wimp_WINDOW_TOGGLE_ICON;
-
- if (open_centred) {
- int scroll_width = ro_get_vscroll_width(NULL);
- window.visible.x0 -= scroll_width;
+ /* the top-level framed window is a total pain. to get it to maximise
+ * to the top of the screen we need to fake it having a suitably large
+ * extent */
+ if (browser_window_is_frameset(g->bw)) {
+ ro_gui_screen_size(&screen_width, &height);
+ if (g->toolbar)
+ height -= ro_toolbar_full_height(g->toolbar);
+ height -= ro_get_hscroll_height(g->window);
+ height -= ro_get_title_height(g->window);
}
-
- error = xwimp_create_window(&window, &g->window);
+ if (browser_window_has_content(g->bw)) {
+ int w, h;
+ browser_window_get_extents(g->bw, true, &w, &h);
+ width = max(width, w * 2);
+ height = max(height, h * 2);
+ }
+ os_box extent = { 0, -height, width, toolbar_height };
+ error = xwimp_set_extent(g->window, &extent);
if (error) {
- LOG("xwimp_create_window: 0x%x: %s", error->errnum, error->errmess);
+ LOG("xwimp_set_extent: 0x%x: %s", error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
- free(g);
- return 0;
+ return;
}
+}
- /* Link into window list */
- g->prev = 0;
- g->next = window_list;
- if (window_list)
- window_list->prev = g;
- window_list = g;
- window_count++;
- /* Add in a toolbar and status bar */
- g->status_bar = ro_gui_status_bar_create(g->window,
- nsoption_int(toolbar_status_size));
- g->toolbar = ro_toolbar_create(NULL, g->window,
- THEME_STYLE_BROWSER_TOOLBAR, TOOLBAR_FLAGS_NONE,
- &ro_gui_window_toolbar_callbacks, g,
- "HelpToolbar");
- if (g->toolbar != NULL) {
- ro_toolbar_add_buttons(g->toolbar,
- brower_toolbar_buttons,
- nsoption_charp(toolbar_browser));
- ro_toolbar_add_url(g->toolbar);
- ro_toolbar_add_throbber(g->toolbar);
- ro_toolbar_rebuild(g->toolbar);
- }
+/**
+ * Open a window
+ *
+ * opens a window using the given wimp_open, handling toolbars and resizing.
+ *
+ * \param open the window open event information
+ */
+static void ro_gui_window_open(wimp_open *open)
+{
+ struct gui_window *g;
+ int width = open->visible.x1 - open->visible.x0;
+ int height = open->visible.y1 - open->visible.y0;
+ browser_scrolling h_scroll;
+ browser_scrolling v_scroll;
+ int toolbar_height = 0;
+ float new_scale = 0;
+ wimp_window_state state;
+ os_error *error;
+ wimp_w parent;
+ bits linkage;
+ bool have_content;
- /* Register event handlers. Do this quickly, as some of the things
- * that follow will indirectly look up our user data: this MUST
- * be set first!
- */
- ro_gui_wimp_event_set_user_data(g->window, g);
- ro_gui_wimp_event_register_open_window(g->window, ro_gui_window_open);
- ro_gui_wimp_event_register_close_window(g->window, ro_gui_window_close);
- ro_gui_wimp_event_register_redraw_window(g->window, ro_gui_window_redraw);
- ro_gui_wimp_event_register_scroll_window(g->window, ro_gui_window_scroll);
- ro_gui_wimp_event_register_pointer_entering_window(g->window, ro_gui_window_pointer_entering);
- ro_gui_wimp_event_register_keypress(g->window, ro_gui_window_keypress);
- ro_gui_wimp_event_register_mouse_click(g->window, ro_gui_window_click);
- ro_gui_wimp_event_register_menu(g->window, ro_gui_browser_window_menu,
- true, false);
- ro_gui_wimp_event_register_menu_prepare(g->window,
- ro_gui_window_menu_prepare);
- ro_gui_wimp_event_register_menu_selection(g->window,
- ro_gui_window_menu_select);
- ro_gui_wimp_event_register_menu_warning(g->window,
- ro_gui_window_menu_warning);
- ro_gui_wimp_event_register_menu_close(g->window,
- ro_gui_window_menu_close);
+ g = (struct gui_window *)ro_gui_wimp_event_get_user_data(open->w);
- /* Set the window options */
- ro_gui_window_clone_options(g, existing);
- ro_gui_window_update_toolbar_buttons(g);
+ if (open->next == wimp_TOP && g->iconise_icon >= 0) {
+ /* window is no longer iconised, release its sprite number */
+ iconise_used[g->iconise_icon] = false;
+ g->iconise_icon = -1;
+ }
- /* Open the window at the top of the stack */
+ have_content = browser_window_has_content(g->bw);
+
+ /* get the current flags/nesting state */
state.w = g->window;
- error = xwimp_get_window_state(&state);
+ error = xwimp_get_window_state_and_nesting(&state, &parent, &linkage);
if (error) {
LOG("xwimp_get_window_state: 0x%x: %s", error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
- return g;
+ return;
}
- state.next = wimp_TOP;
-
- ro_gui_window_open(PTR_WIMP_OPEN(&state));
+ /* account for toolbar height, if present */
+ if (g->toolbar)
+ toolbar_height = ro_toolbar_full_height(g->toolbar);
+ height -= toolbar_height;
- /* Claim the caret */
- if (ro_toolbar_take_caret(g->toolbar))
- ro_gui_url_complete_start(g->toolbar);
- else
- gui_window_place_caret(g, -100, -100, 0, NULL);
+ /* work with the state from now on so we can modify flags */
+ state.visible = open->visible;
+ state.xscroll = open->xscroll;
+ state.yscroll = open->yscroll;
+ state.next = open->next;
- return g;
-}
+ browser_window_get_scrollbar_type(g->bw, &h_scroll, &v_scroll);
+ /* handle 'auto' scroll bars' and non-fitting scrollbar removal */
+ if ((h_scroll != BW_SCROLLING_NO) && (v_scroll != BW_SCROLLING_NO)) {
+ int size;
-/**
- * Close a browser window and free any related resources.
- *
- * \param g gui_window to destroy
- */
+ /* windows lose scrollbars when containing a frameset */
+ bool no_hscroll = false;
+ bool no_vscroll = browser_window_is_frameset(g->bw);
-static void gui_window_destroy(struct gui_window *g)
-{
- os_error *error;
- wimp_w w;
+ /* hscroll */
+ size = ro_get_hscroll_height(NULL);
+ size -= 2; /* 1px border on both sides */
+ if (!no_hscroll) {
+ if (!(state.flags & wimp_WINDOW_HSCROLL)) {
+ height -= size;
+ state.visible.y0 += size;
+ if (have_content) {
+ browser_window_schedule_reformat(g->bw);
+ }
+ }
+ state.flags |= wimp_WINDOW_HSCROLL;
+ } else {
+ if (state.flags & wimp_WINDOW_HSCROLL) {
+ height += size;
+ state.visible.y0 -= size;
+ if (have_content) {
+ browser_window_schedule_reformat(g->bw);
+ }
+ }
+ state.flags &= ~wimp_WINDOW_HSCROLL;
+ }
- assert(g);
+ /* vscroll */
+ size = ro_get_vscroll_width(NULL);
+ size -= 2; /* 1px border on both sides */
+ if (!no_vscroll) {
+ if (!(state.flags & wimp_WINDOW_VSCROLL)) {
+ width -= size;
+ state.visible.x1 -= size;
+ if (have_content) {
+ browser_window_schedule_reformat(g->bw);
+ }
+ }
+ state.flags |= wimp_WINDOW_VSCROLL;
+ } else {
+ if (state.flags & wimp_WINDOW_VSCROLL) {
+ width += size;
+ state.visible.x1 += size;
+ if (have_content) {
+ browser_window_schedule_reformat(g->bw);
+ }
+ }
+ state.flags &= ~wimp_WINDOW_VSCROLL;
+ }
+ }
- /* stop any tracking */
- ro_mouse_kill(g);
+ /* reformat or change extent if necessary */
+ if (have_content &&
+ (g->old_width != width || g->old_height != height)) {
+ /* Ctrl-resize of a top-level window scales the content size */
+ if ((g->old_width > 0) && (g->old_width != width) &&
+ (ro_gui_ctrl_pressed()))
+ new_scale = (g->scale * width) / g->old_width;
+ browser_window_schedule_reformat(g->bw);
+ }
+ if (g->update_extent || g->old_width != width ||
+ g->old_height != height) {
+ g->old_width = width;
+ g->old_height = height;
+ g->update_extent = false;
+ gui_window_set_extent(g, width, height);
+ }
- /* remove from list */
- if (g->prev)
- g->prev->next = g->next;
- else
- window_list = g->next;
- if (g->next)
- g->next->prev = g->prev;
+ /* first resize stops any flickering by making the URL window on top */
+ ro_gui_url_complete_resize(g->toolbar, PTR_WIMP_OPEN(&state));
- /* destroy toolbar */
- if (g->toolbar)
- ro_toolbar_destroy(g->toolbar);
- if (g->status_bar)
- ro_gui_status_bar_destroy(g->status_bar);
+ /* Windows containing framesets can only be scrolled via the core, which
+ * is implementing frame scrollbars itself. The x and y offsets are
+ * therefore fixed.
+ */
- w = g->window;
- ro_gui_url_complete_close();
- ro_gui_dialog_close_persistent(w);
- if (current_menu_window == w)
- ro_gui_menu_destroy();
- ro_gui_window_remove_update_boxes(g);
+ if (browser_window_is_frameset(g->bw)) {
+ state.xscroll = 0;
+ state.yscroll = toolbar_height;
+ }
- /* delete window */
- error = xwimp_delete_window(w);
+ error = xwimp_open_window_nested_with_flags(&state, parent, linkage);
if (error) {
- LOG("xwimp_delete_window: 0x%x: %s", error->errnum, error->errmess);
+ LOG("xwimp_open_window: 0x%x: %s", error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
+ return;
}
- ro_gui_wimp_event_finalise(w);
- free(g);
+ /* update the toolbar */
+ if (g->status_bar)
+ ro_gui_status_bar_resize(g->status_bar);
+ if (g->toolbar) {
+ ro_toolbar_process(g->toolbar, -1, false);
+ /* second resize updates to the new URL bar width */
+ ro_gui_url_complete_resize(g->toolbar, open);
+ }
+
+ /* set the new scale from a ctrl-resize. this must be done at the end as
+ * it may cause a frameset recalculation based on the new window size.
+ */
+ if (new_scale > 0) {
+ ro_gui_window_set_scale(g, new_scale);
+ }
}
/**
- * Set the title of a browser window.
+ * Update the extent of the inside of a browser window to that of the
+ * current content.
*
- * \param g gui_window to update
- * \param title new window title, copied
+ * \param g gui_window to update the extent of
*/
-
-static void gui_window_set_title(struct gui_window *g, const char *title)
+static void gui_window_update_extent(struct gui_window *g)
{
+ os_error *error;
+ wimp_window_info info;
+
assert(g);
- assert(title);
- if (g->scale != 1.0) {
- int scale_disp = g->scale * 100;
+ info.w = g->window;
+ error = xwimp_get_window_info_header_only(&info);
+ if (error) {
+ LOG("xwimp_get_window_info_header_only: 0x%x: %s",
+ error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ return;
+ }
- if (ABS((float)scale_disp - g->scale * 100) >= 0.05)
- snprintf(g->title, sizeof g->title, "%s (%.1f%%)",
- title, g->scale * 100);
- else
- snprintf(g->title, sizeof g->title, "%s (%i%%)",
- title, scale_disp);
- } else {
- strncpy(g->title, title, sizeof g->title);
+ /* scroll on toolbar height change */
+ if (g->toolbar) {
+ int scroll = ro_toolbar_height(g->toolbar) - info.extent.y1;
+ info.yscroll += scroll;
}
- ro_gui_set_window_title(g->window, g->title);
+ /* Handle change of extents */
+ g->update_extent = true;
+ ro_gui_window_open(PTR_WIMP_OPEN(&info));
}
-/* exported interface documented in riscos/window.h */
-nserror ro_gui_window_invalidate_area(struct gui_window *g,
- const struct rect *rect)
-{
- bool use_buffer;
- int x0, y0, x1, y1;
- struct update_box *cur;
- wimp_window_info info;
- os_error *error;
-
- assert(g);
- if (rect == NULL) {
- info.w = g->window;
- error = xwimp_get_window_info_header_only(&info);
- if (error) {
- LOG("xwimp_get_window_info_header_only: 0x%x: %s",
- error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- return NSERROR_INVALID;
- }
+/**
+ * Update a window and its toolbar
+ *
+ * makes a window and toolbar reflect a new theme: used as a callback
+ * by the toolbar module when a theme change affects a toolbar.
+ *
+ * \param data void pointer to the window's gui_window struct
+ * \param ok true if the bar still exists; else false.
+ */
+static void ro_gui_window_update_theme(void *data, bool ok)
+{
+ struct gui_window *g = (struct gui_window *) data;
- error = xwimp_force_redraw(g->window,
- info.extent.x0, info.extent.y0,
- info.extent.x1, info.extent.y1);
- if (error) {
- LOG("xwimp_force_redraw: 0x%x: %s",
- error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- return NSERROR_INVALID;
+ if (g != NULL && g->toolbar != NULL) {
+ if (ok) {
+ gui_window_update_extent(g);
+ } else {
+ g->toolbar = NULL;
}
- return NSERROR_OK;
}
+}
- x0 = floorf(rect->x0 * 2 * g->scale);
- y0 = -ceilf(rect->y1 * 2 * g->scale);
- x1 = ceilf(rect->x1 * 2 * g->scale) + 1;
- y1 = -floorf(rect->y0 * 2 * g->scale) + 1;
- use_buffer =
- (g->option.buffer_everything || g->option.buffer_animations);
- /* try to optimise buffered redraws */
- if (use_buffer) {
- for (cur = pending_updates; cur != NULL; cur = cur->next) {
- if ((cur->g != g) || (!cur->use_buffer)) {
- continue;
- }
- if ((((cur->x0 - x1) < MARGIN) ||
- ((cur->x1 - x0) < MARGIN)) &&
- (((cur->y0 - y1) < MARGIN) ||
- ((cur->y1 - y0) < MARGIN))) {
- cur->x0 = min(cur->x0, x0);
- cur->y0 = min(cur->y0, y0);
- cur->x1 = max(cur->x1, x1);
- cur->y1 = max(cur->y1, y1);
- return NSERROR_OK;
- }
- }
- }
- cur = malloc(sizeof(struct update_box));
- if (!cur) {
- LOG("No memory for malloc.");
- return NSERROR_NOMEM;
+/**
+ * Update a window to reflect a change in toolbar size: used as a callback by
+ * the toolbar module when a toolbar height changes.
+ *
+ * \param data void pointer the window's gui_window struct
+ */
+static void ro_gui_window_update_toolbar(void *data)
+{
+ struct gui_window *g = (struct gui_window *) data;
+
+ if (g != NULL) {
+ gui_window_update_extent(g);
}
+}
- cur->x0 = x0;
- cur->y0 = y0;
- cur->x1 = x1;
- cur->y1 = y1;
- cur->next = pending_updates;
- pending_updates = cur;
- cur->g = g;
- cur->use_buffer = use_buffer;
- return NSERROR_OK;
+/**
+ * Update the toolbar buttons for a given browser window to reflect the
+ * current state of its contents.
+ *
+ * Note that the parameters to this function are arranged so that it can be
+ * supplied to the toolbar module as an button state update callback.
+ *
+ * \param g The browser window to update.
+ */
+static void ro_gui_window_update_toolbar_buttons(struct gui_window *g)
+{
+ struct browser_window *bw;
+ struct toolbar *toolbar;
+
+ if (g == NULL || g->toolbar == NULL)
+ return;
+
+ bw = g->bw;
+ toolbar = g->toolbar;
+
+ ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_RELOAD,
+ !browser_window_reload_available(bw));
+
+ ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_STOP,
+ !browser_window_stop_available(bw));
+
+ ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_BACK,
+ !browser_window_back_available(bw));
+
+ ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_FORWARD,
+ !browser_window_forward_available(bw));
+
+ ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_UP,
+ !browser_window_up_available(bw));
+
+ ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_SEARCH,
+ !browser_window_can_search(bw));
+
+ ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_SCALE,
+ !browser_window_has_content(bw));
+
+ ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_PRINT,
+ !browser_window_has_content(bw));
+
+ ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_SAVE_SOURCE,
+ !browser_window_has_content(bw));
+
+ ro_toolbar_update_urlsuggest(toolbar);
}
/**
- * Get the scroll position of a browser window.
+ * Add a hotlist entry for a browser window.
*
- * \param g gui_window
- * \param sx receives x ordinate of point at top-left of window
- * \param sy receives y ordinate of point at top-left of window
- * \return true iff successful
+ * \param g The browser window to act on.
*/
-
-static bool gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
+static void ro_gui_window_action_add_bookmark(struct gui_window *g)
{
- wimp_window_state state;
- os_error *error;
- int toolbar_height = 0;
+ nsurl *url;
- assert(g);
+ if (g == NULL || g->bw == NULL || g->toolbar == NULL ||
+ browser_window_has_content(g->bw) == false)
+ return;
- state.w = g->window;
- error = xwimp_get_window_state(&state);
- if (error) {
- LOG("xwimp_get_window_state: 0x%x: %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- return false;
- }
+ url = browser_window_get_url(g->bw);
- if (g->toolbar)
- toolbar_height = ro_toolbar_full_height(g->toolbar);
- *sx = state.xscroll / (2 * g->scale);
- *sy = -(state.yscroll - toolbar_height) / (2 * g->scale);
- return true;
+ ro_gui_hotlist_add_page(url);
+ ro_toolbar_update_hotlist(g->toolbar);
}
/**
- * Set the scroll position of a riscos browser window.
- *
- * Scrolls the viewport to ensure the specified rectangle of the
- * content is shown.
+ * Remove a hotlist entry for a browser window.
*
- * \param g gui window to scroll
- * \param rect The rectangle to ensure is shown.
- * \return NSERROR_OK on success or apropriate error code.
+ * \param g The browser window to act on.
*/
-static nserror
-gui_window_set_scroll(struct gui_window *g, const struct rect *rect)
+static void ro_gui_window_action_remove_bookmark(struct gui_window *g)
{
- wimp_window_state state;
- os_error *error;
- int toolbar_height = 0;
+ nsurl *url;
- assert(g);
+ if (g == NULL || g->bw == NULL || g->toolbar == NULL ||
+ browser_window_has_content(g->bw) == false)
+ return;
- state.w = g->window;
- error = xwimp_get_window_state(&state);
- if (error) {
- LOG("xwimp_get_window_state: 0x%x: %s",
- error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- return NSERROR_BAD_PARAMETER;
- }
+ url = browser_window_get_url(g->bw);
- if (g->toolbar) {
- toolbar_height = ro_toolbar_full_height(g->toolbar);
- }
+ ro_gui_hotlist_remove_page(url);
+}
- if ((rect->x0 == rect->x1) && (rect->y0 == rect->y1)) {
- /* scroll to top */
- state.xscroll = rect->x0 * 2 * g->scale;
- state.yscroll = (-rect->y0 * 2 * g->scale) + toolbar_height;
- } else {
- /* scroll area into view with padding */
- int x0, y0, x1, y1;
- int cx0, cy0, width, height;
- int padding_available;
- int correction;
- x0 = rect->x0 * 2 * g->scale;
- y0 = rect->y0 * 2 * g->scale;
- x1 = rect->x1 * 2 * g->scale;
- y1 = rect->y1 * 2 * g->scale;
+/**
+ * Open a local history pane for a browser window.
+ *
+ * \param gw The browser window to act on.
+ */
+static void ro_gui_window_action_local_history(struct gui_window *gw)
+{
+ nserror res;
- cx0 = state.xscroll;
- cy0 = -state.yscroll + toolbar_height;
- width = state.visible.x1 - state.visible.x0;
- height = state.visible.y1 - state.visible.y0 - toolbar_height;
-
- /* make sure we're visible */
- correction = (x1 - cx0 - width);
- if (correction > 0) {
- cx0 += correction;
- }
- correction = (y1 - cy0 - height);
- if (correction > 0) {
- cy0 += correction;
- }
- if (x0 < cx0) {
- cx0 = x0;
- }
- if (y0 < cy0) {
- cy0 = y0;
- }
+ if ((gw == NULL) || (gw->bw == NULL)) {
+ return;
+ }
- /* try to give a SCROLL_VISIBLE_PADDING border of space around us */
- padding_available = (width - x1 + x0) / 2;
- if (padding_available > 0) {
- if (padding_available > SCROLL_VISIBLE_PADDING) {
- padding_available = SCROLL_VISIBLE_PADDING;
- }
- correction = (cx0 + width - x1);
- if (correction < padding_available) {
- cx0 += padding_available;
- }
- correction = (x0 - cx0);
- if (correction < padding_available) {
- cx0 -= padding_available;
- }
- }
- padding_available = (height - y1 + y0) / 2;
- if (padding_available > 0) {
- if (padding_available > SCROLL_VISIBLE_PADDING) {
- padding_available = SCROLL_VISIBLE_PADDING;
- }
- correction = (cy0 + height - y1);
- if (correction < padding_available) {
- cy0 += padding_available;
- }
- correction = (y0 - cy0);
- if (correction < padding_available) {
- cy0 -= padding_available;
- }
- }
+ res = ro_gui_local_history_present(gw->window, gw->bw);
- state.xscroll = cx0;
- state.yscroll = -cy0 + toolbar_height;
+ if (res != NSERROR_OK) {
+ ro_warn_user(messages_get_errorcode(res), 0);
}
- ro_gui_window_open(PTR_WIMP_OPEN(&state));
-
- return NSERROR_OK;
}
/**
- * Find the current dimensions of a browser window's content area.
+ * Perform a Navigate Home action on a browser window.
*
- * \param gw gui window to measure
- * \param width receives width of window
- * \param height receives height of window
- * \param scaled whether to return scaled values
+ * \param g The browser window to act on.
*/
-static nserror
-gui_window_get_dimensions(struct gui_window *gw,
- int *width, int *height,
- bool scaled)
+static void ro_gui_window_action_home(struct gui_window *g)
{
- /* use the cached window sizes */
- *width = gw->old_width / 2;
- *height = gw->old_height / 2;
+ static const char *addr = NETSURF_HOMEPAGE;
+ nsurl *url;
+ nserror error;
- if (scaled) {
- *width /= gw->scale;
- *height /= gw->scale;
+ if (g == NULL || g->bw == NULL)
+ return;
+
+ if (nsoption_charp(homepage_url) != NULL) {
+ addr = nsoption_charp(homepage_url);
+ }
+
+ error = nsurl_create(addr, &url);
+ if (error == NSERROR_OK) {
+ error = browser_window_navigate(g->bw,
+ url,
+ NULL,
+ BW_NAVIGATE_HISTORY,
+ NULL,
+ NULL,
+ NULL);
+ nsurl_unref(url);
+ }
+ if (error != NSERROR_OK) {
+ ro_warn_user(messages_get_errorcode(error), 0);
}
- return NSERROR_OK;
}
/**
- * Update the extent of the inside of a browser window to that of the
- * current content.
+ * Open a text search dialogue for a browser window.
*
- * \param g gui_window to update the extent of
+ * \param g The browser window to act on.
*/
-
-static void gui_window_update_extent(struct gui_window *g)
+static void ro_gui_window_action_search(struct gui_window *g)
{
- os_error *error;
- wimp_window_info info;
-
- assert(g);
-
- info.w = g->window;
- error = xwimp_get_window_info_header_only(&info);
- if (error) {
- LOG("xwimp_get_window_info_header_only: 0x%x: %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
+ if (g == NULL || g->bw == NULL || !browser_window_can_search(g->bw))
return;
- }
-
- /* scroll on toolbar height change */
- if (g->toolbar) {
- int scroll = ro_toolbar_height(g->toolbar) - info.extent.y1;
- info.yscroll += scroll;
- }
- /* Handle change of extents */
- g->update_extent = true;
- ro_gui_window_open(PTR_WIMP_OPEN(&info));
+ ro_gui_search_prepare(g->bw);
+ ro_gui_dialog_open_persistent(g->window, dialog_search, true);
}
/**
- * Set the status bar of a browser window.
+ * Open a zoom dialogue for a browser window.
*
- * \param g gui_window to update
- * \param text new status text
+ * \param g The browser window to act on.
*/
-
-static void riscos_window_set_status(struct gui_window *g, const char *text)
+static void ro_gui_window_action_zoom(struct gui_window *g)
{
- if (g->status_bar)
- ro_gui_status_bar_set_text(g->status_bar, text);
+ if (g == NULL)
+ return;
+
+ ro_gui_dialog_prepare_zoom(g);
+ ro_gui_dialog_open_persistent(g->window, dialog_zoom, true);
}
/**
- * Change mouse pointer shape
+ * Open a save dialogue for a browser window contents.
+ *
+ * \param g The browser window to act on.
+ * \param save_type The type of save to open.
*/
-
-void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
+static void
+ro_gui_window_action_save(struct gui_window *g, gui_save_type save_type)
{
- static gui_pointer_shape curr_pointer = GUI_POINTER_DEFAULT;
- struct ro_gui_pointer_entry *entry;
- os_error *error;
+ struct hlcache_handle *h;
- if (shape == curr_pointer)
+ if (g == NULL || g->bw == NULL || !browser_window_has_content(g->bw))
return;
- assert(shape < sizeof ro_gui_pointer_table /
- sizeof ro_gui_pointer_table[0]);
+ h = browser_window_get_content(g->bw);
+ if (h == NULL)
+ return;
- entry = &ro_gui_pointer_table[shape];
+ ro_gui_save_prepare(save_type, h, NULL, NULL, NULL);
+ ro_gui_dialog_open_persistent(g->window, dialog_saveas, true);
+}
- if (entry->wimp_area) {
- /* pointer in the Wimp's sprite area */
- error = xwimpspriteop_set_pointer_shape(entry->sprite_name,
- 1, entry->xactive, entry->yactive, 0, 0);
- if (error) {
- LOG("xwimpspriteop_set_pointer_shape: 0x%x: %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- }
- } else {
- /* pointer in our own sprite area */
- error = xosspriteop_set_pointer_shape(osspriteop_USER_AREA,
- gui_sprites,
- (osspriteop_id) entry->sprite_name,
- 1, entry->xactive, entry->yactive, 0, 0);
- if (error) {
- LOG("xosspriteop_set_pointer_shape: 0x%x: %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- }
- }
- curr_pointer = shape;
+/**
+ * Open a print dialogue for a browser window.
+ *
+ * \param g The browser window to act on.
+ */
+static void ro_gui_window_action_print(struct gui_window *g)
+{
+ if (g != NULL) {
+ ro_gui_print_prepare(g);
+ ro_gui_dialog_open_persistent(g->window, dialog_print, true);
+ }
}
-/* exported function documented in riscos/window.h */
-nserror ro_gui_window_set_url(struct gui_window *g, nsurl *url)
+/**
+ * Prepare the page info window for use.
+ *
+ * \param g The GUI window block to use.
+ */
+static void ro_gui_window_prepare_pageinfo(struct gui_window *g)
{
- size_t idn_url_l;
- char *idn_url_s = NULL;
+ struct hlcache_handle *h = browser_window_get_content(g->bw);
+ char icon_buf[20] = "file_xxx";
+ char enc_buf[40];
+ const char *icon = icon_buf;
+ const char *title, *url;
+ lwc_string *mime;
+ const char *enc = "-";
- if (g->toolbar) {
- if (nsoption_bool(display_decoded_idn) == true) {
- if (nsurl_get_utf8(url, &idn_url_s, &idn_url_l) != NSERROR_OK)
- idn_url_s = NULL;
- }
+ assert(h);
- ro_toolbar_set_url(g->toolbar, idn_url_s ? idn_url_s : nsurl_access(url), true, false);
+ title = content_get_title(h);
+ if (title == NULL)
+ title = "-";
+ url = nsurl_access(hlcache_handle_get_url(h));
+ if (url == NULL)
+ url = "-";
+ mime = content_get_mime_type(h);
- if (idn_url_s)
- free(idn_url_s);
+ sprintf(icon_buf, "file_%x", ro_content_filetype(h));
+ if (!ro_gui_wimp_sprite_exists(icon_buf))
+ sprintf(icon_buf, "file_xxx");
- ro_gui_url_complete_start(g->toolbar);
+ if (content_get_type(h) == CONTENT_HTML) {
+ if (content_get_encoding(h, CONTENT_ENCODING_NORMAL)) {
+ snprintf(enc_buf, sizeof enc_buf, "%s (%s)",
+ content_get_encoding(h, CONTENT_ENCODING_NORMAL),
+ content_get_encoding(h, CONTENT_ENCODING_SOURCE));
+ enc = enc_buf;
+ } else {
+ enc = messages_get("EncodingUnk");
+ }
}
- return NSERROR_OK;
+ ro_gui_set_icon_string(dialog_pageinfo, ICON_PAGEINFO_ICON,
+ icon, true);
+ ro_gui_set_icon_string(dialog_pageinfo, ICON_PAGEINFO_TITLE,
+ title, true);
+ ro_gui_set_icon_string(dialog_pageinfo, ICON_PAGEINFO_URL,
+ url, true);
+ ro_gui_set_icon_string(dialog_pageinfo, ICON_PAGEINFO_ENC,
+ enc, true);
+ ro_gui_set_icon_string(dialog_pageinfo, ICON_PAGEINFO_TYPE,
+ lwc_string_data(mime), true);
+
+ lwc_string_unref(mime);
}
/**
- * Update the interface to reflect start of page loading.
+ * Open a page info box for a browser window.
*
- * \param g window with start of load
+ * \param g The browser window to act on.
*/
-
-static void gui_window_start_throbber(struct gui_window *g)
+static void ro_gui_window_action_page_info(struct gui_window *g)
{
- ro_gui_window_update_toolbar_buttons(g);
- ro_gui_menu_refresh(ro_gui_browser_window_menu);
- if (g->toolbar != NULL)
- ro_toolbar_start_throbbing(g->toolbar);
- g->active = true;
-}
+ if (g == NULL || g->bw == NULL ||
+ browser_window_has_content(g->bw) == false)
+ return;
+ ro_gui_window_prepare_pageinfo(g);
+ ro_gui_dialog_open_persistent(g->window, dialog_pageinfo, false);
+}
/**
- * Update the interface to reflect page loading stopped.
+ * Process Mouse_Click events in a toolbar's button bar.
*
- * \param g window with start of load
+ * This does not handle other clicks in a toolbar: these are handled
+ * by the toolbar module itself.
+ *
+ * \param data The GUI window associated with the click.
+ * \param action_type The action type to be handled.
+ * \param action The action to process.
*/
-
-static void gui_window_stop_throbber(struct gui_window *g)
+static void
+ro_gui_window_toolbar_click(void *data,
+ toolbar_action_type action_type,
+ union toolbar_action action)
{
- ro_gui_window_update_toolbar_buttons(g);
- ro_gui_menu_refresh(ro_gui_browser_window_menu);
- if (g->toolbar != NULL)
- ro_toolbar_stop_throbbing(g->toolbar);
- g->active = false;
-}
-
-/**
- * set favicon
- */
+ struct gui_window *g = data;
+ nserror err;
-static void gui_window_set_icon(struct gui_window *g, struct hlcache_handle *icon)
-{
- if (g == NULL || g->toolbar == NULL)
+ if (g == NULL)
return;
- ro_toolbar_set_site_favicon(g->toolbar, icon);
-}
+ if (action_type == TOOLBAR_ACTION_URL) {
+ switch (action.url) {
+ case TOOLBAR_URL_DRAG_URL:
+ {
+ gui_save_type save_type;
+
+ if (!browser_window_has_content(g->bw))
+ break;
+ if (ro_gui_shift_pressed())
+ save_type = GUI_SAVE_LINK_URL;
+ else
+ save_type = GUI_SAVE_LINK_TEXT;
-/**
- * Remove the caret, if present.
- *
- * \param g window with caret
- */
+ ro_gui_drag_save_link(save_type,
+ browser_window_get_url(g->bw),
+ browser_window_get_title(g->bw), g);
+ }
+ break;
-static void gui_window_remove_caret(struct gui_window *g)
-{
- wimp_caret caret;
- os_error *error;
+ case TOOLBAR_URL_SELECT_HOTLIST:
+ ro_gui_window_action_add_bookmark(g);
+ break;
+
+ case TOOLBAR_URL_ADJUST_HOTLIST:
+ ro_gui_window_action_remove_bookmark(g);
+ break;
+
+ default:
+ break;
+ }
- error = xwimp_get_caret_position(&caret);
- if (error) {
- LOG("xwimp_get_caret_position: 0x%x: %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
return;
}
- if (caret.w != g->window)
- /* we don't have the caret: do nothing */
- return;
- /* hide caret, but keep input focus */
- gui_window_place_caret(g, -100, -100, 0, NULL);
-}
+ /* By now, the only valid action left is a button click. If it isn't
+ * one of those, give up.
+ */
+ if (action_type != TOOLBAR_ACTION_BUTTON)
+ return;
-/**
- * Called when the gui_window has new content.
- *
- * \param g the gui_window that has new content
- */
+ switch (action.button) {
+ case TOOLBAR_BUTTON_BACK:
+ if (g->bw != NULL)
+ browser_window_history_back(g->bw, false);
+ break;
-static void gui_window_new_content(struct gui_window *g)
-{
- ro_gui_menu_refresh(ro_gui_browser_window_menu);
- ro_gui_window_update_toolbar_buttons(g);
- ro_gui_dialog_close_persistent(g->window);
- ro_toolbar_set_content_favicon(g->toolbar, g);
-}
+ case TOOLBAR_BUTTON_BACK_NEW:
+ if (g->bw != NULL)
+ browser_window_history_back(g->bw, true);
+ break;
+ case TOOLBAR_BUTTON_FORWARD:
+ if (g->bw != NULL)
+ browser_window_history_forward(g->bw, false);
+ break;
-/**
- * Starts drag scrolling of a browser window
- *
- * \param g the window to scroll
- */
+ case TOOLBAR_BUTTON_FORWARD_NEW:
+ if (g->bw != NULL)
+ browser_window_history_forward(g->bw, true);
+ break;
-static bool gui_window_scroll_start(struct gui_window *g)
-{
- wimp_window_info_base info;
- wimp_pointer pointer;
- os_error *error;
- wimp_drag drag;
- int height;
- int width;
+ case TOOLBAR_BUTTON_STOP:
+ if (g->bw != NULL)
+ browser_window_stop(g->bw);
+ break;
- error = xwimp_get_pointer_info(&pointer);
- if (error) {
- LOG("xwimp_get_pointer_info 0x%x : %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- return false;
- }
+ case TOOLBAR_BUTTON_RELOAD:
+ if (g->bw != NULL)
+ browser_window_reload(g->bw, false);
+ break;
- info.w = g->window;
- error = xwimp_get_window_info_header_only((wimp_window_info*)&info);
- if (error) {
- LOG("xwimp_get_window_state: 0x%x : %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- return false;
- }
+ case TOOLBAR_BUTTON_RELOAD_ALL:
+ if (g->bw != NULL)
+ browser_window_reload(g->bw, true);
+ break;
- width = info.extent.x1 - info.extent.x0;
- height = info.extent.y1 - info.extent.y0;
+ case TOOLBAR_BUTTON_HISTORY_LOCAL:
+ ro_gui_window_action_local_history(g);
+ break;
- drag.type = wimp_DRAG_USER_POINT;
- drag.bbox.x1 = pointer.pos.x + info.xscroll;
- drag.bbox.y0 = pointer.pos.y + info.yscroll;
- drag.bbox.x0 = drag.bbox.x1 - (width - (info.visible.x1 - info.visible.x0));
- drag.bbox.y1 = drag.bbox.y0 + (height - (info.visible.y1 - info.visible.y0));
+ case TOOLBAR_BUTTON_HISTORY_GLOBAL:
+ ro_gui_global_history_present();
+ break;
- if (g->toolbar) {
- int tbar_height = ro_toolbar_full_height(g->toolbar);
- drag.bbox.y0 -= tbar_height;
- drag.bbox.y1 -= tbar_height;
- }
+ case TOOLBAR_BUTTON_HOME:
+ ro_gui_window_action_home(g);
+ break;
- error = xwimp_drag_box(&drag);
- if (error) {
- LOG("xwimp_drag_box: 0x%x : %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- return false;
- }
+ case TOOLBAR_BUTTON_SEARCH:
+ ro_gui_window_action_search(g);
+ break;
- ro_mouse_drag_start(ro_gui_window_scroll_end, ro_gui_window_mouse_at,
- NULL, g);
- return true;
-}
+ case TOOLBAR_BUTTON_SCALE:
+ ro_gui_window_action_zoom(g);
+ break;
+ case TOOLBAR_BUTTON_BOOKMARK_OPEN:
+ ro_gui_hotlist_present();
+ break;
-/**
- * Platform-dependent part of starting drag operation.
- *
- * \param g gui window containing the drag
- * \param type type of drag the core is performing
- * \param rect rectangle to constrain pointer to (relative to drag start coord)
- * \return true iff succesful
- */
+ case TOOLBAR_BUTTON_BOOKMARK_ADD:
+ ro_gui_window_action_add_bookmark(g);
+ break;
-static bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- const struct rect *rect)
-{
- wimp_pointer pointer;
- wimp_drag drag;
+ case TOOLBAR_BUTTON_SAVE_SOURCE:
+ ro_gui_window_action_save(g, GUI_SAVE_SOURCE);
+ break;
- if (rect != NULL) {
- /* We have a box to constrain the pointer to, for the drag
- * duration */
- os_error *error = xwimp_get_pointer_info(&pointer);
- if (error) {
- LOG("xwimp_get_pointer_info 0x%x : %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- return false;
- }
+ case TOOLBAR_BUTTON_SAVE_COMPLETE:
+ ro_gui_window_action_save(g, GUI_SAVE_COMPLETE);
+ break;
- drag.type = wimp_DRAG_USER_POINT;
- drag.bbox.x0 = pointer.pos.x +
- (int)(rect->x0 * 2 * g->scale);
- drag.bbox.y0 = pointer.pos.y +
- (int)(rect->y0 * 2 * g->scale);
- drag.bbox.x1 = pointer.pos.x +
- (int)(rect->x1 * 2 * g->scale);
- drag.bbox.y1 = pointer.pos.y +
- (int)(rect->y1 * 2 * g->scale);
+ case TOOLBAR_BUTTON_PRINT:
+ ro_gui_window_action_print(g);
+ break;
- error = xwimp_drag_box(&drag);
- if (error) {
- LOG("xwimp_drag_box: 0x%x : %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- return false;
+ case TOOLBAR_BUTTON_UP:
+ err = browser_window_navigate_up(g->bw, false);
+ if (err != NSERROR_OK) {
+ ro_warn_user(messages_get_errorcode(err), NULL);
}
- }
+ break;
- switch (type) {
- case GDRAGGING_SCROLLBAR:
- /* Dragging a core scrollbar */
- ro_mouse_drag_start(ro_gui_window_scroll_end, ro_gui_window_mouse_at,
- NULL, g);
+ case TOOLBAR_BUTTON_UP_NEW:
+ err = browser_window_navigate_up(g->bw, true);
+ if (err != NSERROR_OK) {
+ ro_warn_user(messages_get_errorcode(err), NULL);
+ }
break;
default:
- /* Not handled here yet */
break;
}
- return true;
+ ro_gui_window_update_toolbar_buttons(g);
}
/**
- * Save the specified content as a link.
+ * Launch a new url in the given window.
*
- * \param g The window containing the content
- * \param url The url of the link
- * \param title The title of the link
+ * \param g gui_window to update
+ * \param url1 url to be launched
*/
-static nserror
-gui_window_save_link(struct gui_window *g, nsurl *url, const char *title)
+static void ro_gui_window_launch_url(struct gui_window *g, const char *url1)
{
- ro_gui_save_prepare(GUI_SAVE_LINK_URL, NULL, NULL, url, title);
- ro_gui_dialog_open_persistent(g->window, dialog_saveas, true);
- return NSERROR_OK;
-}
-
-
-/**
- * Updates a windows extent.
- *
- * \param g the gui_window to update
- * \param width the minimum width, or -1 to use window width
- * \param height the minimum height, or -1 to use window height
- */
+ nserror error;
+ nsurl *url;
-void gui_window_set_extent(struct gui_window *g, int width, int height)
-{
- int screen_width;
- int toolbar_height = 0;
- wimp_window_state state;
- os_error *error;
+ if (url1 == NULL)
+ return;
- if (g->toolbar)
- toolbar_height = ro_toolbar_full_height(g->toolbar);
+ ro_gui_url_complete_close();
- /* get the current state */
- if ((height == -1) || (width == -1)) {
- state.w = g->window;
- error = xwimp_get_window_state(&state);
- if (error) {
- LOG("xwimp_get_window_state: 0x%x: %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- return;
- }
- if (width == -1)
- width = state.visible.x1 - state.visible.x0;
- if (height == -1) {
- height = state.visible.y1 - state.visible.y0;
- height -= toolbar_height;
- }
- }
+ error = nsurl_create(url1, &url);
+ if (error != NSERROR_OK) {
+ ro_warn_user(messages_get_errorcode(error), 0);
+ } else {
+ ro_gui_window_set_url(g, url);
- /* the top-level framed window is a total pain. to get it to maximise
- * to the top of the screen we need to fake it having a suitably large
- * extent */
- if (browser_window_is_frameset(g->bw)) {
- ro_gui_screen_size(&screen_width, &height);
- if (g->toolbar)
- height -= ro_toolbar_full_height(g->toolbar);
- height -= ro_get_hscroll_height(g->window);
- height -= ro_get_title_height(g->window);
- }
- if (browser_window_has_content(g->bw)) {
- int w, h;
- browser_window_get_extents(g->bw, true, &w, &h);
- width = max(width, w * 2);
- height = max(height, h * 2);
- }
- os_box extent = { 0, -height, width, toolbar_height };
- error = xwimp_set_extent(g->window, &extent);
- if (error) {
- LOG("xwimp_set_extent: 0x%x: %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- return;
+ browser_window_navigate(g->bw, url,
+ NULL, BW_NAVIGATE_HISTORY,
+ NULL, NULL, NULL);
+ nsurl_unref(url);
}
}
/**
- * Display a menu of options for a form select control.
+ * Open a new browser window.
*
- * \param g gui window containing form control
- * \param control form control of type GADGET_SELECT
+ * \param g The browser window to act on.
*/
-
-static void gui_window_create_form_select_menu(struct gui_window *g,
- struct form_control *control)
+static void ro_gui_window_action_new_window(struct gui_window *g)
{
- os_error *error;
- wimp_pointer pointer;
-
- /* The first time the menu is opened, control bypasses the normal
- * Menu Prepare event and so we prepare here. On any re-opens,
- * ro_gui_window_prepare_form_select_menu() is called from the
- * normal wimp event.
- */
+ nserror error;
- if (!ro_gui_window_prepare_form_select_menu(g, control))
+ if (g == NULL || g->bw == NULL)
return;
- error = xwimp_get_pointer_info(&pointer);
- if (error) {
- LOG("xwimp_get_pointer_info: 0x%x: %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- ro_gui_menu_destroy();
- return;
- }
+ error = browser_window_create(BW_CREATE_CLONE,
+ browser_window_get_url(g->bw),
+ NULL, g->bw, NULL);
- gui_form_select_control = control;
- ro_gui_menu_create(gui_form_select_menu,
- pointer.pos.x, pointer.pos.y, g->window);
+ if (error != NSERROR_OK) {
+ ro_warn_user(messages_get_errorcode(error), 0);
+ }
}
-/*
- * RISC OS Wimp Event Handlers
- */
-
-
/**
- * Handle a Redraw_Window_Request for a browser window.
+ * Scroll a browser window.
+ *
+ * the scroll is either via the core or directly using the normal
+ * Wimp_OpenWindow interface.
+ *
+ * Scroll steps are supplied in terms of the (extended) Scroll Event direction
+ * values returned by Wimp_Poll. Special values of 0x7fffffff and 0x80000000
+ * are added to mean "Home" and "End".
+ *
+ * \param g The GUI Window to be scrolled.
+ * \param scroll_x The X scroll step to be applied.
+ * \param scroll_y The Y scroll step to be applied.
*/
-
-void ro_gui_window_redraw(wimp_draw *redraw)
+static void
+ro_gui_window_scroll_action(struct gui_window *g,
+ wimp_scroll_direction scroll_x,
+ wimp_scroll_direction scroll_y)
{
- osbool more;
- struct gui_window *g = (struct gui_window *)ro_gui_wimp_event_get_user_data(redraw->w);
- os_error *error;
- struct redraw_context ctx = {
- .interactive = true,
- .background_images = true,
- .plot = &ro_plotters
- };
+ int visible_x, visible_y;
+ int step_x = 0, step_y = 0;
+ int toolbar_y;
+ wimp_window_state state;
+ wimp_pointer pointer;
+ os_error *error;
+ os_coord pos;
+ bool handled = false;
+ struct toolbar *toolbar;
- /* We can't render locked contents. If the browser window is not
- * ready for redraw, do nothing. Else, in the case of buffered
- * rendering we'll show random data. */
- if (!browser_window_redraw_ready(g->bw))
+ if (g == NULL)
return;
- ro_gui_current_redraw_gui = g;
+ /* Get the current window, toolbar and pointer details. */
- error = xwimp_redraw_window(redraw, &more);
+ state.w = g->window;
+ error = xwimp_get_window_state(&state);
if (error) {
- LOG("xwimp_redraw_window: 0x%x: %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
+ LOG("xwimp_get_window_state: 0x%x: %s", error->errnum, error->errmess);
return;
}
- while (more) {
- struct rect clip;
- /* OS's redraw request coordinates are in screen coordinates,
- * with an origin at the bottom left of the screen.
- * Find the coordinate of the top left of the document in terms
- * of OS screen coordinates.
- * NOTE: OS units are 2 per px. */
- ro_plot_origin_x = redraw->box.x0 - redraw->xscroll;
- ro_plot_origin_y = redraw->box.y1 - redraw->yscroll;
+ toolbar = ro_toolbar_parent_window_lookup(g->window);
+ assert(g == NULL || g->toolbar == NULL || g->toolbar == toolbar);
- /* Convert OS redraw rectangle request coordinates into NetSurf
- * coordinates. NetSurf coordinates have origin at top left of
- * document and units are in px. */
- clip.x0 = (redraw->clip.x0 - ro_plot_origin_x) / 2; /* left */
- clip.y0 = (ro_plot_origin_y - redraw->clip.y1) / 2; /* top */
- clip.x1 = (redraw->clip.x1 - ro_plot_origin_x) / 2; /* right */
- clip.y1 = (ro_plot_origin_y - redraw->clip.y0) / 2; /* bottom */
+ toolbar_y = (toolbar == NULL) ? 0 : ro_toolbar_full_height(toolbar);
- if (ro_gui_current_redraw_gui->option.buffer_everything)
- ro_gui_buffer_open(redraw);
+ visible_x = state.visible.x1 - state.visible.x0 - 32;
+ visible_y = state.visible.y1 - state.visible.y0 - 32 - toolbar_y;
- browser_window_redraw(g->bw, 0, 0, &clip, &ctx);
+ error = xwimp_get_pointer_info(&pointer);
+ if (error) {
+ LOG("xwimp_get_pointer_info 0x%x : %s", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ return;
+ }
- if (ro_gui_current_redraw_gui->option.buffer_everything)
- ro_gui_buffer_close();
+ /* Turn the scroll requirement from Scroll Event codes into coordinates
+ * that the core can understand.
+ */
- /* Check to see if there are more rectangles to draw and
- * get next one */
- error = xwimp_get_rectangle(redraw, &more);
- /* RISC OS 3.7 returns an error here if enough buffer was
- claimed to cause a new dynamic area to be created. It
- doesn't actually stop anything working, so we mask it out
- for now until a better fix is found. This appears to be a
- bug in RISC OS. */
- if (error && !(ro_gui_current_redraw_gui->
- option.buffer_everything &&
- error->errnum == error_WIMP_GET_RECT)) {
- LOG("xwimp_get_rectangle: 0x%x: %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- ro_gui_current_redraw_gui = NULL;
- return;
- }
+ switch (scroll_x) {
+ case wimp_SCROLL_PAGE_LEFT:
+ step_x = SCROLL_PAGE_DOWN;
+ break;
+ case wimp_SCROLL_AUTO_LEFT:
+ case wimp_SCROLL_COLUMN_LEFT:
+ step_x = -16;
+ break;
+ case wimp_SCROLL_AUTO_RIGHT:
+ case wimp_SCROLL_COLUMN_RIGHT:
+ step_x = 16;
+ break;
+ case wimp_SCROLL_PAGE_RIGHT:
+ step_x = SCROLL_PAGE_UP;
+ break;
+ case 0x80000000:
+ step_x = SCROLL_BOTTOM;
+ break;
+ case 0x7fffffff:
+ step_x = SCROLL_TOP;
+ break;
+ default:
+ step_x = (visible_x * (scroll_x>>2)) >> 2;
+ break;
}
- ro_gui_current_redraw_gui = NULL;
-}
+ switch (scroll_y) {
+ case wimp_SCROLL_PAGE_UP:
+ step_y = SCROLL_PAGE_UP;
+ break;
+ case wimp_SCROLL_AUTO_UP:
+ case wimp_SCROLL_LINE_UP:
+ step_y = -16;
+ break;
+ case wimp_SCROLL_AUTO_DOWN:
+ case wimp_SCROLL_LINE_DOWN:
+ step_y = 16;
+ break;
+ case wimp_SCROLL_PAGE_DOWN:
+ step_y = SCROLL_PAGE_DOWN;
+ break;
+ case 0x80000000:
+ step_y = SCROLL_BOTTOM;
+ break;
+ case 0x7fffffff:
+ step_y = SCROLL_TOP;
+ break;
+ default:
+ step_y = -((visible_y * (scroll_y>>2)) >> 2);
+ break;
+ }
-/**
- * Set a gui_window's scale
- */
-void ro_gui_window_set_scale(struct gui_window *g, float scale)
-{
- g->scale = scale;
- browser_window_set_scale(g->bw, scale, true);
-}
-
+ /* If no scrolling is required, there's no point trying to do any. */
-/**
- * Open a window using the given wimp_open, handling toolbars and resizing.
- */
+ if (step_x == 0 && step_y == 0)
+ return;
-void ro_gui_window_open(wimp_open *open)
-{
- struct gui_window *g = (struct gui_window *)ro_gui_wimp_event_get_user_data(open->w);
- int width = open->visible.x1 - open->visible.x0;
- int height = open->visible.y1 - open->visible.y0;
- browser_scrolling h_scroll;
- browser_scrolling v_scroll;
- int toolbar_height = 0;
- float new_scale = 0;
- wimp_window_state state;
- os_error *error;
- wimp_w parent;
- bits linkage;
- bool have_content;
-
- if (open->next == wimp_TOP && g->iconise_icon >= 0) {
- /* window is no longer iconised, release its sprite number */
- iconise_used[g->iconise_icon] = false;
- g->iconise_icon = -1;
- }
-
- have_content = browser_window_has_content(g->bw);
-
- /* get the current flags/nesting state */
- state.w = g->window;
- error = xwimp_get_window_state_and_nesting(&state, &parent, &linkage);
- if (error) {
- LOG("xwimp_get_window_state: 0x%x: %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- return;
- }
-
- /* account for toolbar height, if present */
- if (g->toolbar)
- toolbar_height = ro_toolbar_full_height(g->toolbar);
- height -= toolbar_height;
-
- /* work with the state from now on so we can modify flags */
- state.visible = open->visible;
- state.xscroll = open->xscroll;
- state.yscroll = open->yscroll;
- state.next = open->next;
+ /* If the pointer is over the window being scrolled, then try to get
+ * the core to do the scrolling on the object under the pointer.
+ */
- browser_window_get_scrollbar_type(g->bw, &h_scroll, &v_scroll);
+ if (pointer.w == g->window &&
+ ro_gui_window_to_window_pos(g,
+ pointer.pos.x, pointer.pos.y, &pos))
+ handled = browser_window_scroll_at_point(g->bw, pos.x, pos.y,
+ step_x, step_y);
- /* handle 'auto' scroll bars' and non-fitting scrollbar removal */
- if ((h_scroll != BW_SCROLLING_NO) && (v_scroll != BW_SCROLLING_NO)) {
- int size;
+ /* If the core didn't do the scrolling, handle it via the Wimp.
+ * Windows which contain frames can only be scrolled by the core,
+ * because it implements frame scroll bars.
+ */
- /* windows lose scrollbars when containing a frameset */
- bool no_hscroll = false;
- bool no_vscroll = browser_window_is_frameset(g->bw);
+ if (!handled && (browser_window_is_frameset(g->bw) == false)) {
+ switch (step_x) {
+ case SCROLL_TOP:
+ state.xscroll -= 0x10000000;
+ break;
+ case SCROLL_BOTTOM:
+ state.xscroll += 0x10000000;
+ break;
+ case SCROLL_PAGE_UP:
+ state.xscroll += visible_x;
+ break;
+ case SCROLL_PAGE_DOWN:
+ state.xscroll -= visible_x;
+ break;
+ default:
+ state.xscroll += 2 * step_x;
+ break;
+ }
- /* hscroll */
- size = ro_get_hscroll_height(NULL);
- size -= 2; /* 1px border on both sides */
- if (!no_hscroll) {
- if (!(state.flags & wimp_WINDOW_HSCROLL)) {
- height -= size;
- state.visible.y0 += size;
- if (have_content) {
- browser_window_schedule_reformat(g->bw);
- }
- }
- state.flags |= wimp_WINDOW_HSCROLL;
- } else {
- if (state.flags & wimp_WINDOW_HSCROLL) {
- height += size;
- state.visible.y0 -= size;
- if (have_content) {
- browser_window_schedule_reformat(g->bw);
- }
- }
- state.flags &= ~wimp_WINDOW_HSCROLL;
+ switch (step_y) {
+ case SCROLL_TOP:
+ state.yscroll += 0x10000000;
+ break;
+ case SCROLL_BOTTOM:
+ state.yscroll -= 0x10000000;
+ break;
+ case SCROLL_PAGE_UP:
+ state.yscroll += visible_y;
+ break;
+ case SCROLL_PAGE_DOWN:
+ state.yscroll -= visible_y;
+ break;
+ default:
+ state.yscroll -= 2 * step_y;
+ break;
}
- /* vscroll */
- size = ro_get_vscroll_width(NULL);
- size -= 2; /* 1px border on both sides */
- if (!no_vscroll) {
- if (!(state.flags & wimp_WINDOW_VSCROLL)) {
- width -= size;
- state.visible.x1 -= size;
- if (have_content) {
- browser_window_schedule_reformat(g->bw);
- }
- }
- state.flags |= wimp_WINDOW_VSCROLL;
- } else {
- if (state.flags & wimp_WINDOW_VSCROLL) {
- width += size;
- state.visible.x1 += size;
- if (have_content) {
- browser_window_schedule_reformat(g->bw);
- }
- }
- state.flags &= ~wimp_WINDOW_VSCROLL;
+ error = xwimp_open_window((wimp_open *) &state);
+ if (error) {
+ LOG("xwimp_open_window: 0x%x: %s", error->errnum, error->errmess);
}
}
+}
- /* reformat or change extent if necessary */
- if (have_content &&
- (g->old_width != width || g->old_height != height)) {
- /* Ctrl-resize of a top-level window scales the content size */
- if ((g->old_width > 0) && (g->old_width != width) &&
- (ro_gui_ctrl_pressed()))
- new_scale = (g->scale * width) / g->old_width;
- browser_window_schedule_reformat(g->bw);
- }
- if (g->update_extent || g->old_width != width ||
- g->old_height != height) {
- g->old_width = width;
- g->old_height = height;
- g->update_extent = false;
- gui_window_set_extent(g, width, height);
- }
- /* first resize stops any flickering by making the URL window on top */
- ro_gui_url_complete_resize(g->toolbar, PTR_WIMP_OPEN(&state));
+/**
+ * Handle keypresses within the RISC OS GUI
+ *
+ * this is to be called after the core has been given a chance to act,
+ * or on keypresses in the toolbar where the core doesn't get
+ * involved.
+ *
+ * \param *g The gui window to which the keypress applies.
+ * \param *key The keypress data.
+ * \param is_toolbar true if the keypress is from a toolbar else false.
+ * \return true if the keypress was claimed; else false.
+ */
+static bool
+ro_gui_window_handle_local_keypress(struct gui_window *g,
+ wimp_key *key,
+ bool is_toolbar)
+{
+ struct browser_window_features cont;
+ os_error *ro_error;
+ wimp_pointer pointer;
+ os_coord pos;
+ float scale;
+ uint32_t c = (uint32_t) key->c;
+ wimp_scroll_direction xscroll = wimp_SCROLL_NONE;
+ wimp_scroll_direction yscroll = wimp_SCROLL_NONE;
+ nsurl *url;
- /* Windows containing framesets can only be scrolled via the core, which
- * is implementing frame scrollbars itself. The x and y offsets are
- * therefore fixed.
- */
+ if (g == NULL)
+ return false;
- if (browser_window_is_frameset(g->bw)) {
- state.xscroll = 0;
- state.yscroll = toolbar_height;
+ ro_error = xwimp_get_pointer_info(&pointer);
+ if (ro_error) {
+ LOG("xwimp_get_pointer_info: 0x%x: %s\n", ro_error->errnum, ro_error->errmess);
+ ro_warn_user("WimpError", ro_error->errmess);
+ return false;
}
- error = xwimp_open_window_nested_with_flags(&state, parent, linkage);
- if (error) {
- LOG("xwimp_open_window: 0x%x: %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- return;
- }
+ if (!ro_gui_window_to_window_pos(g, pointer.pos.x, pointer.pos.y, &pos))
+ return false;
- /* update the toolbar */
- if (g->status_bar)
- ro_gui_status_bar_resize(g->status_bar);
- if (g->toolbar) {
- ro_toolbar_process(g->toolbar, -1, false);
- /* second resize updates to the new URL bar width */
- ro_gui_url_complete_resize(g->toolbar, open);
- }
+ browser_window_get_features(g->bw, pos.x, pos.y, &cont);
- /* set the new scale from a ctrl-resize. this must be done at the end as
- * it may cause a frameset recalculation based on the new window size.
- */
- if (new_scale > 0) {
- ro_gui_window_set_scale(g, new_scale);
+ switch (c) {
+ case IS_WIMP_KEY + wimp_KEY_F1: /* Help. */
+ {
+ nserror error = nsurl_create(
+ "http://www.netsurf-browser.org/documentation/",
+ &url);
+ if (error == NSERROR_OK) {
+ error = browser_window_create(BW_CREATE_HISTORY,
+ url,
+ NULL,
+ NULL,
+ NULL);
+ nsurl_unref(url);
+ }
+ if (error != NSERROR_OK) {
+ ro_warn_user(messages_get_errorcode(error), 0);
+ }
+ return true;
}
-}
+ case IS_WIMP_KEY + wimp_KEY_CONTROL + wimp_KEY_F1:
+ ro_gui_window_action_page_info(g);
+ return true;
+ case IS_WIMP_KEY + wimp_KEY_F2:
+ if (g->toolbar == NULL)
+ return false;
+ ro_gui_url_complete_close();
+ ro_toolbar_set_url(g->toolbar, "www.", true, true);
+ ro_gui_url_complete_start(g->toolbar);
+ ro_gui_url_complete_keypress(g->toolbar, wimp_KEY_DOWN);
+ return true;
-/**
- * Handle wimp closing event
- */
+ case IS_WIMP_KEY + wimp_KEY_CONTROL + wimp_KEY_F2:
+ /* Close window. */
+ ro_gui_url_complete_close();
+ gui_window_set_pointer(g, GUI_POINTER_DEFAULT);
+ browser_window_destroy(g->bw);
+ return true;
-void ro_gui_window_close(wimp_w w)
-{
- struct gui_window *g = (struct gui_window *)ro_gui_wimp_event_get_user_data(w);
- wimp_pointer pointer;
- os_error *error;
- char *temp_name;
- char *filename = NULL;
- struct nsurl *url;
- bool destroy;
-
- error = xwimp_get_pointer_info(&pointer);
- if (error) {
- LOG("xwimp_get_pointer_info: 0x%x: %s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- return;
- }
-
- if (pointer.buttons & wimp_CLICK_ADJUST) {
- destroy = !ro_gui_shift_pressed();
-
- url = browser_window_get_url(g->bw);
- if (url != NULL) {
- netsurf_nsurl_to_path(url, &filename);
- }
- if (filename != NULL) {
- temp_name = malloc(strlen(filename) + 32);
- if (temp_name) {
- char *r;
- sprintf(temp_name, "Filer_OpenDir %s",
- filename);
- r = temp_name + strlen(temp_name);
- while (r > temp_name) {
- if (*r == '.') {
- *r = '\0';
- break;
- }
- r--;
- }
- error = xos_cli(temp_name);
- if (error) {
- LOG("xos_cli: 0x%x: %s", error->errnum, error->errmess);
- ro_warn_user("MiscError", error->errmess);
- return;
- }
- free(temp_name);
- }
- free(filename);
- } else {
- /* this is pointless if we are about to close the
- * window */
- if (!destroy && url != NULL)
- browser_window_navigate_up(g->bw, false);
- }
- }
- else
- destroy = true;
-
- if (destroy)
- browser_window_destroy(g->bw);
-}
-
-
-/**
- * Handle Mouse_Click events in a browser window. This should never see
- * Menu clicks, as these will be routed to the menu handlers.
- *
- * \param *pointer details of mouse click
- * \return true if click handled, false otherwise
- */
-
-bool ro_gui_window_click(wimp_pointer *pointer)
-{
- struct gui_window *g;
- os_coord pos;
-
- /* We should never see Menu clicks. */
-
- if (pointer->buttons == wimp_CLICK_MENU)
- return false;
-
- g = (struct gui_window *) ro_gui_wimp_event_get_user_data(pointer->w);
-
- /* try to close url-completion */
- ro_gui_url_complete_close();
-
- /* set input focus */
- if (pointer->buttons & (wimp_SINGLE_SELECT | wimp_SINGLE_ADJUST))
- gui_window_place_caret(g, -100, -100, 0, NULL);
-
- if (ro_gui_window_to_window_pos(g, pointer->pos.x, pointer->pos.y, &pos))
- browser_window_mouse_click(g->bw,
- ro_gui_mouse_click_state(pointer->buttons,
- wimp_BUTTON_DOUBLE_CLICK_DRAG),
- pos.x, pos.y);
-
- return true;
-}
-
-
-/**
- * Process Key_Pressed events in a browser window.
- *
- * \param *key The wimp keypress block for the event.
- * \return true if the event was handled, else false.
- */
-
-bool ro_gui_window_keypress(wimp_key *key)
-{
- struct gui_window *g;
- uint32_t c = (uint32_t) key->c;
-
- g = (struct gui_window *) ro_gui_wimp_event_get_user_data(key->w);
- if (g == NULL)
- return false;
-
- /* First send the key to the browser window, eg. form fields. */
-
- if ((unsigned)c < 0x20 || (0x7f <= c && c <= 0x9f) ||
- (c & IS_WIMP_KEY)) {
- /* Munge control keys into unused control chars */
- /* We can't map onto 1->26 (reserved for ctrl+<qwerty>
- That leaves 27->31 and 128->159 */
- switch (c & ~IS_WIMP_KEY) {
- case wimp_KEY_TAB: c = 9; break;
- case wimp_KEY_SHIFT | wimp_KEY_TAB: c = 11; break;
-
- /* cursor movement keys */
- case wimp_KEY_HOME:
- case wimp_KEY_CONTROL | wimp_KEY_LEFT:
- c = NS_KEY_LINE_START;
- break;
- case wimp_KEY_END:
- if (os_version >= RISCOS5)
- c = NS_KEY_LINE_END;
- else
- c = NS_KEY_DELETE_RIGHT;
- break;
- case wimp_KEY_CONTROL | wimp_KEY_RIGHT: c = NS_KEY_LINE_END; break;
- case wimp_KEY_CONTROL | wimp_KEY_UP: c = NS_KEY_TEXT_START; break;
- case wimp_KEY_CONTROL | wimp_KEY_DOWN: c = NS_KEY_TEXT_END; break;
- case wimp_KEY_SHIFT | wimp_KEY_LEFT: c = NS_KEY_WORD_LEFT ; break;
- case wimp_KEY_SHIFT | wimp_KEY_RIGHT: c = NS_KEY_WORD_RIGHT; break;
- case wimp_KEY_SHIFT | wimp_KEY_UP: c = NS_KEY_PAGE_UP; break;
- case wimp_KEY_SHIFT | wimp_KEY_DOWN: c = NS_KEY_PAGE_DOWN; break;
- case wimp_KEY_LEFT: c = NS_KEY_LEFT; break;
- case wimp_KEY_RIGHT: c = NS_KEY_RIGHT; break;
- case wimp_KEY_UP: c = NS_KEY_UP; break;
- case wimp_KEY_DOWN: c = NS_KEY_DOWN; break;
-
- /* editing */
- case wimp_KEY_CONTROL | wimp_KEY_END:
- c = NS_KEY_DELETE_LINE_END;
- break;
- case wimp_KEY_DELETE:
- if (ro_gui_ctrl_pressed())
- c = NS_KEY_DELETE_LINE_START;
- else if (os_version < RISCOS5)
- c = NS_KEY_DELETE_LEFT;
- break;
-
- case wimp_KEY_F8:
- c = NS_KEY_UNDO;
- break;
- case wimp_KEY_F9:
- c = NS_KEY_REDO;
- break;
-
- default:
- break;
- }
- }
-
- if (!(c & IS_WIMP_KEY)) {
- if (browser_window_key_press(g->bw, c))
- return true;
- }
-
- return ro_gui_window_handle_local_keypress(g, key, false);
-}
-
-
-/**
- * Callback handler for keypresses within browser window toolbars.
- *
- * \param *data Client data, pointing to the GUI Window.
- * \param *key The keypress data.
- * \return true if the keypress was handled; else false.
- */
-
-bool ro_gui_window_toolbar_keypress(void *data, wimp_key *key)
-{
- struct gui_window *g = (struct gui_window *) data;
-
- if (g != NULL)
- return ro_gui_window_handle_local_keypress(g, key, true);
-
- return false;
-}
-
-
-/**
- * Handle keypresses within the RISC OS GUI: this is to be called after the
- * core has been given a chance to act, or on keypresses in the toolbar where
- * the core doesn't get involved.
- *
- * \param *g The gui window to which the keypress applies.
- * \param *key The keypress data.
- * \param is_toolbar true if the keypress is from a toolbar;
- * else false.
- * \return true if the keypress was claimed; else false.
- */
-
-bool ro_gui_window_handle_local_keypress(struct gui_window *g, wimp_key *key,
- bool is_toolbar)
-{
- struct browser_window_features cont;
- os_error *ro_error;
- wimp_pointer pointer;
- os_coord pos;
- float scale;
- uint32_t c = (uint32_t) key->c;
- wimp_scroll_direction xscroll = wimp_SCROLL_NONE;
- wimp_scroll_direction yscroll = wimp_SCROLL_NONE;
- nsurl *url;
-
- if (g == NULL)
- return false;
-
- ro_error = xwimp_get_pointer_info(&pointer);
- if (ro_error) {
- LOG("xwimp_get_pointer_info: 0x%x: %s\n", ro_error->errnum, ro_error->errmess);
- ro_warn_user("WimpError", ro_error->errmess);
- return false;
- }
-
- if (!ro_gui_window_to_window_pos(g, pointer.pos.x, pointer.pos.y, &pos))
- return false;
-
- browser_window_get_features(g->bw, pos.x, pos.y, &cont);
-
- switch (c) {
- case IS_WIMP_KEY + wimp_KEY_F1: /* Help. */
- {
- nserror error = nsurl_create(
- "http://www.netsurf-browser.org/documentation/",
- &url);
- if (error == NSERROR_OK) {
- error = browser_window_create(BW_CREATE_HISTORY,
- url,
- NULL,
- NULL,
- NULL);
- nsurl_unref(url);
- }
- if (error != NSERROR_OK) {
- ro_warn_user(messages_get_errorcode(error), 0);
- }
- return true;
- }
- case IS_WIMP_KEY + wimp_KEY_CONTROL + wimp_KEY_F1:
- ro_gui_window_action_page_info(g);
- return true;
-
- case IS_WIMP_KEY + wimp_KEY_F2:
- if (g->toolbar == NULL)
- return false;
- ro_gui_url_complete_close();
- ro_toolbar_set_url(g->toolbar, "www.", true, true);
- ro_gui_url_complete_start(g->toolbar);
- ro_gui_url_complete_keypress(g->toolbar, wimp_KEY_DOWN);
- return true;
-
- case IS_WIMP_KEY + wimp_KEY_CONTROL + wimp_KEY_F2:
- /* Close window. */
- ro_gui_url_complete_close();
- gui_window_set_pointer(g, GUI_POINTER_DEFAULT);
- browser_window_destroy(g->bw);
- return true;
-
- case 19: /* Ctrl + S */
- case IS_WIMP_KEY + wimp_KEY_F3:
- ro_gui_window_action_save(g, GUI_SAVE_SOURCE);
- return true;
+ case 19: /* Ctrl + S */
+ case IS_WIMP_KEY + wimp_KEY_F3:
+ ro_gui_window_action_save(g, GUI_SAVE_SOURCE);
+ return true;
case IS_WIMP_KEY + wimp_KEY_CONTROL + wimp_KEY_F3:
ro_gui_window_action_save(g, GUI_SAVE_TEXT);
@@ -2102,539 +1464,1041 @@ bool ro_gui_window_handle_local_keypress(struct gui_window *g, wimp_key *key,
/**
- * Prepare the browser window menu for (re-)opening
+ * Callback handler for keypresses within browser window toolbars.
*
- * \param w The window owning the menu.
- * \param i The icon owning the menu.
- * \param *menu The menu about to be opened.
- * \param *pointer Pointer to the relevant wimp event block, or
- * NULL for an Adjust click.
- * \return true if the event was handled; else false.
+ * \param data Client data, pointing to the GUI Window.
+ * \param key The keypress data.
+ * \return true if the keypress was handled; else false.
*/
-
-bool ro_gui_window_menu_prepare(wimp_w w, wimp_i i, wimp_menu *menu,
- wimp_pointer *pointer)
+static bool ro_gui_window_toolbar_keypress(void *data, wimp_key *key)
{
- struct gui_window *g;
- struct browser_window *bw;
- struct toolbar *toolbar;
- struct browser_window_features cont;
- bool export_sprite, export_draw, have_content;
- os_coord pos;
- browser_editor_flags editor_flags;
-
- g = (struct gui_window *) ro_gui_wimp_event_get_user_data(w);
- toolbar = g->toolbar;
- bw = g->bw;
- have_content = browser_window_has_content(g->bw);
- editor_flags = browser_window_get_editor_flags(bw);
-
- /* If this is the form select menu, handle it now and then exit.
- * Otherwise, carry on to the main browser window menu.
- */
+ struct gui_window *g = (struct gui_window *) data;
- if (menu == gui_form_select_menu) {
- return ro_gui_window_prepare_form_select_menu(g,
- gui_form_select_control);
+ if (g != NULL) {
+ return ro_gui_window_handle_local_keypress(g, key, true);
}
- if (menu != ro_gui_browser_window_menu)
- return false;
-
- /* If this is a new opening for the browser window menu (ie. not for a
- * toolbar menu), get details of the object under the pointer.
- */
+ return false;
+}
- if (pointer != NULL && g->window == w) {
- ro_gui_url_complete_close();
- current_menu_main = NULL;
- current_menu_object = NULL;
- current_menu_url = NULL;
-
- if (ro_gui_window_to_window_pos(g, pointer->pos.x,
- pointer->pos.y, &pos)) {
- browser_window_get_features(bw, pos.x, pos.y, &cont);
+/**
+ * Save a new toolbar button configuration
+ *
+ * used as a callback by the toolbar module when a buttonbar edit has
+ * finished.
+ *
+ * \param data void pointer to the window's gui_window struct
+ * \param config pointer to a malloc()'d button config string.
+ */
+static void ro_gui_window_save_toolbar_buttons(void *data, char *config)
+{
+ nsoption_set_charp(toolbar_browser, config);
+ ro_gui_save_options();
+}
- current_menu_main = cont.main;
- current_menu_object = cont.object;
- current_menu_url = cont.link;
- }
- }
- /* Shade menu entries according to the state of the window and object
- * under the pointer.
- */
+/**
+ * toolbar callbacks for a browser window.
+ */
+static const struct toolbar_callbacks ro_gui_window_toolbar_callbacks = {
+ ro_gui_window_update_theme,
+ ro_gui_window_update_toolbar,
+ (void (*)(void *)) ro_gui_window_update_toolbar_buttons,
+ ro_gui_window_toolbar_click,
+ ro_gui_window_toolbar_keypress,
+ ro_gui_window_save_toolbar_buttons
+};
- /* Toolbar (Sub)Menu */
- ro_gui_menu_set_entry_shaded(menu, TOOLBAR_BUTTONS,
- ro_toolbar_menu_option_shade(toolbar));
- ro_gui_menu_set_entry_ticked(menu, TOOLBAR_BUTTONS,
- ro_toolbar_menu_buttons_tick(toolbar));
+/**
+ * Handle wimp closing event
+ *
+ * \param w The window handle the event occoured on
+ */
+static void ro_gui_window_close(wimp_w w)
+{
+ struct gui_window *g;
+ wimp_pointer pointer;
+ os_error *error;
+ char *temp_name;
+ char *filename = NULL;
+ struct nsurl *url;
+ bool destroy;
- ro_gui_menu_set_entry_shaded(menu, TOOLBAR_ADDRESS_BAR,
- ro_toolbar_menu_edit_shade(toolbar));
- ro_gui_menu_set_entry_ticked(menu, TOOLBAR_ADDRESS_BAR,
- ro_toolbar_menu_url_tick(toolbar));
+ error = xwimp_get_pointer_info(&pointer);
+ if (error) {
+ LOG("xwimp_get_pointer_info: 0x%x: %s",
+ error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ return;
+ }
- ro_gui_menu_set_entry_shaded(menu, TOOLBAR_THROBBER,
- ro_toolbar_menu_edit_shade(toolbar));
- ro_gui_menu_set_entry_ticked(menu, TOOLBAR_THROBBER,
- ro_toolbar_menu_throbber_tick(toolbar));
+ g = (struct gui_window *)ro_gui_wimp_event_get_user_data(w);
- ro_gui_menu_set_entry_shaded(menu, TOOLBAR_EDIT,
- ro_toolbar_menu_edit_shade(toolbar));
- ro_gui_menu_set_entry_ticked(menu, TOOLBAR_EDIT,
- ro_toolbar_menu_edit_tick(toolbar));
+ if (pointer.buttons & wimp_CLICK_ADJUST) {
+ destroy = !ro_gui_shift_pressed();
- /* Page Submenu */
+ url = browser_window_get_url(g->bw);
+ if (url != NULL) {
+ netsurf_nsurl_to_path(url, &filename);
+ }
+ if (filename != NULL) {
+ temp_name = malloc(strlen(filename) + 32);
+ if (temp_name) {
+ char *r;
+ sprintf(temp_name, "Filer_OpenDir %s",
+ filename);
+ r = temp_name + strlen(temp_name);
+ while (r > temp_name) {
+ if (*r == '.') {
+ *r = '\0';
+ break;
+ }
+ r--;
+ }
+ error = xos_cli(temp_name);
+ if (error) {
+ LOG("xos_cli: 0x%x: %s", error->errnum, error->errmess);
+ ro_warn_user("MiscError", error->errmess);
+ return;
+ }
+ free(temp_name);
+ }
+ free(filename);
+ } else {
+ /* this is pointless if we are about to close the
+ * window */
+ if (!destroy && url != NULL)
+ browser_window_navigate_up(g->bw, false);
+ }
+ } else {
+ destroy = true;
+ }
- ro_gui_menu_set_entry_shaded(menu, BROWSER_PAGE,
- !browser_window_can_search(bw));
+ if (destroy) {
+ browser_window_destroy(g->bw);
+ }
+}
- ro_gui_menu_set_entry_shaded(menu, BROWSER_PAGE_INFO, !have_content);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_PRINT, !have_content);
+/**
+ * Handle a Redraw_Window_Request for a browser window.
+ *
+ * \param redraw The redraw event
+ */
+static void ro_gui_window_redraw(wimp_draw *redraw)
+{
+ osbool more;
+ struct gui_window *g;
+ os_error *error;
+ struct redraw_context ctx = {
+ .interactive = true,
+ .background_images = true,
+ .plot = &ro_plotters
+ };
- ro_gui_menu_set_entry_shaded(menu, BROWSER_NEW_WINDOW, !have_content);
+ g = (struct gui_window *)ro_gui_wimp_event_get_user_data(redraw->w);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_FIND_TEXT,
- !browser_window_can_search(bw));
+ /* We cannot render locked contents. If the browser window is not
+ * ready for redraw, do nothing. Else, in the case of buffered
+ * rendering we'll show random data. */
+ if (!browser_window_redraw_ready(g->bw)) {
+ return;
+ }
+ ro_gui_current_redraw_gui = g;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_VIEW_SOURCE, !have_content);
+ error = xwimp_redraw_window(redraw, &more);
+ if (error) {
+ LOG("xwimp_redraw_window: 0x%x: %s", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ return;
+ }
+ while (more) {
+ struct rect clip;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_SAVE_URL_URI, !have_content);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_SAVE_URL_URL, !have_content);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_SAVE_URL_TEXT,
- !have_content);
+ /* OS's redraw request coordinates are in screen coordinates,
+ * with an origin at the bottom left of the screen.
+ * Find the coordinate of the top left of the document in terms
+ * of OS screen coordinates.
+ * NOTE: OS units are 2 per px. */
+ ro_plot_origin_x = redraw->box.x0 - redraw->xscroll;
+ ro_plot_origin_y = redraw->box.y1 - redraw->yscroll;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_SAVE, !have_content);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_SAVE_COMPLETE,
- !have_content);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_EXPORT_DRAW, !have_content);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_EXPORT_PDF, !have_content);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_EXPORT_TEXT, !have_content);
+ /* Convert OS redraw rectangle request coordinates into NetSurf
+ * coordinates. NetSurf coordinates have origin at top left of
+ * document and units are in px. */
+ clip.x0 = (redraw->clip.x0 - ro_plot_origin_x) / 2; /* left */
+ clip.y0 = (ro_plot_origin_y - redraw->clip.y1) / 2; /* top */
+ clip.x1 = (redraw->clip.x1 - ro_plot_origin_x) / 2; /* right */
+ clip.y1 = (ro_plot_origin_y - redraw->clip.y0) / 2; /* bottom */
- ro_gui_menu_set_entry_shaded(menu, BROWSER_LINK_SAVE_URI,
- !current_menu_url);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_LINK_SAVE_URL,
- !current_menu_url);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_LINK_SAVE_TEXT,
- !current_menu_url);
+ if (ro_gui_current_redraw_gui->option.buffer_everything)
+ ro_gui_buffer_open(redraw);
+ browser_window_redraw(g->bw, 0, 0, &clip, &ctx);
+ if (ro_gui_current_redraw_gui->option.buffer_everything)
+ ro_gui_buffer_close();
- /* Object Submenu */
+ /* Check to see if there are more rectangles to draw and
+ * get next one */
+ error = xwimp_get_rectangle(redraw, &more);
+ /* RISC OS 3.7 returns an error here if enough buffer was
+ claimed to cause a new dynamic area to be created. It
+ doesn't actually stop anything working, so we mask it out
+ for now until a better fix is found. This appears to be a
+ bug in RISC OS. */
+ if (error && !(ro_gui_current_redraw_gui->
+ option.buffer_everything &&
+ error->errnum == error_WIMP_GET_RECT)) {
+ LOG("xwimp_get_rectangle: 0x%x: %s", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ ro_gui_current_redraw_gui = NULL;
+ return;
+ }
+ }
+ ro_gui_current_redraw_gui = NULL;
+}
- ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT,
- current_menu_object == NULL &&
- current_menu_url == NULL);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_LINK,
- current_menu_url == NULL);
+/**
+ * Process Scroll_Request events in a browser window.
+ *
+ * \param scroll The wimp scroll event data block.
+ */
+static void ro_gui_window_scroll(wimp_scroll *scroll)
+{
+ struct gui_window *g = ro_gui_window_lookup(scroll->w);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_INFO,
- current_menu_object == NULL);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_RELOAD,
- current_menu_object == NULL);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_OBJECT,
- current_menu_object == NULL);
+ if (g && browser_window_has_content(g->bw) && ro_gui_shift_pressed()) {
+ /* extended scroll request with shift held down; change zoom */
+ float scale, inc;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_PRINT, true);
- /* Not yet implemented */
+ if (scroll->ymin & 3)
+ inc = 0.02; /* RO5 sends the msg 5 times;
+ * don't ask me why
+ *
+ * @todo this is liable to break if
+ * HID is configured optimally for
+ * frame scrolling. *5 appears to be
+ * an artifact of non-HID mode scrolling.
+ */
+ else
+ inc = (1 << (ABS(scroll->ymin)>>2)) / 20.0F;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_SAVE,
- current_menu_object == NULL);
+ if (scroll->ymin > 0) {
+ scale = g->scale + inc;
+ if (scale > scale_snap_to[SCALE_SNAP_TO_SIZE - 1])
+ scale = scale_snap_to[SCALE_SNAP_TO_SIZE - 1];
+ } else {
+ scale = g->scale - inc;
+ if (scale < scale_snap_to[0])
+ scale = scale_snap_to[0];
+ }
+ if (g->scale != scale)
+ ro_gui_window_set_scale(g, scale);
+ } else if (g != NULL) {
+ ro_gui_window_scroll_action(g, scroll->xmin, scroll->ymin);
+ }
+}
- ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_SAVE_URL_URI,
- current_menu_object == NULL);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_SAVE_URL_URL,
- current_menu_object == NULL);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_SAVE_URL_TEXT,
- current_menu_object == NULL);
- if (current_menu_object != NULL)
- ro_gui_window_content_export_types(current_menu_object,
- &export_draw, &export_sprite);
- else
- ro_gui_window_content_export_types(
- browser_window_get_content(bw),
- &export_draw, &export_sprite);
+/**
+ * Process Pointer Leaving Window events in a browser window.
+ *
+ * These arrive via the termination callback handler from ro_mouse's
+ * mouse tracking.
+ *
+ * \param leaving The wimp pointer leaving event data block.
+ * \param data The GUI window that the pointer is leaving.
+ */
+static void ro_gui_window_track_end(wimp_leaving *leaving, void *data)
+{
+ struct gui_window *g = (struct gui_window *)data;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_EXPORT,
- (!have_content && current_menu_object == NULL)
- || !(export_sprite || export_draw));
+ if (g != NULL) {
+ gui_window_set_pointer(g, GUI_POINTER_DEFAULT);
+ }
+}
- ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_EXPORT_SPRITE,
- (!have_content && current_menu_object == NULL)
- || !export_sprite);
- ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_EXPORT_DRAW,
- (!have_content && current_menu_object == NULL)
- || !export_draw);
+/**
+ * Process Pointer Entering Window events in a browser window.
+ *
+ * \param entering The wimp pointer entering event data block.
+ */
+static void ro_gui_window_pointer_entering(wimp_entering *entering)
+{
+ struct gui_window *g = ro_gui_window_lookup(entering->w);
+
+ if (g != NULL) {
+ ro_mouse_track_start(ro_gui_window_track_end,
+ ro_gui_window_mouse_at,
+ g);
+ }
+}
- /* Selection Submenu */
+/**
+ * Process Key_Pressed events in a browser window.
+ *
+ * \param key The wimp keypress block for the event.
+ * \return true if the event was handled, else false.
+ */
+static bool ro_gui_window_keypress(wimp_key *key)
+{
+ struct gui_window *g;
+ uint32_t c = (uint32_t) key->c;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_SELECTION,
- !browser_window_can_select(bw));
+ g = (struct gui_window *) ro_gui_wimp_event_get_user_data(key->w);
+ if (g == NULL) {
+ return false;
+ }
- ro_gui_menu_set_entry_shaded(menu, BROWSER_SELECTION_SAVE,
- ~editor_flags & BW_EDITOR_CAN_COPY);
+ /* First send the key to the browser window, eg. form fields. */
- ro_gui_menu_set_entry_shaded(menu, BROWSER_SELECTION_COPY,
- ~editor_flags & BW_EDITOR_CAN_COPY);
+ if ((unsigned)c < 0x20 ||
+ (0x7f <= c && c <= 0x9f) ||
+ (c & IS_WIMP_KEY)) {
+ /* Munge control keys into unused control chars */
+ /* We can't map onto 1->26 (reserved for ctrl+<qwerty>
+ That leaves 27->31 and 128->159 */
+ switch (c & ~IS_WIMP_KEY) {
+ case wimp_KEY_TAB:
+ c = 9;
+ break;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_SELECTION_CUT,
- ~editor_flags & BW_EDITOR_CAN_CUT);
+ case wimp_KEY_SHIFT | wimp_KEY_TAB:
+ c = 11;
+ break;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_SELECTION_PASTE,
- ~editor_flags & BW_EDITOR_CAN_PASTE);
+ /* cursor movement keys */
+ case wimp_KEY_HOME:
+ case wimp_KEY_CONTROL | wimp_KEY_LEFT:
+ c = NS_KEY_LINE_START;
+ break;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_SELECTION_CLEAR,
- ~editor_flags & BW_EDITOR_CAN_COPY);
+ case wimp_KEY_END:
+ if (os_version >= RISCOS5) {
+ c = NS_KEY_LINE_END;
+ } else {
+ c = NS_KEY_DELETE_RIGHT;
+ }
+ break;
+ case wimp_KEY_CONTROL | wimp_KEY_RIGHT:
+ c = NS_KEY_LINE_END;
+ break;
- /* Navigate Submenu */
+ case wimp_KEY_CONTROL | wimp_KEY_UP:
+ c = NS_KEY_TEXT_START;
+ break;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_NAVIGATE_BACK,
- !browser_window_back_available(bw));
+ case wimp_KEY_CONTROL | wimp_KEY_DOWN:
+ c = NS_KEY_TEXT_END;
+ break;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_NAVIGATE_FORWARD,
- !browser_window_forward_available(bw));
+ case wimp_KEY_SHIFT | wimp_KEY_LEFT:
+ c = NS_KEY_WORD_LEFT ;
+ break;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_NAVIGATE_RELOAD_ALL,
- !browser_window_reload_available(bw));
+ case wimp_KEY_SHIFT | wimp_KEY_RIGHT:
+ c = NS_KEY_WORD_RIGHT;
+ break;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_NAVIGATE_STOP,
- !browser_window_stop_available(bw));
+ case wimp_KEY_SHIFT | wimp_KEY_UP:
+ c = NS_KEY_PAGE_UP;
+ break;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_NAVIGATE_UP,
- !browser_window_up_available(bw));
+ case wimp_KEY_SHIFT | wimp_KEY_DOWN:
+ c = NS_KEY_PAGE_DOWN;
+ break;
+ case wimp_KEY_LEFT:
+ c = NS_KEY_LEFT;
+ break;
+ case wimp_KEY_RIGHT:
+ c = NS_KEY_RIGHT;
+ break;
- /* View Submenu */
+ case wimp_KEY_UP:
+ c = NS_KEY_UP;
+ break;
- ro_gui_menu_set_entry_ticked(menu, BROWSER_IMAGES_FOREGROUND,
- g != NULL && nsoption_bool(foreground_images));
+ case wimp_KEY_DOWN:
+ c = NS_KEY_DOWN;
+ break;
- ro_gui_menu_set_entry_ticked(menu, BROWSER_IMAGES_BACKGROUND,
- g != NULL && nsoption_bool(background_images));
+ /* editing */
+ case wimp_KEY_CONTROL | wimp_KEY_END:
+ c = NS_KEY_DELETE_LINE_END;
+ break;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_BUFFER_ANIMS,
- g == NULL || g->option.buffer_everything);
- ro_gui_menu_set_entry_ticked(menu, BROWSER_BUFFER_ANIMS, g != NULL &&
- (g->option.buffer_animations ||
- g->option.buffer_everything));
+ case wimp_KEY_DELETE:
+ if (ro_gui_ctrl_pressed()) {
+ c = NS_KEY_DELETE_LINE_START;
+ } else if (os_version < RISCOS5) {
+ c = NS_KEY_DELETE_LEFT;
+ }
+ break;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_BUFFER_ALL, g == NULL);
- ro_gui_menu_set_entry_ticked(menu, BROWSER_BUFFER_ALL,
- g != NULL && g->option.buffer_everything);
+ case wimp_KEY_F8:
+ c = NS_KEY_UNDO;
+ break;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_SCALE_VIEW, !have_content);
+ case wimp_KEY_F9:
+ c = NS_KEY_REDO;
+ break;
- ro_gui_menu_set_entry_shaded(menu, BROWSER_WINDOW_STAGGER,
- nsoption_int(window_screen_width) == 0);
- ro_gui_menu_set_entry_ticked(menu, BROWSER_WINDOW_STAGGER,
- ((nsoption_int(window_screen_width) == 0) ||
- nsoption_bool(window_stagger)));
+ default:
+ break;
+ }
+ }
- ro_gui_menu_set_entry_ticked(menu, BROWSER_WINDOW_COPY,
- nsoption_bool(window_size_clone));
+ if (!(c & IS_WIMP_KEY)) {
+ if (browser_window_key_press(g->bw, c)) {
+ return true;
+ }
+ }
- ro_gui_menu_set_entry_shaded(menu, BROWSER_WINDOW_RESET,
- nsoption_int(window_screen_width) == 0);
+ return ro_gui_window_handle_local_keypress(g, key, false);
+}
- /* Utilities Submenu */
+/**
+ * Handle Mouse_Click events in a browser window.
+ *
+ * This should never see Menu clicks, as these will be routed to the
+ * menu handlers.
+ *
+ * \param pointer details of mouse click
+ * \return true if click handled, false otherwise
+ */
+static bool ro_gui_window_click(wimp_pointer *pointer)
+{
+ struct gui_window *g;
+ os_coord pos;
- ro_gui_menu_set_entry_shaded(menu, HOTLIST_ADD_URL, !have_content);
+ /* We should never see Menu clicks. */
- ro_gui_menu_set_entry_shaded(menu, HISTORY_SHOW_LOCAL,
- (bw == NULL ||
- !(have_content || browser_window_back_available(bw) ||
- browser_window_forward_available(bw))));
+ if (pointer->buttons == wimp_CLICK_MENU) {
+ return false;
+ }
+ g = (struct gui_window *) ro_gui_wimp_event_get_user_data(pointer->w);
- /* Help Submenu */
+ /* try to close url-completion */
+ ro_gui_url_complete_close();
- ro_gui_menu_set_entry_ticked(menu, HELP_LAUNCH_INTERACTIVE,
- ro_gui_interactive_help_available() &&
- nsoption_bool(interactive_help));
+ /* set input focus */
+ if (pointer->buttons & (wimp_SINGLE_SELECT | wimp_SINGLE_ADJUST))
+ gui_window_place_caret(g, -100, -100, 0, NULL);
+
+ if (ro_gui_window_to_window_pos(g, pointer->pos.x, pointer->pos.y, &pos)) {
+ browser_window_mouse_click(g->bw,
+ ro_gui_mouse_click_state(pointer->buttons,
+ wimp_BUTTON_DOUBLE_CLICK_DRAG),
+ pos.x, pos.y);
+ }
return true;
}
/**
- * Handle submenu warnings for a browser window menu
+ * Prepare or reprepare a form select menu
+ *
+ * setting up the menu handle globals in the process.
*
- * \param w The window owning the menu.
- * \param i The icon owning the menu.
- * \param *menu The menu to which the warning applies.
- * \param *selection The wimp menu selection data.
- * \param action The selected menu action.
+ * \param g The RISC OS gui window the menu is in.
+ * \param control The form control needing a menu.
+ * \return true if the menu is OK to be opened; else false.
*/
-
-void ro_gui_window_menu_warning(wimp_w w, wimp_i i, wimp_menu *menu,
- wimp_selection *selection, menu_action action)
+static bool
+ro_gui_window_prepare_form_select_menu(struct gui_window *g,
+ struct form_control *control)
{
- struct gui_window *g;
- struct hlcache_handle *h;
- bool export;
-
- if (menu != ro_gui_browser_window_menu)
- return;
+ unsigned int item, entries;
+ char *text_convert, *temp;
+ struct form_option *option;
+ bool reopen = true;
+ nserror err;
- g = (struct gui_window *) ro_gui_wimp_event_get_user_data(w);
- h = browser_window_get_content(g->bw);
+ assert(control);
- switch (action) {
- case BROWSER_PAGE_INFO:
- if (h != NULL)
- ro_gui_window_prepare_pageinfo(g);
- break;
+ /* enumerate the entries */
+ entries = 0;
+ option = form_select_get_option(control, entries);
+ while (option != NULL) {
+ entries++;
+ option = form_select_get_option(control, entries);
+ }
- case BROWSER_FIND_TEXT:
- if (h != NULL && (content_get_type(h) == CONTENT_HTML ||
- content_get_type(h) == CONTENT_TEXTPLAIN))
- ro_gui_search_prepare(g->bw);
- break;
+ if (entries == 0) {
+ /* no menu to display */
+ ro_gui_menu_destroy();
+ return false;
+ }
- case BROWSER_SCALE_VIEW:
- if (h != NULL)
- ro_gui_dialog_prepare_zoom(g);
- break;
+ /* free riscos menu if there already is one */
+ if ((gui_form_select_menu) && (control != gui_form_select_control)) {
+ for (item = 0; ; item++) {
+ free(gui_form_select_menu->entries[item].data.
+ indirected_text.text);
+ if (gui_form_select_menu->entries[item].menu_flags &
+ wimp_MENU_LAST)
+ break;
+ }
+ free(gui_form_select_menu->title_data.indirected_text.text);
+ free(gui_form_select_menu);
+ gui_form_select_menu = 0;
+ }
- case BROWSER_PRINT:
- if (h != NULL)
- ro_gui_print_prepare(g);
- break;
+ /* allocate new riscos menu */
+ if (!gui_form_select_menu) {
+ reopen = false;
+ gui_form_select_menu = malloc(wimp_SIZEOF_MENU(entries));
+ if (!gui_form_select_menu) {
+ ro_warn_user("NoMemory", 0);
+ ro_gui_menu_destroy();
+ return false;
+ }
+ err = utf8_to_local_encoding(messages_get("SelectMenu"), 0,
+ &text_convert);
+ if (err != NSERROR_OK) {
+ /* badenc should never happen */
+ assert(err != NSERROR_BAD_ENCODING);
+ LOG("utf8_to_local_encoding failed");
+ ro_warn_user("NoMemory", 0);
+ ro_gui_menu_destroy();
+ return false;
+ }
+ gui_form_select_menu->title_data.indirected_text.text =
+ text_convert;
+ ro_gui_menu_init_structure(gui_form_select_menu, entries);
+ }
- case BROWSER_OBJECT_INFO:
- if (current_menu_object != NULL)
- ro_gui_window_prepare_objectinfo(current_menu_object,
- current_menu_url);
- break;
+ /* initialise menu entries from form control */
+ for (item = 0; item < entries; item++) {
+ option = form_select_get_option(control, item);
+ gui_form_select_menu->entries[item].menu_flags = 0;
+ if (option->selected)
+ gui_form_select_menu->entries[item].menu_flags =
+ wimp_MENU_TICKED;
+ if (!reopen) {
- case BROWSER_OBJECT_SAVE:
- if (current_menu_object != NULL)
- ro_gui_save_prepare(GUI_SAVE_OBJECT_ORIG,
- current_menu_object, NULL, NULL, NULL);
- break;
-
- case BROWSER_SELECTION_SAVE:
- if (browser_window_get_editor_flags(g->bw) & BW_EDITOR_CAN_COPY)
- ro_gui_save_prepare(GUI_SAVE_TEXT_SELECTION, NULL,
- browser_window_get_selection(g->bw),
- NULL, NULL);
- break;
-
- case BROWSER_SAVE_URL_URI:
- if (h != NULL)
- ro_gui_save_prepare(GUI_SAVE_LINK_URI, NULL, NULL,
- hlcache_handle_get_url(h),
- content_get_title(h));
- break;
-
- case BROWSER_SAVE_URL_URL:
- if (h != NULL)
- ro_gui_save_prepare(GUI_SAVE_LINK_URL, NULL, NULL,
- hlcache_handle_get_url(h),
- content_get_title(h));
- break;
-
- case BROWSER_SAVE_URL_TEXT:
- if (h != NULL)
- ro_gui_save_prepare(GUI_SAVE_LINK_TEXT, NULL, NULL,
- hlcache_handle_get_url(h),
- content_get_title(h));
- break;
-
- case BROWSER_OBJECT_SAVE_URL_URI:
- if (current_menu_object != NULL)
- ro_gui_save_prepare(GUI_SAVE_LINK_URI, NULL, NULL,
- hlcache_handle_get_url(
- current_menu_object),
- content_get_title(current_menu_object));
- break;
-
- case BROWSER_OBJECT_SAVE_URL_URL:
- if (current_menu_object != NULL)
- ro_gui_save_prepare(GUI_SAVE_LINK_URL, NULL, NULL,
- hlcache_handle_get_url(
- current_menu_object),
- content_get_title(current_menu_object));
- break;
-
- case BROWSER_OBJECT_SAVE_URL_TEXT:
- if (current_menu_object != NULL)
- ro_gui_save_prepare(GUI_SAVE_LINK_TEXT, NULL, NULL,
- hlcache_handle_get_url(
- current_menu_object),
- content_get_title(current_menu_object));
- break;
-
- case BROWSER_SAVE:
- if (h != NULL)
- ro_gui_save_prepare(GUI_SAVE_SOURCE, h, NULL, NULL, NULL);
- break;
-
- case BROWSER_SAVE_COMPLETE:
- if (h != NULL)
- ro_gui_save_prepare(GUI_SAVE_COMPLETE, h, NULL, NULL, NULL);
- break;
+ /* convert spaces to hard spaces to stop things
+ * like 'Go Home' being treated as if 'Home' is a
+ * keyboard shortcut and right aligned in the menu.
+ */
- case BROWSER_EXPORT_DRAW:
- if (h != NULL)
- ro_gui_save_prepare(GUI_SAVE_DRAW, h, NULL, NULL, NULL);
- break;
+ temp = cnv_space2nbsp(option->text);
+ if (!temp) {
+ LOG("cnv_space2nbsp failed");
+ ro_warn_user("NoMemory", 0);
+ ro_gui_menu_destroy();
+ return false;
+ }
- case BROWSER_EXPORT_PDF:
- if (h != NULL)
- ro_gui_save_prepare(GUI_SAVE_PDF, h, NULL, NULL, NULL);
- break;
+ err = utf8_to_local_encoding(temp,
+ 0, &text_convert);
+ if (err != NSERROR_OK) {
+ /* A bad encoding should never happen,
+ * so assert this */
+ assert(err != NSERROR_BAD_ENCODING);
+ LOG("utf8_to_enc failed");
+ ro_warn_user("NoMemory", 0);
+ ro_gui_menu_destroy();
+ return false;
+ }
- case BROWSER_EXPORT_TEXT:
- if (h != NULL)
- ro_gui_save_prepare(GUI_SAVE_TEXT, h, NULL, NULL, NULL);
- break;
+ free(temp);
- case BROWSER_LINK_SAVE_URI:
- if (current_menu_url != NULL)
- ro_gui_save_prepare(GUI_SAVE_LINK_URI, NULL, NULL,
- current_menu_url, NULL);
- break;
+ gui_form_select_menu->entries[item].data.indirected_text.text =
+ text_convert;
+ gui_form_select_menu->entries[item].data.indirected_text.size =
+ strlen(gui_form_select_menu->entries[item].
+ data.indirected_text.text) + 1;
+ }
+ }
- case BROWSER_LINK_SAVE_URL:
- if (current_menu_url != NULL)
- ro_gui_save_prepare(GUI_SAVE_LINK_URL, NULL, NULL,
- current_menu_url, NULL);
- break;
+ gui_form_select_menu->entries[0].menu_flags |=
+ wimp_MENU_TITLE_INDIRECTED;
+ gui_form_select_menu->entries[item - 1].menu_flags |= wimp_MENU_LAST;
- case BROWSER_LINK_SAVE_TEXT:
- if (current_menu_url != NULL)
- ro_gui_save_prepare(GUI_SAVE_LINK_TEXT, NULL, NULL,
- current_menu_url, NULL);
- break;
+ return true;
+}
- case BROWSER_OBJECT_EXPORT_SPRITE:
- if (current_menu_object != NULL) {
- ro_gui_window_content_export_types(current_menu_object,
- NULL, &export);
- if (export)
- ro_gui_save_prepare(GUI_SAVE_OBJECT_NATIVE,
- current_menu_object,
- NULL, NULL, NULL);
- } else if (h != NULL) {
- ro_gui_window_content_export_types(h, NULL, &export);
+/**
+ * Return boolean flags to show what RISC OS types we can sensibly convert
+ * the given object into.
+ *
+ * \todo This should probably be somewhere else but in window.c, and
+ * should probably even be done in content_().
+ *
+ * \param h The object to test.
+ * \param export_draw true on exit if a drawfile would be possible.
+ * \param export_sprite true on exit if a sprite would be possible.
+ * \return true if valid data is returned; else false.
+ */
+static bool
+ro_gui_window_content_export_types(struct hlcache_handle *h,
+ bool *export_draw,
+ bool *export_sprite)
+{
+ bool found_type = false;
- if (export)
- ro_gui_save_prepare(GUI_SAVE_OBJECT_NATIVE,
- h, NULL, NULL, NULL);
- }
- break;
+ if (export_draw != NULL) {
+ *export_draw = false;
+ }
+ if (export_sprite != NULL) {
+ *export_sprite = false;
+ }
- case BROWSER_OBJECT_EXPORT_DRAW:
- if (current_menu_object != NULL) {
- ro_gui_window_content_export_types(current_menu_object,
- &export, NULL);
+ if (h != NULL && content_get_type(h) == CONTENT_IMAGE) {
+ switch (ro_content_native_type(h)) {
+ case osfile_TYPE_SPRITE:
+ /* bitmap types (Sprite export possible) */
+ found_type = true;
+ if (export_sprite != NULL) {
+ *export_sprite = true;
+ }
+ break;
- if (export)
- ro_gui_save_prepare(GUI_SAVE_OBJECT_NATIVE,
- current_menu_object,
- NULL, NULL, NULL);
- } else if (h != NULL) {
- ro_gui_window_content_export_types(h, &export, NULL);
+ case osfile_TYPE_DRAW:
+ /* vector types (Draw export possible) */
+ found_type = true;
+ if (export_draw != NULL) {
+ *export_draw = true;
+ }
+ break;
- if (export)
- ro_gui_save_prepare(GUI_SAVE_OBJECT_NATIVE,
- h, NULL, NULL, NULL);
+ default:
+ break;
}
- break;
-
- default:
- break;
}
-}
-
-static void ro_gui_window_paste_cb(void *pw)
-{
- struct browser_window *bw = pw;
-
- browser_window_key_press(bw, NS_KEY_PASTE);
+ return found_type;
}
/**
- * Handle selections from a browser window menu
+ * Prepare the browser window menu for (re-)opening
*
- * \param w The window owning the menu.
- * \param i The icon owning the menu.
- * \param *menu The menu from which the selection was made.
- * \param *selection The wimp menu selection data.
- * \param action The selected menu action.
- * \return true if action accepted; else false.
+ * \param w The window owning the menu.
+ * \param i The icon owning the menu.
+ * \param menu The menu about to be opened.
+ * \param pointer Pointer to the relevant wimp event block, or
+ * NULL for an Adjust click.
+ * \return true if the event was handled; else false.
*/
-
-bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
- wimp_selection *selection, menu_action action)
+static bool
+ro_gui_window_menu_prepare(wimp_w w,
+ wimp_i i,
+ wimp_menu *menu,
+ wimp_pointer *pointer)
{
struct gui_window *g;
struct browser_window *bw;
- struct hlcache_handle *h;
struct toolbar *toolbar;
- wimp_window_state state;
- nsurl *url;
- nserror error = NSERROR_OK;
+ struct browser_window_features cont;
+ bool export_sprite, export_draw, have_content;
+ os_coord pos;
+ browser_editor_flags editor_flags;
g = (struct gui_window *) ro_gui_wimp_event_get_user_data(w);
toolbar = g->toolbar;
bw = g->bw;
- h = browser_window_get_content(bw);
+ have_content = browser_window_has_content(g->bw);
+ editor_flags = browser_window_get_editor_flags(bw);
- /* If this is a form menu from the core, handle it now and then exit.
+ /* If this is the form select menu, handle it now and then exit.
* Otherwise, carry on to the main browser window menu.
*/
- if (menu == gui_form_select_menu && w == g->window) {
- ro_gui_window_process_form_select_menu(g, selection);
+ if (menu == gui_form_select_menu) {
+ return ro_gui_window_prepare_form_select_menu(g,
+ gui_form_select_control);
+ }
- return true;
+ if (menu != ro_gui_browser_window_menu) {
+ return false;
}
- /* We're now safe to assume that this is either the browser or
- * toolbar window menu.
+ /* If this is a new opening for the browser window menu (ie. not for a
+ * toolbar menu), get details of the object under the pointer.
*/
+ if (pointer != NULL && g->window == w) {
+ ro_gui_url_complete_close();
- switch (action) {
+ current_menu_main = NULL;
+ current_menu_object = NULL;
+ current_menu_url = NULL;
- /* help actions */
- case HELP_OPEN_CONTENTS:
- error = nsurl_create("http://www.netsurf-browser.org/documentation/", &url);
- if (error == NSERROR_OK) {
- error = browser_window_create(BW_CREATE_HISTORY,
- url,
- NULL,
- NULL,
- NULL);
- nsurl_unref(url);
+ if (ro_gui_window_to_window_pos(g, pointer->pos.x,
+ pointer->pos.y, &pos)) {
+ browser_window_get_features(bw, pos.x, pos.y, &cont);
+
+ current_menu_main = cont.main;
+ current_menu_object = cont.object;
+ current_menu_url = cont.link;
}
- break;
+ }
- case HELP_OPEN_GUIDE:
- error = nsurl_create("http://www.netsurf-browser.org/documentation/guide", &url);
- if (error == NSERROR_OK) {
- error = browser_window_create(BW_CREATE_HISTORY,
- url,
- NULL,
- NULL,
- NULL);
+ /* Shade menu entries according to the state of the window and object
+ * under the pointer.
+ */
+
+ /* Toolbar (Sub)Menu */
+
+ ro_gui_menu_set_entry_shaded(menu, TOOLBAR_BUTTONS,
+ ro_toolbar_menu_option_shade(toolbar));
+ ro_gui_menu_set_entry_ticked(menu, TOOLBAR_BUTTONS,
+ ro_toolbar_menu_buttons_tick(toolbar));
+
+ ro_gui_menu_set_entry_shaded(menu, TOOLBAR_ADDRESS_BAR,
+ ro_toolbar_menu_edit_shade(toolbar));
+ ro_gui_menu_set_entry_ticked(menu, TOOLBAR_ADDRESS_BAR,
+ ro_toolbar_menu_url_tick(toolbar));
+
+ ro_gui_menu_set_entry_shaded(menu, TOOLBAR_THROBBER,
+ ro_toolbar_menu_edit_shade(toolbar));
+ ro_gui_menu_set_entry_ticked(menu, TOOLBAR_THROBBER,
+ ro_toolbar_menu_throbber_tick(toolbar));
+
+ ro_gui_menu_set_entry_shaded(menu, TOOLBAR_EDIT,
+ ro_toolbar_menu_edit_shade(toolbar));
+ ro_gui_menu_set_entry_ticked(menu, TOOLBAR_EDIT,
+ ro_toolbar_menu_edit_tick(toolbar));
+
+ /* Page Submenu */
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_PAGE,
+ !browser_window_can_search(bw));
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_PAGE_INFO, !have_content);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_PRINT, !have_content);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_NEW_WINDOW, !have_content);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_FIND_TEXT,
+ !browser_window_can_search(bw));
+
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_VIEW_SOURCE, !have_content);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_SAVE_URL_URI, !have_content);
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_SAVE_URL_URL, !have_content);
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_SAVE_URL_TEXT,
+ !have_content);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_SAVE, !have_content);
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_SAVE_COMPLETE,
+ !have_content);
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_EXPORT_DRAW, !have_content);
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_EXPORT_PDF, !have_content);
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_EXPORT_TEXT, !have_content);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_LINK_SAVE_URI,
+ !current_menu_url);
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_LINK_SAVE_URL,
+ !current_menu_url);
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_LINK_SAVE_TEXT,
+ !current_menu_url);
+
+
+
+ /* Object Submenu */
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT,
+ current_menu_object == NULL &&
+ current_menu_url == NULL);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_LINK,
+ current_menu_url == NULL);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_INFO,
+ current_menu_object == NULL);
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_RELOAD,
+ current_menu_object == NULL);
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_OBJECT,
+ current_menu_object == NULL);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_PRINT, true);
+ /* Not yet implemented */
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_SAVE,
+ current_menu_object == NULL);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_SAVE_URL_URI,
+ current_menu_object == NULL);
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_SAVE_URL_URL,
+ current_menu_object == NULL);
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_SAVE_URL_TEXT,
+ current_menu_object == NULL);
+
+ if (current_menu_object != NULL) {
+ ro_gui_window_content_export_types(current_menu_object,
+ &export_draw, &export_sprite);
+ } else {
+ ro_gui_window_content_export_types(
+ browser_window_get_content(bw),
+ &export_draw, &export_sprite);
+ }
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_EXPORT,
+ (!have_content && current_menu_object == NULL)
+ || !(export_sprite || export_draw));
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_EXPORT_SPRITE,
+ (!have_content && current_menu_object == NULL)
+ || !export_sprite);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_OBJECT_EXPORT_DRAW,
+ (!have_content && current_menu_object == NULL)
+ || !export_draw);
+
+
+ /* Selection Submenu */
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_SELECTION,
+ !browser_window_can_select(bw));
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_SELECTION_SAVE,
+ ~editor_flags & BW_EDITOR_CAN_COPY);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_SELECTION_COPY,
+ ~editor_flags & BW_EDITOR_CAN_COPY);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_SELECTION_CUT,
+ ~editor_flags & BW_EDITOR_CAN_CUT);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_SELECTION_PASTE,
+ ~editor_flags & BW_EDITOR_CAN_PASTE);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_SELECTION_CLEAR,
+ ~editor_flags & BW_EDITOR_CAN_COPY);
+
+
+ /* Navigate Submenu */
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_NAVIGATE_BACK,
+ !browser_window_back_available(bw));
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_NAVIGATE_FORWARD,
+ !browser_window_forward_available(bw));
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_NAVIGATE_RELOAD_ALL,
+ !browser_window_reload_available(bw));
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_NAVIGATE_STOP,
+ !browser_window_stop_available(bw));
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_NAVIGATE_UP,
+ !browser_window_up_available(bw));
+
+
+
+ /* View Submenu */
+
+ ro_gui_menu_set_entry_ticked(menu, BROWSER_IMAGES_FOREGROUND,
+ g != NULL && nsoption_bool(foreground_images));
+
+ ro_gui_menu_set_entry_ticked(menu, BROWSER_IMAGES_BACKGROUND,
+ g != NULL && nsoption_bool(background_images));
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_BUFFER_ANIMS,
+ g == NULL || g->option.buffer_everything);
+ ro_gui_menu_set_entry_ticked(menu, BROWSER_BUFFER_ANIMS,
+ g != NULL &&
+ (g->option.buffer_animations ||
+ g->option.buffer_everything));
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_BUFFER_ALL, g == NULL);
+ ro_gui_menu_set_entry_ticked(menu, BROWSER_BUFFER_ALL,
+ g != NULL && g->option.buffer_everything);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_SCALE_VIEW, !have_content);
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_WINDOW_STAGGER,
+ nsoption_int(window_screen_width) == 0);
+ ro_gui_menu_set_entry_ticked(menu, BROWSER_WINDOW_STAGGER,
+ ((nsoption_int(window_screen_width) == 0) ||
+ nsoption_bool(window_stagger)));
+
+ ro_gui_menu_set_entry_ticked(menu, BROWSER_WINDOW_COPY,
+ nsoption_bool(window_size_clone));
+
+ ro_gui_menu_set_entry_shaded(menu, BROWSER_WINDOW_RESET,
+ nsoption_int(window_screen_width) == 0);
+
+
+ /* Utilities Submenu */
+
+ ro_gui_menu_set_entry_shaded(menu, HOTLIST_ADD_URL, !have_content);
+
+ ro_gui_menu_set_entry_shaded(menu, HISTORY_SHOW_LOCAL,
+ (bw == NULL ||
+ !(have_content || browser_window_back_available(bw) ||
+ browser_window_forward_available(bw))));
+
+
+ /* Help Submenu */
+
+ ro_gui_menu_set_entry_ticked(menu, HELP_LAUNCH_INTERACTIVE,
+ ro_gui_interactive_help_available() &&
+ nsoption_bool(interactive_help));
+
+ return true;
+}
+
+
+/**
+ * Process selections from a form select menu, passing them back to the core.
+ *
+ * \param g The browser window affected by the menu.
+ * \param selection The menu selection.
+ */
+static void
+ro_gui_window_process_form_select_menu(struct gui_window *g,
+ wimp_selection *selection)
+{
+ assert(g != NULL);
+
+ if (selection->items[0] >= 0) {
+ form_select_process_selection(gui_form_select_control,
+ selection->items[0]);
+ }
+}
+
+
+/**
+ * Prepare the object info window for use
+ *
+ * \param object the object for which information is to be displayed
+ * \param target_url corresponding url, if any
+ */
+static void
+ro_gui_window_prepare_objectinfo(struct hlcache_handle *object,
+ nsurl *target_url)
+{
+ char icon_buf[20] = "file_xxx";
+ const char *url;
+ lwc_string *mime;
+ const char *target = "-";
+
+ sprintf(icon_buf, "file_%.3x",ro_content_filetype(object));
+ if (!ro_gui_wimp_sprite_exists(icon_buf)) {
+ sprintf(icon_buf, "file_xxx");
+ }
+
+ url = nsurl_access(hlcache_handle_get_url(object));
+ if (url == NULL) {
+ url = "-";
+ }
+ mime = content_get_mime_type(object);
+
+ if (target_url != NULL) {
+ target = nsurl_access(target_url);
+ }
+
+ ro_gui_set_icon_string(dialog_objinfo, ICON_OBJINFO_ICON,
+ icon_buf, true);
+ ro_gui_set_icon_string(dialog_objinfo, ICON_OBJINFO_URL,
+ url, true);
+ ro_gui_set_icon_string(dialog_objinfo, ICON_OBJINFO_TARGET,
+ target, true);
+ ro_gui_set_icon_string(dialog_objinfo, ICON_OBJINFO_TYPE,
+ lwc_string_data(mime), true);
+
+ lwc_string_unref(mime);
+}
+
+
+/**
+ * callback to handle window paste operation
+ *
+ * \param pw context containing browser window
+ */
+static void ro_gui_window_paste_cb(void *pw)
+{
+ struct browser_window *bw = pw;
+
+ browser_window_key_press(bw, NS_KEY_PASTE);
+}
+
+
+/**
+ * Handle selections from a browser window menu
+ *
+ * \param w The window owning the menu.
+ * \param i The icon owning the menu.
+ * \param menu The menu from which the selection was made.
+ * \param selection The wimp menu selection data.
+ * \param action The selected menu action.
+ * \return true if action accepted; else false.
+ */
+static bool
+ro_gui_window_menu_select(wimp_w w,
+ wimp_i i,
+ wimp_menu *menu,
+ wimp_selection *selection,
+ menu_action action)
+{
+ struct gui_window *g;
+ struct browser_window *bw;
+ struct hlcache_handle *h;
+ struct toolbar *toolbar;
+ wimp_window_state state;
+ nsurl *url;
+ nserror error = NSERROR_OK;
+
+ g = (struct gui_window *) ro_gui_wimp_event_get_user_data(w);
+ toolbar = g->toolbar;
+ bw = g->bw;
+ h = browser_window_get_content(bw);
+
+ /* If this is a form menu from the core, handle it now and then exit.
+ * Otherwise, carry on to the main browser window menu.
+ */
+ if (menu == gui_form_select_menu && w == g->window) {
+ ro_gui_window_process_form_select_menu(g, selection);
+
+ return true;
+ }
+
+ /* We're now safe to assume that this is either the browser or
+ * toolbar window menu.
+ */
+
+ switch (action) {
+
+ /* help actions */
+ case HELP_OPEN_CONTENTS:
+ error = nsurl_create("http://www.netsurf-browser.org/documentation/", &url);
+ if (error == NSERROR_OK) {
+ error = browser_window_create(BW_CREATE_HISTORY,
+ url,
+ NULL,
+ NULL,
+ NULL);
+ nsurl_unref(url);
+ }
+ break;
+
+ case HELP_OPEN_GUIDE:
+ error = nsurl_create("http://www.netsurf-browser.org/documentation/guide", &url);
+ if (error == NSERROR_OK) {
+ error = browser_window_create(BW_CREATE_HISTORY,
+ url,
+ NULL,
+ NULL,
+ NULL);
nsurl_unref(url);
}
break;
@@ -2643,10 +2507,10 @@ bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
error = nsurl_create("http://www.netsurf-browser.org/documentation/info", &url);
if (error == NSERROR_OK) {
error = browser_window_create(BW_CREATE_HISTORY,
- url,
- NULL,
- NULL,
- NULL);
+ url,
+ NULL,
+ NULL,
+ NULL);
nsurl_unref(url);
}
break;
@@ -2655,10 +2519,10 @@ bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
error = nsurl_create("about:credits", &url);
if (error == NSERROR_OK) {
error = browser_window_create(BW_CREATE_HISTORY,
- url,
- NULL,
- NULL,
- NULL);
+ url,
+ NULL,
+ NULL,
+ NULL);
nsurl_unref(url);
}
break;
@@ -2667,10 +2531,10 @@ bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
error = nsurl_create("about:licence", &url);
if (error == NSERROR_OK) {
error = browser_window_create(BW_CREATE_HISTORY,
- url,
- NULL,
- NULL,
- NULL);
+ url,
+ NULL,
+ NULL,
+ NULL);
nsurl_unref(url);
}
break;
@@ -2680,7 +2544,8 @@ bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
ro_gui_interactive_help_start();
nsoption_set_bool(interactive_help, true);
} else {
- nsoption_set_bool(interactive_help, !nsoption_bool(interactive_help));
+ nsoption_set_bool(interactive_help,
+ !nsoption_bool(interactive_help));
}
break;
@@ -2732,9 +2597,10 @@ bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
case BROWSER_OBJECT_INFO:
if (current_menu_object != NULL) {
ro_gui_window_prepare_objectinfo(current_menu_object,
- current_menu_url);
+ current_menu_url);
ro_gui_dialog_open_persistent(g->window,
- dialog_objinfo, false);
+ dialog_objinfo,
+ false);
}
break;
case BROWSER_OBJECT_RELOAD:
@@ -2747,50 +2613,62 @@ bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
/* link actions */
case BROWSER_LINK_SAVE_URI:
if (current_menu_url != NULL) {
- ro_gui_save_prepare(GUI_SAVE_LINK_URI, NULL, NULL,
- current_menu_url, NULL);
- ro_gui_dialog_open_persistent(g->window, dialog_saveas,
+ ro_gui_save_prepare(GUI_SAVE_LINK_URI,
+ NULL,
+ NULL,
+ current_menu_url,
+ NULL);
+ ro_gui_dialog_open_persistent(g->window,
+ dialog_saveas,
false);
}
break;
case BROWSER_LINK_SAVE_URL:
if (current_menu_url != NULL) {
- ro_gui_save_prepare(GUI_SAVE_LINK_URL, NULL, NULL,
- current_menu_url, NULL);
- ro_gui_dialog_open_persistent(g->window, dialog_saveas,
+ ro_gui_save_prepare(GUI_SAVE_LINK_URL,
+ NULL,
+ NULL,
+ current_menu_url,
+ NULL);
+ ro_gui_dialog_open_persistent(g->window,
+ dialog_saveas,
false);
}
break;
case BROWSER_LINK_SAVE_TEXT:
if (current_menu_url != NULL) {
- ro_gui_save_prepare(GUI_SAVE_LINK_TEXT, NULL, NULL,
- current_menu_url, NULL);
- ro_gui_dialog_open_persistent(g->window, dialog_saveas,
+ ro_gui_save_prepare(GUI_SAVE_LINK_TEXT,
+ NULL,
+ NULL,
+ current_menu_url,
+ NULL);
+ ro_gui_dialog_open_persistent(g->window,
+ dialog_saveas,
false);
}
break;
case BROWSER_LINK_DOWNLOAD:
if (current_menu_url != NULL) {
- error = browser_window_navigate(bw,
- current_menu_url,
- browser_window_get_url(bw),
- BW_NAVIGATE_DOWNLOAD,
- NULL,
- NULL,
- NULL);
+ error = browser_window_navigate(
+ bw,
+ current_menu_url,
+ browser_window_get_url(bw),
+ BW_NAVIGATE_DOWNLOAD,
+ NULL,
+ NULL,
+ NULL);
}
break;
case BROWSER_LINK_NEW_WINDOW:
if (current_menu_url != NULL) {
error = browser_window_create(
- BW_CREATE_HISTORY |
- BW_CREATE_CLONE,
- current_menu_url,
- browser_window_get_url(bw),
- bw,
- NULL);
+ BW_CREATE_HISTORY | BW_CREATE_CLONE,
+ current_menu_url,
+ browser_window_get_url(bw),
+ bw,
+ NULL);
}
break;
@@ -2799,24 +2677,36 @@ bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
case BROWSER_OBJECT_SAVE:
if (current_menu_object != NULL) {
ro_gui_save_prepare(GUI_SAVE_OBJECT_ORIG,
- current_menu_object, NULL, NULL, NULL);
- ro_gui_dialog_open_persistent(g->window, dialog_saveas,
+ current_menu_object,
+ NULL,
+ NULL,
+ NULL);
+ ro_gui_dialog_open_persistent(g->window,
+ dialog_saveas,
false);
}
break;
case BROWSER_OBJECT_EXPORT_SPRITE:
if (current_menu_object != NULL) {
ro_gui_save_prepare(GUI_SAVE_OBJECT_NATIVE,
- current_menu_object, NULL, NULL, NULL);
- ro_gui_dialog_open_persistent(g->window, dialog_saveas,
+ current_menu_object,
+ NULL,
+ NULL,
+ NULL);
+ ro_gui_dialog_open_persistent(g->window,
+ dialog_saveas,
false);
}
break;
case BROWSER_OBJECT_EXPORT_DRAW:
if (current_menu_object != NULL) {
ro_gui_save_prepare(GUI_SAVE_OBJECT_NATIVE,
- current_menu_object, NULL, NULL, NULL);
- ro_gui_dialog_open_persistent(g->window, dialog_saveas,
+ current_menu_object,
+ NULL,
+ NULL,
+ NULL);
+ ro_gui_dialog_open_persistent(g->window,
+ dialog_saveas,
false);
}
break;
@@ -2848,10 +2738,13 @@ bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
/* selection actions */
case BROWSER_SELECTION_SAVE:
if (h != NULL) {
- ro_gui_save_prepare(GUI_SAVE_TEXT_SELECTION, NULL,
+ ro_gui_save_prepare(GUI_SAVE_TEXT_SELECTION,
+ NULL,
browser_window_get_selection(bw),
- NULL, NULL);
- ro_gui_dialog_open_persistent(g->window, dialog_saveas,
+ NULL,
+ NULL);
+ ro_gui_dialog_open_persistent(g->window,
+ dialog_saveas,
false);
}
break;
@@ -2970,46 +2863,253 @@ bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
case TOOLBAR_BUTTONS:
assert(toolbar);
ro_toolbar_set_display_buttons(toolbar,
- !ro_toolbar_get_display_buttons(toolbar));
+ !ro_toolbar_get_display_buttons(toolbar));
break;
case TOOLBAR_ADDRESS_BAR:
assert(toolbar);
ro_toolbar_set_display_url(toolbar,
- !ro_toolbar_get_display_url(toolbar));
+ !ro_toolbar_get_display_url(toolbar));
if (ro_toolbar_get_display_url(toolbar))
ro_toolbar_take_caret(toolbar);
break;
case TOOLBAR_THROBBER:
assert(toolbar);
ro_toolbar_set_display_throbber(toolbar,
- !ro_toolbar_get_display_throbber(toolbar));
+ !ro_toolbar_get_display_throbber(toolbar));
+ break;
+ case TOOLBAR_EDIT:
+ assert(toolbar);
+ ro_toolbar_toggle_edit(toolbar);
+ break;
+
+ default:
+ return false;
+ }
+
+ if (error != NSERROR_OK) {
+ ro_warn_user(messages_get_errorcode(error), 0);
+ }
+
+ return true;
+}
+
+
+/**
+ * Handle submenu warnings for a browser window menu
+ *
+ * \param w The window owning the menu.
+ * \param i The icon owning the menu.
+ * \param menu The menu to which the warning applies.
+ * \param selection The wimp menu selection data.
+ * \param action The selected menu action.
+ */
+static void
+ro_gui_window_menu_warning(wimp_w w,
+ wimp_i i,
+ wimp_menu *menu,
+ wimp_selection *selection,
+ menu_action action)
+{
+ struct gui_window *g;
+ struct hlcache_handle *h;
+ bool export;
+
+ if (menu != ro_gui_browser_window_menu) {
+ return;
+ }
+
+ g = (struct gui_window *) ro_gui_wimp_event_get_user_data(w);
+ h = browser_window_get_content(g->bw);
+
+ switch (action) {
+ case BROWSER_PAGE_INFO:
+ if (h != NULL) {
+ ro_gui_window_prepare_pageinfo(g);
+ }
+ break;
+
+ case BROWSER_FIND_TEXT:
+ if (h != NULL &&
+ (content_get_type(h) == CONTENT_HTML ||
+ content_get_type(h) == CONTENT_TEXTPLAIN)) {
+ ro_gui_search_prepare(g->bw);
+ }
+ break;
+
+ case BROWSER_SCALE_VIEW:
+ if (h != NULL) {
+ ro_gui_dialog_prepare_zoom(g);
+ }
+ break;
+
+ case BROWSER_PRINT:
+ if (h != NULL) {
+ ro_gui_print_prepare(g);
+ }
+ break;
+
+ case BROWSER_OBJECT_INFO:
+ if (current_menu_object != NULL) {
+ ro_gui_window_prepare_objectinfo(current_menu_object,
+ current_menu_url);
+ }
+ break;
+
+ case BROWSER_OBJECT_SAVE:
+ if (current_menu_object != NULL) {
+ ro_gui_save_prepare(GUI_SAVE_OBJECT_ORIG,
+ current_menu_object,
+ NULL,
+ NULL,
+ NULL);
+ }
+ break;
+
+ case BROWSER_SELECTION_SAVE:
+ if (browser_window_get_editor_flags(g->bw) & BW_EDITOR_CAN_COPY)
+ ro_gui_save_prepare(GUI_SAVE_TEXT_SELECTION, NULL,
+ browser_window_get_selection(g->bw),
+ NULL, NULL);
+ break;
+
+ case BROWSER_SAVE_URL_URI:
+ if (h != NULL)
+ ro_gui_save_prepare(GUI_SAVE_LINK_URI, NULL, NULL,
+ hlcache_handle_get_url(h),
+ content_get_title(h));
+ break;
+
+ case BROWSER_SAVE_URL_URL:
+ if (h != NULL)
+ ro_gui_save_prepare(GUI_SAVE_LINK_URL, NULL, NULL,
+ hlcache_handle_get_url(h),
+ content_get_title(h));
+ break;
+
+ case BROWSER_SAVE_URL_TEXT:
+ if (h != NULL)
+ ro_gui_save_prepare(GUI_SAVE_LINK_TEXT, NULL, NULL,
+ hlcache_handle_get_url(h),
+ content_get_title(h));
+ break;
+
+ case BROWSER_OBJECT_SAVE_URL_URI:
+ if (current_menu_object != NULL)
+ ro_gui_save_prepare(GUI_SAVE_LINK_URI, NULL, NULL,
+ hlcache_handle_get_url(
+ current_menu_object),
+ content_get_title(current_menu_object));
+ break;
+
+ case BROWSER_OBJECT_SAVE_URL_URL:
+ if (current_menu_object != NULL)
+ ro_gui_save_prepare(GUI_SAVE_LINK_URL, NULL, NULL,
+ hlcache_handle_get_url(
+ current_menu_object),
+ content_get_title(current_menu_object));
+ break;
+
+ case BROWSER_OBJECT_SAVE_URL_TEXT:
+ if (current_menu_object != NULL)
+ ro_gui_save_prepare(GUI_SAVE_LINK_TEXT, NULL, NULL,
+ hlcache_handle_get_url(
+ current_menu_object),
+ content_get_title(current_menu_object));
+ break;
+
+ case BROWSER_SAVE:
+ if (h != NULL)
+ ro_gui_save_prepare(GUI_SAVE_SOURCE, h, NULL, NULL, NULL);
+ break;
+
+ case BROWSER_SAVE_COMPLETE:
+ if (h != NULL)
+ ro_gui_save_prepare(GUI_SAVE_COMPLETE, h, NULL, NULL, NULL);
+ break;
+
+ case BROWSER_EXPORT_DRAW:
+ if (h != NULL)
+ ro_gui_save_prepare(GUI_SAVE_DRAW, h, NULL, NULL, NULL);
+ break;
+
+ case BROWSER_EXPORT_PDF:
+ if (h != NULL)
+ ro_gui_save_prepare(GUI_SAVE_PDF, h, NULL, NULL, NULL);
+ break;
+
+ case BROWSER_EXPORT_TEXT:
+ if (h != NULL)
+ ro_gui_save_prepare(GUI_SAVE_TEXT, h, NULL, NULL, NULL);
+ break;
+
+ case BROWSER_LINK_SAVE_URI:
+ if (current_menu_url != NULL)
+ ro_gui_save_prepare(GUI_SAVE_LINK_URI, NULL, NULL,
+ current_menu_url, NULL);
+ break;
+
+ case BROWSER_LINK_SAVE_URL:
+ if (current_menu_url != NULL)
+ ro_gui_save_prepare(GUI_SAVE_LINK_URL, NULL, NULL,
+ current_menu_url, NULL);
+ break;
+
+ case BROWSER_LINK_SAVE_TEXT:
+ if (current_menu_url != NULL)
+ ro_gui_save_prepare(GUI_SAVE_LINK_TEXT, NULL, NULL,
+ current_menu_url, NULL);
+ break;
+
+ case BROWSER_OBJECT_EXPORT_SPRITE:
+ if (current_menu_object != NULL) {
+ ro_gui_window_content_export_types(current_menu_object,
+ NULL, &export);
+
+ if (export)
+ ro_gui_save_prepare(GUI_SAVE_OBJECT_NATIVE,
+ current_menu_object,
+ NULL, NULL, NULL);
+ } else if (h != NULL) {
+ ro_gui_window_content_export_types(h, NULL, &export);
+
+ if (export)
+ ro_gui_save_prepare(GUI_SAVE_OBJECT_NATIVE,
+ h, NULL, NULL, NULL);
+ }
break;
- case TOOLBAR_EDIT:
- assert(toolbar);
- ro_toolbar_toggle_edit(toolbar);
+
+ case BROWSER_OBJECT_EXPORT_DRAW:
+ if (current_menu_object != NULL) {
+ ro_gui_window_content_export_types(current_menu_object,
+ &export, NULL);
+
+ if (export)
+ ro_gui_save_prepare(GUI_SAVE_OBJECT_NATIVE,
+ current_menu_object,
+ NULL, NULL, NULL);
+ } else if (h != NULL) {
+ ro_gui_window_content_export_types(h, &export, NULL);
+
+ if (export)
+ ro_gui_save_prepare(GUI_SAVE_OBJECT_NATIVE,
+ h, NULL, NULL, NULL);
+ }
break;
default:
- return false;
- }
-
- if (error != NSERROR_OK) {
- ro_warn_user(messages_get_errorcode(error), 0);
+ break;
}
-
- return true;
}
/**
* Handle the closure of a browser window menu
*
- * \param w The window owning the menu.
- * \param i The icon owning the menu.
- * \param *menu The menu that is being closed.
+ * \param w The window owning the menu.
+ * \param i The icon owning the menu.
+ * \param menu The menu that is being closed.
*/
-
-void ro_gui_window_menu_close(wimp_w w, wimp_i i, wimp_menu *menu)
+static void ro_gui_window_menu_close(wimp_w w, wimp_i i, wimp_menu *menu)
{
if (menu == ro_gui_browser_window_menu) {
current_menu_object = NULL;
@@ -3021,448 +3121,649 @@ void ro_gui_window_menu_close(wimp_w w, wimp_i i, wimp_menu *menu)
/**
- * Process Scroll_Request events in a browser window.
+ * Clones a browser window's options.
*
- * \param *scroll The wimp scroll event data block.
+ * \param new_gui the new gui window
+ * \param old_gui the gui window to clone from, or NULL for default
*/
+static void
+ro_gui_window_clone_options(struct gui_window *new_gui,
+ struct gui_window *old_gui)
+{
+ assert(new_gui);
+
+ /* Clone the basic options
+ */
+ if (!old_gui) {
+ new_gui->option.buffer_animations = nsoption_bool(buffer_animations);
+ new_gui->option.buffer_everything = nsoption_bool(buffer_everything);
+ } else {
+ new_gui->option = old_gui->option;
+ }
+
+ /* Set up the toolbar
+ */
+ if (new_gui->toolbar) {
+ ro_toolbar_set_display_buttons(new_gui->toolbar,
+ nsoption_bool(toolbar_show_buttons));
+ ro_toolbar_set_display_url(new_gui->toolbar,
+ nsoption_bool(toolbar_show_address));
+ ro_toolbar_set_display_throbber(new_gui->toolbar,
+ nsoption_bool(toolbar_show_throbber));
+ if ((old_gui) && (old_gui->toolbar)) {
+ ro_toolbar_set_display_buttons(new_gui->toolbar,
+ ro_toolbar_get_display_buttons(
+ old_gui->toolbar));
+ ro_toolbar_set_display_url(new_gui->toolbar,
+ ro_toolbar_get_display_url(
+ old_gui->toolbar));
+ ro_toolbar_set_display_throbber(new_gui->toolbar,
+ ro_toolbar_get_display_throbber(
+ old_gui->toolbar));
+ ro_toolbar_process(new_gui->toolbar, -1, true);
+ }
+ }
+}
-void ro_gui_window_scroll(wimp_scroll *scroll)
+
+/**
+ * Create and open a new browser window.
+ *
+ * \param bw bw to create gui_window for
+ * \param existing an existing gui_window, may be NULL
+ * \param flags flags for gui window creation
+ * \return gui window, or NULL on error
+ */
+static struct gui_window *gui_window_create(struct browser_window *bw,
+ struct gui_window *existing,
+ gui_window_create_flags flags)
{
- struct gui_window *g = ro_gui_window_lookup(scroll->w);
+ int screen_width, screen_height;
+ static int window_count = 2;
+ wimp_window window;
+ wimp_window_state state;
+ os_error *error;
+ bool open_centred = true;
+ struct gui_window *g;
- if (g && browser_window_has_content(g->bw) && ro_gui_shift_pressed()) {
- /* extended scroll request with shift held down; change zoom */
- float scale, inc;
+ g = malloc(sizeof *g);
+ if (!g) {
+ ro_warn_user("NoMemory", 0);
+ return 0;
+ }
+ g->bw = bw;
+ g->toolbar = 0;
+ g->status_bar = 0;
+ g->old_width = 0;
+ g->old_height = 0;
+ g->update_extent = true;
+ g->active = false;
+ strcpy(g->title, "NetSurf");
+ g->iconise_icon = -1;
+ g->scale = browser_window_get_scale(bw);
+
+ /* Set the window position */
+ if (existing != NULL &&
+ flags & GW_CREATE_CLONE &&
+ nsoption_bool(window_size_clone)) {
+ state.w = existing->window;
+ error = xwimp_get_window_state(&state);
+ if (error) {
+ LOG("xwimp_get_window_state: 0x%x: %s", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ }
+ window.visible.x0 = state.visible.x0;
+ window.visible.x1 = state.visible.x1;
+ window.visible.y0 = state.visible.y0 - 48;
+ window.visible.y1 = state.visible.y1 - 48;
+ open_centred = false;
+ } else {
+ int win_width, win_height;
+ ro_gui_screen_size(&screen_width, &screen_height);
+
+ /* Check if we have a preferred position */
+ if ((nsoption_int(window_screen_width) != 0) &&
+ (nsoption_int(window_screen_height) != 0)) {
+ win_width = (nsoption_int(window_width) *
+ screen_width) /
+ nsoption_int(window_screen_width);
+ win_height = (nsoption_int(window_height) *
+ screen_height) /
+ nsoption_int(window_screen_height);
+ window.visible.x0 = (nsoption_int(window_x) *
+ screen_width) /
+ nsoption_int(window_screen_width);
+ window.visible.y0 = (nsoption_int(window_y) *
+ screen_height) /
+ nsoption_int(window_screen_height);
+ if (nsoption_bool(window_stagger)) {
+ window.visible.y0 += 96 -
+ (48 * (window_count % 5));
+ }
+ open_centred = false;
+ if (win_width < 100)
+ win_width = 100;
+ if (win_height < 100)
+ win_height = 100;
+ } else {
+
+ /* Base how we define the window height/width
+ on the compile time options set */
+ win_width = screen_width * 3 / 4;
+ if (1600 < win_width)
+ win_width = 1600;
+ win_height = win_width * 3 / 4;
+
+ window.visible.x0 = (screen_width - win_width) / 2;
+ window.visible.y0 = ((screen_height - win_height) / 2) +
+ 96 - (48 * (window_count % 5));
+ }
+ window.visible.x1 = window.visible.x0 + win_width;
+ window.visible.y1 = window.visible.y0 + win_height;
+ }
+
+ /* General flags for a non-movable, non-resizable, no-title bar window */
+ window.xscroll = 0;
+ window.yscroll = 0;
+ window.next = wimp_TOP;
+ window.flags = wimp_WINDOW_MOVEABLE |
+ wimp_WINDOW_NEW_FORMAT |
+ wimp_WINDOW_VSCROLL |
+ wimp_WINDOW_HSCROLL |
+ wimp_WINDOW_IGNORE_XEXTENT |
+ wimp_WINDOW_IGNORE_YEXTENT |
+ wimp_WINDOW_SCROLL_REPEAT;
+ window.title_fg = wimp_COLOUR_BLACK;
+ window.title_bg = wimp_COLOUR_LIGHT_GREY;
+ window.work_fg = wimp_COLOUR_LIGHT_GREY;
+ window.work_bg = wimp_COLOUR_TRANSPARENT;
+ window.scroll_outer = wimp_COLOUR_DARK_GREY;
+ window.scroll_inner = wimp_COLOUR_MID_LIGHT_GREY;
+ window.highlight_bg = wimp_COLOUR_CREAM;
+ window.extra_flags = wimp_WINDOW_USE_EXTENDED_SCROLL_REQUEST |
+ wimp_WINDOW_GIVE_SHADED_ICON_INFO;
+ window.extent.x0 = 0;
+ window.extent.y0 = -(window.visible.y1 - window.visible.y0);
+ window.extent.x1 = window.visible.x1 - window.visible.x0;
+ window.extent.y1 = 0;
+ window.title_flags = wimp_ICON_TEXT |
+ wimp_ICON_INDIRECTED |
+ wimp_ICON_HCENTRED;
+ window.work_flags = wimp_BUTTON_DOUBLE_CLICK_DRAG <<
+ wimp_ICON_BUTTON_TYPE_SHIFT;
+ window.sprite_area = wimpspriteop_AREA;
+ window.xmin = 1;
+ window.ymin = 1;
+ window.title_data.indirected_text.text = g->title;
+ window.title_data.indirected_text.validation = (char *) -1;
+ window.title_data.indirected_text.size = 255;
+ window.icon_count = 0;
+
+ /* Add in flags */
+ window.flags |= wimp_WINDOW_SIZE_ICON |
+ wimp_WINDOW_BACK_ICON |
+ wimp_WINDOW_CLOSE_ICON |
+ wimp_WINDOW_TITLE_ICON |
+ wimp_WINDOW_TOGGLE_ICON;
+
+ if (open_centred) {
+ int scroll_width = ro_get_vscroll_width(NULL);
+ window.visible.x0 -= scroll_width;
+ }
+
+ error = xwimp_create_window(&window, &g->window);
+ if (error) {
+ LOG("xwimp_create_window: 0x%x: %s", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ free(g);
+ return 0;
+ }
+
+ /* Link into window list */
+ g->prev = 0;
+ g->next = window_list;
+ if (window_list)
+ window_list->prev = g;
+ window_list = g;
+ window_count++;
+
+ /* Add in a toolbar and status bar */
+ g->status_bar = ro_gui_status_bar_create(g->window,
+ nsoption_int(toolbar_status_size));
+ g->toolbar = ro_toolbar_create(NULL, g->window,
+ THEME_STYLE_BROWSER_TOOLBAR, TOOLBAR_FLAGS_NONE,
+ &ro_gui_window_toolbar_callbacks, g,
+ "HelpToolbar");
+ if (g->toolbar != NULL) {
+ ro_toolbar_add_buttons(g->toolbar,
+ brower_toolbar_buttons,
+ nsoption_charp(toolbar_browser));
+ ro_toolbar_add_url(g->toolbar);
+ ro_toolbar_add_throbber(g->toolbar);
+ ro_toolbar_rebuild(g->toolbar);
+ }
+
+ /* Register event handlers. Do this quickly, as some of the things
+ * that follow will indirectly look up our user data: this MUST
+ * be set first!
+ */
+ ro_gui_wimp_event_set_user_data(g->window, g);
+ ro_gui_wimp_event_register_open_window(g->window,
+ ro_gui_window_open);
+ ro_gui_wimp_event_register_close_window(g->window,
+ ro_gui_window_close);
+ ro_gui_wimp_event_register_redraw_window(g->window,
+ ro_gui_window_redraw);
+ ro_gui_wimp_event_register_scroll_window(g->window,
+ ro_gui_window_scroll);
+ ro_gui_wimp_event_register_pointer_entering_window(g->window,
+ ro_gui_window_pointer_entering);
+ ro_gui_wimp_event_register_keypress(g->window,
+ ro_gui_window_keypress);
+ ro_gui_wimp_event_register_mouse_click(g->window,
+ ro_gui_window_click);
+ ro_gui_wimp_event_register_menu(g->window,
+ ro_gui_browser_window_menu,
+ true, false);
+ ro_gui_wimp_event_register_menu_prepare(g->window,
+ ro_gui_window_menu_prepare);
+ ro_gui_wimp_event_register_menu_selection(g->window,
+ ro_gui_window_menu_select);
+ ro_gui_wimp_event_register_menu_warning(g->window,
+ ro_gui_window_menu_warning);
+ ro_gui_wimp_event_register_menu_close(g->window,
+ ro_gui_window_menu_close);
- if (scroll->ymin & 3)
- inc = 0.02; /* RO5 sends the msg 5 times;
- * don't ask me why
- *
- * @todo this is liable to break if
- * HID is configured optimally for
- * frame scrolling. *5 appears to be
- * an artifact of non-HID mode scrolling.
- */
- else
- inc = (1 << (ABS(scroll->ymin)>>2)) / 20.0F;
+ /* Set the window options */
+ ro_gui_window_clone_options(g, existing);
+ ro_gui_window_update_toolbar_buttons(g);
- if (scroll->ymin > 0) {
- scale = g->scale + inc;
- if (scale > scale_snap_to[SCALE_SNAP_TO_SIZE - 1])
- scale = scale_snap_to[SCALE_SNAP_TO_SIZE - 1];
- } else {
- scale = g->scale - inc;
- if (scale < scale_snap_to[0])
- scale = scale_snap_to[0];
- }
- if (g->scale != scale)
- ro_gui_window_set_scale(g, scale);
- } else if (g != NULL) {
- ro_gui_window_scroll_action(g, scroll->xmin, scroll->ymin);
+ /* Open the window at the top of the stack */
+ state.w = g->window;
+ error = xwimp_get_window_state(&state);
+ if (error) {
+ LOG("xwimp_get_window_state: 0x%x: %s",
+ error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ return g;
}
-}
-/**
- * Process Pointer Entering Window events in a browser window.
- *
- * \param *entering The wimp pointer entering event data block.
- */
+ state.next = wimp_TOP;
-static void ro_gui_window_pointer_entering(wimp_entering *entering)
-{
- struct gui_window *g = ro_gui_window_lookup(entering->w);
+ ro_gui_window_open(PTR_WIMP_OPEN(&state));
- if (g != NULL)
- ro_mouse_track_start(ro_gui_window_track_end,
- ro_gui_window_mouse_at, g);
+ /* Claim the caret */
+ if (ro_toolbar_take_caret(g->toolbar)) {
+ ro_gui_url_complete_start(g->toolbar);
+ } else {
+ gui_window_place_caret(g, -100, -100, 0, NULL);
+ }
+
+ return g;
}
+
/**
- * Process Pointer Leaving Window events in a browser window. These arrive via
- * the termination callback handler from ro_mouse's mouse tracking.
+ * Remove all pending update boxes for a window
*
- * \param *leaving The wimp pointer leaving event data block.
- * \param *data The GUI window that the pointer is leaving.
+ * \param g gui_window
*/
-
-static void ro_gui_window_track_end(wimp_leaving *leaving, void *data)
+static void ro_gui_window_remove_update_boxes(struct gui_window *g)
{
- struct gui_window *g = (struct gui_window *) data;
+ struct update_box *cur;
- if (g != NULL)
- gui_window_set_pointer(g, GUI_POINTER_DEFAULT);
+ for (cur = pending_updates; cur != NULL; cur = cur->next) {
+ if (cur->g == g) {
+ cur->g = NULL;
+ }
+ }
}
/**
- * Scroll a browser window, either via the core or directly using the
- * normal Wimp_OpenWindow interface.
- *
- * Scroll steps are supplied in terms of the (extended) Scroll Event direction
- * values returned by Wimp_Poll. Special values of 0x7fffffff and 0x80000000
- * are added to mean "Home" and "End".
+ * Close a browser window and free any related resources.
*
- * \param *g The GUI Window to be scrolled.
- * \param scroll_x The X scroll step to be applied.
- * \param scroll_y The Y scroll step to be applied.
+ * \param g gui_window to destroy
*/
-
-void ro_gui_window_scroll_action(struct gui_window *g,
- wimp_scroll_direction scroll_x, wimp_scroll_direction scroll_y)
+static void gui_window_destroy(struct gui_window *g)
{
- int visible_x, visible_y;
- int step_x = 0, step_y = 0;
- int toolbar_y;
- wimp_window_state state;
- wimp_pointer pointer;
- os_error *error;
- os_coord pos;
- bool handled = false;
- struct toolbar *toolbar;
-
- if (g == NULL)
- return;
+ os_error *error;
+ wimp_w w;
- /* Get the current window, toolbar and pointer details. */
+ assert(g);
- state.w = g->window;
- error = xwimp_get_window_state(&state);
- if (error) {
- LOG("xwimp_get_window_state: 0x%x: %s", error->errnum, error->errmess);
- return;
- }
+ /* stop any tracking */
+ ro_mouse_kill(g);
- toolbar = ro_toolbar_parent_window_lookup(g->window);
- assert(g == NULL || g->toolbar == NULL || g->toolbar == toolbar);
+ /* remove from list */
+ if (g->prev)
+ g->prev->next = g->next;
+ else
+ window_list = g->next;
+ if (g->next)
+ g->next->prev = g->prev;
- toolbar_y = (toolbar == NULL) ? 0 : ro_toolbar_full_height(toolbar);
+ /* destroy toolbar */
+ if (g->toolbar)
+ ro_toolbar_destroy(g->toolbar);
+ if (g->status_bar)
+ ro_gui_status_bar_destroy(g->status_bar);
- visible_x = state.visible.x1 - state.visible.x0 - 32;
- visible_y = state.visible.y1 - state.visible.y0 - 32 - toolbar_y;
+ w = g->window;
+ ro_gui_url_complete_close();
+ ro_gui_dialog_close_persistent(w);
+ if (current_menu_window == w)
+ ro_gui_menu_destroy();
+ ro_gui_window_remove_update_boxes(g);
- error = xwimp_get_pointer_info(&pointer);
+ /* delete window */
+ error = xwimp_delete_window(w);
if (error) {
- LOG("xwimp_get_pointer_info 0x%x : %s", error->errnum, error->errmess);
+ LOG("xwimp_delete_window: 0x%x: %s", error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
- return;
- }
-
- /* Turn the scroll requirement from Scroll Event codes into coordinates
- * that the core can understand.
- */
-
- switch (scroll_x) {
- case wimp_SCROLL_PAGE_LEFT:
- step_x = SCROLL_PAGE_DOWN;
- break;
- case wimp_SCROLL_AUTO_LEFT:
- case wimp_SCROLL_COLUMN_LEFT:
- step_x = -16;
- break;
- case wimp_SCROLL_AUTO_RIGHT:
- case wimp_SCROLL_COLUMN_RIGHT:
- step_x = 16;
- break;
- case wimp_SCROLL_PAGE_RIGHT:
- step_x = SCROLL_PAGE_UP;
- break;
- case 0x80000000:
- step_x = SCROLL_BOTTOM;
- break;
- case 0x7fffffff:
- step_x = SCROLL_TOP;
- break;
- default:
- step_x = (visible_x * (scroll_x>>2)) >> 2;
- break;
- }
-
- switch (scroll_y) {
- case wimp_SCROLL_PAGE_UP:
- step_y = SCROLL_PAGE_UP;
- break;
- case wimp_SCROLL_AUTO_UP:
- case wimp_SCROLL_LINE_UP:
- step_y = -16;
- break;
- case wimp_SCROLL_AUTO_DOWN:
- case wimp_SCROLL_LINE_DOWN:
- step_y = 16;
- break;
- case wimp_SCROLL_PAGE_DOWN:
- step_y = SCROLL_PAGE_DOWN;
- break;
- case 0x80000000:
- step_y = SCROLL_BOTTOM;
- break;
- case 0x7fffffff:
- step_y = SCROLL_TOP;
- break;
- default:
- step_y = -((visible_y * (scroll_y>>2)) >> 2);
- break;
}
+ ro_gui_wimp_event_finalise(w);
- /* If no scrolling is required, there's no point trying to do any. */
-
- if (step_x == 0 && step_y == 0)
- return;
-
- /* If the pointer is over the window being scrolled, then try to get
- * the core to do the scrolling on the object under the pointer.
- */
-
- if (pointer.w == g->window &&
- ro_gui_window_to_window_pos(g,
- pointer.pos.x, pointer.pos.y, &pos))
- handled = browser_window_scroll_at_point(g->bw, pos.x, pos.y,
- step_x, step_y);
-
- /* If the core didn't do the scrolling, handle it via the Wimp.
- * Windows which contain frames can only be scrolled by the core,
- * because it implements frame scroll bars.
- */
+ free(g);
+}
- if (!handled && (browser_window_is_frameset(g->bw) == false)) {
- switch (step_x) {
- case SCROLL_TOP:
- state.xscroll -= 0x10000000;
- break;
- case SCROLL_BOTTOM:
- state.xscroll += 0x10000000;
- break;
- case SCROLL_PAGE_UP:
- state.xscroll += visible_x;
- break;
- case SCROLL_PAGE_DOWN:
- state.xscroll -= visible_x;
- break;
- default:
- state.xscroll += 2 * step_x;
- break;
- }
- switch (step_y) {
- case SCROLL_TOP:
- state.yscroll += 0x10000000;
- break;
- case SCROLL_BOTTOM:
- state.yscroll -= 0x10000000;
- break;
- case SCROLL_PAGE_UP:
- state.yscroll += visible_y;
- break;
- case SCROLL_PAGE_DOWN:
- state.yscroll -= visible_y;
- break;
- default:
- state.yscroll -= 2 * step_y;
- break;
- }
+/**
+ * Set the title of a browser window.
+ *
+ * \param g gui_window to update
+ * \param title new window title, copied
+ */
+static void gui_window_set_title(struct gui_window *g, const char *title)
+{
+ assert(g);
+ assert(title);
- error = xwimp_open_window((wimp_open *) &state);
- if (error) {
- LOG("xwimp_open_window: 0x%x: %s", error->errnum, error->errmess);
- }
+ if (g->scale != 1.0) {
+ int scale_disp = g->scale * 100;
+
+ if (ABS((float)scale_disp - g->scale * 100) >= 0.05)
+ snprintf(g->title, sizeof g->title, "%s (%.1f%%)",
+ title, g->scale * 100);
+ else
+ snprintf(g->title, sizeof g->title, "%s (%i%%)",
+ title, scale_disp);
+ } else {
+ strncpy(g->title, title, sizeof g->title);
}
+
+ ro_gui_set_window_title(g->window, g->title);
}
/**
- * Handle Message_DataLoad (file dragged in) for a window.
- *
- * \param g window
- * \param message Message_DataLoad block
- * \return true if the load was processed
+ * Get the scroll position of a browser window.
*
- * If the file was dragged into a form file input, it is used as the value.
+ * \param g gui_window
+ * \param sx receives x ordinate of point at top-left of window
+ * \param sy receives y ordinate of point at top-left of window
+ * \return true iff successful
*/
-
-bool ro_gui_window_dataload(struct gui_window *g, wimp_message *message)
+static bool gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
{
+ wimp_window_state state;
os_error *error;
- os_coord pos;
+ int toolbar_height = 0;
- /* Ignore directories etc. */
- if (0x1000 <= message->data.data_xfer.file_type)
- return false;
+ assert(g);
- if (!ro_gui_window_to_window_pos(g, message->data.data_xfer.pos.x,
- message->data.data_xfer.pos.y, &pos))
+ state.w = g->window;
+ error = xwimp_get_window_state(&state);
+ if (error) {
+ LOG("xwimp_get_window_state: 0x%x: %s", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
return false;
+ }
- if (browser_window_drop_file_at_point(g->bw, pos.x, pos.y,
- message->data.data_xfer.file_name) == false)
- return false;
+ if (g->toolbar)
+ toolbar_height = ro_toolbar_full_height(g->toolbar);
+ *sx = state.xscroll / (2 * g->scale);
+ *sy = -(state.yscroll - toolbar_height) / (2 * g->scale);
+ return true;
+}
- /* send DataLoadAck */
- message->action = message_DATA_LOAD_ACK;
- message->your_ref = message->my_ref;
- error = xwimp_send_message(wimp_USER_MESSAGE, message, message->sender);
+
+/**
+ * Set the scroll position of a riscos browser window.
+ *
+ * Scrolls the viewport to ensure the specified rectangle of the
+ * content is shown.
+ *
+ * \param g gui window to scroll
+ * \param rect The rectangle to ensure is shown.
+ * \return NSERROR_OK on success or apropriate error code.
+ */
+static nserror
+gui_window_set_scroll(struct gui_window *g, const struct rect *rect)
+{
+ wimp_window_state state;
+ os_error *error;
+ int toolbar_height = 0;
+
+ assert(g);
+
+ state.w = g->window;
+ error = xwimp_get_window_state(&state);
if (error) {
- LOG("xwimp_send_message: 0x%x: %s\n", error->errnum, error->errmess);
+ LOG("xwimp_get_window_state: 0x%x: %s",
+ error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
+ return NSERROR_BAD_PARAMETER;
}
- return true;
+ if (g->toolbar) {
+ toolbar_height = ro_toolbar_full_height(g->toolbar);
+ }
+
+ if ((rect->x0 == rect->x1) && (rect->y0 == rect->y1)) {
+ /* scroll to top */
+ state.xscroll = rect->x0 * 2 * g->scale;
+ state.yscroll = (-rect->y0 * 2 * g->scale) + toolbar_height;
+ } else {
+ /* scroll area into view with padding */
+ int x0, y0, x1, y1;
+ int cx0, cy0, width, height;
+ int padding_available;
+ int correction;
+
+ x0 = rect->x0 * 2 * g->scale;
+ y0 = rect->y0 * 2 * g->scale;
+ x1 = rect->x1 * 2 * g->scale;
+ y1 = rect->y1 * 2 * g->scale;
+
+ cx0 = state.xscroll;
+ cy0 = -state.yscroll + toolbar_height;
+ width = state.visible.x1 - state.visible.x0;
+ height = state.visible.y1 - state.visible.y0 - toolbar_height;
+
+ /* make sure we're visible */
+ correction = (x1 - cx0 - width);
+ if (correction > 0) {
+ cx0 += correction;
+ }
+ correction = (y1 - cy0 - height);
+ if (correction > 0) {
+ cy0 += correction;
+ }
+ if (x0 < cx0) {
+ cx0 = x0;
+ }
+ if (y0 < cy0) {
+ cy0 = y0;
+ }
+
+ /* try to give a SCROLL_VISIBLE_PADDING border of space around us */
+ padding_available = (width - x1 + x0) / 2;
+ if (padding_available > 0) {
+ if (padding_available > SCROLL_VISIBLE_PADDING) {
+ padding_available = SCROLL_VISIBLE_PADDING;
+ }
+ correction = (cx0 + width - x1);
+ if (correction < padding_available) {
+ cx0 += padding_available;
+ }
+ correction = (x0 - cx0);
+ if (correction < padding_available) {
+ cx0 -= padding_available;
+ }
+ }
+ padding_available = (height - y1 + y0) / 2;
+ if (padding_available > 0) {
+ if (padding_available > SCROLL_VISIBLE_PADDING) {
+ padding_available = SCROLL_VISIBLE_PADDING;
+ }
+ correction = (cy0 + height - y1);
+ if (correction < padding_available) {
+ cy0 += padding_available;
+ }
+ correction = (y0 - cy0);
+ if (correction < padding_available) {
+ cy0 -= padding_available;
+ }
+ }
+
+ state.xscroll = cx0;
+ state.yscroll = -cy0 + toolbar_height;
+ }
+ ro_gui_window_open(PTR_WIMP_OPEN(&state));
+
+ return NSERROR_OK;
}
/**
- * Handle pointer movements in a browser window.
+ * Find the current dimensions of a browser window's content area.
*
- * \param *pointer new mouse position
- * \param *data browser window that the pointer is in
+ * \param gw gui window to measure
+ * \param width receives width of window
+ * \param height receives height of window
+ * \param scaled whether to return scaled values
*/
-
-void ro_gui_window_mouse_at(wimp_pointer *pointer, void *data)
+static nserror
+gui_window_get_dimensions(struct gui_window *gw,
+ int *width, int *height,
+ bool scaled)
{
- os_coord pos;
- struct gui_window *g = (struct gui_window *) data;
+ /* use the cached window sizes */
+ *width = gw->old_width / 2;
+ *height = gw->old_height / 2;
- if (ro_gui_window_to_window_pos(g, pointer->pos.x, pointer->pos.y, &pos))
- browser_window_mouse_track(g->bw,
- ro_gui_mouse_drag_state(pointer->buttons,
- wimp_BUTTON_DOUBLE_CLICK_DRAG),
- pos.x, pos.y);
+ if (scaled) {
+ *width /= gw->scale;
+ *height /= gw->scale;
+ }
+ return NSERROR_OK;
}
/**
- * Window is being iconised. Create a suitable thumbnail sprite
- * (which, sadly, must be in the Wimp sprite pool), and return
- * the sprite name and truncated title to the iconiser
+ * Set the status bar of a browser window.
*
- * \param g the gui window being iconised
- * \param wi the WindowInfo message from the iconiser
+ * \param g gui_window to update
+ * \param text new status text
*/
+static void riscos_window_set_status(struct gui_window *g, const char *text)
+{
+ if (g->status_bar) {
+ ro_gui_status_bar_set_text(g->status_bar, text);
+ }
+}
+
-void ro_gui_window_iconise(struct gui_window *g,
- wimp_full_message_window_info *wi)
+/**
+ * Update the interface to reflect start of page loading.
+ *
+ * \param g window with start of load
+ */
+static void gui_window_start_throbber(struct gui_window *g)
{
- /* sadly there is no 'legal' way to get the sprite into
- * the Wimp sprite pool other than via a filing system */
- const char *temp_fname = "Pipe:$._tmpfile";
- struct browser_window *bw = g->bw;
- osspriteop_header *overlay = NULL;
- osspriteop_header *sprite_header;
- struct bitmap *bitmap;
- osspriteop_area *area;
- int width = 34, height = 34;
- struct hlcache_handle *h;
- os_error *error;
- int len, id;
+ ro_gui_window_update_toolbar_buttons(g);
+ ro_gui_menu_refresh(ro_gui_browser_window_menu);
+ if (g->toolbar != NULL)
+ ro_toolbar_start_throbbing(g->toolbar);
+ g->active = true;
+}
- assert(bw);
- h = browser_window_get_content(bw);
- if (!h) return;
- /* if an overlay sprite is defined, locate it and gets its dimensions
- * so that we can produce a thumbnail with the same dimensions */
- if (!ro_gui_wimp_get_sprite("ic_netsfxx", &overlay)) {
- error = xosspriteop_read_sprite_info(osspriteop_PTR,
- (osspriteop_area *)0x100,
- (osspriteop_id)overlay, &width, &height, NULL,
- NULL);
- if (error) {
- LOG("xosspriteop_read_sprite_info: 0x%x: %s", error->errnum, error->errmess);
- ro_warn_user("MiscError", error->errmess);
- overlay = NULL;
- }
- else if (sprite_bpp(overlay) != 8) {
- LOG("overlay sprite is not 8bpp");
- overlay = NULL;
- }
- }
+/**
+ * Update the interface to reflect page loading stopped.
+ *
+ * \param g window with start of load
+ */
+static void gui_window_stop_throbber(struct gui_window *g)
+{
+ ro_gui_window_update_toolbar_buttons(g);
+ ro_gui_menu_refresh(ro_gui_browser_window_menu);
+ if (g->toolbar != NULL)
+ ro_toolbar_stop_throbbing(g->toolbar);
+ g->active = false;
+}
- /* create the thumbnail sprite */
- bitmap = riscos_bitmap_create(width, height, BITMAP_NEW | BITMAP_OPAQUE |
- BITMAP_CLEAR_MEMORY);
- if (!bitmap) {
- LOG("Thumbnail initialisation failed.");
- return;
- }
- riscos_bitmap_render(bitmap, h);
- if (overlay) {
- riscos_bitmap_overlay_sprite(bitmap, overlay);
- }
- area = riscos_bitmap_convert_8bpp(bitmap);
- riscos_bitmap_destroy(bitmap);
- if (!area) {
- LOG("Thumbnail conversion failed.");
+/**
+ * set favicon
+ */
+static void
+gui_window_set_icon(struct gui_window *g, struct hlcache_handle *icon)
+{
+ if (g == NULL || g->toolbar == NULL)
return;
- }
- /* choose a suitable sprite name */
- id = 0;
- while (iconise_used[id])
- if ((unsigned)++id >= NOF_ELEMENTS(iconise_used)) {
- id = iconise_next;
- if ((unsigned)++iconise_next >=
- NOF_ELEMENTS(iconise_used))
- iconise_next = 0;
- break;
- }
+ ro_toolbar_set_site_favicon(g->toolbar, icon);
+}
- sprite_header = (osspriteop_header *)(area + 1);
- len = sprintf(sprite_header->name, "ic_netsf%.2d", id);
- error = xosspriteop_save_sprite_file(osspriteop_USER_AREA,
- area, temp_fname);
- if (error) {
- LOG("xosspriteop_save_sprite_file: 0x%x:%s", error->errnum, error->errmess);
- ro_warn_user("MiscError", error->errmess);
- free(area);
- return;
- }
- error = xwimpspriteop_merge_sprite_file(temp_fname);
+/**
+ * Remove the caret, if present.
+ *
+ * \param g window with caret
+ */
+static void gui_window_remove_caret(struct gui_window *g)
+{
+ wimp_caret caret;
+ os_error *error;
+
+ error = xwimp_get_caret_position(&caret);
if (error) {
- LOG("xwimpspriteop_merge_sprite_file: 0x%x:%s", error->errnum, error->errmess);
+ LOG("xwimp_get_caret_position: 0x%x: %s",
+ error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
- remove(temp_fname);
- free(area);
return;
}
- memcpy(wi->sprite_name, sprite_header->name + 3, len - 2); /* inc NUL */
- strncpy(wi->title, g->title, sizeof(wi->title));
- wi->title[sizeof(wi->title) - 1] = '\0';
-
- if (wimptextop_string_width(wi->title, 0) > 182) {
- /* work around bug in Pinboard where it will fail to display
- * the icon if the text is very wide */
- if (strlen(wi->title) > 10)
- wi->title[10] = '\0'; /* pinboard does this anyway */
- while (wimptextop_string_width(wi->title, 0) > 182)
- wi->title[strlen(wi->title) - 1] = '\0';
+ if (caret.w == g->window) {
+ /* we have the caret: hide caret, but keep input focus */
+ gui_window_place_caret(g, -100, -100, 0, NULL);
}
+}
- wi->size = sizeof(wimp_full_message_window_info);
- wi->your_ref = wi->my_ref;
- error = xwimp_send_message(wimp_USER_MESSAGE, (wimp_message*)wi,
- wi->sender);
- if (error) {
- LOG("xwimp_send_message: 0x%x:%s", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- }
- else {
- g->iconise_icon = id;
- iconise_used[id] = true;
- }
- free(area);
+/**
+ * Called when the gui_window has new content.
+ *
+ * \param g the gui_window that has new content
+ */
+static void gui_window_new_content(struct gui_window *g)
+{
+ ro_gui_menu_refresh(ro_gui_browser_window_menu);
+ ro_gui_window_update_toolbar_buttons(g);
+ ro_gui_dialog_close_persistent(g->window);
+ ro_toolbar_set_content_favicon(g->toolbar, g);
}
/**
* Completes scrolling of a browser window
*
- * \param *drag The DragEnd event data block.
- * \param *data gui window block pointer.
+ * \param drag The DragEnd event data block.
+ * \param data gui window block pointer.
*/
-
static void ro_gui_window_scroll_end(wimp_dragged *drag, void *data)
{
wimp_pointer pointer;
@@ -3498,612 +3799,703 @@ static void ro_gui_window_scroll_end(wimp_dragged *drag, void *data)
/**
- * Process Mouse_Click events in a toolbar's button bar. This does not handle
- * other clicks in a toolbar: these are handled by the toolbar module itself.
+ * Starts drag scrolling of a browser window
*
- * \param *data The GUI window associated with the click.
- * \param action_type The action type to be handled.
- * \param action The action to process.
+ * \param g the window to scroll
*/
-
-void ro_gui_window_toolbar_click(void *data,
- toolbar_action_type action_type, union toolbar_action action)
+static bool gui_window_scroll_start(struct gui_window *g)
{
- struct gui_window *g = data;
- nserror err;
-
- if (g == NULL)
- return;
-
-
- if (action_type == TOOLBAR_ACTION_URL) {
- switch (action.url) {
- case TOOLBAR_URL_DRAG_URL:
- {
- gui_save_type save_type;
-
- if (!browser_window_has_content(g->bw))
- break;
-
- if (ro_gui_shift_pressed())
- save_type = GUI_SAVE_LINK_URL;
- else
- save_type = GUI_SAVE_LINK_TEXT;
-
- ro_gui_drag_save_link(save_type,
- browser_window_get_url(g->bw),
- browser_window_get_title(g->bw), g);
- }
- break;
-
- case TOOLBAR_URL_SELECT_HOTLIST:
- ro_gui_window_action_add_bookmark(g);
- break;
-
- case TOOLBAR_URL_ADJUST_HOTLIST:
- ro_gui_window_action_remove_bookmark(g);
- break;
-
- default:
- break;
- }
+ wimp_window_info_base info;
+ wimp_pointer pointer;
+ os_error *error;
+ wimp_drag drag;
+ int height;
+ int width;
- return;
+ error = xwimp_get_pointer_info(&pointer);
+ if (error) {
+ LOG("xwimp_get_pointer_info 0x%x : %s", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ return false;
}
+ info.w = g->window;
+ error = xwimp_get_window_info_header_only((wimp_window_info*)&info);
+ if (error) {
+ LOG("xwimp_get_window_state: 0x%x : %s", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ return false;
+ }
- /* By now, the only valid action left is a button click. If it isn't
- * one of those, give up.
- */
-
- if (action_type != TOOLBAR_ACTION_BUTTON)
- return;
-
- switch (action.button) {
- case TOOLBAR_BUTTON_BACK:
- if (g->bw != NULL)
- browser_window_history_back(g->bw, false);
- break;
-
- case TOOLBAR_BUTTON_BACK_NEW:
- if (g->bw != NULL)
- browser_window_history_back(g->bw, true);
- break;
-
- case TOOLBAR_BUTTON_FORWARD:
- if (g->bw != NULL)
- browser_window_history_forward(g->bw, false);
- break;
-
- case TOOLBAR_BUTTON_FORWARD_NEW:
- if (g->bw != NULL)
- browser_window_history_forward(g->bw, true);
- break;
-
- case TOOLBAR_BUTTON_STOP:
- if (g->bw != NULL)
- browser_window_stop(g->bw);
- break;
-
- case TOOLBAR_BUTTON_RELOAD:
- if (g->bw != NULL)
- browser_window_reload(g->bw, false);
- break;
-
- case TOOLBAR_BUTTON_RELOAD_ALL:
- if (g->bw != NULL)
- browser_window_reload(g->bw, true);
- break;
-
- case TOOLBAR_BUTTON_HISTORY_LOCAL:
- ro_gui_window_action_local_history(g);
- break;
-
- case TOOLBAR_BUTTON_HISTORY_GLOBAL:
- ro_gui_global_history_present();
- break;
-
- case TOOLBAR_BUTTON_HOME:
- ro_gui_window_action_home(g);
- break;
-
- case TOOLBAR_BUTTON_SEARCH:
- ro_gui_window_action_search(g);
- break;
+ width = info.extent.x1 - info.extent.x0;
+ height = info.extent.y1 - info.extent.y0;
- case TOOLBAR_BUTTON_SCALE:
- ro_gui_window_action_zoom(g);
- break;
+ drag.type = wimp_DRAG_USER_POINT;
+ drag.bbox.x1 = pointer.pos.x + info.xscroll;
+ drag.bbox.y0 = pointer.pos.y + info.yscroll;
+ drag.bbox.x0 = drag.bbox.x1 - (width - (info.visible.x1 - info.visible.x0));
+ drag.bbox.y1 = drag.bbox.y0 + (height - (info.visible.y1 - info.visible.y0));
- case TOOLBAR_BUTTON_BOOKMARK_OPEN:
- ro_gui_hotlist_present();
- break;
+ if (g->toolbar) {
+ int tbar_height = ro_toolbar_full_height(g->toolbar);
+ drag.bbox.y0 -= tbar_height;
+ drag.bbox.y1 -= tbar_height;
+ }
- case TOOLBAR_BUTTON_BOOKMARK_ADD:
- ro_gui_window_action_add_bookmark(g);
- break;
+ error = xwimp_drag_box(&drag);
+ if (error) {
+ LOG("xwimp_drag_box: 0x%x : %s", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ return false;
+ }
- case TOOLBAR_BUTTON_SAVE_SOURCE:
- ro_gui_window_action_save(g, GUI_SAVE_SOURCE);
- break;
+ ro_mouse_drag_start(ro_gui_window_scroll_end, ro_gui_window_mouse_at,
+ NULL, g);
+ return true;
+}
- case TOOLBAR_BUTTON_SAVE_COMPLETE:
- ro_gui_window_action_save(g, GUI_SAVE_COMPLETE);
- break;
- case TOOLBAR_BUTTON_PRINT:
- ro_gui_window_action_print(g);
- break;
+/**
+ * Platform-dependent part of starting drag operation.
+ *
+ * \param g gui window containing the drag
+ * \param type type of drag the core is performing
+ * \param rect rectangle to constrain pointer to (relative to drag start coord)
+ * \return true iff succesful
+ */
+static bool
+gui_window_drag_start(struct gui_window *g,
+ gui_drag_type type,
+ const struct rect *rect)
+{
+ wimp_pointer pointer;
+ wimp_drag drag;
- case TOOLBAR_BUTTON_UP:
- err = browser_window_navigate_up(g->bw, false);
- if (err != NSERROR_OK) {
- ro_warn_user(messages_get_errorcode(err), NULL);
+ if (rect != NULL) {
+ /* We have a box to constrain the pointer to, for the drag
+ * duration */
+ os_error *error = xwimp_get_pointer_info(&pointer);
+ if (error) {
+ LOG("xwimp_get_pointer_info 0x%x : %s", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ return false;
}
- break;
- case TOOLBAR_BUTTON_UP_NEW:
- err = browser_window_navigate_up(g->bw, true);
- if (err != NSERROR_OK) {
- ro_warn_user(messages_get_errorcode(err), NULL);
+ drag.type = wimp_DRAG_USER_POINT;
+ drag.bbox.x0 = pointer.pos.x +
+ (int)(rect->x0 * 2 * g->scale);
+ drag.bbox.y0 = pointer.pos.y +
+ (int)(rect->y0 * 2 * g->scale);
+ drag.bbox.x1 = pointer.pos.x +
+ (int)(rect->x1 * 2 * g->scale);
+ drag.bbox.y1 = pointer.pos.y +
+ (int)(rect->y1 * 2 * g->scale);
+
+ error = xwimp_drag_box(&drag);
+ if (error) {
+ LOG("xwimp_drag_box: 0x%x : %s", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ return false;
}
+ }
+
+ switch (type) {
+ case GDRAGGING_SCROLLBAR:
+ /* Dragging a core scrollbar */
+ ro_mouse_drag_start(ro_gui_window_scroll_end, ro_gui_window_mouse_at,
+ NULL, g);
break;
default:
+ /* Not handled here yet */
break;
}
- ro_gui_window_update_toolbar_buttons(g);
+ return true;
}
/**
- * Handle Message_DataLoad (file dragged in) for a toolbar
- *
- * @todo This belongs in the toolbar module, and should be moved there
- * once the module is able to usefully handle its own events.
+ * Save the specified content as a link.
*
- * \param g window
- * \param message Message_DataLoad block
- * \return true if the load was processed
+ * \param g The window containing the content
+ * \param url The url of the link
+ * \param title The title of the link
*/
-
-bool ro_gui_toolbar_dataload(struct gui_window *g, wimp_message *message)
+static nserror
+gui_window_save_link(struct gui_window *g, nsurl *url, const char *title)
{
- if (message->data.data_xfer.file_type == osfile_TYPE_TEXT &&
- ro_gui_window_import_text(g,
- message->data.data_xfer.file_name)) {
- os_error *error;
-
- /* send DataLoadAck */
- message->action = message_DATA_LOAD_ACK;
- message->your_ref = message->my_ref;
- error = xwimp_send_message(wimp_USER_MESSAGE, message,
- message->sender);
- if (error) {
- LOG("xwimp_send_message: 0x%x: %s\n", error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- }
- return true;
- }
- return false;
+ ro_gui_save_prepare(GUI_SAVE_LINK_URL, NULL, NULL, url, title);
+ ro_gui_dialog_open_persistent(g->window, dialog_saveas, true);
+ return NSERROR_OK;
}
-/*
- * Helper code for the Wimp Event Handlers.
- */
-
/**
- * Check if a particular menu handle is a browser window menu
+ * Display a menu of options for a form select control.
*
- * \param *menu The menu in question.
- * \return true if this menu is a browser window menu
+ * \param g gui window containing form control
+ * \param control form control of type GADGET_SELECT
*/
-
-bool ro_gui_window_check_menu(wimp_menu *menu)
+static void
+gui_window_create_form_select_menu(struct gui_window *g,
+ struct form_control *control)
{
- return (ro_gui_browser_window_menu == menu) ? true : false;
-}
-
-
-/**
- * Return boolean flags to show what RISC OS types we can sensibly convert
- * the given object into.
- *
- * \todo This should probably be somewhere else but in window.c, and
- * should probably even be done in content_().
- *
- * \param h The object to test.
- * \param export_draw true on exit if a drawfile would be possible.
- * \param export_sprite true on exit if a sprite would be possible.
- * \return true if valid data is returned; else false.
- */
+ os_error *error;
+ wimp_pointer pointer;
-bool ro_gui_window_content_export_types(struct hlcache_handle *h,
- bool *export_draw, bool *export_sprite)
-{
- bool found_type = false;
+ /* The first time the menu is opened, control bypasses the normal
+ * Menu Prepare event and so we prepare here. On any re-opens,
+ * ro_gui_window_prepare_form_select_menu() is called from the
+ * normal wimp event.
+ */
- if (export_draw != NULL)
- *export_draw = false;
- if (export_sprite != NULL)
- *export_sprite = false;
+ if (!ro_gui_window_prepare_form_select_menu(g, control))
+ return;
- if (h != NULL && content_get_type(h) == CONTENT_IMAGE) {
- switch (ro_content_native_type(h)) {
- case osfile_TYPE_SPRITE:
- /* bitmap types (Sprite export possible) */
- found_type = true;
- if (export_sprite != NULL)
- *export_sprite = true;
- break;
- case osfile_TYPE_DRAW:
- /* vector types (Draw export possible) */
- found_type = true;
- if (export_draw != NULL)
- *export_draw = true;
- break;
- default:
- break;
- }
+ error = xwimp_get_pointer_info(&pointer);
+ if (error) {
+ LOG("xwimp_get_pointer_info: 0x%x: %s", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ ro_gui_menu_destroy();
+ return;
}
- return found_type;
+ gui_form_select_control = control;
+ ro_gui_menu_create(gui_form_select_menu,
+ pointer.pos.x, pointer.pos.y, g->window);
}
/**
- * Prepare the page info window for use.
+ * Import text file into window
*
- * \param *g The GUI window block to use.
+ * \param g gui window containing textarea
+ * \param filename pathname of file to be imported
+ * \return true iff successful
*/
-
-void ro_gui_window_prepare_pageinfo(struct gui_window *g)
+static bool
+ro_gui_window_import_text(struct gui_window *g, const char *filename)
{
- struct hlcache_handle *h = browser_window_get_content(g->bw);
- char icon_buf[20] = "file_xxx";
- char enc_buf[40];
- const char *icon = icon_buf;
- const char *title, *url;
- lwc_string *mime;
- const char *enc = "-";
-
- assert(h);
-
- title = content_get_title(h);
- if (title == NULL)
- title = "-";
- url = nsurl_access(hlcache_handle_get_url(h));
- if (url == NULL)
- url = "-";
- mime = content_get_mime_type(h);
-
- sprintf(icon_buf, "file_%x", ro_content_filetype(h));
- if (!ro_gui_wimp_sprite_exists(icon_buf))
- sprintf(icon_buf, "file_xxx");
+ fileswitch_object_type obj_type;
+ os_error *error;
+ char *buf, *utf8_buf, *sp;
+ int size;
+ nserror ret;
+ const char *ep;
+ char *p;
- if (content_get_type(h) == CONTENT_HTML) {
- if (content_get_encoding(h, CONTENT_ENCODING_NORMAL)) {
- snprintf(enc_buf, sizeof enc_buf, "%s (%s)",
- content_get_encoding(h, CONTENT_ENCODING_NORMAL),
- content_get_encoding(h, CONTENT_ENCODING_SOURCE));
- enc = enc_buf;
- } else {
- enc = messages_get("EncodingUnk");
- }
+ error = xosfile_read_stamped(filename, &obj_type, NULL, NULL,
+ &size, NULL, NULL);
+ if (error) {
+ LOG("xosfile_read_stamped: 0x%x:%s", error->errnum, error->errmess);
+ ro_warn_user("FileError", error->errmess);
+ return true; /* was for us, but it didn't work! */
}
- ro_gui_set_icon_string(dialog_pageinfo, ICON_PAGEINFO_ICON,
- icon, true);
- ro_gui_set_icon_string(dialog_pageinfo, ICON_PAGEINFO_TITLE,
- title, true);
- ro_gui_set_icon_string(dialog_pageinfo, ICON_PAGEINFO_URL,
- url, true);
- ro_gui_set_icon_string(dialog_pageinfo, ICON_PAGEINFO_ENC,
- enc, true);
- ro_gui_set_icon_string(dialog_pageinfo, ICON_PAGEINFO_TYPE,
- lwc_string_data(mime), true);
-
- lwc_string_unref(mime);
-}
-
+ /* Allocate one byte more than needed to ensure that the buffer is
+ * always terminated, regardless of file contents.
+ */
-/**
- * Prepare the object info window for use
- *
- * \param *object the object for which information is to be displayed
- * \param *target_url corresponding url, if any
- */
+ buf = calloc(size + 1, sizeof(char));
+ if (!buf) {
+ ro_warn_user("NoMemory", NULL);
+ return true;
+ }
-void ro_gui_window_prepare_objectinfo(struct hlcache_handle *object, nsurl *target_url)
-{
- char icon_buf[20] = "file_xxx";
- const char *url;
- lwc_string *mime;
- const char *target = "-";
+ error = xosfile_load_stamped(filename, (byte*)buf,
+ NULL, NULL, NULL, NULL, NULL);
- sprintf(icon_buf, "file_%.3x",ro_content_filetype(object));
- if (!ro_gui_wimp_sprite_exists(icon_buf)) {
- sprintf(icon_buf, "file_xxx");
+ if (error) {
+ LOG("xosfile_load_stamped: 0x%x:%s", error->errnum, error->errmess);
+ ro_warn_user("LoadError", error->errmess);
+ free(buf);
+ return true;
}
- url = nsurl_access(hlcache_handle_get_url(object));
- if (url == NULL) {
- url = "-";
+ ret = utf8_from_local_encoding(buf, size, &utf8_buf);
+ if (ret != NSERROR_OK) {
+ /* bad encoding shouldn't happen */
+ assert(ret != NSERROR_BAD_ENCODING);
+ LOG("utf8_from_local_encoding failed");
+ free(buf);
+ ro_warn_user("NoMemory", NULL);
+ return true;
}
- mime = content_get_mime_type(object);
+ size = strlen(utf8_buf);
- if (target_url != NULL) {
- target = nsurl_access(target_url);
- }
+ ep = utf8_buf + size;
+ p = utf8_buf;
- ro_gui_set_icon_string(dialog_objinfo, ICON_OBJINFO_ICON,
- icon_buf, true);
- ro_gui_set_icon_string(dialog_objinfo, ICON_OBJINFO_URL,
- url, true);
- ro_gui_set_icon_string(dialog_objinfo, ICON_OBJINFO_TARGET,
- target, true);
- ro_gui_set_icon_string(dialog_objinfo, ICON_OBJINFO_TYPE,
- lwc_string_data(mime), true);
+ /* skip leading whitespace */
+ while (isspace(*p)) p++;
- lwc_string_unref(mime);
-}
+ sp = p;
+ while (*p && *p != '\r' && *p != '\n')
+ p += utf8_next(p, ep - p, 0);
+ *p = '\0';
+
+ if (p > sp)
+ ro_gui_window_launch_url(g, sp);
+ free(buf);
+ free(utf8_buf);
+ return true;
+}
-/*
- * User Actions in the browser window
- */
/**
- * Launch a new url in the given window.
- *
- * \param g gui_window to update
- * \param url1 url to be launched
+ * RISC OS browser window operation table
*/
+static struct gui_window_table window_table = {
+ .create = gui_window_create,
+ .destroy = gui_window_destroy,
+ .invalidate = ro_gui_window_invalidate_area,
+ .get_scroll = gui_window_get_scroll,
+ .set_scroll = gui_window_set_scroll,
+ .get_dimensions = gui_window_get_dimensions,
+ .update_extent = gui_window_update_extent,
-void ro_gui_window_launch_url(struct gui_window *g, const char *url1)
-{
- nserror error;
- nsurl *url;
+ .set_title = gui_window_set_title,
+ .set_url = ro_gui_window_set_url,
+ .set_icon = gui_window_set_icon,
+ .set_status = riscos_window_set_status,
+ .set_pointer = gui_window_set_pointer,
+ .place_caret = gui_window_place_caret,
+ .remove_caret = gui_window_remove_caret,
+ .save_link = gui_window_save_link,
+ .drag_start = gui_window_drag_start,
+ .scroll_start = gui_window_scroll_start,
+ .new_content = gui_window_new_content,
+ .start_throbber = gui_window_start_throbber,
+ .stop_throbber = gui_window_stop_throbber,
+ .create_form_select_menu = gui_window_create_form_select_menu,
- if (url1 == NULL)
- return;
+ /* from save */
+ .drag_save_object = gui_drag_save_object,
+ .drag_save_selection =gui_drag_save_selection,
- ro_gui_url_complete_close();
+ /* from textselection */
+ .start_selection = gui_start_selection,
+};
- error = nsurl_create(url1, &url);
- if (error != NSERROR_OK) {
- ro_warn_user(messages_get_errorcode(error), 0);
- } else {
- ro_gui_window_set_url(g, url);
+struct gui_window_table *riscos_window_table = &window_table;
- browser_window_navigate(g->bw, url,
- NULL, BW_NAVIGATE_HISTORY,
- NULL, NULL, NULL);
- nsurl_unref(url);
- }
-}
+/* exported interface documented in riscos/window.h */
+void ro_gui_window_initialise(void)
+{
+ /* Build the browser window menu. */
-/**
- * Perform a Navigate Home action on a browser window.
- *
- * \param *g The browser window to act on.
- */
+ static const struct ns_menu browser_definition = {
+ "NetSurf", {
+ { "Page", BROWSER_PAGE, 0 },
+ { "Page.PageInfo",BROWSER_PAGE_INFO, &dialog_pageinfo },
+ { "Page.Save", BROWSER_SAVE, &dialog_saveas },
+ { "Page.SaveComp", BROWSER_SAVE_COMPLETE, &dialog_saveas },
+ { "Page.Export", NO_ACTION, 0 },
+#ifdef WITH_DRAW_EXPORT
+ { "Page.Export.Draw", BROWSER_EXPORT_DRAW, &dialog_saveas },
+#endif
+#ifdef WITH_PDF_EXPORT
+ { "Page.Export.PDF", BROWSER_EXPORT_PDF, &dialog_saveas },
+#endif
+ { "Page.Export.Text", BROWSER_EXPORT_TEXT, &dialog_saveas },
+ { "Page.SaveURL", NO_ACTION, 0 },
+ { "Page.SaveURL.URI", BROWSER_SAVE_URL_URI, &dialog_saveas },
+ { "Page.SaveURL.URL", BROWSER_SAVE_URL_URL, &dialog_saveas },
+ { "Page.SaveURL.LinkText", BROWSER_SAVE_URL_TEXT, &dialog_saveas },
+ { "_Page.Print", BROWSER_PRINT, &dialog_print },
+ { "Page.NewWindow", BROWSER_NEW_WINDOW, 0 },
+ { "Page.FindText", BROWSER_FIND_TEXT, &dialog_search },
+ { "Page.ViewSrc", BROWSER_VIEW_SOURCE, 0 },
+ { "Object", BROWSER_OBJECT, 0 },
+ { "Object.Object", BROWSER_OBJECT_OBJECT, 0 },
+ { "Object.Object.ObjInfo", BROWSER_OBJECT_INFO, &dialog_objinfo },
+ { "Object.Object.ObjSave", BROWSER_OBJECT_SAVE, &dialog_saveas },
+ { "Object.Object.Export", BROWSER_OBJECT_EXPORT, 0 },
+ { "Object.Object.Export.Sprite", BROWSER_OBJECT_EXPORT_SPRITE, &dialog_saveas },
+#ifdef WITH_DRAW_EXPORT
+ { "Object.Object.Export.ObjDraw", BROWSER_OBJECT_EXPORT_DRAW, &dialog_saveas },
+#endif
+ { "Object.Object.SaveURL", NO_ACTION, 0 },
+ { "Object.Object.SaveURL.URI", BROWSER_OBJECT_SAVE_URL_URI, &dialog_saveas },
+ { "Object.Object.SaveURL.URL", BROWSER_OBJECT_SAVE_URL_URL, &dialog_saveas },
+ { "Object.Object.SaveURL.LinkText", BROWSER_OBJECT_SAVE_URL_TEXT, &dialog_saveas },
+ { "Object.Object.ObjPrint", BROWSER_OBJECT_PRINT, 0 },
+ { "Object.Object.ObjReload", BROWSER_OBJECT_RELOAD, 0 },
+ { "Object.Link", BROWSER_OBJECT_LINK, 0 },
+ { "Object.Link.LinkSave", BROWSER_LINK_SAVE, 0 },
+ { "Object.Link.LinkSave.URI", BROWSER_LINK_SAVE_URI, &dialog_saveas },
+ { "Object.Link.LinkSave.URL", BROWSER_LINK_SAVE_URL, &dialog_saveas },
+ { "Object.Link.LinkSave.LinkText", BROWSER_LINK_SAVE_TEXT, &dialog_saveas },
+ { "_Object.Link.LinkDload", BROWSER_LINK_DOWNLOAD, 0 },
+ { "Object.Link.LinkNew", BROWSER_LINK_NEW_WINDOW, 0 },
+ { "Selection", BROWSER_SELECTION, 0 },
+ { "_Selection.SelSave", BROWSER_SELECTION_SAVE, &dialog_saveas },
+ { "Selection.Copy", BROWSER_SELECTION_COPY, 0 },
+ { "Selection.Cut", BROWSER_SELECTION_CUT, 0 },
+ { "_Selection.Paste", BROWSER_SELECTION_PASTE, 0 },
+ { "Selection.Clear", BROWSER_SELECTION_CLEAR, 0 },
+ { "Selection.SelectAll", BROWSER_SELECTION_ALL, 0 },
+ { "Navigate", NO_ACTION, 0 },
+ { "Navigate.Home", BROWSER_NAVIGATE_HOME, 0 },
+ { "Navigate.Back", BROWSER_NAVIGATE_BACK, 0 },
+ { "Navigate.Forward", BROWSER_NAVIGATE_FORWARD, 0 },
+ { "_Navigate.UpLevel", BROWSER_NAVIGATE_UP, 0 },
+ { "Navigate.Reload", BROWSER_NAVIGATE_RELOAD_ALL, 0 },
+ { "Navigate.Stop", BROWSER_NAVIGATE_STOP, 0 },
+ { "View", NO_ACTION, 0 },
+ { "View.ScaleView", BROWSER_SCALE_VIEW, &dialog_zoom },
+ { "View.Images", NO_ACTION, 0 },
+ { "View.Images.ForeImg", BROWSER_IMAGES_FOREGROUND, 0 },
+ { "View.Images.BackImg", BROWSER_IMAGES_BACKGROUND, 0 },
+ { "View.Toolbars", NO_ACTION, 0 },
+ { "View.Toolbars.ToolButtons", TOOLBAR_BUTTONS, 0 },
+ { "View.Toolbars.ToolAddress", TOOLBAR_ADDRESS_BAR, 0 },
+ { "_View.Toolbars.ToolThrob", TOOLBAR_THROBBER, 0 },
+ { "View.Toolbars.EditToolbar", TOOLBAR_EDIT, 0 },
+ { "_View.Render", NO_ACTION, 0 },
+ { "View.Render.RenderAnims", BROWSER_BUFFER_ANIMS, 0 },
+ { "View.Render.RenderAll", BROWSER_BUFFER_ALL, 0 },
+ { "_View.OptDefault", BROWSER_SAVE_VIEW, 0 },
+ { "View.Window", NO_ACTION, 0 },
+ { "View.Window.WindowSave", BROWSER_WINDOW_DEFAULT, 0 },
+ { "View.Window.WindowStagr", BROWSER_WINDOW_STAGGER, 0 },
+ { "_View.Window.WindowSize", BROWSER_WINDOW_COPY, 0 },
+ { "View.Window.WindowReset", BROWSER_WINDOW_RESET, 0 },
+ { "Utilities", NO_ACTION, 0 },
+ { "Utilities.Hotlist", HOTLIST_SHOW, 0 },
+ { "Utilities.Hotlist.HotlistAdd", HOTLIST_ADD_URL, 0 },
+ { "Utilities.Hotlist.HotlistShow", HOTLIST_SHOW, 0 },
+ { "Utilities.History", HISTORY_SHOW_GLOBAL, 0 },
+ { "Utilities.History.HistLocal", HISTORY_SHOW_LOCAL, 0 },
+ { "Utilities.History.HistGlobal", HISTORY_SHOW_GLOBAL, 0 },
+ { "Utilities.Cookies", COOKIES_SHOW, 0 },
+ { "Utilities.Cookies.ShowCookies", COOKIES_SHOW, 0 },
+ { "Utilities.Cookies.DeleteCookies", COOKIES_DELETE, 0 },
+ { "Help", HELP_OPEN_CONTENTS, 0 },
+ { "Help.HelpContent", HELP_OPEN_CONTENTS, 0 },
+ { "Help.HelpGuide", HELP_OPEN_GUIDE, 0 },
+ { "_Help.HelpInfo", HELP_OPEN_INFORMATION, 0 },
+ { "Help.HelpCredits", HELP_OPEN_CREDITS, 0 },
+ { "_Help.HelpLicence", HELP_OPEN_LICENCE, 0 },
+ { "Help.HelpInter", HELP_LAUNCH_INTERACTIVE, 0 },
+ {NULL, 0, 0}
+ }
+ };
+ ro_gui_browser_window_menu =
+ ro_gui_menu_define_menu(&browser_definition);
-void ro_gui_window_action_home(struct gui_window *g)
-{
- static const char *addr = NETSURF_HOMEPAGE;
- nsurl *url;
- nserror error;
+}
- if (g == NULL || g->bw == NULL)
- return;
- if (nsoption_charp(homepage_url) != NULL) {
- addr = nsoption_charp(homepage_url);
- }
+/* exported interface documented in riscos/window.h */
+nserror
+ro_gui_window_invalidate_area(struct gui_window *g, const struct rect *rect)
+{
+ bool use_buffer;
+ int x0, y0, x1, y1;
+ struct update_box *cur;
+ wimp_window_info info;
+ os_error *error;
- error = nsurl_create(addr, &url);
- if (error == NSERROR_OK) {
- error = browser_window_navigate(g->bw,
- url,
- NULL,
- BW_NAVIGATE_HISTORY,
- NULL,
- NULL,
- NULL);
- nsurl_unref(url);
- }
- if (error != NSERROR_OK) {
- ro_warn_user(messages_get_errorcode(error), 0);
- }
-}
+ assert(g);
+ if (rect == NULL) {
+ info.w = g->window;
+ error = xwimp_get_window_info_header_only(&info);
+ if (error) {
+ LOG("xwimp_get_window_info_header_only: 0x%x: %s",
+ error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ return NSERROR_INVALID;
+ }
-/**
- * Open a new browser window.
- *
- * \param *g The browser window to act on.
- */
+ error = xwimp_force_redraw(g->window,
+ info.extent.x0, info.extent.y0,
+ info.extent.x1, info.extent.y1);
+ if (error) {
+ LOG("xwimp_force_redraw: 0x%x: %s",
+ error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ return NSERROR_INVALID;
+ }
+ return NSERROR_OK;
+ }
-void ro_gui_window_action_new_window(struct gui_window *g)
-{
- nserror error;
+ x0 = floorf(rect->x0 * 2 * g->scale);
+ y0 = -ceilf(rect->y1 * 2 * g->scale);
+ x1 = ceilf(rect->x1 * 2 * g->scale) + 1;
+ y1 = -floorf(rect->y0 * 2 * g->scale) + 1;
+ use_buffer =
+ (g->option.buffer_everything || g->option.buffer_animations);
- if (g == NULL || g->bw == NULL)
- return;
+ /* try to optimise buffered redraws */
+ if (use_buffer) {
+ for (cur = pending_updates; cur != NULL; cur = cur->next) {
+ if ((cur->g != g) || (!cur->use_buffer)) {
+ continue;
+ }
+ if ((((cur->x0 - x1) < MARGIN) ||
+ ((cur->x1 - x0) < MARGIN)) &&
+ (((cur->y0 - y1) < MARGIN) ||
+ ((cur->y1 - y0) < MARGIN))) {
+ cur->x0 = min(cur->x0, x0);
+ cur->y0 = min(cur->y0, y0);
+ cur->x1 = max(cur->x1, x1);
+ cur->y1 = max(cur->y1, y1);
+ return NSERROR_OK;
+ }
+ }
+ }
+ cur = malloc(sizeof(struct update_box));
+ if (!cur) {
+ LOG("No memory for malloc.");
+ return NSERROR_NOMEM;
+ }
- error = browser_window_create(BW_CREATE_CLONE,
- browser_window_get_url(g->bw),
- NULL, g->bw, NULL);
+ cur->x0 = x0;
+ cur->y0 = y0;
+ cur->x1 = x1;
+ cur->y1 = y1;
+ cur->next = pending_updates;
+ pending_updates = cur;
+ cur->g = g;
+ cur->use_buffer = use_buffer;
- if (error != NSERROR_OK) {
- ro_warn_user(messages_get_errorcode(error), 0);
- }
+ return NSERROR_OK;
}
-/**
- * Open a local history pane for a browser window.
- *
- * \param g The browser window to act on.
- */
-
-void ro_gui_window_action_local_history(struct gui_window *gw)
+/* exported function documented in riscos/window.h */
+nserror ro_gui_window_set_url(struct gui_window *g, nsurl *url)
{
- nserror res;
+ size_t idn_url_l;
+ char *idn_url_s = NULL;
- if ((gw == NULL) || (gw->bw == NULL)) {
- return;
- }
+ if (g->toolbar) {
+ if (nsoption_bool(display_decoded_idn) == true) {
+ if (nsurl_get_utf8(url, &idn_url_s, &idn_url_l) != NSERROR_OK)
+ idn_url_s = NULL;
+ }
- res = ro_gui_local_history_present(gw->window, gw->bw);
+ ro_toolbar_set_url(g->toolbar, idn_url_s ? idn_url_s : nsurl_access(url), true, false);
- if (res != NSERROR_OK) {
- ro_warn_user(messages_get_errorcode(res), 0);
+ if (idn_url_s)
+ free(idn_url_s);
+
+ ro_gui_url_complete_start(g->toolbar);
}
-}
+ return NSERROR_OK;
+}
-/**
- * Open a save dialogue for a browser window contents.
- *
- * \param *g The browser window to act on.
- * \param save_type The type of save to open.
- */
-void ro_gui_window_action_save(struct gui_window *g, gui_save_type save_type)
+/* exported interface documented in riscos/window.h */
+void ro_gui_window_set_scale(struct gui_window *g, float scale)
{
- struct hlcache_handle *h;
+ g->scale = scale;
+ browser_window_set_scale(g->bw, scale, true);
+}
- if (g == NULL || g->bw == NULL || !browser_window_has_content(g->bw))
- return;
- h = browser_window_get_content(g->bw);
- if (h == NULL)
- return;
+/* exported interface documented in riscos/window.h */
+bool ro_gui_window_dataload(struct gui_window *g, wimp_message *message)
+{
+ os_error *error;
+ os_coord pos;
- ro_gui_save_prepare(save_type, h, NULL, NULL, NULL);
- ro_gui_dialog_open_persistent(g->window, dialog_saveas, true);
-}
+ /* Ignore directories etc. */
+ if (0x1000 <= message->data.data_xfer.file_type)
+ return false;
+ if (!ro_gui_window_to_window_pos(g, message->data.data_xfer.pos.x,
+ message->data.data_xfer.pos.y, &pos))
+ return false;
-/**
- * Open a text search dialogue for a browser window.
- *
- * \param *g The browser window to act on.
- */
+ if (browser_window_drop_file_at_point(g->bw, pos.x, pos.y,
+ message->data.data_xfer.file_name) == false)
+ return false;
-void ro_gui_window_action_search(struct gui_window *g)
-{
- if (g == NULL || g->bw == NULL || !browser_window_can_search(g->bw))
- return;
+ /* send DataLoadAck */
+ message->action = message_DATA_LOAD_ACK;
+ message->your_ref = message->my_ref;
+ error = xwimp_send_message(wimp_USER_MESSAGE, message, message->sender);
+ if (error) {
+ LOG("xwimp_send_message: 0x%x: %s\n", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ }
- ro_gui_search_prepare(g->bw);
- ro_gui_dialog_open_persistent(g->window, dialog_search, true);
+ return true;
}
-/**
- * Open a zoom dialogue for a browser window.
- *
- * \param *g The browser window to act on.
- */
-
-void ro_gui_window_action_zoom(struct gui_window *g)
+/* exported interface documented in riscos/window.h */
+void ro_gui_window_mouse_at(wimp_pointer *pointer, void *data)
{
- if (g == NULL)
- return;
+ os_coord pos;
+ struct gui_window *g = (struct gui_window *) data;
- ro_gui_dialog_prepare_zoom(g);
- ro_gui_dialog_open_persistent(g->window, dialog_zoom, true);
+ if (ro_gui_window_to_window_pos(g, pointer->pos.x, pointer->pos.y, &pos))
+ browser_window_mouse_track(g->bw,
+ ro_gui_mouse_drag_state(pointer->buttons,
+ wimp_BUTTON_DOUBLE_CLICK_DRAG),
+ pos.x, pos.y);
}
-/**
- * Add a hotlist entry for a browser window.
- *
- * \param *g The browser window to act on.
- */
-
-static void ro_gui_window_action_add_bookmark(struct gui_window *g)
+/* exported interface documented in riscos/window.h */
+void
+ro_gui_window_iconise(struct gui_window *g, wimp_full_message_window_info *wi)
{
- nsurl *url;
+ /* sadly there is no 'legal' way to get the sprite into
+ * the Wimp sprite pool other than via a filing system */
+ const char *temp_fname = "Pipe:$._tmpfile";
+ struct browser_window *bw = g->bw;
+ osspriteop_header *overlay = NULL;
+ osspriteop_header *sprite_header;
+ struct bitmap *bitmap;
+ osspriteop_area *area;
+ int width = 34, height = 34;
+ struct hlcache_handle *h;
+ os_error *error;
+ int len, id;
- if (g == NULL || g->bw == NULL || g->toolbar == NULL ||
- browser_window_has_content(g->bw) == false)
- return;
+ assert(bw);
- url = browser_window_get_url(g->bw);
+ h = browser_window_get_content(bw);
+ if (!h) return;
- ro_gui_hotlist_add_page(url);
- ro_toolbar_update_hotlist(g->toolbar);
-}
+ /* if an overlay sprite is defined, locate it and gets its dimensions
+ * so that we can produce a thumbnail with the same dimensions */
+ if (!ro_gui_wimp_get_sprite("ic_netsfxx", &overlay)) {
+ error = xosspriteop_read_sprite_info(osspriteop_PTR,
+ (osspriteop_area *)0x100,
+ (osspriteop_id)overlay, &width, &height, NULL,
+ NULL);
+ if (error) {
+ LOG("xosspriteop_read_sprite_info: 0x%x: %s",
+ error->errnum, error->errmess);
+ ro_warn_user("MiscError", error->errmess);
+ overlay = NULL;
+ } else if (sprite_bpp(overlay) != 8) {
+ LOG("overlay sprite is not 8bpp");
+ overlay = NULL;
+ }
+ }
+ /* create the thumbnail sprite */
+ bitmap = riscos_bitmap_create(width, height,
+ BITMAP_NEW | BITMAP_OPAQUE | BITMAP_CLEAR_MEMORY);
+ if (!bitmap) {
+ LOG("Thumbnail initialisation failed.");
+ return;
+ }
+ riscos_bitmap_render(bitmap, h);
+ if (overlay) {
+ riscos_bitmap_overlay_sprite(bitmap, overlay);
+ }
+ area = riscos_bitmap_convert_8bpp(bitmap);
+ riscos_bitmap_destroy(bitmap);
+ if (!area) {
+ LOG("Thumbnail conversion failed.");
+ return;
+ }
-/**
- * Remove a hotlist entry for a browser window.
- *
- * \param *g The browser window to act on.
- */
+ /* choose a suitable sprite name */
+ id = 0;
+ while (iconise_used[id])
+ if ((unsigned)++id >= NOF_ELEMENTS(iconise_used)) {
+ id = iconise_next;
+ if ((unsigned)++iconise_next >=
+ NOF_ELEMENTS(iconise_used))
+ iconise_next = 0;
+ break;
+ }
-static void ro_gui_window_action_remove_bookmark(struct gui_window *g)
-{
- nsurl *url;
+ sprite_header = (osspriteop_header *)(area + 1);
+ len = sprintf(sprite_header->name, "ic_netsf%.2d", id);
- if (g == NULL || g->bw == NULL || g->toolbar == NULL ||
- browser_window_has_content(g->bw) == false)
+ error = xosspriteop_save_sprite_file(osspriteop_USER_AREA,
+ area, temp_fname);
+ if (error) {
+ LOG("xosspriteop_save_sprite_file: 0x%x:%s", error->errnum, error->errmess);
+ ro_warn_user("MiscError", error->errmess);
+ free(area);
return;
+ }
- url = browser_window_get_url(g->bw);
-
- ro_gui_hotlist_remove_page(url);
-}
+ error = xwimpspriteop_merge_sprite_file(temp_fname);
+ if (error) {
+ LOG("xwimpspriteop_merge_sprite_file: 0x%x:%s", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ remove(temp_fname);
+ free(area);
+ return;
+ }
+ memcpy(wi->sprite_name, sprite_header->name + 3, len - 2); /* inc NUL */
+ strncpy(wi->title, g->title, sizeof(wi->title));
+ wi->title[sizeof(wi->title) - 1] = '\0';
-/**
- * Open a print dialogue for a browser window.
- *
- * \param *g The browser window to act on.
- */
+ if (wimptextop_string_width(wi->title, 0) > 182) {
+ /* work around bug in Pinboard where it will fail to display
+ * the icon if the text is very wide */
+ if (strlen(wi->title) > 10)
+ wi->title[10] = '\0'; /* pinboard does this anyway */
+ while (wimptextop_string_width(wi->title, 0) > 182)
+ wi->title[strlen(wi->title) - 1] = '\0';
+ }
-void ro_gui_window_action_print(struct gui_window *g)
-{
- if (g == NULL)
- return;
+ wi->size = sizeof(wimp_full_message_window_info);
+ wi->your_ref = wi->my_ref;
+ error = xwimp_send_message(wimp_USER_MESSAGE, (wimp_message*)wi,
+ wi->sender);
+ if (error) {
+ LOG("xwimp_send_message: 0x%x:%s", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ }
+ else {
+ g->iconise_icon = id;
+ iconise_used[id] = true;
+ }
- ro_gui_print_prepare(g);
- ro_gui_dialog_open_persistent(g->window, dialog_print, true);
+ free(area);
}
-/**
- * Open a page info box for a browser window.
- *
- * \param *g The browser window to act on.
- */
-
-void ro_gui_window_action_page_info(struct gui_window *g)
+/* exported interface documented in riscos/window.h */
+bool ro_gui_toolbar_dataload(struct gui_window *g, wimp_message *message)
{
- if (g == NULL || g->bw == NULL ||
- browser_window_has_content(g->bw) == false)
- return;
+ if (message->data.data_xfer.file_type == osfile_TYPE_TEXT &&
+ ro_gui_window_import_text(g,
+ message->data.data_xfer.file_name)) {
+ os_error *error;
- ro_gui_window_prepare_pageinfo(g);
- ro_gui_dialog_open_persistent(g->window, dialog_pageinfo, false);
+ /* send DataLoadAck */
+ message->action = message_DATA_LOAD_ACK;
+ message->your_ref = message->my_ref;
+ error = xwimp_send_message(wimp_USER_MESSAGE, message,
+ message->sender);
+ if (error) {
+ LOG("xwimp_send_message: 0x%x: %s\n", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ }
+ return true;
+ }
+ return false;
}
-/*
- * Window and Toolbar Redraw and Update
- */
+/* exported interface documented in riscos/window.h */
+bool ro_gui_window_check_menu(wimp_menu *menu)
+{
+ return (ro_gui_browser_window_menu == menu) ? true : false;
+}
-/**
- * Redraws the content for all windows.
- */
+/* exported interface documented in riscos/window.h */
void ro_gui_window_redraw_all(void)
{
struct gui_window *g;
@@ -4113,25 +4505,7 @@ void ro_gui_window_redraw_all(void)
}
-/**
- * Remove all pending update boxes for a window
- *
- * \param g gui_window
- */
-void ro_gui_window_remove_update_boxes(struct gui_window *g)
-{
- struct update_box *cur;
-
- for (cur = pending_updates; cur != NULL; cur = cur->next) {
- if (cur->g == g)
- cur->g = NULL;
- }
-}
-
-
-/**
- * Redraw any pending update boxes.
- */
+/* exported interface documented in riscos/window.h */
void ro_gui_window_update_boxes(void)
{
osbool more;
@@ -4214,10 +4588,7 @@ void ro_gui_window_update_boxes(void)
}
-/**
- * Destroy all browser windows.
- */
-
+/* exported interface documented in riscos/window.h */
void ro_gui_window_quit(void)
{
while (window_list) {
@@ -4229,13 +4600,10 @@ void ro_gui_window_quit(void)
}
-/**
- * Animate the "throbbers" of all browser windows.
- */
-
+/* exported interface documented in riscos/window.h */
void ro_gui_throb(void)
{
- struct gui_window *g;
+ struct gui_window *g;
for (g = window_list; g; g = g->next) {
if (!g->active)
@@ -4246,245 +4614,7 @@ void ro_gui_throb(void)
}
-/**
- * Update the toolbar buttons for a given browser window to reflect the
- * current state of its contents.
- *
- * Note that the parameters to this function are arranged so that it can be
- * supplied to the toolbar module as an button state update callback.
- *
- * \param *g The browser window to update.
- */
-
-void ro_gui_window_update_toolbar_buttons(struct gui_window *g)
-{
- struct browser_window *bw;
- struct toolbar *toolbar;
-
- if (g == NULL || g->toolbar == NULL)
- return;
-
- bw = g->bw;
- toolbar = g->toolbar;
-
- ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_RELOAD,
- !browser_window_reload_available(bw));
-
- ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_STOP,
- !browser_window_stop_available(bw));
-
- ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_BACK,
- !browser_window_back_available(bw));
-
- ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_FORWARD,
- !browser_window_forward_available(bw));
-
- ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_UP,
- !browser_window_up_available(bw));
-
- ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_SEARCH,
- !browser_window_can_search(bw));
-
- ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_SCALE,
- !browser_window_has_content(bw));
-
- ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_PRINT,
- !browser_window_has_content(bw));
-
- ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_SAVE_SOURCE,
- !browser_window_has_content(bw));
-
- ro_toolbar_update_urlsuggest(toolbar);
-}
-
-
-/**
- * Update a window to reflect a change in toolbar size: used as a callback by
- * the toolbar module when a toolbar height changes.
- *
- * \param *data void pointer the window's gui_window struct
- */
-
-void ro_gui_window_update_toolbar(void *data)
-{
- struct gui_window *g = (struct gui_window *) data;
-
- if (g != NULL)
- gui_window_update_extent(g);
-}
-
-
-/**
- * Save a new toolbar button configuration: used as a callback by the toolbar
- * module when a buttonbar edit has finished.
- *
- * \param *data void pointer to the window's gui_window struct
- * \param *config pointer to a malloc()'d button config string.
- */
-
-void ro_gui_window_save_toolbar_buttons(void *data, char *config)
-{
- nsoption_set_charp(toolbar_browser, config);
- ro_gui_save_options();
-}
-
-
-/**
- * Update a window and its toolbar to reflect a new theme: used as a callback
- * by the toolbar module when a theme change affects a toolbar.
- *
- * \param *data void pointer to the window's gui_window struct
- * \param ok true if the bar still exists; else false.
- */
-
-void ro_gui_window_update_theme(void *data, bool ok)
-{
- struct gui_window *g = (struct gui_window *) data;
-
- if (g != NULL && g->toolbar != NULL) {
- if (ok) {
- gui_window_update_extent(g);
- } else {
- g->toolbar = NULL;
- }
- }
-}
-
-
-/*
- * General Window Support
- */
-
-/**
- * Import text file into window
- *
- * \param g gui window containing textarea
- * \param filename pathname of file to be imported
- * \return true iff successful
- */
-
-bool ro_gui_window_import_text(struct gui_window *g, const char *filename)
-{
- fileswitch_object_type obj_type;
- os_error *error;
- char *buf, *utf8_buf, *sp;
- int size;
- nserror ret;
- const char *ep;
- char *p;
-
- error = xosfile_read_stamped(filename, &obj_type, NULL, NULL,
- &size, NULL, NULL);
- if (error) {
- LOG("xosfile_read_stamped: 0x%x:%s", error->errnum, error->errmess);
- ro_warn_user("FileError", error->errmess);
- return true; /* was for us, but it didn't work! */
- }
-
- /* Allocate one byte more than needed to ensure that the buffer is
- * always terminated, regardless of file contents.
- */
-
- buf = calloc(size + 1, sizeof(char));
- if (!buf) {
- ro_warn_user("NoMemory", NULL);
- return true;
- }
-
- error = xosfile_load_stamped(filename, (byte*)buf,
- NULL, NULL, NULL, NULL, NULL);
-
- if (error) {
- LOG("xosfile_load_stamped: 0x%x:%s", error->errnum, error->errmess);
- ro_warn_user("LoadError", error->errmess);
- free(buf);
- return true;
- }
-
- ret = utf8_from_local_encoding(buf, size, &utf8_buf);
- if (ret != NSERROR_OK) {
- /* bad encoding shouldn't happen */
- assert(ret != NSERROR_BAD_ENCODING);
- LOG("utf8_from_local_encoding failed");
- free(buf);
- ro_warn_user("NoMemory", NULL);
- return true;
- }
- size = strlen(utf8_buf);
-
- ep = utf8_buf + size;
- p = utf8_buf;
-
- /* skip leading whitespace */
- while (isspace(*p)) p++;
-
- sp = p;
- while (*p && *p != '\r' && *p != '\n')
- p += utf8_next(p, ep - p, 0);
- *p = '\0';
-
- if (p > sp)
- ro_gui_window_launch_url(g, sp);
-
- free(buf);
- free(utf8_buf);
- return true;
-}
-
-
-/**
- * Clones a browser window's options.
- *
- * \param new_gui the new gui window
- * \param old_gui the gui window to clone from, or NULL for default
- */
-
-void ro_gui_window_clone_options(
- struct gui_window *new_gui,
- struct gui_window *old_gui)
-{
- assert(new_gui);
-
- /* Clone the basic options
- */
- if (!old_gui) {
- new_gui->option.buffer_animations = nsoption_bool(buffer_animations);
- new_gui->option.buffer_everything = nsoption_bool(buffer_everything);
- } else {
- new_gui->option = old_gui->option;
- }
-
- /* Set up the toolbar
- */
- if (new_gui->toolbar) {
- ro_toolbar_set_display_buttons(new_gui->toolbar,
- nsoption_bool(toolbar_show_buttons));
- ro_toolbar_set_display_url(new_gui->toolbar,
- nsoption_bool(toolbar_show_address));
- ro_toolbar_set_display_throbber(new_gui->toolbar,
- nsoption_bool(toolbar_show_throbber));
- if ((old_gui) && (old_gui->toolbar)) {
- ro_toolbar_set_display_buttons(new_gui->toolbar,
- ro_toolbar_get_display_buttons(
- old_gui->toolbar));
- ro_toolbar_set_display_url(new_gui->toolbar,
- ro_toolbar_get_display_url(
- old_gui->toolbar));
- ro_toolbar_set_display_throbber(new_gui->toolbar,
- ro_toolbar_get_display_throbber(
- old_gui->toolbar));
- ro_toolbar_process(new_gui->toolbar, -1, true);
- }
- }
-}
-
-
-/**
- * Makes a browser window's options the default.
- *
- * \param gui The riscos gui window to set default options in.
- */
-
+/* exported interface documented in riscos/window.h */
void ro_gui_window_default_options(struct gui_window *gui)
{
if (gui == NULL)
@@ -4512,179 +4642,20 @@ void ro_gui_window_default_options(struct gui_window *gui)
}
-/*
- * Custom Menu Support
- */
-
-/**
- * Prepare or reprepare a form select menu, setting up the menu handle
- * globals in the process.
- *
- * \param g The RISC OS gui window the menu is in.
- * \param control The form control needing a menu.
- * \return true if the menu is OK to be opened; else false.
- */
-
-bool ro_gui_window_prepare_form_select_menu(struct gui_window *g,
- struct form_control *control)
-{
- unsigned int item, entries;
- char *text_convert, *temp;
- struct form_option *option;
- bool reopen = true;
- nserror err;
-
- assert(control);
-
- /* enumerate the entries */
- entries = 0;
- option = form_select_get_option(control, entries);
- while (option != NULL) {
- entries++;
- option = form_select_get_option(control, entries);
- }
-
- if (entries == 0) {
- /* no menu to display */
- ro_gui_menu_destroy();
- return false;
- }
-
- /* free riscos menu if there already is one */
- if ((gui_form_select_menu) && (control != gui_form_select_control)) {
- for (item = 0; ; item++) {
- free(gui_form_select_menu->entries[item].data.
- indirected_text.text);
- if (gui_form_select_menu->entries[item].menu_flags &
- wimp_MENU_LAST)
- break;
- }
- free(gui_form_select_menu->title_data.indirected_text.text);
- free(gui_form_select_menu);
- gui_form_select_menu = 0;
- }
-
- /* allocate new riscos menu */
- if (!gui_form_select_menu) {
- reopen = false;
- gui_form_select_menu = malloc(wimp_SIZEOF_MENU(entries));
- if (!gui_form_select_menu) {
- ro_warn_user("NoMemory", 0);
- ro_gui_menu_destroy();
- return false;
- }
- err = utf8_to_local_encoding(messages_get("SelectMenu"), 0,
- &text_convert);
- if (err != NSERROR_OK) {
- /* badenc should never happen */
- assert(err != NSERROR_BAD_ENCODING);
- LOG("utf8_to_local_encoding failed");
- ro_warn_user("NoMemory", 0);
- ro_gui_menu_destroy();
- return false;
- }
- gui_form_select_menu->title_data.indirected_text.text =
- text_convert;
- ro_gui_menu_init_structure(gui_form_select_menu, entries);
- }
-
- /* initialise menu entries from form control */
- for (item = 0; item < entries; item++) {
- option = form_select_get_option(control, item);
- gui_form_select_menu->entries[item].menu_flags = 0;
- if (option->selected)
- gui_form_select_menu->entries[item].menu_flags =
- wimp_MENU_TICKED;
- if (!reopen) {
-
- /* convert spaces to hard spaces to stop things
- * like 'Go Home' being treated as if 'Home' is a
- * keyboard shortcut and right aligned in the menu.
- */
-
- temp = cnv_space2nbsp(option->text);
- if (!temp) {
- LOG("cnv_space2nbsp failed");
- ro_warn_user("NoMemory", 0);
- ro_gui_menu_destroy();
- return false;
- }
-
- err = utf8_to_local_encoding(temp,
- 0, &text_convert);
- if (err != NSERROR_OK) {
- /* A bad encoding should never happen,
- * so assert this */
- assert(err != NSERROR_BAD_ENCODING);
- LOG("utf8_to_enc failed");
- ro_warn_user("NoMemory", 0);
- ro_gui_menu_destroy();
- return false;
- }
-
- free(temp);
-
- gui_form_select_menu->entries[item].data.indirected_text.text =
- text_convert;
- gui_form_select_menu->entries[item].data.indirected_text.size =
- strlen(gui_form_select_menu->entries[item].
- data.indirected_text.text) + 1;
- }
- }
-
- gui_form_select_menu->entries[0].menu_flags |=
- wimp_MENU_TITLE_INDIRECTED;
- gui_form_select_menu->entries[item - 1].menu_flags |= wimp_MENU_LAST;
-
- return true;
-}
-
-/**
- * Process selections from a form select menu, passing them back to the core.
- *
- * \param *g The browser window affected by the menu.
- * \param *selection The menu selection.
- */
-
-void ro_gui_window_process_form_select_menu(struct gui_window *g,
- wimp_selection *selection)
-{
- assert(g != NULL);
-
- if (selection->items[0] >= 0)
- form_select_process_selection(gui_form_select_control,
- selection->items[0]);
-}
-
-
-/*
- * Window and Toolbar Lookup
- */
-
-/**
- * Convert a RISC OS window handle to a gui_window.
- *
- * \param window RISC OS window handle.
- * \return A pointer to a riscos gui window if found or NULL.
- */
-
+/* exported interface documented in riscos/window.h */
struct gui_window *ro_gui_window_lookup(wimp_w window)
{
struct gui_window *g;
- for (g = window_list; g; g = g->next)
- if (g->window == window)
+ for (g = window_list; g; g = g->next) {
+ if (g->window == window) {
return g;
+ }
+ }
return NULL;
}
-/**
- * Convert a toolbar RISC OS window handle to a gui_window.
- *
- * \param window RISC OS window handle of a toolbar
- * \return pointer to a structure if found, NULL otherwise
- */
-
+/* exported interface documented in riscos/window.h */
struct gui_window *ro_gui_toolbar_lookup(wimp_w window)
{
struct gui_window *g = NULL;
@@ -4702,22 +4673,9 @@ struct gui_window *ro_gui_toolbar_lookup(wimp_w window)
}
-/*
- * Core to RISC OS Conversions
- */
-
-/**
- * Convert x,y screen co-ordinates into window co-ordinates.
- *
- * \param g gui window
- * \param x x ordinate
- * \param y y ordinate
- * \param pos receives position in window co-ordinatates
- * \return true iff conversion successful
- */
-
-bool ro_gui_window_to_window_pos(struct gui_window *g, int x, int y,
- os_coord *pos)
+/* exported interface documented in riscos/window.h */
+bool
+ro_gui_window_to_window_pos(struct gui_window *g, int x, int y, os_coord *pos)
{
wimp_window_state state;
os_error *error;
@@ -4737,18 +4695,11 @@ bool ro_gui_window_to_window_pos(struct gui_window *g, int x, int y,
}
-/**
- * Convert x,y window co-ordinates into screen co-ordinates.
- *
- * \param g gui window
- * \param x x ordinate
- * \param y y ordinate
- * \param pos receives position in screen co-ordinatates
- * \return true iff conversion successful
- */
-
-bool ro_gui_window_to_screen_pos(struct gui_window *g, int x, int y,
- os_coord *pos)
+/* exported interface documented in riscos/window.h */
+bool ro_gui_window_to_screen_pos(struct gui_window *g,
+ int x,
+ int y,
+ os_coord *pos)
{
wimp_window_state state;
os_error *error;
@@ -4768,24 +4719,9 @@ bool ro_gui_window_to_screen_pos(struct gui_window *g, int x, int y,
}
-/*
- * Miscellaneous Functions
- *
- * \TODO -- These items might well belong elsewhere.
- */
-
-/**
- * Returns the state of the mouse buttons and modifiers keys for a
- * mouse action, suitable for passing to the OS-independent
- * browser window/ treeview/ etc code.
- *
- * \param buttons Wimp button state.
- * \param type Wimp work-area/icon type for decoding.
- * \return NetSurf core button state.
- */
-
-browser_mouse_state ro_gui_mouse_click_state(wimp_mouse_state buttons,
- wimp_icon_flags type)
+/* exported interface documented in riscos/window.h */
+enum browser_mouse_state
+ro_gui_mouse_click_state(wimp_mouse_state buttons, wimp_icon_flags type)
{
browser_mouse_state state = 0; /* Blank state with nothing set */
static struct {
@@ -4900,18 +4836,9 @@ browser_mouse_state ro_gui_mouse_click_state(wimp_mouse_state buttons,
}
-/**
- * Returns the state of the mouse buttons and modifiers keys whilst
- * dragging, for passing to the OS-independent browser window/ treeview/
- * etc code
- *
- * \param buttons Wimp button state.
- * \param type Wimp work-area/icon type for decoding.
- * \return NetSurf core button state.
- */
-
-browser_mouse_state ro_gui_mouse_drag_state(wimp_mouse_state buttons,
- wimp_icon_flags type)
+/* exported interface documented in riscos/window.h */
+browser_mouse_state
+ro_gui_mouse_drag_state(wimp_mouse_state buttons, wimp_icon_flags type)
{
browser_mouse_state state = 0; /* Blank state with nothing set */
@@ -4939,10 +4866,7 @@ browser_mouse_state ro_gui_mouse_drag_state(wimp_mouse_state buttons,
}
-/**
- * Returns true iff one or more Shift keys is held down
- */
-
+/* exported interface documented in riscos/window.h */
bool ro_gui_shift_pressed(void)
{
int shift = 0;
@@ -4951,10 +4875,7 @@ bool ro_gui_shift_pressed(void)
}
-/**
- * Returns true iff one or more Ctrl keys is held down
- */
-
+/* exported interface documented in riscos/window.h */
bool ro_gui_ctrl_pressed(void)
{
int ctrl = 0;
@@ -4963,10 +4884,7 @@ bool ro_gui_ctrl_pressed(void)
}
-/**
- * Returns true iff one or more Alt keys is held down
- */
-
+/* exported interface documented in riscos/window.h */
bool ro_gui_alt_pressed(void)
{
int alt = 0;
@@ -4974,36 +4892,41 @@ bool ro_gui_alt_pressed(void)
return (alt == 0xff);
}
-static struct gui_window_table window_table = {
- .create = gui_window_create,
- .destroy = gui_window_destroy,
- .invalidate = ro_gui_window_invalidate_area,
- .get_scroll = gui_window_get_scroll,
- .set_scroll = gui_window_set_scroll,
- .get_dimensions = gui_window_get_dimensions,
- .update_extent = gui_window_update_extent,
- .set_title = gui_window_set_title,
- .set_url = ro_gui_window_set_url,
- .set_icon = gui_window_set_icon,
- .set_status = riscos_window_set_status,
- .set_pointer = gui_window_set_pointer,
- .place_caret = gui_window_place_caret,
- .remove_caret = gui_window_remove_caret,
- .save_link = gui_window_save_link,
- .drag_start = gui_window_drag_start,
- .scroll_start = gui_window_scroll_start,
- .new_content = gui_window_new_content,
- .start_throbber = gui_window_start_throbber,
- .stop_throbber = gui_window_stop_throbber,
- .create_form_select_menu = gui_window_create_form_select_menu,
+/* exported interface documented in riscos/window.h */
+void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
+{
+ static gui_pointer_shape curr_pointer = GUI_POINTER_DEFAULT;
+ struct ro_gui_pointer_entry *entry;
+ os_error *error;
- /* from save */
- .drag_save_object = gui_drag_save_object,
- .drag_save_selection =gui_drag_save_selection,
+ if (shape == curr_pointer)
+ return;
- /* from textselection */
- .start_selection = gui_start_selection,
-};
+ assert(shape < sizeof ro_gui_pointer_table /
+ sizeof ro_gui_pointer_table[0]);
-struct gui_window_table *riscos_window_table = &window_table;
+ entry = &ro_gui_pointer_table[shape];
+
+ if (entry->wimp_area) {
+ /* pointer in the Wimp's sprite area */
+ error = xwimpspriteop_set_pointer_shape(entry->sprite_name,
+ 1, entry->xactive, entry->yactive, 0, 0);
+ if (error) {
+ LOG("xwimpspriteop_set_pointer_shape: 0x%x: %s", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ }
+ } else {
+ /* pointer in our own sprite area */
+ error = xosspriteop_set_pointer_shape(osspriteop_USER_AREA,
+ gui_sprites,
+ (osspriteop_id) entry->sprite_name,
+ 1, entry->xactive, entry->yactive, 0, 0);
+ if (error) {
+ LOG("xosspriteop_set_pointer_shape: 0x%x: %s", error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ }
+ }
+
+ curr_pointer = shape;
+}
diff --git a/frontends/riscos/window.h b/frontends/riscos/window.h
index 30b0965..0a5bd43 100644
--- a/frontends/riscos/window.h
+++ b/frontends/riscos/window.h
@@ -30,10 +30,21 @@ struct nsurl;
extern struct gui_window_table *riscos_window_table;
+/**
+ * Initialise the browser window module and its menus.
+ */
void ro_gui_window_initialise(void);
+
+/**
+ * Check if a particular menu handle is a browser window menu
+ *
+ * \param menu The menu in question.
+ * \return true if this menu is a browser window menu
+ */
bool ro_gui_window_check_menu(wimp_menu *menu);
+
/**
* Set the contents of a window's address bar.
*
@@ -42,6 +53,7 @@ bool ro_gui_window_check_menu(wimp_menu *menu);
*/
nserror ro_gui_window_set_url(struct gui_window *g, struct nsurl *url);
+
/**
* Cause an area of a window to be invalidated
*
@@ -56,5 +68,186 @@ nserror ro_gui_window_set_url(struct gui_window *g, struct nsurl *url);
*/
nserror ro_gui_window_invalidate_area(struct gui_window *g, const struct rect *rect);
+
+/**
+ * Set a gui_window's scale
+ */
+void ro_gui_window_set_scale(struct gui_window *g, float scale);
+
+
+/**
+ * Handle Message_DataLoad (file dragged in) for a window.
+ *
+ * If the file was dragged into a form file input, it is used as the value.
+ *
+ * \param g window
+ * \param message Message_DataLoad block
+ * \return true if the load was processed
+ */
+bool ro_gui_window_dataload(struct gui_window *g, wimp_message *message);
+
+
+/**
+ * Handle pointer movements in a browser window.
+ *
+ * \param pointer new mouse position
+ * \param data browser window that the pointer is in
+ */
+void ro_gui_window_mouse_at(wimp_pointer *pointer, void *data);
+
+
+/**
+ * Window is being iconised.
+ *
+ * Create a suitable thumbnail sprite (which, sadly, must be in the
+ * Wimp sprite pool), and return the sprite name and truncated title
+ * to the iconiser
+ *
+ * \param g the gui window being iconised
+ * \param wi the WindowInfo message from the iconiser
+ */
+void ro_gui_window_iconise(struct gui_window *g, wimp_full_message_window_info *wi);
+
+
+/**
+ * Handle Message_DataLoad (file dragged in) for a toolbar
+ *
+ * @todo This belongs in the toolbar module, and should be moved there
+ * once the module is able to usefully handle its own events.
+ *
+ * \param g window
+ * \param message Message_DataLoad block
+ * \return true if the load was processed
+ */
+bool ro_gui_toolbar_dataload(struct gui_window *g, wimp_message *message);
+
+
+/**
+ * Redraws the content for all windows.
+ */
+void ro_gui_window_redraw_all(void);
+
+
+/**
+ * Redraw any pending update boxes.
+ */
+void ro_gui_window_update_boxes(void);
+
+
+/**
+ * Destroy all browser windows.
+ */
+void ro_gui_window_quit(void);
+
+
+/**
+ * Close all browser windows
+ *
+ * no need for a separate fn same operation as quit
+*/
+#define ro_gui_window_close_all ro_gui_window_quit
+
+
+/**
+ * Animate the "throbbers" of all browser windows.
+ */
+void ro_gui_throb(void);
+
+/**
+ * Makes a browser window's options the default.
+ *
+ * \param gui The riscos gui window to set default options in.
+ */
+void ro_gui_window_default_options(struct gui_window *gui);
+
+
+/**
+ * Convert a RISC OS window handle to a gui_window.
+ *
+ * \param window RISC OS window handle.
+ * \return A pointer to a riscos gui window if found or NULL.
+ */
+struct gui_window *ro_gui_window_lookup(wimp_w window);
+
+
+/**
+ * Convert a toolbar RISC OS window handle to a gui_window.
+ *
+ * \param window RISC OS window handle of a toolbar
+ * \return pointer to a structure if found, NULL otherwise
+ */
+struct gui_window *ro_gui_toolbar_lookup(wimp_w window);
+
+
+/**
+ * Convert x,y screen co-ordinates into window co-ordinates.
+ *
+ * \param g gui window
+ * \param x x ordinate
+ * \param y y ordinate
+ * \param pos receives position in window co-ordinatates
+ * \return true iff conversion successful
+ */
+bool ro_gui_window_to_window_pos(struct gui_window *g, int x, int y, os_coord *pos);
+
+
+/**
+ * Convert x,y window co-ordinates into screen co-ordinates.
+ *
+ * \param g gui window
+ * \param x x ordinate
+ * \param y y ordinate
+ * \param pos receives position in screen co-ordinatates
+ * \return true iff conversion successful
+ */
+bool ro_gui_window_to_screen_pos(struct gui_window *g, int x, int y, os_coord *pos);
+
+/**
+ * Returns the state of the mouse buttons and modifiers keys for a
+ * mouse action, suitable for passing to the OS-independent
+ * browser window/ treeview/ etc code.
+ *
+ * \param buttons Wimp button state.
+ * \param type Wimp work-area/icon type for decoding.
+ * \return NetSurf core button state.
+ */
+enum browser_mouse_state ro_gui_mouse_click_state(wimp_mouse_state buttons, wimp_icon_flags type);
+
+
+/**
+ * Returns the state of the mouse buttons and modifiers keys whilst
+ * dragging, for passing to the OS-independent browser window/ treeview/
+ * etc code
+ *
+ * \param buttons Wimp button state.
+ * \param type Wimp work-area/icon type for decoding.
+ * \return NetSurf core button state.
+ */
+enum browser_mouse_state ro_gui_mouse_drag_state(wimp_mouse_state buttons, wimp_icon_flags type);
+
+
+/**
+ * Returns true iff one or more Shift keys is held down
+ */
+bool ro_gui_shift_pressed(void);
+
+
+/**
+ * Returns true iff one or more Ctrl keys is held down
+ */
+bool ro_gui_ctrl_pressed(void);
+
+
+/**
+ * Returns true iff one or more Alt keys is held down
+ */
+bool ro_gui_alt_pressed(void);
+
+
+/**
+ * Change mouse pointer shape
+ */
+void gui_window_set_pointer(struct gui_window *g, enum gui_pointer_shape shape);
+
#endif
diff --git a/frontends/windows/cookies.c b/frontends/windows/cookies.c
index c4880fa..b3c56da 100644
--- a/frontends/windows/cookies.c
+++ b/frontends/windows/cookies.c
@@ -136,7 +136,7 @@ static nserror nsw32_cookie_init(HINSTANCE hInstance)
return NSERROR_OK;
}
- ncwin = malloc(sizeof(struct nsw32_cookie_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/windows/corewindow.c b/frontends/windows/corewindow.c
index adf1c65..3c31c5e 100644
--- a/frontends/windows/corewindow.c
+++ b/frontends/windows/corewindow.c
@@ -211,7 +211,7 @@ nsw32_corewindow_vscroll(struct nsw32_corewindow *nsw32_cw,
NULL,
NULL,
NULL,
- SW_ERASE | SW_INVALIDATE);
+ SW_INVALIDATE);
/**
* /todo win32 corewindow vertical scrolling needs us to
@@ -278,7 +278,7 @@ nsw32_corewindow_hscroll(struct nsw32_corewindow *nsw32_cw,
NULL,
NULL,
NULL,
- SW_ERASE | SW_INVALIDATE);
+ SW_INVALIDATE);
return 0;
}
@@ -286,18 +286,40 @@ nsw32_corewindow_hscroll(struct nsw32_corewindow *nsw32_cw,
static LRESULT
nsw32_corewindow_mousedown(struct nsw32_corewindow *nsw32_cw,
+ HWND hwnd,
int x, int y,
browser_mouse_state button)
{
+ SCROLLINFO si; /* scroll information */
+
+ /* get scroll positions */
+ si.cbSize = sizeof(si);
+ si.fMask = SIF_POS;
+ GetScrollInfo(hwnd, SB_HORZ, &si);
+ x += si.nPos;
+ GetScrollInfo(hwnd, SB_VERT, &si);
+ y += si.nPos;
+
nsw32_cw->mouse(nsw32_cw, button, x, y);
return 0;
}
static LRESULT
nsw32_corewindow_mouseup(struct nsw32_corewindow *nsw32_cw,
+ HWND hwnd,
int x, int y,
browser_mouse_state button)
{
+ SCROLLINFO si; /* scroll information */
+
+ /* get scroll positions */
+ si.cbSize = sizeof(si);
+ si.fMask = SIF_POS;
+ GetScrollInfo(hwnd, SB_HORZ, &si);
+ x += si.nPos;
+ GetScrollInfo(hwnd, SB_VERT, &si);
+ y += si.nPos;
+
nsw32_cw->mouse(nsw32_cw, button, x, y);
return 0;
}
@@ -342,25 +364,25 @@ nsw32_window_corewindow_event_callback(HWND hwnd,
return nsw32_corewindow_hscroll(nsw32_cw, hwnd, wparam);
case WM_LBUTTONDOWN:
- return nsw32_corewindow_mousedown(nsw32_cw,
+ return nsw32_corewindow_mousedown(nsw32_cw, hwnd,
GET_X_LPARAM(lparam),
GET_Y_LPARAM(lparam),
BROWSER_MOUSE_PRESS_1);
case WM_RBUTTONDOWN:
- return nsw32_corewindow_mousedown(nsw32_cw,
+ return nsw32_corewindow_mousedown(nsw32_cw, hwnd,
GET_X_LPARAM(lparam),
GET_Y_LPARAM(lparam),
BROWSER_MOUSE_PRESS_2);
case WM_LBUTTONUP:
- return nsw32_corewindow_mouseup(nsw32_cw,
+ return nsw32_corewindow_mouseup(nsw32_cw, hwnd,
GET_X_LPARAM(lparam),
GET_Y_LPARAM(lparam),
BROWSER_MOUSE_CLICK_1);
case WM_RBUTTONUP:
- return nsw32_corewindow_mouseup(nsw32_cw,
+ return nsw32_corewindow_mouseup(nsw32_cw, hwnd,
GET_X_LPARAM(lparam),
GET_Y_LPARAM(lparam),
BROWSER_MOUSE_CLICK_2);
@@ -393,14 +415,22 @@ nsw32_cw_invalidate_area(struct core_window *cw, const struct rect *rect)
RECT redrawrect;
if (rect != NULL) {
- redrawrectp = &redrawrect;
+ SCROLLINFO si; /* scroll information */
+
+ /* get scroll positions */
+ si.cbSize = sizeof(si);
+ si.fMask = SIF_POS;
+ GetScrollInfo(nsw32_cw->hWnd, SB_HORZ, &si);
+ redrawrect.left = (long)rect->x0 - si.nPos;
+ redrawrect.right = (long)rect->x1 - si.nPos;
- redrawrect.left = (long)rect->x0;
- redrawrect.top = (long)rect->y0;
- redrawrect.right =(long)rect->x1;
- redrawrect.bottom = (long)rect->y1;
+ GetScrollInfo(nsw32_cw->hWnd, SB_VERT, &si);
+ redrawrect.top = (long)rect->y0 - si.nPos;
+ redrawrect.bottom = (long)rect->y1 - si.nPos;
+ redrawrectp = &redrawrect;
}
+
RedrawWindow(nsw32_cw->hWnd,
redrawrectp,
NULL,
@@ -456,7 +486,7 @@ static void
nsw32_cw_drag_status(struct core_window *cw, core_window_drag_status ds)
{
struct nsw32_corewindow *nsw32_cw = (struct nsw32_corewindow *)cw;
- nsw32_cw->drag_staus = ds;
+ nsw32_cw->drag_status = ds;
}
@@ -478,6 +508,7 @@ nsw32_corewindow_init(HINSTANCE hInstance,
/* setup the core window callback table */
nsw32_cw->cb_table = &nsw32_cw_cb_table;
+ nsw32_cw->drag_status = CORE_WINDOW_DRAG_NONE;
/* start with the content area being as small as possible */
nsw32_cw->content_width = -1;
diff --git a/frontends/windows/corewindow.h b/frontends/windows/corewindow.h
index b78c72e..cffae3c 100644
--- a/frontends/windows/corewindow.h
+++ b/frontends/windows/corewindow.h
@@ -38,7 +38,7 @@ struct nsw32_corewindow {
const char *title;
/** drag status set by core */
- core_window_drag_status drag_staus;
+ core_window_drag_status drag_status;
/** table of callbacks for core window operations */
struct core_window_callback_table *cb_table;
diff --git a/frontends/windows/global_history.c b/frontends/windows/global_history.c
index 0ba013b..dcc75ba 100644
--- a/frontends/windows/global_history.c
+++ b/frontends/windows/global_history.c
@@ -126,7 +126,7 @@ static nserror nsw32_global_history_init(HINSTANCE hInstance)
return NSERROR_OK;
}
- ncwin = malloc(sizeof(struct nsw32_global_history_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/windows/hotlist.c b/frontends/windows/hotlist.c
index 0efe76f..e8dd90b 100644
--- a/frontends/windows/hotlist.c
+++ b/frontends/windows/hotlist.c
@@ -130,7 +130,7 @@ static nserror nsw32_hotlist_init(HINSTANCE hInstance)
return NSERROR_OK;
}
- ncwin = malloc(sizeof(struct nsw32_hotlist_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/windows/local_history.c b/frontends/windows/local_history.c
index f447423..722d365 100644
--- a/frontends/windows/local_history.c
+++ b/frontends/windows/local_history.c
@@ -111,11 +111,7 @@ nsw32_local_history_draw(struct nsw32_corewindow *nsw32_cw,
lhw = (struct nsw32_local_history_window *)nsw32_cw;
- local_history_redraw(lhw->session,
- r->x0 - scrollx,
- r->y0 - scrolly,
- r,
- &ctx);
+ local_history_redraw(lhw->session, -scrollx, -scrolly, r, &ctx);
return NSERROR_OK;
}
@@ -147,7 +143,7 @@ nsw32_local_history_init(HINSTANCE hInstance,
return res;
}
- ncwin = malloc(sizeof(struct nsw32_local_history_window));
+ ncwin = calloc(1, sizeof(*ncwin));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/render/html.c b/render/html.c
index 62b7f3e..a573ef5 100644
--- a/render/html.c
+++ b/render/html.c
@@ -706,7 +706,6 @@ dom_default_action_DOMSubtreeModified_cb(struct dom_event *evt, void *pw)
{
dom_event_target *node;
dom_node_type type;
- dom_string *name;
dom_exception exc;
html_content *htmlc = pw;
@@ -722,16 +721,19 @@ dom_default_action_DOMSubtreeModified_cb(struct dom_event *evt, void *pw)
exc = dom_node_get_node_type(node, &type);
if ((exc == DOM_NO_ERR) && (type == DOM_ELEMENT_NODE)) {
/* an element node has been modified */
- exc = dom_node_get_node_name(node, &name);
- if ((exc == DOM_NO_ERR) && (name != NULL)) {
+ dom_html_element_type tag_type;
- if (dom_string_caseless_isequal(name,
- corestring_dom_style)) {
- html_css_update_style(htmlc,
- (dom_node *)node);
- }
+ exc = dom_html_element_get_tag_type(node, &tag_type);
+ if (exc != DOM_NO_ERR) {
+ tag_type = DOM_HTML_ELEMENT_TYPE__UNKNOWN;
+ }
- dom_string_unref(name);
+ switch (tag_type) {
+ case DOM_HTML_ELEMENT_TYPE_STYLE:
+ html_css_update_style(htmlc, (dom_node *)node);
+ break;
+ default:
+ break;
}
}
dom_node_unref(node);
--
NetSurf Browser
6 years, 3 months